text: !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("quill"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["quill","react","react-dom"],t):"object"==typeof exports?exports.ReactEditorQuill=t(require("quill"),require("react"),require("react-dom")):e.ReactEditorQuill=t(e.Quill,e.React,e.ReactDOM)}(this,function(e,t,n){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),u=n(2),a=r(u),s=n(8),l=r(s),c=i.default.import("parchment");i.default.register({"blots/cursor":l.default},!0),c.register(l.default);var f=c.Attributor.Style,p={scope:c.Scope.INLINE};i.default.register(new f("size","font-size",p),!0),i.default.register(new f("font","font-family",p),!0),t.default=a.default,e.exports=t.default},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":a(t))&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":a(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(3),f=r(c),p=n(4),h=r(p),d=n(5),y=r(d),v=n(7),g=r(v),b=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=n.isControlled()?n.props.value:n.props.defaultValue;return n.state={generation:0,value:r},n}return u(t,e),l(t,[{key:"componentWillReceiveProps",value:function(e,t){var n=this.editor;return!!n&&("value"in e&&((0,y.default)(e.value,this.getEditorContents())||this.setEditorContents(n,e.value)),e.plugins.length!==this.props.plugins.length&&this.renderPlugins(this.editor),"readOnly"in e&&e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(n,e.readOnly),!!this.shouldComponentRegenerate(e,t)&&this.regenerate())}},{key:"componentDidMount",value:function(){var e=this;return this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig()),this.editor.root.addEventListener("compositionend",function(){e.editor.selection.cursor.restore()}),this.props.plugins&&this.renderPlugins(this.editor),this.quillDelta?(this.editor.setContents(this.quillDelta),this.editor.setSelection(this.quillSelection),this.editor.focus(),this.quillDelta=null,void(this.quillSelection=null)):void(this.state.value&&this.setEditorContents(this.editor,this.state.value))}},{key:"componentWillUnmount",value:function(){var e=this.getEditor();e&&(this.unhookEditor(e),this.editor=null)}},{key:"shouldComponentUpdate",value:function(e,n){var r=this;return this.state.generation!==n.generation||t.cleanProps.some(function(t){return!(0,y.default)(e[t],r.props[t])})}},{key:"shouldComponentRegenerate",value:function(e){var n=this;return t.dirtyProps.some(function(t){return!(0,y.default)(e[t],n.props[t])})}},{key:"componentWillUpdate",value:function(e,t){this.state.generation!==t.generation&&this.componentWillUnmount()}},{key:"componentDidUpdate",value:function(e,t){this.state.generation!==t.generation&&this.componentDidMount()}},{key:"getEditorConfig",value:function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,theme:this.props.theme}}},{key:"getEditor",value:function(){return this.editor}},{key:"getEditingArea",value:function(){return h.default.findDOMNode(this.editingArea)}},{key:"getEditorContents",value:function(){return this.state.value}},{key:"getEditorSelection",value:function(){return this.state.selection}},{key:"convertHtml",value:function(e){return Array.isArray(e)?e:this.editor.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+e+"<p><br></p></div>").ops}},{key:"renderPlugins",value:function(e){this.pluginsTarget&&h.default.render(f.default.createElement("div",null,f.default.Children.map(this.props.plugins,function(t){var n={quill:e};return f.default.cloneElement(t,n)})),this.pluginsTarget)}},{key:"regenerate",value:function(){this.quillDelta=this.editor.getContents(),this.quillSelection=this.editor.getSelection(),this.setState({generation:this.state.generation+1})}},{key:"isControlled",value:function(){return"value"in this.props}},{key:"focus",value:function(){this.editor.focus()}},{key:"onEditorChangeText",value:function(e,t,n,r,o,i){var u=this;t.ops!==this.getEditorContents()&&this.setState({value:t.ops},function(){u.props.onChange&&u.props.onChange(e,t,n,r,o,i)})}},{key:"onEditorChangeSelection",value:function(e,t,n){var r=this.getEditorSelection()||{},o=e||{};o.length===r.length&&o.index===r.index||(this.setState({selection:e}),this.props.onChangeSelection&&this.props.onChangeSelection(e,t,n))}},{key:"onPaste",value:function e(t){var e=this.props.onPaste;e&&e.call(this,t)}},{key:"onFocus",value:function e(t){var e=this.props.onFocus;e&&e.call(this,t)}},{key:"onBlur",value:function e(t){var n=this,e=this.props.onBlur;e&&setTimeout(function(){n.editor.hasFocus()||e.call(n,t)},100)}},{key:"renderEditingArea",value:function(){var e=this,t=this.props.children,n={key:this.state.generation,ref:function(t){e.editingArea=t}},r=f.default.Children.count(t)?f.default.Children.only(t):null,o=r?f.default.cloneElement(r,n):f.default.DOM.div(n);return o}},{key:"render",value:function(){var e=this,t=this.props,n=t.onKeyDown,r=t.onKeyPress,o=t.onKeyUp;return f.default.createElement("div",{id:this.props.id,style:s({position:"relative"},this.props.style),key:this.state.generation,onKeyPress:n,onKeyDown:r,onKeyUp:o,className:["quill"].concat(this.props.className).join(" ")},this.renderEditingArea(),f.default.createElement("div",{ref:function(t){return e.pluginsTarget=t}}))}}]),t}(g.default);b.propTypes={id:c.PropTypes.string,className:c.PropTypes.string,theme:c.PropTypes.string,style:c.PropTypes.objectOf(c.PropTypes.any),readOnly:c.PropTypes.bool,value:c.PropTypes.oneOfType([c.PropTypes.string,c.PropTypes.array]),defaultValue:c.PropTypes.oneOfType([c.PropTypes.string,c.PropTypes.array]),placeholder:c.PropTypes.string,bounds:c.PropTypes.oneOfType([c.PropTypes.string,c.PropTypes.element]),onKeyPress:c.PropTypes.func,onKeyDown:c.PropTypes.func,onKeyUp:c.PropTypes.func,onChange:c.PropTypes.func,onPaste:c.PropTypes.func,onFocus:c.PropTypes.func,onBlur:c.PropTypes.func,onChangeSelection:c.PropTypes.func,modules:c.PropTypes.objectOf(c.PropTypes.any),formats:c.PropTypes.arrayOf(c.PropTypes.any),plugins:c.PropTypes.arrayOf(c.PropTypes.any),children:c.PropTypes.element},b.defaultProps={plugins:[]},b.dirtyProps=["modules","formats","bounds","theme","children"],b.cleanProps=["id","className","style","plugins","placeholder","onKeyPress","onKeyDown","onKeyUp","onChange","onChangeSelection","onPaste","onFocus","onBlur"],b.defaultProps={theme:"snow",modules:{}},t.default=b,e.exports=t.default},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){(function(e,n){function r(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var u=e[n];t(u,n,e)&&(i[o++]=u)}return i}function o(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function i(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function u(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function a(e){return function(t){return e(t)}}function s(e,t){return e.has(t)}function l(e,t){return null==e?void 0:e[t]}function c(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function f(e,t){return function(n){return e(t(n))}}function p(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function h(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function d(){this.__data__=Ut?Ut(null):{},this.size=0}function y(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function v(e){var t=this.__data__;if(Ut){var n=t[e];return n===me?void 0:n}return _t.call(t,e)?t[e]:void 0}function g(e){var t=this.__data__;return Ut?void 0!==t[e]:_t.call(t,e)}function b(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ut&&void 0===t?me:t,this}function _(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function m(){this.__data__=[],this.size=0}function j(e){var t=this.__data__,n=K(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():kt.call(t,n,1),--this.size,!0}function P(e){var t=this.__data__,n=K(t,e);return n<0?void 0:t[n][1]}function O(e){return K(this.__data__,e)>-1}function E(e,t){var n=this.__data__,r=K(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function T(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(){this.size=0,this.__data__={hash:new h,map:new(Mt||_),string:new h}}function k(e){var t=ee(this,e).delete(e);return this.size-=t?1:0,t}function S(e){return ee(this,e).get(e)}function C(e){return ee(this,e).has(e)}function x(e,t){var n=ee(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function A(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new T;++t<n;)this.add(e[t])}function z(e){return this.__data__.set(e,me),this}function M(e){return this.__data__.has(e)}function q(e){var t=this.__data__=new _(e);this.size=t.size}function L(){this.__data__=new _,this.size=0}function D(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function U(e){return this.__data__.get(e)}function F(e){return this.__data__.has(e)}function B(e,t){var n=this.__data__;if(n instanceof _){var r=n.__data__;if(!Mt||r.length<_e-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new T(r)}return n.set(e,t),this.size=n.size,this}function R(e,t){var n=Qt(e),r=!n&&Vt(e),o=!n&&!r&&Gt(e),i=!n&&!r&&!o&&Jt(e),a=n||r||o||i,s=a?u(e.length,String):[],l=s.length;for(var c in e)!t&&!_t.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||re(c,l))||s.push(c);return s}function K(e,t){for(var n=e.length;n--;)if(le(e[n][0],t))return n;return-1}function N(e,t,n){var r=t(e);return Qt(e)?r:o(r,n(e))}function I(e){return null==e?void 0===e?Ne:qe:St&&St in Object(e)?ne(e):ae(e)}function $(e){return ye(e)&&I(e)==Ee}function H(e,t,n,r,o){return e===t||(null==e||null==t||!ye(e)&&!ye(t)?e!==e&&t!==t:W(e,t,n,r,H,o))}function W(e,t,n,r,o,i){var u=Qt(e),a=Qt(t),s=u?Te:Wt(e),l=a?Te:Wt(t);s=s==Ee?Le:s,l=l==Ee?Le:l;var c=s==Le,f=l==Le,p=s==l;if(p&&Gt(e)){if(!Gt(t))return!1;u=!0,c=!1}if(p&&!c)return i||(i=new q),u||Jt(e)?J(e,t,n,r,o,i):X(e,t,s,n,r,o,i);if(!(n&je)){var h=c&&_t.call(e,"__wrapped__"),d=f&&_t.call(t,"__wrapped__");if(h||d){var y=h?e.value():e,v=d?t.value():t;return i||(i=new q),o(y,v,n,r,i)}}return!!p&&(i||(i=new q),Y(e,t,n,r,o,i))}function V(e){if(!de(e)||ie(e))return!1;var t=pe(e)?Pt:nt;return t.test(se(e))}function Q(e){return ye(e)&&he(e.length)&&!!ot[I(e)]}function G(e){if(!ue(e))return At(e);var t=[];for(var n in Object(e))_t.call(e,n)&&"constructor"!=n&&t.push(n);return t}function J(e,t,n,r,o,u){var a=n&je,l=e.length,c=t.length;if(l!=c&&!(a&&c>l))return!1;var f=u.get(e);if(f&&u.get(t))return f==t;var p=-1,h=!0,d=n&Pe?new A:void 0;for(u.set(e,t),u.set(t,e);++p<l;){var y=e[p],v=t[p];if(r)var g=a?r(v,y,p,t,e,u):r(y,v,p,e,t,u);if(void 0!==g){if(g)continue;h=!1;break}if(d){if(!i(t,function(e,t){if(!s(d,t)&&(y===e||o(y,e,n,r,u)))return d.push(t)})){h=!1;break}}else if(y!==v&&!o(y,v,n,r,u)){h=!1;break}}return u.delete(e),u.delete(t),h}function X(e,t,n,r,o,i,u){switch(n){case He:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $e:return!(e.byteLength!=t.byteLength||!i(new Tt(e),new Tt(t)));case ke:case Se:case Me:return le(+e,+t);case Ce:return e.name==t.name&&e.message==t.message;case Fe:case Re:return e==t+"";case ze:var a=c;case Be:var s=r&je;if(a||(a=p),e.size!=t.size&&!s)return!1;var l=u.get(e);if(l)return l==t;r|=Pe,u.set(e,t);var f=J(a(e),a(t),r,o,i,u);return u.delete(e),f;case Ke:if($t)return $t.call(e)==$t.call(t)}return!1}function Y(e,t,n,r,o,i){var u=n&je,a=Z(e),s=a.length,l=Z(t),c=l.length;if(s!=c&&!u)return!1;for(var f=s;f--;){var p=a[f];if(!(u?p in t:_t.call(t,p)))return!1}var h=i.get(e);if(h&&i.get(t))return h==t;var d=!0;i.set(e,t),i.set(t,e);for(var y=u;++f<s;){p=a[f];var v=e[p],g=t[p];if(r)var b=u?r(g,v,p,t,e,i):r(v,g,p,e,t,i);if(!(void 0===b?v===g||o(v,g,n,r,i):b)){d=!1;break}y||(y="constructor"==p)}if(d&&!y){var _=e.constructor,m=t.constructor;_!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof m&&m instanceof m)&&(d=!1)}return i.delete(e),i.delete(t),d}function Z(e){return N(e,ve,Ht)}function ee(e,t){var n=e.__data__;return oe(t)?n["string"==typeof t?"string":"hash"]:n.map}function te(e,t){var n=l(e,t);return V(n)?n:void 0}function ne(e){var t=_t.call(e,St),n=e[St];try{e[St]=void 0;var r=!0}catch(e){}var o=jt.call(e);return r&&(t?e[St]=n:delete e[St]),o}function re(e,t){return t=null==t?Oe:t,!!t&&("number"==typeof e||rt.test(e))&&e>-1&&e%1==0&&e<t}function oe(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function ie(e){return!!mt&&mt in e}function ue(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||vt;return e===n}function ae(e){return jt.call(e)}function se(e){if(null!=e){try{return bt.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function le(e,t){return e===t||e!==e&&t!==t}function ce(e){return null!=e&&he(e.length)&&!pe(e)}function fe(e,t){return H(e,t)}function pe(e){if(!de(e))return!1;var t=I(e);return t==xe||t==Ae||t==we||t==Ue}function he(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Oe}function de(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ye(e){return null!=e&&"object"==typeof e}function ve(e){return ce(e)?R(e):G(e)}function ge(){return[]}function be(){return!1}var _e=200,me="__lodash_hash_undefined__",je=1,Pe=2,Oe=9007199254740991,Ee="[object Arguments]",Te="[object Array]",we="[object AsyncFunction]",ke="[object Boolean]",Se="[object Date]",Ce="[object Error]",xe="[object Function]",Ae="[object GeneratorFunction]",ze="[object Map]",Me="[object Number]",qe="[object Null]",Le="[object Object]",De="[object Promise]",Ue="[object Proxy]",Fe="[object RegExp]",Be="[object Set]",Re="[object String]",Ke="[object Symbol]",Ne="[object Undefined]",Ie="[object WeakMap]",$e="[object ArrayBuffer]",He="[object DataView]",We="[object Float32Array]",Ve="[object Float64Array]",Qe="[object Int8Array]",Ge="[object Int16Array]",Je="[object Int32Array]",Xe="[object Uint8Array]",Ye="[object Uint8ClampedArray]",Ze="[object Uint16Array]",et="[object Uint32Array]",tt=/[\\^$.*+?()[\]{}|]/g,nt=/^\[object .+?Constructor\]$/,rt=/^(?:0|[1-9]\d*)$/,ot={};ot[We]=ot[Ve]=ot[Qe]=ot[Ge]=ot[Je]=ot[Xe]=ot[Ye]=ot[Ze]=ot[et]=!0,ot[Ee]=ot[Te]=ot[$e]=ot[ke]=ot[He]=ot[Se]=ot[Ce]=ot[xe]=ot[ze]=ot[Me]=ot[Le]=ot[Fe]=ot[Be]=ot[Re]=ot[Ie]=!1;var it="object"==typeof e&&e&&e.Object===Object&&e,ut="object"==typeof self&&self&&self.Object===Object&&self,at=it||ut||Function("return this")(),st="object"==typeof t&&t&&!t.nodeType&&t,lt=st&&"object"==typeof n&&n&&!n.nodeType&&n,ct=lt&&lt.exports===st,ft=ct&&it.process,pt=function(){try{return ft&&ft.binding&&ft.binding("util")}catch(e){}}(),ht=pt&&pt.isTypedArray,dt=Array.prototype,yt=Function.prototype,vt=Object.prototype,gt=at["__core-js_shared__"],bt=yt.toString,_t=vt.hasOwnProperty,mt=function(){var e=/[^.]+$/.exec(gt&&gt.keys&&gt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),jt=vt.toString,Pt=RegExp("^"+bt.call(_t).replace(tt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ot=ct?at.Buffer:void 0,Et=at.Symbol,Tt=at.Uint8Array,wt=vt.propertyIsEnumerable,kt=dt.splice,St=Et?Et.toStringTag:void 0,Ct=Object.getOwnPropertySymbols,xt=Ot?Ot.isBuffer:void 0,At=f(Object.keys,Object),zt=te(at,"DataView"),Mt=te(at,"Map"),qt=te(at,"Promise"),Lt=te(at,"Set"),Dt=te(at,"WeakMap"),Ut=te(Object,"create"),Ft=se(zt),Bt=se(Mt),Rt=se(qt),Kt=se(Lt),Nt=se(Dt),It=Et?Et.prototype:void 0,$t=It?It.valueOf:void 0;h.prototype.clear=d,h.prototype.delete=y,h.prototype.get=v,h.prototype.has=g,h.prototype.set=b,_.prototype.clear=m,_.prototype.delete=j,_.prototype.get=P,_.prototype.has=O,_.prototype.set=E,T.prototype.clear=w,T.prototype.delete=k,T.prototype.get=S,T.prototype.has=C,T.prototype.set=x,A.prototype.add=A.prototype.push=z,A.prototype.has=M,q.prototype.clear=L,q.prototype.delete=D,q.prototype.get=U,q.prototype.has=F,q.prototype.set=B;var Ht=Ct?function(e){return null==e?[]:(e=Object(e),r(Ct(e),function(t){return wt.call(e,t)}))}:ge,Wt=I;(zt&&Wt(new zt(new ArrayBuffer(1)))!=He||Mt&&Wt(new Mt)!=ze||qt&&Wt(qt.resolve())!=De||Lt&&Wt(new Lt)!=Be||Dt&&Wt(new Dt)!=Ie)&&(Wt=function(e){var t=I(e),n=t==Le?e.constructor:void 0,r=n?se(n):"";if(r)switch(r){case Ft:return He;case Bt:return ze;case Rt:return De;case Kt:return Be;case Nt:return Ie}return t});var Vt=$(function(){return arguments}())?$:function(e){return ye(e)&&_t.call(e,"callee")&&!wt.call(e,"callee")},Qt=Array.isArray,Gt=xt||be,Jt=ht?a(ht):Q;n.exports=fe}).call(t,function(){return this}(),n(6)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":a(t))&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":a(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(3),c=r(l),f=n(1),p=r(f),h=n(5),d=r(h),y=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),s(t,[{key:"setEditorSelection",value:function(e,t){var n=t;if(n){var r=e.getLength();n.index=Math.max(0,Math.min(n.index,r-1)),n.length=Math.max(0,Math.min(n.length,r-1-n.index))}e.setSelection(n)}},{key:"setEditorContents",value:function(e,t){if("string"!=typeof t||t!==e.root.innerHTML){var n=this.convertHtml(t);if(!(0,d.default)(n,this.convertHtml(e.root.innerHTML))){var r=e.getSelection();e.setContents(n||[]),r&&this.setEditorSelection(e,r)}}}},{key:"setEditorReadOnly",value:function(e,t){t?e.disable():e.enable()}},{key:"createEditor",value:function(e,t){var n=new p.default(e,t);return this.hookEditor(n),n}},{key:"hookEditor",value:function(e){var t=this,n=this.makeUnprivilegedEditor(e);this.handleTextChange=function(r,o,i){t.onEditorChangeText&&(t.onEditorChangeText(e.root.innerHTML,e.getContents(),r,o,i,n),t.onEditorChangeSelection(e.getSelection(),i,n))},this.handleSelectionChange=function(e,t,r){this.onEditorChangeSelection&&this.onEditorChangeSelection(e,r,n)}.bind(this),this.handlePaste=function(e){this.onPaste(e)}.bind(this),this.handleFocus=function(e){this.onFocus(e)}.bind(this),this.handleBlur=function(e){this.onBlur(e)}.bind(this),e.on("text-change",this.handleTextChange),e.on("selection-change",this.handleSelectionChange),e.root.addEventListener("paste",this.handlePaste),e.root.addEventListener("focus",this.handleFocus),e.root.addEventListener("blur",this.handleBlur)}},{key:"unhookEditor",value:function(e){e.off("selection-change"),e.off("editor-change"),e.root.removeEventListener("paste",this.handlePaste),e.root.removeEventListener("focus",this.handleFocus),e.root.removeEventListener("blur",this.handleBlur)}},{key:"makeUnprivilegedEditor",value:function(e){var t=e.getLength,n=e.getText,r=e.getContents,o=e.getSelection,i=e.getBounds;return{getLength:function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.apply(e,r)},getText:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return n.apply(e,r)},getContents:function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return r.apply(e,n)},getSelection:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return o.apply(e,n)},getBounds:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return i.apply(e,n)}}}}]),t}(c.default.Component);t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),u=i.default.import("blots/cursor");u.prototype.remove=function(){},t.default=u,e.exports=t.default}])});