!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Quill=t()}}(function(){return function o(s,l,u){function a(n,t){if(!l[n]){if(!s[n]){var e="function"==typeof require&&require;if(!t&&e)return e(n,!0);if(c)return c(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=l[n]={exports:{}};s[n][0].call(i.exports,function(t){var e=s[n][1][t];return a(e||t)},i,i.exports,o,s,l,u)}return l[n].exports}for(var c="function"==typeof require&&require,t=0;t>>1,Ct=bt?bt.BYTES_PER_ELEMENT:0,kt=9007199254740991,It=mt&&new mt,Ot={};function Dt(){}var Mt=Dt.support={};function Rt(t){this.__wrapped__=t,this.__actions__=null,this.__dir__=1,this.__dropCount__=0,this.__filtered__=!1,this.__iteratees__=null,this.__takeCount__=Nt,this.__views__=null}function Ut(t){var e=t?t.length:0;for(this.data={hash:_t(null),set:new vt};e--;)this.push(t[e])}function jt(t,e){var n=t.data;return("string"==typeof e||yn(e)?n.set.has(e):n.hash[e])?0:-1}function Bt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n>>0,e>>>=0;for(var o=Array(i);++r>>1,s=t[o];(n?s<=e:ss&&(i._listeners.warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",i._listeners.length),console.trace())}}else i._listeners=e;return!0}o=t.shift()}return!0}.call(this,t,e),this;if(this._events[t]){if("function"==typeof this._events[t])this._events[t]=[this._events[t],e];else if(c(this._events[t])&&(this._events[t].push(e),!this._events[t].warned)){var n=l;void 0!==this._events.maxListeners&&(n=this._events.maxListeners),0n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),console.trace())}}else this._events[t]=e;return this},n.prototype.onAny=function(t){if("function"!=typeof t)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),this._all.push(t),this},n.prototype.addListener=n.prototype.on,n.prototype.off=function(t,e){if("function"!=typeof e)throw new Error("removeListener only takes instances of Function");var n,r=[];if(this.wildcard){var i="string"==typeof t?t.split(this.delimiter):t.slice();r=g.call(this,null,i,this.listenerTree,0)}else{if(!this._events[t])return this;n=this._events[t],r.push({_listeners:n})}for(var o=0;oe.length?t:e,i=t.length>e.length?e:t,o=r.indexOf(i);if(-1!=o)return n=[[N,r.substring(0,o)],[d,i],[N,r.substring(o+i.length)]],t.length>e.length&&(n[0][0]=n[2][0]=L),n;if(1==i.length)return[[L,t],[N,e]];var s=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length=t.length?[r,i,o,s,a]:null}var o,s,l,u,a,c=i(n,r,Math.ceil(n.length/4)),h=i(n,r,Math.ceil(n.length/2));{if(!c&&!h)return null;o=h?c&&c[4].length>h[4].length?c:h:c}t.length>e.length?(s=o[0],l=o[1],u=o[2],a=o[3]):(u=o[0],a=o[1],s=o[2],l=o[3]);var f=o[4];return[s,l,u,a,f]}(t,e);if(s){var l=s[0],u=s[1],a=s[2],c=s[3],h=s[4],f=g(l,a),p=g(u,c);return f.concat([[d,h]],p)}return function(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),o=i,s=2*i,l=new Array(s),u=new Array(s),a=0;a\s+\ <")},t.prototype.insertLineBefore=function(t,e){var n;return n=new s(this,t),null!=e?(c(t.parentNode).isElement()||this.root.insertBefore(t,e.node),this.lines.insertAfter(e.prev,n)):(c(t.parentNode).isElement()||this.root.appendChild(t),this.lines.append(n)),n},t.prototype.mergeLines=function(e,t){return 1=t.length?a.doc.removeLine(t):t.deleteText(o,e),u-=e,t=i,o=0;if(r&&n.next)return a.doc.mergeLines(n,n.next)}))},r.prototype._formatAt=function(o,s,l,u){return this.selection.shiftAfter(o,0,(a=this,function(){var t,e,n,r,i;for(e=(r=a.doc.findLineAt(o))[0],n=r[1],i=[];null!=e&&0=this.length-1)return[this.leaves.last,this.leaves.last.length];for(n=this.leaves.first;null!=n;){if(ts+e&&(h=(c=p(h).split(e))[0],c[1]),i.add(h,r)}e-=o.length-s,s=0,o=l}return this.rebuild()}},n.prototype._insert=function(t,e,n){var r,i,o,s,l,u;return r=(s=this.findLeafAt(t))[0],i=s[1],e=a.reduce(n,(u=this,function(t,e,n){var r;return null==(r=u.doc.formats[n])||r.isType(f.types.LINE)||(t=r.add(t,e)),t}),e),(l=p(r.node).split(i))[0],(o=l[1])&&(o=p(o).splitBefore(this.node).get()),this.node.insertBefore(e,o),this.rebuild()},n.prototype.insertEmbed=function(t,e){var n,r,i,o,s,l,u;return r=(s=this.findLeafAt(t))[0],i=s[1],(l=p(r.node).split(i))[0],l[1],n=a.find(Object.keys(e),(u=this,function(t){return u.doc.formats[t].isType(f.types.EMBED)})),o=this.doc.formats[n].add({},e[n]),delete(e=a.clone(e))[n],this._insert(t,o,e)},n.prototype.insertText=function(t,e,n){var r,i,o;if(null==n&&(n={}),0/g,"")},n.stripWhitespace=function(t){return t=(t=(t=t.trim()).replace(/(\r?\n|\r)+/g," ")).replace(/\>\s+\<")},n.wrapInline=function(t){var e,n;if(null!=s.BLOCK_TAGS[t.tagName])return t;for(e=document.createElement(s.DEFAULT_BLOCK_TAG),t.parentNode.insertBefore(e,t);null!=t&&null==s.BLOCK_TAGS[t.tagName];)n=t.nextSibling,e.appendChild(t),t=n;return e},n.unwrapText=function(t){var e;return e=o.map(t.querySelectorAll(s.DEFAULT_INLINE_TAG)),o.each(e,function(t){if(!t.hasAttributes())return s(t).unwrap()})},n}(),e.exports=r},{"../lib/dom":17,lodash:1}],14:[function(t,e,n){var o,r,u;t("lodash"),u=t("../lib/dom"),t("./leaf"),t("./normalizer"),o=t("../lib/range"),r=function(){function t(t,e){this.doc=t,this.emitter=e,this.focus=!1,this.range=new o(0,0),this.nullDelay=!1,this.update("silent")}return t.prototype.checkFocus=function(){return document.activeElement===this.doc.root},t.prototype.getRange=function(t){var e,n,r;return null==t&&(t=!1),this.checkFocus()?null==(n=this._getNativeRange())?null:(r=this._positionToIndex(n.startContainer,n.startOffset),e=n.startContainer===n.endContainer&&n.startOffset===n.endOffset?r:this._positionToIndex(n.endContainer,n.endOffset),new o(Math.min(r,e),Math.max(r,e))):t?this.range:null},t.prototype.preserve=function(t){var e,n,r,i,o,s,l,u,a;return null!=(r=this._getNativeRange())&&this.checkFocus()?(u=(i=this._encodePosition(r.startContainer,r.startOffset))[0],a=i[1],e=(o=this._encodePosition(r.endContainer,r.endOffset))[0],n=o[1],t(),u=(s=this._decodePosition(u,a))[0],a=s[1],e=(l=this._decodePosition(e,n))[0],n=l[1],this._setNativeRange(u,a,e,n)):t()},t.prototype.scrollIntoView=function(){var t,e,n,r,i,o,s;if(this.range)return s=(e=this.emitter.editor).getBounds(this.range.start),n=this.range.isCollapsed()?s:e.getBounds(this.range.end),(t=e.root.parentNode.getBoundingClientRect()).bottom-t.top
Preview
Cancel Insert'},n.prototype.initListeners=function(){return u(this.quill.root).on("focus",l.bind(this.hide,this)),u(this.container.querySelector(".insert")).on("click",l.bind(this.insertImage,this)),u(this.container.querySelector(".cancel")).on("click",l.bind(this.hide,this)),u(this.textbox).on("input",l.bind(this._preview,this)),this.initTextbox(this.textbox,this.insertImage,this.hide),this.quill.onModuleLoad("toolbar",(e=this,function(t){return(e.toolbar=t).initFormat("image",l.bind(e._onToolbar,e))}));var e},n.prototype.insertImage=function(){var t,e;return e=this._normalizeURL(this.textbox.value),null==this.range&&(this.range=new o(0,0)),this.range&&(this.preview.innerHTML="Preview",this.textbox.value="",t=this.range.end,this.quill.insertEmbed(t,"image",e,"user"),this.quill.setSelection(t+1,t+1)),this.hide()},n.prototype._onToolbar=function(t,e){return e?(this.textbox.value||(this.textbox.value="http://"),this.show(),this.textbox.focus(),l.defer((n=this,function(){return n.textbox.setSelectionRange(n.textbox.value.length,n.textbox.value.length)}))):(this.quill.deleteText(t,"user"),this.toolbar.setActive("image",!1));var n},n.prototype._preview=function(){var t;if(this._matchImageURL(this.textbox.value))return"IMG"===this.preview.firstChild.tagName?this.preview.firstChild.setAttribute("src",this.textbox.value):((t=document.createElement("img")).setAttribute("src",this.textbox.value),this.preview.replaceChild(t,this.preview.firstChild))},n.prototype._matchImageURL=function(t){return/^https?:\/\/.+\.(jpe?g|gif|png)$/.test(t)},n.prototype._normalizeURL=function(t){return/^https?:\/\//.test(t)||(t="http://"+t),t},n}(),i.registerModule("image-tooltip",r),e.exports=r},{"../quill":30,"./tooltip":28}],23:[function(t,e,n){var a,r,c,h,s;c=t("../quill"),h=c.require("lodash"),s=c.require("dom"),a=c.require("delta"),r=function(){function l(t,e){var n;this.quill=t,this.hotkeys={},this._initListeners(),this._initHotkeys(),this.quill.onModuleLoad("toolbar",(n=this,function(t){return n.toolbar=t}))}return l.hotkeys={BOLD:{key:"B",metaKey:!0},INDENT:{key:s.KEYS.TAB},ITALIC:{key:"I",metaKey:!0},OUTDENT:{key:s.KEYS.TAB,shiftKey:!0},UNDERLINE:{key:"U",metaKey:!0}},l.prototype.addHotkey=function(t,r){return Array.isArray(t)||(t=[t]),h.each(t,(i=this,function(t){var e,n;return(t=h.isObject(t)?h.clone(t):{key:t}).callback=r,n=h.isNumber(t.key)?t.key:t.key.toUpperCase().charCodeAt(0),null==(e=i.hotkeys)[n]&&(e[n]=[]),i.hotkeys[n].push(t)}));var i},l.prototype.removeHotkeys=function(e,n){var t,r,i,o,s;return e=h.isString(e)?e.toUpperCase():e,e=l.hotkeys[e]?l.hotkeys[e]:e,e=h.isObject(e)?e:{key:e},s=h.isNumber(e.key)?e.key:e.key.charCodeAt(0),null==(t=this.hotkeys)[s]&&(t[s]=[]),o=(i=h.partition(this.hotkeys[s],function(t){return h.isEqual(e,h.omit(t,"callback"))&&(!n||n===t.callback)}))[0],r=i[1],this.hotkeys[s]=r,h.map(o,"callback")},l.prototype.toggleFormat=function(t,n){var e,r;if(r=0===(e=t.isCollapsed()?this.quill.getContents(Math.max(0,t.start-1),t.end):this.quill.getContents(t)).ops.length||!h.all(e.ops,function(t){var e;return null!=(e=t.attributes)?e[n]:void 0}),t.isCollapsed()?this.quill.prepareFormat(n,r,c.sources.USER):this.quill.formatText(t,n,r,c.sources.USER),null!=this.toolbar)return this.toolbar.setActive(n,r)},l.prototype._initEnter=function(){var t,u;return t=[{key:s.KEYS.ENTER},{key:s.KEYS.ENTER,shiftKey:!0}],this.addHotkey(t,(u=this,function(t,e){var n,r,i,o,s,l;return null==t||(i=(s=u.quill.editor.doc.findLineAt(t.start))[0],o=s[1],r=(l=i.findLeafAt(o))[0],o=l[1],n=(new a).retain(t.start).insert("\n",i.formats).delete(t.end-t.start),u.quill.updateContents(n,c.sources.USER),h.each(r.formats,function(t,e){u.quill.prepareFormat(e,t),null!=u.toolbar&&u.toolbar.setActive(e,t)}),u.quill.editor.selection.scrollIntoView(),!1)}))},l.prototype._initDeletes=function(){return this.addHotkey([s.KEYS.DELETE,s.KEYS.BACKSPACE],(o=this,function(t,e){var n,r,i;return null!=t&&0Visit URL:   -  Change Remove Done'},o.hotkeys={LINK:{key:"K",metaKey:!0}},o.prototype.initListeners=function(){var n,t,e,r,i;return this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,(n=this,function(t){var e;if(null!=t&&t.isCollapsed())return(e=n._findAnchor(t))?(n.setMode(e.href,!1),n.show(e)):n.container.style.left!==s.HIDE_MARGIN?(n.range=null,n.hide()):void 0})),u(this.container.querySelector(".done")).on("click",l.bind(this.saveLink,this)),u(this.container.querySelector(".remove")).on("click",(t=this,function(){return t.removeLink(t.range)})),u(this.container.querySelector(".change")).on("click",(e=this,function(){return e.setMode(e.link.href,!0)})),this.initTextbox(this.textbox,this.saveLink,this.hide),this.quill.onModuleLoad("toolbar",(r=this,function(t){return(r.toolbar=t).initFormat("link",l.bind(r._onToolbar,r))})),this.quill.onModuleLoad("keyboard",(i=this,function(t){return t.addHotkey(o.hotkeys.LINK,l.bind(i._onKeyboard,i))}))},o.prototype.saveLink=function(){var t,e,n;return n=this._normalizeURL(this.textbox.value),null!=this.range&&(e=this.range.end,this.range.isCollapsed()?null!=(t=this._findAnchor(this.range))&&(t.href=n):this.quill.formatText(this.range,"link",n,"user"),this.quill.setSelection(e,e)),this.setMode(n,!1)},o.prototype.removeLink=function(t){if(t.isCollapsed()&&(t=this._expandRange(t)),this.hide(),this.quill.formatText(t,"link",!1,"user"),null!=this.toolbar)return this.toolbar.setActive("link",!1)},o.prototype.setMode=function(t,e){var n,r;return null==e&&(e=!1),e?(this.textbox.value=t,l.defer((r=this,function(){return r.textbox.focus(),r.textbox.setSelectionRange(0,t.length)}))):(this.link.href=t,n=(t=this.link.href).length>this.options.maxLength?t.slice(0,this.options.maxLength)+"...":t,u(this.link).text(n)),u(this.container).toggleClass("editing",e)},o.prototype._findAnchor=function(t){var e,n,r;for(e=(r=this.quill.editor.doc.findLeafAt(t.start,!0))[0],r[1],null!=e&&(n=e.node);null!=n&&n!==this.quill.root;){if("A"===n.tagName)return n;n=n.parentNode}return null},o.prototype._expandRange=function(t){var e,n,r,i;return e=(r=this.quill.editor.doc.findLeafAt(t.start,!0))[0],n=r[1],{start:i=t.start-n,end:i+e.length}},o.prototype._onToolbar=function(t,e){return this._toggle(t,e)},o.prototype._onKeyboard=function(){var t;return t=this.quill.getSelection(),this._toggle(t,!this._findAnchor(t))},o.prototype._toggle=function(t,e){var n;if(t)return e?t.isCollapsed()?void 0:(this.setMode(this._suggestURL(t),!0),n=this.quill.editor.selection._getNativeRange(),this.show(n)):this.removeLink(t)},o.prototype._normalizeURL=function(t){return/^(https?:\/\/|mailto:)/.test(t)||(t="http://"+t),t},o.prototype._suggestURL=function(t){var e;return e=this.quill.getText(t),this._normalizeURL(e)},o}(),i.registerModule("link-tooltip",r),e.exports=r},{"../quill":30,"./tooltip":28}],25:[function(t,e,n){var r,i,o,l,u,a={}.hasOwnProperty;o=t("../quill"),r=t("eventemitter2").EventEmitter2,l=o.require("lodash"),u=o.require("dom"),i=function(t){function s(t,e){this.quill=t,this.options=e,this.cursors={},this.container=this.quill.addContainer("ql-multi-cursor",!0),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,l.bind(this._applyDelta,this))}return function(t,e){for(var n in e)a.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(s,r),s.DEFAULTS={template:' ',timeout:2500},s.events={CURSOR_ADDED:"cursor-addded",CURSOR_MOVED:"cursor-moved",CURSOR_REMOVED:"cursor-removed"},s.prototype.clearCursors=function(){return l.each(Object.keys(this.cursors),l.bind(this.removeCursor,this)),this.cursors={}},s.prototype.moveCursor=function(t,e){var n;if(null!=(n=this.cursors[t]))return n.index=e,u(n.elem).removeClass("hidden"),clearTimeout(n.timer),n.timer=setTimeout(function(){return u(n.elem).addClass("hidden"),n.timer=null},this.options.timeout),this._updateCursor(n),n},s.prototype.removeCursor=function(t){var e;return e=this.cursors[t],this.emit(s.events.CURSOR_REMOVED,e),null!=e&&e.elem.parentNode.removeChild(e.elem),delete this.cursors[t]},s.prototype.setCursor=function(t,e,n,r){var i,o;return null==this.cursors[t]&&(this.cursors[t]=i={userId:t,index:e,color:r,elem:this._buildCursor(n,r)},this.emit(s.events.CURSOR_ADDED,i)),l.defer((o=this,function(){return o.moveCursor(t,e)})),this.cursors[t]},s.prototype.shiftCursors=function(r,i,o){return null==o&&(o=null),l.each(this.cursors,(s=this,function(t,e){var n;if(t)return n=Math.max(i,r-t.index),t.userId===o?s.moveCursor(o,t.index+n):t.index>r?t.index+=n:void 0}));var s},s.prototype.update=function(){return l.each(this.cursors,(n=this,function(t,e){if(null!=t)return n._updateCursor(t),!0}));var n},s.prototype._applyDelta=function(t){var r,i;return r=0,l.each(t.ops,(i=this,function(t){var e,n;return e=0,null!=t.insert?(e=t.insert.length||1,i.shiftCursors(r,e,null!=(n=t.attributes)?n.author:void 0)):null!=t.delete?i.shiftCursors(r,-1*t.delete,null):null!=t.retain&&(i.shiftCursors(r,0,null),e=t.retain),r+=e})),this.update()},s.prototype._buildCursor=function(t,e){var n,r;return n=document.createElement("span"),u(n).addClass("cursor"),n.innerHTML=this.options.template,n.querySelector(".cursor-flag"),r=n.querySelector(".cursor-name"),u(r).text(t),n.querySelector(".cursor-caret").style.backgroundColor=r.style.backgroundColor=e,this.container.appendChild(n),n},s.prototype._updateCursor=function(t){var e,n;return null==(e=this.quill.getBounds(t.index))?this.removeCursor(t.userId):(t.elem.style.top=e.top+this.quill.container.scrollTop+"px",t.elem.style.left=e.left+"px",t.elem.style.height=e.height+"px",n=t.elem.querySelector(".cursor-flag"),u(t.elem).toggleClass("top",parseInt(t.elem.style.top)<=n.offsetHeight).toggleClass("left",parseInt(t.elem.style.left)<=n.offsetWidth).toggleClass("right",this.quill.root.offsetWidth-parseInt(t.elem.style.left)<=n.offsetWidth),this.emit(s.events.CURSOR_MOVED,t))},s}(),o.registerModule("multi-cursor",i),e.exports=i},{"../quill":30,eventemitter2:2}],26:[function(t,e,n){var i,o,r,s,l,u,a=function(t,e){return function(){return t.apply(e,arguments)}};s=t("../quill"),o=t("../core/document"),l=s.require("lodash"),u=s.require("dom"),i=s.require("delta"),r=function(){function r(t,e){var n;this.quill=t,this._onConvert=a(this._onConvert,this),this.container=this.quill.addContainer("ql-paste-manager"),this.container.setAttribute("contenteditable",!0),this.container.setAttribute("tabindex","-1"),u(this.quill.root).on("paste",l.bind(this._paste,this)),this.options=l.defaults(e,r.DEFAULTS),null==(n=this.options).onConvert&&(n.onConvert=this._onConvert)}return r.DEFAULTS={onConvert:null},r.prototype._onConvert=function(t){var e,n;return 0===(n=(e=new o(t,this.quill.options).toDelta()).length())?e:e.compose((new i).retain(n-1).delete(1))},r.prototype._paste=function(){var n,r;if(this.quill.getLength(),null!=(n=this.quill.getSelection()))return this.container.focus(),l.defer((r=this,function(){var t,e;return 0<(e=(t=r.options.onConvert(r.container)).length())&&(0this.quill.container.offsetHeight&&(s=r-this.container.offsetHeight-this.options.offset),e=Math.max(0,Math.min(e,this.quill.container.offsetWidth-this.container.offsetWidth)),s=Math.max(0,Math.min(s,this.quill.container.offsetHeight-this.container.offsetHeight))):(e=this.quill.container.offsetWidth/2-this.container.offsetWidth/2,s=this.quill.container.offsetHeight/2-this.container.offsetHeight/2),[e,s+=this.quill.container.scrollTop]},r.prototype.show=function(t){var e,n,r;return this.range=this.quill.getSelection(),e=(n=this.position(t))[0],r=n[1],this.container.style.left=e+"px",this.container.style.top=r+"px",this.container.focus()},r}(),r.registerModule("tooltip",i),e.exports=i},{"../quill":30}],29:[function(t,e,n){var o,r,s;o=t("../quill"),s=o.require("lodash"),o.require("delta"),r=function(){function i(t,e){this.quill=t,this.options=null!=e?e:{},this.lastRecorded=0,this.ignoreChange=!1,this.clear(),this.initListeners()}return i.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},i.hotkeys={UNDO:{key:"Z",metaKey:!0},REDO:{key:"Z",metaKey:!0,shiftKey:!0}},i.prototype.initListeners=function(){var n,r;return this.quill.onModuleLoad("keyboard",(n=this,function(t){var e;return t.addHotkey(i.hotkeys.UNDO,function(){return n.quill.editor.checkUpdate(),n.undo(),!1}),e=[i.hotkeys.REDO],-1r&&0this.options.maxStack)return this.stack.undo.unshift()}catch(t){return t,console.warn("Could not record change... clearing undo stack."),this.clear()}}},i.prototype.redo=function(){return this._change("redo","undo")},i.prototype.undo=function(){return this._change("undo","redo")},i.prototype._getLastChangeIndex=function(t){var e,n;return e=n=0,s.each(t.ops,function(t){return null!=t.insert?n=Math.max(e+(t.insert.length||1),n):null!=t.delete?n=Math.max(e,n):null!=t.retain?(null!=t.attributes&&(n=Math.max(e+t.retain,n)),e+=t.retain):void 0}),n},i.prototype._change=function(t,e){var n,r;if(0<"+f.DEFAULT_BREAK_TAG+">"),this.editor.doc.setHTML(t),this.editor.checkUpdate(e)},s.prototype.setSelection=function(t,e,n){var r;return null==n&&(n=s.sources.API),h.isNumber(t)&&h.isNumber(e)?r=new c(t,e):(r=t,n=e||n),this.editor.selection.setRange(r,n)},s.prototype.setText=function(t,e){var n;return null==e&&(e=s.sources.API),n=(new a).insert(t),this.setContents(n,e)},s.prototype.updateContents=function(t,e){return null==e&&(e=s.sources.API),Array.isArray(t)&&(t={ops:t}),this.editor.applyDelta(t,e)},s.prototype._buildParams=function(){var t,e;return e=1<=arguments.length?g.call(arguments,0):[],h.isObject(e[0])&&e.splice(0,1,e[0].start,e[0].end),h.isString(e[2])&&((t={})[e[2]]=e[3],e.splice(2,2,t)),null==e[3]&&(e[3]=s.sources.API),e},s}()).registerTheme("base",t("./themes/base")),s.registerTheme("snow",t("./themes/snow")),e.exports=s},{"../package.json":7,"./core/document":8,"./core/editor":9,"./core/format":10,"./core/normalizer":13,"./lib/dom":17,"./lib/range":20,"./themes/base":32,"./themes/snow":33,eventemitter2:2,lodash:1,"rich-text/lib/delta":3}],31:[function(t,e,n){e.exports='.ql-image-tooltip{padding:10px;width:300px}.ql-image-tooltip:after{clear:both;content:"";display:table}.ql-image-tooltip a{border:1px solid #000;box-sizing:border-box;display:inline-block;float:left;padding:5px;text-align:center;width:50%}.ql-image-tooltip img{bottom:0;left:0;margin:auto;max-height:100%;max-width:100%;position:absolute;right:0;top:0}.ql-image-tooltip .input{box-sizing:border-box;width:100%}.ql-image-tooltip .preview{margin:10px 0;position:relative;border:1px dashed #000;height:200px}.ql-image-tooltip .preview span{display:inline-block;position:absolute;text-align:center;top:40%;width:100%}.ql-link-tooltip{padding:5px 10px}.ql-link-tooltip input.input{width:170px}.ql-link-tooltip a.done,.ql-link-tooltip input.input{display:none}.ql-link-tooltip a.change{margin-right:4px}.ql-link-tooltip.editing a.done,.ql-link-tooltip.editing input.input{display:inline-block}.ql-link-tooltip.editing a.change,.ql-link-tooltip.editing a.remove,.ql-link-tooltip.editing a.url{display:none}.ql-multi-cursor{position:absolute;left:0;top:0;z-index:1000}.ql-multi-cursor .cursor{margin-left:-1px;position:absolute}.ql-multi-cursor .cursor-flag{bottom:100%;position:absolute;white-space:nowrap}.ql-multi-cursor .cursor-name{display:inline-block;color:#fff;padding:2px 8px}.ql-multi-cursor .cursor-caret{height:100%;position:absolute;width:2px}.ql-multi-cursor .cursor.hidden .cursor-flag{display:none}.ql-multi-cursor .cursor.top .cursor-flag{bottom:auto;top:100%}.ql-multi-cursor .cursor.right .cursor-flag{right:-2px}.ql-paste-manager{left:-100000px;position:absolute;top:50%}.ql-toolbar{box-sizing:border-box}.ql-tooltip{background-color:#fff;border:1px solid #000;box-sizing:border-box;position:absolute;top:0;white-space:nowrap;z-index:2000}.ql-tooltip a{cursor:pointer;text-decoration:none}.ql-container{box-sizing:border-box;cursor:text;font-family:Helvetica,Arial,sans-serif;height:100%;line-height:1.42;margin:0;overflow-x:hidden;overflow-y:auto;padding:12px 15px;position:relative}.ql-editor{box-sizing:border-box;min-height:100%;outline:0;tab-size:4;white-space:pre-wrap}.ql-editor div{margin:0;padding:0}.ql-editor a{text-decoration:underline}.ql-editor b{font-weight:700;font-style:bold}.ql-editor i{font-style:italic}.ql-editor s{text-decoration:line-through}.ql-editor u{text-decoration:underline}.ql-editor a,.ql-editor b,.ql-editor i,.ql-editor s,.ql-editor span,.ql-editor u{background-color:inherit}.ql-editor img{max-width:100%}.ql-editor blockquote,.ql-editor ol,.ql-editor ul{margin:0 0 0 2em;padding:0}.ql-editor ol{list-style-type:decimal}.ql-editor ul{list-style-type:disc}.ql-editor.ql-ie-10 br,.ql-editor.ql-ie-9 br{display:none}'},{}],32:[function(t,e,n){var r,i,o,s;i=t("lodash"),s=t("../../lib/dom"),o=t("./base.styl"),r=function(){function r(t,e){var n;this.quill=t,this.options=e,s(this.quill.container).addClass("ql-container"),this.options.styles&&this.addStyles(o+r.objToCss(this.options.styles)),s.isIE(10)&&(n=s.isIE(9)?"9":"10",s(this.quill.root).addClass("ql-ie-"+n))}return r.OPTIONS={},r.objToCss=function(t){return i.map(t,function(t,e){return e+" { "+i.map(t,function(t,e){return e+": "+t+";"}).join(" ")+" }"}).join("\n")},r.prototype.addStyles=function(t){var e;return i.isObject(t)&&(t=r.objToCss(t)),(e=document.createElement("style")).type="text/css",e.appendChild(document.createTextNode(t)),document.head.appendChild(e)},r}(),e.exports=r},{"../../lib/dom":17,"./base.styl":31,lodash:1}],33:[function(t,e,n){var i,o,s,r,l,u,a={}.hasOwnProperty;l=t("lodash"),o=t("../../lib/color-picker"),i=t("../base"),u=t("../../lib/dom"),s=t("../../lib/picker"),r=function(t){function r(t,e){var n;this.quill=t,this.options=e,r.__super__.constructor.apply(this,arguments),u(this.quill.container).addClass("ql-snow"),this.pickers=[],this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,(n=this,function(t){if(null!=t)return l.invoke(n.pickers,"close")})),this.quill.onModuleLoad("multi-cursor",l.bind(this.extendMultiCursor,this)),this.quill.onModuleLoad("toolbar",l.bind(this.extendToolbar,this))}return function(t,e){for(var n in e)a.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(r,i),r.COLORS=["#000000","#e60000","#ff9900","#ffff00","#008A00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],r.OPTIONS={"multi-cursor":{template:' '}},r.prototype.extendMultiCursor=function(t){return t.on(t.constructor.events.CURSOR_ADDED,function(t){var e,n;return e=t.elem.querySelector(".cursor-triangle.bottom"),n=t.elem.querySelector(".cursor-triangle.top"),e.style.borderTopColor=n.style.borderBottomColor=t.color})},r.prototype.extendToolbar=function(r){var i;return u(r.container).addClass("ql-snow"),l.each(["color","background","font","size","align"],(i=this,function(t){var e,n;if(null!=(n=r.container.querySelector(".ql-"+t))){switch(t){case"font":case"size":case"align":e=new s(n);break;case"color":case"background":e=new o(n),l.each(e.container.querySelectorAll(".ql-picker-item"),function(t,e){if(e<7)return u(t).addClass("ql-primary-color")})}return null!=e?i.pickers.push(e):void 0}})),l.each(u(r.container).textNodes(),function(t){if(0===u(t).text().trim().length)return u(t).remove()})},r}(),e.exports=r},{"../../lib/color-picker":16,"../../lib/dom":17,"../../lib/picker":19,"../base":32,lodash:1}]},{},[15])(15)});