/*! * Quill Editor v1.0.2 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen * Copyright (c) 2013, salesforce.com */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Quill=e():t.Quill=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var o=n(1),i=r(o),l=n(45),a=n(48),s=n(53),u=n(54),c=r(u),f=n(55),h=r(f),p=n(56),d=r(p),y=n(46),v=n(47),b=n(49),g=n(50),m=n(57),_=r(m),O=n(58),w=r(O),x=n(59),k=r(x),E=n(60),j=r(E),A=n(61),N=r(A),q=n(62),T=r(q),S=n(63),P=r(S),L=n(64),C=r(L),M=n(31),I=r(M),R=n(65),B=r(R),D=n(66),U=r(D),H=n(67),F=r(H),K=n(68),z=r(K),Z=n(100),V=r(Z),W=n(102),Y=r(W),G=n(103),X=r(G),Q=n(104),$=r(Q),J=n(105),tt=r(J),et=n(107),nt=r(et);i["default"].register({"attributors/class/align":l.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":v.ColorClass,"attributors/class/direction":a.DirectionClass,"attributors/class/font":b.FontClass,"attributors/class/size":g.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":v.ColorStyle,"attributors/style/direction":a.DirectionStyle,"attributors/style/font":b.FontStyle,"attributors/style/size":g.SizeStyle},!0),i["default"].register({"formats/align":l.AlignClass,"formats/direction":a.DirectionClass,"formats/indent":s.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":v.ColorStyle,"formats/font":b.FontClass,"formats/size":g.SizeClass,"formats/blockquote":c["default"],"formats/code-block":I["default"],"formats/header":h["default"],"formats/list":d["default"],"formats/bold":_["default"],"formats/code":M.Code,"formats/italic":w["default"],"formats/link":k["default"],"formats/script":j["default"],"formats/strike":N["default"],"formats/underline":T["default"],"formats/image":P["default"],"formats/video":C["default"],"formats/list/item":p.ListItem,"modules/formula":B["default"],"modules/syntax":U["default"],"modules/toolbar":F["default"],"themes/bubble":tt["default"],"themes/snow":nt["default"],"ui/icons":z["default"],"ui/picker":V["default"],"ui/icon-picker":X["default"],"ui/color-picker":Y["default"],"ui/tooltip":$["default"]},!0),t.exports=i["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var o=n(2),i=r(o),l=n(18),a=r(l),s=n(32),u=r(s),c=n(33),f=r(c),h=n(42),p=r(h),d=n(37),y=r(d),v=n(34),b=r(v),g=n(35),m=r(g),_=n(43),O=r(_),w=n(36),x=r(w),k=n(44),E=r(k),j=n(51),A=r(j),N=n(52),q=r(N);a["default"].register({"blots/block":u["default"],"blots/block/embed":s.BlockEmbed,"blots/break":f["default"],"blots/container":p["default"],"blots/cursor":y["default"],"blots/embed":b["default"],"blots/inline":m["default"],"blots/scroll":O["default"],"blots/text":x["default"],"modules/clipboard":E["default"],"modules/history":A["default"],"modules/keyboard":q["default"]}),i["default"].register(u["default"],f["default"],y["default"],m["default"],O["default"],x["default"]),t.exports=a["default"]},function(t,e,n){"use strict";var r=n(3),o=n(7),i=n(12),l=n(13),a=n(14),s=n(15),u=n(16),c=n(17),f=n(8),h=n(10),p=n(11),d=n(9),y=n(6),v={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:r["default"],Format:o["default"],Leaf:i["default"],Embed:u["default"],Scroll:l["default"],Block:s["default"],Inline:a["default"],Text:c["default"],Attributor:{Attribute:f["default"],Class:h["default"],Style:p["default"],Store:d["default"]}};Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=v},function(t,e,n){"use strict";function r(t){var e=a.find(t);if(null==e)try{e=a.create(t)}catch(n){e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach(function(t){e.domNode.appendChild(t)}),t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(4),l=n(5),a=n(6),s=function(t){function e(){t.apply(this,arguments)}return o(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){var e=this;t.prototype.attach.call(this),this.children=new i["default"],[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=r(t);e.insertBefore(n,e.children.head)}catch(o){if(o instanceof a.ParchmentError)return;throw o}})},e.prototype.deleteAt=function(t,e){return 0===t&&e===this.length()?this.remove():void this.children.forEachAt(t,e,function(t,e,n){t.deleteAt(e,n)})},e.prototype.descendant=function(t,n){var r=this.children.find(n),o=r[0],i=r[1];return null==t.blotName&&t(o)||null!=t.blotName&&o instanceof t?[o,i]:o instanceof e?o.descendant(t,i):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var o=[],i=r;return this.children.forEachAt(n,r,function(n,r,l){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&o.push(n),n instanceof e&&(o=o.concat(n.descendants(t,r,i))),i-=l}),o},e.prototype.detach=function(){this.children.forEach(function(t){t.detach()}),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,function(t,e,o){t.formatAt(e,o,n,r)})},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),o=r[0],i=r[1];if(o)o.insertAt(i,e,n);else{var l=null==n?a.create("text",e):a.create(e,n);this.appendChild(l)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(e){return t instanceof e}))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce(function(t,e){return t+e.length()},0)},e.prototype.moveChildren=function(t,e){this.children.forEach(function(n){t.insertBefore(n,e)})},e.prototype.optimize=function(){if(t.prototype.optimize.call(this),0===this.children.length)if(null!=this.statics.defaultChild){var e=a.create(this.statics.defaultChild);this.appendChild(e),e.optimize()}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),o=r[0],i=r[1],l=[[this,t]];return o instanceof e?l.concat(o.path(i,n)):(null!=o&&l.push([o,i]),l)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),function(t,r,o){t=t.split(r,e),n.appendChild(t)}),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t){var e=this,n=[],o=[];t.forEach(function(t){t.target===e.domNode&&"childList"===t.type&&(n.push.apply(n,t.addedNodes),o.push.apply(o,t.removedNodes))}),o.forEach(function(t){var n=a.find(t);null!=n&&(null!=n.domNode.parentNode&&n.domNode.parentNode!==e.domNode||n.detach())}),n.filter(function(t){return t.parentNode==e.domNode}).sort(function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(t){var n=null;null!=t.nextSibling&&(n=a.find(t.nextSibling));var o=r(t);o.next==n&&null!=o.next||(null!=o.parent&&o.parent.removeChild(e),e.insertBefore(o,n))})},e}(l["default"]);Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=s},function(t,e){"use strict";var n=function(){function t(){this.head=this.tail=void 0,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=void 0,this.head=this.tail=t),this.length+=1},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(ta?n(r,t-a,Math.min(e,a+u-t)):n(r,0,Math.min(u,t+e-a)),a+=u}},t.prototype.map=function(t){return this.reduce(function(e,n){return e.push(t(n)),e},[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";var r=n(6),o=function(){function t(t){this.domNode=t,this.attach()}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){this.domNode[r.DATA_KEY]={blot:this}},t.prototype.clone=function(){var t=this.domNode.cloneNode();return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){var n=this.isolate(t,e);n.remove()},t.prototype.formatAt=function(t,e,n,o){var i=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var l=r.create(this.statics.scope);i.wrap(l),l.format(n,o)}},t.prototype.insertAt=function(t,e,n){var o=null==n?r.create("text",e):r.create(e,n),i=this.split(t);this.parent.insertBefore(o,i)},t.prototype.insertInto=function(t,e){if(null!=this.parent&&this.parent.children.remove(this),t.children.insertBefore(this,e),null!=e)var n=e.domNode;null!=this.next&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t){void 0===t&&(t=[])},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=o},function(t,e){"use strict";function n(t,e){var n=o(t);if(null==n)throw new a("Unable to create "+t+" blot");var r=n,i=t instanceof Node?t:r.create(e);return new r(i,e)}function r(t,n){return void 0===n&&(n=!1),null==t?null:null!=t[e.DATA_KEY]?t[e.DATA_KEY].blot:n?r(t.parentNode,n):null}function o(t,e){void 0===e&&(e=h.ANY);var n;if("string"==typeof t)n=f[t]||s[t];else if(t instanceof Text)n=f.text;else if("number"==typeof t)t&h.LEVEL&h.BLOCK?n=f.block:t&h.LEVEL&h.INLINE&&(n=f.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var o in r)if(n=u[r[o]])break;n=n||c[t.tagName]}return null==n?null:e&h.LEVEL&n.scope&&e&h.TYPE&n.scope?n:null}function i(){for(var t=[],e=0;e1)return t.map(function(t){return i(t)});var n=t[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new a("Invalid definition");if("abstract"===n.blotName)throw new a("Cannot register abstract class");if(f[n.blotName||n.attrName]=n,"string"==typeof n.keyName)s[n.keyName]=n;else if(null!=n.className&&(u[n.className]=n),null!=n.tagName){Array.isArray(n.tagName)?n.tagName=n.tagName.map(function(t){return t.toUpperCase()}):n.tagName=n.tagName.toUpperCase();var r=Array.isArray(n.tagName)?n.tagName:[n.tagName];r.forEach(function(t){null!=c[t]&&null!=n.className||(c[t]=n)})}return n}var l=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},a=function(t){function e(e){e="[Parchment] "+e,t.call(this,e),this.message=e,this.name=this.constructor.name}return l(e,t),e}(Error);e.ParchmentError=a;var s={},u={},c={},f={};e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(e.Scope||(e.Scope={}));var h=e.Scope;e.create=n,e.find=r,e.query=o,e.register=i},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(8),i=n(9),l=n(3),a=n(6),s=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.attach=function(){t.prototype.attach.call(this),this.attributes=new i["default"](this.domNode)},e.prototype.format=function(t,e){var n=a.query(t);n instanceof o["default"]?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e){var n=this;t.prototype.update.call(this,e),e.some(function(t){return t.target===n.domNode&&"attributes"===t.type})&&this.attributes.build()},e.prototype.wrap=function(n,r){var o=t.prototype.wrap.call(this,n,r);return o instanceof e&&o.statics.scope===this.statics.scope&&this.attributes.move(o),o},e}(l["default"]);Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=s},function(t,e,n){"use strict";var r=n(6),o=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,function(t){return t.name})},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){var n=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE));return null!=n&&(null==this.whitelist||this.whitelist.indexOf(e)>-1)},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){return t.getAttribute(this.keyName)},t}();Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=o},function(t,e,n){"use strict";var r=n(8),o=n(10),i=n(11),l=n(6),a=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r["default"].keys(this.domNode),n=o["default"].keys(this.domNode),a=i["default"].keys(this.domNode);e.concat(n).concat(a).forEach(function(e){var n=l.query(e,l.Scope.ATTRIBUTE);n instanceof r["default"]&&(t.attributes[n.attrName]=n)})},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach(function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)})},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(e,n){return e[n]=t.attributes[n].value(t.domNode),e},{})},t}();Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=a},function(t,e,n){"use strict";function r(t,e){var n=t.getAttribute("class")||"";return n.split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(8),l=function(t){function e(){t.apply(this,arguments)}return o(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){var e=r(t,this.keyName);e.forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=r(t,this.keyName)[0]||"";return e.slice(this.keyName.length+1)},e}(i["default"]);Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=l},function(t,e,n){"use strict";function r(t){var e=t.split("-"),n=e.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return e[0]+n}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(8),l=function(t){function e(){t.apply(this,arguments)}return o(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(t){var e=t.split(":");return e[0].trim()})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[r(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[r(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){return t.style[r(this.keyName)]},e}(i["default"]);Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(5),i=n(6),l=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return t!==this.domNode?-1:Math.min(e,1)},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){return t={},t[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e.scope=i.Scope.INLINE_BLOT,e}(o["default"]);Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(3),i=n(6),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},a=100,s=function(t){function e(e){var n=this;t.call(this,e),this.parent=null,this.observer=new MutationObserver(function(t){n.update(t)}),this.observer.observe(this.domNode,l)}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach(function(t){t.remove()}):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,o){this.update(),t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e){var n=this;void 0===e&&(e=[]),t.prototype.optimize.call(this),e.push.apply(e,this.observer.takeRecords());for(var r=function(t,e){void 0===e&&(e=!0),null!=t&&t!==n&&null!=t.domNode.parentNode&&(null==t.domNode[i.DATA_KEY].mutations&&(t.domNode[i.DATA_KEY].mutations=[]),e&&r(t.parent))},l=function(t){null!=t.domNode[i.DATA_KEY]&&null!=t.domNode[i.DATA_KEY].mutations&&(t instanceof o["default"]&&t.children.forEach(l),t.optimize())},s=e,u=0;s.length>0;u+=1){if(u>=a)throw new Error("[Parchment] Maximum optimize iterations reached");s.forEach(function(t){var e=i.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(r(i.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=i.find(t,!1);r(e,!1),e instanceof o["default"]&&e.children.forEach(function(t){r(t,!1)})})):"attributes"===t.type&&r(e.prev)),r(e))}),this.children.forEach(l),s=this.observer.takeRecords(),e.push.apply(e,s)}},e.prototype.update=function(e){var n=this;e=e||this.observer.takeRecords(),e.map(function(t){var e=i.find(t.target,!0);if(null!=e)return null==e.domNode[i.DATA_KEY].mutations?(e.domNode[i.DATA_KEY].mutations=[t],e):(e.domNode[i.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==n&&t.update(t.domNode[i.DATA_KEY].mutations||[])}),null!=this.domNode[i.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[i.DATA_KEY].mutations),this.optimize(e)},e.blotName="scroll",e.defaultChild="block",e.scope=i.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o["default"]);Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=s},function(t,e,n){"use strict";function r(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(7),l=n(6),a=function(t){function e(){t.apply(this,arguments)}return o(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach(function(t){t instanceof i["default"]||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,r,o){if(null!=this.formats()[r]||l.query(r,l.Scope.ATTRIBUTE)){var i=this.isolate(e,n);i.format(r,o)}else t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.optimize=function(){t.prototype.optimize.call(this);var n=this.formats();if(0===Object.keys(n).length)return this.unwrap();var o=this.next;o instanceof e&&o.prev===this&&r(n,o.formats())&&(o.moveChildren(this),o.remove())},e.blotName="inline",e.scope=l.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i["default"]);Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(7),i=n(6),l=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.formats=function(n){var r=i.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName)},e.prototype.formatAt=function(e,n,r,o){null!=i.query(r,i.Scope.BLOCK)?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=i.query(n,i.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var o=this.split(e),l=i.create(n,r);o.parent.insertBefore(l,o)}},e.blotName="block",e.scope=i.Scope.BLOCK_BLOT,e.tagName="P",e}(o["default"]);Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(12),i=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,o){0===e&&n===this.length()?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(o["default"]);Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(12),i=n(6),l=function(t){function e(e){t.call(this,e),this.text=this.statics.value(this.domNode)}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){return t.data},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(){t.prototype.optimize.call(this),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=i.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t){var e=this;t.some(function(t){return"characterData"===t.type&&t.target===e.domNode})&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=i.Scope.INLINE_BLOT,e}(o["default"]);Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(e=(0,k["default"])(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e),null==e.theme||e.theme===T.DEFAULTS.theme)e.theme=N["default"];else if(e.theme=T["import"]("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?");var n=(0,k["default"])(!0,{},e.theme.DEFAULTS);[n,e].forEach(function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach(function(e){t.modules[e]===!0&&(t.modules[e]={})})});var r=Object.keys(n.modules).concat(Object.keys(e.modules)),o=r.reduce(function(t,e){var n=T["import"]("modules/"+e);return null==n?q.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t},{});return null!=e.modules&&null!=e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,k["default"])(!0,{},T.DEFAULTS,{modules:o},n,e),["bounds","container"].forEach(function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),e}function l(t,e,n,r,o){var i={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===("undefined"==typeof n?"undefined":s(n))?(i=n,o=r):"string"==typeof n&&(null!=r?i[n]=r:o=n),o=o||v["default"].sources.API,[t,e,i,o]}function a(t,e,n,r){if(null==t)return null;var o=void 0,i=void 0;if(e instanceof h["default"]){var l=[t.index,t.index+t.length].map(function(t){return e.transformPosition(t,r===v["default"].sources.USER)}),a=u(l,2);o=a[0],i=a[1]}else{var s=[t.index,t.index+t.length].map(function(t){return t=0?t+n:Math.max(e,t+n)}),c=u(s,2);o=c[0],i=c[1]}return new O.Range(o,i-o)}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=e.overload=e.expandConfig=void 0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},u=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function t(t,e){for(var n=0;n"+l+"


"),this.history.clear(),r.readOnly&&this.disable(),r.placeholder&&this.root.setAttribute("data-placeholder",r.placeholder),this.root.classList.toggle("ql-blank",this.editor.isBlank()),this.emitter.on(v["default"].events.TEXT_CHANGE,function(t){n.root.classList.toggle("ql-blank",n.editor.isBlank())})}return c(t,null,[{key:"debug",value:function(t){j["default"].level(t); }},{key:"import",value:function(t){return null==this.imports[t]&&q.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];if("string"!=typeof t){var o=t.attrName||t.blotName;"string"==typeof o?this.register("formats/"+o,t,e):Object.keys(t).forEach(function(r){n.register(r,t[r],e)})}else null==this.imports[t]||r||q.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName&&_["default"].register(e)}}]),c(t,[{key:"addContainer",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("string"==typeof t){var n=t;t=document.createElement("div"),t.classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=l(t,e,n),o=u(r,4);t=o[0],e=o[1],n=o[3];var i=this.getSelection(),s=this.editor.deleteText(t,e,n);return i=a(i,t,-1*e,n),this.setSelection(i,v["default"].sources.SILENT),s}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];this.editor.enable(t),t||this.blur()}},{key:"focus",value:function(){this.selection.focus(),this.selection.scrollIntoView()}},{key:"format",value:function(t,e){var n=arguments.length<=2||void 0===arguments[2]?v["default"].sources.API:arguments[2],r=this.getSelection(!0),o=new h["default"];if(null==r)return o;if(_["default"].query(t,_["default"].Scope.BLOCK))o=this.formatLine(r,t,e,n);else{if(0===r.length)return this.selection.format(t,e),o;o=this.formatText(r,t,e,n)}return this.setSelection(r,v["default"].sources.SILENT),o}},{key:"formatLine",value:function(t,e,n,r,o){var i=void 0,a=l(t,e,n,r,o),s=u(a,4);t=s[0],e=s[1],i=s[2],o=s[3];var c=this.getSelection(),f=this.editor.formatLine(t,e,i,o);return this.selection.setRange(c,!0,v["default"].sources.SILENT),this.selection.scrollIntoView(),f}},{key:"formatText",value:function(t,e,n,r,o){var i=void 0,a=l(t,e,n,r,o),s=u(a,4);t=s[0],e=s[1],i=s[2],o=s[3];var c=this.getSelection(),f=this.editor.formatText(t,e,i,o);return this.selection.setRange(c,!0,v["default"].sources.SILENT),this.selection.scrollIntoView(),f}},{key:"getBounds",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return"number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length)}},{key:"getContents",value:function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]?this.getLength()-t:arguments[1],n=l(t,e),r=u(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length<=0||void 0===arguments[0]?this.getSelection():arguments[0],e=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]?this.getLength()-t:arguments[1],n=l(t,e),r=u(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var o=arguments.length<=3||void 0===arguments[3]?t.sources.API:arguments[3],i=this.getSelection(),l=this.editor.insertEmbed(e,n,r,o);return i=a(i,l,o),this.setSelection(i,v["default"].sources.SILENT),l}},{key:"insertText",value:function(t,e,n,r,o){var i=void 0,s=this.getSelection(),c=l(t,0,n,r,o),f=u(c,4);t=f[0],i=f[2],o=f[3];var h=this.editor.insertText(t,e,i,o);return s=a(s,t,e.length,o),this.setSelection(s,v["default"].sources.SILENT),h}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e){var n=arguments.length<=2||void 0===arguments[2]?v["default"].sources.API:arguments[2];if("string"==typeof t)return this.setContents(this.clipboard.convert(t),e);var r=this.clipboard.convert(e);return this.updateContents((new h["default"]).retain(t).concat(r),n)}},{key:"removeFormat",value:function(t,e,n){var r=this.getSelection(),o=l(t,e,n),i=u(o,4);t=i[0],e=i[1],n=i[3];var s=this.editor.removeFormat(t,e,n);return r=a(r,s,n),this.setSelection(r,v["default"].sources.SILENT),s}},{key:"setContents",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?v["default"].sources.API:arguments[1];t=new h["default"](t).slice();var n=t.ops[t.ops.length-1];return null!=n&&"\n"===n.insert[n.insert.length-1]||t.insert("\n"),t["delete"](this.getLength()),this.editor.applyDelta(t,e)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=l(e,n,r),i=u(o,4);e=i[0],n=i[1],r=i[3],this.selection.setRange(new O.Range(e,n),r)}this.selection.scrollIntoView()}},{key:"setText",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?v["default"].sources.API:arguments[1],n=(new h["default"]).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length<=0||void 0===arguments[0]?v["default"].sources.USER:arguments[0],e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?v["default"].sources.API:arguments[1],n=this.getSelection();Array.isArray(t)&&(t=new h["default"](t.slice()));var r=this.editor.applyDelta(t,e);return null!=n&&(n=a(n,r,e),this.setSelection(n,v["default"].sources.SILENT)),r}}]),t}();T.DEFAULTS={bounds:document.body,formats:null,modules:{},placeholder:"",readOnly:!1,theme:"default"},T.events=v["default"].events,T.sources=v["default"].sources,T.version="1.0.2",T.imports={delta:h["default"],parchment:_["default"],"core/module":g["default"],"core/theme":N["default"]},e.expandConfig=i,e.overload=l,e["default"]=T},function(t,e){"use strict";var n=document.createElement("div");n.classList.toggle("test-class",!1),n.classList.contains("test-class")&&!function(){var t=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,n){return arguments.length>1&&!this.contains(e)==!n?n:t.call(this,e)}}(),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return r!==-1&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function r(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r,e=Object(this),n=e.length>>>0,o=arguments[1],i=0;i0&&(n.attributes=e),this.push(n))},s.prototype["delete"]=function(t){return t<=0?this:this.push({"delete":t})},s.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},s.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=i(!0,{},t),"object"==typeof n){if("number"==typeof t["delete"]&&"number"==typeof n["delete"])return this.ops[e-1]={"delete":n["delete"]+t["delete"]},this;if("number"==typeof n["delete"]&&null!=t.insert&&(e-=1,n=this.ops[e-1],"object"!=typeof n))return this.ops.unshift(t),this;if(o(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},s.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},s.prototype.length=function(){return this.ops.reduce(function(t,e){return t+l.length(e)},0)},s.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=l.iterator(this.ops),o=0;o0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},s.prototype.diff=function(t){var e=new s;if(this.ops===t.ops)return e;var n=[this.ops,t.ops].map(function(e){return e.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;var r=e===t.ops?"on":"with";throw new Error("diff() called "+r+" non-document")}).join("")}),i=r(n[0],n[1]),u=l.iterator(this.ops),c=l.iterator(t.ops);return i.forEach(function(t){for(var n=t[1].length;n>0;){var i=0;switch(t[0]){case r.INSERT:i=Math.min(c.peekLength(),n),e.push(c.next(i));break;case r.DELETE:i=Math.min(n,u.peekLength()),u.next(i),e["delete"](i);break;case r.EQUAL:i=Math.min(u.peekLength(),c.peekLength(),n);var a=u.next(i),s=c.next(i);o(a.insert,s.insert)?e.retain(i,l.attributes.diff(a.attributes,s.attributes)):e.push(s)["delete"](i)}n-=i}}),e.chop()},s.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=l.iterator(this.ops),r=l.iterator(t.ops),o=new s;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),a=n.next(i),u=r.next(i);if(a["delete"])continue;u["delete"]?o.push(u):o.retain(i,l.attributes.transform(a.attributes,u.attributes,e))}else o.retain(l.length(n.next()));return o.chop()},s.prototype.transformPosition=function(t,e){e=!!e;for(var n=l.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(re.length?t:e,l=t.length>e.length?e:t,a=i.indexOf(l);if(a!=-1)return r=[[f,i.substring(0,a)],[h,l],[f,i.substring(a+l.length)]],t.length>e.length&&(r[0][0]=r[2][0]=c),r;if(1==l.length)return[[c,t],[f,e]];var u=s(t,e);if(u){var p=u[0],d=u[1],y=u[2],v=u[3],b=u[4],g=n(p,y),m=n(d,v);return g.concat([[h,b]],m)}return o(t,e)}function o(t,e){for(var n=t.length,r=e.length,o=Math.ceil((n+r)/2),l=o,a=2*o,s=new Array(a),u=new Array(a),h=0;hn)v+=2;else if(x>r)y+=2;else if(d){var k=l+p-_;if(k>=0&&k=E)return i(t,e,O,x)}}}for(var j=-m+b;j<=m-g;j+=2){var E,k=l+j;E=j==-m||j!=m&&u[k-1]n)g+=2;else if(A>r)b+=2;else if(!d){var w=l+p-j;if(w>=0&&w=E)return i(t,e,O,x)}}}}return[[c,t],[f,e]]}function i(t,e,r,o){var i=t.substring(0,r),l=e.substring(0,o),a=t.substring(r),s=e.substring(o),u=n(i,l),c=n(a,s);return u.concat(c)}function l(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n=t.length?[r,o,i,s,f]:null}var r=t.length>e.length?t:e,o=t.length>e.length?e:t;if(r.length<4||2*o.lengthu[4].length?s:u:s;var c,f,h,p;t.length>e.length?(c=i[0],f=i[1],h=i[2],p=i[3]):(h=i[0],p=i[1],c=i[2],f=i[3]);var d=i[4];return[c,f,h,p,d]}function u(t){t.push([h,""]);for(var e,n=0,r=0,o=0,i="",s="";n1?(0!==r&&0!==o&&(e=l(s,i),0!==e&&(n-r-o>0&&t[n-r-o-1][0]==h?t[n-r-o-1][1]+=s.substring(0,e):(t.splice(0,0,[h,s.substring(0,e)]),n++),s=s.substring(e),i=i.substring(e)),e=a(s,i),0!==e&&(t[n][1]=s.substring(s.length-e)+t[n][1],s=s.substring(0,s.length-e),i=i.substring(0,i.length-e))),0===r?t.splice(n-o,r+o,[f,s]):0===o?t.splice(n-r,r+o,[c,i]):t.splice(n-r-o,r+o,[c,i],[f,s]),n=n-r-o+(r?1:0)+(o?1:0)+1):0!==n&&t[n-1][0]==h?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,o=0,r=0,i="",s=""}""===t[t.length-1][1]&&t.pop();var p=!1;for(n=1;n0&&"number"!=typeof t[0]))}function i(t,e,n){var i,c;if(r(t)||r(e))return!1;if(t.prototype!==e.prototype)return!1;if(s(t))return!!s(e)&&(t=l.call(t),e=l.call(e),u(t,e,n));if(o(t)){if(!o(e))return!1;if(t.length!==e.length)return!1;for(i=0;i=0;i--)if(f[i]!=h[i])return!1;for(i=f.length-1;i>=0;i--)if(c=f[i],!u(t[c],e[c],n))return!1;return typeof t==typeof e}var l=Array.prototype.slice,a=n(23),s=n(24),u=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:i(t,e,n))}},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}e=t.exports="function"==typeof Object.keys?Object.keys:n,e.shim=n},function(t,e){function n(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function r(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}var o="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();e=t.exports=o?n:r,e.supported=n,e.unsupported=r},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},i=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return"undefined"==typeof i||n.call(t,i)};t.exports=function l(){var t,e,n,r,a,s,u=arguments[0],c=1,f=arguments.length,h=!1;for("boolean"==typeof u?(h=u,u=arguments[1]||{},c=2):("object"!=typeof u&&"function"!=typeof u||null==u)&&(u={});c0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,r){return o(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce(function(n,r){return void 0===t[r]&&(n[r]=e[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new r(t)},length:function(t){return"number"==typeof t["delete"]?t["delete"]:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=l.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e["delete"])return{"delete":t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},r.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index]["delete"]?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},t.exports=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){return Object.keys(e).reduce(function(n,r){return null==t[r]?n:(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]],n)},{})}function a(t){return t.ops.reduce(function(t,e){if(1===e.insert){var n=(0,j["default"])(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||e.attributes.list!==!0&&e.attributes.bullet!==!0||(e=(0,j["default"])(e),e.attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)},new h["default"])}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},u=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function t(t,e){for(var n=0;n=o&&!a.endsWith("\n")&&(r=!0),e.scroll.insertAt(t,a);var c=e.scroll.line(t),f=u(c,2),h=f[0],p=f[1],y=(0,T["default"])({},(0,x.bubbleFormats)(h));if(h instanceof k["default"]){var v=h.descendant(g["default"].Leaf,p),b=u(v,1),m=b[0];y=(0,T["default"])(y,(0,x.bubbleFormats)(m))}l=d["default"].attributes.diff(y,l)||{}}else if("object"===s(n.insert)){var _=Object.keys(n.insert)[0];if(null==_)return t;e.scroll.insertAt(t,_,n.insert[_])}o+=i}return Object.keys(l).forEach(function(n){e.scroll.formatAt(t,i,n,l[n])}),t+i},0),t.ops.reduce(function(t,n){return"number"==typeof n["delete"]?(e.scroll.deleteAt(t,n["delete"]),t):t+(n.retain||n.insert.length||1)},0),this.scroll.batch=!1,this.scroll.optimize(),this.update(t,n)}},{key:"deleteText",value:function(t,e){var n=arguments.length<=2||void 0===arguments[2]?v["default"].sources.API:arguments[2];return this.scroll.deleteAt(t,e),this.update((new h["default"]).retain(t)["delete"](e),n)}},{key:"enable",value:function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];this.scroll.domNode.setAttribute("contenteditable",t)}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],o=arguments.length<=3||void 0===arguments[3]?v["default"].sources.API:arguments[3];return this.scroll.update(),Object.keys(r).forEach(function(o){var i=n.scroll.lines(t,Math.max(e,1)),l=e;i.forEach(function(e,i){var a=e.length();if(e instanceof _["default"]){var s=t-e.offset(n.scroll),u=e.newlineIndex(s+l)-s+1;e.formatAt(s,u,o,r[o])}else e.format(o,r[o]);l-=a})}),this.scroll.optimize(),this.update((new h["default"]).retain(t).retain(e,(0,j["default"])(r)),o)}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],o=arguments.length<=3||void 0===arguments[3]?v["default"].sources.API:arguments[3];return Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e,o,r[o])}),this.update((new h["default"]).retain(t).retain(e,(0,j["default"])(r)),o)}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(t,e){return t.concat(e.delta())},new h["default"])}},{key:"getFormat",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=[],r=[];0===e?this.scroll.path(t).forEach(function(t){var e=u(t,1),o=e[0];o instanceof k["default"]?n.push(o):o instanceof g["default"].Leaf&&r.push(o)}):(n=this.scroll.lines(t,e),r=this.scroll.descendants(g["default"].Leaf,t,e));var o=[n,r].map(function(t){if(0===t.length)return{};for(var e=(0,x.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=l((0,x.bubbleFormats)(n),e)}return e});return T["default"].apply(T["default"],o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).ops.map(function(t){return"string"==typeof t.insert?t.insert:""}).join("")}},{key:"insertEmbed",value:function(t,e,n){var r=arguments.length<=3||void 0===arguments[3]?v["default"].sources.API:arguments[3];return this.scroll.insertAt(t,e,n),this.update((new h["default"]).retain(t).insert(o({},e,n)),r)}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],o=arguments.length<=3||void 0===arguments[3]?v["default"].sources.API:arguments[3];return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e.length,o,r[o])}),this.update((new h["default"]).retain(t).insert(e,(0,j["default"])(r)),o)}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.length()<=1&&0==Object.keys(t.formats()).length}},{key:"removeFormat",value:function(t,e,n){var r=this.getText(t,e),o=this.scroll.line(t+e),i=u(o,2),l=i[0],a=i[1],s=0,c=new h["default"];null!=l&&(s=l instanceof _["default"]?l.newlineIndex(a)-a+1:l.length()-a,c=l.delta().slice(a,a+s-1).insert("\n"));var f=this.getContents(t,e+s),p=f.diff((new h["default"]).insert(r).concat(c)),d=(new h["default"]).retain(t).concat(p);return this.applyDelta(d,n)}},{key:"update",value:function(t){var e=this,n=arguments.length<=1||void 0===arguments[1]?v["default"].sources.USER:arguments[1],r=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],o=this.delta;if(1===r.length&&"characterData"===r[0].type&&g["default"].find(r[0].target)?!function(){var n=g["default"].find(r[0].target),i=(0,x.bubbleFormats)(n),l=n.offset(e.scroll),a=r[0].oldValue.replace(w["default"].CONTENTS,""),s=(new h["default"]).insert(a),u=(new h["default"]).insert(n.value()),c=(new h["default"]).retain(l).concat(s.diff(u));t=c.ops.reduce(function(t,e){return e.insert?t.insert(e.insert,i):t.push(e)},new h["default"]),e.delta=o.compose(t)}():(this.delta=this.getDelta(),t&&(0,N["default"])(o.compose(t),this.delta)||(t=o.diff(this.delta))),t.length()>0){var i,l=[v["default"].events.TEXT_CHANGE,t,o,n];if((i=this.emitter).emit.apply(i,[v["default"].events.EDITOR_CHANGE].concat(l)),n!==v["default"].sources.SILENT){var a;(a=this.emitter).emit.apply(a,l)}}return t}}]),t}();e["default"]=S},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n1?e-1:0),r=1;r=t+n)){var l=this.newlineIndex(t,!0)+1,a=i-l+1,s=this.isolate(l,a),u=s.next;s.format(r,o),u instanceof e&&u.formatAt(0,t-l+n-a,r,o)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(m["default"],t),o=a(r,2),i=o[0],l=o[1];i.insertAt(l,e)}}},{key:"length",value:function n(){var n=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?n:n+1}},{key:"newlineIndex",value:function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(){this.domNode.textContent.endsWith("\n")||this.appendChild(p["default"].create("text","\n")),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this);var t=this.next;null!=t&&t.prev===this&&t.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===t.statics.formats(t.domNode)&&(t.optimize(),t.moveChildren(this),t.remove())}},{key:"replace",value:function(t){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(t){var e=p["default"].find(t);null==e?t.parentNode.removeChild(t):e instanceof p["default"].Embed?e.remove():e.unwrap()})}}],[{key:"create",value:function(t){var n=u(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(t){return!0}}]),e}(y["default"]);O.blotName="code-block",O.tagName="PRE",O.TAB=" ",e.Code=_,e["default"]=O},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return null==t?e:("function"==typeof t.formats&&(e=(0,f["default"])(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:a(t.parent,e))}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=e.BlockEmbed=e.bubbleFormats=void 0;var s=function(){function t(t,e){for(var n=0;n0&&(t=this.length()-k)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(y["default"].Block);j.blotName="block",j.tagName="P",j.defaultChild="break",j.allowedChildren=[O["default"],m["default"],x["default"]],e.bubbleFormats=a,e.BlockEmbed=E,e["default"]=j},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n=0||o>=0?r-o:t===n?0:t0&&r.update(b["default"].sources.SILENT)}),this.emitter.on(b["default"].events.SCROLL_BEFORE_UPDATE,function(){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(b["default"].events.SCROLL_UPDATE,function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(e){}})}),this.update(b["default"].sources.SILENT)}return s(t,[{key:"focus",value:function(){if(!this.hasFocus()){var t=document.body.scrollTop;this.root.focus(),document.body.scrollTop=t,this.setRange(this.savedRange)}}},{key:"format",value:function(t,e){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n["native"].collapsed&&!c["default"].query(t,c["default"].Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=c["default"].find(n.start.node,!1);if(null==r)return;if(r instanceof c["default"].Leaf){var o=r.split(n.start.offset);r.parent.insertBefore(this.cursor,o)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}},{key:"getBounds",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,o=void 0,i=this.scroll.leaf(t),l=a(i,2),s=l[0],u=l[1];if(null==s)return null;var c=s.position(u,!0),f=a(c,2);o=f[0],u=f[1];var h=document.createRange();if(e>0){h.setStart(o,u);var p=this.scroll.leaf(t+e),d=a(p,2);if(s=d[0],u=d[1],null==s)return null;var y=s.position(u,!0),v=a(y,2);o=v[0],u=v[1],h.setEnd(o,u),r=h.getBoundingClientRect()}else{var b="left";if(o instanceof Text){u0&&(b="right")}r={height:g.height,left:g[b],width:0,top:g.top}}var m=this.root.parentNode.getBoundingClientRect();return{left:r.left-m.left,right:r.left+r.width-m.left,top:r.top-m.top,bottom:r.top+r.height-m.top,height:r.height,width:r.width}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;if(!l(this.root,e.startContainer)||!e.collapsed&&!l(this.root,e.endContainer))return null;var n={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},"native":e};return[n.start,n.end].forEach(function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;e=e.lastChild,n=e instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n}),_.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this;if(!this.hasFocus())return[null,null];var e=this.getNativeRange();if(null==e)return[null,null];var n=[[e.start.node,e.start.offset]];e["native"].collapsed||n.push([e.end.node,e.end.offset]);var r=n.map(function(e){var n=a(e,2),r=n[0],o=n[1],i=c["default"].find(r,!0),l=i.offset(t.scroll);return 0===o?l:i instanceof c["default"].Container?l+i.length():l+i.index(r,o)}),i=Math.min.apply(Math,o(r)),l=Math.max.apply(Math,o(r));return[new O(i,l-i),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"scrollIntoView",value:function(){var t=arguments.length<=0||void 0===arguments[0]?this.lastRange:arguments[0];if(null!=t){var e=this.getBounds(t.index,t.length);if(null!=e)if(this.root.offsetHeight0&&!(i instanceof y.BlockEmbed)&&!(f instanceof y.BlockEmbed)){f instanceof w["default"]&&f.deleteAt(f.length()-1,1);var h=f.children.head instanceof g["default"]?null:f.children.head;i.moveChildren(f,h),i.remove()}this.optimize()}},{key:"formatAt",value:function(t,n,r,o){(null==this.whitelist||this.whitelist[r])&&(c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==h["default"].query(n,h["default"].Scope.BLOCK)){var o=h["default"].create(this.statics.defaultChild);this.appendChild(o),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,r)}else{var i=h["default"].create(n,r);this.appendChild(i)}else c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===h["default"].Scope.INLINE_BLOT){var r=h["default"].create(this.statics.defaultChild);r.appendChild(t),t=r}c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return this.descendant(a,t)}},{key:"lines",value:function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]?Number.MAX_VALUE:arguments[1],n=function r(t,e,n){var o=[],i=n;return t.children.forEachAt(e,n,function(t,e,n){a(t)?o.push(t):t instanceof h["default"].Container&&(o=o.concat(r(t,e,i))),i-=n}),o};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];this.batch!==!0&&(c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),t.length>0&&this.emitter.emit(d["default"].events.SCROLL_OPTIMIZE,t))}},{key:"path",value:function(t){return c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(this.batch!==!0){var n=d["default"].sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(d["default"].events.SCROLL_BEFORE_UPDATE,n,t),c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(d["default"].events.SCROLL_UPDATE,n,t)}}}]),e}(h["default"].Scroll);x.blotName="scroll",x.className="ql-editor",x.tagName="DIV",x.defaultChild="block",x.allowedChildren=[v["default"],y.BlockEmbed,_["default"]],e["default"]=x},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e=0&&n.length-1}function h(t,e,n){return n.compose((new k["default"]).retain(n.length(),o({},t,!0)))}function p(t,e){var n=j["default"].Attributor.Attribute.keys(t),r=j["default"].Attributor.Class.keys(t),o=j["default"].Attributor.Style.keys(t),i={};return n.concat(r).concat(o).forEach(function(e){var n=j["default"].query(e,j["default"].Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(t),i[n.attrName])||null!=H[e]&&(n=H[e],i[n.attrName]=n.value(t))}),Object.keys(i).length>0&&(e=e.compose((new k["default"]).retain(e.length(),i))),e}function d(t,e){var n=j["default"].query(t);if(null==n)return e;if(n.prototype instanceof j["default"].Embed){var r={},i=n.value(t);null!=i&&(r[n.blotName]=i,e=(new k["default"]).insert(r,n.formats(t)))}else if("function"==typeof n.formats){var l=o({},n.blotName,n.formats(t));e=e.compose((new k["default"]).retain(e.length(),l))}return e}function y(t,e){return c(e,"\n")||e.insert("\n"),e}function v(t,e){return new k["default"]}function b(t,e){return f(t)&&!c(e,"\n")&&e.insert("\n"),e}function g(t,e){if(f(t)&&null!=t.nextElementSibling&&!c(e,"\n\n")){var n=t.offsetHeight+parseFloat(u(t).marginTop)+parseFloat(u(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function m(t,e){var n={},r=t.style||{};return r.fontWeight&&"bold"===u(t).fontWeight&&(n.bold=!0),Object.keys(n).length>0&&(e=e.compose((new k["default"]).retain(e.length(),n))),parseFloat(r.textIndent||0)>0&&(e=(new k["default"]).insert("\t").concat(e)),e}function _(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(!u(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return e=e.replace(/[^\u00a0]/g,""),e.length<1&&t?" ":e};n=n.replace(/\r\n/g," ").replace(/\n/g," "),n=n.replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&f(t.parentNode)||null!=t.previousSibling&&f(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&f(t.parentNode)||null!=t.nextSibling&&f(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e["default"]=void 0;var O=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function t(t,e){for(var n=0;nr&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),t=o.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.unshift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}),this.stack.redo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(y["default"]);v.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e["default"]=v,e.getLastChangeIndex=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){this.quill.deleteText(t,E["default"].sources.USER),this.quill.setSelection(t.index,E["default"].sources.SILENT),this.quill.selection.scrollIntoView()}function s(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce(function(t,n){return x["default"].query(n,x["default"].Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t},{});this.quill.insertText(t.index,"\n",r,E["default"].sources.USER),this.quill.selection.scrollIntoView(),Object.keys(e.format).forEach(function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],E["default"].sources.USER))})}function u(t){return{key:L.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=x["default"].query("code-block"),r=e.index,o=e.length,i=this.quill.scroll.descendant(n,r),l=p(i,2),a=l[0],s=l[1];if(null!=a){var u=this.quill.scroll.offset(a),c=a.newlineIndex(s,!0)+1,f=a.newlineIndex(u+s+o),h=a.domNode.textContent.slice(c,f).split("\n");s=0,h.forEach(function(e,i){t?(a.insertAt(c+s,n.TAB),s+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(a.deleteAt(c+s,n.TAB.length),s-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),s+=e.length+1}),this.quill.update(E["default"].sources.USER),this.quill.setSelection(r,o,E["default"].sources.SILENT)}}}}function c(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],E["default"].sources.USER)}}}function f(t){if("string"==typeof t||"number"==typeof t)return f({key:t});if("object"===("undefined"==typeof t?"undefined":h(t))&&(t=(0,v["default"])(t,!1)),"string"==typeof t.key)if(null!=L.keys[t.key.toUpperCase()])t.key=L.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t}Object.defineProperty(e,"__esModule",{value:!0});var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},p=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(){function t(t,e){for(var n=0;n=this.quill.getLength()-1||this.quill.deleteText(t.index,1,E["default"].sources.USER)}),r.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},a),r.addBinding({key:e.keys.DELETE},{collapsed:!1},a),r.listen(),r}return l(e,t),d(e,null,[{key:"match",value:function(t,e){return e=f(e),(!!e.shortKey===t[P]||null===e.shortKey)&&(!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return n!=P&&!!e[n]!==t[n]&&null!==e[n]})&&e.key===(t.which||t.keyCode))}}]),d(e,[{key:"addBinding",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=f(t);return null==r||null==r.key?S.warn("Attempted to add invalid keyboard binding",r):("function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,_["default"])(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],void this.bindings[r.key].push(r))}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var r=n.which||n.keyCode,o=(t.bindings[r]||[]).filter(function(t){return e.match(n,t)});if(0!==o.length){var i=t.quill.getSelection();if(null!=i){var l=t.quill.scroll.line(i.index),a=p(l,2),s=a[0],u=a[1],c=t.quill.scroll.leaf(i.index),f=p(c,2),d=f[0],y=f[1],v=0===i.length?[d,y]:t.quill.scroll.leaf(i.index+i.length),b=p(v,2),m=b[0],_=b[1],O=d instanceof x["default"].Text?d.value().slice(0,y):"",w=m instanceof x["default"].Text?m.value().slice(_):"",k={collapsed:0===i.length,empty:0===i.length&&s.length()<=1,format:t.quill.getFormat(i),offset:u,prefix:O,suffix:w},E=o.some(function(e){if(null!=e.collapsed&&e.collapsed!==k.collapsed)return!1;if(null!=e.empty&&e.empty!==k.empty)return!1;if(null!=e.offset&&e.offset!==k.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==k.format[t]}))return!1}else if("object"===h(e.format)&&!Object.keys(e.format).every(function(t){return e.format[t]===!0?null!=k.format[t]:e.format[t]===!1?null==k.format[t]:(0,g["default"])(e.format[t],k.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(k.prefix))&&(!(null!=e.suffix&&!e.suffix.test(k.suffix))&&e.handler.call(t,i,k)!==!0)});E&&n.preventDefault()}}}})}}]),e}(q["default"]);L.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},L.DEFAULTS={bindings:{bold:c("bold"),italic:c("italic"),underline:c("underline"),indent:{key:L.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){return!(!e.collapsed||0===e.offset)||void this.quill.format("indent","+1",E["default"].sources.USER)}},outdent:{key:L.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){return!(!e.collapsed||0===e.offset)||void this.quill.format("indent","-1",E["default"].sources.USER)}},"outdent backspace":{key:L.keys.BACKSPACE,collapsed:!0,format:["blockquote","indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",E["default"].sources.USER):null!=e.format.blockquote?this.quill.format("blockquote",!1,E["default"].sources.USER):null!=e.format.list&&this.quill.format("list",!1,E["default"].sources.USER)}},"indent code-block":u(!0),"outdent code-block":u(!1),"remove tab":{key:L.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t,e){this.quill.deleteText(t.index-1,1,E["default"].sources.USER)}},tab:{key:L.keys.TAB,handler:function(t,e){e.collapsed||this.quill.scroll.deleteAt(t.index,t.length),this.quill.insertText(t.index,"\t",E["default"].sources.USER),this.quill.setSelection(t.index+1,E["default"].sources.SILENT)}},"list empty enter":{key:L.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,E["default"].sources.USER),e.format.indent&&this.quill.format("indent",!1,E["default"].sources.USER)}},"header enter":{key:L.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t){this.quill.scroll.insertAt(t.index,"\n"),this.quill.formatText(t.index+1,1,"header",!1,E["default"].sources.USER),this.quill.setSelection(t.index+1,E["default"].sources.SILENT),this.quill.selection.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^(1\.|-)$/,handler:function(t,e){var n=e.prefix.length;this.quill.scroll.deleteAt(t.index-n,n),this.quill.formatLine(t.index-n,1,"list",1===n?"bullet":"ordered",E["default"].sources.USER),this.quill.setSelection(t.index-n,E["default"].sources.SILENT)}}}},e["default"]=L},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var a=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return o({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(t,n){if(t instanceof g)u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this);var t=this.next;null!=t&&t.prev===this&&t.statics.blotName===this.statics.blotName&&t.domNode.tagName===this.domNode.tagName&&(t.moveChildren(this),t.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=p["default"].create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}],[{key:"create",value:function(t){return"ordered"===t?t="OL":"bullet"===t&&(t="UL"),u(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?"bullet":void 0}}]),e}(b["default"]);m.blotName="list",m.scope=p["default"].Scope.BLOCK_BLOT,m.tagName=["OL","UL"],m.defaultChild="list-item",m.allowedChildren=[g],e.ListItem=g,e["default"]=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n-1}Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e["default"]=void 0;var s=function(){function t(t,e){for(var n=0;n0||null==this.cachedHTML)&&(this.domNode.innerHTML=t(e),this.attach()),this.cachedHTML=this.domNode.innerHTML}}}]),e}(v["default"]);b.className="ql-syntax";var g=new c["default"].Attributor.Class("token","hljs",{scope:c["default"].Scope.INLINE}),m=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");h["default"].register(g,!0),h["default"].register(b,!0);var l=null;return r.quill.on(h["default"].events.SCROLL_OPTIMIZE,function(){null==l&&(l=setTimeout(function(){r.highlight(),l=null},100))}),r.highlight(),r}return l(e,t),a(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){var e=this.quill.getSelection();this.quill.scroll.descendants(b).forEach(function(e){e.highlight(t.options.highlight)}),this.quill.update(h["default"].sources.SILENT),null!=e&&this.quill.setSelection(e,h["default"].sources.SILENT)}}}]),e}(d["default"]);m.DEFAULTS={highlight:function(){return null==window.hljs?null:function(t){var e=window.hljs.highlightAuto(t);return e.value}}()},e.CodeBlock=b,e.CodeToken=g,e["default"]=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function u(t,e){Array.isArray(e[0])||(e=[e]),e.forEach(function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach(function(t){if("string"==typeof t)s(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?c(n,e,r):s(n,e,r)}}),t.appendChild(n)})}function c(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach(function(t){var e=document.createElement("option");t!==!1?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)}),t.appendChild(r)}Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e["default"]=void 0;var f=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function t(t,e){for(var n=0;n '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '; },function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},l=function(){function t(t,e){for(var n=0;n-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e["default"]=u},function(t,e){t.exports=' '},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n=this.quill.root.offsetHeight)}},{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px";var r=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect(),i=0;return o.right>r.right&&(i=r.right-o.right,this.root.style.left=e+i+"px"),o.left0){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var n=r.quill.scroll.lines(e.index,e.length);if(1===n.length)r.position(r.quill.getBounds(e));else{var o=n[n.length-1],i=o.offset(r.quill.scroll),l=Math.min(o.length()-1,e.index+e.length-i),a=r.quill.getBounds(new b.Range(i,l));r.position(a)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return l(e,t),s(e,[{key:"listen",value:function(){var t=this;a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(e){t.root.classList.remove("ql-editing")}),this.quill.on(h["default"].events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t);if(0===n)return n;var r=this.root.querySelector(".ql-tooltip-arrow");r.style.marginLeft="",r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}(d.BaseTooltip);_.TEMPLATE=['','
','','',"
"].join(""),e["default"]=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];e.forEach(function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)})}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=e.BaseTooltip=void 0;var s=function(){function t(t,e){for(var n=0;n','','',''].join(""),e["default"]=O}])}); //# sourceMappingURL=quill.min.js.map