@innovaccer/rich-text-editor 3.0.2 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,7 +41,7 @@ module.exports=(n=>{var r={};function o(e){var t;return(r[e]||(t=r[e]={i:e,l:!1,
41
41
  Licensed under the MIT License (MIT), see
42
42
  http://jedwatson.github.io/classnames
43
43
  */
44
- r={}.hasOwnProperty,e.exports?e.exports=o.default=o:void 0!==(t=function(){return o}.apply(t,[]))&&(e.exports=t)},function(e,t,n){e.exports=(()=>{var N=Array.prototype.slice;function e(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function l(e){return u(e)?e:n(e)}function s(e){return c(e)?e:g(e)}function L(e){return p(e)?e:v(e)}function r(e){return u(e)&&!j(e)?e:fe(e)}function u(e){return!(!e||!e[z])}function c(e){return!(!e||!e[V])}function p(e){return!(!e||!e[H])}function j(e){return c(e)||p(e)}function B(e){return!(!e||!e[K])}e(s,l),e(L,l),e(r,l),l.isIterable=u,l.isKeyed=c,l.isIndexed=p,l.isAssociative=j,l.isOrdered=B,l.Keyed=s,l.Indexed=L,l.Set=r;var z="@@__IMMUTABLE_ITERABLE__@@",V="@@__IMMUTABLE_KEYED__@@",H="@@__IMMUTABLE_INDEXED__@@",K="@@__IMMUTABLE_ORDERED__@@",t="delete",_=5,S=1<<_,E=S-1,w={},U={value:!1},W={value:!1};function G(e){return e.value=!1,e}function y(e){e&&(e.value=!0)}function q(){}function Y(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function $(e){return void 0===e.size&&(e.size=e.__iterate(Z)),e.size}function J(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295==n)return NaN;t=n}return t<0?$(e)+t:t}function Z(){return!0}function X(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&n<=t)}function Q(e,t){return te(e,t,0)}function ee(e,t){return te(e,t,t)}function te(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var ne=0,f=1,re=2,oe="function"==typeof Symbol&&Symbol.iterator,ie="@@iterator",ae=oe||ie;function h(e){this.next=e}function d(e,t,n,r){e=0===e?t:1===e?n:[t,n];return r?r.value=e:r={value:e,done:!1},r}function m(){return{value:void 0,done:!0}}function se(e){return ue(e)}function le(e){return e&&"function"==typeof e.next}function ce(e){var t=ue(e);return t&&t.call(e)}function ue(e){e=e&&(oe&&e[oe]||e[ie]);if("function"==typeof e)return e}function pe(e){return e&&"number"==typeof e.length}function n(e){{if(null==e)return Ee();if(u(e))return e.toSeq();var t=Ce(e)||"object"==typeof e&&new ve(e);if(t)return t;throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e)}}function g(e){return null==e?Ee().toKeyedSeq():u(e)?c(e)?e.toSeq():e.fromEntrySeq():we(e)}function v(e){return null==e?Ee():u(e)?c(e)?e.entrySeq():e.toIndexedSeq():xe(e)}function fe(e){return(null==e?Ee():u(e)?c(e)?e.entrySeq():e:xe(e)).toSetSeq()}h.prototype.toString=function(){return"[Iterator]"},h.KEYS=ne,h.VALUES=f,h.ENTRIES=re,h.prototype.inspect=h.prototype.toSource=function(){return this.toString()},h.prototype[ae]=function(){return this},e(n,l),n.of=function(){return n(arguments)},n.prototype.toSeq=function(){return this},n.prototype.toString=function(){return this.__toString("Seq {","}")},n.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},n.prototype.__iterate=function(e,t){return ke(this,e,t,!0)},n.prototype.__iterator=function(e,t){return De(this,e,t,!0)},e(g,n),g.prototype.toKeyedSeq=function(){return this},e(v,n),v.of=function(){return v(arguments)},v.prototype.toIndexedSeq=function(){return this},v.prototype.toString=function(){return this.__toString("Seq [","]")},v.prototype.__iterate=function(e,t){return ke(this,e,t,!1)},v.prototype.__iterator=function(e,t){return De(this,e,t,!1)},e(fe,n),fe.of=function(){return fe(arguments)},fe.prototype.toSetSeq=function(){return this},n.isSeq=Se,n.Keyed=g,n.Set=fe,n.Indexed=v;var he,de,me,ge="@@__IMMUTABLE_SEQ__@@";function ye(e){this._array=e,this.size=e.length}function ve(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function be(e){this._iterable=e,this.size=e.length||e.size}function _e(e){this._iterator=e,this._iteratorCache=[]}function Se(e){return!(!e||!e[ge])}function Ee(){return he=he||new ye([])}function we(e){var t=Array.isArray(e)?new ye(e).fromEntrySeq():le(e)?new _e(e).fromEntrySeq():se(e)?new be(e).fromEntrySeq():"object"==typeof e?new ve(e):void 0;if(t)return t;throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e)}function xe(e){var t=Ce(e);if(t)return t;throw new TypeError("Expected Array or iterable object of values: "+e)}function Ce(e){return pe(e)?new ye(e):le(e)?new _e(e):se(e)?new be(e):void 0}function ke(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var s=o[n?i-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function De(e,t,n,r){var o,i,a=e._cache;return a?(o=a.length-1,i=0,new h(function(){var e=a[n?o-i:i];return i++>o?m():d(t,r?e[0]:i-1,e[1])})):e.__iteratorUncached(t,n)}function Oe(e,t){return t?function n(r,o,e,t){if(Array.isArray(o))return r.call(t,e,v(o).map(function(e,t){return n(r,e,t,o)}));if(Te(o))return r.call(t,e,g(o).map(function(e,t){return n(r,e,t,o)}));return o}(t,e,"",{"":e}):Pe(e)}function Pe(e){return Array.isArray(e)?v(e).map(Pe).toList():Te(e)?g(e).map(Pe).toMap():e}function Te(e){return e&&(e.constructor===Object||void 0===e.constructor)}function b(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Me(n,e){var r,o,i,a,t;return n===e||!(!u(e)||void 0!==n.size&&void 0!==e.size&&n.size!==e.size||void 0!==n.__hash&&void 0!==e.__hash&&n.__hash!==e.__hash||c(n)!==c(e)||p(n)!==p(e)||B(n)!==B(e))&&(0===n.size&&0===e.size||(r=!j(n),B(n)?(o=n.entries(),e.every(function(e,t){var n=o.next().value;return n&&b(n[1],e)&&(r||b(n[0],t))})&&o.next().done):(i=!1,void 0===n.size&&(void 0===e.size?"function"==typeof n.cacheResult&&n.cacheResult():(i=!0,t=n,n=e,e=t)),a=!0,t=e.__iterate(function(e,t){if(r?!n.has(e):i?!b(e,n.get(t,w)):!b(n.get(t,w),e))return a=!1}),a&&n.size===t)))}function o(e,t){if(!(this instanceof o))return new o(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(de)return de;de=this}}function Ae(e,t){if(!e)throw new Error(t)}function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);if(Ae(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(me)return me;me=this}}function Ie(){throw TypeError("Abstract")}function Re(){}function Fe(){}function Ne(){}n.prototype[ge]=!0,e(ye,v),ye.prototype.get=function(e,t){return this.has(e)?this._array[J(this,e)]:t},ye.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===e(n[t?r-o:o],o,this))return o+1;return o},ye.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,o=0;return new h(function(){return r<o?m():d(e,o,n[t?r-o++:o++])})},e(ve,g),ve.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ve.prototype.has=function(e){return this._object.hasOwnProperty(e)},ve.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},ve.prototype.__iterator=function(t,n){var r=this._object,o=this._keys,i=o.length-1,a=0;return new h(function(){var e=o[n?i-a:a];return a++>i?m():d(t,e,r[e])})},ve.prototype[K]=!0,e(be,v),be.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n,r=ce(this._iterable),o=0;if(le(r))for(;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},be.prototype.__iteratorUncached=function(t,e){var n,r;return e?this.cacheResult().__iterator(t,e):le(n=ce(this._iterable))?(r=0,new h(function(){var e=n.next();return e.done?e:d(t,r++,e.value)})):new h(m)},e(_e,v),_e.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,o=0;o<r.length;)if(!1===e(r[o],o++,this))return o;for(;!(i=n.next()).done;){var i=i.value;if(!1===e(r[o]=i,o++,this))break}return o},_e.prototype.__iteratorUncached=function(t,e){var n,r,o;return e?this.cacheResult().__iterator(t,e):(n=this._iterator,r=this._iteratorCache,o=0,new h(function(){if(o>=r.length){var e=n.next();if(e.done)return e;r[o]=e.value}return d(t,o,r[o++])}))},e(o,v),o.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},o.prototype.get=function(e,t){return this.has(e)?this._value:t},o.prototype.includes=function(e){return b(this._value,e)},o.prototype.slice=function(e,t){var n=this.size;return X(e,t,n)?this:new o(this._value,ee(t,n)-Q(e,n))},o.prototype.reverse=function(){return this},o.prototype.indexOf=function(e){return b(this._value,e)?0:-1},o.prototype.lastIndexOf=function(e){return b(this._value,e)?this.size:-1},o.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},o.prototype.__iterator=function(e,t){var n=this,r=0;return new h(function(){return r<n.size?d(e,r++,n._value):m()})},o.prototype.equals=function(e){return e instanceof o?b(this._value,e._value):Me(e)},e(i,v),i.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1<this._step?" by "+this._step:"")+" ]"},i.prototype.get=function(e,t){return this.has(e)?this._start+J(this,e)*this._step:t},i.prototype.includes=function(e){e=(e-this._start)/this._step;return 0<=e&&e<this.size&&e===Math.floor(e)},i.prototype.slice=function(e,t){return X(e,t,this.size)?this:(e=Q(e,this.size),(t=ee(t,this.size))<=e?new i(0,0):new i(this.get(e,this._end),this.get(t,this._end),this._step))},i.prototype.indexOf=function(e){e-=this._start;if(e%this._step==0){e=e/this._step;if(0<=e&&e<this.size)return e}return-1},i.prototype.lastIndexOf=function(e){return this.indexOf(e)},i.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;i<=n;i++){if(!1===e(o,i,this))return i+1;o+=t?-r:r}return i},i.prototype.__iterator=function(t,n){var r=this.size-1,o=this._step,i=n?this._start+r*o:this._start,a=0;return new h(function(){var e=i;return i+=n?-o:o,r<a?m():d(t,a++,e)})},i.prototype.equals=function(e){return e instanceof i?this._start===e._start&&this._end===e._end&&this._step===e._step:Me(this,e)},e(Ie,l),e(Re,Ie),e(Fe,Ie),e(Ne,Ie),Ie.Keyed=Re,Ie.Indexed=Fe,Ie.Set=Ne;var Le="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function je(e){return e>>>1&1073741824|3221225471&e}function x(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"==t){var n=0|e;for(n!==e&&(n^=4294967295*e);4294967295<e;)n^=e/=4294967295;return je(n)}if("string"==t)return(e.length>Ge?e=>{var t=$e[e];return void 0===t&&(t=Be(e),Ye===qe&&(Ye=0,$e={}),Ye++,$e[e]=t),t}:Be)(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"==t){var r,o=e;if((!Ke||void 0===(r=He.get(o)))&&void 0===(r=o[We])){if(!Ve){if(void 0!==(r=o.propertyIsEnumerable&&o.propertyIsEnumerable[We]))return r;if(void 0!==(r=(e=>{if(e&&0<e.nodeType)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}})(o)))return r}if(r=++Ue,1073741824&Ue&&(Ue=0),Ke)He.set(o,r);else{if(void 0!==ze&&!1===ze(o))throw new Error("Non-extensible objects are not allowed as keys.");if(Ve)Object.defineProperty(o,We,{enumerable:!1,configurable:!1,writable:!1,value:r});else if(void 0!==o.propertyIsEnumerable&&o.propertyIsEnumerable===o.constructor.prototype.propertyIsEnumerable)o.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},o.propertyIsEnumerable[We]=r;else{if(void 0===o.nodeType)throw new Error("Unable to set a non-enumerable property on object.");o[We]=r}}}return r}if("function"==typeof e.toString)return Be(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Be(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return je(t)}var ze=Object.isExtensible,Ve=(()=>{try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}})();var He,Ke="function"==typeof WeakMap,Ue=(Ke&&(He=new WeakMap),0),We="__immutablehash__",Ge=("function"==typeof Symbol&&(We=Symbol(We)),16),qe=255,Ye=0,$e={};function C(e){Ae(e!==1/0,"Cannot perform this action with an infinite size.")}function k(t){return null==t?lt():Je(t)&&!B(t)?t:lt().withMutations(function(n){var e=s(t);C(e.size),e.forEach(function(e,t){return n.set(t,e)})})}function Je(e){return!(!e||!e[Xe])}e(k,Re),k.prototype.toString=function(){return this.__toString("Map {","}")},k.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},k.prototype.set=function(e,t){return ct(this,e,t)},k.prototype.setIn=function(e,t){return this.updateIn(e,w,function(){return t})},k.prototype.remove=function(e){return ct(this,e,w)},k.prototype.deleteIn=function(e){return this.updateIn(e,function(){return w})},k.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},k.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);e=function e(t,n,r,o){var i=t===w;var a=n.next();if(a.done)return(l=o(s=i?r:t))===s?t:l;Ae(i||t&&t.set,"invalid keyPath");var s=a.value;var l=i?w:t.get(s,w);a=e(l,n,r,o);return a===l?t:a===w?t.remove(s):(i?lt():t).set(s,a)}(this,cn(e),t,n);return e===w?void 0:e},k.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):lt()},k.prototype.merge=function(){return ht(this,void 0,arguments)},k.prototype.mergeWith=function(e){return ht(this,e,N.call(arguments,1))},k.prototype.mergeIn=function(e){var t=N.call(arguments,1);return this.updateIn(e,lt(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},k.prototype.mergeDeep=function(){return ht(this,dt,arguments)},k.prototype.mergeDeepWith=function(e){return ht(this,mt(e),N.call(arguments,1))},k.prototype.mergeDeepIn=function(e){var t=N.call(arguments,1);return this.updateIn(e,lt(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},k.prototype.sort=function(e){return P(Xt(this,e))},k.prototype.sortBy=function(e,t){return P(Xt(this,t,e))},k.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},k.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new q)},k.prototype.asImmutable=function(){return this.__ensureOwner()},k.prototype.wasAltered=function(){return this.__altered},k.prototype.__iterator=function(e,t){return new ot(this,e,t)},k.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},k.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?st(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},k.isMap=Je;var Ze,Xe="@@__IMMUTABLE_MAP__@@",a=k.prototype;function Qe(e,t){this.ownerID=e,this.entries=t}function et(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function tt(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function nt(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function rt(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function ot(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&at(e._root)}function it(e,t){return d(e,t[0],t[1])}function at(e,t){return{node:e,index:0,__prev:t}}function st(e,t,n,r){var o=Object.create(a);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function lt(){return Ze=Ze||st(0)}function ct(e,t,n){if(e._root){var r=G(U),o=G(W),i=ut(e._root,e.__ownerID,0,void 0,t,n,r,o);if(!o.value)return e;o=e.size+(r.value?n===w?-1:1:0)}else{if(n===w)return e;o=1,i=new Qe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=i,e.__hash=void 0,e.__altered=!0,e):i?st(o,i):lt()}function ut(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===w?e:(y(s),y(a),new rt(t,r,[o,i]))}function pt(e){return e.constructor===rt||e.constructor===nt}function ft(e,t,n,r,o){var i,a;return e.keyHash===r?new nt(t,r,[e.entry,o]):new et(t,1<<(i=(0===n?e.keyHash:e.keyHash>>>n)&E)|1<<(a=(0===n?r:r>>>n)&E),i==a?[ft(e,t,n+_,r,o)]:(n=new rt(t,r,o),i<a?[e,n]:[n,e]))}function ht(e,t,n){for(var r=[],o=0;o<n.length;o++){var i=n[o],a=s(i);u(i)||(a=a.map(function(e){return Oe(e)})),r.push(a)}return gt(e,t,r)}function dt(e,t,n){return e&&e.mergeDeep&&u(t)?e.mergeDeep(t):b(e,t)?e:t}function mt(r){return function(e,t,n){return e&&e.mergeDeepWith&&u(t)?e.mergeDeepWith(r,t):b(e,t=r(e,t,n))?e:t}}function gt(e,o,n){return 0===(n=n.filter(function(e){return 0!==e.size})).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations(function(r){for(var e=o?function(t,n){r.update(n,w,function(e){return e===w?t:o(e,t,n)})}:function(e,t){r.set(t,e)},t=0;t<n.length;t++)n[t].forEach(e)}):e.constructor(n[0])}function yt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,127&(e=(e+=e>>8)+(e>>16))}function vt(e,t,n,r){r=r?e:Y(e);return r[t]=n,r}a[Xe]=!0,a[t]=a.remove,a.removeIn=a.deleteIn,Qe.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(b(n,o[i][0]))return o[i][1];return r},Qe.prototype.update=function(e,t,n,r,o,i,a){for(var s=o===w,l=this.entries,c=0,u=l.length;c<u&&!b(r,l[c][0]);c++);var p=c<u;if(p?l[c][1]===o:s)return this;if(y(a),!s&&p||y(i),!s||1!==l.length){if(!p&&!s&&l.length>=bt){for(var f=e,h=l,a=r,i=o,d=new rt(f=f||new q,x(a),[a,i]),m=0;m<h.length;m++)var g=h[m],d=d.update(f,0,void 0,g[0],g[1]);return d}a=e&&e===this.ownerID,i=a?l:Y(l);return p?s?c===u-1?i.pop():i[c]=i.pop():i[c]=[r,o]:i.push([r,o]),a?(this.entries=i,this):new Qe(e,i)}},et.prototype.get=function(e,t,n,r){void 0===t&&(t=x(n));var o=1<<((0===e?t:t>>>e)&E),i=this.bitmap;return 0==(i&o)?r:this.nodes[yt(i&o-1)].get(e+_,t,n,r)},et.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=x(r));var s=(0===t?n:n>>>t)&E,l=1<<s,c=this.bitmap,u=0!=(c&l);if(!u&&o===w)return this;var p=yt(c&l-1),f=this.nodes,h=u?f[p]:void 0,t=ut(h,e,t+_,n,r,o,i,a);if(t===h)return this;if(!u&&t&&f.length>=_t){for(var n=e,d=f,m=c,r=s,o=t,g=0,y=new Array(S),v=0;0!==m;v++,m>>>=1)y[v]=1&m?d[g++]:void 0;return y[r]=o,new tt(n,g+1,y)}return u&&!t&&2===f.length&&pt(f[1^p])?f[1^p]:u&&t&&1===f.length&&pt(t)?t:(i=e&&e===this.ownerID,a=u?t?c:c^l:c|l,h=u?t?vt(f,p,t,i):((e,t,n)=>{var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a<r;a++)o[a]=e[a+(i=a===t?1:i)];return o})(f,p,i):((e,t,n,r)=>{var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var i=new Array(o),a=0,s=0;s<o;s++)s===t?(i[s]=n,a=-1):i[s]=e[s+a];return i})(f,p,t,i),i?(this.bitmap=a,this.nodes=h,this):new et(e,a,h))},tt.prototype.get=function(e,t,n,r){void 0===t&&(t=x(n));var o=this.nodes[(0===e?t:t>>>e)&E];return o?o.get(e+_,t,n,r):r},tt.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=x(r));var s=(0===t?n:n>>>t)&E,l=o===w,c=this.nodes,u=c[s];if(l&&!u)return this;l=ut(u,e,t+_,n,r,o,i,a);if(l===u)return this;t=this.count;if(u){if(!l&&--t<St){for(var n=e,p=c,f=s,h=0,d=0,m=new Array(t),g=0,y=1,v=p.length;g<v;g++,y<<=1){var b=p[g];void 0!==b&&g!==f&&(h|=y,m[d++]=b)}return new et(n,h,m)}}else t++;r=e&&e===this.ownerID,o=vt(c,s,l,r);return r?(this.count=t,this.nodes=o,this):new tt(e,t,o)},nt.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(b(n,o[i][0]))return o[i][1];return r},nt.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=x(r));var s=o===w;if(n!==this.keyHash)return s?this:(y(a),y(i),ft(this,e,t,n,[r,o]));for(var l=this.entries,c=0,u=l.length;c<u&&!b(r,l[c][0]);c++);t=c<u;return(t?l[c][1]===o:s)?this:(y(a),!s&&t||y(i),s&&2===u?new rt(e,this.keyHash,l[1^c]):(a=(n=e&&e===this.ownerID)?l:Y(l),t?s?c===u-1?a.pop():a[c]=a.pop():a[c]=[r,o]:a.push([r,o]),n?(this.entries=a,this):new nt(e,this.keyHash,a)))},rt.prototype.get=function(e,t,n,r){return b(n,this.entry[0])?this.entry[1]:r},rt.prototype.update=function(e,t,n,r,o,i,a){var s=o===w,l=b(r,this.entry[0]);return(l?o===this.entry[1]:s)?this:(y(a),s?void y(i):l?e&&e===this.ownerID?(this.entry[1]=o,this):new rt(e,this.keyHash,[r,o]):(y(i),ft(this,e,t,x(r),[r,o])))},Qe.prototype.iterate=nt.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},et.prototype.iterate=tt.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&!1===i.iterate(e,t))return!1}},rt.prototype.iterate=function(e,t){return e(this.entry)},e(ot,h),ot.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,o=t.index++;if(r.entry){if(0==o)return it(e,r.entry)}else if(r.entries){if(o<=(n=r.entries.length-1))return it(e,r.entries[this._reverse?n-o:o])}else if(o<=(n=r.nodes.length-1)){r=r.nodes[this._reverse?n-o:o];if(r){if(r.entry)return it(e,r.entry);t=this._stack=at(r,t)}continue}t=this._stack=this._stack.__prev}return m()};var bt=S/4,_t=S/2,St=S/4;function D(e){var t,r,n=Tt();return null==e?n:Et(e)?e:(t=L(e),0===(r=t.size)?n:(C(r),0<r&&r<S?Pt(0,r,_,null,new xt(t.toArray())):n.withMutations(function(n){n.setSize(r),t.forEach(function(e,t){return n.set(t,e)})})))}function Et(e){return!(!e||!e[wt])}e(D,Fe),D.of=function(){return this(arguments)},D.prototype.toString=function(){return this.__toString("List [","]")},D.prototype.get=function(e,t){var n;return 0<=(e=J(this,e))&&e<this.size?(n=It(this,e+=this._origin))&&n.array[e&E]:t},D.prototype.set=function(e,t){var n=this,r=e,o=t;if((r=J(n,r))!==r)return n;if(r>=n.size||r<0)return n.withMutations(function(e){r<0?Rt(e,r).set(0,o):Rt(e,0,r+1).set(r,o)});r+=n._origin;var e=n._tail,t=n._root,i=G(W);return r>=Nt(n._capacity)?e=Mt(e,n.__ownerID,0,r,o,i):t=Mt(t,n.__ownerID,n._level,r,o,i),i.value?n.__ownerID?(n._root=t,n._tail=e,n.__hash=void 0,n.__altered=!0,n):Pt(n._origin,n._capacity,n._level,t,e):n},D.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},D.prototype.insert=function(e,t){return this.splice(e,0,t)},D.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=_,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Tt()},D.prototype.push=function(){var n=arguments,r=this.size;return this.withMutations(function(e){Rt(e,0,r+n.length);for(var t=0;t<n.length;t++)e.set(r+t,n[t])})},D.prototype.pop=function(){return Rt(this,0,-1)},D.prototype.unshift=function(){var n=arguments;return this.withMutations(function(e){Rt(e,-n.length);for(var t=0;t<n.length;t++)e.set(t,n[t])})},D.prototype.shift=function(){return Rt(this,1)},D.prototype.merge=function(){return Ft(this,void 0,arguments)},D.prototype.mergeWith=function(e){return Ft(this,e,N.call(arguments,1))},D.prototype.mergeDeep=function(){return Ft(this,dt,arguments)},D.prototype.mergeDeepWith=function(e){return Ft(this,mt(e),N.call(arguments,1))},D.prototype.setSize=function(e){return Rt(this,0,e)},D.prototype.slice=function(e,t){var n=this.size;return X(e,t,n)?this:Rt(this,Q(e,n),ee(t,n))},D.prototype.__iterator=function(t,e){var n=0,r=Ot(this,e);return new h(function(){var e=r();return e===Dt?m():d(t,n++,e)})},D.prototype.__iterate=function(e,t){for(var n,r=0,o=Ot(this,t);(n=o())!==Dt&&!1!==e(n,r++,this););return r},D.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Pt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},D.isList=Et;var wt="@@__IMMUTABLE_LIST__@@",O=D.prototype;function xt(e,t){this.array=e,this.ownerID=t}O[wt]=!0,O[t]=O.remove,O.setIn=a.setIn,O.deleteIn=O.removeIn=a.removeIn,O.update=a.update,O.updateIn=a.updateIn,O.mergeIn=a.mergeIn,O.mergeDeepIn=a.mergeDeepIn,O.withMutations=a.withMutations,O.asMutable=a.asMutable,O.asImmutable=a.asImmutable,O.wasAltered=a.wasAltered,xt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&E;if(r>=this.array.length)return new xt([],e);var o=0==r;if(0<t){var i,a=this.array[r];if((i=a&&a.removeBefore(e,t-_,n))===a&&o)return this}if(o&&!i)return this;var s=At(this,e);if(!o)for(var l=0;l<r;l++)s.array[l]=void 0;return i&&(s.array[r]=i),s},xt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r=n-1>>>t&E;if(r>=this.array.length)return this;if(0<t){var o,i=this.array[r];if((o=i&&i.removeAfter(e,t-_,n))===i&&r==this.array.length-1)return this}t=At(this,e);return t.array.splice(1+r),o&&(t.array[r]=o),t};var Ct,kt,Dt={};function Ot(e,d){var m=e._origin,g=e._capacity,y=Nt(g),v=e._tail;return b(e._root,e._level,0);function b(e,t,n){var r,o,i,a,s,l,c,u,p,f,h;return 0===t?(s=e,o=(r=n)===y?v&&v.array:s&&s.array,i=m<r?0:m-r,S<(a=g-r)&&(a=S),function(){var e;return i===a?Dt:(e=d?--a:i++,o&&o[e])}):(l=t,c=n,p=(s=e)&&s.array,f=m<c?0:m-c>>l,S<(h=1+(g-c>>l))&&(h=S),function(){for(;;){if(u){var e=u();if(e!==Dt)return e;u=null}if(f===h)return Dt;e=d?--h:f++;u=b(p&&p[e],l-_,c+(e<<l))}})}}function Pt(e,t,n,r,o,i,a){var s=Object.create(O);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=o,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function Tt(){return Ct=Ct||Pt(0,0,_)}function Mt(e,t,n,r,o,i){var a,s,l=r>>>n&E,c=e&&l<e.array.length;return c||void 0!==o?0<n?(n=Mt(s=e&&e.array[l],t,n-_,r,o,i))===s?e:((a=At(e,t)).array[l]=n,a):c&&e.array[l]===o?e:(y(i),a=At(e,t),void 0===o&&l==a.array.length-1?a.array.pop():a.array[l]=o,a):e}function At(e,t){return t&&e&&t===e.ownerID?e:new xt(e?e.array.slice():[],t)}function It(e,t){if(t>=Nt(e._capacity))return e._tail;if(t<1<<e._level+_){for(var n=e._root,r=e._level;n&&0<r;)n=n.array[t>>>r&E],r-=_;return n}}function Rt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new q,o=e._origin,i=e._capacity,a=o+t,t=void 0===n?i:n<0?i+n:o+n;if(a===o&&t===i)return e;if(t<=a)return e.clear();for(var s=e._level,l=e._root,c=0;a+c<0;)l=new xt(l&&l.array.length?[void 0,l]:[],r),c+=1<<(s+=_);c&&(a+=c,o+=c,t+=c,i+=c);for(var u=Nt(i),p=Nt(t);1<<s+_<=p;)l=new xt(l&&l.array.length?[l]:[],r),s+=_;var n=e._tail,f=p<u?It(e,t-1):u<p?new xt([],r):n;if(n&&u<p&&a<i&&n.array.length){for(var h=l=At(l,r),d=s;_<d;d-=_)var m=u>>>d&E,h=h.array[m]=At(h.array[m],r);h.array[u>>>_&E]=n}if(t<i&&(f=f&&f.removeAfter(r,0,t)),p<=a)a-=p,t-=p,s=_,l=null,f=f&&f.removeBefore(r,0,a);else if(o<a||p<u){for(c=0;l;){var g=a>>>s&E;if(g!=p>>>s&E)break;g&&(c+=(1<<s)*g),s-=_,l=l.array[g]}(l=l&&o<a?l.removeBefore(r,s,a-c):l)&&p<u&&(l=l.removeAfter(r,s,p-c)),c&&(a-=c,t-=c)}return e.__ownerID?(e.size=t-a,e._origin=a,e._capacity=t,e._level=s,e._root=l,e._tail=f,e.__hash=void 0,e.__altered=!0,e):Pt(a,t,s,l,f)}function Ft(e,t,n){for(var r=[],o=0,i=0;i<n.length;i++){var a=n[i],s=L(a);s.size>o&&(o=s.size),u(a)||(s=s.map(function(e){return Oe(e)})),r.push(s)}return gt(e=o>e.size?e.setSize(o):e,t,r)}function Nt(e){return e<S?0:e-1>>>_<<_}function P(t){return null==t?Bt():Lt(t)?t:Bt().withMutations(function(n){var e=s(t);C(e.size),e.forEach(function(e,t){return n.set(t,e)})})}function Lt(e){return Je(e)&&B(e)}function jt(e,t,n,r){var o=Object.create(P.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function Bt(){return kt=kt||jt(lt(),Tt())}function zt(e,t,n){var r,o,i=e._map,a=e._list,s=i.get(t),l=void 0!==s;if(n===w){if(!l)return e;a.size>=S&&a.size>=2*i.size?(r=(o=a.filter(function(e,t){return void 0!==e&&s!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=i,o=a.set(s,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):jt(r,o)}function Vt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Ht(e){this._iter=e,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Ut(e){this._iter=e,this.size=e.size}function Wt(o){var e=an(o);return e._iter=o,e.size=o.size,e.flip=function(){return o},e.reverse=function(){var e=o.reverse.apply(this);return e.flip=function(){return o.reverse()},e},e.has=function(e){return o.includes(e)},e.includes=function(e){return o.has(e)},e.cacheResult=sn,e.__iterateUncached=function(n,e){var r=this;return o.__iterate(function(e,t){return!1!==n(t,e,r)},e)},e.__iteratorUncached=function(e,t){var n;return e===re?(n=o.__iterator(e,t),new h(function(){var e,t=n.next();return t.done||(e=t.value[0],t.value[0]=t.value[1],t.value[1]=e),t})):o.__iterator(e===f?ne:f,t)},e}function Gt(i,a,s){var e=an(i);return e.size=i.size,e.has=function(e){return i.has(e)},e.get=function(e,t){var n=i.get(e,w);return n===w?t:a.call(s,n,e,i)},e.__iterateUncached=function(r,e){var o=this;return i.__iterate(function(e,t,n){return!1!==r(a.call(s,e,t,n),t,o)},e)},e.__iteratorUncached=function(r,e){var o=i.__iterator(re,e);return new h(function(){var e,t,n=o.next();return n.done?n:(t=(e=n.value)[0],d(r,t,a.call(s,e[1],t,i),n))})},e}function qt(o,n){var e=an(o);return e._iter=o,e.size=o.size,e.reverse=function(){return o},o.flip&&(e.flip=function(){var e=Wt(o);return e.reverse=function(){return o.flip()},e}),e.get=function(e,t){return o.get(n?e:-1-e,t)},e.has=function(e){return o.has(n?e:-1-e)},e.includes=function(e){return o.includes(e)},e.cacheResult=sn,e.__iterate=function(n,e){var r=this;return o.__iterate(function(e,t){return n(e,t,r)},!e)},e.__iterator=function(e,t){return o.__iterator(e,!t)},e}function Yt(a,s,l,c){var e=an(a);return c&&(e.has=function(e){var t=a.get(e,w);return t!==w&&!!s.call(l,t,e,a)},e.get=function(e,t){var n=a.get(e,w);return n!==w&&s.call(l,n,e,a)?n:t}),e.__iterateUncached=function(r,e){var o=this,i=0;return a.__iterate(function(e,t,n){if(s.call(l,e,t,n))return i++,r(e,c?t:i-1,o)},e),i},e.__iteratorUncached=function(r,e){var o=a.__iterator(re,e),i=0;return new h(function(){for(;;){var e=o.next();if(e.done)return e;var t=e.value,n=t[0],t=t[1];if(s.call(l,t,n,a))return d(r,c?n:i++,t,e)}})},e}function $t(s,e,t,l){var c,u,n=s.size;return void 0!==e&&(e|=0),void 0!==t&&(t|=0),X(e,t,n)?s:(c=Q(e,n),n=ee(t,n),c!=c||n!=n?$t(s.toSeq().cacheResult(),e,t,l):((e=n-c)==e&&(u=e<0?0:e),(t=an(s)).size=0===u?u:s.size&&u||void 0,!l&&Se(s)&&0<=u&&(t.get=function(e,t){return 0<=(e=J(this,e))&&e<u?s.get(e+c,t):t}),t.__iterateUncached=function(n,e){var r,o,i,a=this;return 0===u?0:e?this.cacheResult().__iterate(n,e):(o=!(r=0),i=0,s.__iterate(function(e,t){if(!(o=o&&r++<c))return i++,!1!==n(e,l?t:i-1,a)&&i!==u}),i)},t.__iteratorUncached=function(t,e){var n,r,o;return 0!==u&&e?this.cacheResult().__iterator(t,e):(n=0!==u&&s.__iterator(t,e),o=r=0,new h(function(){for(;r++<c;)n.next();var e;return++o>u?m():(e=n.next(),l||t===f?e:d(t,o-1,t===ne?void 0:e.value[1],e))}))},t))}function Jt(t,c,u,p){var e=an(t);return e.__iterateUncached=function(r,e){var o,i,a=this;return e?this.cacheResult().__iterate(r,e):(o=!0,i=0,t.__iterate(function(e,t,n){if(!(o=o&&c.call(u,e,t,n)))return i++,r(e,p?t:i-1,a)}),i)},e.__iteratorUncached=function(o,e){var i,a,s,l=this;return e?this.cacheResult().__iterator(o,e):(i=t.__iterator(re,e),a=!0,s=0,new h(function(){var e;do{if((e=i.next()).done)return p||o===f?e:d(o,s++,o===ne?void 0:e.value[1],e);var t=e.value,n=t[0],r=t[1]}while(a=a&&c.call(u,r,n,l));return o===re?e:d(o,n,r,e)}))},e}function Zt(e,l,c){var t=an(e);return t.__iterateUncached=function(i,t){var a=0,s=!1;return function n(e,r){var o=this;e.__iterate(function(e,t){return(!l||r<l)&&u(e)?n(e,r+1):!1===i(e,c?t:a++,o)&&(s=!0),!s},t)}(e,0),a},t.__iteratorUncached=function(n,r){var o=e.__iterator(n,r),i=[],a=0;return new h(function(){for(;o;){var e=o.next();if(!1!==e.done)o=i.pop();else{var t=e.value;if(n===re&&(t=t[1]),l&&!(i.length<l)||!u(t))return c?e:d(n,a++,t,e);i.push(o),o=t.__iterator(n,r)}}return m()})},t}function Xt(n,r,o){r=r||ln;var e=c(n),i=0,a=n.toSeq().map(function(e,t){return[t,e,i++,o?o(e,t,n):e]}).toArray();return a.sort(function(e,t){return r(e[3],t[3])||e[2]-t[2]}).forEach(e?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),(e?g:p(n)?v:fe)(a)}function Qt(n,r,o){var e;return r=r||ln,o?(e=n.toSeq().map(function(e,t){return[e,o(e,t,n)]}).reduce(function(e,t){return en(r,e[1],t[1])?t:e}))&&e[0]:n.reduce(function(e,t){return en(r,e,t)?t:e})}function en(e,t,n){e=e(n,t);return 0===e&&n!==t&&(null==n||n!=n)||0<e}function tn(e,a,s){e=an(e);return e.size=new ye(s).map(function(e){return e.size}).min(),e.__iterate=function(e,t){for(var n,r=this.__iterator(f,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},e.__iteratorUncached=function(t,n){var r=s.map(function(e){return e=l(e),ce(n?e.reverse():e)}),o=0,i=!1;return new h(function(){var e;return i||(e=r.map(function(e){return e.next()}),i=e.some(function(e){return e.done})),i?m():d(t,o++,a.apply(null,e.map(function(e){return e.value})))})},e}function T(e,t){return Se(e)?t:e.constructor(t)}function nn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function rn(e){return C(e.size),$(e)}function on(e){return c(e)?s:p(e)?L:r}function an(e){return Object.create((c(e)?g:p(e)?v:fe).prototype)}function sn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):n.prototype.cacheResult.call(this)}function ln(e,t){return t<e?1:e<t?-1:0}function cn(e){var t=ce(e);if(!t){if(!pe(e))throw new TypeError("Expected iterable or array-like: "+e);t=ce(l(e))}return t}function M(o,i){function a(e){if(e instanceof a)return e;if(!(this instanceof a))return new a(e);if(!s){s=!0;var t=Object.keys(o),n=l,r=t;try{r.forEach(function(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Ae(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}.bind(void 0,n))}catch(e){}l.size=t.length,l._name=i,l._keys=t,l._defaultValues=o}this._map=k(e)}var s,l=a.prototype=Object.create(A);return l.constructor=a}e(P,k),P.of=function(){return this(arguments)},P.prototype.toString=function(){return this.__toString("OrderedMap {","}")},P.prototype.get=function(e,t){e=this._map.get(e);return void 0!==e?this._list.get(e)[1]:t},P.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Bt()},P.prototype.set=function(e,t){return zt(this,e,t)},P.prototype.remove=function(e){return zt(this,e,w)},P.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},P.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},P.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},P.prototype.__ensureOwner=function(e){var t,n;return e===this.__ownerID?this:(t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e),e?jt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this))},P.isOrderedMap=Lt,P.prototype[K]=!0,P.prototype[t]=P.prototype.remove,e(Vt,g),Vt.prototype.get=function(e,t){return this._iter.get(e,t)},Vt.prototype.has=function(e){return this._iter.has(e)},Vt.prototype.valueSeq=function(){return this._iter.valueSeq()},Vt.prototype.reverse=function(){var e=this,t=qt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Vt.prototype.map=function(e,t){var n=this,r=Gt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Vt.prototype.__iterate=function(n,t){var r,o=this;return this._iter.__iterate(this._useKeys?function(e,t){return n(e,t,o)}:(r=t?rn(this):0,function(e){return n(e,t?--r:r++,o)}),t)},Vt.prototype.__iterator=function(t,n){var r,o;return this._useKeys?this._iter.__iterator(t,n):(r=this._iter.__iterator(f,n),o=n?rn(this):0,new h(function(){var e=r.next();return e.done?e:d(t,n?--o:o++,e.value,e)}))},Vt.prototype[K]=!0,e(Ht,v),Ht.prototype.includes=function(e){return this._iter.includes(e)},Ht.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},Ht.prototype.__iterator=function(t,e){var n=this._iter.__iterator(f,e),r=0;return new h(function(){var e=n.next();return e.done?e:d(t,r++,e.value,e)})},e(Kt,fe),Kt.prototype.has=function(e){return this._iter.includes(e)},Kt.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},Kt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(f,e);return new h(function(){var e=n.next();return e.done?e:d(t,e.value,e.value,e)})},e(Ut,g),Ut.prototype.entrySeq=function(){return this._iter.toSeq()},Ut.prototype.__iterate=function(n,e){var r=this;return this._iter.__iterate(function(e){var t;if(e)return nn(e),t=u(e),n(t?e.get(1):e[1],t?e.get(0):e[0],r)},e)},Ut.prototype.__iterator=function(r,e){var o=this._iter.__iterator(f,e);return new h(function(){for(;;){var e=o.next();if(e.done)return e;var t,n=e.value;if(n)return nn(n),t=u(n),d(r,t?n.get(0):n[0],t?n.get(1):n[1],e)}})},Ht.prototype.cacheResult=Vt.prototype.cacheResult=Kt.prototype.cacheResult=Ut.prototype.cacheResult=sn,e(M,Re),M.prototype.toString=function(){return this.__toString(pn(this)+" {","}")},M.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},M.prototype.get=function(e,t){var n;return this.has(e)?(n=this._defaultValues[e],this._map?this._map.get(e,n):n):t},M.prototype.clear=function(){var e;return this.__ownerID?(this._map&&this._map.clear(),this):(e=this.constructor)._empty||(e._empty=un(this,lt()))},M.prototype.set=function(e,t){if(this.has(e))return t=this._map&&this._map.set(e,t),this.__ownerID||t===this._map?this:un(this,t);throw new Error('Cannot set unknown key "'+e+'" on '+pn(this))},M.prototype.remove=function(e){return!this.has(e)||(e=this._map&&this._map.remove(e),this.__ownerID)||e===this._map?this:un(this,e)},M.prototype.wasAltered=function(){return this._map.wasAltered()},M.prototype.__iterator=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},M.prototype.__iterate=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},M.prototype.__ensureOwner=function(e){var t;return e===this.__ownerID?this:(t=this._map&&this._map.__ensureOwner(e),e?un(this,t,e):(this.__ownerID=e,this._map=t,this))};var A=M.prototype;function un(e,t,n){e=Object.create(Object.getPrototypeOf(e));return e._map=t,e.__ownerID=n,e}function pn(e){return e._name||e.constructor.name||"Record"}function I(n){return null==n?yn():fn(n)&&!B(n)?n:yn().withMutations(function(t){var e=r(n);C(e.size),e.forEach(function(e){return t.add(e)})})}function fn(e){return!(!e||!e[dn])}A[t]=A.remove,A.deleteIn=A.removeIn=a.removeIn,A.merge=a.merge,A.mergeWith=a.mergeWith,A.mergeIn=a.mergeIn,A.mergeDeep=a.mergeDeep,A.mergeDeepWith=a.mergeDeepWith,A.mergeDeepIn=a.mergeDeepIn,A.setIn=a.setIn,A.update=a.update,A.updateIn=a.updateIn,A.withMutations=a.withMutations,A.asMutable=a.asMutable,A.asImmutable=a.asImmutable,e(I,Ne),I.of=function(){return this(arguments)},I.fromKeys=function(e){return this(s(e).keySeq())},I.prototype.toString=function(){return this.__toString("Set {","}")},I.prototype.has=function(e){return this._map.has(e)},I.prototype.add=function(e){return mn(this,this._map.set(e,!0))},I.prototype.remove=function(e){return mn(this,this._map.remove(e))},I.prototype.clear=function(){return mn(this,this._map.clear())},I.prototype.union=function(){var n=N.call(arguments,0);return 0===(n=n.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(t){for(var e=0;e<n.length;e++)r(n[e]).forEach(function(e){return t.add(e)})}):this.constructor(n[0])},I.prototype.intersect=function(){var n,t;return 0===(n=N.call(arguments,0)).length?this:(n=n.map(r),(t=this).withMutations(function(e){t.forEach(function(t){n.every(function(e){return e.includes(t)})||e.remove(t)})}))},I.prototype.subtract=function(){var n,t;return 0===(n=N.call(arguments,0)).length?this:(n=n.map(r),(t=this).withMutations(function(e){t.forEach(function(t){n.some(function(e){return e.includes(t)})&&e.remove(t)})}))},I.prototype.merge=function(){return this.union.apply(this,arguments)},I.prototype.mergeWith=function(e){var t=N.call(arguments,1);return this.union.apply(this,t)},I.prototype.sort=function(e){return vn(Xt(this,e))},I.prototype.sortBy=function(e,t){return vn(Xt(this,t,e))},I.prototype.wasAltered=function(){return this._map.wasAltered()},I.prototype.__iterate=function(n,e){var r=this;return this._map.__iterate(function(e,t){return n(t,t,r)},e)},I.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},I.prototype.__ensureOwner=function(e){var t;return e===this.__ownerID?this:(t=this._map.__ensureOwner(e),e?this.__make(t,e):(this.__ownerID=e,this._map=t,this))},I.isSet=fn;var hn,dn="@@__IMMUTABLE_SET__@@",R=I.prototype;function mn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function gn(e,t){var n=Object.create(R);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function yn(){return hn=hn||gn(lt())}function vn(n){return null==n?wn():bn(n)?n:wn().withMutations(function(t){var e=r(n);C(e.size),e.forEach(function(e){return t.add(e)})})}function bn(e){return fn(e)&&B(e)}R[dn]=!0,R[t]=R.remove,R.mergeDeep=R.merge,R.mergeDeepWith=R.mergeWith,R.withMutations=a.withMutations,R.asMutable=a.asMutable,R.asImmutable=a.asImmutable,R.__empty=yn,R.__make=gn,e(vn,I),vn.of=function(){return this(arguments)},vn.fromKeys=function(e){return this(s(e).keySeq())},vn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},vn.isOrderedSet=bn;var _n,Sn=vn.prototype;function En(e,t){var n=Object.create(Sn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function wn(){return _n=_n||En(Bt())}function F(e){return null==e?Pn():xn(e)?e:Pn().unshiftAll(e)}function xn(e){return!(!e||!e[kn])}Sn[K]=!0,Sn.__empty=wn,Sn.__make=En,e(F,Fe),F.of=function(){return this(arguments)},F.prototype.toString=function(){return this.__toString("Stack [","]")},F.prototype.get=function(e,t){var n=this._head;for(e=J(this,e);n&&e--;)n=n.next;return n?n.value:t},F.prototype.peek=function(){return this._head&&this._head.value},F.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;0<=n;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):On(e,t)},F.prototype.pushAll=function(e){if(0===(e=L(e)).size)return this;C(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):On(t,n)},F.prototype.pop=function(){return this.slice(1)},F.prototype.unshift=function(){return this.push.apply(this,arguments)},F.prototype.unshiftAll=function(e){return this.pushAll(e)},F.prototype.shift=function(){return this.pop.apply(this,arguments)},F.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Pn()},F.prototype.slice=function(e,t){if(X(e,t,this.size))return this;var n=Q(e,this.size);if(ee(t,this.size)!==this.size)return Fe.prototype.slice.call(this,e,t);for(var e=this.size-n,r=this._head;n--;)r=r.next;return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):On(e,r)},F.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?On(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},F.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},F.prototype.__iterator=function(t,e){var n,r;return e?this.reverse().__iterator(t):(n=0,r=this._head,new h(function(){var e;return r?(e=r.value,r=r.next,d(t,n++,e)):m()}))},F.isStack=xn;var Cn,kn="@@__IMMUTABLE_STACK__@@",Dn=F.prototype;function On(e,t,n,r){var o=Object.create(Dn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Pn(){return Cn=Cn||On(0)}function Tn(t,n){function e(e){t.prototype[e]=n[e]}Object.keys(n).forEach(e),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(n).forEach(e)}Dn[kn]=!0,Dn.withMutations=a.withMutations,Dn.asMutable=a.asMutable,Dn.asImmutable=a.asImmutable,Dn.wasAltered=a.wasAltered,l.Iterator=h,Tn(l,{toArray:function(){C(this.size);var n=new Array(this.size||0);return this.valueSeq().__iterate(function(e,t){n[t]=e}),n},toIndexedSeq:function(){return new Ht(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Vt(this,!0)},toMap:function(){return k(this.toKeyedSeq())},toObject:function(){C(this.size);var n={};return this.__iterate(function(e,t){n[t]=e}),n},toOrderedMap:function(){return P(this.toKeyedSeq())},toOrderedSet:function(){return vn(c(this)?this.valueSeq():this)},toSet:function(){return I(c(this)?this.valueSeq():this)},toSetSeq:function(){return new Kt(this)},toSeq:function(){return p(this)?this.toIndexedSeq():c(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return F(c(this)?this.valueSeq():this)},toList:function(){return D(c(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return T(this,((e,t)=>{var n=c(e);if(0===(t=[e].concat(t).map(function(e){return u(e)?n&&(e=s(e)):e=n?we(e):xe(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size})).length)return e;if(1===t.length){var r=t[0];if(r===e||n&&c(r)||p(e)&&p(r))return r}return r=new ye(t),n?r=r.toKeyedSeq():p(e)||(r=r.toSetSeq()),(r=r.flatten(!0)).size=t.reduce(function(e,t){if(void 0!==e){t=t.size;if(void 0!==t)return e+t}},0),r})(this,N.call(arguments,0)))},includes:function(t){return this.some(function(e){return b(e,t)})},entries:function(){return this.__iterator(re)},every:function(r,o){C(this.size);var i=!0;return this.__iterate(function(e,t,n){if(!r.call(o,e,t,n))return i=!1}),i},filter:function(e,t){return T(this,Yt(this,e,t,!0))},find:function(e,t,n){e=this.findEntry(e,t);return e?e[1]:n},findEntry:function(r,o){var i;return this.__iterate(function(e,t,n){if(r.call(o,e,t,n))return!(i=[t,e])}),i},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return C(this.size),this.__iterate(t?e.bind(t):e)},join:function(t){C(this.size),t=void 0!==t?""+t:",";var n="",r=!0;return this.__iterate(function(e){r?r=!1:n+=t,n+=null!=e?e.toString():""}),n},keys:function(){return this.__iterator(ne)},map:function(e,t){return T(this,Gt(this,e,t))},reduce:function(r,e,o){var i,a;return C(this.size),arguments.length<2?a=!0:i=e,this.__iterate(function(e,t,n){i=a?(a=!1,e):r.call(o,i,e,t,n)}),i},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return T(this,qt(this,!0))},slice:function(e,t){return T(this,$t(this,e,t,!0))},some:function(e,t){return!this.every(Rn(e),t)},sort:function(e){return T(this,Xt(this,e))},values:function(){return this.__iterator(f)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return $(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return n=this,r=e,o=t,i=k().asMutable(),n.__iterate(function(e,t){i.update(r.call(o,e,t,n),0,function(e){return e+1})}),i.asImmutable();var n,r,o,i},equals:function(e){return Me(this,e)},entrySeq:function(){var e,t=this;return t._cache?new ye(t._cache):((e=t.toSeq().map(In).toIndexedSeq()).fromEntrySeq=function(){return t.toSeq()},e)},filterNot:function(e,t){return this.filter(Rn(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(Z)},flatMap:function(e,t){return T(this,(r=e,o=t,i=on(n=this),n.toSeq().map(function(e,t){return i(r.call(o,e,t,n))}).flatten(!0)));var n,r,o,i},flatten:function(e){return T(this,Zt(this,e,!0))},fromEntrySeq:function(){return new Ut(this)},get:function(n,e){return this.find(function(e,t){return b(t,n)},void 0,e)},getIn:function(e,t){for(var n,r=this,o=cn(e);!(n=o.next()).done;)if((r=r&&r.get?r.get(n.value,w):w)===w)return t;return r},groupBy:function(e,t){return o=e,i=t,a=c(r=this),s=(B(r)?P:k)().asMutable(),r.__iterate(function(t,n){s.update(o.call(i,t,n,r),function(e){return(e=e||[]).push(a?[n,t]:t),e})}),n=on(r),s.map(function(e){return T(r,n(e))});var r,o,i,a,s,n},has:function(e){return this.get(e,w)!==w},hasIn:function(e){return this.getIn(e,w)!==w},isSubset:function(t){return t="function"==typeof t.includes?t:l(t),this.every(function(e){return t.includes(e)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:l(e)).isSubset(this)},keySeq:function(){return this.toSeq().map(An).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return Qt(this,e)},maxBy:function(e,t){return Qt(this,t,e)},min:function(e){return Qt(this,e?Fn(e):jn)},minBy:function(e,t){return Qt(this,t?Fn(t):jn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return T(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return T(this,Jt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Rn(e),t)},sortBy:function(e,t){return T(this,Xt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return T(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return T(this,(s=e,l=t,(e=an(n=this)).__iterateUncached=function(r,e){var o,i=this;return e?this.cacheResult().__iterate(r,e):(o=0,n.__iterate(function(e,t,n){return s.call(l,e,t,n)&&++o&&r(e,t,i)}),o)},e.__iteratorUncached=function(r,e){var o,i,a=this;return e?this.cacheResult().__iterator(r,e):(o=n.__iterator(re,e),i=!0,new h(function(){var e,t,n;return i?(e=o.next()).done?e:(t=(n=e.value)[0],s.call(l,n=n[1],t,a)?r===re?e:d(r,t,n,e):(i=!1,m())):m()}))},e));var n,s,l},takeUntil:function(e,t){return this.takeWhile(Rn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=(e=>{var t,n,r;return e.size===1/0?0:(t=B(e),r=c(e),n=t?1:0,e=e.__iterate(r?t?function(e,t){n=31*n+Bn(x(e),x(t))|0}:function(e,t){n=n+Bn(x(e),x(t))|0}:t?function(e){n=31*n+x(e)|0}:function(e){n=n+x(e)|0}),r=Le(r=n,3432918353),r=Le(r<<15|r>>>-15,461845907),r=Le(r<<13|r>>>-13,5),r=Le((r=(r+3864292196|0)^e)^r>>>16,2246822507),r=je((r=Le(r^r>>>13,3266489909))^r>>>16))})(this))}});t=l.prototype;t[z]=!0,t[ae]=t.values,t.__toJS=t.toArray,t.__toStringMapper=Nn,t.inspect=t.toSource=function(){return this.toString()},t.chain=t.flatMap,t.contains=t.includes;try{Object.defineProperty(t,"length",{get:function(){if(!l.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(e){}Tn(s,{flip:function(){return T(this,Wt(this))},findKey:function(e,t){e=this.findEntry(e,t);return e&&e[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(t){return this.findKey(function(e){return b(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return b(e,t)})},mapEntries:function(n,r){var o=this,i=0;return T(this,this.toSeq().map(function(e,t){return n.call(r,[t,e],i++,o)}).fromEntrySeq())},mapKeys:function(n,r){var o=this;return T(this,this.toSeq().flip().map(function(e,t){return n.call(r,e,t,o)}).flip())}});var Mn=s.prototype;function An(e,t){return t}function In(e,t){return[t,e]}function Rn(e){return function(){return!e.apply(this,arguments)}}function Fn(e){return function(){return-e.apply(this,arguments)}}function Nn(e){return"string"==typeof e?JSON.stringify(e):e}function Ln(){return Y(arguments)}function jn(e,t){return e<t?1:t<e?-1:0}function Bn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Mn[V]=!0,Mn[ae]=t.entries,Mn.__toJS=t.toObject,Mn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Nn(e)},Tn(L,{toKeyedSeq:function(){return new Vt(this,!1)},filter:function(e,t){return T(this,Yt(this,e,t,!1))},findIndex:function(e,t){e=this.findEntry(e,t);return e?e[0]:-1},indexOf:function(e){e=this.toKeyedSeq().keyOf(e);return void 0===e?-1:e},lastIndexOf:function(e){e=this.toKeyedSeq().reverse().keyOf(e);return void 0===e?-1:e},reverse:function(){return T(this,qt(this,!1))},slice:function(e,t){return T(this,$t(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=Q(e,e<0?this.count():this.size);var r=this.slice(0,e);return T(this,1===n?r:r.concat(Y(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){e=this.toKeyedSeq().findLastKey(e,t);return void 0===e?-1:e},first:function(){return this.get(0)},flatten:function(e){return T(this,Zt(this,e,!1))},get:function(n,e){return(n=J(this,n))<0||this.size===1/0||void 0!==this.size&&n>this.size?e:this.find(function(e,t){return t===n},void 0,e)},has:function(e){return 0<=(e=J(this,e))&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return T(this,(a=e,(e=an(i=this)).size=i.size&&2*i.size-1,e.__iterateUncached=function(n,e){var r=this,o=0;return i.__iterate(function(e,t){return(!o||!1!==n(a,o++,r))&&!1!==n(e,o++,r)},e),o},e.__iteratorUncached=function(e,t){var n,r=i.__iterator(f,t),o=0;return new h(function(){return(!n||o%2)&&(n=r.next()).done?n:o%2?d(e,o++,a):d(e,o++,n.value,n)})},e));var i,a},interleave:function(){var e=[this].concat(Y(arguments)),t=tn(this.toSeq(),v.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),T(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return T(this,Jt(this,e,t,!1))},zip:function(){var e=[this].concat(Y(arguments));return T(this,tn(this,Ln,e))},zipWith:function(e){var t=Y(arguments);return T(t[0]=this,tn(this,e,t))}}),L.prototype[H]=!0,L.prototype[K]=!0,Tn(r,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),r.prototype.has=t.includes,Tn(g,s.prototype),Tn(v,L.prototype),Tn(fe,r.prototype),Tn(Re,s.prototype),Tn(Fe,L.prototype),Tn(Ne,r.prototype),{Iterable:l,Seq:n,Collection:Ie,Map:k,OrderedMap:P,List:D,Stack:F,Set:I,OrderedSet:vn,Record:M,Range:i,Repeat:o,is:b,fromJS:Oe}})()},function(e,t,n){var s=function(e){};e.exports=function(e,t){for(var n,r,o=arguments.length,i=new Array(2<o?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];if(s(t),!e)throw void 0===t?r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(n=0,(r=new Error(t.replace(/%s/g,function(){return String(i[n++])}))).name="Invariant Violation"),r.framesToPop=1,r}},function(e,t,n){function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){o(t,e,n[e])})}return t}function o(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var d=n(115),i=n(40),u=n(117),a=n(31),n=n(6),s=n.OrderedSet,l=n.Record,p=n.Stack,f=n.OrderedMap,h=n.List,m=l({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:p(),selection:null,treeMap:null,undoStack:p()}),c=(()=>{c.createEmpty=function(e){return this.createWithText("",e)},c.createWithText=function(e,t){return c.createWithContent(i.createFromText(e),t)},c.createWithContent=function(e,t){var n;return 0===e.getBlockMap().count()?c.createEmpty(t):(n=e.getBlockMap().first().getKey(),c.create({currentContent:e,undoStack:p(),redoStack:p(),decorator:t||null,selection:a.createEmpty(n)}))},c.create=function(e){var t=e.currentContent,e=r({},e,{treeMap:y(t,e.decorator),directionMap:u.getDirectionMap(t)});return new c(new m(e))},c.fromJS=function(e){return new c(new m(r({},e,{directionMap:null!=e.directionMap?f(e.directionMap):e.directionMap,inlineStyleOverride:null!=e.inlineStyleOverride?s(e.inlineStyleOverride):e.inlineStyleOverride,nativelyRenderedContent:null!=e.nativelyRenderedContent?i.fromJS(e.nativelyRenderedContent):e.nativelyRenderedContent,redoStack:null!=e.redoStack?p(e.redoStack.map(function(e){return i.fromJS(e)})):e.redoStack,selection:null!=e.selection?new a(e.selection):e.selection,treeMap:null!=e.treeMap?f(e.treeMap).map(function(e){return h(e).map(function(e){return d.fromJS(e)})}):e.treeMap,undoStack:null!=e.undoStack?p(e.undoStack.map(function(e){return i.fromJS(e)})):e.undoStack,currentContent:i.fromJS(e.currentContent)})))},c.set=function(f,h){return new c(f.getImmutable().withMutations(function(e){var t,n,r,o,i,a,s,l,c=e.get("decorator"),u=c,p=(null===h.decorator?u=null:h.decorator&&(u=h.decorator),h.currentContent||f.getCurrentContent());u!==c?(o=e.get("treeMap"),c=u&&c?(i=(t=p).getBlockMap(),n=u,r=c,o.merge(i.toSeq().filter(function(e){return n.getDecorations(e,t)!==r.getDecorations(e,t)}).map(function(e){return d.generate(t,e,n)}))):y(p,u),e.merge({decorator:u,treeMap:c,nativelyRenderedContent:null})):(p!==f.getCurrentContent()&&e.set("treeMap",(o=f,i=p.getBlockMap(),c=p.getEntityMap(),a=u,s=o.getCurrentContent().set("entityMap",c),l=s.getBlockMap(),o.getImmutable().get("treeMap").merge(i.toSeq().filter(function(e,t){return e!==l.get(t)}).map(function(e){return d.generate(s,e,a)})))),e.merge(h))}))};var e=c.prototype;function c(e){o(this,"_immutable",void 0),this._immutable=e}return e.toJS=function(){return this.getImmutable().toJS()},e.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},e.getCurrentContent=function(){return this.getImmutable().get("currentContent")},e.getUndoStack=function(){return this.getImmutable().get("undoStack")},e.getRedoStack=function(){return this.getImmutable().get("redoStack")},e.getSelection=function(){return this.getImmutable().get("selection")},e.getDecorator=function(){return this.getImmutable().get("decorator")},e.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},e.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},e.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},e.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},e.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},c.setInlineStyleOverride=function(e,t){return c.set(e,{inlineStyleOverride:t})},e.getCurrentInlineStyle=function(){var e,t,n,r,o,i=this.getInlineStyleOverride();return null!=i?i:(i=this.getCurrentContent(),(e=this.getSelection()).isCollapsed()?(n=i,o=(t=e).getStartKey(),t=t.getStartOffset(),r=n.getBlockForKey(o),0<t?r.getInlineStyleAt(t-1):r.getLength()?r.getInlineStyleAt(0):v(n,o)):(t=i,n=(r=e).getStartKey(),r=r.getStartOffset(),o=t.getBlockForKey(n),r<o.getLength()?o.getInlineStyleAt(r):0<r?o.getInlineStyleAt(r-1):v(t,n)))},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},c.acceptSelection=function(e,t){return g(e,t,!1)},c.forceSelection=function(e,t){return g(e,t=t.getHasFocus()?t:t.set("hasFocus",!0),!0)},c.moveSelectionToEnd=function(e){var t=e.getCurrentContent().getLastBlock(),n=t.getKey(),t=t.getLength();return c.acceptSelection(e,new a({anchorKey:n,anchorOffset:t,focusKey:n,focusOffset:t,isBackward:!1}))},c.moveFocusToEnd=function(e){e=c.moveSelectionToEnd(e);return c.forceSelection(e,e.getSelection())},c.push=function(e,t,n){var r,o,i,a,s,l=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];return e.getCurrentContent()===t?e:(r=u.getDirectionMap(t,e.getDirectionMap()),e.getAllowUndo()?(a=e.getSelection(),s=e.getCurrentContent(),o=e.getUndoStack(),i=t,a!==s.getSelectionAfter()||((e,t)=>(e=e.getLastChangeType(),t!==e||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t))(e,n)?(o=o.push(s),i=i.set("selectionBefore",a)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(i=i.set("selectionBefore",s.getSelectionBefore())),a=e.getInlineStyleOverride(),-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(a=null),s={currentContent:i,directionMap:r,undoStack:o,redoStack:p(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:l,inlineStyleOverride:a},c.set(e,s)):c.set(e,{currentContent:t,directionMap:r,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:l,inlineStyleOverride:null}))},c.undo=function(e){var t,n,r,o;return e.getAllowUndo()&&(n=(t=e.getUndoStack()).peek())?(r=e.getCurrentContent(),o=u.getDirectionMap(n,e.getDirectionMap()),c.set(e,{currentContent:n,directionMap:o,undoStack:t.shift(),redoStack:e.getRedoStack().push(r),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:r.getSelectionBefore()})):e},c.redo=function(e){var t,n,r,o;return e.getAllowUndo()&&(n=(t=e.getRedoStack()).peek())?(r=e.getCurrentContent(),o=u.getDirectionMap(n,e.getDirectionMap()),c.set(e,{currentContent:n,directionMap:o,undoStack:e.getUndoStack().push(r),redoStack:t.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})):e},e.getImmutable=function(){return this._immutable},c})();function g(e,t,n){return c.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function y(t,n){return t.getBlockMap().map(function(e){return d.generate(t,e,n)}).toOrderedMap()}function v(e,n){e=e.getBlockMap().reverse().skipUntil(function(e,t){return t===n}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return e?e.getInlineStyleAt(e.getLength()-1):s()}e.exports=c},function(e,t,n){var i=n(12),r=n(105),o=n(106),c=n(108),a=n(29),s=n(6),l=n(111),u=n(112),p=n(7),f=n(55),h=n(53),d=n(113),m=n(114),g=s.OrderedSet,y={replaceText:function(e,t,n,r,o){e=h(e,t),e=d(e,t),t=i.create({style:r||g(),entity:o||null});return u(e,e.getSelectionAfter(),n,t)},insertText:function(e,t,n,r,o){return t.isCollapsed()||p(!1),y.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=a(e,t),e=y.removeRange(e,t,"backward");return y.replaceWithFragment(e,n,r)},replaceWithFragment:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",e=h(e,t),e=d(e,t);return l(e,e.getSelectionAfter(),n,r)},removeRange:function(e,t,n){i=(t=t.getIsBackward()?t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1}):t).getAnchorKey(),l=t.getFocusKey(),r=e.getBlockForKey(i),o=e.getBlockForKey(l);var r,o,i,a=t.getStartOffset(),s=t.getEndOffset(),a=r.getEntityAt(a),s=o.getEntityAt(s-1);if(i===l&&(a&&a===s))return i=c(e.getEntityMap(),r,o,t,n),d(e,i);var l=h(e,t);return d(l,t)},splitBlock:function(e,t){e=h(e,t),e=d(e,t);return m(e,e.getSelectionAfter())},applyInlineStyle:function(e,t,n){return r.add(e,t,n)},removeInlineStyle:function(e,t,n){return r.remove(e,t,n)},setBlockType:function(e,t,n){return f(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return f(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return f(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,n){e=h(e,t);return o(e,t,n)}};e.exports=y},function(e,t,n){e.exports=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}},function(e,t,n){var r=n(124),o=n(127),i=n(128),n=n(129);function a(e,t,n,r){return e===n||!!n.startsWith(e)&&(n=n.slice(e.length),!!t)&&(n=r?r(n):n,o.contains(n,t))}function s(e){return"Windows"===r.platformName?e.replace(/^\s*NT/,""):e}e.exports=i({isBrowser:function(e){return a(r.browserName,r.browserFullVersion,e)},isBrowserArchitecture:function(e){return a(r.browserArchitecture,null,e)},isDevice:function(e){return a(r.deviceName,null,e)},isEngine:function(e){return a(r.engineName,r.engineVersion,e)},isPlatform:function(e){return a(r.platformName,r.platformFullVersion,e,s)},isPlatformArchitecture:function(e){return a(r.platformArchitecture,null,e)}},n)},function(e,t,n){var n=n(6),o=n.Map,i=n.OrderedSet,n=n.Record,a=i(),r={style:a,entity:null},n=(e=>{var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.getStyle=function(){return this.get("style")},r.getEntity=function(){return this.get("entity")},r.hasStyle=function(e){return this.getStyle().includes(e)},n.applyStyle=function(e,t){e=e.set("style",e.getStyle().add(t));return n.create(e)},n.removeStyle=function(e,t){e=e.set("style",e.getStyle().remove(t));return n.create(e)},n.applyEntity=function(e,t){e=e.getEntity()===t?e:e.set("entity",t);return n.create(e)},n.create=function(e){var t;return e?(e=o({style:a,entity:null}).merge(e),l.get(e)||(t=new n(e),l=l.set(e,t),t)):s},n.fromJS=function(e){var t=e.style,e=e.entity;return new n({style:Array.isArray(t)?i(t):t,entity:Array.isArray(e)?i(e):e})},n})(n(r)),s=new n,l=o([[o(r),s]]);n.EMPTY=s,e.exports=n},function(e,t,n){function o(e,t){return e.getStyle()===t.getStyle()}function i(e,t){return e.getEntity()===t.getEntity()}var a=n(12),s=n(26),n=n(6),l=n.List,r=n.Map,c=n.OrderedSet,u=n.Record,p=n.Repeat,f=c(),h={parent:null,characterList:l(),data:r(),depth:0,key:"",text:"",type:"unstyled",children:l(),prevSibling:null,nextSibling:null},n=(r=>{var e;function t(){var e,t,n;return r.call(this,((e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h)&&(t=e.characterList,n=e.text)&&!t&&(e.characterList=l(p(a.EMPTY,n.length))),e))||this}e=r,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){e=this.getCharacterList().get(e);return e?e.getStyle():f},n.getEntityAt=function(e){e=this.getCharacterList().get(e);return e?e.getEntity():null},n.getChildKeys=function(){return this.get("children")},n.getParentKey=function(){return this.get("parent")},n.getPrevSiblingKey=function(){return this.get("prevSibling")},n.getNextSiblingKey=function(){return this.get("nextSibling")},n.findStyleRanges=function(e,t){s(this.getCharacterList(),o,e,t)},n.findEntityRanges=function(e,t){s(this.getCharacterList(),i,e,t)},t})(u(h));e.exports=n},function(e,t){e.exports=ReactDOM},function(e,t,n){var r={},o=Math.pow(2,24);e.exports=function(){for(var e;void 0===e||r.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*o).toString(32);return r[e]=!0,e}},function(e,t,n){e.exports={encode:function(e,t,n){return e+"-"+t+"-"+n},decode:function(e){var e=e.split("-").reverse(),t=e[0],n=e[1];return{blockKey:e.slice(2).reverse().join("-"),decoratorKey:parseInt(n,10),leafKey:parseInt(t,10)}}}},function(e,t,n){e.exports=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX||!window.__DRAFT_GKX[e])}},function(e,t,n){
44
+ r={}.hasOwnProperty,e.exports?e.exports=o.default=o:void 0!==(t=function(){return o}.apply(t,[]))&&(e.exports=t)},function(e,t,n){e.exports=(()=>{var r=Array.prototype.slice;function e(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function l(e){return u(e)?e:n(e)}function s(e){return c(e)?e:pe(e)}function N(e){return p(e)?e:g(e)}function o(e){return u(e)&&!L(e)?e:fe(e)}function u(e){return!(!e||!e[B])}function c(e){return!(!e||!e[z])}function p(e){return!(!e||!e[V])}function L(e){return c(e)||p(e)}function j(e){return!(!e||!e[H])}e(s,l),e(N,l),e(o,l),l.isIterable=u,l.isKeyed=c,l.isIndexed=p,l.isAssociative=L,l.isOrdered=j,l.Keyed=s,l.Indexed=N,l.Set=o;var B="@@__IMMUTABLE_ITERABLE__@@",z="@@__IMMUTABLE_KEYED__@@",V="@@__IMMUTABLE_INDEXED__@@",H="@@__IMMUTABLE_ORDERED__@@",t="delete",_=5,S=1<<_,E=S-1,w={},K={value:!1},U={value:!1};function W(e){return e.value=!1,e}function y(e){e&&(e.value=!0)}function G(){}function q(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function Y(e){return void 0===e.size&&(e.size=e.__iterate(J)),e.size}function $(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295==n)return NaN;t=n}return t<0?Y(e)+t:t}function J(){return!0}function Z(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&n<=t)}function X(e,t){return ee(e,t,0)}function Q(e,t){return ee(e,t,t)}function ee(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var te=0,f=1,ne=2,re="function"==typeof Symbol&&Symbol.iterator,oe="@@iterator",ie=re||oe;function h(e){this.next=e}function d(e,t,n,r){e=0===e?t:1===e?n:[t,n];return r?r.value=e:r={value:e,done:!1},r}function m(){return{value:void 0,done:!0}}function ae(e){return ce(e)}function se(e){return e&&"function"==typeof e.next}function le(e){var t=ce(e);return t&&t.call(e)}function ce(e){e=e&&(re&&e[re]||e[oe]);if("function"==typeof e)return e}function ue(e){return e&&"number"==typeof e.length}function n(e){{if(null==e)return Ee();if(u(e))return e.toSeq();var t=Ce(e)||"object"==typeof e&&new ve(e);if(t)return t;throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e)}}function pe(e){return null==e?Ee().toKeyedSeq():u(e)?c(e)?e.toSeq():e.fromEntrySeq():we(e)}function g(e){return null==e?Ee():u(e)?c(e)?e.entrySeq():e.toIndexedSeq():xe(e)}function fe(e){return(null==e?Ee():u(e)?c(e)?e.entrySeq():e:xe(e)).toSetSeq()}h.prototype.toString=function(){return"[Iterator]"},h.KEYS=te,h.VALUES=f,h.ENTRIES=ne,h.prototype.inspect=h.prototype.toSource=function(){return this.toString()},h.prototype[ie]=function(){return this},e(n,l),n.of=function(){return n(arguments)},n.prototype.toSeq=function(){return this},n.prototype.toString=function(){return this.__toString("Seq {","}")},n.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},n.prototype.__iterate=function(e,t){return ke(this,e,t,!0)},n.prototype.__iterator=function(e,t){return De(this,e,t,!0)},e(pe,n),pe.prototype.toKeyedSeq=function(){return this},e(g,n),g.of=function(){return g(arguments)},g.prototype.toIndexedSeq=function(){return this},g.prototype.toString=function(){return this.__toString("Seq [","]")},g.prototype.__iterate=function(e,t){return ke(this,e,t,!1)},g.prototype.__iterator=function(e,t){return De(this,e,t,!1)},e(fe,n),fe.of=function(){return fe(arguments)},fe.prototype.toSetSeq=function(){return this},n.isSeq=Se,n.Keyed=pe,n.Set=fe,n.Indexed=g;var he,de,me,ge="@@__IMMUTABLE_SEQ__@@";function ye(e){this._array=e,this.size=e.length}function ve(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function be(e){this._iterable=e,this.size=e.length||e.size}function _e(e){this._iterator=e,this._iteratorCache=[]}function Se(e){return!(!e||!e[ge])}function Ee(){return he=he||new ye([])}function we(e){var t=Array.isArray(e)?new ye(e).fromEntrySeq():se(e)?new _e(e).fromEntrySeq():ae(e)?new be(e).fromEntrySeq():"object"==typeof e?new ve(e):void 0;if(t)return t;throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e)}function xe(e){var t=Ce(e);if(t)return t;throw new TypeError("Expected Array or iterable object of values: "+e)}function Ce(e){return ue(e)?new ye(e):se(e)?new _e(e):ae(e)?new be(e):void 0}function ke(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var s=o[n?i-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function De(e,t,n,r){var o,i,a=e._cache;return a?(o=a.length-1,i=0,new h(function(){var e=a[n?o-i:i];return i++>o?m():d(t,r?e[0]:i-1,e[1])})):e.__iteratorUncached(t,n)}function Oe(e,t){return t?function n(r,o,e,t){if(Array.isArray(o))return r.call(t,e,g(o).map(function(e,t){return n(r,e,t,o)}));if(Te(o))return r.call(t,e,pe(o).map(function(e,t){return n(r,e,t,o)}));return o}(t,e,"",{"":e}):Pe(e)}function Pe(e){return Array.isArray(e)?g(e).map(Pe).toList():Te(e)?pe(e).map(Pe).toMap():e}function Te(e){return e&&(e.constructor===Object||void 0===e.constructor)}function v(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Me(n,e){var r,o,i,a,t;return n===e||!(!u(e)||void 0!==n.size&&void 0!==e.size&&n.size!==e.size||void 0!==n.__hash&&void 0!==e.__hash&&n.__hash!==e.__hash||c(n)!==c(e)||p(n)!==p(e)||j(n)!==j(e))&&(0===n.size&&0===e.size||(r=!L(n),j(n)?(o=n.entries(),e.every(function(e,t){var n=o.next().value;return n&&v(n[1],e)&&(r||v(n[0],t))})&&o.next().done):(i=!1,void 0===n.size&&(void 0===e.size?"function"==typeof n.cacheResult&&n.cacheResult():(i=!0,t=n,n=e,e=t)),a=!0,t=e.__iterate(function(e,t){if(r?!n.has(e):i?!v(e,n.get(t,w)):!v(n.get(t,w),e))return a=!1}),a&&n.size===t)))}function i(e,t){if(!(this instanceof i))return new i(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(de)return de;de=this}}function Ae(e,t){if(!e)throw new Error(t)}function a(e,t,n){if(!(this instanceof a))return new a(e,t,n);if(Ae(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(me)return me;me=this}}function Ie(){throw TypeError("Abstract")}function Re(){}function Fe(){}function Ne(){}n.prototype[ge]=!0,e(ye,g),ye.prototype.get=function(e,t){return this.has(e)?this._array[$(this,e)]:t},ye.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===e(n[t?r-o:o],o,this))return o+1;return o},ye.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,o=0;return new h(function(){return r<o?m():d(e,o,n[t?r-o++:o++])})},e(ve,pe),ve.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ve.prototype.has=function(e){return this._object.hasOwnProperty(e)},ve.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},ve.prototype.__iterator=function(t,n){var r=this._object,o=this._keys,i=o.length-1,a=0;return new h(function(){var e=o[n?i-a:a];return a++>i?m():d(t,e,r[e])})},ve.prototype[H]=!0,e(be,g),be.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n,r=le(this._iterable),o=0;if(se(r))for(;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},be.prototype.__iteratorUncached=function(t,e){var n,r;return e?this.cacheResult().__iterator(t,e):se(n=le(this._iterable))?(r=0,new h(function(){var e=n.next();return e.done?e:d(t,r++,e.value)})):new h(m)},e(_e,g),_e.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,o=0;o<r.length;)if(!1===e(r[o],o++,this))return o;for(;!(i=n.next()).done;){var i=i.value;if(!1===e(r[o]=i,o++,this))break}return o},_e.prototype.__iteratorUncached=function(t,e){var n,r,o;return e?this.cacheResult().__iterator(t,e):(n=this._iterator,r=this._iteratorCache,o=0,new h(function(){if(o>=r.length){var e=n.next();if(e.done)return e;r[o]=e.value}return d(t,o,r[o++])}))},e(i,g),i.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},i.prototype.get=function(e,t){return this.has(e)?this._value:t},i.prototype.includes=function(e){return v(this._value,e)},i.prototype.slice=function(e,t){var n=this.size;return Z(e,t,n)?this:new i(this._value,Q(t,n)-X(e,n))},i.prototype.reverse=function(){return this},i.prototype.indexOf=function(e){return v(this._value,e)?0:-1},i.prototype.lastIndexOf=function(e){return v(this._value,e)?this.size:-1},i.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},i.prototype.__iterator=function(e,t){var n=this,r=0;return new h(function(){return r<n.size?d(e,r++,n._value):m()})},i.prototype.equals=function(e){return e instanceof i?v(this._value,e._value):Me(e)},e(a,g),a.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},a.prototype.get=function(e,t){return this.has(e)?this._start+$(this,e)*this._step:t},a.prototype.includes=function(e){e=(e-this._start)/this._step;return 0<=e&&e<this.size&&e===Math.floor(e)},a.prototype.slice=function(e,t){return Z(e,t,this.size)?this:(e=X(e,this.size),(t=Q(t,this.size))<=e?new a(0,0):new a(this.get(e,this._end),this.get(t,this._end),this._step))},a.prototype.indexOf=function(e){e-=this._start;if(e%this._step==0){e=e/this._step;if(0<=e&&e<this.size)return e}return-1},a.prototype.lastIndexOf=function(e){return this.indexOf(e)},a.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;i<=n;i++){if(!1===e(o,i,this))return i+1;o+=t?-r:r}return i},a.prototype.__iterator=function(t,n){var r=this.size-1,o=this._step,i=n?this._start+r*o:this._start,a=0;return new h(function(){var e=i;return i+=n?-o:o,r<a?m():d(t,a++,e)})},a.prototype.equals=function(e){return e instanceof a?this._start===e._start&&this._end===e._end&&this._step===e._step:Me(this,e)},e(Ie,l),e(Re,Ie),e(Fe,Ie),e(Ne,Ie),Ie.Keyed=Re,Ie.Indexed=Fe,Ie.Set=Ne;var Le="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function je(e){return e>>>1&1073741824|3221225471&e}function x(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"==t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);4294967295<e;)n^=e/=4294967295;return je(n)}if("string"==t)return(e.length>Ge?e=>{var t=$e[e];return void 0===t&&(t=Be(e),Ye===qe&&(Ye=0,$e={}),Ye++,$e[e]=t),t}:Be)(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"==t){var r,o=e;if((!Ke||void 0===(r=He.get(o)))&&void 0===(r=o[We])){if(!Ve){if(void 0!==(r=o.propertyIsEnumerable&&o.propertyIsEnumerable[We]))return r;if(void 0!==(r=(e=>{if(e&&0<e.nodeType)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}})(o)))return r}if(r=++Ue,1073741824&Ue&&(Ue=0),Ke)He.set(o,r);else{if(void 0!==ze&&!1===ze(o))throw new Error("Non-extensible objects are not allowed as keys.");if(Ve)Object.defineProperty(o,We,{enumerable:!1,configurable:!1,writable:!1,value:r});else if(void 0!==o.propertyIsEnumerable&&o.propertyIsEnumerable===o.constructor.prototype.propertyIsEnumerable)o.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},o.propertyIsEnumerable[We]=r;else{if(void 0===o.nodeType)throw new Error("Unable to set a non-enumerable property on object.");o[We]=r}}}return r}if("function"==typeof e.toString)return Be(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Be(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return je(t)}var ze=Object.isExtensible,Ve=(()=>{try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}})();var He,Ke="function"==typeof WeakMap,Ue=(Ke&&(He=new WeakMap),0),We="__immutablehash__",Ge=("function"==typeof Symbol&&(We=Symbol(We)),16),qe=255,Ye=0,$e={};function b(e){Ae(e!==1/0,"Cannot perform this action with an infinite size.")}function C(t){return null==t?lt():Je(t)&&!j(t)?t:lt().withMutations(function(n){var e=s(t);b(e.size),e.forEach(function(e,t){return n.set(t,e)})})}function Je(e){return!(!e||!e[Xe])}e(C,Re),C.of=function(){var n=r.call(arguments,0);return lt().withMutations(function(e){for(var t=0;t<n.length;t+=2){if(t+1>=n.length)throw new Error("Missing value for key: "+n[t]);e.set(n[t],n[t+1])}})},C.prototype.toString=function(){return this.__toString("Map {","}")},C.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},C.prototype.set=function(e,t){return ct(this,e,t)},C.prototype.setIn=function(e,t){return this.updateIn(e,w,function(){return t})},C.prototype.remove=function(e){return ct(this,e,w)},C.prototype.deleteIn=function(e){return this.updateIn(e,function(){return w})},C.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},C.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);e=function e(t,n,r,o){var i=t===w;var a=n.next();if(a.done)return(l=o(s=i?r:t))===s?t:l;Ae(i||t&&t.set,"invalid keyPath");var s=a.value;var l=i?w:t.get(s,w);a=e(l,n,r,o);return a===l?t:a===w?t.remove(s):(i?lt():t).set(s,a)}(this,cn(e),t,n);return e===w?void 0:e},C.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):lt()},C.prototype.merge=function(){return ht(this,void 0,arguments)},C.prototype.mergeWith=function(e){return ht(this,e,r.call(arguments,1))},C.prototype.mergeIn=function(e){var t=r.call(arguments,1);return this.updateIn(e,lt(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},C.prototype.mergeDeep=function(){return ht(this,dt,arguments)},C.prototype.mergeDeepWith=function(e){return ht(this,mt(e),r.call(arguments,1))},C.prototype.mergeDeepIn=function(e){var t=r.call(arguments,1);return this.updateIn(e,lt(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},C.prototype.sort=function(e){return P(Xt(this,e))},C.prototype.sortBy=function(e,t){return P(Xt(this,t,e))},C.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},C.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new G)},C.prototype.asImmutable=function(){return this.__ensureOwner()},C.prototype.wasAltered=function(){return this.__altered},C.prototype.__iterator=function(e,t){return new ot(this,e,t)},C.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},C.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?st(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},C.isMap=Je;var Ze,Xe="@@__IMMUTABLE_MAP__@@",k=C.prototype;function Qe(e,t){this.ownerID=e,this.entries=t}function et(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function tt(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function nt(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function rt(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function ot(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&at(e._root)}function it(e,t){return d(e,t[0],t[1])}function at(e,t){return{node:e,index:0,__prev:t}}function st(e,t,n,r){var o=Object.create(k);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function lt(){return Ze=Ze||st(0)}function ct(e,t,n){if(e._root){var r=W(K),o=W(U),i=ut(e._root,e.__ownerID,0,void 0,t,n,r,o);if(!o.value)return e;o=e.size+(r.value?n===w?-1:1:0)}else{if(n===w)return e;o=1,i=new Qe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=i,e.__hash=void 0,e.__altered=!0,e):i?st(o,i):lt()}function ut(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===w?e:(y(s),y(a),new rt(t,r,[o,i]))}function pt(e){return e.constructor===rt||e.constructor===nt}function ft(e,t,n,r,o){var i,a;return e.keyHash===r?new nt(t,r,[e.entry,o]):new et(t,1<<(i=(0===n?e.keyHash:e.keyHash>>>n)&E)|1<<(a=(0===n?r:r>>>n)&E),i==a?[ft(e,t,n+_,r,o)]:(n=new rt(t,r,o),i<a?[e,n]:[n,e]))}function ht(e,t,n){for(var r=[],o=0;o<n.length;o++){var i=n[o],a=s(i);u(i)||(a=a.map(function(e){return Oe(e)})),r.push(a)}return gt(e,t,r)}function dt(e,t,n){return e&&e.mergeDeep&&u(t)?e.mergeDeep(t):v(e,t)?e:t}function mt(r){return function(e,t,n){return e&&e.mergeDeepWith&&u(t)?e.mergeDeepWith(r,t):v(e,t=r(e,t,n))?e:t}}function gt(e,o,n){return 0===(n=n.filter(function(e){return 0!==e.size})).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations(function(r){for(var e=o?function(t,n){r.update(n,w,function(e){return e===w?t:o(e,t,n)})}:function(e,t){r.set(t,e)},t=0;t<n.length;t++)n[t].forEach(e)}):e.constructor(n[0])}function yt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,127&(e=(e+=e>>8)+(e>>16))}function vt(e,t,n,r){r=r?e:q(e);return r[t]=n,r}k[Xe]=!0,k[t]=k.remove,k.removeIn=k.deleteIn,Qe.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(v(n,o[i][0]))return o[i][1];return r},Qe.prototype.update=function(e,t,n,r,o,i,a){for(var s=o===w,l=this.entries,c=0,u=l.length;c<u&&!v(r,l[c][0]);c++);var p=c<u;if(p?l[c][1]===o:s)return this;if(y(a),!s&&p||y(i),!s||1!==l.length){if(!p&&!s&&l.length>=bt){for(var f=e,h=l,a=r,i=o,d=new rt(f=f||new G,x(a),[a,i]),m=0;m<h.length;m++)var g=h[m],d=d.update(f,0,void 0,g[0],g[1]);return d}a=e&&e===this.ownerID,i=a?l:q(l);return p?s?c===u-1?i.pop():i[c]=i.pop():i[c]=[r,o]:i.push([r,o]),a?(this.entries=i,this):new Qe(e,i)}},et.prototype.get=function(e,t,n,r){void 0===t&&(t=x(n));var o=1<<((0===e?t:t>>>e)&E),i=this.bitmap;return 0==(i&o)?r:this.nodes[yt(i&o-1)].get(e+_,t,n,r)},et.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=x(r));var s=(0===t?n:n>>>t)&E,l=1<<s,c=this.bitmap,u=0!=(c&l);if(!u&&o===w)return this;var p=yt(c&l-1),f=this.nodes,h=u?f[p]:void 0,t=ut(h,e,t+_,n,r,o,i,a);if(t===h)return this;if(!u&&t&&f.length>=_t){for(var n=e,d=f,m=c,r=s,o=t,g=0,y=new Array(S),v=0;0!==m;v++,m>>>=1)y[v]=1&m?d[g++]:void 0;return y[r]=o,new tt(n,g+1,y)}return u&&!t&&2===f.length&&pt(f[1^p])?f[1^p]:u&&t&&1===f.length&&pt(t)?t:(i=e&&e===this.ownerID,a=u?t?c:c^l:c|l,h=u?t?vt(f,p,t,i):((e,t,n)=>{var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a<r;a++)o[a]=e[a+(i=a===t?1:i)];return o})(f,p,i):((e,t,n,r)=>{var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var i=new Array(o),a=0,s=0;s<o;s++)s===t?(i[s]=n,a=-1):i[s]=e[s+a];return i})(f,p,t,i),i?(this.bitmap=a,this.nodes=h,this):new et(e,a,h))},tt.prototype.get=function(e,t,n,r){void 0===t&&(t=x(n));var o=this.nodes[(0===e?t:t>>>e)&E];return o?o.get(e+_,t,n,r):r},tt.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=x(r));var s=(0===t?n:n>>>t)&E,l=o===w,c=this.nodes,u=c[s];if(l&&!u)return this;l=ut(u,e,t+_,n,r,o,i,a);if(l===u)return this;t=this.count;if(u){if(!l&&--t<St){for(var n=e,p=c,f=s,h=0,d=0,m=new Array(t),g=0,y=1,v=p.length;g<v;g++,y<<=1){var b=p[g];void 0!==b&&g!==f&&(h|=y,m[d++]=b)}return new et(n,h,m)}}else t++;r=e&&e===this.ownerID,o=vt(c,s,l,r);return r?(this.count=t,this.nodes=o,this):new tt(e,t,o)},nt.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(v(n,o[i][0]))return o[i][1];return r},nt.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=x(r));var s=o===w;if(n!==this.keyHash)return s?this:(y(a),y(i),ft(this,e,t,n,[r,o]));for(var l=this.entries,c=0,u=l.length;c<u&&!v(r,l[c][0]);c++);t=c<u;return(t?l[c][1]===o:s)?this:(y(a),!s&&t||y(i),s&&2===u?new rt(e,this.keyHash,l[1^c]):(a=(n=e&&e===this.ownerID)?l:q(l),t?s?c===u-1?a.pop():a[c]=a.pop():a[c]=[r,o]:a.push([r,o]),n?(this.entries=a,this):new nt(e,this.keyHash,a)))},rt.prototype.get=function(e,t,n,r){return v(n,this.entry[0])?this.entry[1]:r},rt.prototype.update=function(e,t,n,r,o,i,a){var s=o===w,l=v(r,this.entry[0]);return(l?o===this.entry[1]:s)?this:(y(a),s?void y(i):l?e&&e===this.ownerID?(this.entry[1]=o,this):new rt(e,this.keyHash,[r,o]):(y(i),ft(this,e,t,x(r),[r,o])))},Qe.prototype.iterate=nt.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},et.prototype.iterate=tt.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&!1===i.iterate(e,t))return!1}},rt.prototype.iterate=function(e,t){return e(this.entry)},e(ot,h),ot.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,o=t.index++;if(r.entry){if(0==o)return it(e,r.entry)}else if(r.entries){if(o<=(n=r.entries.length-1))return it(e,r.entries[this._reverse?n-o:o])}else if(o<=(n=r.nodes.length-1)){r=r.nodes[this._reverse?n-o:o];if(r){if(r.entry)return it(e,r.entry);t=this._stack=at(r,t)}continue}t=this._stack=this._stack.__prev}return m()};var bt=S/4,_t=S/2,St=S/4;function D(e){var t,r,n=Tt();return null==e?n:Et(e)?e:(t=N(e),0===(r=t.size)?n:(b(r),0<r&&r<S?Pt(0,r,_,null,new xt(t.toArray())):n.withMutations(function(n){n.setSize(r),t.forEach(function(e,t){return n.set(t,e)})})))}function Et(e){return!(!e||!e[wt])}e(D,Fe),D.of=function(){return this(arguments)},D.prototype.toString=function(){return this.__toString("List [","]")},D.prototype.get=function(e,t){var n;return 0<=(e=$(this,e))&&e<this.size?(n=It(this,e+=this._origin))&&n.array[e&E]:t},D.prototype.set=function(e,t){var n=this,r=e,o=t;if((r=$(n,r))!==r)return n;if(r>=n.size||r<0)return n.withMutations(function(e){r<0?Rt(e,r).set(0,o):Rt(e,0,r+1).set(r,o)});r+=n._origin;var e=n._tail,t=n._root,i=W(U);return r>=Nt(n._capacity)?e=Mt(e,n.__ownerID,0,r,o,i):t=Mt(t,n.__ownerID,n._level,r,o,i),i.value?n.__ownerID?(n._root=t,n._tail=e,n.__hash=void 0,n.__altered=!0,n):Pt(n._origin,n._capacity,n._level,t,e):n},D.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},D.prototype.insert=function(e,t){return this.splice(e,0,t)},D.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=_,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Tt()},D.prototype.push=function(){var n=arguments,r=this.size;return this.withMutations(function(e){Rt(e,0,r+n.length);for(var t=0;t<n.length;t++)e.set(r+t,n[t])})},D.prototype.pop=function(){return Rt(this,0,-1)},D.prototype.unshift=function(){var n=arguments;return this.withMutations(function(e){Rt(e,-n.length);for(var t=0;t<n.length;t++)e.set(t,n[t])})},D.prototype.shift=function(){return Rt(this,1)},D.prototype.merge=function(){return Ft(this,void 0,arguments)},D.prototype.mergeWith=function(e){return Ft(this,e,r.call(arguments,1))},D.prototype.mergeDeep=function(){return Ft(this,dt,arguments)},D.prototype.mergeDeepWith=function(e){return Ft(this,mt(e),r.call(arguments,1))},D.prototype.setSize=function(e){return Rt(this,0,e)},D.prototype.slice=function(e,t){var n=this.size;return Z(e,t,n)?this:Rt(this,X(e,n),Q(t,n))},D.prototype.__iterator=function(t,e){var n=0,r=Ot(this,e);return new h(function(){var e=r();return e===Dt?m():d(t,n++,e)})},D.prototype.__iterate=function(e,t){for(var n,r=0,o=Ot(this,t);(n=o())!==Dt&&!1!==e(n,r++,this););return r},D.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Pt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},D.isList=Et;var wt="@@__IMMUTABLE_LIST__@@",O=D.prototype;function xt(e,t){this.array=e,this.ownerID=t}O[wt]=!0,O[t]=O.remove,O.setIn=k.setIn,O.deleteIn=O.removeIn=k.removeIn,O.update=k.update,O.updateIn=k.updateIn,O.mergeIn=k.mergeIn,O.mergeDeepIn=k.mergeDeepIn,O.withMutations=k.withMutations,O.asMutable=k.asMutable,O.asImmutable=k.asImmutable,O.wasAltered=k.wasAltered,xt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&E;if(r>=this.array.length)return new xt([],e);var o=0==r;if(0<t){var i,a=this.array[r];if((i=a&&a.removeBefore(e,t-_,n))===a&&o)return this}if(o&&!i)return this;var s=At(this,e);if(!o)for(var l=0;l<r;l++)s.array[l]=void 0;return i&&(s.array[r]=i),s},xt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r=n-1>>>t&E;if(r>=this.array.length)return this;if(0<t){var o,i=this.array[r];if((o=i&&i.removeAfter(e,t-_,n))===i&&r==this.array.length-1)return this}t=At(this,e);return t.array.splice(1+r),o&&(t.array[r]=o),t};var Ct,kt,Dt={};function Ot(e,d){var m=e._origin,g=e._capacity,y=Nt(g),v=e._tail;return b(e._root,e._level,0);function b(e,t,n){var r,o,i,a,s,l,c,u,p,f,h;return 0===t?(s=e,o=(r=n)===y?v&&v.array:s&&s.array,i=m<r?0:m-r,S<(a=g-r)&&(a=S),function(){var e;return i===a?Dt:(e=d?--a:i++,o&&o[e])}):(l=t,c=n,p=(s=e)&&s.array,f=m<c?0:m-c>>l,S<(h=1+(g-c>>l))&&(h=S),function(){for(;;){if(u){var e=u();if(e!==Dt)return e;u=null}if(f===h)return Dt;e=d?--h:f++;u=b(p&&p[e],l-_,c+(e<<l))}})}}function Pt(e,t,n,r,o,i,a){var s=Object.create(O);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=o,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function Tt(){return Ct=Ct||Pt(0,0,_)}function Mt(e,t,n,r,o,i){var a,s,l=r>>>n&E,c=e&&l<e.array.length;return c||void 0!==o?0<n?(n=Mt(s=e&&e.array[l],t,n-_,r,o,i))===s?e:((a=At(e,t)).array[l]=n,a):c&&e.array[l]===o?e:(y(i),a=At(e,t),void 0===o&&l==a.array.length-1?a.array.pop():a.array[l]=o,a):e}function At(e,t){return t&&e&&t===e.ownerID?e:new xt(e?e.array.slice():[],t)}function It(e,t){if(t>=Nt(e._capacity))return e._tail;if(t<1<<e._level+_){for(var n=e._root,r=e._level;n&&0<r;)n=n.array[t>>>r&E],r-=_;return n}}function Rt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new G,o=e._origin,i=e._capacity,a=o+t,t=void 0===n?i:n<0?i+n:o+n;if(a===o&&t===i)return e;if(t<=a)return e.clear();for(var s=e._level,l=e._root,c=0;a+c<0;)l=new xt(l&&l.array.length?[void 0,l]:[],r),c+=1<<(s+=_);c&&(a+=c,o+=c,t+=c,i+=c);for(var u=Nt(i),p=Nt(t);1<<s+_<=p;)l=new xt(l&&l.array.length?[l]:[],r),s+=_;var n=e._tail,f=p<u?It(e,t-1):u<p?new xt([],r):n;if(n&&u<p&&a<i&&n.array.length){for(var h=l=At(l,r),d=s;_<d;d-=_)var m=u>>>d&E,h=h.array[m]=At(h.array[m],r);h.array[u>>>_&E]=n}if(t<i&&(f=f&&f.removeAfter(r,0,t)),p<=a)a-=p,t-=p,s=_,l=null,f=f&&f.removeBefore(r,0,a);else if(o<a||p<u){for(c=0;l;){var g=a>>>s&E;if(g!=p>>>s&E)break;g&&(c+=(1<<s)*g),s-=_,l=l.array[g]}(l=l&&o<a?l.removeBefore(r,s,a-c):l)&&p<u&&(l=l.removeAfter(r,s,p-c)),c&&(a-=c,t-=c)}return e.__ownerID?(e.size=t-a,e._origin=a,e._capacity=t,e._level=s,e._root=l,e._tail=f,e.__hash=void 0,e.__altered=!0,e):Pt(a,t,s,l,f)}function Ft(e,t,n){for(var r=[],o=0,i=0;i<n.length;i++){var a=n[i],s=N(a);s.size>o&&(o=s.size),u(a)||(s=s.map(function(e){return Oe(e)})),r.push(s)}return gt(e=o>e.size?e.setSize(o):e,t,r)}function Nt(e){return e<S?0:e-1>>>_<<_}function P(t){return null==t?Bt():Lt(t)?t:Bt().withMutations(function(n){var e=s(t);b(e.size),e.forEach(function(e,t){return n.set(t,e)})})}function Lt(e){return Je(e)&&j(e)}function jt(e,t,n,r){var o=Object.create(P.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function Bt(){return kt=kt||jt(lt(),Tt())}function zt(e,t,n){var r,o,i=e._map,a=e._list,s=i.get(t),l=void 0!==s;if(n===w){if(!l)return e;a.size>=S&&a.size>=2*i.size?(r=(o=a.filter(function(e,t){return void 0!==e&&s!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=i,o=a.set(s,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):jt(r,o)}function Vt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Ht(e){this._iter=e,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Ut(e){this._iter=e,this.size=e.size}function Wt(o){var e=an(o);return e._iter=o,e.size=o.size,e.flip=function(){return o},e.reverse=function(){var e=o.reverse.apply(this);return e.flip=function(){return o.reverse()},e},e.has=function(e){return o.includes(e)},e.includes=function(e){return o.has(e)},e.cacheResult=sn,e.__iterateUncached=function(n,e){var r=this;return o.__iterate(function(e,t){return!1!==n(t,e,r)},e)},e.__iteratorUncached=function(e,t){var n;return e===ne?(n=o.__iterator(e,t),new h(function(){var e,t=n.next();return t.done||(e=t.value[0],t.value[0]=t.value[1],t.value[1]=e),t})):o.__iterator(e===f?te:f,t)},e}function Gt(i,a,s){var e=an(i);return e.size=i.size,e.has=function(e){return i.has(e)},e.get=function(e,t){var n=i.get(e,w);return n===w?t:a.call(s,n,e,i)},e.__iterateUncached=function(r,e){var o=this;return i.__iterate(function(e,t,n){return!1!==r(a.call(s,e,t,n),t,o)},e)},e.__iteratorUncached=function(r,e){var o=i.__iterator(ne,e);return new h(function(){var e,t,n=o.next();return n.done?n:(t=(e=n.value)[0],d(r,t,a.call(s,e[1],t,i),n))})},e}function qt(o,n){var e=an(o);return e._iter=o,e.size=o.size,e.reverse=function(){return o},o.flip&&(e.flip=function(){var e=Wt(o);return e.reverse=function(){return o.flip()},e}),e.get=function(e,t){return o.get(n?e:-1-e,t)},e.has=function(e){return o.has(n?e:-1-e)},e.includes=function(e){return o.includes(e)},e.cacheResult=sn,e.__iterate=function(n,e){var r=this;return o.__iterate(function(e,t){return n(e,t,r)},!e)},e.__iterator=function(e,t){return o.__iterator(e,!t)},e}function Yt(a,s,l,c){var e=an(a);return c&&(e.has=function(e){var t=a.get(e,w);return t!==w&&!!s.call(l,t,e,a)},e.get=function(e,t){var n=a.get(e,w);return n!==w&&s.call(l,n,e,a)?n:t}),e.__iterateUncached=function(r,e){var o=this,i=0;return a.__iterate(function(e,t,n){if(s.call(l,e,t,n))return i++,r(e,c?t:i-1,o)},e),i},e.__iteratorUncached=function(r,e){var o=a.__iterator(ne,e),i=0;return new h(function(){for(;;){var e=o.next();if(e.done)return e;var t=e.value,n=t[0],t=t[1];if(s.call(l,t,n,a))return d(r,c?n:i++,t,e)}})},e}function $t(s,e,t,l){var c,u,n=s.size;return void 0!==e&&(e|=0),void 0!==t&&(t===1/0?t=n:t|=0),Z(e,t,n)?s:(c=X(e,n),n=Q(t,n),c!=c||n!=n?$t(s.toSeq().cacheResult(),e,t,l):((e=n-c)==e&&(u=e<0?0:e),(t=an(s)).size=0===u?u:s.size&&u||void 0,!l&&Se(s)&&0<=u&&(t.get=function(e,t){return 0<=(e=$(this,e))&&e<u?s.get(e+c,t):t}),t.__iterateUncached=function(n,e){var r,o,i,a=this;return 0===u?0:e?this.cacheResult().__iterate(n,e):(o=!(r=0),i=0,s.__iterate(function(e,t){if(!(o=o&&r++<c))return i++,!1!==n(e,l?t:i-1,a)&&i!==u}),i)},t.__iteratorUncached=function(t,e){var n,r,o;return 0!==u&&e?this.cacheResult().__iterator(t,e):(n=0!==u&&s.__iterator(t,e),o=r=0,new h(function(){for(;r++<c;)n.next();var e;return++o>u?m():(e=n.next(),l||t===f?e:d(t,o-1,t===te?void 0:e.value[1],e))}))},t))}function Jt(t,c,u,p){var e=an(t);return e.__iterateUncached=function(r,e){var o,i,a=this;return e?this.cacheResult().__iterate(r,e):(o=!0,i=0,t.__iterate(function(e,t,n){if(!(o=o&&c.call(u,e,t,n)))return i++,r(e,p?t:i-1,a)}),i)},e.__iteratorUncached=function(o,e){var i,a,s,l=this;return e?this.cacheResult().__iterator(o,e):(i=t.__iterator(ne,e),a=!0,s=0,new h(function(){var e;do{if((e=i.next()).done)return p||o===f?e:d(o,s++,o===te?void 0:e.value[1],e);var t=e.value,n=t[0],r=t[1]}while(a=a&&c.call(u,r,n,l));return o===ne?e:d(o,n,r,e)}))},e}function Zt(e,l,c){var t=an(e);return t.__iterateUncached=function(i,t){var a=0,s=!1;return function n(e,r){var o=this;e.__iterate(function(e,t){return(!l||r<l)&&u(e)?n(e,r+1):!1===i(e,c?t:a++,o)&&(s=!0),!s},t)}(e,0),a},t.__iteratorUncached=function(n,r){var o=e.__iterator(n,r),i=[],a=0;return new h(function(){for(;o;){var e=o.next();if(!1!==e.done)o=i.pop();else{var t=e.value;if(n===ne&&(t=t[1]),l&&!(i.length<l)||!u(t))return c?e:d(n,a++,t,e);i.push(o),o=t.__iterator(n,r)}}return m()})},t}function Xt(n,r,o){r=r||ln;var e=c(n),i=0,a=n.toSeq().map(function(e,t){return[t,e,i++,o?o(e,t,n):e]}).toArray();return a.sort(function(e,t){return r(e[3],t[3])||e[2]-t[2]}).forEach(e?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),(e?pe:p(n)?g:fe)(a)}function Qt(n,r,o){var e;return r=r||ln,o?(e=n.toSeq().map(function(e,t){return[e,o(e,t,n)]}).reduce(function(e,t){return en(r,e[1],t[1])?t:e}))&&e[0]:n.reduce(function(e,t){return en(r,e,t)?t:e})}function en(e,t,n){e=e(n,t);return 0===e&&n!==t&&(null==n||n!=n)||0<e}function tn(e,a,s){e=an(e);return e.size=new ye(s).map(function(e){return e.size}).min(),e.__iterate=function(e,t){for(var n,r=this.__iterator(f,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},e.__iteratorUncached=function(t,n){var r=s.map(function(e){return e=l(e),le(n?e.reverse():e)}),o=0,i=!1;return new h(function(){var e;return i||(e=r.map(function(e){return e.next()}),i=e.some(function(e){return e.done})),i?m():d(t,o++,a.apply(null,e.map(function(e){return e.value})))})},e}function T(e,t){return Se(e)?t:e.constructor(t)}function nn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function rn(e){return b(e.size),Y(e)}function on(e){return c(e)?s:p(e)?N:o}function an(e){return Object.create((c(e)?pe:p(e)?g:fe).prototype)}function sn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):n.prototype.cacheResult.call(this)}function ln(e,t){return t<e?1:e<t?-1:0}function cn(e){var t=le(e);if(!t){if(!ue(e))throw new TypeError("Expected iterable or array-like: "+e);t=le(l(e))}return t}function M(o,i){function a(e){if(e instanceof a)return e;if(!(this instanceof a))return new a(e);if(!s){s=!0;var t=Object.keys(o),n=l,r=t;try{r.forEach(function(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Ae(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}.bind(void 0,n))}catch(e){}l.size=t.length,l._name=i,l._keys=t,l._defaultValues=o}this._map=C(e)}var s,l=a.prototype=Object.create(A);return l.constructor=a}e(P,C),P.of=function(){return this(arguments)},P.prototype.toString=function(){return this.__toString("OrderedMap {","}")},P.prototype.get=function(e,t){e=this._map.get(e);return void 0!==e?this._list.get(e)[1]:t},P.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Bt()},P.prototype.set=function(e,t){return zt(this,e,t)},P.prototype.remove=function(e){return zt(this,e,w)},P.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},P.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},P.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},P.prototype.__ensureOwner=function(e){var t,n;return e===this.__ownerID?this:(t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e),e?jt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this))},P.isOrderedMap=Lt,P.prototype[H]=!0,P.prototype[t]=P.prototype.remove,e(Vt,pe),Vt.prototype.get=function(e,t){return this._iter.get(e,t)},Vt.prototype.has=function(e){return this._iter.has(e)},Vt.prototype.valueSeq=function(){return this._iter.valueSeq()},Vt.prototype.reverse=function(){var e=this,t=qt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Vt.prototype.map=function(e,t){var n=this,r=Gt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Vt.prototype.__iterate=function(n,t){var r,o=this;return this._iter.__iterate(this._useKeys?function(e,t){return n(e,t,o)}:(r=t?rn(this):0,function(e){return n(e,t?--r:r++,o)}),t)},Vt.prototype.__iterator=function(t,n){var r,o;return this._useKeys?this._iter.__iterator(t,n):(r=this._iter.__iterator(f,n),o=n?rn(this):0,new h(function(){var e=r.next();return e.done?e:d(t,n?--o:o++,e.value,e)}))},Vt.prototype[H]=!0,e(Ht,g),Ht.prototype.includes=function(e){return this._iter.includes(e)},Ht.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},Ht.prototype.__iterator=function(t,e){var n=this._iter.__iterator(f,e),r=0;return new h(function(){var e=n.next();return e.done?e:d(t,r++,e.value,e)})},e(Kt,fe),Kt.prototype.has=function(e){return this._iter.includes(e)},Kt.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},Kt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(f,e);return new h(function(){var e=n.next();return e.done?e:d(t,e.value,e.value,e)})},e(Ut,pe),Ut.prototype.entrySeq=function(){return this._iter.toSeq()},Ut.prototype.__iterate=function(n,e){var r=this;return this._iter.__iterate(function(e){var t;if(e)return nn(e),t=u(e),n(t?e.get(1):e[1],t?e.get(0):e[0],r)},e)},Ut.prototype.__iterator=function(r,e){var o=this._iter.__iterator(f,e);return new h(function(){for(;;){var e=o.next();if(e.done)return e;var t,n=e.value;if(n)return nn(n),t=u(n),d(r,t?n.get(0):n[0],t?n.get(1):n[1],e)}})},Ht.prototype.cacheResult=Vt.prototype.cacheResult=Kt.prototype.cacheResult=Ut.prototype.cacheResult=sn,e(M,Re),M.prototype.toString=function(){return this.__toString(pn(this)+" {","}")},M.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},M.prototype.get=function(e,t){var n;return this.has(e)?(n=this._defaultValues[e],this._map?this._map.get(e,n):n):t},M.prototype.clear=function(){var e;return this.__ownerID?(this._map&&this._map.clear(),this):(e=this.constructor)._empty||(e._empty=un(this,lt()))},M.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+pn(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;e=this._map&&this._map.set(e,t);return this.__ownerID||e===this._map?this:un(this,e)},M.prototype.remove=function(e){return!this.has(e)||(e=this._map&&this._map.remove(e),this.__ownerID)||e===this._map?this:un(this,e)},M.prototype.wasAltered=function(){return this._map.wasAltered()},M.prototype.__iterator=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},M.prototype.__iterate=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},M.prototype.__ensureOwner=function(e){var t;return e===this.__ownerID?this:(t=this._map&&this._map.__ensureOwner(e),e?un(this,t,e):(this.__ownerID=e,this._map=t,this))};var A=M.prototype;function un(e,t,n){e=Object.create(Object.getPrototypeOf(e));return e._map=t,e.__ownerID=n,e}function pn(e){return e._name||e.constructor.name||"Record"}function I(n){return null==n?yn():fn(n)&&!j(n)?n:yn().withMutations(function(t){var e=o(n);b(e.size),e.forEach(function(e){return t.add(e)})})}function fn(e){return!(!e||!e[dn])}A[t]=A.remove,A.deleteIn=A.removeIn=k.removeIn,A.merge=k.merge,A.mergeWith=k.mergeWith,A.mergeIn=k.mergeIn,A.mergeDeep=k.mergeDeep,A.mergeDeepWith=k.mergeDeepWith,A.mergeDeepIn=k.mergeDeepIn,A.setIn=k.setIn,A.update=k.update,A.updateIn=k.updateIn,A.withMutations=k.withMutations,A.asMutable=k.asMutable,A.asImmutable=k.asImmutable,e(I,Ne),I.of=function(){return this(arguments)},I.fromKeys=function(e){return this(s(e).keySeq())},I.prototype.toString=function(){return this.__toString("Set {","}")},I.prototype.has=function(e){return this._map.has(e)},I.prototype.add=function(e){return mn(this,this._map.set(e,!0))},I.prototype.remove=function(e){return mn(this,this._map.remove(e))},I.prototype.clear=function(){return mn(this,this._map.clear())},I.prototype.union=function(){var n=r.call(arguments,0);return 0===(n=n.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(t){for(var e=0;e<n.length;e++)o(n[e]).forEach(function(e){return t.add(e)})}):this.constructor(n[0])},I.prototype.intersect=function(){var n,t;return 0===(n=r.call(arguments,0)).length?this:(n=n.map(o),(t=this).withMutations(function(e){t.forEach(function(t){n.every(function(e){return e.includes(t)})||e.remove(t)})}))},I.prototype.subtract=function(){var n,t;return 0===(n=r.call(arguments,0)).length?this:(n=n.map(o),(t=this).withMutations(function(e){t.forEach(function(t){n.some(function(e){return e.includes(t)})&&e.remove(t)})}))},I.prototype.merge=function(){return this.union.apply(this,arguments)},I.prototype.mergeWith=function(e){var t=r.call(arguments,1);return this.union.apply(this,t)},I.prototype.sort=function(e){return vn(Xt(this,e))},I.prototype.sortBy=function(e,t){return vn(Xt(this,t,e))},I.prototype.wasAltered=function(){return this._map.wasAltered()},I.prototype.__iterate=function(n,e){var r=this;return this._map.__iterate(function(e,t){return n(t,t,r)},e)},I.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},I.prototype.__ensureOwner=function(e){var t;return e===this.__ownerID?this:(t=this._map.__ensureOwner(e),e?this.__make(t,e):(this.__ownerID=e,this._map=t,this))},I.isSet=fn;var hn,dn="@@__IMMUTABLE_SET__@@",R=I.prototype;function mn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function gn(e,t){var n=Object.create(R);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function yn(){return hn=hn||gn(lt())}function vn(n){return null==n?wn():bn(n)?n:wn().withMutations(function(t){var e=o(n);b(e.size),e.forEach(function(e){return t.add(e)})})}function bn(e){return fn(e)&&j(e)}R[dn]=!0,R[t]=R.remove,R.mergeDeep=R.merge,R.mergeDeepWith=R.mergeWith,R.withMutations=k.withMutations,R.asMutable=k.asMutable,R.asImmutable=k.asImmutable,R.__empty=yn,R.__make=gn,e(vn,I),vn.of=function(){return this(arguments)},vn.fromKeys=function(e){return this(s(e).keySeq())},vn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},vn.isOrderedSet=bn;var _n,Sn=vn.prototype;function En(e,t){var n=Object.create(Sn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function wn(){return _n=_n||En(Bt())}function F(e){return null==e?Pn():xn(e)?e:Pn().unshiftAll(e)}function xn(e){return!(!e||!e[kn])}Sn[H]=!0,Sn.__empty=wn,Sn.__make=En,e(F,Fe),F.of=function(){return this(arguments)},F.prototype.toString=function(){return this.__toString("Stack [","]")},F.prototype.get=function(e,t){var n=this._head;for(e=$(this,e);n&&e--;)n=n.next;return n?n.value:t},F.prototype.peek=function(){return this._head&&this._head.value},F.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;0<=n;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):On(e,t)},F.prototype.pushAll=function(e){if(0===(e=N(e)).size)return this;b(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):On(t,n)},F.prototype.pop=function(){return this.slice(1)},F.prototype.unshift=function(){return this.push.apply(this,arguments)},F.prototype.unshiftAll=function(e){return this.pushAll(e)},F.prototype.shift=function(){return this.pop.apply(this,arguments)},F.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Pn()},F.prototype.slice=function(e,t){if(Z(e,t,this.size))return this;var n=X(e,this.size);if(Q(t,this.size)!==this.size)return Fe.prototype.slice.call(this,e,t);for(var e=this.size-n,r=this._head;n--;)r=r.next;return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):On(e,r)},F.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?On(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},F.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},F.prototype.__iterator=function(t,e){var n,r;return e?this.reverse().__iterator(t):(n=0,r=this._head,new h(function(){var e;return r?(e=r.value,r=r.next,d(t,n++,e)):m()}))},F.isStack=xn;var Cn,kn="@@__IMMUTABLE_STACK__@@",Dn=F.prototype;function On(e,t,n,r){var o=Object.create(Dn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Pn(){return Cn=Cn||On(0)}function Tn(t,n){function e(e){t.prototype[e]=n[e]}Object.keys(n).forEach(e),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(n).forEach(e)}Dn[kn]=!0,Dn.withMutations=k.withMutations,Dn.asMutable=k.asMutable,Dn.asImmutable=k.asImmutable,Dn.wasAltered=k.wasAltered,l.Iterator=h,Tn(l,{toArray:function(){b(this.size);var n=new Array(this.size||0);return this.valueSeq().__iterate(function(e,t){n[t]=e}),n},toIndexedSeq:function(){return new Ht(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Vt(this,!0)},toMap:function(){return C(this.toKeyedSeq())},toObject:function(){b(this.size);var r={};return this.__iterate(function(e,t){var n;("string"!=typeof(n=t)||"__proto__"!==n&&"constructor"!==n)&&(r[t]=e)}),r},toOrderedMap:function(){return P(this.toKeyedSeq())},toOrderedSet:function(){return vn(c(this)?this.valueSeq():this)},toSet:function(){return I(c(this)?this.valueSeq():this)},toSetSeq:function(){return new Kt(this)},toSeq:function(){return p(this)?this.toIndexedSeq():c(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return F(c(this)?this.valueSeq():this)},toList:function(){return D(c(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return T(this,((e,t)=>{var n=c(e);if(0===(t=[e].concat(t).map(function(e){return u(e)?n&&(e=s(e)):e=n?we(e):xe(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size})).length)return e;if(1===t.length){var r=t[0];if(r===e||n&&c(r)||p(e)&&p(r))return r}return r=new ye(t),n?r=r.toKeyedSeq():p(e)||(r=r.toSetSeq()),(r=r.flatten(!0)).size=t.reduce(function(e,t){if(void 0!==e){t=t.size;if(void 0!==t)return e+t}},0),r})(this,r.call(arguments,0)))},includes:function(t){return this.some(function(e){return v(e,t)})},entries:function(){return this.__iterator(ne)},every:function(r,o){b(this.size);var i=!0;return this.__iterate(function(e,t,n){if(!r.call(o,e,t,n))return i=!1}),i},filter:function(e,t){return T(this,Yt(this,e,t,!0))},find:function(e,t,n){e=this.findEntry(e,t);return e?e[1]:n},forEach:function(e,t){return b(this.size),this.__iterate(t?e.bind(t):e)},join:function(t){b(this.size),t=void 0!==t?""+t:",";var n="",r=!0;return this.__iterate(function(e){r?r=!1:n+=t,n+=null!=e?e.toString():""}),n},keys:function(){return this.__iterator(te)},map:function(e,t){return T(this,Gt(this,e,t))},reduce:function(r,e,o){var i,a;return b(this.size),arguments.length<2?a=!0:i=e,this.__iterate(function(e,t,n){i=a?(a=!1,e):r.call(o,i,e,t,n)}),i},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return T(this,qt(this,!0))},slice:function(e,t){return T(this,$t(this,e,t,!0))},some:function(e,t){return!this.every(Rn(e),t)},sort:function(e){return T(this,Xt(this,e))},values:function(){return this.__iterator(f)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return Y(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return n=this,r=e,o=t,i=C().asMutable(),n.__iterate(function(e,t){i.update(r.call(o,e,t,n),0,function(e){return e+1})}),i.asImmutable();var n,r,o,i},equals:function(e){return Me(this,e)},entrySeq:function(){var e,t=this;return t._cache?new ye(t._cache):((e=t.toSeq().map(In).toIndexedSeq()).fromEntrySeq=function(){return t.toSeq()},e)},filterNot:function(e,t){return this.filter(Rn(e),t)},findEntry:function(r,o,e){var i=e;return this.__iterate(function(e,t,n){if(r.call(o,e,t,n))return!(i=[t,e])}),i},findKey:function(e,t){e=this.findEntry(e,t);return e&&e[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(J)},flatMap:function(e,t){return T(this,(r=e,o=t,i=on(n=this),n.toSeq().map(function(e,t){return i(r.call(o,e,t,n))}).flatten(!0)));var n,r,o,i},flatten:function(e){return T(this,Zt(this,e,!0))},fromEntrySeq:function(){return new Ut(this)},get:function(n,e){return this.find(function(e,t){return v(t,n)},void 0,e)},getIn:function(e,t){for(var n,r=this,o=cn(e);!(n=o.next()).done;)if((r=r&&r.get?r.get(n.value,w):w)===w)return t;return r},groupBy:function(e,t){return o=e,i=t,a=c(r=this),s=(j(r)?P:C)().asMutable(),r.__iterate(function(t,n){s.update(o.call(i,t,n,r),function(e){return(e=e||[]).push(a?[n,t]:t),e})}),n=on(r),s.map(function(e){return T(r,n(e))});var r,o,i,a,s,n},has:function(e){return this.get(e,w)!==w},hasIn:function(e){return this.getIn(e,w)!==w},isSubset:function(t){return t="function"==typeof t.includes?t:l(t),this.every(function(e){return t.includes(e)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:l(e)).isSubset(this)},keyOf:function(t){return this.findKey(function(e){return v(e,t)})},keySeq:function(){return this.toSeq().map(An).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Qt(this,e)},maxBy:function(e,t){return Qt(this,t,e)},min:function(e){return Qt(this,e?Fn(e):jn)},minBy:function(e,t){return Qt(this,t?Fn(t):jn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return T(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return T(this,Jt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Rn(e),t)},sortBy:function(e,t){return T(this,Xt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return T(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return T(this,(s=e,l=t,(e=an(n=this)).__iterateUncached=function(r,e){var o,i=this;return e?this.cacheResult().__iterate(r,e):(o=0,n.__iterate(function(e,t,n){return s.call(l,e,t,n)&&++o&&r(e,t,i)}),o)},e.__iteratorUncached=function(r,e){var o,i,a=this;return e?this.cacheResult().__iterator(r,e):(o=n.__iterator(ne,e),i=!0,new h(function(){var e,t,n;return i?(e=o.next()).done?e:(t=(n=e.value)[0],s.call(l,n=n[1],t,a)?r===ne?e:d(r,t,n,e):(i=!1,m())):m()}))},e));var n,s,l},takeUntil:function(e,t){return this.takeWhile(Rn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=(e=>{var t,n,r;return e.size===1/0?0:(t=j(e),r=c(e),n=t?1:0,e=e.__iterate(r?t?function(e,t){n=31*n+Bn(x(e),x(t))|0}:function(e,t){n=n+Bn(x(e),x(t))|0}:t?function(e){n=31*n+x(e)|0}:function(e){n=n+x(e)|0}),r=Le(r=n,3432918353),r=Le(r<<15|r>>>-15,461845907),r=Le(r<<13|r>>>-13,5),r=Le((r=(r+3864292196|0)^e)^r>>>16,2246822507),r=je((r=Le(r^r>>>13,3266489909))^r>>>16))})(this))}});var t=l.prototype,Mn=(t[B]=!0,t[ie]=t.values,t.__toJS=t.toArray,t.__toStringMapper=Nn,t.inspect=t.toSource=function(){return this.toString()},t.chain=t.flatMap,t.contains=t.includes,Tn(s,{flip:function(){return T(this,Wt(this))},mapEntries:function(n,r){var o=this,i=0;return T(this,this.toSeq().map(function(e,t){return n.call(r,[t,e],i++,o)}).fromEntrySeq())},mapKeys:function(n,r){var o=this;return T(this,this.toSeq().flip().map(function(e,t){return n.call(r,e,t,o)}).flip())}}),s.prototype);function An(e,t){return t}function In(e,t){return[t,e]}function Rn(e){return function(){return!e.apply(this,arguments)}}function Fn(e){return function(){return-e.apply(this,arguments)}}function Nn(e){return"string"==typeof e?JSON.stringify(e):String(e)}function Ln(){return q(arguments)}function jn(e,t){return e<t?1:t<e?-1:0}function Bn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Mn[z]=!0,Mn[ie]=t.entries,Mn.__toJS=t.toObject,Mn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Nn(e)},Tn(N,{toKeyedSeq:function(){return new Vt(this,!1)},filter:function(e,t){return T(this,Yt(this,e,t,!1))},findIndex:function(e,t){e=this.findEntry(e,t);return e?e[0]:-1},indexOf:function(e){e=this.keyOf(e);return void 0===e?-1:e},lastIndexOf:function(e){e=this.lastKeyOf(e);return void 0===e?-1:e},reverse:function(){return T(this,qt(this,!1))},slice:function(e,t){return T(this,$t(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=X(e,e<0?this.count():this.size);var r=this.slice(0,e);return T(this,1===n?r:r.concat(q(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){e=this.findLastEntry(e,t);return e?e[0]:-1},first:function(){return this.get(0)},flatten:function(e){return T(this,Zt(this,e,!1))},get:function(n,e){return(n=$(this,n))<0||this.size===1/0||void 0!==this.size&&n>this.size?e:this.find(function(e,t){return t===n},void 0,e)},has:function(e){return 0<=(e=$(this,e))&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return T(this,(a=e,(e=an(i=this)).size=i.size&&2*i.size-1,e.__iterateUncached=function(n,e){var r=this,o=0;return i.__iterate(function(e,t){return(!o||!1!==n(a,o++,r))&&!1!==n(e,o++,r)},e),o},e.__iteratorUncached=function(e,t){var n,r=i.__iterator(f,t),o=0;return new h(function(){return(!n||o%2)&&(n=r.next()).done?n:o%2?d(e,o++,a):d(e,o++,n.value,n)})},e));var i,a},interleave:function(){var e=[this].concat(q(arguments)),t=tn(this.toSeq(),g.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),T(this,n)},keySeq:function(){return a(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(e,t){return T(this,Jt(this,e,t,!1))},zip:function(){var e=[this].concat(q(arguments));return T(this,tn(this,Ln,e))},zipWith:function(e){var t=q(arguments);return T(t[0]=this,tn(this,e,t))}}),N.prototype[V]=!0,N.prototype[H]=!0,Tn(o,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=t.includes,o.prototype.contains=o.prototype.includes,Tn(pe,s.prototype),Tn(g,N.prototype),Tn(fe,o.prototype),Tn(Re,s.prototype),Tn(Fe,N.prototype),Tn(Ne,o.prototype),{Iterable:l,Seq:n,Collection:Ie,Map:C,OrderedMap:P,List:D,Stack:F,Set:I,OrderedSet:vn,Record:M,Range:a,Repeat:i,is:v,fromJS:Oe}})()},function(e,t,n){var s=function(e){};e.exports=function(e,t){for(var n,r,o=arguments.length,i=new Array(2<o?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];if(s(t),!e)throw void 0===t?r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(n=0,(r=new Error(t.replace(/%s/g,function(){return String(i[n++])}))).name="Invariant Violation"),r.framesToPop=1,r}},function(e,t,n){function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){o(t,e,n[e])})}return t}function o(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var d=n(115),i=n(40),u=n(117),a=n(31),n=n(6),s=n.OrderedSet,l=n.Record,p=n.Stack,f=n.OrderedMap,h=n.List,m=l({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:p(),selection:null,treeMap:null,undoStack:p()}),c=(()=>{c.createEmpty=function(e){return this.createWithText("",e)},c.createWithText=function(e,t){return c.createWithContent(i.createFromText(e),t)},c.createWithContent=function(e,t){var n;return 0===e.getBlockMap().count()?c.createEmpty(t):(n=e.getBlockMap().first().getKey(),c.create({currentContent:e,undoStack:p(),redoStack:p(),decorator:t||null,selection:a.createEmpty(n)}))},c.create=function(e){var t=e.currentContent,e=r({},e,{treeMap:y(t,e.decorator),directionMap:u.getDirectionMap(t)});return new c(new m(e))},c.fromJS=function(e){return new c(new m(r({},e,{directionMap:null!=e.directionMap?f(e.directionMap):e.directionMap,inlineStyleOverride:null!=e.inlineStyleOverride?s(e.inlineStyleOverride):e.inlineStyleOverride,nativelyRenderedContent:null!=e.nativelyRenderedContent?i.fromJS(e.nativelyRenderedContent):e.nativelyRenderedContent,redoStack:null!=e.redoStack?p(e.redoStack.map(function(e){return i.fromJS(e)})):e.redoStack,selection:null!=e.selection?new a(e.selection):e.selection,treeMap:null!=e.treeMap?f(e.treeMap).map(function(e){return h(e).map(function(e){return d.fromJS(e)})}):e.treeMap,undoStack:null!=e.undoStack?p(e.undoStack.map(function(e){return i.fromJS(e)})):e.undoStack,currentContent:i.fromJS(e.currentContent)})))},c.set=function(f,h){return new c(f.getImmutable().withMutations(function(e){var t,n,r,o,i,a,s,l,c=e.get("decorator"),u=c,p=(null===h.decorator?u=null:h.decorator&&(u=h.decorator),h.currentContent||f.getCurrentContent());u!==c?(o=e.get("treeMap"),c=u&&c?(i=(t=p).getBlockMap(),n=u,r=c,o.merge(i.toSeq().filter(function(e){return n.getDecorations(e,t)!==r.getDecorations(e,t)}).map(function(e){return d.generate(t,e,n)}))):y(p,u),e.merge({decorator:u,treeMap:c,nativelyRenderedContent:null})):(p!==f.getCurrentContent()&&e.set("treeMap",(o=f,i=p.getBlockMap(),c=p.getEntityMap(),a=u,s=o.getCurrentContent().set("entityMap",c),l=s.getBlockMap(),o.getImmutable().get("treeMap").merge(i.toSeq().filter(function(e,t){return e!==l.get(t)}).map(function(e){return d.generate(s,e,a)})))),e.merge(h))}))};var e=c.prototype;function c(e){o(this,"_immutable",void 0),this._immutable=e}return e.toJS=function(){return this.getImmutable().toJS()},e.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},e.getCurrentContent=function(){return this.getImmutable().get("currentContent")},e.getUndoStack=function(){return this.getImmutable().get("undoStack")},e.getRedoStack=function(){return this.getImmutable().get("redoStack")},e.getSelection=function(){return this.getImmutable().get("selection")},e.getDecorator=function(){return this.getImmutable().get("decorator")},e.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},e.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},e.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},e.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},e.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},c.setInlineStyleOverride=function(e,t){return c.set(e,{inlineStyleOverride:t})},e.getCurrentInlineStyle=function(){var e,t,n,r,o,i=this.getInlineStyleOverride();return null!=i?i:(i=this.getCurrentContent(),(e=this.getSelection()).isCollapsed()?(n=i,o=(t=e).getStartKey(),t=t.getStartOffset(),r=n.getBlockForKey(o),0<t?r.getInlineStyleAt(t-1):r.getLength()?r.getInlineStyleAt(0):v(n,o)):(t=i,n=(r=e).getStartKey(),r=r.getStartOffset(),o=t.getBlockForKey(n),r<o.getLength()?o.getInlineStyleAt(r):0<r?o.getInlineStyleAt(r-1):v(t,n)))},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},c.acceptSelection=function(e,t){return g(e,t,!1)},c.forceSelection=function(e,t){return g(e,t=t.getHasFocus()?t:t.set("hasFocus",!0),!0)},c.moveSelectionToEnd=function(e){var t=e.getCurrentContent().getLastBlock(),n=t.getKey(),t=t.getLength();return c.acceptSelection(e,new a({anchorKey:n,anchorOffset:t,focusKey:n,focusOffset:t,isBackward:!1}))},c.moveFocusToEnd=function(e){e=c.moveSelectionToEnd(e);return c.forceSelection(e,e.getSelection())},c.push=function(e,t,n){var r,o,i,a,s,l=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];return e.getCurrentContent()===t?e:(r=u.getDirectionMap(t,e.getDirectionMap()),e.getAllowUndo()?(a=e.getSelection(),s=e.getCurrentContent(),o=e.getUndoStack(),i=t,a!==s.getSelectionAfter()||((e,t)=>(e=e.getLastChangeType(),t!==e||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t))(e,n)?(o=o.push(s),i=i.set("selectionBefore",a)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(i=i.set("selectionBefore",s.getSelectionBefore())),a=e.getInlineStyleOverride(),-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(a=null),s={currentContent:i,directionMap:r,undoStack:o,redoStack:p(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:l,inlineStyleOverride:a},c.set(e,s)):c.set(e,{currentContent:t,directionMap:r,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:l,inlineStyleOverride:null}))},c.undo=function(e){var t,n,r,o;return e.getAllowUndo()&&(n=(t=e.getUndoStack()).peek())?(r=e.getCurrentContent(),o=u.getDirectionMap(n,e.getDirectionMap()),c.set(e,{currentContent:n,directionMap:o,undoStack:t.shift(),redoStack:e.getRedoStack().push(r),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:r.getSelectionBefore()})):e},c.redo=function(e){var t,n,r,o;return e.getAllowUndo()&&(n=(t=e.getRedoStack()).peek())?(r=e.getCurrentContent(),o=u.getDirectionMap(n,e.getDirectionMap()),c.set(e,{currentContent:n,directionMap:o,undoStack:e.getUndoStack().push(r),redoStack:t.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})):e},e.getImmutable=function(){return this._immutable},c})();function g(e,t,n){return c.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function y(t,n){return t.getBlockMap().map(function(e){return d.generate(t,e,n)}).toOrderedMap()}function v(e,n){e=e.getBlockMap().reverse().skipUntil(function(e,t){return t===n}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return e?e.getInlineStyleAt(e.getLength()-1):s()}e.exports=c},function(e,t,n){var i=n(12),r=n(105),o=n(106),c=n(108),a=n(29),s=n(6),l=n(111),u=n(112),p=n(7),f=n(55),h=n(53),d=n(113),m=n(114),g=s.OrderedSet,y={replaceText:function(e,t,n,r,o){e=h(e,t),e=d(e,t),t=i.create({style:r||g(),entity:o||null});return u(e,e.getSelectionAfter(),n,t)},insertText:function(e,t,n,r,o){return t.isCollapsed()||p(!1),y.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=a(e,t),e=y.removeRange(e,t,"backward");return y.replaceWithFragment(e,n,r)},replaceWithFragment:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",e=h(e,t),e=d(e,t);return l(e,e.getSelectionAfter(),n,r)},removeRange:function(e,t,n){i=(t=t.getIsBackward()?t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1}):t).getAnchorKey(),l=t.getFocusKey(),r=e.getBlockForKey(i),o=e.getBlockForKey(l);var r,o,i,a=t.getStartOffset(),s=t.getEndOffset(),a=r.getEntityAt(a),s=o.getEntityAt(s-1);if(i===l&&(a&&a===s))return i=c(e.getEntityMap(),r,o,t,n),d(e,i);var l=h(e,t);return d(l,t)},splitBlock:function(e,t){e=h(e,t),e=d(e,t);return m(e,e.getSelectionAfter())},applyInlineStyle:function(e,t,n){return r.add(e,t,n)},removeInlineStyle:function(e,t,n){return r.remove(e,t,n)},setBlockType:function(e,t,n){return f(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return f(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return f(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,n){e=h(e,t);return o(e,t,n)}};e.exports=y},function(e,t,n){e.exports=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}},function(e,t,n){var r=n(124),o=n(127),i=n(128),n=n(129);function a(e,t,n,r){return e===n||!!n.startsWith(e)&&(n=n.slice(e.length),!!t)&&(n=r?r(n):n,o.contains(n,t))}function s(e){return"Windows"===r.platformName?e.replace(/^\s*NT/,""):e}e.exports=i({isBrowser:function(e){return a(r.browserName,r.browserFullVersion,e)},isBrowserArchitecture:function(e){return a(r.browserArchitecture,null,e)},isDevice:function(e){return a(r.deviceName,null,e)},isEngine:function(e){return a(r.engineName,r.engineVersion,e)},isPlatform:function(e){return a(r.platformName,r.platformFullVersion,e,s)},isPlatformArchitecture:function(e){return a(r.platformArchitecture,null,e)}},n)},function(e,t,n){var n=n(6),o=n.Map,i=n.OrderedSet,n=n.Record,a=i(),r={style:a,entity:null},n=(e=>{var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.getStyle=function(){return this.get("style")},r.getEntity=function(){return this.get("entity")},r.hasStyle=function(e){return this.getStyle().includes(e)},n.applyStyle=function(e,t){e=e.set("style",e.getStyle().add(t));return n.create(e)},n.removeStyle=function(e,t){e=e.set("style",e.getStyle().remove(t));return n.create(e)},n.applyEntity=function(e,t){e=e.getEntity()===t?e:e.set("entity",t);return n.create(e)},n.create=function(e){var t;return e?(e=o({style:a,entity:null}).merge(e),l.get(e)||(t=new n(e),l=l.set(e,t),t)):s},n.fromJS=function(e){var t=e.style,e=e.entity;return new n({style:Array.isArray(t)?i(t):t,entity:Array.isArray(e)?i(e):e})},n})(n(r)),s=new n,l=o([[o(r),s]]);n.EMPTY=s,e.exports=n},function(e,t,n){function o(e,t){return e.getStyle()===t.getStyle()}function i(e,t){return e.getEntity()===t.getEntity()}var a=n(12),s=n(26),n=n(6),l=n.List,r=n.Map,c=n.OrderedSet,u=n.Record,p=n.Repeat,f=c(),h={parent:null,characterList:l(),data:r(),depth:0,key:"",text:"",type:"unstyled",children:l(),prevSibling:null,nextSibling:null},n=(r=>{var e;function t(){var e,t,n;return r.call(this,((e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h)&&(t=e.characterList,n=e.text)&&!t&&(e.characterList=l(p(a.EMPTY,n.length))),e))||this}e=r,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){e=this.getCharacterList().get(e);return e?e.getStyle():f},n.getEntityAt=function(e){e=this.getCharacterList().get(e);return e?e.getEntity():null},n.getChildKeys=function(){return this.get("children")},n.getParentKey=function(){return this.get("parent")},n.getPrevSiblingKey=function(){return this.get("prevSibling")},n.getNextSiblingKey=function(){return this.get("nextSibling")},n.findStyleRanges=function(e,t){s(this.getCharacterList(),o,e,t)},n.findEntityRanges=function(e,t){s(this.getCharacterList(),i,e,t)},t})(u(h));e.exports=n},function(e,t){e.exports=ReactDOM},function(e,t,n){var r={},o=Math.pow(2,24);e.exports=function(){for(var e;void 0===e||r.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*o).toString(32);return r[e]=!0,e}},function(e,t,n){e.exports={encode:function(e,t,n){return e+"-"+t+"-"+n},decode:function(e){var e=e.split("-").reverse(),t=e[0],n=e[1];return{blockKey:e.slice(2).reverse().join("-"),decoratorKey:parseInt(n,10),leafKey:parseInt(t,10)}}}},function(e,t,n){e.exports=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX||!window.__DRAFT_GKX[e])}},function(e,t,n){
45
45
  /*
46
46
  object-assign
47
47
  (c) Sindre Sorhus
@@ -56,4 +56,4 @@ var l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.pr
56
56
  * This source code is licensed under the MIT license found in the
57
57
  * LICENSE file in the root directory of this source tree.
58
58
  */
59
- var w=e(18),x=e(0);function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var e="function"==typeof Symbol&&Symbol.for,s=e?Symbol.for("react.portal"):60106,l=e?Symbol.for("react.fragment"):60107,c=e?Symbol.for("react.strict_mode"):60108,u=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,p=e?Symbol.for("react.context"):60110,j=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,B=e?Symbol.for("react.suspense_list"):60120,z=e?Symbol.for("react.memo"):60115,V=e?Symbol.for("react.lazy"):60116,H=e?Symbol.for("react.block"):60121,K=e?Symbol.for("react.fundamental"):60117,U=e?Symbol.for("react.scope"):60119;function g(e){if(null!=e){if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case l:return"Fragment";case s:return"Portal";case u:return"Profiler";case c:return"StrictMode";case d:return"Suspense";case B:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case p:return"Context.Consumer";case f:return"Context.Provider";case h:var t=(t=e.render).displayName||t.name||"";return e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case z:return g(e.type);case H:return g(e.render);case V:if(e=1===e._status?e._result:null)return g(e)}}return null}var e=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=(e.hasOwnProperty("ReactCurrentDispatcher")||(e.ReactCurrentDispatcher={current:null}),e.hasOwnProperty("ReactCurrentBatchConfig")||(e.ReactCurrentBatchConfig={suspense:null}),{});function y(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var m=new Uint16Array(16),t=0;t<15;t++)m[t]=t+1;m[15]=0;var G=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,q=Object.prototype.hasOwnProperty,Y={},$={};function J(e){return q.call($,e)||!q.call(Y,e)&&(G.test(e)?$[e]=!0:void(Y[e]=!0))}function Z(e,t,n,r){if(null==t||((e,t,n,r)=>{if(null===n||0!==n.type)switch(typeof t){case"function":case"symbol":return 1;case"boolean":return r?void 0:null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e;default:return}})(e,t,n,r))return 1;if(!r&&null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||t<1}}function n(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var k={},r=("children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){k[e]=new n(e,0,!1,e,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];k[t]=new n(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){k[e]=new n(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){k[e]=new n(e,2,!1,e,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){k[e]=new n(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){k[e]=new n(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){k[e]=new n(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){k[e]=new n(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){k[e]=new n(e,5,!1,e.toLowerCase(),null,!1)}),/[\-:]([a-z])/g);function o(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){k[e]=new n(e,1,!1,e.toLowerCase(),null,!1)}),k.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){k[e]=new n(e,1,!1,e.toLowerCase(),null,!0)});var X=/["'&<>]/;function D(e){if("boolean"==typeof e||"number"==typeof e)return""+e;var t=X.exec(e=""+e);if(t){for(var n="",r=0,o=t.index;o<e.length;o++){switch(e.charCodeAt(o)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}r!==o&&(n+=e.substring(r,o)),r=o+1,n+=t}e=r!==o?n+e.substring(r,o):n}return e}var Q="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},v=null,i=null,a=null,b=!1,_=!1,S=null,E=0;function O(){if(null===v)throw Error(C(321));return v}function ee(){if(0<E)throw Error(C(312));return{memoizedState:null,queue:null,next:null}}function P(){return null===a?null===i?(b=!1,i=a=ee()):(b=!0,a=i):a=null===a.next?(b=!1,a.next=ee()):(b=!0,a.next),a}function te(e,t,n,r){for(;_;)_=!1,E+=1,a=null,n=e(t,r);return i=v=null,E=0,a=S=null,n}function ne(e,t){return"function"==typeof t?t(e):t}function re(e,t,n){if(v=O(),a=P(),b){var r=a.queue;if(t=r.dispatch,null===S||void 0===(n=S.get(r)))return[a.memoizedState,t];for(S.delete(r),r=a.memoizedState;r=e(r,n.action),null!==(n=n.next););return[a.memoizedState=r,t]}return e=e===ne?"function"==typeof t?t():t:void 0!==n?n(t):t,a.memoizedState=e,e=(e=a.queue={last:null,dispatch:null}).dispatch=function(e,t,n){if(!(E<25))throw Error(C(301));if(e===v)if(_=!0,e={action:n,next:null},null===S&&(S=new Map),void 0===(n=S.get(t)))S.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}.bind(null,v,e),[a.memoizedState,e]}function T(){}var M=0,oe={readContext:function(e){var t=M;return y(e,t),e[t]},useContext:function(e){O();var t=M;return y(e,t),e[t]},useMemo:function(e,t){if(v=O(),t=void 0===t?null:t,null!==(a=P())){var n=a.memoizedState;if(null!==n&&null!==t){e:{var r=n[1];if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!Q(t[o],r[o])){r=!1;break e}r=!0}}if(r)return n[0]}}return e=e(),a.memoizedState=[e,t],e},useReducer:re,useRef:function(e){v=O();var t=(a=P()).memoizedState;return null===t?a.memoizedState=e={current:e}:t},useState:function(e){return re(ne,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:T,useEffect:T,useDebugValue:T,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return O(),e},useTransition:function(){return O(),[function(e){e()},!1]}},ie="http://www.w3.org/1999/xhtml";function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var se={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},le=w({menuitem:!0},se),A={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ce=["Webkit","ms","Moz","O"],ue=(Object.keys(A).forEach(function(t){ce.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),A[e]=A[t]})}),/([A-Z])/g),pe=/^ms-/,I=x.Children.toArray,R=e.ReactCurrentDispatcher,fe={listing:!0,pre:!0,textarea:!0},he=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,de={},F={};var me=Object.prototype.hasOwnProperty,ge={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ye(e,t){if(void 0===e)throw Error(C(152,g(t)||"Component"))}function ve(h,d,m){function e(e,t){var n=t.prototype&&t.prototype.isReactComponent,r=((e,t,n,r)=>{if(r&&"object"==typeof(r=e.contextType)&&null!==r)return y(r,n),r[n];if(e=e.contextTypes){for(var o in n={},e)n[o]=t[o];t=n}else t=W;return t})(t,d,m,n),o=[],i=!1,a={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===o)return null},enqueueReplaceState:function(e,t){i=!0,o=[t]},enqueueSetState:function(e,t){if(null===o)return null;o.push(t)}};if(n){n=new t(e.props,r,a);"function"==typeof t.getDerivedStateFromProps&&null!=(l=t.getDerivedStateFromProps.call(null,e.props,n.state))&&(n.state=w({},n.state,l))}else if(v={},n=t(e.props,r,a),null==(n=te(t,e.props,n,r))||null==n.render)return void ye(h=n,t);if(n.props=e.props,n.context=r,n.updater=a,void 0===(a=n.state)&&(n.state=a=null),"function"==typeof n.UNSAFE_componentWillMount||"function"==typeof n.componentWillMount)if("function"==typeof n.componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.componentWillMount(),"function"==typeof n.UNSAFE_componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.UNSAFE_componentWillMount(),o.length){var a=o,s=i,o=null,i=!1;if(s&&1===a.length)n.state=a[0];else{for(var l=s?a[0]:n.state,c=!0,s=s?1:0;s<a.length;s++){var u=a[s];null!=(u="function"==typeof u?u.call(n,l,e.props,r):u)&&(c?(c=!1,l=w({},l,u)):w(l,u))}n.state=l}}else o=null;if(ye(h=n.render(),t),"function"==typeof n.getChildContext&&"object"==typeof(e=t.childContextTypes)){var p,f=n.getChildContext();for(p in f)if(!(p in e))throw Error(C(108,g(t)||"Unknown",p))}f&&(d=w({},d,f))}for(;x.isValidElement(h);){var t=h,n=t.type;if("function"!=typeof n)break;e(t,n)}return{child:h,context:d}}(e=_e.prototype).destroy=function(){var e;this.exhausted||(this.exhausted=!0,this.clearProviders(),e=this.threadID,m[e]=m[0],m[0]=e)},e.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID,o=(y(n,r),n[r]);this.contextStack[t]=n,this.contextValueStack[t]=o,n[r]=e.props.value},e.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},e.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},e.read=function(e){if(this.exhausted)return null;var t=M,n=(M=this.threadID,R.current);R.current=oe;try{for(var r=[""],o=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var i=this.threadID;m[i]=m[0],m[0]=i;break}var a=this.stack[this.stack.length-1];if(o||a.childIndex>=a.children.length){var s=a.footer;if(""!==s&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===a.type)this.currentSelectValue=null;else if(null!=a.type&&null!=a.type.type&&a.type.type.$$typeof===f)this.popProvider(a.type);else if(a.type===d){this.suspenseDepth--;var l=r.pop();if(o){var o=!1,c=a.fallbackFrame;if(!c)throw Error(C(303));this.stack.push(c),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=l}r[this.suspenseDepth]+=s}else{var u=a.children[a.childIndex++],p="";try{p+=this.render(u,a.context,a.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(C(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=p}}return r[0]}finally{R.current=n,M=t}},e.render=function(e,t,n){if("string"==typeof e||"number"==typeof e){if(""===(n=""+e))return"";if(!this.makeStaticMarkup){if(this.previousWasTextNode)return"\x3c!-- --\x3e"+D(n);this.previousWasTextNode=!0}return D(n)}if(e=(t=ve(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!x.isValidElement(e)){if(null==e||null==e.$$typeof)return e=I(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";if((n=e.$$typeof)===s)throw Error(C(257));throw Error(C(258,n.toString()))}var r,o=e.type;if("string"==typeof o)return this.renderDOM(e,t,n);switch(o){case c:case j:case u:case B:case l:return e=I(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case d:throw Error(C(294))}if("object"==typeof o&&null!==o)switch(o.$$typeof){case h:v={};var i=o.render(e.props,e.ref),i=te(o.render,e.props,i,e.ref);return i=I(i),this.stack.push({type:null,domNamespace:n,children:i,childIndex:0,context:t,footer:""}),"";case z:return e=[x.createElement(o.type,w({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case f:return n={type:e,domNamespace:n,children:o=I(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case p:o=e.type,i=e.props;var a=this.threadID;return y(o,a),o=I(i.children(o[a])),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),"";case K:throw Error(C(338));case V:switch(o=e.type,-1===(r=o)._status&&(r._status=0,i=(i=r._ctor)(),(r._result=i).then(function(e){0===r._status&&(e=e.default,r._status=1,r._result=e)},function(e){0===r._status&&(r._status=2,r._result=e)})),o._status){case 1:return e=[x.createElement(o._result,w({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case 2:throw o._result;default:throw Error(C(295))}case U:throw Error(C(343))}throw Error(C(130,null==o?o:typeof o,""))},e.renderDOM=function(e,t,n){var r=e.type.toLowerCase();if(n===ie&&ae(r),!de.hasOwnProperty(r)){if(!he.test(r))throw Error(C(65,r));de[r]=!0}var o,i,a,s,l,c=e.props;if("input"===r)c=w({type:void 0},c,{defaultChecked:void 0,defaultValue:void 0,value:null!=c.value?c.value:c.defaultValue,checked:null!=c.checked?c.checked:c.defaultChecked});else if("textarea"===r){if(null==(u=c.value)){var u=c.defaultValue,p=c.children;if(null!=p){if(null!=u)throw Error(C(92));if(Array.isArray(p)){if(!(p.length<=1))throw Error(C(93));p=p[0]}u=""+p}null==u&&(u="")}c=w({},c,{value:void 0,children:""+u})}else if("select"===r)this.currentSelectValue=null!=c.value?c.value:c.defaultValue,c=w({},c,{value:void 0});else if("option"===r){var p=this.currentSelectValue,f=null==(f=c.children)?f:(o="",x.Children.forEach(f,function(e){null!=e&&(o+=e)}),o);if(null!=p){var h=null!=c.value?c.value+"":f;if(u=!1,Array.isArray(p)){for(var d=0;d<p.length;d++)if(""+p[d]===h){u=!0;break}}else u=""+p===h;c=w({selected:void 0,children:void 0},c,{selected:u,children:f})}}if(u=c){if(le[r]&&(null!=u.children||null!=u.dangerouslySetInnerHTML))throw Error(C(137,r,""));if(null!=u.dangerouslySetInnerHTML){if(null!=u.children)throw Error(C(60));if(!("object"==typeof u.dangerouslySetInnerHTML&&"__html"in u.dangerouslySetInnerHTML))throw Error(C(61))}if(null!=u.style&&"object"!=typeof u.style)throw Error(C(62,""))}for(E in u=c,p=this.makeStaticMarkup,f=1===this.stack.length,h="<"+e.type,u)if(me.call(u,E)){var m=u[E];if(null!=m){if("style"===E){var g,y,v,b,d=void 0,_="",S="";for(d in m)m.hasOwnProperty(d)&&(g=0===d.indexOf("--"),null!=(y=m[d]))&&(_+=S+(b=g?d:(b=d,F.hasOwnProperty(b)?F[b]:(v=b.replace(ue,"-$1").toLowerCase().replace(pe,"-ms-"),F[b]=v)))+":",S=d,_+=g=null==y||"boolean"==typeof y||""===y?"":g||"number"!=typeof y||0===y||A.hasOwnProperty(S)&&A[S]?(""+y).trim():y+"px",S=";");m=_||null}d=null;e:if(y=u,-1===(g=r).indexOf("-"))g="string"==typeof y.is;else switch(g){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":g=!1;break e;default:g=!0}g?ge.hasOwnProperty(E)||(d=J(d=E)&&null!=m?d+'="'+D(m)+'"':""):(i=E,a=m,l=s=void 0,s=k.hasOwnProperty(i)?k[i]:null,d=(l=(l="style"!==i)&&(null!==s?0===s.type:2<i.length&&("o"===i[0]||"O"===i[0])&&("n"===i[1]||"N"===i[1])))||Z(i,a,s,!1)?"":null!==s?(i=s.attributeName,3===(l=s.type)||4===l&&!0===a?i+'=""':i+'="'+D(a=s.sanitizeURL?""+a:a)+'"'):J(i)?i+'="'+D(a)+'"':""),d&&(h+=" "+d)}}p||f&&(h+=' data-reactroot=""');var E=h;u="",se.hasOwnProperty(r)?E+="/>":(E+=">",u="</"+e.type+">");e:{if(null!=(p=c.dangerouslySetInnerHTML)){if(null!=p.__html){p=p.__html;break e}}else if("string"==typeof(p=c.children)||"number"==typeof p){p=D(p);break e}p=null}return null!=p?(c=[],fe.hasOwnProperty(r)&&"\n"===p.charAt(0)&&(E+="\n"),E+=p):c=I(c.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?ae(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:r,children:c,childIndex:0,context:t,footer:u}),this.previousWasTextNode=!1,E};var be=_e,e={renderToString:function(e){e=new be(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new be(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){throw Error(C(207))},renderToStaticNodeStream:function(){throw Error(C(208))},version:"16.14.0"};function _e(e,t){if(e=x.isValidElement(e)&&(e.type!==l||(e=e.props.children,x.isValidElement(e)))?[e]:I(e),e={type:null,domNamespace:ie,children:e,childIndex:0,context:W,footer:""},0===(n=m[0])){var n,r=m,o=2*(n=r.length);if(!(o<=65536))throw Error(C(304));var i=new Uint16Array(o);for(i.set(r),(m=i)[0]=n+1,r=n;r<o-1;r++)m[r]=r+1;m[o-1]=0}else m[0]=m[n];this.threadID=n,this.stack=[e],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}N.exports=e.default||e},function(e){e.exports=JSON.parse('{"name":"@innovaccer/rich-text-editor","version":"3.0.2","description":"A rich text on top of DraftJS.","main":"dist/rich-text-editor.js","module":"dist/rich-text-editor.js","author":"Innovaccer","devDependencies":{"@babel/core":"^7.7.4","@babel/plugin-proposal-class-properties":"^7.12.1","@babel/preset-env":"^7.7.4","@babel/preset-react":"^7.7.4","@babel/register":"^7.7.4","@innovaccer/design-system":"^3.1.0","@storybook/addon-docs":"6.5.10","@storybook/addon-essentials":"6.5.10","@storybook/react":"6.5.10","@storybook/storybook-deployer":"2.8.12","autoprefixer":"^10.4.20","babel-eslint":"^10.0.3","babel-loader":"^8.0.6","babel-plugin-transform-flow-strip-types":"^6.22.0","chai":"^4.2.0","cross-env":"^6.0.3","css-loader":"^3.2.1","draftjs-to-markdown":"^0.6.0","embed-video":"^2.0.4","enzyme":"^3.10.0","enzyme-adapter-react-16":"^1.15.1","eslint":"^6.7.2","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-mocha":"^6.2.2","eslint-plugin-react":"^7.17.0","file-loader":"^5.0.2","flow-bin":"^0.113.0","gulp":"5.0.0","gulp-clean":"^0.4.0","gulp-concat":"^2.6.1","gulp-postcss":"^9.0.0","gulp-sourcemaps":"2.6.5","install":"^0.13.0","jsdom":"^16.4.0","mini-css-extract-plugin":"^0.8.0","mocha":"^10.7.3","postcss-color-mod-function":"^3.0.3","postcss-loader":"^8.1.1","precss":"^4.0.0","prettier":"^2.8.8","react":"^16.12.0","react-addons-test-utils":"^15.6.2","react-dom":"16.14.0","react-test-renderer":"^16.12.0","rimraf":"^3.0.0","sinon":"^7.5.0","style-loader":"^1.0.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^3.0.0","webpack":"4.46.0","webpack-bundle-analyzer":"^4.0.0","webpack-cli":"^3.3.10","webpack-s3-plugin":"^1.2.0-rc.0"},"dependencies":{"classnames":"^2.2.6","draft-js":"^0.11.7","draftjs-to-html":"^0.9.0","draftjs-utils":"^0.10.2","html-to-draftjs":"^1.5.0","immutable":"^4.0.0-rc.12","linkify-it":"^2.2.0","prop-types":"^15.7.2","redraft":"^0.10.2"},"peerDependencies":{"@innovaccer/design-system":"^3.1.0","react":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x","react-dom":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x"},"scripts":{"build:css":"cp ./node_modules/@innovaccer/design-system/css/dist/* dist/","build-css":"gulp --gulpfile config/gulpfile.js build","clean":"rimraf dist && rimraf public","build:webpack":"NODE_OPTIONS=--openssl-legacy-provider cross-env NODE_ENV=production webpack --mode production --config config/webpack.config.js","build":"npm run build-css && npm run build:webpack","test":"cross-env BABEL_ENV=test mocha --require config/test-compiler.js config/test-setup.js src/**/*Test.js","lint":"prettier --write \\"**/*.{js,jsx,ts,tsx,json,css}\\"","lintdocs":"eslint docs/src","flow":"flow; test $? -eq 0 -o $? -eq 2","check":"npm run lint && npm run flow","storybook":"NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6006","build-storybook":"NODE_OPTIONS=--openssl-legacy-provider build-storybook","deploy-storybook":"NODE_OPTIONS=--openssl-legacy-provider storybook-to-ghpages","version":"./scripts/version.sh","prettier":"prettier --write \\"**/*.{js,jsx,ts,tsx,json,css}\\""},"engines":{"node":">=20.15.0","npm":">=10.7.0"},"overrides":{"react-dom":"16.14.0","webpack":"4.46.0"},"license":"MIT"}')},function(N,e,o){o.r(e),o.d(e,"Editor",function(){return aa}),o.d(e,"EditorPreview",function(){return Da});function L(e,t,n){return t=new RegExp(t,"g"),e.replace(t,n)}var i=o(0),g=o.n(i),e=o(1),a=o.n(e),d=o(2),l=o(4),e=o(39),j=o.n(e),e=o(93),B=o.n(e),z=o(24),e=o(5),y=o.n(e);function V(e){return(V="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})(e)}function H(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,U(r.key),r)}}function K(e,t,n){return t&&H(e.prototype,t),n&&H(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function t(e,t,n){(t=U(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function U(e){e=((e,t)=>{if("object"!=V(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=V(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==V(e)?e:e+""}var W=K(function e(){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");t(this,"callBacks",[]),t(this,"suggestionCallback",void 0),t(this,"editorFlag",!1),t(this,"suggestionFlag",!1),t(this,"closeAllModals",function(t){n.callBacks.forEach(function(e){e(t)})}),t(this,"init",function(e){e=document.getElementById(e);e&&e.addEventListener("click",function(){n.editorFlag=!0}),document&&(document.addEventListener("click",function(){n.editorFlag?n.editorFlag=!1:(n.closeAllModals(),n.suggestionCallback&&n.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&n.closeAllModals()}))}),t(this,"onEditorClick",function(){n.closeModals(),!n.suggestionFlag&&n.suggestionCallback?n.suggestionCallback():n.suggestionFlag=!1}),t(this,"closeModals",function(e){n.closeAllModals(e)}),t(this,"registerCallBack",function(e){n.callBacks.push(e)}),t(this,"deregisterCallBack",function(t){n.callBacks=n.callBacks.filter(function(e){return e!==t})}),t(this,"setSuggestionCallback",function(e){n.suggestionCallback=e}),t(this,"removeSuggestionCallback",function(){n.suggestionCallback=void 0}),t(this,"onSuggestionClick",function(){n.suggestionFlag=!0})});function G(e){return(G="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})(e)}function q(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)}}function Y(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(e,t,n){(t=$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function $(e){e=((e,t)=>{if("object"!=G(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=G(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==G(e)?e:e+""}var J,Z=Y(function e(){var t=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");n(this,"inputFocused",!1),n(this,"editorMouseDown",!1),n(this,"onEditorMouseDown",function(){t.editorFocused=!0}),n(this,"onInputMouseDown",function(){t.inputFocused=!0}),n(this,"isEditorBlur",function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)}),n(this,"isEditorFocused",function(){return!t.inputFocused||(t.inputFocused=!1)}),n(this,"isToolbarFocused",function(){return!t.editorFocused||(t.editorFocused=!1)}),n(this,"isInputFocused",function(){return t.inputFocused})}),X=[],Q={onKeyDown:function(t){X.forEach(function(e){e(t)})},registerCallBack:function(e){X.push(e)},deregisterCallBack:function(t){X=X.filter(function(e){return e!==t})}},ee=function(){J=!0},te=function(){J=!1},ne=function(){return J};function re(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function oe(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function s(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function u(e){e.stopPropagation()}function ie(e,t,n){return e&&e.filter(function(e){return!t||0===t.length||(n?0<=e.value.indexOf(t):0<=e.value.toLowerCase().indexOf(t&&t.toLowerCase()))})}function ae(e){if(e&&"string"==typeof e){e=e.trim();if(""!==e){for(var t=e.toLowerCase(),n=0,r=["javascript:","data:","vbscript:","file:","about:"];n<r.length;n++)if(t.startsWith(r[n]))return;for(var o,i,a=0,s=["https://","http://","mailto:","tel:"];a<s.length;a++)if(t.startsWith(s[a]))return 1;return e.startsWith("/")||e.startsWith("#")||e.startsWith("./")||e.startsWith("../")?1:(o=e.indexOf(":"),i=e.indexOf("/"),(-1===o||!(-1===i||o<i))&&(o=e.includes("."),i=e.includes("/"),!e.includes(" "))&&(o||i)?/^[a-zA-Z0-9][a-zA-Z0-9._\-/:]*$/.test(e):void 0)}}}function se(e){return e&&"string"==typeof e&&""!==(e=e.trim())&&ae(e)?e:"#"}function le(e){return e[e.options[0]].icon}var ce=function(e,n){var r;return e&&void 0===n?e:(r={},oe(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=ce(t,n[e]):r[e]=void 0!==n[e]?n[e]:t}),r)};function ue(e){return(ue="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})(e)}function pe(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,ge(r.key),r)}}function fe(e,t,n){t=de(t);var r=e,t=he()?Reflect.construct(t,n||[],de(e).constructor):t.apply(e,n);if(!t||"object"!=ue(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function he(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(he=function(){return!!e})()}function de(e){return(de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function me(e,t){return(me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t,n){return(t=ge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ge(e){e=((e,t)=>{if("object"!=ue(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ue(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ue(e)?e:e+""}var p=(e=>{function a(){var i,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return c(i=fe(this,a,[].concat(r)),"onClick",function(){var e=i.props;e.disabled||(0,e.onClick)(e.value)}),c(i,"handleKeyDown",function(e){var t=new Set(["Enter","Space","Spacebar"," "]),n=i.props,r=n.disabled,o=n.onClick,n=n.value;r||t.has(e.key)&&(e.preventDefault(),o(n,e))}),i}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&me(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.activeClassName,o=e.active,i=e.disabled,e=e["aria-label"],r=y()(c(c(c(c({},"Editor-option",!0),"Editor-option--active",o&&!r),"".concat(r),o&&r),"Editor-option--disabled",i),n);return g.a.createElement("div",{"aria-label":e,onKeyDown:this.handleKeyDown,tabIndex:0,className:r,onClick:this.onClick,"aria-selected":o},t)}}])&&pe(n.prototype,e),t&&pe(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),m=(c(p,"propTypes",{onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string,tabIndex:a.a.number}),c(p,"defaultProps",{activeClassName:""}),o(3));function ye(e){return(ye="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})(e)}function ve(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,we(r.key),r)}}function be(e,t,n){t=Se(t);var r=e,t=_e()?Reflect.construct(t,n||[],Se(e).constructor):t.apply(e,n);if(!t||"object"!=ye(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function _e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_e=function(){return!!e})()}function Se(e){return(Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ee(e,t){return(Ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t,n){return(t=we(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(e){e=((e,t)=>{if("object"!=ye(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ye(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ye(e)?e:e+""}var v=(e=>{function t(e){var i;if(this instanceof t)return f(i=be(this,t,[e]),"buttonRef",null),f(i,"listRef",null),f(i,"handleOutsideClick",function(e){i.listRef.current&&!i.listRef.current.contains(e.target)&&i.toggleExpansion()}),f(i,"onChange",function(e){var t=i.props.onChange;t&&t(e),i.toggleExpansion()}),f(i,"setHighlighted",function(e){i.setState({highlighted:e})}),f(i,"focusTrigger",function(){var e;null!=(e=i.buttonRef.current)&&e.focus()}),f(i,"focusTriggerOnClose",function(e){"Escape"!==e.key&&"Enter"!==e.key||(i.toggleExpansion(),i.focusTrigger())}),f(i,"toggleExpansion",function(){var e=i.props,t=e.doExpand,n=e.doCollapse;(e.expanded?n:t)()}),f(i,"handleExpand",function(e){i.props.onExpandEvent(e)}),f(i,"handleListKeyDown",function(e){e.preventDefault();var t,n=i.state.highlighted,r=i.props.children[1],o=e.key;"ArrowDown"===o||"ArrowUp"===o?(t=r.length-1,i.setState(function(e){return{highlighted:"ArrowDown"===o?Math.min(e.highlighted+1,t):Math.max(e.highlighted-1,0)}})):"Enter"===o&&(e=r[n].props.value,r=i.props.onChange)&&r(e)}),i.buttonRef=g.a.createRef(),i.listRef=g.a.createRef(),i.state={highlighted:-1},i;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ee(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&(this.setState({highlighted:-1}),document.removeEventListener("keydown",this.focusTriggerOnClose),document.removeEventListener("click",this.handleOutsideClick)),!e.expanded&&t&&(document.addEventListener("keydown",this.focusTriggerOnClose),document.addEventListener("click",this.handleOutsideClick),this.setState({highlighted:0}),this.listRef.current.focus())}},{key:"render",value:function(){var n=this,e=this.props,t=e.expanded,r=e.children,o=e.className,i=e.optionWrapperClassName,a=e.triggerClassName,s=e.ariaLabel,e=e.menu,l=this.state.highlighted,c=r.slice(1,r.length),o=y()(f(f({},"Editor-dropdown",!0),"Editor-dropdown--expanded",t),o);return g.a.createElement("div",{className:o},g.a.createElement(m.a,{ref:this.buttonRef,appearance:"transparent","aria-expanded":t,"aria-label":s||"Editor-dropdown",className:a,onClick:this.handleExpand},r[0],!e&&g.a.createElement(m.g,{name:"keyboard_arrow_down"})),t&&g.a.createElement("ul",{tabIndex:1,ref:this.listRef,onKeyDown:this.handleListKeyDown,className:y()("Editor-dropdown-optionWrapper",i),onClick:u},g.a.Children.map(c,function(e,t){return e&&g.a.cloneElement(e,{onSelect:n.onChange,highlighted:l===t,setHighlighted:n.setHighlighted,highlightedClassName:"Editor-dropdown-option--highlight",index:t})})))}}])&&ve(r.prototype,e),n&&ve(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function xe(e){return(xe="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})(e)}function Ce(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,Te(r.key),r)}}function ke(e,t,n){t=Oe(t);var r=e,t=De()?Reflect.construct(t,n||[],Oe(e).constructor):t.apply(e,n);if(!t||"object"!=xe(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function De(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(De=function(){return!!e})()}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pe(e,t){return(Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t,n){return(t=Te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Te(e){e=((e,t)=>{if("object"!=xe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=xe(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==xe(e)?e:e+""}f(v,"propTypes",{children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,menu:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,triggerClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string});var b=(e=>{function a(){var i,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return h(i=ke(this,a,[].concat(r)),"onClick",function(e){var t=i.props,n=t.onSelect,r=t.onClick,o=t.value;t.disabled||(n&&n(o),r&&(e.stopPropagation(),r(o)))}),h(i,"setHighlighted",function(){i.props.setHighlighted(i.props.index)}),h(i,"resetHighlighted",function(){(0,i.props.setHighlighted)(-1)}),i}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Pe(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.active,r=e.disabled,o=e.highlighted,i=e.className,a=e.isCheckbox,s=e.activeClassName,l=e.disabledClassName,e=e.highlightedClassName,s=y()(h(h(h(h({},"Editor-dropdown-option",!0),"Editor-dropdown-option--active ".concat(s),n&&!a),"".concat(e),o),"".concat(l),r),i);return g.a.createElement("li",{tabIndex:1,className:s,onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick},t)}}])&&Ce(n.prototype,e),t&&Ce(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function Me(e){return(Me="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})(e)}function Ae(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,je(r.key),r)}}function Ie(e,t,n){t=Fe(t);var r=e,t=Re()?Reflect.construct(t,n||[],Fe(e).constructor):t.apply(e,n);if(!t||"object"!=Me(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Re=function(){return!!e})()}function Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ne(e,t){return(Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Le(e,t,n){return(t=je(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(e){e=((e,t)=>{if("object"!=Me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Me(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Me(e)?e:e+""}h(b,"propTypes",{children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string,isCheckbox:a.a.bool}),h(b,"defaultProps",{activeClassName:"",disabledClassName:"",highlightedClassName:""});var Be=(e=>{function n(){var e=this,t=n;if(e instanceof t)return Ie(this,n,arguments);throw new TypeError("Cannot call a class as a function")}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ne(r,e),r=n,(e=[{key:"renderInDropdown",value:function(){var e=this.props,i=e.config,a=e.currentState,s=i.options.length-i.max;return g.a.createElement(m.o,{tooltip:"More formatting"},g.a.createElement(v,{onChange:e.onChange,expanded:e.expanded,doExpand:e.doExpand,doCollapse:e.doCollapse,onExpandEvent:e.onExpandEvent,triggerClassName:"Editor-textDecoration-moreIcon",menu:!0},g.a.createElement(m.g,{name:"more_horizon",size:20}),i.options.slice(i.max,i.options.length).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.icon,r=r.label;return g.a.createElement(b,{key:t,value:e,active:n,isCheckbox:1<s},1<s?g.a.createElement(m.b,{checked:n,label:r}):g.a.createElement(g.a.Fragment,null,g.a.createElement(m.g,{size:20,name:o,className:"mr-4",appearance:n?"white":"default"}),g.a.createElement(m.n,{appearance:n?"white":"default"},r)))})))}},{key:"render",value:function(){var e=this.props,i=e.config,a=e.currentState,s=e.onChange,e=e.className,t=i.options.length-i.max,n=i.max,e=y()(Le({},"Editor-textDecoration",!0),e);return g.a.createElement("div",{className:e},i.options.slice(0,n).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.title,r=r.icon;return g.a.createElement(m.o,{tooltip:o},g.a.createElement(p,{"aria-label":"".concat(e," button"),role:"button",tabIndex:0,key:t,value:e,onClick:s,active:n,className:"mr-2"},g.a.createElement(m.g,{name:r,size:20,appearance:n?"info":"default"})))}),0<t&&this.renderInDropdown())}}])&&Ae(r.prototype,e),t&&Ae(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function ze(e){return(ze="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})(e)}function Ve(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,qe(r.key),r)}}function He(e,t,n){t=Ue(t);var r=e,t=Ke()?Reflect.construct(t,n||[],Ue(e).constructor):t.apply(e,n);if(!t||"object"!=ze(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ke=function(){return!!e})()}function Ue(e){return(Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function We(e,t){return(We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ge(e,t,n){(t=qe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function qe(e){e=((e,t)=>{if("object"!=ze(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ze(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ze(e)?e:e+""}Le(Be,"propTypes",{expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,className:a.a.string});e=(e=>{function t(e){var o;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");Ge(o=He(this,t,[e]),"expandCollapse",function(){o.setState(function(e){return{expanded:!e.expanded}})}),Ge(o,"toggleInlineStyle",function(e){var t=o.props,n=t.editorState,t=t.onChange,e=e.toUpperCase(),r=Object(l.getSelectionEntity)(n);if(r){r=n.getCurrentContent().getEntity(r).getType();if("MENTION"===r||"LINK"===r)return}r=d.RichUtils.toggleInlineStyle(n,e);r&&t(r)}),Ge(o,"changeKeys",function(e){var n;if(e)return n={},oe(e,function(e,t){n["CODE"===e?"monospace":e.toLowerCase()]=t}),n}),Ge(o,"doExpand",function(){o.setState({expanded:!0})}),Ge(o,"doCollapse",function(){o.setState({expanded:!1})});e=o.props,e=e.editorState;return o.state={currentStyles:e?o.changeKeys(Object(l.getSelectionInlineStyle)(e)):{}},o}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&We(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(l.getSelectionInlineStyle)(t))})}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.expanded,o=t.component||Be;return g.a.createElement(o,{config:t,currentState:n.currentStyles,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle,className:e.className})}}])&&Ve(r.prototype,e),n&&Ve(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function Ye(e){return(Ye="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})(e)}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,tt(r.key),r)}}function Je(e,t,n){t=Xe(t);var r=e,t=Ze()?Reflect.construct(t,n||[],Xe(e).constructor):t.apply(e,n);if(!t||"object"!=Ye(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ze=function(){return!!e})()}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qe(e,t){return(Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function et(e,t,n){(t=tt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function tt(e){e=((e,t)=>{if("object"!=Ye(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ye(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Ye(e)?e:e+""}Ge(e,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,className:a.a.string});var r=(e=>{function t(e){if(this instanceof t)return et(e=Je(this,t,[e]),"getBlockTypes",function(){return[{label:"H1",size:"xxl",displayName:"Heading 1"},{label:"H2",size:"xl",displayName:"Heading 2"},{label:"H3",size:"l",displayName:"Heading 3"},{label:"H4",size:"m",displayName:"Heading 4"}]}),e.state={blockTypes:e.getBlockTypes()},e;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Qe(r,e),r=t,(e=[{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config.icon,r=t.currentState.blockType;return g.a.createElement("div",{className:t.className,"aria-label":"Editor-block-control"},g.a.createElement(m.o,{tooltip:"Text style"},g.a.createElement(v,{onChange:t.onChange,expanded:t.expanded,doExpand:t.doExpand,doCollapse:t.doCollapse,onExpandEvent:t.onExpandEvent,triggerClassName:"Editor-heading-trigger"},g.a.createElement(m.g,{name:n,size:20}),e.map(function(e,t){return g.a.createElement(b,{index:t,active:r===e.label,value:e.label,key:t},g.a.createElement(m.e,{size:e.size,className:"Editor-heading-option",appearance:r===e.label?"white":"default"},e.displayName))}))))}},{key:"render",value:function(){var t=this.props.config,e=this.state.blockTypes.filter(function(e){e=e.label;return-1<t.options.indexOf(e)});return this.renderInDropdown(e)}}])&&$e(r.prototype,e),n&&$e(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),nt=(et(r,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,className:a.a.string}),r);function rt(e){return(rt="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})(e)}function ot(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,ut(r.key),r)}}function it(e,t,n){t=st(t);var r=e,t=at()?Reflect.construct(t,n||[],st(e).constructor):t.apply(e,n);if(!t||"object"!=rt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(at=function(){return!!e})()}function st(e){return(st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lt(e,t){return(lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ct(e,t,n){(t=ut(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ut(e){e=((e,t)=>{if("object"!=rt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=rt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==rt(e)?e:e+""}r=(e=>{function t(e){var o;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");ct(o=it(this,t,[e]),"expandCollapse",function(){o.setState(function(e){return{expanded:!e.expanded}})}),ct(o,"blocksTypes",[{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"}]),ct(o,"doExpand",function(){o.setState({expanded:!0})}),ct(o,"doCollapse",function(){o.setState({expanded:!1})}),ct(o,"toggleBlockType",function(t){var e=o.blocksTypes.find(function(e){return e.label===t}).style,n=o.props,r=n.editorState,n=n.onChange,r=d.RichUtils.toggleBlockType(r,e);r&&n(r)});e=e.editorState;return o.state={expanded:!1,currentBlockType:e?Object(l.getSelectedBlocksType)(e):"unstyled"},o}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&lt(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(l.getSelectedBlocksType)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,o=n.currentBlockType,n=this.blocksTypes.find(function(e){return e.style===o});return g.a.createElement(nt,{config:t,currentState:{blockType:n&&n.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,className:e})}}])&&ot(r.prototype,e),n&&ot(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),ct(r,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object,config:a.a.object,className:a.a.string});o(202);function pt(e){return(pt="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})(e)}function ft(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,vt(r.key),r)}}function ht(e,t,n){t=mt(t);var r=e,t=dt()?Reflect.construct(t,n||[],mt(e).constructor):t.apply(e,n);if(!t||"object"!=pt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dt=function(){return!!e})()}function mt(e){return(mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gt(e,t){return(gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yt(e,t,n){(t=vt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function vt(e){e=((e,t)=>{if("object"!=pt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=pt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==pt(e)?e:e+""}var bt=(e=>{function i(){var e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return yt(e=ht(this,i,[].concat(r)),"state",{defaultFontSize:void 0}),e}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&gt(n,e),n=i,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=(e=window.getComputedStyle(e[0]).getPropertyValue("font-size")).substring(0,e.length-2),this.setState({defaultFontSize:e}))}},{key:"renderCustomTrigger",value:function(){return g.a.createElement("div",null,"Riya")}},{key:"render",value:function(){var e=this.props,t=e.config,n=(t.icon,t.className),t=t.options,e=e.onChange,r=this.props.currentState.fontSize,o=this.state.defaultFontSize,o=Number(o);r||t&&t.indexOf(o);return g.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},g.a.createElement(m.d,{className:y()("rdw-fontsize-dropdown",n),onChange:e,customTrigger:this.renderCustomTrigger,icon:"text_fields",placeholder:"",options:t.map(function(e){return{label:e,value:e,selected:14===e}})}))}}])&&ft(n.prototype,e),t&&ft(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function _t(e){return(_t="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})(e)}function St(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,Dt(r.key),r)}}function Et(e,t,n){t=xt(t);var r=e,t=wt()?Reflect.construct(t,n||[],xt(e).constructor):t.apply(e,n);if(!t||"object"!=_t(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wt=function(){return!!e})()}function xt(e){return(xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ct(e,t){return(Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kt(e,t,n){(t=Dt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Dt(e){e=((e,t)=>{if("object"!=_t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=_t(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==_t(e)?e:e+""}yt(bt,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object});var Ot=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");kt(r=Et(this,n,[e]),"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),kt(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),kt(r,"doExpand",function(){r.setState({expanded:!0})}),kt(r,"doCollapse",function(){r.setState({expanded:!1})}),kt(r,"toggleFontSize",function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(l.toggleCustomInlineStyle)(n,"fontSize",e);n&&t(n)});var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontSize:t?Object(l.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE:void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ct(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(l.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontSize,o=t.component||bt,n=n&&Number(n.substring(9));return g.a.createElement(o,{config:t,fontSize:!0,translations:e,currentState:{fontSize:n},onChange:this.toggleFontSize,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&St(r.prototype,e),t&&St(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);kt(Ot,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object}),o(203);function Pt(e){return(Pt="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})(e)}function Tt(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,Nt(r.key),r)}}function Mt(e,t,n){t=It(t);var r=e,t=At()?Reflect.construct(t,n||[],It(e).constructor):t.apply(e,n);if(!t||"object"!=Pt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function At(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(At=function(){return!!e})()}function It(e){return(It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Rt(e,t){return(Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e,t,n){(t=Nt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Nt(e){e=((e,t)=>{if("object"!=Pt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Pt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Pt(e)?e:e+""}var _=(e=>{function i(){var e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ft(e=Mt(this,i,[].concat(r)),"state",{defaultFontFamily:void 0}),e}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Rt(n,e),n=i,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=window.getComputedStyle(e[0]).getPropertyValue("font-family"),this.setState({defaultFontFamily:e}))}},{key:"render",value:function(){var t=this.state.defaultFontFamily,e=this.props,n=e.config,r=n.className,o=n.dropdownClassName,i=n.options,n=n.title,a=e.translations,s=e.onChange,l=e.expanded,c=e.doCollapse,u=e.onExpandEvent,e=e.doExpand,p=this.props.currentState.fontFamily||i&&t&&i.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&t;return g.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},g.a.createElement(v,{className:y()("rdw-fontfamily-dropdown",r),optionWrapperClassName:y()("rdw-fontfamily-optionwrapper",o),onChange:s,expanded:l,doExpand:e,doCollapse:c,onExpandEvent:u,title:n||a["components.controls.fontfamily.fontfamily"]},g.a.createElement("span",{className:"rdw-fontfamily-placeholder"},p||a["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return g.a.createElement(b,{active:p===e,value:e,key:t},e)})))}}])&&Tt(n.prototype,e),t&&Tt(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Lt=(Ft(_,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object}),_);function jt(e){return(jt="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})(e)}function Bt(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,Wt(r.key),r)}}function zt(e,t,n){t=Ht(t);var r=e,t=Vt()?Reflect.construct(t,n||[],Ht(e).constructor):t.apply(e,n);if(!t||"object"!=jt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Vt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vt=function(){return!!e})()}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kt(e,t){return(Kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ut(e,t,n){(t=Wt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Wt(e){e=((e,t)=>{if("object"!=jt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=jt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==jt(e)?e:e+""}_=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");Ut(r=zt(this,n,[e]),"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),Ut(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),Ut(r,"doExpand",function(){r.setState({expanded:!0})}),Ut(r,"doCollapse",function(){r.setState({expanded:!1})}),Ut(r,"toggleFontFamily",function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(l.toggleCustomInlineStyle)(n,"fontFamily",e);n&&t(n)});var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontFamily:t?Object(l.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY:void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Kt(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(l.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontFamily,o=t.component||Lt,n=n&&n.substring(11);return g.a.createElement(o,{translations:e,config:t,currentState:{fontFamily:n},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Bt(r.prototype,e),t&&Bt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function Gt(e){return(Gt="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})(e)}function qt(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,Qt(r.key),r)}}function Yt(e,t,n){t=Jt(t);var r=e,t=$t()?Reflect.construct(t,n||[],Jt(e).constructor):t.apply(e,n);if(!t||"object"!=Gt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function $t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($t=function(){return!!e})()}function Jt(e){return(Jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zt(e,t){return(Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Xt(e,t,n){return(t=Qt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qt(e){e=((e,t)=>{if("object"!=Gt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Gt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Gt(e)?e:e+""}Ut(_,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object});var en=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Xt(t=Yt(this,a,[].concat(o)),"options",["unordered","ordered"]),Xt(t,"toggleBlockType",function(e){(0,t.props.onChange)(e)}),t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Zt(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,e=e.className,r=(t.options,t.unordered),t=t.ordered,e=y()(Xt({},"d-flex",!0),e);return g.a.createElement("div",{className:e},g.a.createElement(m.o,{tooltip:r.title},g.a.createElement(p,{value:"unordered",onClick:this.toggleBlockType,active:"unordered"===n,className:"mr-2"},g.a.createElement(m.g,{appearance:"unordered"===n?"info":"default",name:r.icon,size:20}))),g.a.createElement(m.o,{tooltip:t.title},g.a.createElement(p,{value:"ordered",onClick:this.toggleBlockType,active:"ordered"===n},g.a.createElement(m.g,{appearance:"ordered"===n?"info":"default",name:t.icon,size:20}))))}}])&&qt(n.prototype,e),t&&qt(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function tn(e){return(tn="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})(e)}function nn(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,ln(r.key),r)}}function rn(e,t,n){t=an(t);var r=e,t=on()?Reflect.construct(t,n||[],an(e).constructor):t.apply(e,n);if(!t||"object"!=tn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function on(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(on=function(){return!!e})()}function an(e){return(an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function S(e,t,n){(t=ln(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ln(e){e=((e,t)=>{if("object"!=tn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=tn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==tn(e)?e:e+""}Xt(en,"propTypes",{expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,className:a.a.string});var cn=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");S(r=rn(this,n,[e]),"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),S(r,"onChange",function(e){"unordered"===e?r.toggleBlockType("unordered-list-item"):"ordered"===e?r.toggleBlockType("ordered-list-item"):"indent"===e?r.adjustDepth(1):r.adjustDepth(-1)}),S(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),S(r,"doExpand",function(){r.setState({expanded:!0})}),S(r,"doCollapse",function(){r.setState({expanded:!1})}),S(r,"toggleBlockType",function(e){var t=r.props,n=t.onChange,t=d.RichUtils.toggleBlockType(t.editorState,e);t&&n(t)}),S(r,"adjustDepth",function(e){var t=r.props,n=t.onChange,t=t.editorState,t=Object(l.changeDepth)(t,e,4);t&&n(t)}),S(r,"isIndentDisabled",function(){var e=r.props.editorState,t=r.state.currentBlock,e=Object(l.getBlockBeforeSelectedBlock)(e);return!e||!Object(l.isListBlock)(t)||e.get("type")!==t.get("type")||e.get("depth")<t.get("depth")}),S(r,"isOutdentDisabled",function(){var e=r.state.currentBlock;return!e||!Object(l.isListBlock)(e)||e.get("depth")<=0});var e=r.props,t=e.editorState,e=e.modalHandler;return r.state={expanded:!1,currentBlock:t?Object(l.getSelectedBlock)(t):void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&sn(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(l.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,t=t.className,o=this.state,i=o.expanded,o=o.currentBlock;return"unordered-list-item"===o.get("type")?e="unordered":"ordered-list-item"===o.get("type")&&(e="ordered"),g.a.createElement(en,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&&nn(r.prototype,e),t&&nn(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);S(cn,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object,className:a.a.string}),o(204);function un(e){return(un="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})(e)}function pn(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,gn(r.key),r)}}function fn(e,t,n){t=dn(t);var r=e,t=hn()?Reflect.construct(t,n||[],dn(e).constructor):t.apply(e,n);if(!t||"object"!=un(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function hn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hn=function(){return!!e})()}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mn(e,t){return(mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function gn(e){e=((e,t)=>{if("object"!=un(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=un(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==un(e)?e:e+""}var yn=(e=>{function n(){var e=this,t=n;if(e instanceof t)return fn(this,n,arguments);throw new TypeError("Cannot call a class as a function")}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&mn(r,e),r=n,(e=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,i=t.right,a=t.justify,t=t.className,s=e.onChange,l=e.currentState.textAlignment,e=e.translations;return g.a.createElement("div",{className:y()("rdw-text-align-wrapper",t),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&g.a.createElement(p,{value:"left",className:y()(r.className),active:"left"===l,onClick:s,title:r.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&g.a.createElement(p,{value:"center",className:y()(o.className),active:"center"===l,onClick:s,title:o.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&g.a.createElement(p,{value:"right",className:y()(i.className),active:"right"===l,onClick:s,title:i.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&g.a.createElement(p,{value:"justify",className:y()(a.className),active:"justify"===l,onClick:s,title:a.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:a.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState.textAlignment,s=e.onChange,e=e.translations,l=t.options,c=t.left,u=t.center,p=t.right,f=t.justify,h=t.className,d=t.dropdownClassName,m=t.title;return g.a.createElement(v,{className:y()("rdw-text-align-dropdown",h),optionWrapperClassName:y()(d),onChange:s,expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:m||e["components.controls.textalign.textalign"]},g.a.createElement("img",{src:a&&t[a]&&t[a].icon||le(t),alt:""}),0<=l.indexOf("left")&&g.a.createElement(b,{value:"left",active:"left"===a,className:y()("rdw-text-align-dropdownOption",c.className),title:c.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("center")&&g.a.createElement(b,{value:"center",active:"center"===a,className:y()("rdw-text-align-dropdownOption",u.className),title:u.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("right")&&g.a.createElement(b,{value:"right",active:"right"===a,className:y()("rdw-text-align-dropdownOption",p.className),title:p.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:p.icon,alt:""})),0<=l.indexOf("justify")&&g.a.createElement(b,{value:"justify",active:"justify"===a,className:y()("rdw-text-align-dropdownOption",f.className),title:f.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:f.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&pn(r.prototype,e),t&&pn(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function vn(e){return(vn="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})(e)}function bn(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,Cn(r.key),r)}}function _n(e,t,n){t=En(t);var r=e,t=Sn()?Reflect.construct(t,n||[],En(e).constructor):t.apply(e,n);if(!t||"object"!=vn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Sn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sn=function(){return!!e})()}function En(e){return(En=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wn(e,t){return(wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xn(e,t,n){(t=Cn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Cn(e){e=((e,t)=>{if("object"!=vn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=vn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==vn(e)?e:e+""}E=yn,w="propTypes",x={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object},(w=gn(w))in E?Object.defineProperty(E,w,{value:x,enumerable:!0,configurable:!0,writable:!0}):E[w]=x;var E=(e=>{function t(e){var r;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");xn(r=_n(this,t,[e]),"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),xn(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),xn(r,"doExpand",function(){r.setState({expanded:!0})}),xn(r,"doCollapse",function(){r.setState({expanded:!1})}),xn(r,"addBlockAlignmentData",function(e){var t=r.props,n=t.editorState,t=t.onChange;t(r.state.currentTextAlignment!==e?Object(l.setBlockData)(n,{"text-align":e}):Object(l.setBlockData)(n,{"text-align":void 0}))});e=r.props.modalHandler;return r.state={currentTextAlignment:void 0},e.registerCallBack(r.expandCollapse),r}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&wn(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(l.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.expanded,o=t.component||yn;return g.a.createElement(o,{config:t,translations:e.translations,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:n.currentTextAlignment},onChange:this.addBlockAlignmentData})}}])&&bn(r.prototype,e),n&&bn(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function kn(e){return(kn="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})(e)}function Dn(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,In(r.key),r)}}function On(e,t,n){t=Tn(t);var r=e,t=Pn()?Reflect.construct(t,n||[],Tn(e).constructor):t.apply(e,n);if(!t||"object"!=kn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Pn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pn=function(){return!!e})()}function Tn(e){return(Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Mn(e,t){return(Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function An(e,t,n){(t=In(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function In(e){e=((e,t)=>{if("object"!=kn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=kn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==kn(e)?e:e+""}xn(E,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object});var w=(e=>{function t(e){var o;if(this instanceof t)return An(o=On(this,t,[e]),"onChange",function(e){var t=o.props,n=t.onChange;t.expanded&&n(o.state.currentStyle,e)}),An(o,"handleClick",function(e){var t=e.target.getAttribute("data-color");t&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))}),An(o,"handleKeyDown",function(e){var t=e.target.getAttribute("data-color");t&&"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))}),An(o,"renderModal",function(){var e=o.props,t=e.config.colors,e=e.currentState,n=e.color,r="color"===o.state.currentStyle?n:e.bgColor;return g.a.createElement("div",{className:"Editor-colorPicker",onClick:o.handleClick,onKeyDown:o.handleKeyDown},t.map(function(e,t){return g.a.createElement("div",{className:"Editor-colorPicker-circleWrapper"},g.a.createElement("div",{ref:0===t?o.ref:null,"data-color":e,tabIndex:0,key:t,style:{backgroundColor:e},className:"Editor-colorPicker-circle","aria-selected":r===e}),r===e&&g.a.createElement(m.g,{name:"check",appearance:"white",className:"Editor-colorPicker-selectedCircle"}))}))}),o.state={currentStyle:"color"},o.ref=g.a.createRef(),o;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Mn(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&(this.ref.current,this.setState({currentStyle:"color"}))}},{key:"render",value:function(){var e=this.props,t=e.expanded,n=g.a.createElement(m.o,{tooltip:"Text color"},g.a.createElement(p,{tabIndex:0,"aria-label":"Font colors",onClick:e.onToggle,active:t,activeClassName:"bg-secondary"},g.a.createElement(m.g,{name:"text_format",size:20})));return g.a.createElement("div",{className:e.className,"aria-haspopup":"true","aria-expanded":t},g.a.createElement(m.m,{trigger:n,position:"bottom-start",open:t},this.renderModal()))}}])&&Dn(r.prototype,e),n&&Dn(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),Rn=(An(w,"propTypes",{expanded:a.a.bool,onToggle:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,className:a.a.className}),w);function Fn(e){return(Fn="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})(e)}function Nn(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,Hn(r.key),r)}}function Ln(e,t,n){t=Bn(t);var r=e,t=jn()?Reflect.construct(t,n||[],Bn(e).constructor):t.apply(e,n);if(!t||"object"!=Fn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function jn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jn=function(){return!!e})()}function Bn(e){return(Bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zn(e,t){return(zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vn(e,t,n){(t=Hn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Hn(e){e=((e,t)=>{if("object"!=Fn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Fn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Fn(e)?e:e+""}var x=(e=>{function r(e){var i;if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");Vn(i=Ln(this,r,[e]),"state",{expanded:!1,currentColor:"var(--text)",currentBgColor:void 0}),Vn(i,"expandCollapse",function(){i.setState({expanded:!1})}),Vn(i,"toggleColorPicker",function(){i.setState(function(e){return{expanded:!e.expanded}})}),Vn(i,"toggleColor",function(t,n){var e=i.props,r=e.editorState,o=e.onChange,e=Object(l.getSelectionEntity)(r);if(e){e=r.getCurrentContent().getEntity(e).getType();if("MENTION"===e||"LINK"===e)return}i.setState(function(){return{currentColor:n?"color-".concat(n):"color-var(--text)",currentBgColor:Object(l.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR,expanded:!1}},function(){var e=Object(l.toggleCustomInlineStyle)(r,t,n);e&&o(e)})});var t=e.editorState,e=e.modalHandler,n={expanded:!1,currentColor:void 0,currentBgColor:void 0};return t&&(n.currentColor=Object(l.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR||"color-var(--text)",n.currentBgColor=Object(l.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR),i.state=n,e.registerCallBack(i.expandCollapse),i}var t,n=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&zn(n,e),n=r,(e=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.currentColor,o=n.currentBgColor,n=n.expanded,i=t.component||Rn,r=r&&r.substring(6),o=o&&o.substring(8);return g.a.createElement(i,{config:t,className:e,onChange:this.toggleColor,expanded:n,onToggle:this.toggleColorPicker,currentState:{color:r,bgColor:o}})}}])&&Nn(n.prototype,e),t&&Nn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),w=(Vn(x,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,className:a.a.string}),x),x=o(94),x=o.n(x);function Kn(e){return(Kn="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})(e)}function Un(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,Jn(r.key),r)}}function Wn(e,t,n){t=qn(t);var r=e,t=Gn()?Reflect.construct(t,n||[],qn(e).constructor):t.apply(e,n);if(!t||"object"!=Kn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Gn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gn=function(){return!!e})()}function qn(e){return(qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yn(e,t){return(Yn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $n(e,t,n){return(t=Jn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jn(e){e=((e,t)=>{if("object"!=Kn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Kn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Kn(e)?e:e+""}var C=(e=>{function a(){var n,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return $n(n=Wn(this,a,[].concat(o)),"state",{showModal:!1,editing:!1,linkTarget:"",linkTitle:"",linkTargetOption:n.props.config.defaultTargetOption}),$n(n,"addLink",function(){var e=n.props.onChange,t=n.state;e("link",t.linkTitle,t.linkTarget,t.linkTargetOption)}),$n(n,"updateValue",function(e){n.setState($n({},"".concat(e.target.name),e.target.value)),"linkTarget"===e.target.name&&n.props.onErrorClear&&n.props.onErrorClear()}),$n(n,"updateTargetOption",function(e){n.setState({linkTargetOption:e.target.checked?"_blank":"_self"})}),n}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Yn(n,e),n=a,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.currentState,n=t.link,t=t.selectionText;e.expanded&&!this.props.expanded&&(this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption}),this.props.onErrorClear)&&this.props.onErrorClear(),!e.expanded&&this.props.expanded&&(this.setState({showModal:!1,linkTarget:n&&n.target,linkTitle:n&&n.title||t,linkTargetOption:this.props.config.defaultTargetOption,editing:void 0!==n}),this.props.onErrorClear)&&this.props.onErrorClear()}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.onExpandEvent,e=e.errorMessage,n=this.state,r=n.linkTitle,o=n.linkTarget;return g.a.createElement("div",{className:"px-6 mt-6 mb-5",onClick:u},g.a.createElement(m.n,{weight:"strong",size:"large"},n.editing?"Edit":"Insert a"," link"),g.a.createElement(m.h,{icon:"insert_link",className:"mt-4",placeholder:"Paste a link to insert",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:o,autoComplete:"off",autoFocus:!0,onClick:u,error:!!e}),e&&g.a.createElement(m.f,{message:e,error:!0,className:"mt-2"}),g.a.createElement(m.h,{icon:"text_fields",className:"my-5",placeholder:"Text to display",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:r,autoComplete:"off",onClick:u}),g.a.createElement("div",{className:"d-flex justify-content-end"},g.a.createElement(m.a,{onClick:t,className:"mr-4"},"Cancel"),g.a.createElement(m.a,{onClick:this.addLink,disabled:!o||!r,appearance:"primary"},"Save")))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=e.inDropdown,o=e.onExpandEvent,e=e.expanded,t=r?g.a.createElement(b,null,g.a.createElement(m.g,{size:20,name:n,className:"mr-4"}),g.a.createElement(m.n,null,t.title)):g.a.createElement(m.o,{tooltip:"Link"},g.a.createElement(p,{value:"unordered-list-item",onClick:o,"aria-haspopup":"true","aria-expanded":e,active:e,activeClassName:"bg-secondary"},g.a.createElement(m.g,{name:n,size:20})));return g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e},g.a.createElement(m.m,{trigger:t,position:r?"right":"bottom",open:e,onToggle:o},this.renderAddLinkModal()))}}])&&Un(n.prototype,e),t&&Un(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Zn=($n(C,"propTypes",{expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,inDropdown:a.a.boolean,errorMessage:a.a.string,onErrorClear:a.a.func}),C);function Xn(e){return(Xn="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})(e)}function Qn(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,ar(r.key),r)}}function er(e,t,n){t=nr(t);var r=e,t=tr()?Reflect.construct(t,n||[],nr(e).constructor):t.apply(e,n);if(!t||"object"!=Xn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function tr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tr=function(){return!!e})()}function nr(e){return(nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rr(e,t){return(rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function or(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function ir(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?or(Object(n),!0).forEach(function(e){k(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function k(e,t,n){(t=ar(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ar(e){e=((e,t)=>{if("object"!=Xn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Xn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Xn(e)?e:e+""}function sr(e){var t=lr.match(e.target);return ir(ir({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var lr=x()(),C=(e=>{function n(e){var s;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");k(s=er(this,n,[e]),"onExpandEvent",function(){var e=!s.state.expanded;s.setState({expanded:e}),e||s.props.onCloseLinkPopover()}),k(s,"onChange",function(e,t,n,r){var o=s.props.config.linkCallback;"link"===e?"#"!==(o=se((e=(o||sr)({title:t,target:n,targetOption:r})).target))&&ae(o)?s.addLink(e.title,o,e.targetOption):s.setState({errorMessage:"Invalid URL"}):s.removeLink()}),k(s,"onErrorClear",function(){s.setState({errorMessage:null})}),k(s,"getCurrentValues",function(){var e,t=s.props.editorState,n=s.state,n=n.currentEntity,r=t.getCurrentContent(),o={};return n&&"LINK"===r.getEntity(n).get("type")&&(o.link={},e=n&&Object(l.getEntityRange)(t,n),o.link.target=n&&r.getEntity(n).get("data").url,o.link.targetOption=n&&r.getEntity(n).get("data").targetOption,o.link.title=e&&e.text),o.selectionText=Object(l.getSelectionText)(t),o}),k(s,"doExpand",function(){s.setState({expanded:!0})}),k(s,"expandCollapse",function(){s.setState({expanded:s.signalExpanded}),s.signalExpanded=!1}),k(s,"doCollapse",function(){s.setState({expanded:!1})}),k(s,"removeLink",function(){var e=s.props,t=e.editorState,e=e.onChange,n=s.state.currentEntity,r=t.getSelection();n&&(n=Object(l.getEntityRange)(t,n),r=r.getIsBackward()?r.merge({anchorOffset:n.end,focusOffset:n.start}):r.merge({anchorOffset:n.start,focusOffset:n.end}),e(d.RichUtils.toggleLink(t,r,null)))}),k(s,"addLink",function(e,t,n){var r=s.props,o=r.editorState,r=r.onChange,i=s.state.currentEntity,a=o.getSelection(),i=(i&&(i=Object(l.getEntityRange)(o,i),a=a.getIsBackward()?a.merge({anchorOffset:i.end,focusOffset:i.start}):a.merge({anchorOffset:i.start,focusOffset:i.end})),o.getCurrentContent().createEntity("LINK","MUTABLE",{url:t,targetOption:n,targetText:e}).getLastCreatedEntityKey()),t=d.Modifier.replaceText(o.getCurrentContent(),a,"".concat(e),null,i),n=d.EditorState.push(o,t,"insert-characters");a=n.getSelection().merge({anchorOffset:a.get("anchorOffset")+e.length,focusOffset:a.get("anchorOffset")+e.length}),n=d.EditorState.acceptSelection(n,a),t=d.Modifier.insertText(n.getCurrentContent(),a," ",n.getCurrentInlineStyle(),void 0),r(d.EditorState.push(n,t,"insert-characters")),s.setState({errorMessage:null}),s.props.onCloseLinkPopover(),s.doCollapse()});var e=s.props,t=e.editorState;return s.state={expanded:e.linkPopoverOpen,selectionText:void 0,link:void 0,currentEntity:t?Object(l.getSelectionEntity)(t):void 0,errorMessage:null},s}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&rr(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.editorState,t=t.linkPopoverOpen;n&&n!==e.editorState&&this.setState({currentEntity:Object(l.getSelectionEntity)(n)}),e.linkPopoverOpen!==t&&t&&this.setState({expanded:t})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown,n=this.state,r=n.expanded,n=n.errorMessage,o=this.getCurrentValues(),i=o.link;return g.a.createElement(Zn,{config:t,expanded:r,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:i,selectionText:o.selectionText},onChange:this.onChange,errorMessage:n,onErrorClear:this.onErrorClear})}}])&&Qn(r.prototype,e),t&&Qn(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),x=(k(C,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,onCloseLinkPopover:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,inDropdown:a.a.boolean,linkPopoverOpen:a.a.bool}),C);function cr(e){return(cr="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})(e)}function ur(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,gr(r.key),r)}}function pr(e,t,n){t=hr(t);var r=e,t=fr()?Reflect.construct(t,n||[],hr(e).constructor):t.apply(e,n);if(!t||"object"!=cr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function fr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fr=function(){return!!e})()}function hr(e){return(hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function dr(e,t){return(dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mr(e,t,n){(t=gr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function gr(e){e=((e,t)=>{if("object"!=cr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=cr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==cr(e)?e:e+""}C=(e=>{function t(e){var i;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");mr(i=pr(this,t,[e]),"addLink",function(){var e=i.props,t=e.editorState,n=e.onChange,e=e.mention.trigger,e=void 0===e?"@":e,r=i.state.currentEntity,o=t.getSelection(),r=(r&&(r=Object(l.getEntityRange)(t,r),o=o.getIsBackward()?o.merge({anchorOffset:r.end,focusOffset:r.start}):o.merge({anchorOffset:r.start,focusOffset:r.end})),d.Modifier.replaceText(t.getCurrentContent(),o,"".concat(e),t.getCurrentInlineStyle(),void 0)),o=d.EditorState.push(t,r,"insert-characters");n(d.EditorState.push(o,r,"insert-characters"))});e=i.props.editorState;return i.state={selectionText:void 0,link:void 0,currentEntity:e?Object(l.getSelectionEntity)(e):void 0},i}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&dr(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(l.getSelectionEntity)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,e=e.mention.label;return g.a.createElement(m.o,{tooltip:e||t.title},g.a.createElement(p,{value:"unordered-list-item",onClick:this.addLink,className:"mr-2"},g.a.createElement(m.g,{name:n,size:20})))}}])&&ur(r.prototype,e),n&&ur(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),mr(C,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,config:a.a.object,inDropdown:a.a.boolean});o(210);function yr(e){return(yr="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})(e)}function vr(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,xr(r.key),r)}}function br(e,t,n){t=Sr(t);var r=e,t=_r()?Reflect.construct(t,n||[],Sr(e).constructor):t.apply(e,n);if(!t||"object"!=yr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function _r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_r=function(){return!!e})()}function Sr(e){return(Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Er(e,t){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wr(e,t,n){return(t=xr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xr(e){e=((e,t)=>{if("object"!=yr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=yr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==yr(e)?e:e+""}var Cr=(e=>{function a(){var n,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return wr(n=br(this,a,[].concat(o)),"state",{embeddedLink:"",height:n.props.config.defaultSize.height,width:n.props.config.defaultSize.width}),wr(n,"onChange",function(){var e=n.props.onChange,t=n.state;e(t.embeddedLink,t.height,t.width)}),wr(n,"updateValue",function(e){n.setState(wr({},"".concat(e.target.name),e.target.value))}),n}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Er(n,e),n=a,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props;!t.expanded&&e.expanded&&(t=(e=t.config.defaultSize).height,this.setState({embeddedLink:"",height:t,width:e.width}))}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,e=e.width,r=this.props,o=r.config.popupClassName,i=r.doCollapse,r=r.translations;return g.a.createElement("div",{className:y()("rdw-embedded-modal",o),onClick:u},g.a.createElement("div",{className:"rdw-embedded-modal-header"},g.a.createElement("span",{className:"rdw-embedded-modal-header-option"},r["components.controls.embedded.embeddedlink"],g.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),g.a.createElement("div",{className:"rdw-embedded-modal-link-section"},g.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},g.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:r["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("div",{className:"rdw-embedded-modal-size"},g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:e,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),g.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!e},r["generic.add"]),g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:i},r["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return g.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},g.a.createElement(p,{className:y()(r),value:"unordered-list-item",onClick:i,title:t||e["components.controls.embedded.embedded"]},g.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&vr(n.prototype,e),t&&vr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),kr=(wr(Cr,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func}),Cr);function Dr(e){return(Dr="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})(e)}function Or(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,Ir(r.key),r)}}function Pr(e,t,n){t=Mr(t);var r=e,t=Tr()?Reflect.construct(t,n||[],Mr(e).constructor):t.apply(e,n);if(!t||"object"!=Dr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Tr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tr=function(){return!!e})()}function Mr(e){return(Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ar(e,t){return(Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function D(e,t,n){(t=Ir(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Ir(e){e=((e,t)=>{if("object"!=Dr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Dr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Dr(e)?e:e+""}Cr=(e=>{function i(){var a,e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return D(a=Pr(this,i,[].concat(r)),"state",{expanded:!1}),D(a,"onExpandEvent",function(){a.signalExpanded=!a.state.expanded}),D(a,"expandCollapse",function(){a.setState({expanded:a.signalExpanded}),a.signalExpanded=!1}),D(a,"doExpand",function(){a.setState({expanded:!0})}),D(a,"doCollapse",function(){a.setState({expanded:!1})}),D(a,"addEmbeddedLink",function(e,t,n){var r=a.props,o=r.editorState,i=r.onChange,r=r.config.embedCallback,r=r?r(e):e,e=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:r,height:t,width:n}).getLastCreatedEntityKey();i(d.AtomicBlockUtils.insertAtomicBlock(o,e," ")),a.doCollapse()}),a}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Ar(n,e),n=i,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||kr;return g.a.createElement(r,{config:t,translations:e.translations,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Or(n.prototype,e),t&&Or(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),D(Cr,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object});o(211);function Rr(e){return(Rr="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})(e)}function Fr(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,Vr(r.key),r)}}function Nr(e,t,n){t=jr(t);var r=e,t=Lr()?Reflect.construct(t,n||[],jr(e).constructor):t.apply(e,n);if(!t||"object"!=Rr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Lr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lr=function(){return!!e})()}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Br(e,t){return(Br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function zr(e,t,n){(t=Vr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Vr(e){e=((e,t)=>{if("object"!=Rr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Rr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Rr(e)?e:e+""}var Hr=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return zr(t=Nr(this,a,[].concat(o)),"onChange",function(e){(0,t.props.onChange)(e.target.innerHTML)}),t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Br(n,e),n=a,(e=[{key:"renderEmojiModal",value:function(){var n=this,e=this.props.config,t=e.popupClassName,e=e.emojis;return g.a.createElement("div",{className:y()("rdw-emoji-modal",t),onClick:u},e.map(function(e,t){return g.a.createElement("span",{key:t,className:"rdw-emoji-icon",alt:"",onClick:n.onChange},e)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=e.expanded,i=e.onExpandEvent;return g.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":o,title:t.title||e.translations["components.controls.emoji.emoji"]},g.a.createElement(p,{className:y()(r),value:"unordered-list-item",onClick:i},g.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&Fr(n.prototype,e),t&&Fr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Kr=(zr(Hr,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object}),Hr);function Ur(e){return(Ur="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})(e)}function Wr(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,Jr(r.key),r)}}function Gr(e,t,n){t=Yr(t);var r=e,t=qr()?Reflect.construct(t,n||[],Yr(e).constructor):t.apply(e,n);if(!t||"object"!=Ur(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function qr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qr=function(){return!!e})()}function Yr(e){return(Yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $r(e,t){return($r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function O(e,t,n){(t=Jr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Jr(e){e=((e,t)=>{if("object"!=Ur(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ur(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Ur(e)?e:e+""}Hr=(e=>{function a(){var r,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return O(r=Gr(this,a,[].concat(o)),"state",{expanded:!1}),O(r,"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),O(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),O(r,"doExpand",function(){r.setState({expanded:!0})}),O(r,"doCollapse",function(){r.setState({expanded:!1})}),O(r,"addEmoji",function(e){var t=r.props,n=t.editorState,t=t.onChange,e=d.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());t(d.EditorState.push(n,e,"insert-characters")),r.doCollapse()}),r}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&$r(n,e),n=a,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||Kr;return g.a.createElement(r,{config:t,translations:e.translations,onChange:this.addEmoji,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&Wr(n.prototype,e),t&&Wr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function Zr(e){return(Zr="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})(e)}function Xr(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,ro(r.key),r)}}function Qr(e,t,n){t=to(t);var r=e,t=eo()?Reflect.construct(t,n||[],to(e).constructor):t.apply(e,n);if(!t||"object"!=Zr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function eo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eo=function(){return!!e})()}function to(e){return(to=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function no(e,t){return(no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function P(e,t,n){return(t=ro(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ro(e){e=((e,t)=>{if("object"!=Zr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Zr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Zr(e)?e:e+""}O(Hr,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object});var oo=(e=>{function t(e){var i;if(this instanceof t)return P(i=Qr(this,t,[e]),"inputRef",null),P(i,"showImageUploadOption",function(){i.setState({uploadHighlighted:!0})}),P(i,"addImageFromState",function(){var e=i.state,t=e.imgSrc,e=e.alt,n=i.state,r=n.height,n=n.width,o=i.props.onChange;isNaN(r)||(r+="px"),isNaN(n)||(n+="px"),o(t,r,n,e)}),P(i,"showImageURLOption",function(){i.setState({uploadHighlighted:!1})}),P(i,"toggleShowImageLoading",function(){var e=!i.state.showImageLoading;i.setState({showImageLoading:e})}),P(i,"updateValue",function(e){i.setState(P({},"".concat(e.target.name),e.target.value))}),P(i,"selectImage",function(e){e.target.files&&0<e.target.files.length&&i.uploadImage(e.target.files[0]),e.target.value=null}),P(i,"uploadImage",function(e){i.toggleShowImageLoading(),(0,i.props.config.uploadCallback)(e).then(function(e){e=e.data;i.setState({showImageLoading:!1,dragEnter:!1,imgSrc:e.link||e.url},i.addImageFromState),i.fileUpload=!1}).catch(function(){i.setState({showImageLoading:!1,dragEnter:!1})})}),P(i,"fileUploadClick",function(e,t){i.inputRef.current&&t&&t.key&&i.inputRef.current.click(),i.fileUpload=!0}),P(i,"stopPropagation",function(e){i.fileUpload?i.fileUpload=!1:(e.preventDefault(),e.stopPropagation())}),P(i,"handleButtonClick",function(){i.inputRef&&i.inputRef.current&&i.inputRef.current.click()}),i.inputRef=g.a.createRef(),i.state={imgSrc:"",dragEnter:!1,uploadHighlighted:i.props.config.uploadEnabled&&!!i.props.config.uploadCallback,showImageLoading:!1,height:i.props.config.defaultSize.height,width:i.props.config.defaultSize.width,alt:""},i;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&no(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.title,t=t.inputAccept;return e.inDropdown?g.a.createElement(b,null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(m.g,{name:n,size:20,className:"mr-4"}),g.a.createElement(m.n,null,r)),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"})):g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e.expanded},g.a.createElement(m.o,{tooltip:r},g.a.createElement(p,{"aria-label":"add image",className:"mr-2",value:"unordered-list-item",onClick:this.fileUploadClick},g.a.createElement("span",null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(m.g,{name:n,size:20}))),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"}))))}}])&&Xr(r.prototype,e),n&&Xr(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),io=(P(oo,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,inDropdown:a.a.bool}),oo);function ao(e){return(ao="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})(e)}function so(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,ho(r.key),r)}}function lo(e,t,n){t=uo(t);var r=e,t=co()?Reflect.construct(t,n||[],uo(e).constructor):t.apply(e,n);if(!t||"object"!=ao(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function co(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(co=function(){return!!e})()}function uo(e){return(uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function po(e,t){return(po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function fo(e,t,n){(t=ho(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ho(e){e=((e,t)=>{if("object"!=ao(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ao(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ao(e)?e:e+""}function mo(e){var t=e.config,n=e.onChange,e=e.translations,r=t.icon,o=t.className,t=t.title;return g.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},g.a.createElement(p,{className:y()(o),onClick:n,title:t||e["components.controls.remove.remove"]},g.a.createElement("img",{src:r,alt:""})))}var oo=(e=>{function t(e){var s;if(this instanceof t)return fo(s=lo(this,t,[e]),"addImage",function(e,t,n,r){var o=s.props,i=o.editorState,a=o.onChange,e={src:e,height:t,width:n},t=(o.config.alt&&(e.alt=r),i.getCurrentContent().createEntity("IMAGE","MUTABLE",e).getLastCreatedEntityKey());a(d.AtomicBlockUtils.insertAtomicBlock(i,t," "))}),s.state={expanded:!1},s;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&po(r,e),r=t,(e=[{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.config;return g.a.createElement(io,{config:t,inDropdown:e.inDropdown,onChange:this.addImage})}}])&&so(r.prototype,e),n&&so(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),go=(fo(oo,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,config:a.a.object,inDropdown:a.a.bool}),o(212),mo.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object},mo);function yo(e){return(yo="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})(e)}function vo(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,wo(r.key),r)}}function bo(e,t,n){t=So(t);var r=e,t=_o()?Reflect.construct(t,n||[],So(e).constructor):t.apply(e,n);if(!t||"object"!=yo(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function _o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_o=function(){return!!e})()}function So(e){return(So=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Eo(e,t){return(Eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t,n){(t=wo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function wo(e){e=((e,t)=>{if("object"!=yo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=yo(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==yo(e)?e:e+""}var xo=(e=>{function a(){var n,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return T(n=bo(this,a,[].concat(o)),"state",{expanded:!1}),T(n,"onExpandEvent",function(){n.signalExpanded=!n.state.expanded}),T(n,"expandCollapse",function(){n.setState({expanded:n.signalExpanded}),n.signalExpanded=!1}),T(n,"removeInlineStyles",function(){var e=n.props,t=e.editorState;(0,e.onChange)(n.removeAllInlineStyles(t))}),T(n,"removeAllInlineStyles",function(n){var r=n.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){r=d.Modifier.removeInlineStyle(r,n.getSelection(),e)}),oe(Object(l.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(r=d.Modifier.removeInlineStyle(r,n.getSelection(),t))}),d.EditorState.push(n,r,"change-inline-style")}),T(n,"doExpand",function(){n.setState({expanded:!0})}),T(n,"doCollapse",function(){n.setState({expanded:!1})}),n}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Eo(n,e),n=a,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||go;return g.a.createElement(r,{config:t,translations:e.translations,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&vo(n.prototype,e),t&&vo(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);T(xo,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object}),o(213);function Co(e){return(Co="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})(e)}function ko(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,Ao(r.key),r)}}function Do(e,t,n){t=Po(t);var r=e,t=Oo()?Reflect.construct(t,n||[],Po(e).constructor):t.apply(e,n);if(!t||"object"!=Co(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Oo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oo=function(){return!!e})()}function Po(e){return(Po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function To(e,t){return(To=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mo(e,t,n){(t=Ao(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Ao(e){e=((e,t)=>{if("object"!=Co(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Co(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Co(e)?e:e+""}var Io=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Mo(t=Do(this,a,[].concat(o)),"onChange",function(e){(0,t.props.onChange)(e)}),t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&To(n,e),n=a,(e=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState,s=a.undoDisabled,a=a.redoDisabled,e=e.translations,l=t.options,c=t.undo,u=t.redo,p=t.className,f=t.dropdownClassName,h=t.title;return g.a.createElement(v,{className:y()("rdw-history-dropdown",p),optionWrapperClassName:y()(f),expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-history-control",title:h||e["components.controls.history.history"]},g.a.createElement("img",{src:le(t),alt:""}),0<=l.indexOf("undo")&&g.a.createElement(b,{value:"undo",onClick:this.onChange,disabled:s,className:y()("rdw-history-dropdownoption",c.className),title:c.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("redo")&&g.a.createElement(b,{value:"redo",onClick:this.onChange,disabled:a,className:y()("rdw-history-dropdownoption",u.className),title:u.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:u.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,t=t.className,i=e.currentState,a=i.undoDisabled,i=i.redoDisabled,e=e.translations;return g.a.createElement("div",{className:y()("rdw-history-wrapper",t),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&g.a.createElement(p,{value:"undo",onClick:this.onChange,className:y()(r.className),disabled:a,title:r.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&g.a.createElement(p,{value:"redo",onClick:this.onChange,className:y()(o.className),disabled:i,title:o.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&ko(n.prototype,e),t&&ko(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function Ro(e){return(Ro="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})(e)}function Fo(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,Vo(r.key),r)}}function No(e,t,n){t=jo(t);var r=e,t=Lo()?Reflect.construct(t,n||[],jo(e).constructor):t.apply(e,n);if(!t||"object"!=Ro(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Lo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lo=function(){return!!e})()}function jo(e){return(jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Bo(e,t){return(Bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function zo(e,t,n){(t=Vo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Vo(e){e=((e,t)=>{if("object"!=Ro(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ro(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Ro(e)?e:e+""}Mo(Io,"propTypes",{expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object});var Ho=(e=>{function o(e){var r;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");zo(r=No(this,o,[e]),"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),zo(r,"onChange",function(e){var t=r.props,n=t.editorState,t=t.onChange,e=d.EditorState[e](n);e&&t(e)}),zo(r,"doExpand",function(){r.setState({expanded:!0})}),zo(r,"doCollapse",function(){r.setState({expanded:!1})}),zo(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1});var t={expanded:!1,undoDisabled:!1,redoDisabled:!1},n=e.editorState,e=e.modalHandler;return n&&(t.undoDisabled=0===n.getUndoStack().size,t.redoDisabled=0===n.getRedoStack().size),r.state=t,e.registerCallBack(r.expandCollapse),r}var t,n=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Bo(n,e),n=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.undoDisabled,o=t.component||Io;return g.a.createElement(o,{config:t,translations:e.translations,currentState:{undoDisabled:r,redoDisabled:n.redoDisabled},expanded:n.expanded,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&Fo(n.prototype,e),t&&Fo(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Ko=(zo(Ho,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object}),["config","currentState","onChange"]),Uo=["config"];function Wo(e){return(Wo="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})(e)}function Go(){return(Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function qo(e,t){if(null==e)return{};var n,r=((e,t)=>{if(null==e)return{};var n,r={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r})(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function Yo(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,ei(r.key),r)}}function $o(e,t,n){t=Zo(t);var r=e,t=Jo()?Reflect.construct(t,n||[],Zo(e).constructor):t.apply(e,n);if(!t||"object"!=Wo(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Jo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jo=function(){return!!e})()}function Zo(e){return(Zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xo(e,t){return(Xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Qo(e,t,n){(t=ei(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ei(e){e=((e,t)=>{if("object"!=Wo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Wo(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Wo(e)?e:e+""}var ti=(e=>{function n(e){var t;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");Qo(t=$o(this,n,[e]),"onExpandEvent",function(){t.setState({expanded:!t.state.expanded})}),Qo(t,"expandCollapse",function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),Qo(t,"doExpand",function(){t.setState({expanded:!0})}),Qo(t,"doCollapse",function(){t.setState({expanded:!1})}),Qo(t,"onChange",function(e){t.doCollapse(),t.props.onChange(e)});e=t.props;e.editorState;return t.state={expanded:!1},t}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Xo(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler}},{key:"renderInDropdown",value:function(){var r=this,e=this.props,o=e.config,i=qo(e,Ko);this.state.expanded;return g.a.createElement(v,{expanded:this.state.expanded,doExpand:this.doExpand,doCollapse:this.doCollapse,onExpandEvent:this.onExpandEvent,menu:!0},g.a.createElement(m.g,{name:"more_horizon"}),o.options.slice(o.max,o.options.length).map(function(e,t){var n=o[e],e=ni[e];return g.a.createElement(e,Go({key:t,config:n,inDropdown:!0,onChange:r.onChange},i))}))}},{key:"render",value:function(){var o=this,e=this.props,i=e.config,a=qo(e,Uo),e=i.max;return g.a.createElement("div",{className:"Editor-toolbar-insert"},i.options.slice(0,e).map(function(e,t){var n=i[e],r=ni[e];return(o.props.mention||"mention"!==e)&&n.isVisible?g.a.createElement(r,Go({key:t,config:n,inDropdown:!1},a)):null}))}}])&&Yo(r.prototype,e),t&&Yo(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),ni=(Qo(ti,"propTypes",{onChange:a.a.func.isRequired,onCloseLinkPopover:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,mention:a.a.object,linkPopoverOpen:a.a.bool,translations:a.a.object}),{textDecoration:e,heading:r,fontSize:Ot,insert:ti,fontFamily:_,list:cn,textAlign:E,colorPicker:w,link:x,mention:C,embedded:Cr,emoji:Hr,image:oo,remove:xo,history:Ho});function ri(e){return(ri="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})(e)}function oi(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,ui(r.key),r)}}function ii(e,t,n){t=si(t);var r=e,t=ai()?Reflect.construct(t,n||[],si(e).constructor):t.apply(e,n);if(!t||"object"!=ri(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ai(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ai=function(){return!!e})()}function si(e){return(si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function li(e,t){return(li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ci(e,t,n){(t=ui(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ui(e){e=((e,t)=>{if("object"!=ri(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ri(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ri(e)?e:e+""}function pi(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function fi(s){var e=(e=>{function a(){var o,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ci(o=ii(this,a,[].concat(r)),"state",{open:!1}),ci(o,"onDeleteLink",function(e){e.preventDefault(),e.stopPropagation();var e=s.getEditorState(),t=e.getSelection(),n=o.props,r=n.contentState,n=n.entityKey,e=Object(l.getEntityRange)(e,n),t=t.getIsBackward()?t.merge({anchorOffset:e.end,focusOffset:e.start}):t.merge({anchorOffset:e.start,focusOffset:e.end}),n=d.Modifier.setBlockType(r,t,"unstyled"),n=d.Modifier.removeRange(n,t,"backward");s.onChange(d.EditorState.push(s.getEditorState(),n,"remove-range"))}),ci(o,"onEditLink",function(e){e.preventDefault(),e.stopPropagation(),s.onEditLink(),o.setState({open:!1})}),ci(o,"onToggle",function(e){o.setState({open:e})}),o}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&li(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,e=e.contentState.getEntity(e.entityKey).getData().url,n=this.state.open,e=se(e),t=g.a.createElement("span",{contentEditable:"false",suppressContentEditableWarning:!0},g.a.createElement(m.n,{appearance:"link"},t));return g.a.createElement(m.m,{trigger:t,appendToBody:!0,open:n,onToggle:this.onToggle},g.a.createElement("div",{contentEditable:"false",suppressContentEditableWarning:!0,className:"d-flex pl-5 py-5 pr-4 align-items-center"},g.a.createElement(m.i,{href:e,target:"_new",className:"Editor-link"},e),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(m.a,{"aria-label":"Edit",onClick:this.onEditLink,appearance:"transparent",icon:"edit"}),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(m.a,{"aria-label":"Delete",onClick:this.onDeleteLink,appearance:"transparent",icon:"delete"})))}}])&&oi(n.prototype,e),t&&oi(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);return ci(e,"propTypes",{entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object}),e}function hi(e){return(hi="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})(e)}function di(){return(di=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function mi(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function gi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mi(Object(n),!0).forEach(function(e){bi(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mi(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function yi(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,_i(r.key),r)}}function vi(e,t,n){return t&&yi(e.prototype,t),n&&yi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bi(e,t,n){(t=_i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function _i(e){e=((e,t)=>{if("object"!=hi(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=hi(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==hi(e)?e:e+""}var e=vi(function e(t){var i=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");bi(this,"first",function(e){return null!=e&&e.length?e[0]:void 0}),bi(this,"getMentionComponent",function(){function e(e){var o=e.entityKey,t=e.children,e=e.contentState.getEntity(o).getData().value;return i.renderer?i.renderer(t,e):(e=gi(gi({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),g.a.createElement(m.c,di({},e,{onClose:function(){var e=i.config,t=e.getEditorState(),n=t.getCurrentContent(),r=t.getSelection(),t=Object(l.getEntityRange)(t,o),r=r.getIsBackward()?r.merge({anchorOffset:t.end,focusOffset:t.start}):r.merge({anchorOffset:t.start,focusOffset:t.end+1}),t=d.Modifier.setBlockType(n,r,"unstyled"),t=d.Modifier.removeRange(t,r,"backward");e.onChange(d.EditorState.push(e.getEditorState(),t,"remove-range"))}})))}return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e}),bi(this,"getMentionDecorator",function(){return{strategy:i.findMentionEntities,component:i.getMentionComponent()}}),this.config=t,this.chipOptions=t.chipOptions,this.renderer=t.renderer}),Si=(e.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"MENTION"===n.getEntity(e).getType()},t)},e);function Ei(e){return(Ei="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})(e)}function wi(e,t,n){t=Ci(t);var r=e,t=xi()?Reflect.construct(t,n||[],Ci(e).constructor):t.apply(e,n);if(!t||"object"!=Ei(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function xi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xi=function(){return!!e})()}function Ci(e){return(Ci=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ki(e,t){return(ki=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Di(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,Ti(r.key),r)}}function Oi(e,t,n){return t&&Di(e.prototype,t),n&&Di(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e,t,n){return(t=Ti(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ti(e){e=((e,t)=>{if("object"!=Ei(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ei(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Ei(e)?e:e+""}function Mi(e){var t=e.block,t=(e=e.contentState.getEntity(t.getEntityAt(0)).getData()).src;return g.a.createElement("iframe",{height:e.height,width:e.width,src:t,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var Ai=Oi(function e(t){var p=this,n=(Pi(this,e),M(this,"findSuggestionEntities",function(e,t){var n,r,o,i,a,s,l,c,u;p.config.getEditorState()&&(n=(s=p.config).separator,r=s.trigger,o=s.getSuggestions,i=s.fetchSuggestions,a=s.getLastKeyPressed,(s=(0,s.getEditorState)().getSelection()).get("anchorKey")===e.get("key"))&&s.get("anchorKey")===s.get("focusKey")&&(e=e.getText(),s=s.getFocusOffset(),l=e.substr(0,"Backspace"===a()?s-1:s+1),c=-1,u="",[n,"\n"].forEach(function(e){var t=l.lastIndexOf(e+r);c<t&&(c=t,u=e+r)}),(void 0===c||c<0)&&l[0]===r&&(c=0,u=r),0<=c)&&(e=l.substr(c+u.length,l.length),i?e.trim().split(/\s+/).length<3&&t(0===c&&l[0]===r?0:c+1,l.length):0<ie(o(),e,p.config.caseSensitive).length&&t(0===c&&l[0]===r?0:c+1,l.length))}),M(this,"getSuggestionComponent",function(){var e,h=this.config;return e=(e=>{function r(){var f;Pi(this,r);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return M(f=wi(this,r,[].concat(t)),"state",{style:{left:15},activeOption:-1,showSuggestions:!0,showLoader:!1,keyDown:!0,lastFetchedMentionText:""}),M(f,"openSuggestionDropdown",function(){ee(),f.setState({showSuggestions:!0})}),M(f,"closeSuggestionDropdown",function(){te(),f.setState({showSuggestions:!1})}),M(f,"focusOption",function(e,t,n,r){t=document.querySelectorAll(t),0===t.length&&(t=document.querySelectorAll(".".concat(r))),"string"==typeof n&&(n=parseInt(n)),r="down"===e?n+1:n-1,n=r,e="down"===e?t.length:-1,n===e&&(n=0),r=t[n=-1===r&&-1===e?t.length-1:n];r&&r.scrollIntoView({block:"end"})}),M(f,"onEditorKeyDown",function(e){var t,n,r=f.state,o=r.showSuggestions,r=r.activeOption;o&&(o={},t=null==h||null==(t=h.dropdownOptions)?void 0:t.dropdownOptionClassName,n=".Editor-dropdown-option",f.disableMouseEvents(),"ArrowDown"===e.key?(e.preventDefault(),f.focusOption("down",n,r,t),r===f.filteredSuggestions.length-1?o.activeOption=0:o.activeOption=Number(r)+1):"ArrowUp"===e.key?(e.preventDefault(),f.focusOption("up",n,r,t),o.activeOption=r<=0?f.filteredSuggestions.length-1:Number(r)-1):"Escape"===e.key?(o.showSuggestions=!1,te()):"Enter"===e.key&&f.addMention(),f.setState(o))}),M(f,"onOptionMouseOver",function(e){f.enableMouseEvents();e=parseInt(e.target.getAttribute("data-index"));0<=e&&e<f.filteredSuggestions.length&&f.setState({activeOption:e})}),M(f,"disableMouseEvents",function(){f.setState({keyDown:!0})}),M(f,"enableMouseEvents",function(){f.setState({keyDown:!1})}),M(f,"setSuggestionReference",function(e){f.suggestion=e}),M(f,"setDropdownReference",function(e){f.dropdown=e}),M(f,"filteredSuggestions",[]),M(f,"filterSuggestions",function(e){var t=h.getSuggestions?h.getSuggestions():[];f.filteredSuggestions=ie(t,e,h.caseSensitive),0===f.filteredSuggestions.length&&f.closeSuggestionDropdown()}),M(f,"debouncedFetchSuggestion",function(n,e){var r,o=1<arguments.length&&void 0!==e?e:500;return function(){var e=arguments,t=this;clearTimeout(r),r=setTimeout(function(){return n.apply(t,e)},o)}}(function(t){h.fetchSuggestions(t).then(function(e){f.filteredSuggestions=e,f.setState({lastFetchedMentionText:t,showSuggestions:0<e.length,showLoader:!1}),0===e.length&&f.closeSuggestionDropdown()})})),M(f,"updateSuggestions",function(){var e=f.state,t=e.showSuggestions,e=e.lastFetchedMentionText,n=f.getMentionText();h.fetchSuggestions?!t&&0<n.length&&n.startsWith(e)||!t&&n===e||(f.openSuggestionDropdown(),f.setState({showLoader:!0}),f.debouncedFetchSuggestion(n)):(f.openSuggestionDropdown(),f.filterSuggestions(n))}),M(f,"getMentionText",function(){return f.props.children[0].props.text.substr(1)}),M(f,"addMention",function(e,t,n){var r,o,i,a,s,l=f.state.activeOption,c=h.getEditorState(),u=h.onChange,p=h.trigger,t=void 0!==t&&void 0!==n?{label:t,value:n}:f.filteredSuggestions[l];t&&t.label&&(n=f.suggestion,l=(e=>(e=e.closest("[data-block]"))?e.getAttribute("data-offset-key").split("-")[0]:null)(f.suggestion))&&(o=c.getCurrentContent()).getBlockForKey(l)&&(n=(e=>{for(var t=e.closest("[data-block]").querySelectorAll("span[data-offset-key]"),n=e.querySelector("[data-offset-key]").getAttribute("data-offset-key"),r=0,o=0;o<t.length;o++){var i=t[o];if(i.getAttribute("data-offset-key")===n)break;r+=i.textContent.length}return r})(n),a=f.getMentionText(),a=n+p.length+a.length,s=n,a=a,s=d.SelectionState.createEmpty(l).merge({anchorOffset:s,focusOffset:a}),a=o,p="".concat(p).concat(t.value),r=t.value,i="",a=a.createEntity("MENTION","IMMUTABLE",{text:p,value:r,url:i}).getLastCreatedEntityKey(),o=d.Modifier.replaceText(o,s,t.label,null,a),p=d.EditorState.push(c,o,"insert-characters"),r=n+t.label.length,s=s.merge({anchorOffset:r,focusOffset:r}),i=l,a=r,c=s,p=o=" "!==(o=p).getCurrentContent().getBlockForKey(i).getText()[a]?(i=d.Modifier.insertText(o.getCurrentContent(),c," ",o.getCurrentInlineStyle()),o=d.EditorState.push(o,i,"insert-characters"),i=c.merge({anchorOffset:a+1,focusOffset:a+1}),d.EditorState.forceSelection(o,i)):d.EditorState.forceSelection(o,c),u(p=o))}),M(f,"toggleSuggestionDropdownHandler",function(e){e||f.closeSuggestionDropdown()}),M(f,"getOptionClass",function(e){var t=f.state.activeOption;return y()(M(M(M({},"Editor-dropdown-option",!0),"Editor-dropdown-option--highlight",e===t),"Editor-dropdown--keydown",f.state.keyDown))}),M(f,"renderOption",function(e,t){var n,r=h.dropdownOptions,r=(void 0===r?{}:r).customOptionRenderer,o=e.icon,i=e.label;return r?(n=r(e,f.state.activeOption,t),g.a.cloneElement(n,{key:t,spellCheck:!1,onClick:function(e){f.addMention(e),n.props.onClick&&n.props.onClick()},"data-index":t,onMouseOver:f.onOptionMouseOver})):g.a.createElement("span",{key:t,spellCheck:!1,onClick:function(){return f.addMention("onMouseSelect")},"data-index":t,onMouseOver:f.onOptionMouseOver,className:f.getOptionClass(t)},o&&g.a.createElement(m.g,{name:o,className:"mr-4"}),g.a.createElement(m.n,null,i))}),M(f,"mentionPopover",function(e){var t=f.state,n=t.showLoader;return e?e(f.filteredSuggestions,f.addMention,n,t.showSuggestions,f.state.activeOption):n?g.a.createElement("span",{className:"Editor-dropdown-option"},g.a.createElement(m.k,{withImage:!1},g.a.createElement(m.l,{length:"large"}),g.a.createElement(m.l,{length:"large"}),g.a.createElement(m.l,{length:"large"}))):f.filteredSuggestions.map(function(e,t){return f.renderOption(e,t)})}),f}var t=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ki(t,e),Oi(r,[{key:"componentDidMount",value:function(){var e=this.suggestion.getBoundingClientRect(),t=e.left;this.setState({style:{left:t,top:e.top+25}}),Q.registerCallBack(this.onEditorKeyDown),this.updateSuggestions()}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&this.updateSuggestions()}},{key:"componentWillUnmount",value:function(){Q.deregisterCallBack(this.onEditorKeyDown),this.closeSuggestionDropdown(),h.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this.props.children,t=this.state.showSuggestions,n=h.dropdownOptions,n=void 0===n?{}:n,r=n.dropdownClassName,o=n.popoverRenderer,n=n.appendToBody,n=void 0===n||n,r=y()(M(M(M({},"Popover",!0),"".concat(r),void 0!==r),"Editor-mention-dropdown",!0));return g.a.createElement("span",{className:"Editor-mention-suggestion",ref:this.setSuggestionReference,onClick:h.modalHandler.onSuggestionClick,"aria-haspopup":"true"},g.a.createElement("span",null,e),t&&g.a.createElement(m.m,{position:"bottom-start",open:!0,appendToBody:n,boundaryElement:this.setSuggestionReference,className:r,contentEditable:"false",suppressContentEditableWarning:!0,ref:this.setDropdownReference,onMouseMove:this.enableMouseEvents,onMouseLeave:this.disableMouseEvents,onScroll:this.enableMouseEvents,onToggle:this.toggleSuggestionDropdownHandler},this.mentionPopover(o)))}}])})(i.Component),M(e,"propTypes",{children:a.a.array}),e}.bind(this)),M(this,"getSuggestionDecorator",function(){return{strategy:p.findSuggestionEntities,component:p.getSuggestionComponent()}}),t.separator),r=t.trigger;this.config={separator:void 0===n?" ":n,trigger:void 0===r?"@":r,getSuggestions:t.getSuggestions,onChange:t.onChange,getEditorState:t.getEditorState,getWrapperRef:t.getWrapperRef,caseSensitive:t.caseSensitive,dropdownOptions:t.dropdownOptions,optionClassName:t.optionClassName,modalHandler:t.modalHandler,fetchSuggestions:t.fetchSuggestions,getLastKeyPressed:t.getLastKeyPressed}}),Ii=function(e){return[new Si(e).getMentionDecorator(),new Ai(e).getSuggestionDecorator()]},Ri=(Mi.propTypes={block:a.a.object,contentState:a.a.object},Mi);function Fi(e,t,n){return Math.min(Math.max(e,t),n)}var A={east:1,north:8,south:2,west:4};function Ni(e){function t(e,t){var n,r,o,i=s.current,a=l.current;null!==i&&null!==a&&(n=(r=i.getBoundingClientRect()).width,r=r.height,(o=u.current).startWidth=n,o.startHeight=r,o.ratio=n/r,o.currentWidth=n,o.currentHeight=r,o.startX=e.clientX,o.startY=e.clientY,o.isResizing=!0,o=(e=o.direction=t)===A.east||e===A.west,t=e===A.north||e===A.south,e=e&A.north&&e&A.west||e&A.south&&e&A.east,o=o?"ew":t?"ns":e?"nwse":"nesw",null!==p&&p.style.setProperty("cursor","".concat(o,"-resize"),"important"),null!==document.body&&(document.body.style.setProperty("cursor","".concat(o,"-resize"),"important"),c.current.value=document.body.style.getPropertyValue("-webkit-user-select"),c.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important")),a.classList.add("image-control-wrapper--resizing"),i.style.height="".concat(r,"px"),i.style.width="".concat(n,"px"),document.addEventListener("pointermove",h),document.addEventListener("pointerup",d))}var o=e.onResizeEnd,s=e.imageRef,n=e.maxWidth,e=e.editor,l=Object(i.useRef)(),c=Object(i.useRef)({priority:"",value:"default"}),u=Object(i.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),p=(Object(i.useEffect)(function(){return function(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",d)}},[]),e),a=n||(null!==p?p.getBoundingClientRect().width-20:100),f=null!==p?p.getBoundingClientRect().height-20:100,h=function(e){var t,n=s.current,r=u.current,o=r.direction&(A.east|A.west),i=r.direction&(A.south|A.north);null!==n&&r.isResizing&&(o&&i?(o=Math.floor(r.startX-e.clientX),o=r.direction&A.east?-o:o,t=(o=Fi(r.startWidth+o,100,a))/r.ratio,n.style.width="".concat(o,"px"),n.style.height="".concat(t,"px"),r.currentHeight=t,r.currentWidth=o):i?(t=Math.floor(r.startY-e.clientY),t=r.direction&A.south?-t:t,o=Fi(r.startHeight+t,100,f),n.style.height="".concat(o,"px"),r.currentHeight=o):(i=Math.floor(r.startX-e.clientX),i=r.direction&A.east?-i:i,t=Fi(r.startWidth+i,100,a),n.style.width="".concat(t,"px"),r.currentWidth=t))},d=function(){var e,t=s.current,n=u.current,r=l.current;null!==t&&null!==r&&n.isResizing&&(t=n.currentWidth,e=n.currentHeight,n.startWidth=0,n.startHeight=0,n.ratio=0,n.startX=0,n.startY=0,n.currentWidth=0,n.currentHeight=0,n.isResizing=!1,r.classList.remove("image-control-wrapper--resizing"),document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",d),null!==p&&p.style.setProperty("cursor","default"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",c.current.value,c.current.priority)),o(t,e))};return i.createElement("div",{ref:l},i.createElement("div",{className:"Editor-image-resizer Image-resizer--ne",onPointerDown:function(e){t(e,A.north|A.east)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--se",onPointerDown:function(e){t(e,A.south|A.east)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--sw",onPointerDown:function(e){t(e,A.south|A.west)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--nw",onPointerDown:function(e){t(e,A.north|A.west)}}))}o(214);function Li(e){return(Li="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})(e)}function ji(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,Ki(r.key),r)}}function Bi(e,t,n){t=Vi(t);var r=e,t=zi()?Reflect.construct(t,n||[],Vi(e).constructor):t.apply(e,n);if(!t||"object"!=Li(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function zi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zi=function(){return!!e})()}function Vi(e){return(Vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Hi(e,t){return(Hi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t,n){(t=Ki(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Ki(e){e=((e,t)=>{if("object"!=Li(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Li(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Li(e)?e:e+""}var Ui=function(p){var e=(e=>{function t(e){var r;if(this instanceof t)return I(r=Bi(this,t,[e]),"imageRef",null),I(r,"state",{hovered:!1}),I(r,"setEntityAlignmentLeft",function(){r.setEntityAlignment("left")}),I(r,"setEntityAlignmentRight",function(){r.setEntityAlignment("right")}),I(r,"setEntityAlignmentCenter",function(){r.setEntityAlignment("center")}),I(r,"setEntityAlignment",function(e){var t=r.props,n=t.block,t=t.contentState,n=n.getEntityAt(0);t.mergeEntityData(n,{alignment:e,alt:e}),p.onChange(d.EditorState.push(p.getEditorState(),t,"change-block-data"))}),I(r,"removeEntity",function(e){e.preventDefault(),e.stopPropagation();var e=r.props,t=e.block,e=e.contentState,t=t.getKey(),n=e.getKeyAfter(t),t=new d.SelectionState({anchorKey:t,anchorOffset:0,focusKey:n,focusOffset:0}),n=d.Modifier.setBlockType(e,t,"unstyled"),n=d.Modifier.removeRange(n,t,"backward");p.onChange(d.EditorState.push(p.getEditorState(),n,"remove-range"))}),I(r,"toggleHovered",function(){var e;r.state.hovered&&(e=p.getEditorState().getCurrentContent(),p.onChange(d.EditorState.push(p.getEditorState(),e,""))),r.setState({hovered:!r.state.hovered})}),r.imageRef=g.a.createRef(),r.onResizeEnd=r.onResizeEnd.bind(r),r;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Hi(r,e),r=t,(e=[{key:"renderAlignmentOptions",value:function(e){return g.a.createElement("div",{className:"Popover d-flex ".concat(e?"mt-4":"")},g.a.createElement("div",{onClick:this.setEntityAlignmentLeft,className:"Editor-image-options"},g.a.createElement(m.g,{name:"format_align_left",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentCenter,className:"Editor-image-options"},g.a.createElement(m.g,{name:"format_align_center",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentRight,className:"Editor-image-options"},g.a.createElement(m.g,{name:"format_align_right",size:20})),g.a.createElement("div",{onClick:this.removeEntity,className:"Editor-image-options"},g.a.createElement(m.g,{name:"delete",size:20})))}},{key:"updateImageSize",value:function(e,t){var n=this.props.block.getEntityAt(0),n=p.getEditorState().getCurrentContent().mergeEntityData(n,{width:"".concat(e,"px"),height:"".concat(t,"px")}),e=(p.onChange(d.EditorState.push(p.getEditorState(),n,"")),p.getEditorState()),t=d.Modifier.replaceText(e.getCurrentContent(),e.getSelection()," ");p.onChange(d.EditorState.push(e,t,"insert-characters"))}},{key:"onResizeEnd",value:function(e,t){this.setState({hovered:!1}),this.updateImageSize(e,t)}},{key:"render",value:function(){var e=this.props,t=e.block,e=e.contentState,n=this.state.hovered,r=p.isImageAlignmentEnabled,o=p.isImageResizeEnabled,i=p.isReadOnly,a=p.nonFloatingImage,e=e.getEntity(t.getEntityAt(0)).getData(),t=e.src,s=e.alignment,l=e.height,c=e.width,e=e.alt,a=("center"!==e||s?a&&"right"===e&&!s?this.setEntityAlignmentRight():a&&"left"===e&&!s&&this.setEntityAlignmentLeft():this.setEntityAlignmentCenter(),document.getElementById("RichTextEditorWrapper")),s=y()({"d-flex":!0,"justify-content-end":"right"===s,"justify-content-start":!s||"left"===s,"justify-content-center":"center"===s}),u=y()({"position-relative":!0,"Editor-image--selected":!i&&n&&o,"Editor-image":!i&&!n&&o,"ml-4":o});return g.a.createElement("div",{className:s},g.a.createElement("span",{onClick:this.toggleHovered,className:u},g.a.createElement("img",{src:t,alt:e,style:{height:l,width:c},ref:this.imageRef}),!i&&n&&g.a.createElement(g.a.Fragment,null,r()&&this.renderAlignmentOptions(o),o&&g.a.createElement(Ni,{editor:a,imageRef:this.imageRef,onResizeEnd:this.onResizeEnd}))))}}])&&ji(r.prototype,e),n&&ji(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);return I(e,"propTypes",{block:a.a.object,contentState:a.a.object}),e},Wi=function(n,r){return function(e){if("function"==typeof r){var t=r(e,n,n.getEditorState);if(t)return t}if("atomic"===e.getType()){t=n.getEditorState().getCurrentContent().getEntity(e.getEntityAt(0));if(t&&"IMAGE"===t.type)return{component:Ui(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:Ri,editable:!1}}}},Gi=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],ti=(r="ctrl",r=((null==(Ot=navigator.userAgentData)?void 0:Ot.platform.toLowerCase())||"linux").includes("mac")?"cmd":r),qi={options:["heading","textDecoration","colorPicker","list","insert"],textDecoration:{max:4,options:["bold","italic","underline","strikethrough"],bold:{icon:"format_bold",title:"Bold (".concat(ti,"+B)"),label:"Bold"},italic:{icon:"format_italic",title:"Italic (".concat(ti,"+I)"),label:"Italic"},underline:{icon:"format_underlined",title:"Underline (".concat(ti,"+U)"),label:"Underline"},strikethrough:{icon:"strikethrough_s",title:"Strikethrough",label:"Strikethrough"}},heading:{icon:"text_fields",options:["H1","H2","H3","H4"]},list:{options:["unordered","ordered"],unordered:{icon:"format_list_bulleted",title:" Bulleted list"},ordered:{icon:"format_list_numbered",title:"Numbered list"}},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",colors:Gi},insert:{max:3,options:["image","mention","link"],image:{icon:"insert_photo",isVisible:!0,title:"Image",alt:"",defaultSize:{height:"100px",width:"300px"},inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",uploadCallback:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(e){return t({data:{link:r.result}})},r.onerror=function(e){return n(e)},r.readAsDataURL(e)})}},link:{isVisible:!0,icon:"insert_link",linkCallback:void 0,title:"Link"},mention:{isVisible:!0,icon:"alternate_email",title:"Personalization"}},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,resizeEnabled:!1,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0}},_={title:a.a.string,label:a.a.string},cn={isVisible:a.a.bool,title:a.a.string,alt:a.a.string,uploadCallback:a.a.func,resizeEnabled:a.a.bool,defaultSize:a.a.shape({height:a.a.string,width:a.a.string})},E={isVisible:a.a.bool,title:a.a.string},w=a.a.shape({textDecoration:a.a.shape({max:a.a.number,bold:a.a.shape(_),italic:a.a.shape(_),underline:a.a.shape(_),strikethrough:a.a.shape(_)}),colorPicker:a.a.shape({colors:a.a.arrayOf(a.a.string)}),insert:a.a.shape({max:a.a.number,image:a.a.shape(cn),link:a.a.shape(E)})});o(215),o(95),o(96),o(97),o(98),o(99);o(100),o(101),o(102);function Yi(e){return(Yi="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})(e)}function $i(){return($i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function Ji(e){return(e=>{if(Array.isArray(e))return Zi(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||((e,t)=>{var n;if(e)return"string"==typeof e?Zi(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zi(e,t):void 0})(e)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function Zi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Xi(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Qi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Xi(Object(n),!0).forEach(function(e){R(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xi(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ea(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,ia(r.key),r)}}function ta(e,t,n){t=ra(t);var r=e,t=na()?Reflect.construct(t,n||[],ra(e).constructor):t.apply(e,n);if(!t||"object"!=Yi(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function na(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(na=function(){return!!e})()}function ra(e){return(ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oa(e,t){return(oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e,t,n){return(t=ia(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ia(e){e=((e,t)=>{if("object"!=Yi(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Yi(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Yi(e)?e:e+""}var x=(e=>{function o(e){var a;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");R(a=ta(this,o,[e]),"lastKeyPressed",""),R(a,"onEditorBlur",function(){a.setState({editorFocused:!1})}),R(a,"onEditorFocus",function(e){var t=a.props.onFocus,n=(a.setState({editorFocused:!0}),a.focusHandler.isEditorFocused());t&&n&&t(e)}),R(a,"onEditorMouseDown",function(){a.focusHandler.onEditorMouseDown()}),R(a,"getLastKeyPressed",function(){return a.lastKeyPressed}),R(a,"resetLastKeyPressed",function(){a.lastKeyPressed=null}),R(a,"keyBindingFn",function(e){if(a.lastKeyPressed=e.key,"Tab"===e.key)return t=a.props.onTab,(n=Object(l.changeDepth)(a.state.editorState,e.shiftKey?-1:1,4))&&n!==a.state.editorState&&(a.onChange(n),e.preventDefault()),t&&t(e,n),null;if("ArrowUp"!==e.key&&"ArrowDown"!==e.key||ne()&&e.preventDefault(),"Backspace"===e.key&&a.isEmptyListBlock()){var t=d.RichUtils.toggleBlockType(a.state.editorState);if(t)return a.onChange(d.EditorState.moveFocusToEnd(t)),!0}if("Delete"===e.key){var n=d.RichUtils.onDelete(a.state.editorState);if(n)return a.onChange(n),!0}return Object(d.getDefaultKeyBinding)(e)}),R(a,"onToolbarFocus",function(e){var t=a.props.onFocus;t&&a.focusHandler.isToolbarFocused()&&t(e)}),R(a,"onWrapperBlur",function(e){var t=a.props.onBlur;t&&a.focusHandler.isEditorBlur(e)&&t(e,a.getEditorState())}),R(a,"onChange",function(e,t){var n=a.props,r=n.readOnly,n=n.onEditorStateChange;r||"atomic"===Object(l.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(n&&n(e,a.props.wrapperId),s(a.props,"editorState")?a.afterChange(e):a.setState({editorState:e},a.afterChange(e)))}),R(a,"setWrapperReference",function(e){a.wrapper=e}),R(a,"setEditorReference",function(e){a.props.editorRef&&a.props.editorRef(e),a.editor=e}),R(a,"onCloseLinkPopover",function(){a.setState({linkPopoverOpen:!1})}),R(a,"onEditLink",function(){a.setState(Qi(Qi({},a.state),{},{linkPopoverOpen:!0}))}),R(a,"getCompositeDecorator",function(e){var t=[{strategy:pi,component:fi({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,Ji(Ii(Qi(Qi({},a.props.mention),{},{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler,getLastKeyPressed:a.getLastKeyPressed})))),new d.CompositeDecorator(t)}),R(a,"getWrapperRef",function(){return a.wrapper}),R(a,"getEditorState",function(){return a.state?a.state.editorState:null}),R(a,"getSuggestions",function(){return a.props.mention&&a.props.mention.suggestions}),R(a,"afterChange",function(t){setTimeout(function(){var e=a.props.onContentStateChange;e&&e(Object(d.convertToRaw)(t.getCurrentContent()))})}),R(a,"isReadOnly",function(){return a.props.readOnly}),R(a,"isImageAlignmentEnabled",function(){return a.state.toolbar.image.alignmentEnabled}),R(a,"createEditorState",function(e){var t,n;return s(a.props,"editorState")?a.props.editorState&&(t=d.EditorState.set(a.props.editorState,{decorator:e})):s(a.props,"defaultEditorState")?a.props.defaultEditorState&&(t=d.EditorState.set(a.props.defaultEditorState,{decorator:e})):s(a.props,"contentState")?a.props.contentState&&(n=Object(d.convertFromRaw)(a.props.contentState),t=d.EditorState.createWithContent(n,e),t=d.EditorState.moveSelectionToEnd(t)):s(a.props,"defaultContentState")&&(n=a.props.defaultContentState)&&(n=Object(d.convertFromRaw)(n),t=d.EditorState.createWithContent(n,e),t=d.EditorState.moveSelectionToEnd(t)),t=t||d.EditorState.createEmpty(e)}),R(a,"filterEditorProps",function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","wrapperClassName","editorStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],e=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),r={},e&&0<e.length&&e.forEach(function(e){r[e]=t[e]}),r;var t,n,r}),R(a,"getStyleMap",function(e){return Qi(Qi({},Object(l.getCustomStyleMap)()),e.customStyleMap)}),R(a,"changeEditorState",function(e){var e=Object(d.convertFromRaw)(e),t=a.state.editorState,t=d.EditorState.push(t,e,"insert-characters");return d.EditorState.moveSelectionToEnd(t)}),R(a,"focusEditor",function(){setTimeout(function(){a.editor.focus()})}),R(a,"handleKeyCommand",function(e){var t=a.state,n=t.editorState,t=t.toolbar.textDecoration;if(t&&0<=t.options.indexOf(e)){t=d.RichUtils.handleKeyCommand(n,e);if(t)return a.onChange(t),!0}return!1}),R(a,"handleReturn",function(e){var t;return!!ne()||(t=a.state.editorState,!!(t=Object(l.handleNewLine)(t,e))&&(a.onChange(t),!0))}),R(a,"handlePastedTextFn",function(e,t){var n,r,o=a.state.editorState,i=a.props.handlePastedText;return t&&t.includes("<figure")?t:t&&t.includes("DraftStyle")?null:i?i(e,t,o,a.onChange):(i=e,e=t,t=o,o=a.onChange,(r=Object(l.getSelectedBlock)(t))&&"code"===r.type?(r=d.Modifier.replaceText(t.getCurrentContent(),t.getSelection(),i,t.getCurrentInlineStyle()),o(d.EditorState.push(t,r,"insert-characters")),!0):!!e&&(i=j()(e),n=t.getCurrentContent(),i.entityMap.forEach(function(e,t){n=n.mergeEntityData(t,e)}),n=d.Modifier.replaceWithFragment(n,t.getSelection(),new z.List(i.contentBlocks)),o(d.EditorState.push(t,n,"insert-characters")),!0))}),R(a,"preventDefault",function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?a.focusHandler.onInputMouseDown():e.preventDefault()}),R(a,"isEmptyListBlock",function(){var e=a.state.editorState.getCurrentContent();return!e.hasText()&&"unstyled"!==e.getBlockMap().first().getType()}),R(a,"blockRenderMap",d.DefaultDraftBlockRenderMap.merge(Object(z.Map)({"header-one":{wrapper:g.a.createElement(m.e,{size:"xxl"},a.props.children)},"header-two":{wrapper:g.a.createElement(m.e,{size:"xl"},a.props.children)},"header-three":{wrapper:g.a.createElement(m.e,{size:"l"},a.props.children)},"header-four":{wrapper:g.a.createElement(m.e,{size:"m"},a.props.children)},unstyled:{element:"p",wrapper:g.a.createElement("div",null,a.props.children)}})));var t=ce(qi,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new W,a.focusHandler=new Z,e.toolbar&&e.toolbar.insert&&(null==(n=e.toolbar.insert.image)?void 0:n.resizeEnabled)),r=e.toolbar&&e.toolbar.insert&&(null==(r=e.toolbar.insert.image)?void 0:r.nonFloatingImage),n=(a.blockRendererFn=Wi({isReadOnly:e.readOnly,isImageAlignmentEnabled:a.isImageAlignmentEnabled,isImageResizeEnabled:n,nonFloatingImage:r,getEditorState:a.getEditorState,onChange:a.onChange}),a.editorProps=a.filterEditorProps(e),a.customStyleMap=a.getStyleMap(e),a.compositeDecorator=a.getCompositeDecorator(t),a.createEditorState(a.compositeDecorator));return Object(l.extractInlineStyle)(n),a.state={editorState:n,toolbar:t,editorFocused:!1,linkPopoverOpen:!1},a}var t,n=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&oa(n,e),n=o,(e=[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.editor.focus(),this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o;e!==this.props&&(t={},n=(r=this.props).editorState,r=r.contentState,this.state.toolbar||(o=ce(qi,o),t.toolbar=o),s(this.props,"editorState")&&n!==e.editorState?t.editorState=n?d.EditorState.set(n,{decorator:this.compositeDecorator}):d.EditorState.createEmpty(this.compositeDecorator):s(this.props,"contentState")&&r!==e.contentState&&(r?(o=this.changeEditorState(r))&&(t.editorState=o):t.editorState=d.EditorState.createEmpty(this.compositeDecorator)),e.editorState===n&&e.contentState===r||Object(l.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props))}},{key:"render",value:function(){var t=this,e=this.state,n=e.editorState,r=e.toolbar,e=this.props,o=e.toolbarClassName,i=e.editorClassName,a=e.wrapperClassName,s=e.editorStyle,l=e.ariaLabel,c=e.mention,u={linkPopoverOpen:this.state.linkPopoverOpen,onCloseLinkPopover:this.onCloseLinkPopover,modalHandler:this.modalHandler,editorState:n,onChange:this.onChange},e=y()(R({},"Editor-toolbar",!0),o),o=y()(R({},"Editor-wrapper",!0),a),a=y()(R(R({},"Editor",!0),"hide-placeholder",this.isEmptyListBlock()),i);return g.a.createElement("div",{id:this.wrapperId,className:o,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur},this.props.showToolbar&&g.a.createElement("div",{className:e,onMouseDown:function(e){t.resetLastKeyPressed(),t.preventDefault(e)},"aria-label":"Editor-toolbar",onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=ni[e],e=r[e];return g.a.createElement(n,$i({key:t},u,{config:e,mention:c,className:"Editor-toolbar-options"}))})),g.a.createElement("div",{ref:this.setWrapperReference,className:a,style:s,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:Q.onKeyDown,onMouseDown:this.onEditorMouseDown,id:"RichTextEditorWrapper"},g.a.createElement(d.Editor,$i({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:n,onChange:this.onChange,blockStyleFn:re,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,handlePastedText:this.handlePastedTextFn,ariaLabel:l,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&ea(n.prototype,e),t&&ea(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),aa=(x.utils={EditorState:d.EditorState,ContentState:d.ContentState,RichUtils:d.RichUtils,convertFromRaw:d.convertFromRaw,convertToRaw:d.convertToRaw,htmlToState:function(e){var e=L(e,'<p><br/></p><p id="RichTextEditor-Image"','<p id="RichTextEditor-Image"'),e=L(e,"<br/>",""),e=L(e,"<p>&nbsp;</p>",""),e=j()(e);if(e)return{contentState:e=d.ContentState.createFromBlockArray(e.contentBlocks),editorState:d.EditorState.createWithContent(e)}},stateToHTML:function(e){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=Object(d.convertToRaw)(e.getCurrentContent());return B()(e,void 0,!1,function(e){var t=e.type,e=e.data;if("IMAGE"===t)return t=e.alignment||"left","center"===e.alt||"center"===t?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):!n||"left"!==e.alt&&"left"!==t?n?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="float:').concat(t,"; height: ").concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n ')})}},x.propTypes={mention:a.a.shape({separator:a.a.string,trigger:a.a.string,chipOptions:a.a.object,dropdownOptions:a.a.shape({dropdownClassName:a.a.string,customOptionRenderer:a.a.func,popoverRenderer:a.a.func,appendToBody:a.a.bool,dropdownOptionClassName:a.a.string}),renderer:a.a.func,suggestions:a.a.shape({label:a.a.string,value:a.a.string,icon:a.a.string}),fetchSuggestions:a.a.func}),editorState:a.a.object,onEditorStateChange:a.a.func,defaultEditorState:a.a.object,onContentStateChange:a.a.func,defaultContentState:a.a.object,contentState:a.a.object,spellCheck:a.a.bool,toolbar:w,showToolbar:a.a.bool,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarClassName:a.a.string,editorStyle:a.a.object,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,textAlignment:a.a.oneOf(["left","right","center"]),readOnly:a.a.bool,autoFocus:a.a.bool,placeholder:a.a.string,ariaLabel:a.a.string,wrapperId:a.a.number,editorRef:a.a.func,handlePastedText:a.a.func},x.defaultProps={autoFocus:!0,showToolbar:!0},x),sa=o(50),la=o.n(sa),ca=o(51);function ua(e){return(ua="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})(e)}function pa(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function F(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pa(Object(n),!0).forEach(function(e){fa(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pa(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function fa(e,t,n){return(t=(e=>(e=((e,t)=>{if("object"!=ua(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ua(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==ua(e)?e:e+""))(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ha(e){return(e=>{if(Array.isArray(e))return da(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||((e,t)=>{var n;if(e)return"string"==typeof e?da(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?da(e,t):void 0})(e)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ma(e,n){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){return g.a.createElement("li",{key:n[t]},e)}))}function ga(e,r){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){var n=1<e.length&&e[1][0];return n&&n.includes("\n")?(n=n.split("\n"),g.a.createElement(m.j,{key:r[t]},n.map(function(e){return[e,g.a.createElement("br",null)]}))):e&&0===(null==(n=e[1])?void 0:n.length)?g.a.createElement("p",null,g.a.createElement("br",null)):g.a.createElement(m.j,{key:r[t]},e.map(function(e){return[e]}))}))}function ya(e,t){var n=void 0===(n=t.entities)?{}:n,r=void 0===(r=t.headings)?{}:r,o=void 0===(o=t.list)?{}:o,t=void 0===(t=t.colors)?[]:t,n=F(F({},xa),n),r=F(F({},Ea),r),o=F(F({},wa),o),r=F(F(F({},Ca),r),o),o=F(F({},_a),ka(t)),t={blocks:r,entities:n,styles:Object(sa.createStylesRenderer)(Sa,o)};return la()(e,t,!1)}function va(e){var t=e.raw;return(t=t&&ya(t,{entities:e.entities,headings:e.headings,list:e.list,colors:e.colors}))?g.a.createElement("div",{className:"Preview-wrapper"},t):null}var ba={paddingLeft:"1.5em",margin:"0px"},_a={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},Sa=function(e){var t=e.children;return g.a.createElement("span",{key:e.key,style:e.style},t)},Ea={"header-one":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"xxl",key:n[t]},e)})},"header-two":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"xl",key:n[t]},e)})},"header-three":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"l",key:n[t]},e)})},"header-four":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"m",key:n[t]},e)})}},wa={"unordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ul",{style:ba},ma(e,t))},"ordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ol",{style:ba},ma(e,t))}},xa={LINK:function(e,t,n){n=n.key;return g.a.createElement(m.i,{key:n,href:t.url},e)},IMAGE:function(e,t){var n=t.src,r=t.alignment;return g.a.createElement("p",{id:"RichTextEditor-Image",style:{justifyContent:r||"left",display:"flex"}},g.a.createElement("img",{src:n,alt:t.alt,height:t.height,width:t.width}))},MENTION:function(e,t,n){n=n.key;return g.a.createElement("span",{name:t.value,className:"Chip--input Chip d-inline-flex mt-3",key:n},e)}},Ca={unstyled:function(e,t,n){t=t.keys;return ga(e,t)},atomic:function(e,t){return e[0]}},ka=function(e){return[].concat(ha(Gi),ha(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return F(F({},e),{},fa({},n,t))},{})},Da=(va.utils={convertToHTML:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=e&&ya(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))&&Object(ca.renderToStaticMarkup)(e)?(t=(n=o(232)).name,n=n.version,t="https://s3.us-east-1.amazonaws.com/webui-assets/".concat(t,"/v").concat(n,"/design-system.css"),n=r?'<link rel="stylesheet" href="'.concat(t,'">'):"","".concat(n," ").concat(Object(ca.renderToStaticMarkup)(e))):""}},va.propTypes={raw:a.a.object.isRequired,colors:a.a.arrayOf(a.a.string),list:a.a.object,headings:a.a.object,entities:a.a.object},va.defaultProps={entities:{},headings:{},list:{},colors:[]},va)}]);
59
+ var w=e(18),x=e(0);function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var e="function"==typeof Symbol&&Symbol.for,s=e?Symbol.for("react.portal"):60106,l=e?Symbol.for("react.fragment"):60107,c=e?Symbol.for("react.strict_mode"):60108,u=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,p=e?Symbol.for("react.context"):60110,j=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,B=e?Symbol.for("react.suspense_list"):60120,z=e?Symbol.for("react.memo"):60115,V=e?Symbol.for("react.lazy"):60116,H=e?Symbol.for("react.block"):60121,K=e?Symbol.for("react.fundamental"):60117,U=e?Symbol.for("react.scope"):60119;function g(e){if(null!=e){if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case l:return"Fragment";case s:return"Portal";case u:return"Profiler";case c:return"StrictMode";case d:return"Suspense";case B:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case p:return"Context.Consumer";case f:return"Context.Provider";case h:var t=(t=e.render).displayName||t.name||"";return e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case z:return g(e.type);case H:return g(e.render);case V:if(e=1===e._status?e._result:null)return g(e)}}return null}var e=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=(e.hasOwnProperty("ReactCurrentDispatcher")||(e.ReactCurrentDispatcher={current:null}),e.hasOwnProperty("ReactCurrentBatchConfig")||(e.ReactCurrentBatchConfig={suspense:null}),{});function y(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var m=new Uint16Array(16),t=0;t<15;t++)m[t]=t+1;m[15]=0;var G=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,q=Object.prototype.hasOwnProperty,Y={},$={};function J(e){return q.call($,e)||!q.call(Y,e)&&(G.test(e)?$[e]=!0:void(Y[e]=!0))}function Z(e,t,n,r){if(null==t||((e,t,n,r)=>{if(null===n||0!==n.type)switch(typeof t){case"function":case"symbol":return 1;case"boolean":return r?void 0:null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e;default:return}})(e,t,n,r))return 1;if(!r&&null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||t<1}}function n(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var k={},r=("children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){k[e]=new n(e,0,!1,e,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];k[t]=new n(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){k[e]=new n(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){k[e]=new n(e,2,!1,e,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){k[e]=new n(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){k[e]=new n(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){k[e]=new n(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){k[e]=new n(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){k[e]=new n(e,5,!1,e.toLowerCase(),null,!1)}),/[\-:]([a-z])/g);function o(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){k[e]=new n(e,1,!1,e.toLowerCase(),null,!1)}),k.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){k[e]=new n(e,1,!1,e.toLowerCase(),null,!0)});var X=/["'&<>]/;function D(e){if("boolean"==typeof e||"number"==typeof e)return""+e;var t=X.exec(e=""+e);if(t){for(var n="",r=0,o=t.index;o<e.length;o++){switch(e.charCodeAt(o)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}r!==o&&(n+=e.substring(r,o)),r=o+1,n+=t}e=r!==o?n+e.substring(r,o):n}return e}var Q="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},v=null,i=null,a=null,b=!1,_=!1,S=null,E=0;function O(){if(null===v)throw Error(C(321));return v}function ee(){if(0<E)throw Error(C(312));return{memoizedState:null,queue:null,next:null}}function P(){return null===a?null===i?(b=!1,i=a=ee()):(b=!0,a=i):a=null===a.next?(b=!1,a.next=ee()):(b=!0,a.next),a}function te(e,t,n,r){for(;_;)_=!1,E+=1,a=null,n=e(t,r);return i=v=null,E=0,a=S=null,n}function ne(e,t){return"function"==typeof t?t(e):t}function re(e,t,n){if(v=O(),a=P(),b){var r=a.queue;if(t=r.dispatch,null===S||void 0===(n=S.get(r)))return[a.memoizedState,t];for(S.delete(r),r=a.memoizedState;r=e(r,n.action),null!==(n=n.next););return[a.memoizedState=r,t]}return e=e===ne?"function"==typeof t?t():t:void 0!==n?n(t):t,a.memoizedState=e,e=(e=a.queue={last:null,dispatch:null}).dispatch=function(e,t,n){if(!(E<25))throw Error(C(301));if(e===v)if(_=!0,e={action:n,next:null},null===S&&(S=new Map),void 0===(n=S.get(t)))S.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}.bind(null,v,e),[a.memoizedState,e]}function T(){}var M=0,oe={readContext:function(e){var t=M;return y(e,t),e[t]},useContext:function(e){O();var t=M;return y(e,t),e[t]},useMemo:function(e,t){if(v=O(),t=void 0===t?null:t,null!==(a=P())){var n=a.memoizedState;if(null!==n&&null!==t){e:{var r=n[1];if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!Q(t[o],r[o])){r=!1;break e}r=!0}}if(r)return n[0]}}return e=e(),a.memoizedState=[e,t],e},useReducer:re,useRef:function(e){v=O();var t=(a=P()).memoizedState;return null===t?a.memoizedState=e={current:e}:t},useState:function(e){return re(ne,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:T,useEffect:T,useDebugValue:T,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return O(),e},useTransition:function(){return O(),[function(e){e()},!1]}},ie="http://www.w3.org/1999/xhtml";function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var se={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},le=w({menuitem:!0},se),A={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ce=["Webkit","ms","Moz","O"],ue=(Object.keys(A).forEach(function(t){ce.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),A[e]=A[t]})}),/([A-Z])/g),pe=/^ms-/,I=x.Children.toArray,R=e.ReactCurrentDispatcher,fe={listing:!0,pre:!0,textarea:!0},he=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,de={},F={};var me=Object.prototype.hasOwnProperty,ge={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ye(e,t){if(void 0===e)throw Error(C(152,g(t)||"Component"))}function ve(h,d,m){function e(e,t){var n=t.prototype&&t.prototype.isReactComponent,r=((e,t,n,r)=>{if(r&&"object"==typeof(r=e.contextType)&&null!==r)return y(r,n),r[n];if(e=e.contextTypes){for(var o in n={},e)n[o]=t[o];t=n}else t=W;return t})(t,d,m,n),o=[],i=!1,a={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===o)return null},enqueueReplaceState:function(e,t){i=!0,o=[t]},enqueueSetState:function(e,t){if(null===o)return null;o.push(t)}};if(n){n=new t(e.props,r,a);"function"==typeof t.getDerivedStateFromProps&&null!=(l=t.getDerivedStateFromProps.call(null,e.props,n.state))&&(n.state=w({},n.state,l))}else if(v={},n=t(e.props,r,a),null==(n=te(t,e.props,n,r))||null==n.render)return void ye(h=n,t);if(n.props=e.props,n.context=r,n.updater=a,void 0===(a=n.state)&&(n.state=a=null),"function"==typeof n.UNSAFE_componentWillMount||"function"==typeof n.componentWillMount)if("function"==typeof n.componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.componentWillMount(),"function"==typeof n.UNSAFE_componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.UNSAFE_componentWillMount(),o.length){var a=o,s=i,o=null,i=!1;if(s&&1===a.length)n.state=a[0];else{for(var l=s?a[0]:n.state,c=!0,s=s?1:0;s<a.length;s++){var u=a[s];null!=(u="function"==typeof u?u.call(n,l,e.props,r):u)&&(c?(c=!1,l=w({},l,u)):w(l,u))}n.state=l}}else o=null;if(ye(h=n.render(),t),"function"==typeof n.getChildContext&&"object"==typeof(e=t.childContextTypes)){var p,f=n.getChildContext();for(p in f)if(!(p in e))throw Error(C(108,g(t)||"Unknown",p))}f&&(d=w({},d,f))}for(;x.isValidElement(h);){var t=h,n=t.type;if("function"!=typeof n)break;e(t,n)}return{child:h,context:d}}(e=_e.prototype).destroy=function(){var e;this.exhausted||(this.exhausted=!0,this.clearProviders(),e=this.threadID,m[e]=m[0],m[0]=e)},e.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID,o=(y(n,r),n[r]);this.contextStack[t]=n,this.contextValueStack[t]=o,n[r]=e.props.value},e.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},e.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},e.read=function(e){if(this.exhausted)return null;var t=M,n=(M=this.threadID,R.current);R.current=oe;try{for(var r=[""],o=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var i=this.threadID;m[i]=m[0],m[0]=i;break}var a=this.stack[this.stack.length-1];if(o||a.childIndex>=a.children.length){var s=a.footer;if(""!==s&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===a.type)this.currentSelectValue=null;else if(null!=a.type&&null!=a.type.type&&a.type.type.$$typeof===f)this.popProvider(a.type);else if(a.type===d){this.suspenseDepth--;var l=r.pop();if(o){var o=!1,c=a.fallbackFrame;if(!c)throw Error(C(303));this.stack.push(c),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=l}r[this.suspenseDepth]+=s}else{var u=a.children[a.childIndex++],p="";try{p+=this.render(u,a.context,a.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(C(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=p}}return r[0]}finally{R.current=n,M=t}},e.render=function(e,t,n){if("string"==typeof e||"number"==typeof e){if(""===(n=""+e))return"";if(!this.makeStaticMarkup){if(this.previousWasTextNode)return"\x3c!-- --\x3e"+D(n);this.previousWasTextNode=!0}return D(n)}if(e=(t=ve(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!x.isValidElement(e)){if(null==e||null==e.$$typeof)return e=I(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";if((n=e.$$typeof)===s)throw Error(C(257));throw Error(C(258,n.toString()))}var r,o=e.type;if("string"==typeof o)return this.renderDOM(e,t,n);switch(o){case c:case j:case u:case B:case l:return e=I(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case d:throw Error(C(294))}if("object"==typeof o&&null!==o)switch(o.$$typeof){case h:v={};var i=o.render(e.props,e.ref),i=te(o.render,e.props,i,e.ref);return i=I(i),this.stack.push({type:null,domNamespace:n,children:i,childIndex:0,context:t,footer:""}),"";case z:return e=[x.createElement(o.type,w({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case f:return n={type:e,domNamespace:n,children:o=I(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case p:o=e.type,i=e.props;var a=this.threadID;return y(o,a),o=I(i.children(o[a])),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),"";case K:throw Error(C(338));case V:switch(o=e.type,-1===(r=o)._status&&(r._status=0,i=(i=r._ctor)(),(r._result=i).then(function(e){0===r._status&&(e=e.default,r._status=1,r._result=e)},function(e){0===r._status&&(r._status=2,r._result=e)})),o._status){case 1:return e=[x.createElement(o._result,w({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case 2:throw o._result;default:throw Error(C(295))}case U:throw Error(C(343))}throw Error(C(130,null==o?o:typeof o,""))},e.renderDOM=function(e,t,n){var r=e.type.toLowerCase();if(n===ie&&ae(r),!de.hasOwnProperty(r)){if(!he.test(r))throw Error(C(65,r));de[r]=!0}var o,i,a,s,l,c=e.props;if("input"===r)c=w({type:void 0},c,{defaultChecked:void 0,defaultValue:void 0,value:null!=c.value?c.value:c.defaultValue,checked:null!=c.checked?c.checked:c.defaultChecked});else if("textarea"===r){if(null==(u=c.value)){var u=c.defaultValue,p=c.children;if(null!=p){if(null!=u)throw Error(C(92));if(Array.isArray(p)){if(!(p.length<=1))throw Error(C(93));p=p[0]}u=""+p}null==u&&(u="")}c=w({},c,{value:void 0,children:""+u})}else if("select"===r)this.currentSelectValue=null!=c.value?c.value:c.defaultValue,c=w({},c,{value:void 0});else if("option"===r){var p=this.currentSelectValue,f=null==(f=c.children)?f:(o="",x.Children.forEach(f,function(e){null!=e&&(o+=e)}),o);if(null!=p){var h=null!=c.value?c.value+"":f;if(u=!1,Array.isArray(p)){for(var d=0;d<p.length;d++)if(""+p[d]===h){u=!0;break}}else u=""+p===h;c=w({selected:void 0,children:void 0},c,{selected:u,children:f})}}if(u=c){if(le[r]&&(null!=u.children||null!=u.dangerouslySetInnerHTML))throw Error(C(137,r,""));if(null!=u.dangerouslySetInnerHTML){if(null!=u.children)throw Error(C(60));if(!("object"==typeof u.dangerouslySetInnerHTML&&"__html"in u.dangerouslySetInnerHTML))throw Error(C(61))}if(null!=u.style&&"object"!=typeof u.style)throw Error(C(62,""))}for(E in u=c,p=this.makeStaticMarkup,f=1===this.stack.length,h="<"+e.type,u)if(me.call(u,E)){var m=u[E];if(null!=m){if("style"===E){var g,y,v,b,d=void 0,_="",S="";for(d in m)m.hasOwnProperty(d)&&(g=0===d.indexOf("--"),null!=(y=m[d]))&&(_+=S+(b=g?d:(b=d,F.hasOwnProperty(b)?F[b]:(v=b.replace(ue,"-$1").toLowerCase().replace(pe,"-ms-"),F[b]=v)))+":",S=d,_+=g=null==y||"boolean"==typeof y||""===y?"":g||"number"!=typeof y||0===y||A.hasOwnProperty(S)&&A[S]?(""+y).trim():y+"px",S=";");m=_||null}d=null;e:if(y=u,-1===(g=r).indexOf("-"))g="string"==typeof y.is;else switch(g){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":g=!1;break e;default:g=!0}g?ge.hasOwnProperty(E)||(d=J(d=E)&&null!=m?d+'="'+D(m)+'"':""):(i=E,a=m,l=s=void 0,s=k.hasOwnProperty(i)?k[i]:null,d=(l=(l="style"!==i)&&(null!==s?0===s.type:2<i.length&&("o"===i[0]||"O"===i[0])&&("n"===i[1]||"N"===i[1])))||Z(i,a,s,!1)?"":null!==s?(i=s.attributeName,3===(l=s.type)||4===l&&!0===a?i+'=""':i+'="'+D(a=s.sanitizeURL?""+a:a)+'"'):J(i)?i+'="'+D(a)+'"':""),d&&(h+=" "+d)}}p||f&&(h+=' data-reactroot=""');var E=h;u="",se.hasOwnProperty(r)?E+="/>":(E+=">",u="</"+e.type+">");e:{if(null!=(p=c.dangerouslySetInnerHTML)){if(null!=p.__html){p=p.__html;break e}}else if("string"==typeof(p=c.children)||"number"==typeof p){p=D(p);break e}p=null}return null!=p?(c=[],fe.hasOwnProperty(r)&&"\n"===p.charAt(0)&&(E+="\n"),E+=p):c=I(c.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?ae(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:r,children:c,childIndex:0,context:t,footer:u}),this.previousWasTextNode=!1,E};var be=_e,e={renderToString:function(e){e=new be(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new be(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){throw Error(C(207))},renderToStaticNodeStream:function(){throw Error(C(208))},version:"16.14.0"};function _e(e,t){if(e=x.isValidElement(e)&&(e.type!==l||(e=e.props.children,x.isValidElement(e)))?[e]:I(e),e={type:null,domNamespace:ie,children:e,childIndex:0,context:W,footer:""},0===(n=m[0])){var n,r=m,o=2*(n=r.length);if(!(o<=65536))throw Error(C(304));var i=new Uint16Array(o);for(i.set(r),(m=i)[0]=n+1,r=n;r<o-1;r++)m[r]=r+1;m[o-1]=0}else m[0]=m[n];this.threadID=n,this.stack=[e],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}N.exports=e.default||e},function(e){e.exports=JSON.parse('{"name":"@innovaccer/rich-text-editor","version":"3.0.4","description":"A rich text on top of DraftJS.","main":"dist/rich-text-editor.js","module":"dist/rich-text-editor.js","author":"Innovaccer","devDependencies":{"@babel/core":"^7.7.4","@babel/plugin-proposal-class-properties":"^7.12.1","@babel/preset-env":"^7.7.4","@babel/preset-react":"^7.7.4","@babel/register":"^7.7.4","@innovaccer/design-system":"^3.1.0","@storybook/addon-docs":"6.5.10","@storybook/addon-essentials":"6.5.10","@storybook/react":"6.5.10","@storybook/storybook-deployer":"2.8.12","autoprefixer":"^10.4.20","babel-eslint":"^10.0.3","babel-loader":"^8.0.6","babel-plugin-transform-flow-strip-types":"^6.22.0","chai":"^4.2.0","cross-env":"^6.0.3","css-loader":"^3.2.1","draftjs-to-markdown":"^0.6.0","embed-video":"^2.0.4","enzyme":"^3.10.0","enzyme-adapter-react-16":"^1.15.1","eslint":"^6.7.2","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-mocha":"^6.2.2","eslint-plugin-react":"^7.17.0","file-loader":"^5.0.2","flow-bin":"^0.113.0","gulp":"5.0.0","gulp-clean":"^0.4.0","gulp-concat":"^2.6.1","gulp-postcss":"^9.0.0","gulp-sourcemaps":"2.6.5","install":"^0.13.0","jsdom":"^16.4.0","mini-css-extract-plugin":"^0.8.0","mocha":"^10.7.3","postcss-color-mod-function":"^3.0.3","postcss-loader":"^8.1.1","precss":"^4.0.0","prettier":"^2.8.8","react":"^16.12.0","react-addons-test-utils":"^15.6.2","react-dom":"16.14.0","react-test-renderer":"^16.12.0","rimraf":"^3.0.0","sinon":"^7.5.0","style-loader":"^1.0.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^3.0.0","webpack":"4.46.0","webpack-bundle-analyzer":"^4.0.0","webpack-cli":"^3.3.10","webpack-s3-plugin":"^1.2.0-rc.0"},"dependencies":{"classnames":"^2.2.6","draft-js":"^0.11.7","draftjs-to-html":"^0.9.0","draftjs-utils":"^0.10.2","html-to-draftjs":"^1.5.0","immutable":"^4.0.0-rc.12","linkify-it":"^2.2.0","prop-types":"^15.7.2","redraft":"^0.10.2"},"peerDependencies":{"@innovaccer/design-system":"^3.1.0","react":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x","react-dom":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x"},"scripts":{"build:css":"cp ./node_modules/@innovaccer/design-system/css/dist/* dist/","build-css":"gulp --gulpfile config/gulpfile.js build","clean":"rimraf dist && rimraf public","build:webpack":"NODE_OPTIONS=--openssl-legacy-provider cross-env NODE_ENV=production webpack --mode production --config config/webpack.config.js","build":"npm run build-css && npm run build:webpack","test":"cross-env BABEL_ENV=test mocha --require config/test-compiler.js config/test-setup.js src/**/*Test.js","lint":"prettier --write \\"**/*.{js,jsx,ts,tsx,json,css}\\"","lintdocs":"eslint docs/src","flow":"flow; test $? -eq 0 -o $? -eq 2","check":"npm run lint && npm run flow","storybook":"NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6006","build-storybook":"NODE_OPTIONS=--openssl-legacy-provider build-storybook","deploy-storybook":"NODE_OPTIONS=--openssl-legacy-provider storybook-to-ghpages","version":"./scripts/version.sh","prettier":"prettier --write \\"**/*.{js,jsx,ts,tsx,json,css}\\""},"engines":{"node":">=20.15.0","npm":">=10.7.0"},"overrides":{"react-dom":"16.14.0","webpack":"4.46.0","draft-js":{"immutable":"3.8.3"}},"resolutions":{"draft-js/immutable":"3.8.3"},"license":"MIT"}')},function(N,e,o){o.r(e),o.d(e,"Editor",function(){return aa}),o.d(e,"EditorPreview",function(){return Da});function L(e,t,n){return t=new RegExp(t,"g"),e.replace(t,n)}var i=o(0),g=o.n(i),e=o(1),a=o.n(e),d=o(2),l=o(4),e=o(39),j=o.n(e),e=o(93),B=o.n(e),z=o(24),e=o(5),y=o.n(e);function V(e){return(V="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})(e)}function H(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,U(r.key),r)}}function K(e,t,n){return t&&H(e.prototype,t),n&&H(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function t(e,t,n){(t=U(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function U(e){e=((e,t)=>{if("object"!=V(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=V(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==V(e)?e:e+""}var W=K(function e(){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");t(this,"callBacks",[]),t(this,"suggestionCallback",void 0),t(this,"editorFlag",!1),t(this,"suggestionFlag",!1),t(this,"closeAllModals",function(t){n.callBacks.forEach(function(e){e(t)})}),t(this,"init",function(e){e=document.getElementById(e);e&&e.addEventListener("click",function(){n.editorFlag=!0}),document&&(document.addEventListener("click",function(){n.editorFlag?n.editorFlag=!1:(n.closeAllModals(),n.suggestionCallback&&n.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&n.closeAllModals()}))}),t(this,"onEditorClick",function(){n.closeModals(),!n.suggestionFlag&&n.suggestionCallback?n.suggestionCallback():n.suggestionFlag=!1}),t(this,"closeModals",function(e){n.closeAllModals(e)}),t(this,"registerCallBack",function(e){n.callBacks.push(e)}),t(this,"deregisterCallBack",function(t){n.callBacks=n.callBacks.filter(function(e){return e!==t})}),t(this,"setSuggestionCallback",function(e){n.suggestionCallback=e}),t(this,"removeSuggestionCallback",function(){n.suggestionCallback=void 0}),t(this,"onSuggestionClick",function(){n.suggestionFlag=!0})});function G(e){return(G="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})(e)}function q(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)}}function Y(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(e,t,n){(t=$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function $(e){e=((e,t)=>{if("object"!=G(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=G(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==G(e)?e:e+""}var J,Z=Y(function e(){var t=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");n(this,"inputFocused",!1),n(this,"editorMouseDown",!1),n(this,"onEditorMouseDown",function(){t.editorFocused=!0}),n(this,"onInputMouseDown",function(){t.inputFocused=!0}),n(this,"isEditorBlur",function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)}),n(this,"isEditorFocused",function(){return!t.inputFocused||(t.inputFocused=!1)}),n(this,"isToolbarFocused",function(){return!t.editorFocused||(t.editorFocused=!1)}),n(this,"isInputFocused",function(){return t.inputFocused})}),X=[],Q={onKeyDown:function(t){X.forEach(function(e){e(t)})},registerCallBack:function(e){X.push(e)},deregisterCallBack:function(t){X=X.filter(function(e){return e!==t})}},ee=function(){J=!0},te=function(){J=!1},ne=function(){return J};function re(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function oe(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function s(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function u(e){e.stopPropagation()}function ie(e,t,n){return e&&e.filter(function(e){return!t||0===t.length||(n?0<=e.value.indexOf(t):0<=e.value.toLowerCase().indexOf(t&&t.toLowerCase()))})}function ae(e){if(e&&"string"==typeof e){e=e.trim();if(""!==e){for(var t=e.toLowerCase(),n=0,r=["javascript:","data:","vbscript:","file:","about:"];n<r.length;n++)if(t.startsWith(r[n]))return;for(var o,i,a=0,s=["https://","http://","mailto:","tel:"];a<s.length;a++)if(t.startsWith(s[a]))return 1;return e.startsWith("/")||e.startsWith("#")||e.startsWith("./")||e.startsWith("../")?1:(o=e.indexOf(":"),i=e.indexOf("/"),(-1===o||!(-1===i||o<i))&&(o=e.includes("."),i=e.includes("/"),!e.includes(" "))&&(o||i)?/^[a-zA-Z0-9][a-zA-Z0-9._\-/:]*$/.test(e):void 0)}}}function se(e){return e&&"string"==typeof e&&""!==(e=e.trim())&&ae(e)?e:"#"}function le(e){return e[e.options[0]].icon}var ce=function(e,n){var r;return e&&void 0===n?e:(r={},oe(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=ce(t,n[e]):r[e]=void 0!==n[e]?n[e]:t}),r)};function ue(e){return(ue="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})(e)}function pe(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,ge(r.key),r)}}function fe(e,t,n){t=de(t);var r=e,t=he()?Reflect.construct(t,n||[],de(e).constructor):t.apply(e,n);if(!t||"object"!=ue(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function he(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(he=function(){return!!e})()}function de(e){return(de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function me(e,t){return(me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t,n){return(t=ge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ge(e){e=((e,t)=>{if("object"!=ue(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ue(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ue(e)?e:e+""}var p=(e=>{function a(){var i,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return c(i=fe(this,a,[].concat(r)),"onClick",function(){var e=i.props;e.disabled||(0,e.onClick)(e.value)}),c(i,"handleKeyDown",function(e){var t=new Set(["Enter","Space","Spacebar"," "]),n=i.props,r=n.disabled,o=n.onClick,n=n.value;r||t.has(e.key)&&(e.preventDefault(),o(n,e))}),i}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&me(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.activeClassName,o=e.active,i=e.disabled,e=e["aria-label"],r=y()(c(c(c(c({},"Editor-option",!0),"Editor-option--active",o&&!r),"".concat(r),o&&r),"Editor-option--disabled",i),n);return g.a.createElement("div",{"aria-label":e,onKeyDown:this.handleKeyDown,tabIndex:0,className:r,onClick:this.onClick,"aria-selected":o},t)}}])&&pe(n.prototype,e),t&&pe(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),m=(c(p,"propTypes",{onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string,tabIndex:a.a.number}),c(p,"defaultProps",{activeClassName:""}),o(3));function ye(e){return(ye="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})(e)}function ve(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,we(r.key),r)}}function be(e,t,n){t=Se(t);var r=e,t=_e()?Reflect.construct(t,n||[],Se(e).constructor):t.apply(e,n);if(!t||"object"!=ye(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function _e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_e=function(){return!!e})()}function Se(e){return(Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ee(e,t){return(Ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t,n){return(t=we(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(e){e=((e,t)=>{if("object"!=ye(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ye(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ye(e)?e:e+""}var v=(e=>{function t(e){var i;if(this instanceof t)return f(i=be(this,t,[e]),"buttonRef",null),f(i,"listRef",null),f(i,"handleOutsideClick",function(e){i.listRef.current&&!i.listRef.current.contains(e.target)&&i.toggleExpansion()}),f(i,"onChange",function(e){var t=i.props.onChange;t&&t(e),i.toggleExpansion()}),f(i,"setHighlighted",function(e){i.setState({highlighted:e})}),f(i,"focusTrigger",function(){var e;null!=(e=i.buttonRef.current)&&e.focus()}),f(i,"focusTriggerOnClose",function(e){"Escape"!==e.key&&"Enter"!==e.key||(i.toggleExpansion(),i.focusTrigger())}),f(i,"toggleExpansion",function(){var e=i.props,t=e.doExpand,n=e.doCollapse;(e.expanded?n:t)()}),f(i,"handleExpand",function(e){i.props.onExpandEvent(e)}),f(i,"handleListKeyDown",function(e){e.preventDefault();var t,n=i.state.highlighted,r=i.props.children[1],o=e.key;"ArrowDown"===o||"ArrowUp"===o?(t=r.length-1,i.setState(function(e){return{highlighted:"ArrowDown"===o?Math.min(e.highlighted+1,t):Math.max(e.highlighted-1,0)}})):"Enter"===o&&(e=r[n].props.value,r=i.props.onChange)&&r(e)}),i.buttonRef=g.a.createRef(),i.listRef=g.a.createRef(),i.state={highlighted:-1},i;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ee(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&(this.setState({highlighted:-1}),document.removeEventListener("keydown",this.focusTriggerOnClose),document.removeEventListener("click",this.handleOutsideClick)),!e.expanded&&t&&(document.addEventListener("keydown",this.focusTriggerOnClose),document.addEventListener("click",this.handleOutsideClick),this.setState({highlighted:0}),this.listRef.current.focus())}},{key:"render",value:function(){var n=this,e=this.props,t=e.expanded,r=e.children,o=e.className,i=e.optionWrapperClassName,a=e.triggerClassName,s=e.ariaLabel,e=e.menu,l=this.state.highlighted,c=r.slice(1,r.length),o=y()(f(f({},"Editor-dropdown",!0),"Editor-dropdown--expanded",t),o);return g.a.createElement("div",{className:o},g.a.createElement(m.a,{ref:this.buttonRef,appearance:"transparent","aria-expanded":t,"aria-label":s||"Editor-dropdown",className:a,onClick:this.handleExpand},r[0],!e&&g.a.createElement(m.g,{name:"keyboard_arrow_down"})),t&&g.a.createElement("ul",{tabIndex:1,ref:this.listRef,onKeyDown:this.handleListKeyDown,className:y()("Editor-dropdown-optionWrapper",i),onClick:u},g.a.Children.map(c,function(e,t){return e&&g.a.cloneElement(e,{onSelect:n.onChange,highlighted:l===t,setHighlighted:n.setHighlighted,highlightedClassName:"Editor-dropdown-option--highlight",index:t})})))}}])&&ve(r.prototype,e),n&&ve(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function xe(e){return(xe="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})(e)}function Ce(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,Te(r.key),r)}}function ke(e,t,n){t=Oe(t);var r=e,t=De()?Reflect.construct(t,n||[],Oe(e).constructor):t.apply(e,n);if(!t||"object"!=xe(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function De(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(De=function(){return!!e})()}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pe(e,t){return(Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t,n){return(t=Te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Te(e){e=((e,t)=>{if("object"!=xe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=xe(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==xe(e)?e:e+""}f(v,"propTypes",{children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,menu:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,triggerClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string});var b=(e=>{function a(){var i,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return h(i=ke(this,a,[].concat(r)),"onClick",function(e){var t=i.props,n=t.onSelect,r=t.onClick,o=t.value;t.disabled||(n&&n(o),r&&(e.stopPropagation(),r(o)))}),h(i,"setHighlighted",function(){i.props.setHighlighted(i.props.index)}),h(i,"resetHighlighted",function(){(0,i.props.setHighlighted)(-1)}),i}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Pe(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.active,r=e.disabled,o=e.highlighted,i=e.className,a=e.isCheckbox,s=e.activeClassName,l=e.disabledClassName,e=e.highlightedClassName,s=y()(h(h(h(h({},"Editor-dropdown-option",!0),"Editor-dropdown-option--active ".concat(s),n&&!a),"".concat(e),o),"".concat(l),r),i);return g.a.createElement("li",{tabIndex:1,className:s,onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick},t)}}])&&Ce(n.prototype,e),t&&Ce(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function Me(e){return(Me="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})(e)}function Ae(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,je(r.key),r)}}function Ie(e,t,n){t=Fe(t);var r=e,t=Re()?Reflect.construct(t,n||[],Fe(e).constructor):t.apply(e,n);if(!t||"object"!=Me(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Re=function(){return!!e})()}function Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ne(e,t){return(Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Le(e,t,n){return(t=je(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(e){e=((e,t)=>{if("object"!=Me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Me(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Me(e)?e:e+""}h(b,"propTypes",{children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string,isCheckbox:a.a.bool}),h(b,"defaultProps",{activeClassName:"",disabledClassName:"",highlightedClassName:""});var Be=(e=>{function n(){var e=this,t=n;if(e instanceof t)return Ie(this,n,arguments);throw new TypeError("Cannot call a class as a function")}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ne(r,e),r=n,(e=[{key:"renderInDropdown",value:function(){var e=this.props,i=e.config,a=e.currentState,s=i.options.length-i.max;return g.a.createElement(m.o,{tooltip:"More formatting"},g.a.createElement(v,{onChange:e.onChange,expanded:e.expanded,doExpand:e.doExpand,doCollapse:e.doCollapse,onExpandEvent:e.onExpandEvent,triggerClassName:"Editor-textDecoration-moreIcon",menu:!0},g.a.createElement(m.g,{name:"more_horizon",size:20}),i.options.slice(i.max,i.options.length).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.icon,r=r.label;return g.a.createElement(b,{key:t,value:e,active:n,isCheckbox:1<s},1<s?g.a.createElement(m.b,{checked:n,label:r}):g.a.createElement(g.a.Fragment,null,g.a.createElement(m.g,{size:20,name:o,className:"mr-4",appearance:n?"white":"default"}),g.a.createElement(m.n,{appearance:n?"white":"default"},r)))})))}},{key:"render",value:function(){var e=this.props,i=e.config,a=e.currentState,s=e.onChange,e=e.className,t=i.options.length-i.max,n=i.max,e=y()(Le({},"Editor-textDecoration",!0),e);return g.a.createElement("div",{className:e},i.options.slice(0,n).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.title,r=r.icon;return g.a.createElement(m.o,{tooltip:o},g.a.createElement(p,{"aria-label":"".concat(e," button"),role:"button",tabIndex:0,key:t,value:e,onClick:s,active:n,className:"mr-2"},g.a.createElement(m.g,{name:r,size:20,appearance:n?"info":"default"})))}),0<t&&this.renderInDropdown())}}])&&Ae(r.prototype,e),t&&Ae(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function ze(e){return(ze="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})(e)}function Ve(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,qe(r.key),r)}}function He(e,t,n){t=Ue(t);var r=e,t=Ke()?Reflect.construct(t,n||[],Ue(e).constructor):t.apply(e,n);if(!t||"object"!=ze(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ke=function(){return!!e})()}function Ue(e){return(Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function We(e,t){return(We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ge(e,t,n){(t=qe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function qe(e){e=((e,t)=>{if("object"!=ze(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ze(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ze(e)?e:e+""}Le(Be,"propTypes",{expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,className:a.a.string});e=(e=>{function t(e){var o;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");Ge(o=He(this,t,[e]),"expandCollapse",function(){o.setState(function(e){return{expanded:!e.expanded}})}),Ge(o,"toggleInlineStyle",function(e){var t=o.props,n=t.editorState,t=t.onChange,e=e.toUpperCase(),r=Object(l.getSelectionEntity)(n);if(r){r=n.getCurrentContent().getEntity(r).getType();if("MENTION"===r||"LINK"===r)return}r=d.RichUtils.toggleInlineStyle(n,e);r&&t(r)}),Ge(o,"changeKeys",function(e){var n;if(e)return n={},oe(e,function(e,t){n["CODE"===e?"monospace":e.toLowerCase()]=t}),n}),Ge(o,"doExpand",function(){o.setState({expanded:!0})}),Ge(o,"doCollapse",function(){o.setState({expanded:!1})});e=o.props,e=e.editorState;return o.state={currentStyles:e?o.changeKeys(Object(l.getSelectionInlineStyle)(e)):{}},o}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&We(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(l.getSelectionInlineStyle)(t))})}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.expanded,o=t.component||Be;return g.a.createElement(o,{config:t,currentState:n.currentStyles,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle,className:e.className})}}])&&Ve(r.prototype,e),n&&Ve(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function Ye(e){return(Ye="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})(e)}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,tt(r.key),r)}}function Je(e,t,n){t=Xe(t);var r=e,t=Ze()?Reflect.construct(t,n||[],Xe(e).constructor):t.apply(e,n);if(!t||"object"!=Ye(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ze=function(){return!!e})()}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qe(e,t){return(Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function et(e,t,n){(t=tt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function tt(e){e=((e,t)=>{if("object"!=Ye(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ye(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Ye(e)?e:e+""}Ge(e,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,className:a.a.string});var r=(e=>{function t(e){if(this instanceof t)return et(e=Je(this,t,[e]),"getBlockTypes",function(){return[{label:"H1",size:"xxl",displayName:"Heading 1"},{label:"H2",size:"xl",displayName:"Heading 2"},{label:"H3",size:"l",displayName:"Heading 3"},{label:"H4",size:"m",displayName:"Heading 4"}]}),e.state={blockTypes:e.getBlockTypes()},e;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Qe(r,e),r=t,(e=[{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config.icon,r=t.currentState.blockType;return g.a.createElement("div",{className:t.className,"aria-label":"Editor-block-control"},g.a.createElement(m.o,{tooltip:"Text style"},g.a.createElement(v,{onChange:t.onChange,expanded:t.expanded,doExpand:t.doExpand,doCollapse:t.doCollapse,onExpandEvent:t.onExpandEvent,triggerClassName:"Editor-heading-trigger"},g.a.createElement(m.g,{name:n,size:20}),e.map(function(e,t){return g.a.createElement(b,{index:t,active:r===e.label,value:e.label,key:t},g.a.createElement(m.e,{size:e.size,className:"Editor-heading-option",appearance:r===e.label?"white":"default"},e.displayName))}))))}},{key:"render",value:function(){var t=this.props.config,e=this.state.blockTypes.filter(function(e){e=e.label;return-1<t.options.indexOf(e)});return this.renderInDropdown(e)}}])&&$e(r.prototype,e),n&&$e(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),nt=(et(r,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,className:a.a.string}),r);function rt(e){return(rt="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})(e)}function ot(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,ut(r.key),r)}}function it(e,t,n){t=st(t);var r=e,t=at()?Reflect.construct(t,n||[],st(e).constructor):t.apply(e,n);if(!t||"object"!=rt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(at=function(){return!!e})()}function st(e){return(st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lt(e,t){return(lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ct(e,t,n){(t=ut(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ut(e){e=((e,t)=>{if("object"!=rt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=rt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==rt(e)?e:e+""}r=(e=>{function t(e){var o;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");ct(o=it(this,t,[e]),"expandCollapse",function(){o.setState(function(e){return{expanded:!e.expanded}})}),ct(o,"blocksTypes",[{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"}]),ct(o,"doExpand",function(){o.setState({expanded:!0})}),ct(o,"doCollapse",function(){o.setState({expanded:!1})}),ct(o,"toggleBlockType",function(t){var e=o.blocksTypes.find(function(e){return e.label===t}).style,n=o.props,r=n.editorState,n=n.onChange,r=d.RichUtils.toggleBlockType(r,e);r&&n(r)});e=e.editorState;return o.state={expanded:!1,currentBlockType:e?Object(l.getSelectedBlocksType)(e):"unstyled"},o}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&lt(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(l.getSelectedBlocksType)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,o=n.currentBlockType,n=this.blocksTypes.find(function(e){return e.style===o});return g.a.createElement(nt,{config:t,currentState:{blockType:n&&n.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,className:e})}}])&&ot(r.prototype,e),n&&ot(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),ct(r,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object,config:a.a.object,className:a.a.string});o(202);function pt(e){return(pt="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})(e)}function ft(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,vt(r.key),r)}}function ht(e,t,n){t=mt(t);var r=e,t=dt()?Reflect.construct(t,n||[],mt(e).constructor):t.apply(e,n);if(!t||"object"!=pt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dt=function(){return!!e})()}function mt(e){return(mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gt(e,t){return(gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yt(e,t,n){(t=vt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function vt(e){e=((e,t)=>{if("object"!=pt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=pt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==pt(e)?e:e+""}var bt=(e=>{function i(){var e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return yt(e=ht(this,i,[].concat(r)),"state",{defaultFontSize:void 0}),e}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&gt(n,e),n=i,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=(e=window.getComputedStyle(e[0]).getPropertyValue("font-size")).substring(0,e.length-2),this.setState({defaultFontSize:e}))}},{key:"renderCustomTrigger",value:function(){return g.a.createElement("div",null,"Riya")}},{key:"render",value:function(){var e=this.props,t=e.config,n=(t.icon,t.className),t=t.options,e=e.onChange,r=this.props.currentState.fontSize,o=this.state.defaultFontSize,o=Number(o);r||t&&t.indexOf(o);return g.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},g.a.createElement(m.d,{className:y()("rdw-fontsize-dropdown",n),onChange:e,customTrigger:this.renderCustomTrigger,icon:"text_fields",placeholder:"",options:t.map(function(e){return{label:e,value:e,selected:14===e}})}))}}])&&ft(n.prototype,e),t&&ft(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function _t(e){return(_t="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})(e)}function St(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,Dt(r.key),r)}}function Et(e,t,n){t=xt(t);var r=e,t=wt()?Reflect.construct(t,n||[],xt(e).constructor):t.apply(e,n);if(!t||"object"!=_t(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wt=function(){return!!e})()}function xt(e){return(xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ct(e,t){return(Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kt(e,t,n){(t=Dt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Dt(e){e=((e,t)=>{if("object"!=_t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=_t(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==_t(e)?e:e+""}yt(bt,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object});var Ot=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");kt(r=Et(this,n,[e]),"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),kt(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),kt(r,"doExpand",function(){r.setState({expanded:!0})}),kt(r,"doCollapse",function(){r.setState({expanded:!1})}),kt(r,"toggleFontSize",function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(l.toggleCustomInlineStyle)(n,"fontSize",e);n&&t(n)});var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontSize:t?Object(l.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE:void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ct(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(l.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontSize,o=t.component||bt,n=n&&Number(n.substring(9));return g.a.createElement(o,{config:t,fontSize:!0,translations:e,currentState:{fontSize:n},onChange:this.toggleFontSize,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&St(r.prototype,e),t&&St(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);kt(Ot,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object}),o(203);function Pt(e){return(Pt="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})(e)}function Tt(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,Nt(r.key),r)}}function Mt(e,t,n){t=It(t);var r=e,t=At()?Reflect.construct(t,n||[],It(e).constructor):t.apply(e,n);if(!t||"object"!=Pt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function At(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(At=function(){return!!e})()}function It(e){return(It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Rt(e,t){return(Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e,t,n){(t=Nt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Nt(e){e=((e,t)=>{if("object"!=Pt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Pt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Pt(e)?e:e+""}var _=(e=>{function i(){var e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ft(e=Mt(this,i,[].concat(r)),"state",{defaultFontFamily:void 0}),e}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Rt(n,e),n=i,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=window.getComputedStyle(e[0]).getPropertyValue("font-family"),this.setState({defaultFontFamily:e}))}},{key:"render",value:function(){var t=this.state.defaultFontFamily,e=this.props,n=e.config,r=n.className,o=n.dropdownClassName,i=n.options,n=n.title,a=e.translations,s=e.onChange,l=e.expanded,c=e.doCollapse,u=e.onExpandEvent,e=e.doExpand,p=this.props.currentState.fontFamily||i&&t&&i.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&t;return g.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},g.a.createElement(v,{className:y()("rdw-fontfamily-dropdown",r),optionWrapperClassName:y()("rdw-fontfamily-optionwrapper",o),onChange:s,expanded:l,doExpand:e,doCollapse:c,onExpandEvent:u,title:n||a["components.controls.fontfamily.fontfamily"]},g.a.createElement("span",{className:"rdw-fontfamily-placeholder"},p||a["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return g.a.createElement(b,{active:p===e,value:e,key:t},e)})))}}])&&Tt(n.prototype,e),t&&Tt(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Lt=(Ft(_,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object}),_);function jt(e){return(jt="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})(e)}function Bt(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,Wt(r.key),r)}}function zt(e,t,n){t=Ht(t);var r=e,t=Vt()?Reflect.construct(t,n||[],Ht(e).constructor):t.apply(e,n);if(!t||"object"!=jt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Vt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vt=function(){return!!e})()}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kt(e,t){return(Kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ut(e,t,n){(t=Wt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Wt(e){e=((e,t)=>{if("object"!=jt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=jt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==jt(e)?e:e+""}_=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");Ut(r=zt(this,n,[e]),"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),Ut(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),Ut(r,"doExpand",function(){r.setState({expanded:!0})}),Ut(r,"doCollapse",function(){r.setState({expanded:!1})}),Ut(r,"toggleFontFamily",function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(l.toggleCustomInlineStyle)(n,"fontFamily",e);n&&t(n)});var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontFamily:t?Object(l.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY:void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Kt(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(l.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontFamily,o=t.component||Lt,n=n&&n.substring(11);return g.a.createElement(o,{translations:e,config:t,currentState:{fontFamily:n},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Bt(r.prototype,e),t&&Bt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function Gt(e){return(Gt="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})(e)}function qt(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,Qt(r.key),r)}}function Yt(e,t,n){t=Jt(t);var r=e,t=$t()?Reflect.construct(t,n||[],Jt(e).constructor):t.apply(e,n);if(!t||"object"!=Gt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function $t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($t=function(){return!!e})()}function Jt(e){return(Jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zt(e,t){return(Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Xt(e,t,n){return(t=Qt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qt(e){e=((e,t)=>{if("object"!=Gt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Gt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Gt(e)?e:e+""}Ut(_,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object});var en=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Xt(t=Yt(this,a,[].concat(o)),"options",["unordered","ordered"]),Xt(t,"toggleBlockType",function(e){(0,t.props.onChange)(e)}),t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Zt(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,e=e.className,r=(t.options,t.unordered),t=t.ordered,e=y()(Xt({},"d-flex",!0),e);return g.a.createElement("div",{className:e},g.a.createElement(m.o,{tooltip:r.title},g.a.createElement(p,{value:"unordered",onClick:this.toggleBlockType,active:"unordered"===n,className:"mr-2"},g.a.createElement(m.g,{appearance:"unordered"===n?"info":"default",name:r.icon,size:20}))),g.a.createElement(m.o,{tooltip:t.title},g.a.createElement(p,{value:"ordered",onClick:this.toggleBlockType,active:"ordered"===n},g.a.createElement(m.g,{appearance:"ordered"===n?"info":"default",name:t.icon,size:20}))))}}])&&qt(n.prototype,e),t&&qt(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function tn(e){return(tn="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})(e)}function nn(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,ln(r.key),r)}}function rn(e,t,n){t=an(t);var r=e,t=on()?Reflect.construct(t,n||[],an(e).constructor):t.apply(e,n);if(!t||"object"!=tn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function on(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(on=function(){return!!e})()}function an(e){return(an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function S(e,t,n){(t=ln(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ln(e){e=((e,t)=>{if("object"!=tn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=tn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==tn(e)?e:e+""}Xt(en,"propTypes",{expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,className:a.a.string});var cn=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");S(r=rn(this,n,[e]),"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),S(r,"onChange",function(e){"unordered"===e?r.toggleBlockType("unordered-list-item"):"ordered"===e?r.toggleBlockType("ordered-list-item"):"indent"===e?r.adjustDepth(1):r.adjustDepth(-1)}),S(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),S(r,"doExpand",function(){r.setState({expanded:!0})}),S(r,"doCollapse",function(){r.setState({expanded:!1})}),S(r,"toggleBlockType",function(e){var t=r.props,n=t.onChange,t=d.RichUtils.toggleBlockType(t.editorState,e);t&&n(t)}),S(r,"adjustDepth",function(e){var t=r.props,n=t.onChange,t=t.editorState,t=Object(l.changeDepth)(t,e,4);t&&n(t)}),S(r,"isIndentDisabled",function(){var e=r.props.editorState,t=r.state.currentBlock,e=Object(l.getBlockBeforeSelectedBlock)(e);return!e||!Object(l.isListBlock)(t)||e.get("type")!==t.get("type")||e.get("depth")<t.get("depth")}),S(r,"isOutdentDisabled",function(){var e=r.state.currentBlock;return!e||!Object(l.isListBlock)(e)||e.get("depth")<=0});var e=r.props,t=e.editorState,e=e.modalHandler;return r.state={expanded:!1,currentBlock:t?Object(l.getSelectedBlock)(t):void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&sn(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(l.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,t=t.className,o=this.state,i=o.expanded,o=o.currentBlock;return"unordered-list-item"===o.get("type")?e="unordered":"ordered-list-item"===o.get("type")&&(e="ordered"),g.a.createElement(en,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&&nn(r.prototype,e),t&&nn(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);S(cn,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object,className:a.a.string}),o(204);function un(e){return(un="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})(e)}function pn(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,gn(r.key),r)}}function fn(e,t,n){t=dn(t);var r=e,t=hn()?Reflect.construct(t,n||[],dn(e).constructor):t.apply(e,n);if(!t||"object"!=un(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function hn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hn=function(){return!!e})()}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mn(e,t){return(mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function gn(e){e=((e,t)=>{if("object"!=un(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=un(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==un(e)?e:e+""}var yn=(e=>{function n(){var e=this,t=n;if(e instanceof t)return fn(this,n,arguments);throw new TypeError("Cannot call a class as a function")}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&mn(r,e),r=n,(e=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,i=t.right,a=t.justify,t=t.className,s=e.onChange,l=e.currentState.textAlignment,e=e.translations;return g.a.createElement("div",{className:y()("rdw-text-align-wrapper",t),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&g.a.createElement(p,{value:"left",className:y()(r.className),active:"left"===l,onClick:s,title:r.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&g.a.createElement(p,{value:"center",className:y()(o.className),active:"center"===l,onClick:s,title:o.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&g.a.createElement(p,{value:"right",className:y()(i.className),active:"right"===l,onClick:s,title:i.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&g.a.createElement(p,{value:"justify",className:y()(a.className),active:"justify"===l,onClick:s,title:a.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:a.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState.textAlignment,s=e.onChange,e=e.translations,l=t.options,c=t.left,u=t.center,p=t.right,f=t.justify,h=t.className,d=t.dropdownClassName,m=t.title;return g.a.createElement(v,{className:y()("rdw-text-align-dropdown",h),optionWrapperClassName:y()(d),onChange:s,expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:m||e["components.controls.textalign.textalign"]},g.a.createElement("img",{src:a&&t[a]&&t[a].icon||le(t),alt:""}),0<=l.indexOf("left")&&g.a.createElement(b,{value:"left",active:"left"===a,className:y()("rdw-text-align-dropdownOption",c.className),title:c.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("center")&&g.a.createElement(b,{value:"center",active:"center"===a,className:y()("rdw-text-align-dropdownOption",u.className),title:u.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("right")&&g.a.createElement(b,{value:"right",active:"right"===a,className:y()("rdw-text-align-dropdownOption",p.className),title:p.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:p.icon,alt:""})),0<=l.indexOf("justify")&&g.a.createElement(b,{value:"justify",active:"justify"===a,className:y()("rdw-text-align-dropdownOption",f.className),title:f.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:f.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&pn(r.prototype,e),t&&pn(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function vn(e){return(vn="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})(e)}function bn(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,Cn(r.key),r)}}function _n(e,t,n){t=En(t);var r=e,t=Sn()?Reflect.construct(t,n||[],En(e).constructor):t.apply(e,n);if(!t||"object"!=vn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Sn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sn=function(){return!!e})()}function En(e){return(En=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wn(e,t){return(wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xn(e,t,n){(t=Cn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Cn(e){e=((e,t)=>{if("object"!=vn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=vn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==vn(e)?e:e+""}E=yn,w="propTypes",x={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object},(w=gn(w))in E?Object.defineProperty(E,w,{value:x,enumerable:!0,configurable:!0,writable:!0}):E[w]=x;var E=(e=>{function t(e){var r;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");xn(r=_n(this,t,[e]),"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),xn(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),xn(r,"doExpand",function(){r.setState({expanded:!0})}),xn(r,"doCollapse",function(){r.setState({expanded:!1})}),xn(r,"addBlockAlignmentData",function(e){var t=r.props,n=t.editorState,t=t.onChange;t(r.state.currentTextAlignment!==e?Object(l.setBlockData)(n,{"text-align":e}):Object(l.setBlockData)(n,{"text-align":void 0}))});e=r.props.modalHandler;return r.state={currentTextAlignment:void 0},e.registerCallBack(r.expandCollapse),r}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&wn(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(l.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.expanded,o=t.component||yn;return g.a.createElement(o,{config:t,translations:e.translations,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:n.currentTextAlignment},onChange:this.addBlockAlignmentData})}}])&&bn(r.prototype,e),n&&bn(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function kn(e){return(kn="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})(e)}function Dn(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,In(r.key),r)}}function On(e,t,n){t=Tn(t);var r=e,t=Pn()?Reflect.construct(t,n||[],Tn(e).constructor):t.apply(e,n);if(!t||"object"!=kn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Pn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pn=function(){return!!e})()}function Tn(e){return(Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Mn(e,t){return(Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function An(e,t,n){(t=In(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function In(e){e=((e,t)=>{if("object"!=kn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=kn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==kn(e)?e:e+""}xn(E,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object});var w=(e=>{function t(e){var o;if(this instanceof t)return An(o=On(this,t,[e]),"onChange",function(e){var t=o.props,n=t.onChange;t.expanded&&n(o.state.currentStyle,e)}),An(o,"handleClick",function(e){var t=e.target.getAttribute("data-color");t&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))}),An(o,"handleKeyDown",function(e){var t=e.target.getAttribute("data-color");t&&"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))}),An(o,"renderModal",function(){var e=o.props,t=e.config.colors,e=e.currentState,n=e.color,r="color"===o.state.currentStyle?n:e.bgColor;return g.a.createElement("div",{className:"Editor-colorPicker",onClick:o.handleClick,onKeyDown:o.handleKeyDown},t.map(function(e,t){return g.a.createElement("div",{className:"Editor-colorPicker-circleWrapper"},g.a.createElement("div",{ref:0===t?o.ref:null,"data-color":e,tabIndex:0,key:t,style:{backgroundColor:e},className:"Editor-colorPicker-circle","aria-selected":r===e}),r===e&&g.a.createElement(m.g,{name:"check",appearance:"white",className:"Editor-colorPicker-selectedCircle"}))}))}),o.state={currentStyle:"color"},o.ref=g.a.createRef(),o;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Mn(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&(this.ref.current,this.setState({currentStyle:"color"}))}},{key:"render",value:function(){var e=this.props,t=e.expanded,n=g.a.createElement(m.o,{tooltip:"Text color"},g.a.createElement(p,{tabIndex:0,"aria-label":"Font colors",onClick:e.onToggle,active:t,activeClassName:"bg-secondary"},g.a.createElement(m.g,{name:"text_format",size:20})));return g.a.createElement("div",{className:e.className,"aria-haspopup":"true","aria-expanded":t},g.a.createElement(m.m,{trigger:n,position:"bottom-start",open:t},this.renderModal()))}}])&&Dn(r.prototype,e),n&&Dn(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),Rn=(An(w,"propTypes",{expanded:a.a.bool,onToggle:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,className:a.a.className}),w);function Fn(e){return(Fn="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})(e)}function Nn(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,Hn(r.key),r)}}function Ln(e,t,n){t=Bn(t);var r=e,t=jn()?Reflect.construct(t,n||[],Bn(e).constructor):t.apply(e,n);if(!t||"object"!=Fn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function jn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jn=function(){return!!e})()}function Bn(e){return(Bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zn(e,t){return(zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vn(e,t,n){(t=Hn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Hn(e){e=((e,t)=>{if("object"!=Fn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Fn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Fn(e)?e:e+""}var x=(e=>{function r(e){var i;if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");Vn(i=Ln(this,r,[e]),"state",{expanded:!1,currentColor:"var(--text)",currentBgColor:void 0}),Vn(i,"expandCollapse",function(){i.setState({expanded:!1})}),Vn(i,"toggleColorPicker",function(){i.setState(function(e){return{expanded:!e.expanded}})}),Vn(i,"toggleColor",function(t,n){var e=i.props,r=e.editorState,o=e.onChange,e=Object(l.getSelectionEntity)(r);if(e){e=r.getCurrentContent().getEntity(e).getType();if("MENTION"===e||"LINK"===e)return}i.setState(function(){return{currentColor:n?"color-".concat(n):"color-var(--text)",currentBgColor:Object(l.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR,expanded:!1}},function(){var e=Object(l.toggleCustomInlineStyle)(r,t,n);e&&o(e)})});var t=e.editorState,e=e.modalHandler,n={expanded:!1,currentColor:void 0,currentBgColor:void 0};return t&&(n.currentColor=Object(l.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR||"color-var(--text)",n.currentBgColor=Object(l.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR),i.state=n,e.registerCallBack(i.expandCollapse),i}var t,n=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&zn(n,e),n=r,(e=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.currentColor,o=n.currentBgColor,n=n.expanded,i=t.component||Rn,r=r&&r.substring(6),o=o&&o.substring(8);return g.a.createElement(i,{config:t,className:e,onChange:this.toggleColor,expanded:n,onToggle:this.toggleColorPicker,currentState:{color:r,bgColor:o}})}}])&&Nn(n.prototype,e),t&&Nn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),w=(Vn(x,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,className:a.a.string}),x),x=o(94),x=o.n(x);function Kn(e){return(Kn="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})(e)}function Un(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,Jn(r.key),r)}}function Wn(e,t,n){t=qn(t);var r=e,t=Gn()?Reflect.construct(t,n||[],qn(e).constructor):t.apply(e,n);if(!t||"object"!=Kn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Gn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gn=function(){return!!e})()}function qn(e){return(qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yn(e,t){return(Yn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $n(e,t,n){return(t=Jn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jn(e){e=((e,t)=>{if("object"!=Kn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Kn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Kn(e)?e:e+""}var C=(e=>{function a(){var n,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return $n(n=Wn(this,a,[].concat(o)),"state",{showModal:!1,editing:!1,linkTarget:"",linkTitle:"",linkTargetOption:n.props.config.defaultTargetOption}),$n(n,"addLink",function(){var e=n.props.onChange,t=n.state;e("link",t.linkTitle,t.linkTarget,t.linkTargetOption)}),$n(n,"updateValue",function(e){n.setState($n({},"".concat(e.target.name),e.target.value)),"linkTarget"===e.target.name&&n.props.onErrorClear&&n.props.onErrorClear()}),$n(n,"updateTargetOption",function(e){n.setState({linkTargetOption:e.target.checked?"_blank":"_self"})}),n}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Yn(n,e),n=a,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.currentState,n=t.link,t=t.selectionText;e.expanded&&!this.props.expanded&&(this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption}),this.props.onErrorClear)&&this.props.onErrorClear(),!e.expanded&&this.props.expanded&&(this.setState({showModal:!1,linkTarget:n&&n.target,linkTitle:n&&n.title||t,linkTargetOption:this.props.config.defaultTargetOption,editing:void 0!==n}),this.props.onErrorClear)&&this.props.onErrorClear()}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.onExpandEvent,e=e.errorMessage,n=this.state,r=n.linkTitle,o=n.linkTarget;return g.a.createElement("div",{className:"px-6 mt-6 mb-5",onClick:u},g.a.createElement(m.n,{weight:"strong",size:"large"},n.editing?"Edit":"Insert a"," link"),g.a.createElement(m.h,{icon:"insert_link",className:"mt-4",placeholder:"Paste a link to insert",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:o,autoComplete:"off",autoFocus:!0,onClick:u,error:!!e}),e&&g.a.createElement(m.f,{message:e,error:!0,className:"mt-2"}),g.a.createElement(m.h,{icon:"text_fields",className:"my-5",placeholder:"Text to display",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:r,autoComplete:"off",onClick:u}),g.a.createElement("div",{className:"d-flex justify-content-end"},g.a.createElement(m.a,{onClick:t,className:"mr-4"},"Cancel"),g.a.createElement(m.a,{onClick:this.addLink,disabled:!o||!r,appearance:"primary"},"Save")))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=e.inDropdown,o=e.onExpandEvent,e=e.expanded,t=r?g.a.createElement(b,null,g.a.createElement(m.g,{size:20,name:n,className:"mr-4"}),g.a.createElement(m.n,null,t.title)):g.a.createElement(m.o,{tooltip:"Link"},g.a.createElement(p,{value:"unordered-list-item",onClick:o,"aria-haspopup":"true","aria-expanded":e,active:e,activeClassName:"bg-secondary"},g.a.createElement(m.g,{name:n,size:20})));return g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e},g.a.createElement(m.m,{trigger:t,position:r?"right":"bottom",open:e,onToggle:o},this.renderAddLinkModal()))}}])&&Un(n.prototype,e),t&&Un(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Zn=($n(C,"propTypes",{expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,inDropdown:a.a.boolean,errorMessage:a.a.string,onErrorClear:a.a.func}),C);function Xn(e){return(Xn="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})(e)}function Qn(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,ar(r.key),r)}}function er(e,t,n){t=nr(t);var r=e,t=tr()?Reflect.construct(t,n||[],nr(e).constructor):t.apply(e,n);if(!t||"object"!=Xn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function tr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tr=function(){return!!e})()}function nr(e){return(nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rr(e,t){return(rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function or(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function ir(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?or(Object(n),!0).forEach(function(e){k(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function k(e,t,n){(t=ar(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ar(e){e=((e,t)=>{if("object"!=Xn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Xn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Xn(e)?e:e+""}function sr(e){var t=lr.match(e.target);return ir(ir({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var lr=x()(),C=(e=>{function n(e){var s;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");k(s=er(this,n,[e]),"onExpandEvent",function(){var e=!s.state.expanded;s.setState({expanded:e}),e||s.props.onCloseLinkPopover()}),k(s,"onChange",function(e,t,n,r){var o=s.props.config.linkCallback;"link"===e?"#"!==(o=se((e=(o||sr)({title:t,target:n,targetOption:r})).target))&&ae(o)?s.addLink(e.title,o,e.targetOption):s.setState({errorMessage:"Invalid URL"}):s.removeLink()}),k(s,"onErrorClear",function(){s.setState({errorMessage:null})}),k(s,"getCurrentValues",function(){var e,t=s.props.editorState,n=s.state,n=n.currentEntity,r=t.getCurrentContent(),o={};return n&&"LINK"===r.getEntity(n).get("type")&&(o.link={},e=n&&Object(l.getEntityRange)(t,n),o.link.target=n&&r.getEntity(n).get("data").url,o.link.targetOption=n&&r.getEntity(n).get("data").targetOption,o.link.title=e&&e.text),o.selectionText=Object(l.getSelectionText)(t),o}),k(s,"doExpand",function(){s.setState({expanded:!0})}),k(s,"expandCollapse",function(){s.setState({expanded:s.signalExpanded}),s.signalExpanded=!1}),k(s,"doCollapse",function(){s.setState({expanded:!1})}),k(s,"removeLink",function(){var e=s.props,t=e.editorState,e=e.onChange,n=s.state.currentEntity,r=t.getSelection();n&&(n=Object(l.getEntityRange)(t,n),r=r.getIsBackward()?r.merge({anchorOffset:n.end,focusOffset:n.start}):r.merge({anchorOffset:n.start,focusOffset:n.end}),e(d.RichUtils.toggleLink(t,r,null)))}),k(s,"addLink",function(e,t,n){var r=s.props,o=r.editorState,r=r.onChange,i=s.state.currentEntity,a=o.getSelection(),i=(i&&(i=Object(l.getEntityRange)(o,i),a=a.getIsBackward()?a.merge({anchorOffset:i.end,focusOffset:i.start}):a.merge({anchorOffset:i.start,focusOffset:i.end})),o.getCurrentContent().createEntity("LINK","MUTABLE",{url:t,targetOption:n,targetText:e}).getLastCreatedEntityKey()),t=d.Modifier.replaceText(o.getCurrentContent(),a,"".concat(e),null,i),n=d.EditorState.push(o,t,"insert-characters");a=n.getSelection().merge({anchorOffset:a.get("anchorOffset")+e.length,focusOffset:a.get("anchorOffset")+e.length}),n=d.EditorState.acceptSelection(n,a),t=d.Modifier.insertText(n.getCurrentContent(),a," ",n.getCurrentInlineStyle(),void 0),r(d.EditorState.push(n,t,"insert-characters")),s.setState({errorMessage:null}),s.props.onCloseLinkPopover(),s.doCollapse()});var e=s.props,t=e.editorState;return s.state={expanded:e.linkPopoverOpen,selectionText:void 0,link:void 0,currentEntity:t?Object(l.getSelectionEntity)(t):void 0,errorMessage:null},s}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&rr(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.editorState,t=t.linkPopoverOpen;n&&n!==e.editorState&&this.setState({currentEntity:Object(l.getSelectionEntity)(n)}),e.linkPopoverOpen!==t&&t&&this.setState({expanded:t})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown,n=this.state,r=n.expanded,n=n.errorMessage,o=this.getCurrentValues(),i=o.link;return g.a.createElement(Zn,{config:t,expanded:r,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:i,selectionText:o.selectionText},onChange:this.onChange,errorMessage:n,onErrorClear:this.onErrorClear})}}])&&Qn(r.prototype,e),t&&Qn(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),x=(k(C,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,onCloseLinkPopover:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,inDropdown:a.a.boolean,linkPopoverOpen:a.a.bool}),C);function cr(e){return(cr="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})(e)}function ur(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,gr(r.key),r)}}function pr(e,t,n){t=hr(t);var r=e,t=fr()?Reflect.construct(t,n||[],hr(e).constructor):t.apply(e,n);if(!t||"object"!=cr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function fr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fr=function(){return!!e})()}function hr(e){return(hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function dr(e,t){return(dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mr(e,t,n){(t=gr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function gr(e){e=((e,t)=>{if("object"!=cr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=cr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==cr(e)?e:e+""}C=(e=>{function t(e){var i;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");mr(i=pr(this,t,[e]),"addLink",function(){var e=i.props,t=e.editorState,n=e.onChange,e=e.mention.trigger,e=void 0===e?"@":e,r=i.state.currentEntity,o=t.getSelection(),r=(r&&(r=Object(l.getEntityRange)(t,r),o=o.getIsBackward()?o.merge({anchorOffset:r.end,focusOffset:r.start}):o.merge({anchorOffset:r.start,focusOffset:r.end})),d.Modifier.replaceText(t.getCurrentContent(),o,"".concat(e),t.getCurrentInlineStyle(),void 0)),o=d.EditorState.push(t,r,"insert-characters");n(d.EditorState.push(o,r,"insert-characters"))});e=i.props.editorState;return i.state={selectionText:void 0,link:void 0,currentEntity:e?Object(l.getSelectionEntity)(e):void 0},i}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&dr(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(l.getSelectionEntity)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,e=e.mention.label;return g.a.createElement(m.o,{tooltip:e||t.title},g.a.createElement(p,{value:"unordered-list-item",onClick:this.addLink,className:"mr-2"},g.a.createElement(m.g,{name:n,size:20})))}}])&&ur(r.prototype,e),n&&ur(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),mr(C,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,config:a.a.object,inDropdown:a.a.boolean});o(210);function yr(e){return(yr="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})(e)}function vr(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,xr(r.key),r)}}function br(e,t,n){t=Sr(t);var r=e,t=_r()?Reflect.construct(t,n||[],Sr(e).constructor):t.apply(e,n);if(!t||"object"!=yr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function _r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_r=function(){return!!e})()}function Sr(e){return(Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Er(e,t){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wr(e,t,n){return(t=xr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xr(e){e=((e,t)=>{if("object"!=yr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=yr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==yr(e)?e:e+""}var Cr=(e=>{function a(){var n,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return wr(n=br(this,a,[].concat(o)),"state",{embeddedLink:"",height:n.props.config.defaultSize.height,width:n.props.config.defaultSize.width}),wr(n,"onChange",function(){var e=n.props.onChange,t=n.state;e(t.embeddedLink,t.height,t.width)}),wr(n,"updateValue",function(e){n.setState(wr({},"".concat(e.target.name),e.target.value))}),n}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Er(n,e),n=a,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props;!t.expanded&&e.expanded&&(t=(e=t.config.defaultSize).height,this.setState({embeddedLink:"",height:t,width:e.width}))}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,e=e.width,r=this.props,o=r.config.popupClassName,i=r.doCollapse,r=r.translations;return g.a.createElement("div",{className:y()("rdw-embedded-modal",o),onClick:u},g.a.createElement("div",{className:"rdw-embedded-modal-header"},g.a.createElement("span",{className:"rdw-embedded-modal-header-option"},r["components.controls.embedded.embeddedlink"],g.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),g.a.createElement("div",{className:"rdw-embedded-modal-link-section"},g.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},g.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:r["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("div",{className:"rdw-embedded-modal-size"},g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:e,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),g.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!e},r["generic.add"]),g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:i},r["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return g.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},g.a.createElement(p,{className:y()(r),value:"unordered-list-item",onClick:i,title:t||e["components.controls.embedded.embedded"]},g.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&vr(n.prototype,e),t&&vr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),kr=(wr(Cr,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func}),Cr);function Dr(e){return(Dr="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})(e)}function Or(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,Ir(r.key),r)}}function Pr(e,t,n){t=Mr(t);var r=e,t=Tr()?Reflect.construct(t,n||[],Mr(e).constructor):t.apply(e,n);if(!t||"object"!=Dr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Tr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tr=function(){return!!e})()}function Mr(e){return(Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ar(e,t){return(Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function D(e,t,n){(t=Ir(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Ir(e){e=((e,t)=>{if("object"!=Dr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Dr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Dr(e)?e:e+""}Cr=(e=>{function i(){var a,e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return D(a=Pr(this,i,[].concat(r)),"state",{expanded:!1}),D(a,"onExpandEvent",function(){a.signalExpanded=!a.state.expanded}),D(a,"expandCollapse",function(){a.setState({expanded:a.signalExpanded}),a.signalExpanded=!1}),D(a,"doExpand",function(){a.setState({expanded:!0})}),D(a,"doCollapse",function(){a.setState({expanded:!1})}),D(a,"addEmbeddedLink",function(e,t,n){var r=a.props,o=r.editorState,i=r.onChange,r=r.config.embedCallback,r=r?r(e):e,e=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:r,height:t,width:n}).getLastCreatedEntityKey();i(d.AtomicBlockUtils.insertAtomicBlock(o,e," ")),a.doCollapse()}),a}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Ar(n,e),n=i,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||kr;return g.a.createElement(r,{config:t,translations:e.translations,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Or(n.prototype,e),t&&Or(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),D(Cr,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object});o(211);function Rr(e){return(Rr="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})(e)}function Fr(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,Vr(r.key),r)}}function Nr(e,t,n){t=jr(t);var r=e,t=Lr()?Reflect.construct(t,n||[],jr(e).constructor):t.apply(e,n);if(!t||"object"!=Rr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Lr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lr=function(){return!!e})()}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Br(e,t){return(Br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function zr(e,t,n){(t=Vr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Vr(e){e=((e,t)=>{if("object"!=Rr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Rr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Rr(e)?e:e+""}var Hr=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return zr(t=Nr(this,a,[].concat(o)),"onChange",function(e){(0,t.props.onChange)(e.target.innerHTML)}),t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Br(n,e),n=a,(e=[{key:"renderEmojiModal",value:function(){var n=this,e=this.props.config,t=e.popupClassName,e=e.emojis;return g.a.createElement("div",{className:y()("rdw-emoji-modal",t),onClick:u},e.map(function(e,t){return g.a.createElement("span",{key:t,className:"rdw-emoji-icon",alt:"",onClick:n.onChange},e)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=e.expanded,i=e.onExpandEvent;return g.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":o,title:t.title||e.translations["components.controls.emoji.emoji"]},g.a.createElement(p,{className:y()(r),value:"unordered-list-item",onClick:i},g.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&Fr(n.prototype,e),t&&Fr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Kr=(zr(Hr,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object}),Hr);function Ur(e){return(Ur="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})(e)}function Wr(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,Jr(r.key),r)}}function Gr(e,t,n){t=Yr(t);var r=e,t=qr()?Reflect.construct(t,n||[],Yr(e).constructor):t.apply(e,n);if(!t||"object"!=Ur(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function qr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qr=function(){return!!e})()}function Yr(e){return(Yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $r(e,t){return($r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function O(e,t,n){(t=Jr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Jr(e){e=((e,t)=>{if("object"!=Ur(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ur(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Ur(e)?e:e+""}Hr=(e=>{function a(){var r,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return O(r=Gr(this,a,[].concat(o)),"state",{expanded:!1}),O(r,"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),O(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),O(r,"doExpand",function(){r.setState({expanded:!0})}),O(r,"doCollapse",function(){r.setState({expanded:!1})}),O(r,"addEmoji",function(e){var t=r.props,n=t.editorState,t=t.onChange,e=d.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());t(d.EditorState.push(n,e,"insert-characters")),r.doCollapse()}),r}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&$r(n,e),n=a,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||Kr;return g.a.createElement(r,{config:t,translations:e.translations,onChange:this.addEmoji,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&Wr(n.prototype,e),t&&Wr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function Zr(e){return(Zr="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})(e)}function Xr(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,ro(r.key),r)}}function Qr(e,t,n){t=to(t);var r=e,t=eo()?Reflect.construct(t,n||[],to(e).constructor):t.apply(e,n);if(!t||"object"!=Zr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function eo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eo=function(){return!!e})()}function to(e){return(to=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function no(e,t){return(no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function P(e,t,n){return(t=ro(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ro(e){e=((e,t)=>{if("object"!=Zr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Zr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Zr(e)?e:e+""}O(Hr,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object});var oo=(e=>{function t(e){var i;if(this instanceof t)return P(i=Qr(this,t,[e]),"inputRef",null),P(i,"showImageUploadOption",function(){i.setState({uploadHighlighted:!0})}),P(i,"addImageFromState",function(){var e=i.state,t=e.imgSrc,e=e.alt,n=i.state,r=n.height,n=n.width,o=i.props.onChange;isNaN(r)||(r+="px"),isNaN(n)||(n+="px"),o(t,r,n,e)}),P(i,"showImageURLOption",function(){i.setState({uploadHighlighted:!1})}),P(i,"toggleShowImageLoading",function(){var e=!i.state.showImageLoading;i.setState({showImageLoading:e})}),P(i,"updateValue",function(e){i.setState(P({},"".concat(e.target.name),e.target.value))}),P(i,"selectImage",function(e){e.target.files&&0<e.target.files.length&&i.uploadImage(e.target.files[0]),e.target.value=null}),P(i,"uploadImage",function(e){i.toggleShowImageLoading(),(0,i.props.config.uploadCallback)(e).then(function(e){e=e.data;i.setState({showImageLoading:!1,dragEnter:!1,imgSrc:e.link||e.url},i.addImageFromState),i.fileUpload=!1}).catch(function(){i.setState({showImageLoading:!1,dragEnter:!1})})}),P(i,"fileUploadClick",function(e,t){i.inputRef.current&&t&&t.key&&i.inputRef.current.click(),i.fileUpload=!0}),P(i,"stopPropagation",function(e){i.fileUpload?i.fileUpload=!1:(e.preventDefault(),e.stopPropagation())}),P(i,"handleButtonClick",function(){i.inputRef&&i.inputRef.current&&i.inputRef.current.click()}),i.inputRef=g.a.createRef(),i.state={imgSrc:"",dragEnter:!1,uploadHighlighted:i.props.config.uploadEnabled&&!!i.props.config.uploadCallback,showImageLoading:!1,height:i.props.config.defaultSize.height,width:i.props.config.defaultSize.width,alt:""},i;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&no(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.title,t=t.inputAccept;return e.inDropdown?g.a.createElement(b,null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(m.g,{name:n,size:20,className:"mr-4"}),g.a.createElement(m.n,null,r)),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"})):g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e.expanded},g.a.createElement(m.o,{tooltip:r},g.a.createElement(p,{"aria-label":"add image",className:"mr-2",value:"unordered-list-item",onClick:this.fileUploadClick},g.a.createElement("span",null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(m.g,{name:n,size:20}))),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"}))))}}])&&Xr(r.prototype,e),n&&Xr(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),io=(P(oo,"propTypes",{expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,inDropdown:a.a.bool}),oo);function ao(e){return(ao="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})(e)}function so(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,ho(r.key),r)}}function lo(e,t,n){t=uo(t);var r=e,t=co()?Reflect.construct(t,n||[],uo(e).constructor):t.apply(e,n);if(!t||"object"!=ao(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function co(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(co=function(){return!!e})()}function uo(e){return(uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function po(e,t){return(po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function fo(e,t,n){(t=ho(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ho(e){e=((e,t)=>{if("object"!=ao(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ao(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ao(e)?e:e+""}function mo(e){var t=e.config,n=e.onChange,e=e.translations,r=t.icon,o=t.className,t=t.title;return g.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},g.a.createElement(p,{className:y()(o),onClick:n,title:t||e["components.controls.remove.remove"]},g.a.createElement("img",{src:r,alt:""})))}var oo=(e=>{function t(e){var s;if(this instanceof t)return fo(s=lo(this,t,[e]),"addImage",function(e,t,n,r){var o=s.props,i=o.editorState,a=o.onChange,e={src:e,height:t,width:n},t=(o.config.alt&&(e.alt=r),i.getCurrentContent().createEntity("IMAGE","MUTABLE",e).getLastCreatedEntityKey());a(d.AtomicBlockUtils.insertAtomicBlock(i,t," "))}),s.state={expanded:!1},s;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&po(r,e),r=t,(e=[{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.config;return g.a.createElement(io,{config:t,inDropdown:e.inDropdown,onChange:this.addImage})}}])&&so(r.prototype,e),n&&so(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),go=(fo(oo,"propTypes",{editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,config:a.a.object,inDropdown:a.a.bool}),o(212),mo.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object},mo);function yo(e){return(yo="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})(e)}function vo(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,wo(r.key),r)}}function bo(e,t,n){t=So(t);var r=e,t=_o()?Reflect.construct(t,n||[],So(e).constructor):t.apply(e,n);if(!t||"object"!=yo(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function _o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_o=function(){return!!e})()}function So(e){return(So=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Eo(e,t){return(Eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t,n){(t=wo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function wo(e){e=((e,t)=>{if("object"!=yo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=yo(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==yo(e)?e:e+""}var xo=(e=>{function a(){var n,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return T(n=bo(this,a,[].concat(o)),"state",{expanded:!1}),T(n,"onExpandEvent",function(){n.signalExpanded=!n.state.expanded}),T(n,"expandCollapse",function(){n.setState({expanded:n.signalExpanded}),n.signalExpanded=!1}),T(n,"removeInlineStyles",function(){var e=n.props,t=e.editorState;(0,e.onChange)(n.removeAllInlineStyles(t))}),T(n,"removeAllInlineStyles",function(n){var r=n.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){r=d.Modifier.removeInlineStyle(r,n.getSelection(),e)}),oe(Object(l.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(r=d.Modifier.removeInlineStyle(r,n.getSelection(),t))}),d.EditorState.push(n,r,"change-inline-style")}),T(n,"doExpand",function(){n.setState({expanded:!0})}),T(n,"doCollapse",function(){n.setState({expanded:!1})}),n}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Eo(n,e),n=a,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||go;return g.a.createElement(r,{config:t,translations:e.translations,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&vo(n.prototype,e),t&&vo(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);T(xo,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object}),o(213);function Co(e){return(Co="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})(e)}function ko(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,Ao(r.key),r)}}function Do(e,t,n){t=Po(t);var r=e,t=Oo()?Reflect.construct(t,n||[],Po(e).constructor):t.apply(e,n);if(!t||"object"!=Co(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Oo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oo=function(){return!!e})()}function Po(e){return(Po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function To(e,t){return(To=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mo(e,t,n){(t=Ao(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Ao(e){e=((e,t)=>{if("object"!=Co(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Co(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Co(e)?e:e+""}var Io=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Mo(t=Do(this,a,[].concat(o)),"onChange",function(e){(0,t.props.onChange)(e)}),t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&To(n,e),n=a,(e=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState,s=a.undoDisabled,a=a.redoDisabled,e=e.translations,l=t.options,c=t.undo,u=t.redo,p=t.className,f=t.dropdownClassName,h=t.title;return g.a.createElement(v,{className:y()("rdw-history-dropdown",p),optionWrapperClassName:y()(f),expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-history-control",title:h||e["components.controls.history.history"]},g.a.createElement("img",{src:le(t),alt:""}),0<=l.indexOf("undo")&&g.a.createElement(b,{value:"undo",onClick:this.onChange,disabled:s,className:y()("rdw-history-dropdownoption",c.className),title:c.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("redo")&&g.a.createElement(b,{value:"redo",onClick:this.onChange,disabled:a,className:y()("rdw-history-dropdownoption",u.className),title:u.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:u.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,t=t.className,i=e.currentState,a=i.undoDisabled,i=i.redoDisabled,e=e.translations;return g.a.createElement("div",{className:y()("rdw-history-wrapper",t),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&g.a.createElement(p,{value:"undo",onClick:this.onChange,className:y()(r.className),disabled:a,title:r.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&g.a.createElement(p,{value:"redo",onClick:this.onChange,className:y()(o.className),disabled:i,title:o.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&ko(n.prototype,e),t&&ko(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function Ro(e){return(Ro="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})(e)}function Fo(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,Vo(r.key),r)}}function No(e,t,n){t=jo(t);var r=e,t=Lo()?Reflect.construct(t,n||[],jo(e).constructor):t.apply(e,n);if(!t||"object"!=Ro(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Lo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lo=function(){return!!e})()}function jo(e){return(jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Bo(e,t){return(Bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function zo(e,t,n){(t=Vo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Vo(e){e=((e,t)=>{if("object"!=Ro(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ro(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Ro(e)?e:e+""}Mo(Io,"propTypes",{expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object});var Ho=(e=>{function o(e){var r;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");zo(r=No(this,o,[e]),"onExpandEvent",function(){r.signalExpanded=!r.state.expanded}),zo(r,"onChange",function(e){var t=r.props,n=t.editorState,t=t.onChange,e=d.EditorState[e](n);e&&t(e)}),zo(r,"doExpand",function(){r.setState({expanded:!0})}),zo(r,"doCollapse",function(){r.setState({expanded:!1})}),zo(r,"expandCollapse",function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1});var t={expanded:!1,undoDisabled:!1,redoDisabled:!1},n=e.editorState,e=e.modalHandler;return n&&(t.undoDisabled=0===n.getUndoStack().size,t.redoDisabled=0===n.getRedoStack().size),r.state=t,e.registerCallBack(r.expandCollapse),r}var t,n=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Bo(n,e),n=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.undoDisabled,o=t.component||Io;return g.a.createElement(o,{config:t,translations:e.translations,currentState:{undoDisabled:r,redoDisabled:n.redoDisabled},expanded:n.expanded,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&Fo(n.prototype,e),t&&Fo(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Ko=(zo(Ho,"propTypes",{onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object}),["config","currentState","onChange"]),Uo=["config"];function Wo(e){return(Wo="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})(e)}function Go(){return(Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function qo(e,t){if(null==e)return{};var n,r=((e,t)=>{if(null==e)return{};var n,r={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r})(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function Yo(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,ei(r.key),r)}}function $o(e,t,n){t=Zo(t);var r=e,t=Jo()?Reflect.construct(t,n||[],Zo(e).constructor):t.apply(e,n);if(!t||"object"!=Wo(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Jo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jo=function(){return!!e})()}function Zo(e){return(Zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xo(e,t){return(Xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Qo(e,t,n){(t=ei(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ei(e){e=((e,t)=>{if("object"!=Wo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Wo(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Wo(e)?e:e+""}var ti=(e=>{function n(e){var t;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");Qo(t=$o(this,n,[e]),"onExpandEvent",function(){t.setState({expanded:!t.state.expanded})}),Qo(t,"expandCollapse",function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),Qo(t,"doExpand",function(){t.setState({expanded:!0})}),Qo(t,"doCollapse",function(){t.setState({expanded:!1})}),Qo(t,"onChange",function(e){t.doCollapse(),t.props.onChange(e)});e=t.props;e.editorState;return t.state={expanded:!1},t}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Xo(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler}},{key:"renderInDropdown",value:function(){var r=this,e=this.props,o=e.config,i=qo(e,Ko);this.state.expanded;return g.a.createElement(v,{expanded:this.state.expanded,doExpand:this.doExpand,doCollapse:this.doCollapse,onExpandEvent:this.onExpandEvent,menu:!0},g.a.createElement(m.g,{name:"more_horizon"}),o.options.slice(o.max,o.options.length).map(function(e,t){var n=o[e],e=ni[e];return g.a.createElement(e,Go({key:t,config:n,inDropdown:!0,onChange:r.onChange},i))}))}},{key:"render",value:function(){var o=this,e=this.props,i=e.config,a=qo(e,Uo),e=i.max;return g.a.createElement("div",{className:"Editor-toolbar-insert"},i.options.slice(0,e).map(function(e,t){var n=i[e],r=ni[e];return(o.props.mention||"mention"!==e)&&n.isVisible?g.a.createElement(r,Go({key:t,config:n,inDropdown:!1},a)):null}))}}])&&Yo(r.prototype,e),t&&Yo(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),ni=(Qo(ti,"propTypes",{onChange:a.a.func.isRequired,onCloseLinkPopover:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,mention:a.a.object,linkPopoverOpen:a.a.bool,translations:a.a.object}),{textDecoration:e,heading:r,fontSize:Ot,insert:ti,fontFamily:_,list:cn,textAlign:E,colorPicker:w,link:x,mention:C,embedded:Cr,emoji:Hr,image:oo,remove:xo,history:Ho});function ri(e){return(ri="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})(e)}function oi(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,ui(r.key),r)}}function ii(e,t,n){t=si(t);var r=e,t=ai()?Reflect.construct(t,n||[],si(e).constructor):t.apply(e,n);if(!t||"object"!=ri(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ai(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ai=function(){return!!e})()}function si(e){return(si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function li(e,t){return(li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ci(e,t,n){(t=ui(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ui(e){e=((e,t)=>{if("object"!=ri(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ri(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ri(e)?e:e+""}function pi(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function fi(s){var e=(e=>{function a(){var o,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ci(o=ii(this,a,[].concat(r)),"state",{open:!1}),ci(o,"onDeleteLink",function(e){e.preventDefault(),e.stopPropagation();var e=s.getEditorState(),t=e.getSelection(),n=o.props,r=n.contentState,n=n.entityKey,e=Object(l.getEntityRange)(e,n),t=t.getIsBackward()?t.merge({anchorOffset:e.end,focusOffset:e.start}):t.merge({anchorOffset:e.start,focusOffset:e.end}),n=d.Modifier.setBlockType(r,t,"unstyled"),n=d.Modifier.removeRange(n,t,"backward");s.onChange(d.EditorState.push(s.getEditorState(),n,"remove-range"))}),ci(o,"onEditLink",function(e){e.preventDefault(),e.stopPropagation(),s.onEditLink(),o.setState({open:!1})}),ci(o,"onToggle",function(e){o.setState({open:e})}),o}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&li(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,e=e.contentState.getEntity(e.entityKey).getData().url,n=this.state.open,e=se(e),t=g.a.createElement("span",{contentEditable:"false",suppressContentEditableWarning:!0},g.a.createElement(m.n,{appearance:"link"},t));return g.a.createElement(m.m,{trigger:t,appendToBody:!0,open:n,onToggle:this.onToggle},g.a.createElement("div",{contentEditable:"false",suppressContentEditableWarning:!0,className:"d-flex pl-5 py-5 pr-4 align-items-center"},g.a.createElement(m.i,{href:e,target:"_new",className:"Editor-link"},e),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(m.a,{"aria-label":"Edit",onClick:this.onEditLink,appearance:"transparent",icon:"edit"}),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(m.a,{"aria-label":"Delete",onClick:this.onDeleteLink,appearance:"transparent",icon:"delete"})))}}])&&oi(n.prototype,e),t&&oi(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);return ci(e,"propTypes",{entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object}),e}function hi(e){return(hi="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})(e)}function di(){return(di=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function mi(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function gi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mi(Object(n),!0).forEach(function(e){bi(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mi(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function yi(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,_i(r.key),r)}}function vi(e,t,n){return t&&yi(e.prototype,t),n&&yi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bi(e,t,n){(t=_i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function _i(e){e=((e,t)=>{if("object"!=hi(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=hi(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==hi(e)?e:e+""}var e=vi(function e(t){var i=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");bi(this,"first",function(e){return null!=e&&e.length?e[0]:void 0}),bi(this,"getMentionComponent",function(){function e(e){var o=e.entityKey,t=e.children,e=e.contentState.getEntity(o).getData().value;return i.renderer?i.renderer(t,e):(e=gi(gi({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),g.a.createElement(m.c,di({},e,{onClose:function(){var e=i.config,t=e.getEditorState(),n=t.getCurrentContent(),r=t.getSelection(),t=Object(l.getEntityRange)(t,o),r=r.getIsBackward()?r.merge({anchorOffset:t.end,focusOffset:t.start}):r.merge({anchorOffset:t.start,focusOffset:t.end+1}),t=d.Modifier.setBlockType(n,r,"unstyled"),t=d.Modifier.removeRange(t,r,"backward");e.onChange(d.EditorState.push(e.getEditorState(),t,"remove-range"))}})))}return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e}),bi(this,"getMentionDecorator",function(){return{strategy:i.findMentionEntities,component:i.getMentionComponent()}}),this.config=t,this.chipOptions=t.chipOptions,this.renderer=t.renderer}),Si=(e.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"MENTION"===n.getEntity(e).getType()},t)},e);function Ei(e){return(Ei="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})(e)}function wi(e,t,n){t=Ci(t);var r=e,t=xi()?Reflect.construct(t,n||[],Ci(e).constructor):t.apply(e,n);if(!t||"object"!=Ei(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function xi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xi=function(){return!!e})()}function Ci(e){return(Ci=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ki(e,t){return(ki=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Di(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,Ti(r.key),r)}}function Oi(e,t,n){return t&&Di(e.prototype,t),n&&Di(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e,t,n){return(t=Ti(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ti(e){e=((e,t)=>{if("object"!=Ei(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ei(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Ei(e)?e:e+""}function Mi(e){var t=e.block,t=(e=e.contentState.getEntity(t.getEntityAt(0)).getData()).src;return g.a.createElement("iframe",{height:e.height,width:e.width,src:t,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var Ai=Oi(function e(t){var p=this,n=(Pi(this,e),M(this,"findSuggestionEntities",function(e,t){var n,r,o,i,a,s,l,c,u;p.config.getEditorState()&&(n=(s=p.config).separator,r=s.trigger,o=s.getSuggestions,i=s.fetchSuggestions,a=s.getLastKeyPressed,(s=(0,s.getEditorState)().getSelection()).get("anchorKey")===e.get("key"))&&s.get("anchorKey")===s.get("focusKey")&&(e=e.getText(),s=s.getFocusOffset(),l=e.substr(0,"Backspace"===a()?s-1:s+1),c=-1,u="",[n,"\n"].forEach(function(e){var t=l.lastIndexOf(e+r);c<t&&(c=t,u=e+r)}),(void 0===c||c<0)&&l[0]===r&&(c=0,u=r),0<=c)&&(e=l.substr(c+u.length,l.length),i?e.trim().split(/\s+/).length<3&&t(0===c&&l[0]===r?0:c+1,l.length):0<ie(o(),e,p.config.caseSensitive).length&&t(0===c&&l[0]===r?0:c+1,l.length))}),M(this,"getSuggestionComponent",function(){var e,h=this.config;return e=(e=>{function r(){var f;Pi(this,r);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return M(f=wi(this,r,[].concat(t)),"state",{style:{left:15},activeOption:-1,showSuggestions:!0,showLoader:!1,keyDown:!0,lastFetchedMentionText:""}),M(f,"openSuggestionDropdown",function(){ee(),f.setState({showSuggestions:!0})}),M(f,"closeSuggestionDropdown",function(){te(),f.setState({showSuggestions:!1})}),M(f,"focusOption",function(e,t,n,r){t=document.querySelectorAll(t),0===t.length&&(t=document.querySelectorAll(".".concat(r))),"string"==typeof n&&(n=parseInt(n)),r="down"===e?n+1:n-1,n=r,e="down"===e?t.length:-1,n===e&&(n=0),r=t[n=-1===r&&-1===e?t.length-1:n];r&&r.scrollIntoView({block:"end"})}),M(f,"onEditorKeyDown",function(e){var t,n,r=f.state,o=r.showSuggestions,r=r.activeOption;o&&(o={},t=null==h||null==(t=h.dropdownOptions)?void 0:t.dropdownOptionClassName,n=".Editor-dropdown-option",f.disableMouseEvents(),"ArrowDown"===e.key?(e.preventDefault(),f.focusOption("down",n,r,t),r===f.filteredSuggestions.length-1?o.activeOption=0:o.activeOption=Number(r)+1):"ArrowUp"===e.key?(e.preventDefault(),f.focusOption("up",n,r,t),o.activeOption=r<=0?f.filteredSuggestions.length-1:Number(r)-1):"Escape"===e.key?(o.showSuggestions=!1,te()):"Enter"===e.key&&f.addMention(),f.setState(o))}),M(f,"onOptionMouseOver",function(e){f.enableMouseEvents();e=parseInt(e.target.getAttribute("data-index"));0<=e&&e<f.filteredSuggestions.length&&f.setState({activeOption:e})}),M(f,"disableMouseEvents",function(){f.setState({keyDown:!0})}),M(f,"enableMouseEvents",function(){f.setState({keyDown:!1})}),M(f,"setSuggestionReference",function(e){f.suggestion=e}),M(f,"setDropdownReference",function(e){f.dropdown=e}),M(f,"filteredSuggestions",[]),M(f,"filterSuggestions",function(e){var t=h.getSuggestions?h.getSuggestions():[];f.filteredSuggestions=ie(t,e,h.caseSensitive),0===f.filteredSuggestions.length&&f.closeSuggestionDropdown()}),M(f,"debouncedFetchSuggestion",function(n,e){var r,o=1<arguments.length&&void 0!==e?e:500;return function(){var e=arguments,t=this;clearTimeout(r),r=setTimeout(function(){return n.apply(t,e)},o)}}(function(t){h.fetchSuggestions(t).then(function(e){f.filteredSuggestions=e,f.setState({lastFetchedMentionText:t,showSuggestions:0<e.length,showLoader:!1}),0===e.length&&f.closeSuggestionDropdown()})})),M(f,"updateSuggestions",function(){var e=f.state,t=e.showSuggestions,e=e.lastFetchedMentionText,n=f.getMentionText();h.fetchSuggestions?!t&&0<n.length&&n.startsWith(e)||!t&&n===e||(f.openSuggestionDropdown(),f.setState({showLoader:!0}),f.debouncedFetchSuggestion(n)):(f.openSuggestionDropdown(),f.filterSuggestions(n))}),M(f,"getMentionText",function(){return f.props.children[0].props.text.substr(1)}),M(f,"addMention",function(e,t,n){var r,o,i,a,s,l=f.state.activeOption,c=h.getEditorState(),u=h.onChange,p=h.trigger,t=void 0!==t&&void 0!==n?{label:t,value:n}:f.filteredSuggestions[l];t&&t.label&&(n=f.suggestion,l=(e=>(e=e.closest("[data-block]"))?e.getAttribute("data-offset-key").split("-")[0]:null)(f.suggestion))&&(o=c.getCurrentContent()).getBlockForKey(l)&&(n=(e=>{for(var t=e.closest("[data-block]").querySelectorAll("span[data-offset-key]"),n=e.querySelector("[data-offset-key]").getAttribute("data-offset-key"),r=0,o=0;o<t.length;o++){var i=t[o];if(i.getAttribute("data-offset-key")===n)break;r+=i.textContent.length}return r})(n),a=f.getMentionText(),a=n+p.length+a.length,s=n,a=a,s=d.SelectionState.createEmpty(l).merge({anchorOffset:s,focusOffset:a}),a=o,p="".concat(p).concat(t.value),r=t.value,i="",a=a.createEntity("MENTION","IMMUTABLE",{text:p,value:r,url:i}).getLastCreatedEntityKey(),o=d.Modifier.replaceText(o,s,t.label,null,a),p=d.EditorState.push(c,o,"insert-characters"),r=n+t.label.length,s=s.merge({anchorOffset:r,focusOffset:r}),i=l,a=r,c=s,p=o=" "!==(o=p).getCurrentContent().getBlockForKey(i).getText()[a]?(i=d.Modifier.insertText(o.getCurrentContent(),c," ",o.getCurrentInlineStyle()),o=d.EditorState.push(o,i,"insert-characters"),i=c.merge({anchorOffset:a+1,focusOffset:a+1}),d.EditorState.forceSelection(o,i)):d.EditorState.forceSelection(o,c),u(p=o))}),M(f,"toggleSuggestionDropdownHandler",function(e){e||f.closeSuggestionDropdown()}),M(f,"getOptionClass",function(e){var t=f.state.activeOption;return y()(M(M(M({},"Editor-dropdown-option",!0),"Editor-dropdown-option--highlight",e===t),"Editor-dropdown--keydown",f.state.keyDown))}),M(f,"renderOption",function(e,t){var n,r=h.dropdownOptions,r=(void 0===r?{}:r).customOptionRenderer,o=e.icon,i=e.label;return r?(n=r(e,f.state.activeOption,t),g.a.cloneElement(n,{key:t,spellCheck:!1,onClick:function(e){f.addMention(e),n.props.onClick&&n.props.onClick()},"data-index":t,onMouseOver:f.onOptionMouseOver})):g.a.createElement("span",{key:t,spellCheck:!1,onClick:function(){return f.addMention("onMouseSelect")},"data-index":t,onMouseOver:f.onOptionMouseOver,className:f.getOptionClass(t)},o&&g.a.createElement(m.g,{name:o,className:"mr-4"}),g.a.createElement(m.n,null,i))}),M(f,"mentionPopover",function(e){var t=f.state,n=t.showLoader;return e?e(f.filteredSuggestions,f.addMention,n,t.showSuggestions,f.state.activeOption):n?g.a.createElement("span",{className:"Editor-dropdown-option"},g.a.createElement(m.k,{withImage:!1},g.a.createElement(m.l,{length:"large"}),g.a.createElement(m.l,{length:"large"}),g.a.createElement(m.l,{length:"large"}))):f.filteredSuggestions.map(function(e,t){return f.renderOption(e,t)})}),f}var t=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ki(t,e),Oi(r,[{key:"componentDidMount",value:function(){var e=this.suggestion.getBoundingClientRect(),t=e.left;this.setState({style:{left:t,top:e.top+25}}),Q.registerCallBack(this.onEditorKeyDown),this.updateSuggestions()}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&this.updateSuggestions()}},{key:"componentWillUnmount",value:function(){Q.deregisterCallBack(this.onEditorKeyDown),this.closeSuggestionDropdown(),h.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this.props.children,t=this.state.showSuggestions,n=h.dropdownOptions,n=void 0===n?{}:n,r=n.dropdownClassName,o=n.popoverRenderer,n=n.appendToBody,n=void 0===n||n,r=y()(M(M(M({},"Popover",!0),"".concat(r),void 0!==r),"Editor-mention-dropdown",!0));return g.a.createElement("span",{className:"Editor-mention-suggestion",ref:this.setSuggestionReference,onClick:h.modalHandler.onSuggestionClick,"aria-haspopup":"true"},g.a.createElement("span",null,e),t&&g.a.createElement(m.m,{position:"bottom-start",open:!0,appendToBody:n,boundaryElement:this.setSuggestionReference,className:r,contentEditable:"false",suppressContentEditableWarning:!0,ref:this.setDropdownReference,onMouseMove:this.enableMouseEvents,onMouseLeave:this.disableMouseEvents,onScroll:this.enableMouseEvents,onToggle:this.toggleSuggestionDropdownHandler},this.mentionPopover(o)))}}])})(i.Component),M(e,"propTypes",{children:a.a.array}),e}.bind(this)),M(this,"getSuggestionDecorator",function(){return{strategy:p.findSuggestionEntities,component:p.getSuggestionComponent()}}),t.separator),r=t.trigger;this.config={separator:void 0===n?" ":n,trigger:void 0===r?"@":r,getSuggestions:t.getSuggestions,onChange:t.onChange,getEditorState:t.getEditorState,getWrapperRef:t.getWrapperRef,caseSensitive:t.caseSensitive,dropdownOptions:t.dropdownOptions,optionClassName:t.optionClassName,modalHandler:t.modalHandler,fetchSuggestions:t.fetchSuggestions,getLastKeyPressed:t.getLastKeyPressed}}),Ii=function(e){return[new Si(e).getMentionDecorator(),new Ai(e).getSuggestionDecorator()]},Ri=(Mi.propTypes={block:a.a.object,contentState:a.a.object},Mi);function Fi(e,t,n){return Math.min(Math.max(e,t),n)}var A={east:1,north:8,south:2,west:4};function Ni(e){function t(e,t){var n,r,o,i=s.current,a=l.current;null!==i&&null!==a&&(n=(r=i.getBoundingClientRect()).width,r=r.height,(o=u.current).startWidth=n,o.startHeight=r,o.ratio=n/r,o.currentWidth=n,o.currentHeight=r,o.startX=e.clientX,o.startY=e.clientY,o.isResizing=!0,o=(e=o.direction=t)===A.east||e===A.west,t=e===A.north||e===A.south,e=e&A.north&&e&A.west||e&A.south&&e&A.east,o=o?"ew":t?"ns":e?"nwse":"nesw",null!==p&&p.style.setProperty("cursor","".concat(o,"-resize"),"important"),null!==document.body&&(document.body.style.setProperty("cursor","".concat(o,"-resize"),"important"),c.current.value=document.body.style.getPropertyValue("-webkit-user-select"),c.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important")),a.classList.add("image-control-wrapper--resizing"),i.style.height="".concat(r,"px"),i.style.width="".concat(n,"px"),document.addEventListener("pointermove",h),document.addEventListener("pointerup",d))}var o=e.onResizeEnd,s=e.imageRef,n=e.maxWidth,e=e.editor,l=Object(i.useRef)(),c=Object(i.useRef)({priority:"",value:"default"}),u=Object(i.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),p=(Object(i.useEffect)(function(){return function(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",d)}},[]),e),a=n||(null!==p?p.getBoundingClientRect().width-20:100),f=null!==p?p.getBoundingClientRect().height-20:100,h=function(e){var t,n=s.current,r=u.current,o=r.direction&(A.east|A.west),i=r.direction&(A.south|A.north);null!==n&&r.isResizing&&(o&&i?(o=Math.floor(r.startX-e.clientX),o=r.direction&A.east?-o:o,t=(o=Fi(r.startWidth+o,100,a))/r.ratio,n.style.width="".concat(o,"px"),n.style.height="".concat(t,"px"),r.currentHeight=t,r.currentWidth=o):i?(t=Math.floor(r.startY-e.clientY),t=r.direction&A.south?-t:t,o=Fi(r.startHeight+t,100,f),n.style.height="".concat(o,"px"),r.currentHeight=o):(i=Math.floor(r.startX-e.clientX),i=r.direction&A.east?-i:i,t=Fi(r.startWidth+i,100,a),n.style.width="".concat(t,"px"),r.currentWidth=t))},d=function(){var e,t=s.current,n=u.current,r=l.current;null!==t&&null!==r&&n.isResizing&&(t=n.currentWidth,e=n.currentHeight,n.startWidth=0,n.startHeight=0,n.ratio=0,n.startX=0,n.startY=0,n.currentWidth=0,n.currentHeight=0,n.isResizing=!1,r.classList.remove("image-control-wrapper--resizing"),document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",d),null!==p&&p.style.setProperty("cursor","default"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",c.current.value,c.current.priority)),o(t,e))};return i.createElement("div",{ref:l},i.createElement("div",{className:"Editor-image-resizer Image-resizer--ne",onPointerDown:function(e){t(e,A.north|A.east)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--se",onPointerDown:function(e){t(e,A.south|A.east)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--sw",onPointerDown:function(e){t(e,A.south|A.west)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--nw",onPointerDown:function(e){t(e,A.north|A.west)}}))}o(214);function Li(e){return(Li="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})(e)}function ji(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,Ki(r.key),r)}}function Bi(e,t,n){t=Vi(t);var r=e,t=zi()?Reflect.construct(t,n||[],Vi(e).constructor):t.apply(e,n);if(!t||"object"!=Li(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function zi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zi=function(){return!!e})()}function Vi(e){return(Vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Hi(e,t){return(Hi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t,n){(t=Ki(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Ki(e){e=((e,t)=>{if("object"!=Li(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Li(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Li(e)?e:e+""}var Ui=function(p){var e=(e=>{function t(e){var r;if(this instanceof t)return I(r=Bi(this,t,[e]),"imageRef",null),I(r,"state",{hovered:!1}),I(r,"setEntityAlignmentLeft",function(){r.setEntityAlignment("left")}),I(r,"setEntityAlignmentRight",function(){r.setEntityAlignment("right")}),I(r,"setEntityAlignmentCenter",function(){r.setEntityAlignment("center")}),I(r,"setEntityAlignment",function(e){var t=r.props,n=t.block,t=t.contentState,n=n.getEntityAt(0);t.mergeEntityData(n,{alignment:e,alt:e}),p.onChange(d.EditorState.push(p.getEditorState(),t,"change-block-data"))}),I(r,"removeEntity",function(e){e.preventDefault(),e.stopPropagation();var e=r.props,t=e.block,e=e.contentState,t=t.getKey(),n=e.getKeyAfter(t),t=new d.SelectionState({anchorKey:t,anchorOffset:0,focusKey:n,focusOffset:0}),n=d.Modifier.setBlockType(e,t,"unstyled"),n=d.Modifier.removeRange(n,t,"backward");p.onChange(d.EditorState.push(p.getEditorState(),n,"remove-range"))}),I(r,"toggleHovered",function(){var e;r.state.hovered&&(e=p.getEditorState().getCurrentContent(),p.onChange(d.EditorState.push(p.getEditorState(),e,""))),r.setState({hovered:!r.state.hovered})}),r.imageRef=g.a.createRef(),r.onResizeEnd=r.onResizeEnd.bind(r),r;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Hi(r,e),r=t,(e=[{key:"renderAlignmentOptions",value:function(e){return g.a.createElement("div",{className:"Popover d-flex ".concat(e?"mt-4":"")},g.a.createElement("div",{onClick:this.setEntityAlignmentLeft,className:"Editor-image-options"},g.a.createElement(m.g,{name:"format_align_left",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentCenter,className:"Editor-image-options"},g.a.createElement(m.g,{name:"format_align_center",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentRight,className:"Editor-image-options"},g.a.createElement(m.g,{name:"format_align_right",size:20})),g.a.createElement("div",{onClick:this.removeEntity,className:"Editor-image-options"},g.a.createElement(m.g,{name:"delete",size:20})))}},{key:"updateImageSize",value:function(e,t){var n=this.props.block.getEntityAt(0),n=p.getEditorState().getCurrentContent().mergeEntityData(n,{width:"".concat(e,"px"),height:"".concat(t,"px")}),e=(p.onChange(d.EditorState.push(p.getEditorState(),n,"")),p.getEditorState()),t=d.Modifier.replaceText(e.getCurrentContent(),e.getSelection()," ");p.onChange(d.EditorState.push(e,t,"insert-characters"))}},{key:"onResizeEnd",value:function(e,t){this.setState({hovered:!1}),this.updateImageSize(e,t)}},{key:"render",value:function(){var e=this.props,t=e.block,e=e.contentState,n=this.state.hovered,r=p.isImageAlignmentEnabled,o=p.isImageResizeEnabled,i=p.isReadOnly,a=p.nonFloatingImage,e=e.getEntity(t.getEntityAt(0)).getData(),t=e.src,s=e.alignment,l=e.height,c=e.width,e=e.alt,a=("center"!==e||s?a&&"right"===e&&!s?this.setEntityAlignmentRight():a&&"left"===e&&!s&&this.setEntityAlignmentLeft():this.setEntityAlignmentCenter(),document.getElementById("RichTextEditorWrapper")),s=y()({"d-flex":!0,"justify-content-end":"right"===s,"justify-content-start":!s||"left"===s,"justify-content-center":"center"===s}),u=y()({"position-relative":!0,"Editor-image--selected":!i&&n&&o,"Editor-image":!i&&!n&&o,"ml-4":o});return g.a.createElement("div",{className:s},g.a.createElement("span",{onClick:this.toggleHovered,className:u},g.a.createElement("img",{src:t,alt:e,style:{height:l,width:c},ref:this.imageRef}),!i&&n&&g.a.createElement(g.a.Fragment,null,r()&&this.renderAlignmentOptions(o),o&&g.a.createElement(Ni,{editor:a,imageRef:this.imageRef,onResizeEnd:this.onResizeEnd}))))}}])&&ji(r.prototype,e),n&&ji(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);return I(e,"propTypes",{block:a.a.object,contentState:a.a.object}),e},Wi=function(n,r){return function(e){if("function"==typeof r){var t=r(e,n,n.getEditorState);if(t)return t}if("atomic"===e.getType()){t=n.getEditorState().getCurrentContent().getEntity(e.getEntityAt(0));if(t&&"IMAGE"===t.type)return{component:Ui(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:Ri,editable:!1}}}},Gi=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],ti=(r="ctrl",r=((null==(Ot=navigator.userAgentData)?void 0:Ot.platform.toLowerCase())||"linux").includes("mac")?"cmd":r),qi={options:["heading","textDecoration","colorPicker","list","insert"],textDecoration:{max:4,options:["bold","italic","underline","strikethrough"],bold:{icon:"format_bold",title:"Bold (".concat(ti,"+B)"),label:"Bold"},italic:{icon:"format_italic",title:"Italic (".concat(ti,"+I)"),label:"Italic"},underline:{icon:"format_underlined",title:"Underline (".concat(ti,"+U)"),label:"Underline"},strikethrough:{icon:"strikethrough_s",title:"Strikethrough",label:"Strikethrough"}},heading:{icon:"text_fields",options:["H1","H2","H3","H4"]},list:{options:["unordered","ordered"],unordered:{icon:"format_list_bulleted",title:" Bulleted list"},ordered:{icon:"format_list_numbered",title:"Numbered list"}},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",colors:Gi},insert:{max:3,options:["image","mention","link"],image:{icon:"insert_photo",isVisible:!0,title:"Image",alt:"",defaultSize:{height:"100px",width:"300px"},inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",uploadCallback:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(e){return t({data:{link:r.result}})},r.onerror=function(e){return n(e)},r.readAsDataURL(e)})}},link:{isVisible:!0,icon:"insert_link",linkCallback:void 0,title:"Link"},mention:{isVisible:!0,icon:"alternate_email",title:"Personalization"}},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,resizeEnabled:!1,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0}},_={title:a.a.string,label:a.a.string},cn={isVisible:a.a.bool,title:a.a.string,alt:a.a.string,uploadCallback:a.a.func,resizeEnabled:a.a.bool,defaultSize:a.a.shape({height:a.a.string,width:a.a.string})},E={isVisible:a.a.bool,title:a.a.string},w=a.a.shape({textDecoration:a.a.shape({max:a.a.number,bold:a.a.shape(_),italic:a.a.shape(_),underline:a.a.shape(_),strikethrough:a.a.shape(_)}),colorPicker:a.a.shape({colors:a.a.arrayOf(a.a.string)}),insert:a.a.shape({max:a.a.number,image:a.a.shape(cn),link:a.a.shape(E)})});o(215),o(95),o(96),o(97),o(98),o(99);o(100),o(101),o(102);function Yi(e){return(Yi="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})(e)}function $i(){return($i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function Ji(e){return(e=>{if(Array.isArray(e))return Zi(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||((e,t)=>{var n;if(e)return"string"==typeof e?Zi(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zi(e,t):void 0})(e)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function Zi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Xi(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Qi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Xi(Object(n),!0).forEach(function(e){R(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xi(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ea(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,ia(r.key),r)}}function ta(e,t,n){t=ra(t);var r=e,t=na()?Reflect.construct(t,n||[],ra(e).constructor):t.apply(e,n);if(!t||"object"!=Yi(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function na(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(na=function(){return!!e})()}function ra(e){return(ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oa(e,t){return(oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e,t,n){return(t=ia(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ia(e){e=((e,t)=>{if("object"!=Yi(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Yi(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Yi(e)?e:e+""}var x=(e=>{function o(e){var a;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");R(a=ta(this,o,[e]),"lastKeyPressed",""),R(a,"onEditorBlur",function(){a.setState({editorFocused:!1})}),R(a,"onEditorFocus",function(e){var t=a.props.onFocus,n=(a.setState({editorFocused:!0}),a.focusHandler.isEditorFocused());t&&n&&t(e)}),R(a,"onEditorMouseDown",function(){a.focusHandler.onEditorMouseDown()}),R(a,"getLastKeyPressed",function(){return a.lastKeyPressed}),R(a,"resetLastKeyPressed",function(){a.lastKeyPressed=null}),R(a,"keyBindingFn",function(e){if(a.lastKeyPressed=e.key,"Tab"===e.key)return t=a.props.onTab,(n=Object(l.changeDepth)(a.state.editorState,e.shiftKey?-1:1,4))&&n!==a.state.editorState&&(a.onChange(n),e.preventDefault()),t&&t(e,n),null;if("ArrowUp"!==e.key&&"ArrowDown"!==e.key||ne()&&e.preventDefault(),"Backspace"===e.key&&a.isEmptyListBlock()){var t=d.RichUtils.toggleBlockType(a.state.editorState);if(t)return a.onChange(d.EditorState.moveFocusToEnd(t)),!0}if("Delete"===e.key){var n=d.RichUtils.onDelete(a.state.editorState);if(n)return a.onChange(n),!0}return Object(d.getDefaultKeyBinding)(e)}),R(a,"onToolbarFocus",function(e){var t=a.props.onFocus;t&&a.focusHandler.isToolbarFocused()&&t(e)}),R(a,"onWrapperBlur",function(e){var t=a.props.onBlur;t&&a.focusHandler.isEditorBlur(e)&&t(e,a.getEditorState())}),R(a,"onChange",function(e,t){var n=a.props,r=n.readOnly,n=n.onEditorStateChange;r||"atomic"===Object(l.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(n&&n(e,a.props.wrapperId),s(a.props,"editorState")?a.afterChange(e):a.setState({editorState:e},a.afterChange(e)))}),R(a,"setWrapperReference",function(e){a.wrapper=e}),R(a,"setEditorReference",function(e){a.props.editorRef&&a.props.editorRef(e),a.editor=e}),R(a,"onCloseLinkPopover",function(){a.setState({linkPopoverOpen:!1})}),R(a,"onEditLink",function(){a.setState(Qi(Qi({},a.state),{},{linkPopoverOpen:!0}))}),R(a,"getCompositeDecorator",function(e){var t=[{strategy:pi,component:fi({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,Ji(Ii(Qi(Qi({},a.props.mention),{},{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler,getLastKeyPressed:a.getLastKeyPressed})))),new d.CompositeDecorator(t)}),R(a,"getWrapperRef",function(){return a.wrapper}),R(a,"getEditorState",function(){return a.state?a.state.editorState:null}),R(a,"getSuggestions",function(){return a.props.mention&&a.props.mention.suggestions}),R(a,"afterChange",function(t){setTimeout(function(){var e=a.props.onContentStateChange;e&&e(Object(d.convertToRaw)(t.getCurrentContent()))})}),R(a,"isReadOnly",function(){return a.props.readOnly}),R(a,"isImageAlignmentEnabled",function(){return a.state.toolbar.image.alignmentEnabled}),R(a,"createEditorState",function(e){var t,n;return s(a.props,"editorState")?a.props.editorState&&(t=d.EditorState.set(a.props.editorState,{decorator:e})):s(a.props,"defaultEditorState")?a.props.defaultEditorState&&(t=d.EditorState.set(a.props.defaultEditorState,{decorator:e})):s(a.props,"contentState")?a.props.contentState&&(n=Object(d.convertFromRaw)(a.props.contentState),t=d.EditorState.createWithContent(n,e),t=d.EditorState.moveSelectionToEnd(t)):s(a.props,"defaultContentState")&&(n=a.props.defaultContentState)&&(n=Object(d.convertFromRaw)(n),t=d.EditorState.createWithContent(n,e),t=d.EditorState.moveSelectionToEnd(t)),t=t||d.EditorState.createEmpty(e)}),R(a,"filterEditorProps",function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","wrapperClassName","editorStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],e=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),r={},e&&0<e.length&&e.forEach(function(e){r[e]=t[e]}),r;var t,n,r}),R(a,"getStyleMap",function(e){return Qi(Qi({},Object(l.getCustomStyleMap)()),e.customStyleMap)}),R(a,"changeEditorState",function(e){var e=Object(d.convertFromRaw)(e),t=a.state.editorState,t=d.EditorState.push(t,e,"insert-characters");return d.EditorState.moveSelectionToEnd(t)}),R(a,"focusEditor",function(){setTimeout(function(){a.editor.focus()})}),R(a,"handleKeyCommand",function(e){var t=a.state,n=t.editorState,t=t.toolbar.textDecoration;if(t&&0<=t.options.indexOf(e)){t=d.RichUtils.handleKeyCommand(n,e);if(t)return a.onChange(t),!0}return!1}),R(a,"handleReturn",function(e){var t;return!!ne()||(t=a.state.editorState,!!(t=Object(l.handleNewLine)(t,e))&&(a.onChange(t),!0))}),R(a,"handlePastedTextFn",function(e,t){var n,r,o=a.state.editorState,i=a.props.handlePastedText;return t&&t.includes("<figure")?t:t&&t.includes("DraftStyle")?null:i?i(e,t,o,a.onChange):(i=e,e=t,t=o,o=a.onChange,(r=Object(l.getSelectedBlock)(t))&&"code"===r.type?(r=d.Modifier.replaceText(t.getCurrentContent(),t.getSelection(),i,t.getCurrentInlineStyle()),o(d.EditorState.push(t,r,"insert-characters")),!0):!!e&&(i=j()(e),n=t.getCurrentContent(),i.entityMap.forEach(function(e,t){n=n.mergeEntityData(t,e)}),n=d.Modifier.replaceWithFragment(n,t.getSelection(),new z.List(i.contentBlocks)),o(d.EditorState.push(t,n,"insert-characters")),!0))}),R(a,"preventDefault",function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?a.focusHandler.onInputMouseDown():e.preventDefault()}),R(a,"isEmptyListBlock",function(){var e=a.state.editorState.getCurrentContent();return!e.hasText()&&"unstyled"!==e.getBlockMap().first().getType()}),R(a,"blockRenderMap",d.DefaultDraftBlockRenderMap.merge(Object(z.Map)({"header-one":{wrapper:g.a.createElement(m.e,{size:"xxl"},a.props.children)},"header-two":{wrapper:g.a.createElement(m.e,{size:"xl"},a.props.children)},"header-three":{wrapper:g.a.createElement(m.e,{size:"l"},a.props.children)},"header-four":{wrapper:g.a.createElement(m.e,{size:"m"},a.props.children)}})));var t=ce(qi,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new W,a.focusHandler=new Z,e.toolbar&&e.toolbar.insert&&(null==(n=e.toolbar.insert.image)?void 0:n.resizeEnabled)),r=e.toolbar&&e.toolbar.insert&&(null==(r=e.toolbar.insert.image)?void 0:r.nonFloatingImage),n=(a.blockRendererFn=Wi({isReadOnly:e.readOnly,isImageAlignmentEnabled:a.isImageAlignmentEnabled,isImageResizeEnabled:n,nonFloatingImage:r,getEditorState:a.getEditorState,onChange:a.onChange}),a.editorProps=a.filterEditorProps(e),a.customStyleMap=a.getStyleMap(e),a.compositeDecorator=a.getCompositeDecorator(t),a.createEditorState(a.compositeDecorator));return Object(l.extractInlineStyle)(n),a.state={editorState:n,toolbar:t,editorFocused:!1,linkPopoverOpen:!1},a}var t,n=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&oa(n,e),n=o,(e=[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.editor.focus(),this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o;e!==this.props&&(t={},n=(r=this.props).editorState,r=r.contentState,this.state.toolbar||(o=ce(qi,o),t.toolbar=o),s(this.props,"editorState")&&n!==e.editorState?t.editorState=n?d.EditorState.set(n,{decorator:this.compositeDecorator}):d.EditorState.createEmpty(this.compositeDecorator):s(this.props,"contentState")&&r!==e.contentState&&(r?(o=this.changeEditorState(r))&&(t.editorState=o):t.editorState=d.EditorState.createEmpty(this.compositeDecorator)),e.editorState===n&&e.contentState===r||Object(l.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props))}},{key:"render",value:function(){var t=this,e=this.state,n=e.editorState,r=e.toolbar,e=this.props,o=e.toolbarClassName,i=e.editorClassName,a=e.wrapperClassName,s=e.editorStyle,l=e.ariaLabel,c=e.mention,u={linkPopoverOpen:this.state.linkPopoverOpen,onCloseLinkPopover:this.onCloseLinkPopover,modalHandler:this.modalHandler,editorState:n,onChange:this.onChange},e=y()(R({},"Editor-toolbar",!0),o),o=y()(R({},"Editor-wrapper",!0),a),a=y()(R(R({},"Editor",!0),"hide-placeholder",this.isEmptyListBlock()),i);return g.a.createElement("div",{id:this.wrapperId,className:o,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur},this.props.showToolbar&&g.a.createElement("div",{className:e,onMouseDown:function(e){t.resetLastKeyPressed(),t.preventDefault(e)},"aria-label":"Editor-toolbar",onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=ni[e],e=r[e];return g.a.createElement(n,$i({key:t},u,{config:e,mention:c,className:"Editor-toolbar-options"}))})),g.a.createElement("div",{ref:this.setWrapperReference,className:a,style:s,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:Q.onKeyDown,onMouseDown:this.onEditorMouseDown,id:"RichTextEditorWrapper"},g.a.createElement(d.Editor,$i({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:n,onChange:this.onChange,blockStyleFn:re,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,handlePastedText:this.handlePastedTextFn,ariaLabel:l,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&ea(n.prototype,e),t&&ea(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),aa=(x.utils={EditorState:d.EditorState,ContentState:d.ContentState,RichUtils:d.RichUtils,convertFromRaw:d.convertFromRaw,convertToRaw:d.convertToRaw,htmlToState:function(e){var e=L(e,'<p><br/></p><p id="RichTextEditor-Image"','<p id="RichTextEditor-Image"'),e=L(e,"<br/>",""),e=L(e,"<p>&nbsp;</p>",""),e=j()(e);if(e)return{contentState:e=d.ContentState.createFromBlockArray(e.contentBlocks),editorState:d.EditorState.createWithContent(e)}},stateToHTML:function(e){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=Object(d.convertToRaw)(e.getCurrentContent());return B()(e,void 0,!1,function(e){var t=e.type,e=e.data;if("IMAGE"===t)return t=e.alignment||"left","center"===e.alt||"center"===t?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):!n||"left"!==e.alt&&"left"!==t?n?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="float:').concat(t,"; height: ").concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n ')})}},x.propTypes={mention:a.a.shape({separator:a.a.string,trigger:a.a.string,chipOptions:a.a.object,dropdownOptions:a.a.shape({dropdownClassName:a.a.string,customOptionRenderer:a.a.func,popoverRenderer:a.a.func,appendToBody:a.a.bool,dropdownOptionClassName:a.a.string}),renderer:a.a.func,suggestions:a.a.shape({label:a.a.string,value:a.a.string,icon:a.a.string}),fetchSuggestions:a.a.func}),editorState:a.a.object,onEditorStateChange:a.a.func,defaultEditorState:a.a.object,onContentStateChange:a.a.func,defaultContentState:a.a.object,contentState:a.a.object,spellCheck:a.a.bool,toolbar:w,showToolbar:a.a.bool,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarClassName:a.a.string,editorStyle:a.a.object,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,textAlignment:a.a.oneOf(["left","right","center"]),readOnly:a.a.bool,autoFocus:a.a.bool,placeholder:a.a.string,ariaLabel:a.a.string,wrapperId:a.a.number,editorRef:a.a.func,handlePastedText:a.a.func},x.defaultProps={autoFocus:!0,showToolbar:!0},x),sa=o(50),la=o.n(sa),ca=o(51);function ua(e){return(ua="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})(e)}function pa(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function F(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pa(Object(n),!0).forEach(function(e){fa(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pa(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function fa(e,t,n){return(t=(e=>(e=((e,t)=>{if("object"!=ua(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ua(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==ua(e)?e:e+""))(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ha(e){return(e=>{if(Array.isArray(e))return da(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||((e,t)=>{var n;if(e)return"string"==typeof e?da(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?da(e,t):void 0})(e)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ma(e,n){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){return g.a.createElement("li",{key:n[t]},e)}))}function ga(e,r){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){var n=1<e.length&&e[1][0];return n&&n.includes("\n")?(n=n.split("\n"),g.a.createElement(m.j,{key:r[t]},n.map(function(e){return[e,g.a.createElement("br",null)]}))):e&&0===(null==(n=e[1])?void 0:n.length)?g.a.createElement("p",null,g.a.createElement("br",null)):g.a.createElement(m.j,{key:r[t]},e.map(function(e){return[e]}))}))}function ya(e,t){var n=void 0===(n=t.entities)?{}:n,r=void 0===(r=t.headings)?{}:r,o=void 0===(o=t.list)?{}:o,t=void 0===(t=t.colors)?[]:t,n=F(F({},xa),n),r=F(F({},Ea),r),o=F(F({},wa),o),r=F(F(F({},Ca),r),o),o=F(F({},_a),ka(t)),t={blocks:r,entities:n,styles:Object(sa.createStylesRenderer)(Sa,o)};return la()(e,t,!1)}function va(e){var t=e.raw;return(t=t&&ya(t,{entities:e.entities,headings:e.headings,list:e.list,colors:e.colors}))?g.a.createElement("div",{className:"Preview-wrapper"},t):null}var ba={paddingLeft:"1.5em",margin:"0px"},_a={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},Sa=function(e){var t=e.children;return g.a.createElement("span",{key:e.key,style:e.style},t)},Ea={"header-one":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"xxl",key:n[t]},e)})},"header-two":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"xl",key:n[t]},e)})},"header-three":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"l",key:n[t]},e)})},"header-four":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"m",key:n[t]},e)})}},wa={"unordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ul",{style:ba},ma(e,t))},"ordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ol",{style:ba},ma(e,t))}},xa={LINK:function(e,t,n){n=n.key;return g.a.createElement(m.i,{key:n,href:t.url},e)},IMAGE:function(e,t){var n=t.src,r=t.alignment;return g.a.createElement("p",{id:"RichTextEditor-Image",style:{justifyContent:r||"left",display:"flex"}},g.a.createElement("img",{src:n,alt:t.alt,height:t.height,width:t.width}))},MENTION:function(e,t,n){n=n.key;return g.a.createElement("span",{name:t.value,className:"Chip--input Chip d-inline-flex mt-3",key:n},e)}},Ca={unstyled:function(e,t,n){t=t.keys;return ga(e,t)},atomic:function(e,t){return e[0]}},ka=function(e){return[].concat(ha(Gi),ha(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return F(F({},e),{},fa({},n,t))},{})},Da=(va.utils={convertToHTML:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=e&&ya(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))&&Object(ca.renderToStaticMarkup)(e)?(t=(n=o(232)).name,n=n.version,t="https://s3.us-east-1.amazonaws.com/webui-assets/".concat(t,"/v").concat(n,"/design-system.css"),n=r?'<link rel="stylesheet" href="'.concat(t,'">'):"","".concat(n," ").concat(Object(ca.renderToStaticMarkup)(e))):""}},va.propTypes={raw:a.a.object.isRequired,colors:a.a.arrayOf(a.a.string),list:a.a.object,headings:a.a.object,entities:a.a.object},va.defaultProps={entities:{},headings:{},list:{},colors:[]},va)}]);