From 6008c087a4b407c655fd5a694158c3deed5fd091 Mon Sep 17 00:00:00 2001 From: George Berezhnoy Date: Tue, 25 Dec 2018 17:53:36 +0300 Subject: [PATCH] Handle br tags (#577) * Handle br tags * Bump version --- dist/codex-editor.js | 10 +++---- dist/codex-editor.licenses.txt | 52 ++++++++++++++++----------------- package.json | 2 +- src/components/modules/paste.ts | 6 +++- 4 files changed, 37 insertions(+), 33 deletions(-) diff --git a/dist/codex-editor.js b/dist/codex-editor.js index 028ce7b5..899fdd1d 100644 --- a/dist/codex-editor.js +++ b/dist/codex-editor.js @@ -1,7 +1,7 @@ /*! * Codex Editor * - * @version 2.7.18 + * @version 2.7.19 * * @licence Apache-2.0 * @author CodeX-Team @@ -9,7 +9,7 @@ * @uses html-janitor * @licence Apache-2.0 (https://github.com/guardian/html-janitor/blob/master/LICENSE) */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.CodexEditor=e():t.CodexEditor=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=160)}([function(t,e,n){var r=n(9),o=n(16),i=n(22),a=n(19),s=n(31),u=function(t,e,n){var c,l,f,d,p=t&u.F,h=t&u.G,v=t&u.S,g=t&u.P,y=t&u.B,b=h?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,m=h?o:o[e]||(o[e]={}),k=m.prototype||(m.prototype={});for(c in h&&(n=e),n)f=((l=!p&&b&&void 0!==b[c])?b:n)[c],d=y&&l?s(f,r):g&&"function"==typeof f?s(Function.call,f):f,b&&a(b,c,f,t&u.U),m[c]!=f&&i(m,c,d),g&&k[c]!=f&&(k[c]=f)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=document.createElement(t);for(var a in Array.isArray(n)?(e=o.classList).add.apply(e,(0,i.default)(n)):n&&o.classList.add(n),r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o}},{key:"text",value:function(t){return document.createTextNode(t)}},{key:"svg",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:14,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:14,r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.classList.add("icon","icon--"+t),r.setAttribute("width",e+"px"),r.setAttribute("height",n+"px"),r.innerHTML=''),r}},{key:"append",value:function(t,e){Array.isArray(e)?e.forEach(function(e){return t.appendChild(e)}):t.appendChild(e)}},{key:"prepend",value:function(t,e){Array.isArray(e)?(e=e.reverse()).forEach(function(e){return t.prepend(e)}):t.prepend(e)}},{key:"swap",value:function(t,e){var n=document.createElement("div"),r=t.parentNode;r.insertBefore(n,t),r.insertBefore(t,e),r.insertBefore(e,n),r.removeChild(n)}},{key:"find",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelector(e)}},{key:"get",value:function(t){return document.getElementById(t)}},{key:"findAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelectorAll(e)}},{key:"getDeepestNode",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=n?"lastChild":"firstChild",o=n?"previousSibling":"nextSibling";if(e&&e.nodeType===Node.ELEMENT_NODE&&e[r]){var i=e[r];if(t.isSingleTag(i)&&!t.isNativeInput(i))if(i[o])i=i[o];else{if(!i.parentNode[o])return i.parentNode;i=i.parentNode[o]}return this.getDeepestNode(i,n)}return e}},{key:"isElement",value:function(t){return t&&"object"===(0,o.default)(t)&&t.nodeType&&t.nodeType===Node.ELEMENT_NODE}},{key:"isFragment",value:function(t){return t&&"object"===(0,o.default)(t)&&t.nodeType&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE}},{key:"isContentEditable",value:function(t){return"true"===t.contentEditable}},{key:"isNativeInput",value:function(t){return!(!t||!t.tagName)&&["INPUT","TEXTAREA"].includes(t.tagName)}},{key:"canSetCaret",value:function(e){var n=!0;if(t.isNativeInput(e)){var r=e;switch(r.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":n=!1}}else n=t.isContentEditable(e);return n}},{key:"isNodeEmpty",value:function(t){return!this.isSingleTag(t)&&0===(this.isElement(t)&&this.isNativeInput(t)?t.value:t.textContent.replace("​","")).trim().length}},{key:"isLeaf",value:function(t){return!!t&&0===t.childNodes.length}},{key:"isEmpty",value:function(t){var e=this,n=[],r=[];if(!t)return!0;if(!t.childNodes.length)return this.isNodeEmpty(t);for(n.push(t.firstChild);n.length>0;)if(t=n.shift()){for(this.isLeaf(t)?r.push(t):n.push(t.firstChild);t&&t.nextSibling;)(t=t.nextSibling)&&n.push(t);if(t&&!this.isNodeEmpty(t))return!1}return r.every(function(t){return e.isNodeEmpty(t)})}},{key:"isHTMLString",value:function(e){var n=t.make("div");return n.innerHTML=e,n.childElementCount>0}},{key:"getContentLength",value:function(e){return t.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent.length}},{key:"blockElements",get:function(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tr","tfoot","ul","video"]}}]),t}();r.default=c,c.displayName="Dom",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(11),o=n(98),i=n(37),a=Object.defineProperty;e.f=n(15)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(35),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u){"use strict";var c=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=c(o),i=c(i),a=c(a),s=c(s),u=c(u);var l=function(){function t(){(0,a.default)(this,t)}var e;return(0,s.default)(t,null,[{key:"log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"color: inherit";if("console"in window&&window.console[e]){var o="Editor.js ".concat("2.7.18"),i="line-height: 1em;\n color: #006FEA;\n display: inline-block;\n font-size: 11px;\n line-height: 1em;\n background-color: #fff;\n padding: 4px 9px;\n border-radius: 30px;\n border: 1px solid rgba(56, 138, 229, 0.16);\n margin: 4px 5px 4px 0;";try{["time","timeEnd"].includes(e)?console[e]("( ".concat(o," ) ").concat(t)):n?console[e]("%c".concat(o,"%c ").concat(t," %o"),i,r,n):console[e]("%c".concat(o,"%c ").concat(t),i,r)}catch(t){}}}},{key:"sequence",value:(e=(0,i.default)(o.default.mark(function t(e){var n,r,a,s,u=arguments;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=function(){return(s=(0,i.default)(o.default.mark(function t(e,n,r){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.function(e.data);case 3:return t.next=5,n(void 0!==e.data?e.data:{});case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),r(void 0!==e.data?e.data:{});case 10:case"end":return t.stop()}},t,this,[[0,7]])}))).apply(this,arguments)},a=function(t,e,n){return s.apply(this,arguments)},n=u.length>1&&void 0!==u[1]?u[1]:function(){},r=u.length>2&&void 0!==u[2]?u[2]:function(){},t.next=6,e.reduce(function(){var t=(0,i.default)(o.default.mark(function t(e,i){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return t.abrupt("return",a(i,n,r));case 3:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),Promise.resolve());case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"array",value:function(t){return Array.prototype.slice.call(t)}},{key:"isFunction",value:function(t){return"function"==typeof t}},{key:"isClass",value:function(t){return"function"==typeof t&&/^\s*class\s+/.test(t.toString())}},{key:"isEmpty",value:function(t){return!t||0===Object.keys(t).length&&t.constructor===Object}},{key:"isPromise",value:function(t){return Promise.resolve(t)===t}},{key:"delay",value:function(t,e){return function(){var n=this,r=arguments;window.setTimeout(function(){return t.apply(n,r)},e)}}},{key:"getFileExtension",value:function(t){return t.name.split(".").pop()}},{key:"isValidMimeType",value:function(t){return/^[-\w]+\/([-+\w]+|\*)$/.test(t)}},{key:"debounce",value:function(t,e,n){var r,o=this,i=arguments;return function(){var a=o,s=i,u=n&&!r;window.clearTimeout(r),r=window.setTimeout(function(){r=null,n||t.apply(a,s)},e),u&&t.apply(a,s)}}},{key:"copyTextToClipboard",value:function(t){var e=u.default.make("div","codex-editor-clipboard",{innerHTML:t});document.body.appendChild(e);var n=window.getSelection(),r=document.createRange();r.selectNode(e),window.getSelection().removeAllRanges(),n.addRange(r),document.execCommand("copy"),document.body.removeChild(e)}},{key:"keyCodes",get:function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91}}}]),t}();r.default=l,l.displayName="Util",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(9),o=n(22),i=n(21),a=n(40)("src"),s=Function.toString,u=(""+s).split("toString");n(16).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,n){var r=n(0),o=n(8),i=n(34),a=/"/g,s=function(t,e,n,r){var o=String(i(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+o+""};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*o(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(14),o=n(39);t.exports=n(15)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(57),o=n(34);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(34);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var r=n(58),o=n(39),i=n(23),a=n(37),s=n(21),u=n(98),c=Object.getOwnPropertyDescriptor;e.f=n(15)?c:function(t,e){if(t=i(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(0),o=n(16),i=n(8);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(31),o=n(57),i=n(24),a=n(17),s=n(255);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,l=4==t,f=6==t,d=5==t||f,p=e||s;return function(e,s,h){for(var v,g,y=i(e),b=o(y),m=r(s,h,3),k=a(b.length),x=0,w=n?p(e,k):u?p(e,0):void 0;k>x;x++)if((d||x in b)&&(g=m(v=b[x],x,y),t))if(n)w[x]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(l)return!1;return f?-1:c||l?l:w}}},function(t,e,n){t.exports=n(330)},function(t,e){function n(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise(function(o,i){var a=t.apply(e,r);function s(t){n(a,o,i,s,u,"next",t)}function u(t){n(a,o,i,s,u,"throw",t)}s(void 0)})}}},function(t,e,n){var r=n(32);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){"use strict";if(n(15)){var r=n(41),o=n(9),i=n(8),a=n(0),s=n(69),u=n(97),c=n(31),l=n(52),f=n(39),d=n(22),p=n(53),h=n(35),v=n(17),g=n(123),y=n(43),b=n(37),m=n(21),k=n(61),x=n(10),w=n(24),S=n(90),E=n(44),T=n(46),_=n(45).f,C=n(92),B=n(40),N=n(12),I=n(28),O=n(59),A=n(66),M=n(94),L=n(49),P=n(63),j=n(51),F=n(93),R=n(115),D=n(14),U=n(26),z=D.f,H=U.f,G=o.RangeError,W=o.TypeError,V=o.Uint8Array,K=Array.prototype,q=u.ArrayBuffer,Y=u.DataView,X=I(0),J=I(2),$=I(3),Z=I(4),Q=I(5),tt=I(6),et=O(!0),nt=O(!1),rt=M.values,ot=M.keys,it=M.entries,at=K.lastIndexOf,st=K.reduce,ut=K.reduceRight,ct=K.join,lt=K.sort,ft=K.slice,dt=K.toString,pt=K.toLocaleString,ht=N("iterator"),vt=N("toStringTag"),gt=B("typed_constructor"),yt=B("def_constructor"),bt=s.CONSTR,mt=s.TYPED,kt=s.VIEW,xt=I(1,function(t,e){return _t(A(t,t[yt]),e)}),wt=i(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),St=!!V&&!!V.prototype.set&&i(function(){new V(1).set({})}),Et=function(t,e){var n=h(t);if(n<0||n%e)throw G("Wrong offset!");return n},Tt=function(t){if(x(t)&&mt in t)return t;throw W(t+" is not a typed array!")},_t=function(t,e){if(!(x(t)&> in t))throw W("It is not a typed array constructor!");return new t(e)},Ct=function(t,e){return Bt(A(t,t[yt]),e)},Bt=function(t,e){for(var n=0,r=e.length,o=_t(t,r);r>n;)o[n]=e[n++];return o},Nt=function(t,e,n){z(t,e,{get:function(){return this._d[n]}})},It=function(t){var e,n,r,o,i,a,s=w(t),u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,d=C(s);if(null!=d&&!S(d)){for(a=d.call(s),r=[],e=0;!(i=a.next()).done;e++)r.push(i.value);s=r}for(f&&u>2&&(l=c(l,arguments[2],2)),e=0,n=v(s.length),o=_t(this,n);n>e;e++)o[e]=f?l(s[e],e):s[e];return o},Ot=function(){for(var t=0,e=arguments.length,n=_t(this,e);e>t;)n[t]=arguments[t++];return n},At=!!V&&i(function(){pt.call(new V(1))}),Mt=function(){return pt.apply(At?ft.call(Tt(this)):Tt(this),arguments)},Lt={copyWithin:function(t,e){return R.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return F.apply(Tt(this),arguments)},filter:function(t){return Ct(this,J(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){X(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(Tt(this),arguments)},lastIndexOf:function(t){return at.apply(Tt(this),arguments)},map:function(t){return xt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Tt(this),arguments)},reduceRight:function(t){return ut.apply(Tt(this),arguments)},reverse:function(){for(var t,e=Tt(this).length,n=Math.floor(e/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return lt.call(Tt(this),t)},subarray:function(t,e){var n=Tt(this),r=n.length,o=y(t,r);return new(A(n,n[yt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,v((void 0===e?r:y(e,r))-o))}},Pt=function(t,e){return Ct(this,ft.call(Tt(this),t,e))},jt=function(t){Tt(this);var e=Et(arguments[1],1),n=this.length,r=w(t),o=v(r.length),i=0;if(o+e>n)throw G("Wrong length!");for(;i255?255:255&r),o.v[p](n*e+o.o,r,wt)}(this,n,t)},enumerable:!0})};m?(h=n(function(t,n,r,o){l(t,h,c,"_d");var i,a,s,u,f=0,p=0;if(x(n)){if(!(n instanceof q||"ArrayBuffer"==(u=k(n))||"SharedArrayBuffer"==u))return mt in n?Bt(h,n):It.call(h,n);i=n,p=Et(r,e);var y=n.byteLength;if(void 0===o){if(y%e)throw G("Wrong length!");if((a=y-p)<0)throw G("Wrong length!")}else if((a=v(o)*e)+p>y)throw G("Wrong length!");s=a/e}else s=g(n),i=new q(a=s*e);for(d(t,"_d",{b:i,o:p,l:a,e:s,v:new Y(i)});fdocument.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(100),o=n(77).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(21),o=n(24),i=n(76)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a){"use strict";var s=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=s(o),i=s(i),a=s(a);var u=function(){function t(){(0,o.default)(this,t),this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}return(0,i.default)(t,[{key:"removeFakeBackground",value:function(){if(this.isFakeBackgroundEnabled){var t=this.findParentTag("SPAN");t.style.paddingTop="",this.isFakeBackgroundEnabled=!1,document.execCommand(this.commandRemoveFormat)}}},{key:"setFakeBackground",value:function(){document.execCommand(this.commandBackground,!1,"#a8d6ff");var t=this.findParentTag("SPAN");t.style.paddingTop="0.30em",this.isFakeBackgroundEnabled=!0}},{key:"save",value:function(){this.savedSelectionRange=t.range}},{key:"restore",value:function(){if(this.savedSelectionRange){var t=window.getSelection();t.removeAllRanges(),t.addRange(this.savedSelectionRange)}}},{key:"clearSaved",value:function(){this.savedSelectionRange=null}},{key:"findParentTag",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=window.getSelection(),o=null;if(!r||!r.anchorNode||!r.focusNode)return null;var i=[r.anchorNode,r.focusNode];return i.forEach(function(r){for(var i=n;i>0&&r.parentNode&&(r.tagName!==t||(o=r,e&&r.classList&&!r.classList.contains(e)&&(o=null),!o));)r=r.parentNode,i--}),o}},{key:"expandToTag",value:function(t){var e=window.getSelection();e.removeAllRanges();var n=document.createRange();n.selectNodeContents(t),e.addRange(n)}}],[{key:"get",value:function(){return window.getSelection()}},{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}},{key:"anchorNode",get:function(){var t=window.getSelection();return t?t.anchorNode:null}},{key:"anchorOffset",get:function(){var t=window.getSelection();return t?t.anchorOffset:null}},{key:"isCollapsed",get:function(){var t=window.getSelection();return t?t.isCollapsed:null}},{key:"isAtEditor",get:function(){var e=t.get(),n=e.anchorNode||e.focusNode;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var r=null;return n&&(r=n.closest(".".concat(t.CSS.editorZone))),r&&r.nodeType===Node.ELEMENT_NODE}},{key:"range",get:function(){var t=window.getSelection();return t&&t.rangeCount?t.getRangeAt(0):null}},{key:"rect",get:function(){var t,e=document.selection,n={x:0,y:0,width:0,height:0};if(e&&"Control"!==e.type)return t=(e=e).createRange(),n.x=t.boundingLeft,n.y=t.boundingTop,n.width=t.boundingWidth,n.height=t.boundingHeight,n;if(!window.getSelection)return a.default.log("Method window.getSelection is not supported","warn"),n;if(null===(e=window.getSelection()).rangeCount||isNaN(e.rangeCount))return a.default.log("Method SelectionUtils.rangeCount is not supported","warn"),n;if((t=e.getRangeAt(0).cloneRange()).getBoundingClientRect&&(n=t.getBoundingClientRect()),0===n.x&&0===n.y){var r=document.createElement("span");if(r.getBoundingClientRect){r.appendChild(document.createTextNode("​")),t.insertNode(r),n=r.getBoundingClientRect();var o=r.parentNode;o.removeChild(r),o.normalize()}}return n}},{key:"text",get:function(){return window.getSelection?window.getSelection().toString():""}}]),t}();r.default=u,u.displayName="SelectionUtils",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(14).f,o=n(21),i=n(12)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e){t.exports={}},function(t,e,n){var r=n(12)("unscopables"),o=Array.prototype;null==o[r]&&n(22)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e,n){"use strict";var r=n(9),o=n(14),i=n(15),a=n(12)("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(19);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){var r=n(10);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(47),n(4),n(13),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d){"use strict";var p=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=p(o),i=p(i),a=p(a),s=p(s),u=p(u),c=p(c),l=p(l),f=p(f),d=p(d);var h=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"setToBlock",value:function(t){var n,r=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.positions.DEFAULT,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=this.Editor.BlockManager;switch(o){case e.positions.START:n=t.firstInput;break;case e.positions.END:n=t.lastInput;break;default:n=t.currentInput}if(n){var s=f.default.getDeepestNode(n,o===e.positions.END),u=f.default.getContentLength(s);switch(!0){case o===e.positions.START:i=0;break;case o===e.positions.END:case i>u:i=u}d.default.delay(function(){r.set(s,i)},20)(),a.setCurrentBlockByChildNode(t.holder),a.currentBlock.currentInput=n}}},{key:"setToInput",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.positions.DEFAULT,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.Editor.BlockManager.currentBlock,i=f.default.getDeepestNode(t);switch(n){case e.positions.START:this.set(i,0);break;case e.positions.END:var a=f.default.getContentLength(i);this.set(i,a);break;default:r&&this.set(i,r)}o.currentInput=t}},{key:"set",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.createRange(),r=c.default.get();if(f.default.isNativeInput(t)){if(!f.default.canSetCaret(t))return;return t.focus(),void(t.selectionStart=t.selectionEnd=e)}n.setStart(t,e),n.setEnd(t,e),r.removeAllRanges(),r.addRange(n);var o=n.getBoundingClientRect(),i=o.top,a=o.bottom,s=window,u=s.innerHeight;i<0&&window.scrollBy(0,i),a>u&&window.scrollBy(0,a-u)}},{key:"setToTheLastBlock",value:function(){var t=this.Editor.BlockManager.lastBlock;if(t)if(t.isEmpty)this.setToBlock(t);else{var e=this.Editor.BlockManager.insertAtEnd();this.setToBlock(e)}}},{key:"extractFragmentFromCaretPosition",value:function(){var t=c.default.get();if(t.rangeCount){var e=t.getRangeAt(0),n=this.Editor.BlockManager.currentBlock.currentInput;if(e.deleteContents(),n){var r=e.cloneRange();return r.selectNodeContents(n),r.setStart(e.endContainer,e.endOffset),r.extractContents()}}}},{key:"navigateNext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.Editor.BlockManager,r=n.currentBlock,o=n.nextContentfulBlock,i=r.nextInput;return!(!o&&!i||(t?(this.setToBlock(o,e.positions.START),0):!this.isAtEnd||(i?this.setToInput(i,e.positions.START):this.setToBlock(o,e.positions.START),0)))}},{key:"navigatePrevious",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.Editor.BlockManager,r=n.currentBlock,o=n.previousContentfulBlock;if(!r)return!1;var i=r.previousInput;return!(!o&&!i||(t?(this.setToBlock(o,e.positions.END),0):!this.isAtStart||(i?this.setToInput(i,e.positions.END):this.setToBlock(o,e.positions.END),0)))}},{key:"createShadow",value:function(t){var n=document.createElement("span");n.classList.add(e.CSS.shadowCaret),t.insertAdjacentElement("beforeEnd",n)}},{key:"restoreCaret",value:function(t){var n=t.querySelector(".".concat(e.CSS.shadowCaret));if(n){var r=new c.default;r.expandToTag(n),setTimeout(function(){var t=document.createRange();t.selectNode(n),t.extractContents()},50)}}},{key:"getHigherLevelSiblings",value:function(t,e){for(var n=t,r=[];n.parentNode&&"true"!==n.parentNode.contentEditable;)n=n.parentNode;for(var o="left"===e?"previousSibling":"nextSibling";n[o];)n=n[o],r.push(n);return r}},{key:"isAtStart",get:function(){if(!c.default.isCollapsed)return!1;var t=c.default.get(),e=t.anchorNode,n=f.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput);if(f.default.isNativeInput(n))return 0===n.selectionEnd;var r=e.textContent.search(/\S/);if(-1===r&&(r=0),f.default.isEmpty(n)){var o=this.getHigherLevelSiblings(e,"left"),i=o.every(function(t){return f.default.isEmpty(t)});if(i&&t.anchorOffset===r)return!0}return null===n||e===n&&t.anchorOffset<=r}},{key:"isAtEnd",get:function(){if(!c.default.isCollapsed)return!1;var t=c.default.get(),e=t.anchorNode,n=f.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput,!0);if(f.default.isNativeInput(n))return n.selectionEnd===n.value.length;if(f.default.isEmpty(n)){var r=this.getHigherLevelSiblings(e,"right"),o=r.every(function(t){return f.default.isEmpty(t)});if(o&&t.anchorOffset===e.textContent.length)return!0}var i=n.textContent.replace(/\s+$/,"");return e===n&&t.anchorOffset>=i.length}}],[{key:"positions",get:function(){return{START:"start",END:"end",DEFAULT:"default"}}},{key:"CSS",get:function(){return{shadowCaret:"cdx-shadow-caret"}}}]),e}(l.default);r.default=h,h.displayName="Caret",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(33);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(23),o=n(17),i=n(43);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=o(u.length),l=i(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(33),o=n(12)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(0),o=n(34),i=n(8),a=n(81),s="["+a+"]",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),l=function(t,e,n){var o={},s=i(function(){return!!a[t]()||"​…"!="​…"[t]()}),u=o[t]=s?e(f):a[t];n&&(o[n]=u),r(r.P+r.F*s,"String",o)},f=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(c,"")),t};t.exports=l},function(t,e,n){var r=n(12)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(22),o=n(19),i=n(8),a=n(34),s=n(12);t.exports=function(t,e,n){var u=s(t),c=n(a,u,""[t]),l=c[0],f=c[1];i(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,l),r(RegExp.prototype,u,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},function(t,e,n){var r=n(31),o=n(113),i=n(90),a=n(11),s=n(17),u=n(92),c={},l={};(e=t.exports=function(t,e,n,f,d){var p,h,v,g,y=d?function(){return t}:u(t),b=r(n,f,e?2:1),m=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(p=s(t.length);p>m;m++)if((g=e?b(a(h=t[m])[0],h[1]):b(t[m]))===c||g===l)return g}else for(v=y.call(t);!(h=v.next()).done;)if((g=o(v,b,h.value,e))===c||g===l)return g}).BREAK=c,e.RETURN=l},function(t,e,n){var r=n(11),o=n(32),i=n(12)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r=n(9).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){"use strict";var r=n(9),o=n(0),i=n(19),a=n(53),s=n(38),u=n(65),c=n(52),l=n(10),f=n(8),d=n(63),p=n(48),h=n(82);t.exports=function(t,e,n,v,g,y){var b=r[t],m=b,k=g?"set":"add",x=m&&m.prototype,w={},S=function(t){var e=x[t];i(x,t,"delete"==t?function(t){return!(y&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof m&&(y||x.forEach&&!f(function(){(new m).entries().next()}))){var E=new m,T=E[k](y?{}:-0,1)!=E,_=f(function(){E.has(1)}),C=d(function(t){new m(t)}),B=!y&&f(function(){for(var t=new m,e=5;e--;)t[k](e,e);return!t.has(-0)});C||((m=e(function(e,n){c(e,m,t);var r=h(new b,e,m);return null!=n&&u(n,g,r[k],r),r})).prototype=x,x.constructor=m),(_||B)&&(S("delete"),S("has"),g&&S("get")),(B||T)&&S(k),y&&x.clear&&delete x.clear}else m=v.getConstructor(e,t,g,k),a(m.prototype,n),s.NEED=!0;return p(m,t),w[t]=m,o(o.G+o.W+o.F*(m!=b),w),y||v.setStrong(m,t,g),m}},function(t,e,n){for(var r,o=n(9),i=n(22),a=n(40),s=a("typed_array"),u=a("view"),c=!(!o.ArrayBuffer||!o.DataView),l=c,f=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(r=o[d[f++]])?(i(r.prototype,s,!0),i(r.prototype,u,!0)):l=!1;t.exports={ABV:c,CONSTR:l,TYPED:s,VIEW:u}},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"methods",get:function(){return{blocks:this.Editor.BlocksAPI.methods,caret:this.Editor.CaretAPI.methods,events:this.Editor.EventsAPI.methods,listeners:this.Editor.ListenersAPI.methods,notifier:this.Editor.NotifierAPI.methods,sanitizer:this.Editor.SanitizerAPI.methods,saver:this.Editor.SaverAPI.methods,selection:this.Editor.SelectionAPI.methods,styles:this.Editor.StylesAPI.classes,toolbar:this.Editor.ToolbarAPI.methods}}}]),e}((c=l(c)).default);r.default=f,f.displayName="API",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(343),o=n(344),i=n(345);t.exports=function(t,e){return r(t)||o(t,e)||i()}},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l){"use strict";var f=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=f(o),i=f(i),a=f(a),s=f(s),u=f(u),c=f(c),l=f(l);var d=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).nodes={wrapper:null,content:null,actions:null,plusButton:null,blockActionsButtons:null,settingsToggler:null},t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"make",value:function(){var t=this;this.nodes.wrapper=l.default.make("div",e.CSS.toolbar),["content","actions"].forEach(function(n){t.nodes[n]=l.default.make("div",e.CSS[n]),l.default.append(t.nodes.wrapper,t.nodes[n])}),this.nodes.plusButton=l.default.make("div",e.CSS.plusButton),l.default.append(this.nodes.plusButton,l.default.svg("plus",14,14)),l.default.append(this.nodes.content,this.nodes.plusButton),this.Editor.Listeners.on(this.nodes.plusButton,"click",function(){return t.plusButtonClicked()},!1),this.Editor.Toolbox.make(),this.nodes.blockActionsButtons=l.default.make("div",e.CSS.blockActionsButtons),this.nodes.settingsToggler=l.default.make("span",e.CSS.settingsToggler);var n=l.default.svg("dots",18,4);l.default.append(this.nodes.settingsToggler,n),l.default.append(this.nodes.blockActionsButtons,this.nodes.settingsToggler),l.default.append(this.nodes.actions,this.nodes.blockActionsButtons),this.Editor.BlockSettings.make(),l.default.append(this.nodes.actions,this.Editor.BlockSettings.nodes.wrapper),l.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.bindEvents()}},{key:"move",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t&&(this.Editor.Toolbox.close(),this.Editor.BlockSettings.close());var e=this.Editor.BlockManager.currentBlock.holder;if(e){var n=Math.floor(e.offsetHeight/2);this.nodes.plusButton.style.transform="translate3d(0, calc(".concat(n,"px - 50%), 0)"),this.Editor.Toolbox.nodes.toolbox.style.transform="translate3d(0, calc(".concat(n,"px - 50%), 0)"),this.nodes.wrapper.style.transform="translate3D(0, ".concat(Math.floor(e.offsetTop),"px, 0)")}}},{key:"open",value:function(){var t=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];setTimeout(function(){t.move(r),t.nodes.wrapper.classList.add(e.CSS.toolbarOpened),n?t.blockActions.show():t.blockActions.hide()},50)}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(e.CSS.toolbarOpened),this.blockActions.hide(),this.Editor.Toolbox.close(),this.Editor.BlockSettings.close()}},{key:"plusButtonClicked",value:function(){this.Editor.Toolbox.toggle()}},{key:"bindEvents",value:function(){var t=this;this.Editor.Listeners.on(this.nodes.settingsToggler,"click",function(){return t.settingsTogglerClicked()})}},{key:"settingsTogglerClicked",value:function(){this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open()}},{key:"opened",get:function(){return this.nodes.wrapper.classList.contains(e.CSS.toolbarOpened)}},{key:"plusButton",get:function(){var t=this;return{hide:function(){return t.nodes.plusButton.classList.add(e.CSS.plusButtonHidden)},show:function(){t.Editor.Toolbox.isEmpty||t.nodes.plusButton.classList.remove(e.CSS.plusButtonHidden)}}}},{key:"blockActions",get:function(){var t=this;return{hide:function(){t.nodes.actions.classList.remove(e.CSS.actionsOpened)},show:function(){t.nodes.actions.classList.add(e.CSS.actionsOpened)}}}}],[{key:"CSS",get:function(){return{toolbar:"ce-toolbar",content:"ce-toolbar__content",actions:"ce-toolbar__actions",actionsOpened:"ce-toolbar__actions--opened",toolbarOpened:"ce-toolbar--opened",plusButton:"ce-toolbar__plus",plusButtonHidden:"ce-toolbar__plus--hidden",blockActionsButtons:"ce-toolbar__actions-buttons",settingsToggler:"ce-toolbar__settings-btn"}}}]),e}(c.default);r.default=d,d.displayName="Toolbar",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(10),o=n(9).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(16),o=n(9),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(41)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){e.f=n(12)},function(t,e,n){var r=n(74)("keys"),o=n(40);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(33);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(9).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(10),o=n(11),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(31)(Function.call,n(26).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var r=n(10),o=n(80).set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){"use strict";var r=n(35),o=n(34);t.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){"use strict";var r=n(41),o=n(0),i=n(19),a=n(22),s=n(49),u=n(112),c=n(48),l=n(46),f=n(12)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,h,v,g,y){u(n,e,h);var b,m,k,x=function(t){if(!d&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",S="values"==v,E=!1,T=t.prototype,_=T[f]||T["@@iterator"]||v&&T[v],C=_||x(v),B=v?S?x("entries"):C:void 0,N="Array"==e&&T.entries||_;if(N&&(k=l(N.call(new t)))!==Object.prototype&&k.next&&(c(k,w,!0),r||"function"==typeof k[f]||a(k,f,p)),S&&_&&"values"!==_.name&&(E=!0,C=function(){return _.call(this)}),r&&!y||!d&&!E&&T[f]||a(T,f,C),s[e]=C,s[w]=p,v)if(b={values:S?C:x("values"),keys:g?C:x("keys"),entries:B},y)for(m in b)m in T||i(T,m,b[m]);else o(o.P+o.F*(d||E),e,b);return b}},function(t,e,n){var r=n(88),o=n(34);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},function(t,e,n){var r=n(10),o=n(33),i=n(12)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(12)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(49),o=n(12)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){"use strict";var r=n(14),o=n(39);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){var r=n(61),o=n(12)("iterator"),i=n(49);t.exports=n(16).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){"use strict";var r=n(24),o=n(43),i=n(17);t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:o(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(50),o=n(116),i=n(49),a=n(23);t.exports=n(86)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r=n(11);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r,o,i,a=n(31),s=n(105),u=n(79),c=n(73),l=n(9),f=l.process,d=l.setImmediate,p=l.clearImmediate,h=l.MessageChannel,v=l.Dispatch,g=0,y={},b=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},m=function(t){b.call(t.data)};d&&p||(d=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++g]=function(){s("function"==typeof t?t:Function(t),e)},r(g),g},p=function(t){delete y[t]},"process"==n(33)(f)?r=function(t){f.nextTick(a(b,t,1))}:v&&v.now?r=function(t){v.now(a(b,t,1))}:h?(i=(o=new h).port2,o.port1.onmessage=m,r=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",m,!1)):r="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,t,1),0)}),t.exports={set:d,clear:p}},function(t,e,n){"use strict";var r=n(9),o=n(15),i=n(41),a=n(69),s=n(22),u=n(53),c=n(8),l=n(52),f=n(35),d=n(17),p=n(123),h=n(45).f,v=n(14).f,g=n(93),y=n(48),b="prototype",m="Wrong index!",k=r.ArrayBuffer,x=r.DataView,w=r.Math,S=r.RangeError,E=r.Infinity,T=k,_=w.abs,C=w.pow,B=w.floor,N=w.log,I=w.LN2,O=o?"_b":"buffer",A=o?"_l":"byteLength",M=o?"_o":"byteOffset";function L(t,e,n){var r,o,i,a=new Array(n),s=8*n-e-1,u=(1<>1,l=23===e?C(2,-24)-C(2,-77):0,f=0,d=t<0||0===t&&1/t<0?1:0;for((t=_(t))!=t||t===E?(o=t!=t?1:0,r=u):(r=B(N(t)/I),t*(i=C(2,-r))<1&&(r--,i*=2),(t+=r+c>=1?l/i:l*C(2,1-c))*i>=2&&(r++,i/=2),r+c>=u?(o=0,r=u):r+c>=1?(o=(t*i-1)*C(2,e),r+=c):(o=t*C(2,c-1)*C(2,e),r=0));e>=8;a[f++]=255&o,o/=256,e-=8);for(r=r<0;a[f++]=255&r,r/=256,s-=8);return a[--f]|=128*d,a}function P(t,e,n){var r,o=8*n-e-1,i=(1<>1,s=o-7,u=n-1,c=t[u--],l=127&c;for(c>>=7;s>0;l=256*l+t[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;r=256*r+t[u],u--,s-=8);if(0===l)l=1-a;else{if(l===i)return r?NaN:c?-E:E;r+=C(2,e),l-=a}return(c?-1:1)*r*C(2,l-e)}function j(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function F(t){return[255&t]}function R(t){return[255&t,t>>8&255]}function D(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function U(t){return L(t,52,8)}function z(t){return L(t,23,4)}function H(t,e,n){v(t[b],e,{get:function(){return this[n]}})}function G(t,e,n,r){var o=p(+n);if(o+e>t[A])throw S(m);var i=t[O]._b,a=o+t[M],s=i.slice(a,a+e);return r?s:s.reverse()}function W(t,e,n,r,o,i){var a=p(+n);if(a+e>t[A])throw S(m);for(var s=t[O]._b,u=a+t[M],c=r(+o),l=0;lY;)(V=q[Y++])in k||s(k,V,T[V]);i||(K.constructor=k)}var X=new x(new k(2)),J=x[b].setInt8;X.setInt8(0,2147483648),X.setInt8(1,2147483649),!X.getInt8(0)&&X.getInt8(1)||u(x[b],{setInt8:function(t,e){J.call(this,t,e<<24>>24)},setUint8:function(t,e){J.call(this,t,e<<24>>24)}},!0)}else k=function(t){l(this,k,"ArrayBuffer");var e=p(t);this._b=g.call(new Array(e),0),this[A]=e},x=function(t,e,n){l(this,x,"DataView"),l(t,k,"DataView");var r=t[A],o=f(e);if(o<0||o>r)throw S("Wrong offset!");if(o+(n=void 0===n?r-o:d(n))>r)throw S("Wrong length!");this[O]=t,this[M]=o,this[A]=n},o&&(H(k,"byteLength","_l"),H(x,"buffer","_b"),H(x,"byteLength","_l"),H(x,"byteOffset","_o")),u(x[b],{getInt8:function(t){return G(this,1,t)[0]<<24>>24},getUint8:function(t){return G(this,1,t)[0]},getInt16:function(t){var e=G(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=G(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return j(G(this,4,t,arguments[1]))},getUint32:function(t){return j(G(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return P(G(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return P(G(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){W(this,1,t,F,e)},setUint8:function(t,e){W(this,1,t,F,e)},setInt16:function(t,e){W(this,2,t,R,e,arguments[2])},setUint16:function(t,e){W(this,2,t,R,e,arguments[2])},setInt32:function(t,e){W(this,4,t,D,e,arguments[2])},setUint32:function(t,e){W(this,4,t,D,e,arguments[2])},setFloat32:function(t,e){W(this,4,t,z,e,arguments[2])},setFloat64:function(t,e){W(this,8,t,U,e,arguments[2])}});y(k,"ArrayBuffer"),y(x,"DataView"),s(x[b],a.VIEW,!0),e.ArrayBuffer=k,e.DataView=x},function(t,e,n){t.exports=!n(15)&&!n(8)(function(){return 7!=Object.defineProperty(n(73)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(9),o=n(16),i=n(41),a=n(75),s=n(14).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(21),o=n(23),i=n(59)(!1),a=n(76)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~i(c,n)||c.push(n));return c}},function(t,e,n){var r=n(14),o=n(11),i=n(42);t.exports=n(15)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){var r=n(23),o=n(45).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},function(t,e,n){"use strict";var r=n(42),o=n(60),i=n(58),a=n(24),s=n(57),u=Object.assign;t.exports=!u||n(8)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=a(t),u=arguments.length,c=1,l=o.f,f=i.f;u>c;)for(var d,p=s(arguments[c++]),h=l?r(p).concat(l(p)):r(p),v=h.length,g=0;v>g;)f.call(p,d=h[g++])&&(n[d]=p[d]);return n}:u},function(t,e,n){"use strict";var r=n(32),o=n(10),i=n(105),a=[].slice,s={};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),u=function(){var r=n.concat(a.call(arguments));return this instanceof u?function(t,e,n){if(!(e in s)){for(var r=[],o=0;o>>0||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(9).parseFloat,o=n(62).trim;t.exports=1/r(n(81)+"-0")!=-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(33);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(10),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var r=n(35),o=n(34);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):i:t?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(44),o=n(39),i=n(48),a={};n(22)(a,n(12)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(11);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(32),o=n(24),i=n(57),a=n(17);t.exports=function(t,e,n,s,u){r(e);var c=o(t),l=i(c),f=a(c.length),d=u?f-1:0,p=u?-1:1;if(n<2)for(;;){if(d in l){s=l[d],d+=p;break}if(d+=p,u?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;u?d>=0:f>d;d+=p)d in l&&(s=e(s,l[d],d,c));return s}},function(t,e,n){"use strict";var r=n(24),o=n(43),i=n(17);t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),s=o(t,a),u=o(e,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:o(c,a))-u,a-s),f=1;for(u0;)u in n?n[s]=n[u]:delete n[s],s+=f,u+=f;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){n(15)&&"g"!=/./g.flags&&n(14).f(RegExp.prototype,"flags",{configurable:!0,get:n(95)})},function(t,e,n){"use strict";var r,o,i,a,s=n(41),u=n(9),c=n(31),l=n(61),f=n(0),d=n(10),p=n(32),h=n(52),v=n(65),g=n(66),y=n(96).set,b=n(276)(),m=n(119),k=n(277),x=n(67),w=n(120),S=u.TypeError,E=u.process,T=E&&E.versions,_=T&&T.v8||"",C=u.Promise,B="process"==l(E),N=function(){},I=o=m.f,O=!!function(){try{var t=C.resolve(1),e=(t.constructor={})[n(12)("species")]=function(t){t(N,N)};return(B||"function"==typeof PromiseRejectionEvent)&&t.then(N)instanceof e&&0!==_.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),A=function(t){var e;return!(!d(t)||"function"!=typeof(e=t.then))&&e},M=function(t,e){if(!t._n){t._n=!0;var n=t._c;b(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(o||(2==t._h&&j(t),t._h=1),!0===s?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),a=!0)),n===e.promise?c(S("Promise-chain cycle")):(i=A(n))?i.call(n,u,c):u(n)):c(r)}catch(t){l&&!a&&l.exit(),c(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&L(t)})}},L=function(t){y.call(u,function(){var e,n,r,o=t._v,i=P(t);if(i&&(e=k(function(){B?E.emit("unhandledRejection",o,t):(n=u.onunhandledrejection)?n({promise:t,reason:o}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=B||P(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},P=function(t){return 1!==t._h&&0===(t._a||t._c).length},j=function(t){y.call(u,function(){var e;B?E.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},F=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),M(e,!0))},R=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=A(t))?b(function(){var r={_w:n,_d:!1};try{e.call(t,c(R,r,1),c(F,r,1))}catch(t){F.call(r,t)}}):(n._v=t,n._s=1,M(n,!1))}catch(t){F.call({_w:n,_d:!1},t)}}};O||(C=function(t){h(this,C,"Promise","_h"),p(t),r.call(this);try{t(c(R,this,1),c(F,this,1))}catch(t){F.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(53)(C.prototype,{then:function(t,e){var n=I(g(this,C));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=B?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&M(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=c(R,t,1),this.reject=c(F,t,1)},m.f=I=function(t){return t===C||t===a?new i(t):o(t)}),f(f.G+f.W+f.F*!O,{Promise:C}),n(48)(C,"Promise"),n(51)("Promise"),a=n(16).Promise,f(f.S+f.F*!O,"Promise",{reject:function(t){var e=I(this);return(0,e.reject)(t),e.promise}}),f(f.S+f.F*(s||!O),"Promise",{resolve:function(t){return w(s&&this===a?C:this,t)}}),f(f.S+f.F*!(O&&n(63)(function(t){C.all(t).catch(N)})),"Promise",{all:function(t){var e=this,n=I(e),r=n.resolve,o=n.reject,i=k(function(){var n=[],i=0,a=1;v(t,!1,function(t){var s=i++,u=!1;n.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=I(e),r=n.reject,o=k(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(t,e,n){"use strict";var r=n(32);function o(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},function(t,e,n){var r=n(11),o=n(10),i=n(119);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(14).f,o=n(44),i=n(53),a=n(31),s=n(52),u=n(65),c=n(86),l=n(116),f=n(51),d=n(15),p=n(38).fastKey,h=n(54),v=d?"_s":"size",g=function(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var l=t(function(t,r){s(t,l,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[v]=0,null!=r&&u(r,n,t[c],t)});return i(l.prototype,{clear:function(){for(var t=h(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=h(this,e),r=g(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[v]--}return!!r},forEach:function(t){h(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(h(this,e),t)}}),d&&r(l.prototype,"size",{get:function(){return h(this,e)[v]}}),l},def:function(t,e,n){var r,o,i=g(t,e);return i?i.v=n:(t._l=i={i:o=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[v]++,"F"!==o&&(t._i[o]=i)),t},getEntry:g,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=h(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?l(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,l(1))},n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var r=n(53),o=n(38).getWeak,i=n(11),a=n(10),s=n(52),u=n(65),c=n(28),l=n(21),f=n(54),d=c(5),p=c(6),h=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,e){return d(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var c=t(function(t,r){s(t,c,e,"_i"),t._t=e,t._i=h++,t._l=void 0,null!=r&&u(r,n,t[i],t)});return r(c.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return!0===n?v(f(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return!0===n?v(f(this,e)).has(t):n&&l(n,this._i)}}),c},def:function(t,e,n){var r=o(i(e),!0);return!0===r?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},function(t,e,n){var r=n(35),o=n(17);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(45),o=n(60),i=n(11),a=n(9).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(17),o=n(83),i=n(34);t.exports=function(t,e,n,a){var s=String(i(t)),u=s.length,c=void 0===n?" ":String(n),l=r(e);if(l<=u||""==c)return s;var f=l-u,d=o.call(c,Math.ceil(f/c.length));return d.length>f&&(d=d.slice(0,f)),a?d+s:s+d}},function(t,e,n){var r=n(42),o=n(23),i=n(58).f;t.exports=function(t){return function(e){for(var n,a=o(e),s=r(a),u=s.length,c=0,l=[];u>c;)i.call(a,n=s[c++])&&l.push(t?[n,a[n]]:a[n]);return l}}},function(t,e,n){var r=n(332),o=n(333),i=n(334);t.exports=function(t){return r(t)||o(t)||i()}},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"getBlocksCount",value:function(){return this.Editor.BlockManager.blocks.length}},{key:"getCurrentBlockIndex",value:function(){return this.Editor.BlockManager.currentBlockIndex}},{key:"getBlockByIndex",value:function(t){var e=this.Editor.BlockManager.getBlockByIndex(t);return e.holder}},{key:"swap",value:function(t,e){this.Editor.BlockManager.swap(t,e),this.Editor.Toolbar.move(!1)}},{key:"delete",value:function(t){this.Editor.BlockManager.removeBlock(t),0===this.Editor.BlockManager.blocks.length&&this.Editor.BlockManager.insert(),0===this.Editor.BlockManager.currentBlockIndex?this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock):this.Editor.Caret.navigatePrevious(!0),this.Editor.Toolbar.close()}},{key:"clear",value:function(){this.Editor.BlockManager.clear(!0)}},{key:"render",value:function(t){return this.Editor.BlockManager.clear(),this.Editor.Renderer.render(t.blocks)}},{key:"stretchBlock",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.Editor.BlockManager.getBlockByIndex(t);n&&(n.stretched=e)}},{key:"insertNewBlock",value:function(){var t=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(t)}},{key:"methods",get:function(){var t=this;return{clear:function(){return t.clear()},render:function(e){return t.render(e)},delete:function(){return t.delete()},swap:function(e,n){return t.swap(e,n)},getBlockByIndex:function(e){return t.getBlockByIndex(e)},getCurrentBlockIndex:function(){return t.getCurrentBlockIndex()},getBlocksCount:function(){return t.getBlocksCount()},stretchBlock:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.stretchBlock(e,n)},insertNewBlock:function(){return t.insertNewBlock()}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="BlocksAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"methods",get:function(){return{}}}]),e}((c=l(c)).default);r.default=f,f.displayName="CaretAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"on",value:function(t,e){this.Editor.Events.on(t,e)}},{key:"emit",value:function(t,e){this.Editor.Events.emit(t,e)}},{key:"off",value:function(t,e){this.Editor.Events.off(t,e)}},{key:"methods",get:function(){var t=this;return{emit:function(e,n){return t.emit(e,n)},off:function(e,n){return t.off(e,n)},on:function(e,n){return t.on(e,n)}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="EventsAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"on",value:function(t,e,n,r){this.Editor.Listeners.on(t,e,n,r)}},{key:"off",value:function(t,e,n){this.Editor.Listeners.off(t,e,n)}},{key:"methods",get:function(){var t=this;return{on:function(e,n,r,o){return t.on(e,n,r,o)},off:function(e,n,r){return t.off(e,n,r)}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="ListenersAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"show",value:function(t){return this.Editor.Notifier.show(t)}},{key:"methods",get:function(){var t=this;return{show:function(e){return t.show(e)}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="NotifierAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"clean",value:function(t,e){return this.Editor.Sanitizer.clean(t,e)}},{key:"methods",get:function(){var t=this;return{clean:function(e,n){return t.clean(e,n)}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="SanitizerAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"save",value:function(){return this.Editor.Saver.save()}},{key:"methods",get:function(){var t=this;return{save:function(){return t.save()}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="SaverAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4),n(47)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l){"use strict";var f=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=f(o),i=f(i),a=f(a),s=f(s),u=f(u),c=f(c),l=f(l);var d=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"findParentTag",value:function(t,e){return(new l.default).findParentTag(t,e)}},{key:"expandToTag",value:function(t){(new l.default).expandToTag(t)}},{key:"methods",get:function(){var t=this;return{findParentTag:function(e,n){return t.findParentTag(e,n)},expandToTag:function(e){return t.expandToTag(e)}}}}]),e}(c.default);r.default=d,d.displayName="SelectionAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"classes",get:function(){return{block:"cdx-block",inlineToolButton:"ce-inline-tool",inlineToolButtonActive:"ce-inline-tool--active",input:"cdx-input",loader:"cdx-loader",button:"cdx-button",settingsButton:"cdx-settings-button",settingsButtonActive:"cdx-settings-button--active"}}}]),e}((c=l(c)).default);r.default=f,f.displayName="StylesAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"open",value:function(){this.Editor.Toolbar.open()}},{key:"close",value:function(){this.Editor.Toolbar.close()}},{key:"methods",get:function(){var t=this;return{close:function(){return t.close()},open:function(){return t.open()}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="ToolbarAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4),n(18),n(56)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f){"use strict";var d=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=d(o),i=d(i),a=d(a),s=d(s),u=d(u),c=d(c),l=d(l),f=d(f);var p=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"keydown",value:function(t){switch(this.beforeKeydownProcessing(t),t.keyCode){case l.default.keyCodes.BACKSPACE:this.backspace(t);break;case l.default.keyCodes.ENTER:this.enter(t);break;case l.default.keyCodes.DOWN:case l.default.keyCodes.RIGHT:this.arrowRightAndDown(t);break;case l.default.keyCodes.UP:case l.default.keyCodes.LEFT:this.arrowLeftAndUp(t);break;case l.default.keyCodes.TAB:this.tabPressed(t);break;case l.default.keyCodes.ESC:this.escapePressed(t);break;default:this.defaultHandler()}}},{key:"beforeKeydownProcessing",value:function(t){if(this.needToolbarClosing(t)){this.Editor.Toolbar.close();var e=t.ctrlKey||t.metaKey,n=t.altKey,r=t.shiftKey;e||n||r||(this.Editor.BlockManager.clearFocused(),t.keyCode!==l.default.keyCodes.ENTER&&t.keyCode!==l.default.keyCodes.BACKSPACE&&this.Editor.BlockSelection.clearSelection(!0))}}},{key:"keyup",value:function(t){this.Editor.InlineToolbar.handleShowingEvent(t)}},{key:"mouseUp",value:function(t){this.Editor.InlineToolbar.handleShowingEvent(t)}},{key:"tabPressed",value:function(t){var e=this.Editor.BlockManager.currentBlock;t.preventDefault(),t.stopPropagation();var n=t.shiftKey,r=n?"left":"right";this.Editor.Tools.isInitial(e.tool)&&(e.isEmpty&&(this.Editor.Toolbar.opened||(this.Editor.Toolbar.open(!1,!1),this.Editor.Toolbar.plusButton.show()),this.Editor.Toolbox.open()),this.Editor.Toolbox.opened&&this.Editor.Toolbox.leaf(r))}},{key:"escapePressed",value:function(t){}},{key:"dragOver",value:function(t){var e=this.Editor.BlockManager.getBlockByChildNode(t.target);e.dropTarget=!0}},{key:"dragLeave",value:function(t){var e=this.Editor.BlockManager.getBlockByChildNode(t.target);e.dropTarget=!1}},{key:"enter",value:function(t){var e=this.Editor,n=e.BlockSelection,r=e.BlockManager,o=e.Tools,i=e.Caret,a=r.currentBlock,s=o.available[a.name];if(a.selected){if(n.allBlocksSelected)r.removeAllBlocks();else{var u=r.replace();i.setToBlock(u)}n.clearSelection()}else if(!s||!s[this.Editor.Tools.apiSettings.IS_ENABLED_LINE_BREAKS]){if(this.Editor.Toolbox.opened&&this.Editor.Toolbox.getActiveTool)return t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),void this.Editor.Toolbox.toolButtonActivate(t,this.Editor.Toolbox.getActiveTool);if(!t.shiftKey){var c=this.Editor.BlockManager.split();this.Editor.Caret.setToBlock(c),this.Editor.Tools.isInitial(c.tool)&&c.isEmpty&&(this.Editor.Toolbar.open(!1),this.Editor.Toolbar.plusButton.show()),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()}}}},{key:"backspace",value:function(t){var e=this.Editor,n=e.BlockManager,r=e.BlockSelection,o=e.Caret,i=n.currentBlock,a=this.Editor.Tools.available[i.name];if(i.selected||n.currentBlock.isEmpty)return r.allBlocksSelected?this.removeAllBlocks():this.removeCurrentBlock(),void r.clearSelection();if(!a||!a[this.Editor.Tools.apiSettings.IS_ENABLED_LINE_BREAKS]){var s=0===n.currentBlockIndex,u=o.isAtStart&&!s;u&&(t.preventDefault(),this.mergeBlocks())}}},{key:"removeAllBlocks",value:function(){var t=this.Editor.BlockManager;return t.removeAllBlocks(),!0}},{key:"removeCurrentBlock",value:function(){var t=this.Editor,e=t.BlockManager,n=t.Caret;return e.removeBlock(),0===e.currentBlockIndex?n.setToBlock(e.currentBlock):n.setToBlock(e.previousBlock,f.default.positions.END),this.Editor.Toolbar.close(),!0}},{key:"mergeBlocks",value:function(){var t=this.Editor,e=t.BlockManager,n=t.Caret,r=t.Toolbar,o=e.getBlockByIndex(e.currentBlockIndex-1),i=e.currentBlock;i.name===o.name&&o.mergeable?(n.createShadow(o.pluginsContent),e.mergeBlocks(o,i).then(function(){n.restoreCaret(o.pluginsContent),o.pluginsContent.normalize(),r.close()})):n.navigatePrevious()&&r.close()}},{key:"arrowRightAndDown",value:function(t){this.Editor.Caret.navigateNext()&&t.preventDefault()}},{key:"arrowLeftAndUp",value:function(t){this.Editor.Caret.navigatePrevious()&&t.preventDefault()}},{key:"defaultHandler",value:function(){}},{key:"needToolbarClosing",value:function(t){var e=t.keyCode===l.default.keyCodes.ENTER&&this.Editor.Toolbox.opened,n=t.keyCode===l.default.keyCodes.TAB;return!(t.shiftKey||n||e)}}]),e}(c.default);r.default=p,p.displayName="BlockEvents",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(6),n(7),n(5),n(140),n(4),n(13),n(18),n(338),n(56)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p,h,v,g){"use strict";var y=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=y(o),i=y(i),a=y(a),s=y(s),u=y(u),c=y(c),l=y(l),f=y(f),d=y(d),p=y(p),h=y(h),v=y(v),g=y(g);var b=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,u.default)(this,(0,c.default)(e).apply(this,arguments))).currentBlockIndex=-1,t._blocks=null,t}var n,r;return(0,l.default)(e,t),(0,s.default)(e,[{key:"prepare",value:(r=(0,i.default)(o.default.mark(function t(){var e;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=new v.default(this.Editor.UI.nodes.redactor),this._blocks=new Proxy(e,{set:v.default.set,get:v.default.get});case 2:case"end":return t.stop()}},t,this)})),function(){return r.apply(this,arguments)})},{key:"composeBlock",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.Editor.Tools.construct(t,e),o=this.Editor.Tools.available[t],i=new f.default(t,r,o,n,this.Editor.API.methods);return this.bindEvents(i),i}},{key:"insert",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.initialBlock,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=++this.currentBlockIndex,o=this.composeBlock(t,e,n);return this._blocks[r]=o,o}},{key:"paste",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n=r?this.replace(t):this.insert(t);try{n.call("onPaste",e)}catch(e){h.default.log("".concat(t,": onPaste callback call is failed"),"error",e)}return n}},{key:"insertAtEnd",value:function(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}},{key:"mergeBlocks",value:(n=(0,i.default)(o.default.mark(function t(e,n){var r,i;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this._blocks.indexOf(n),!n.isEmpty){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,n.data;case 5:if(i=t.sent,h.default.isEmpty(i)){t.next=9;break}return t.next=9,e.mergeWith(i);case 9:this.removeBlock(r),this.currentBlockIndex=this._blocks.indexOf(e);case 11:case"end":return t.stop()}},t,this)})),function(t,e){return n.apply(this,arguments)})},{key:"removeBlock",value:function(t){t||(t=this.currentBlockIndex),this._blocks.remove(t),this.blocks.length||(this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus())}},{key:"removeAllBlocks",value:function(){for(var t=this.blocks.length-1;t>=0;t--)this._blocks.remove(t);this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus()}},{key:"split",value:function(){var t=this.Editor.Caret.extractFragmentFromCaretPosition(),e=p.default.make("div");e.append(t);var n={text:p.default.isEmpty(e)?"":e.innerHTML};return this.insert(this.config.initialBlock,n)}},{key:"replace",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.initialBlock,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.composeBlock(t,e);return this._blocks.insert(this.currentBlockIndex,n,!0),n}},{key:"getBlockByIndex",value:function(t){return this._blocks[t]}},{key:"getBlock",value:function(t){p.default.isElement(t)||(t=t.parentNode);var e=this._blocks.nodes,n=t.closest(".".concat(f.default.CSS.wrapper)),r=e.indexOf(n);if(r>=0)return this._blocks[r]}},{key:"highlightCurrentNode",value:function(){this.clearFocused(),this.currentBlock.focused=!0}},{key:"clearFocused",value:function(){this.blocks.forEach(function(t){return t.focused=!1})}},{key:"setCurrentBlockByChildNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.positions.DEFAULT;p.default.isElement(t)||(t=t.parentNode);var n=t.closest(".".concat(f.default.CSS.wrapper));if(!n)throw new Error("Can not find a Block from this child Node");this.currentBlockIndex=this._blocks.nodes.indexOf(n),this.Editor.Caret.setToInput(t,e)}},{key:"getBlockByChildNode",value:function(t){p.default.isElement(t)||(t=t.parentNode);var e=t.closest(".".concat(f.default.CSS.wrapper));return this.blocks.find(function(t){return t.holder===e})}},{key:"swap",value:function(t,e){this._blocks.swap(t,e),this.currentBlockIndex=e}},{key:"dropPointer",value:function(){this.currentBlockIndex=-1,this.clearFocused()}},{key:"clear",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._blocks.removeAll(),this.dropPointer(),t&&this.insert(this.config.initialBlock)}},{key:"bindEvents",value:function(t){var e=this.Editor,n=e.BlockEvents,r=e.Listeners;r.on(t.holder,"keydown",function(t){return n.keydown(t)},!0),r.on(t.holder,"mouseup",function(t){return n.mouseUp(t)}),r.on(t.holder,"keyup",function(t){return n.keyup(t)}),r.on(t.holder,"dragover",function(t){return n.dragOver(t)}),r.on(t.holder,"dragleave",function(t){return n.dragLeave(t)})}},{key:"lastBlock",get:function(){return this._blocks[this._blocks.length-1]}},{key:"currentBlock",get:function(){return this._blocks[this.currentBlockIndex]}},{key:"nextBlock",get:function(){var t=this.currentBlockIndex===this._blocks.length-1;return t?null:this._blocks[this.currentBlockIndex+1]}},{key:"nextContentfulBlock",get:function(){var t=this.blocks.slice(this.currentBlockIndex+1);return t.find(function(t){return!!t.inputs.length})}},{key:"previousContentfulBlock",get:function(){var t=this.blocks.slice(0,this.currentBlockIndex).reverse();return t.find(function(t){return!!t.inputs.length})}},{key:"previousBlock",get:function(){var t=0===this.currentBlockIndex;return t?null:this._blocks[this.currentBlockIndex-1]}},{key:"blocks",get:function(){return this._blocks.array}}]),e}(d.default);r.default=b,b.displayName="BlockManager",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(13),n(18),n(341),n(340),n(339)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d){"use strict";var p=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=p(o),i=p(i),a=p(a),s=p(s),u=p(u),c=p(c),l=p(l),f=p(f),d=p(d);var h=function(){function t(e,n,r,o,i){(0,a.default)(this,t),this.inputIndex=0,this.name=e,this.tool=n,this.class=r,this.settings=o,this.api=i,this.holder=this.compose(),this.tunes=this.makeTunes()}var e,n;return(0,s.default)(t,[{key:"call",value:function(t,e){this.tool[t]&&this.tool[t]instanceof Function&&this.tool[t].call(this.tool,e)}},{key:"mergeWith",value:(n=(0,i.default)(o.default.mark(function t(e){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tool.merge(e);case 2:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)})},{key:"save",value:(e=(0,i.default)(o.default.mark(function t(){var e,n,r,i=this;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tool.save(this.pluginsContent);case 2:return e=t.sent,n=window.performance.now(),t.abrupt("return",Promise.resolve(e).then(function(t){return r=window.performance.now(),{tool:i.name,data:t,time:r-n}}).catch(function(t){c.default.log("Saving proccess for ".concat(i.name," tool failed due to the ").concat(t),"log","red")}));case 5:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"validateData",value:function(t){var e=!0;return this.tool.validate instanceof Function&&(e=this.tool.validate(t)),!!e&&t}},{key:"makeTunes",value:function(){var t=this,e=[l.default,f.default,d.default];return e.map(function(e){return new e({api:t.api,settings:t.settings})})}},{key:"renderTunes",value:function(){var t=document.createDocumentFragment();return this.tunes.forEach(function(e){u.default.append(t,e.render())}),t}},{key:"compose",value:function(){var e=u.default.make("div",t.CSS.wrapper),n=u.default.make("div",t.CSS.content),r=this.tool.render();return n.appendChild(r),e.appendChild(n),e}},{key:"inputs",get:function(){var t=this.holder,e="[contenteditable], textarea, input, "+["text","password","email","number","search","tel","url"].map(function(t){return'input[type="'.concat(t,'"]')}).join(", "),n=c.default.array(t.querySelectorAll(e));return this.inputIndex>n.length-1&&(this.inputIndex=n.length-1),n}},{key:"currentInput",get:function(){return this.inputs[this.inputIndex]},set:function(t){var e=this.inputs.findIndex(function(e){return e===t||e.contains(t)});-1!==e&&(this.inputIndex=e)}},{key:"firstInput",get:function(){return this.inputs[0]}},{key:"lastInput",get:function(){var t=this.inputs;return t[t.length-1]}},{key:"nextInput",get:function(){return this.inputs[this.inputIndex+1]}},{key:"previousInput",get:function(){return this.inputs[this.inputIndex-1]}},{key:"pluginsContent",get:function(){var e=this.holder.querySelector(".".concat(t.CSS.content));return e&&e.childNodes.length?e.childNodes[0]:null}},{key:"data",get:function(){return this.save().then(function(t){return t&&!c.default.isEmpty(t.data)?t.data:{}})}},{key:"sanitize",get:function(){return this.tool.sanitize}},{key:"mergeable",get:function(){return"function"==typeof this.tool.merge}},{key:"isEmpty",get:function(){var t=u.default.isEmpty(this.pluginsContent),e=!this.hasMedia;return t&&e}},{key:"hasMedia",get:function(){return!!this.holder.querySelector(["img","iframe","video","audio","source","input","textarea","twitterwidget"].join(","))}},{key:"focused",set:function(e){this.holder.classList.toggle(t.CSS.focused,e)}},{key:"selected",set:function(e){e?this.holder.classList.add(t.CSS.selected):this.holder.classList.remove(t.CSS.selected)},get:function(){return this.holder.classList.contains(t.CSS.selected)}},{key:"stretched",set:function(e){this.holder.classList.toggle(t.CSS.wrapperStretched,e)}},{key:"dropTarget",set:function(e){this.holder.classList.toggle(t.CSS.dropTarget,e)}}],[{key:"CSS",get:function(){return{wrapper:"ce-block",wrapperStretched:"ce-block--stretched",content:"ce-block__content",focused:"ce-block--focused",selected:"ce-block--selected",dropTarget:"ce-block--drop-target"}}}]),t}();r.default=h,h.displayName="Block",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4),n(18),n(13),n(47)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d){"use strict";var p=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=p(o),i=p(i),a=p(a),s=p(s),u=p(u),c=p(c),l=p(l),f=p(f),d=p(d);var h=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).needToSelectAll=!1,t.nativeInputSelected=!1,t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"prepare",value:function(){var t=this,e=this.Editor.Shortcuts;e.add({name:"CMD+A",handler:function(e){t.handleCommandA(e)}}),e.add({name:"CMD+C",handler:function(e){t.handleCommandC(e)}}),this.selection=new d.default}},{key:"clearSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.needToSelectAll=!1,this.nativeInputSelected=!1,this.anyBlockSelected&&(t&&this.selection.restore(),this.allBlocksSelected=!1)}},{key:"handleCommandA",value:function(t){!f.default.isNativeInput(t.target)||this.nativeInputSelected?(t.preventDefault(),this.needToSelectAll?(this.selectAllBlocks(),this.needToSelectAll=!1):(this.selectBlockByIndex(),this.needToSelectAll=!0)):this.nativeInputSelected=!0}},{key:"handleCommandC",value:function(t){var e=this,n=this.Editor,r=n.BlockManager,o=n.Sanitizer;if(this.anyBlockSelected){t.preventDefault();var i=f.default.make("div");r.blocks.filter(function(t){return t.selected}).forEach(function(t){var n=o.clean(t.holder.innerHTML,e.sanitizerConfig),r=f.default.make("p");r.innerHTML=n,i.appendChild(r)}),l.default.copyTextToClipboard(i.innerHTML)}}},{key:"selectAllBlocks",value:function(){this.Editor.BlockManager,this.allBlocksSelected=!0}},{key:"selectBlockByIndex",value:function(t){var e,n=this.Editor.BlockManager;n.clearFocused(),e=isNaN(t)?n.currentBlock:n.getBlockByIndex(t),this.selection.save(),d.default.get().removeAllRanges(),e.selected=!0}},{key:"sanitizerConfig",get:function(){return{p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}}}},{key:"allBlocksSelected",get:function(){var t=this.Editor.BlockManager;return t.blocks.every(function(t){return!0===t.selected})},set:function(t){var e=this.Editor.BlockManager;e.blocks.forEach(function(e){return e.selected=t})}},{key:"anyBlockSelected",get:function(){var t=this.Editor.BlockManager;return t.blocks.some(function(t){return!0===t.selected})}}]),e}(c.default);r.default=h,h.displayName="BlockSelection",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(6),n(7),n(5),n(47),n(4),n(56)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p){"use strict";var h=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=h(o),i=h(i),a=h(a),s=h(s),u=h(u),c=h(c),l=h(l),f=h(f),d=h(d),p=h(p);var v=function(t){function e(){var t,n;return(0,a.default)(this,e),(t=(0,u.default)(this,(0,c.default)(e).apply(this,arguments))).isStartedAtEditor=!1,t.processDrop=(n=(0,i.default)(o.default.mark(function e(n){var r,i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=t.Editor,i=r.BlockManager,a=r.Paste,n.preventDefault(),i.blocks.forEach(function(t){return t.dropTarget=!1}),f.default.isAtEditor&&!f.default.isCollapsed&&t.isStartedAtEditor&&document.execCommand("delete"),t.isStartedAtEditor=!1;try{i.setCurrentBlockByChildNode(n.target,p.default.positions.END)}catch(t){i.setCurrentBlockByChildNode(i.lastBlock.holder,p.default.positions.END)}a.processDataTransfer(n.dataTransfer,!0);case 7:case"end":return e.stop()}},e,this)})),function(t){return n.apply(this,arguments)}),t}return(0,l.default)(e,t),(0,s.default)(e,[{key:"prepare",value:function(){this.bindEvents()}},{key:"bindEvents",value:function(){var t=this;this.Editor.Listeners.on(this.Editor.UI.nodes.holder,"drop",this.processDrop,!0),this.Editor.Listeners.on(this.Editor.UI.nodes.holder,"dragstart",function(e){f.default.isAtEditor&&!f.default.isCollapsed&&(t.isStartedAtEditor=!0),t.Editor.InlineToolbar.close()}),this.Editor.Listeners.on(this.Editor.UI.nodes.holder,"dragover",function(t){return t.preventDefault()},!0)}}]),e}(d.default);r.default=v,v.displayName="DragNDrop",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).subscribers={},t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"on",value:function(t,e){t in this.subscribers||(this.subscribers[t]=[]),this.subscribers[t].push(e)}},{key:"emit",value:function(t,e){this.subscribers[t]&&this.subscribers[t].reduce(function(t,e){var n=e(t);return n||t},e)}},{key:"off",value:function(t,e){for(var n=0;n3&&void 0!==arguments[3]&&arguments[3],o={element:t,eventType:e,handler:n,useCapture:r},i=this.findOne(t,e,n);i||(this.allListeners.push(o),t.addEventListener(e,n,r))}},{key:"off",value:function(t,e,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.findAll(t,e,n);i.forEach(function(t,e){var n=r.allListeners.indexOf(i[e]);n>0&&r.allListeners.splice(n,1)}),t.removeEventListener(e,n,o)}},{key:"findOne",value:function(t,e,n){var r=this.findAll(t,e,n);return r.length>0?r[0]:null}},{key:"findAll",value:function(t,e,n){var r=t?this.findByEventTarget(t):[];return t&&e&&n?r.filter(function(t){return t.eventType===e&&t.handler===n}):t&&e?r.filter(function(t){return t.eventType===e}):r}},{key:"removeAll",value:function(){this.allListeners.map(function(t){t.element.removeEventListener(t.eventType,t.handler)}),this.allListeners=[]}},{key:"findByEventTarget",value:function(t){return this.allListeners.filter(function(e){if(e.element===t)return e})}},{key:"findByType",value:function(t){return this.allListeners.filter(function(e){if(e.eventType===t)return e})}},{key:"findByHandler",value:function(t){return this.allListeners.filter(function(e){if(e.handler===t)return e})}}]),e}((c=l(c)).default);r.default=f,f.displayName="Listeners",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(6),n(7),n(5),n(4),n(18),n(140)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p){"use strict";var h=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=h(o),i=h(i),a=h(a),s=h(s),u=h(u),c=h(c),l=h(l),f=h(f),d=h(d),p=h(p);var v=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,u.default)(this,(0,c.default)(e).apply(this,arguments))).mutationDebouncer=d.default.debounce(function(){t.config.onChange()},e.DebounceTimer),t}var n;return(0,l.default)(e,t),(0,s.default)(e,[{key:"destroy",value:function(){this.mutationDebouncer=null,this.observer.disconnect(),this.observer=null}},{key:"prepare",value:(n=(0,i.default)(o.default.mark(function t(){var e=this;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:window.setTimeout(function(){e.setObserver()},1e3);case 1:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"disable",value:function(){this.disabled=!0}},{key:"enable",value:function(){this.disabled=!1}},{key:"setObserver",value:function(){var t=this,e=this.Editor.UI;this.observer=new MutationObserver(function(e,n){t.mutationHandler(e,n)}),this.observer.observe(e.nodes.redactor,{childList:!0,attributes:!0,subtree:!0,characterData:!0,characterDataOldValue:!0})}},{key:"mutationHandler",value:function(t,e){if(!this.disabled){var n=!1;t.forEach(function(t){switch(t.type){case"childList":case"subtree":case"characterData":case"characterDataOldValue":n=!0;break;case"attributes":var e=t.target;if(!e.classList.contains(p.default.CSS.wrapper))return void(n=!0)}}),n&&this.mutationDebouncer()}}}]),e}(f.default);r.default=v,v.displayName="ModificationsObserver",v.DebounceTimer=450,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4),n(342)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l){"use strict";var f=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=f(o),i=f(i),a=f(a),s=f(s),u=f(u),c=f(c),l=f(l);var d=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"show",value:function(t){l.default.show(t)}}]),e}(c.default);r.default=d,d.displayName="Notifier",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(127),n(29),n(30),n(71),n(1),n(2),n(6),n(7),n(5),n(56),n(4),n(13),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p,h,v,g){"use strict";var y=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=y(o),i=y(i),a=y(a),s=y(s),u=y(u),c=y(c),l=y(l),f=y(f),d=y(d),p=y(p),h=y(h),v=y(v),g=y(g);var b=function(t){function e(){var t,n;return(0,u.default)(this,e),(t=(0,l.default)(this,(0,f.default)(e).apply(this,arguments))).toolsTags={},t.tagsByTool={},t.toolsPatterns=[],t.toolsFiles={},t.processTool=function(e){var n=(0,s.default)(e,2),r=n[0],o=n[1];try{var i=new t.Editor.Tools.blockTools[r]({api:t.Editor.API.methods,config:{},data:{}});if(!i.onPaste||"function"!=typeof i.onPaste)return;var a=o.pasteConfig||{};t.getTagsConfig(r,a),t.getFilesConfig(r,a),t.getPatternsConfig(r,a)}catch(t){g.default.log("Paste handling for «".concat(r,"» Tool hasn't been set up because of the error"),"warn",t)}},t.handlePasteEvent=(n=(0,a.default)(i.default.mark(function e(n){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.isNativeBehaviour(n.target)||n.clipboardData.types.includes("Files")){e.next=2;break}return e.abrupt("return");case 2:n.preventDefault(),t.processDataTransfer(n.clipboardData);case 4:case"end":return e.stop()}},e,this)})),function(t){return n.apply(this,arguments)}),t}var n,r,h,y,b,m,k,x;return(0,d.default)(e,t),(0,c.default)(e,[{key:"prepare",value:(x=(0,a.default)(i.default.mark(function t(){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.setCallback(),this.processTools();case 2:case"end":return t.stop()}},t,this)})),function(){return x.apply(this,arguments)})},{key:"processDataTransfer",value:(k=(0,a.default)(i.default.mark(function t(e){var n,r,o,a,s,u,c,l=arguments;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=l.length>1&&void 0!==l[1]&&l[1],r=this.Editor.Sanitizer,!e.types.includes("Files")){t.next=6;break}return t.next=5,this.processFiles(e.files);case 5:return t.abrupt("return");case 6:if(o=e.getData("text/plain"),a=e.getData("text/html"),n&&o.trim()&&a.trim()&&(a="

"+(a.trim()?a:o)+"

"),s=Object.keys(this.toolsTags).reduce(function(t,e){return t[e.toLowerCase()]=!0,t},{}),u=Object.assign({},s,r.getAllInlineToolsConfig()),(c=r.clean(a,u)).trim()&&c.trim()!==o&&v.default.isHTMLString(c)){t.next=17;break}return t.next=15,this.processText(o);case 15:t.next=19;break;case 17:return t.next=19,this.processText(c,!0);case 19:case"end":return t.stop()}},t,this)})),function(t){return k.apply(this,arguments)})},{key:"setCallback",value:function(){var t=this.Editor,e=t.Listeners,n=t.UI;e.on(n.nodes.redactor,"paste",this.handlePasteEvent)}},{key:"processTools",value:function(){var t=this.Editor.Tools.blockTools;Object.entries(t).forEach(this.processTool)}},{key:"getTagsConfig",value:function(t,e){var n=this,r=e.tags||[];r.forEach(function(e){n.toolsTags.hasOwnProperty(e)?g.default.log("Paste handler for «".concat(t,"» Tool on «").concat(e,"» tag is skipped ")+"because it is already used by «".concat(n.toolsTags[e].tool,"» Tool."),"warn"):n.toolsTags[e.toUpperCase()]={tool:t}}),this.tagsByTool[t]=r.map(function(t){return t.toUpperCase()})}},{key:"getFilesConfig",value:function(t,e){var n=e.files,r=void 0===n?{}:n,o=r.extensions,i=r.mimeTypes;(o||i)&&(o&&!Array.isArray(o)&&(g.default.log("«extensions» property of the onDrop config for «".concat(t,"» Tool should be an array")),o=[]),i&&!Array.isArray(i)&&(g.default.log("«mimeTypes» property of the onDrop config for «".concat(t,"» Tool should be an array")),i=[]),i&&(i=i.filter(function(e){return!!g.default.isValidMimeType(e)||(g.default.log("MIME type value «".concat(e,"» for the «").concat(t,"» Tool is not a valid MIME type"),"warn"),!1)})),this.toolsFiles[t]={extensions:o||[],mimeTypes:i||[]})}},{key:"getPatternsConfig",value:function(t,e){var n=this;e.patterns&&!g.default.isEmpty(e.patterns)&&Object.entries(e.patterns).forEach(function(e){var r=(0,s.default)(e,2),o=r[0],i=r[1];i instanceof RegExp||g.default.log("Pattern ".concat(i," for «").concat(t,"» Tool is skipped because it should be a Regexp instance."),"warn"),n.toolsPatterns.push({key:o,pattern:i,tool:t})})}},{key:"isNativeBehaviour",value:function(t){var e=this.Editor.BlockManager;if(v.default.isNativeInput(t))return!0;var n=e.getBlock(t);return!n}},{key:"processFiles",value:(m=(0,a.default)(i.default.mark(function t(e){var n,r=this;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.Editor.BlockManager,t.next=3,Promise.all(Array.from(e).map(function(t){return r.processFile(t)}));case 3:t.sent.filter(function(t){return!!t}).forEach(function(t,e){0===e&&n.currentBlock&&n.currentBlock.isEmpty?n.paste(t.type,t.event,!0):n.paste(t.type,t.event)});case 6:case"end":return t.stop()}},t,this)})),function(t){return m.apply(this,arguments)})},{key:"processFile",value:(b=(0,a.default)(i.default.mark(function t(e){var n,r,o,a,u;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=g.default.getFileExtension(e),r=Object.entries(this.toolsFiles).find(function(t){var r=(0,s.default)(t,2),o=(r[0],r[1]),i=o.mimeTypes,a=o.extensions,u=e.type.split("/"),c=(0,s.default)(u,2),l=c[0],f=c[1],d=a.find(function(t){return t.toLowerCase()===n.toLowerCase()}),p=i.find(function(t){var e=t.split("/"),n=(0,s.default)(e,2),r=n[0],o=n[1];return r===l&&(o===f||"*"===o)});return!!d||!!p})){t.next=4;break}return t.abrupt("return");case 4:return o=(0,s.default)(r,1),a=o[0],u=this.composePasteEvent("file",{file:e}),t.abrupt("return",{event:u,type:a});case 7:case"end":return t.stop()}},t,this)})),function(t){return b.apply(this,arguments)})},{key:"processText",value:(y=(0,a.default)(i.default.mark(function t(e){var n,r,o,s,u,c,l,f,d=this,h=arguments;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],r=this.Editor,o=r.Caret,s=r.BlockManager,u=r.Tools,(c=n?this.processHTML(e):this.processPlain(e)).length){t.next=5;break}return t.abrupt("return");case 5:if(1!==c.length||c[0].isBlock){t.next=8;break}return this.processSingleBlock(c.pop()),t.abrupt("return");case 8:return l=u.isInitial(s.currentBlock.tool),f=l&&s.currentBlock.isEmpty,t.next=12,Promise.all(c.map(function(){var t=(0,a.default)(i.default.mark(function t(e,n){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.insertBlock(e,0===n&&f);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}()));case 12:o.setToBlock(s.currentBlock,p.default.positions.END);case 13:case"end":return t.stop()}},t,this)})),function(t){return y.apply(this,arguments)})},{key:"processHTML",value:function(t){var e=this,n=this.Editor,r=n.Tools,o=n.Sanitizer,i=this.config.initialBlock,a=v.default.make("DIV");a.innerHTML=t;var s=this.getNodes(a);return s.map(function(t){var n,a=i,s=!1;switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:(n=v.default.make("div")).appendChild(t);break;case Node.ELEMENT_NODE:n=t,s=!0,e.toolsTags[n.tagName]&&(a=e.toolsTags[n.tagName].tool)}var u=r.blockTools[a].pasteConfig.tags,c=u.reduce(function(t,e){return t[e.toLowerCase()]={},t},{}),l=Object.assign({},c,o.getInlineToolsConfig(a));n.innerHTML=o.clean(n.innerHTML,l);var f=e.composePasteEvent("tag",{data:n});return{content:n,isBlock:s,tool:a,event:f}}).filter(function(t){return!v.default.isNodeEmpty(t.content)||v.default.isSingleTag(t.content)})}},{key:"processPlain",value:function(t){var e=this,n=this.config.initialBlock;if(this.Editor.Tools,!t)return[];var r=n;return t.split(/\r?\n/).filter(function(t){return t.trim()}).map(function(t){var n=v.default.make("div");n.innerHTML=t;var o=e.composePasteEvent("tag",{data:n});return{content:n,tool:r,isBlock:!1,event:o}})}},{key:"processSingleBlock",value:(h=(0,a.default)(i.default.mark(function t(n){var r,o,a,s,u,c,l,f,d,h,v;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.config.initialBlock,o=this.Editor,a=o.BlockManager,s=o.Caret,u=o.Sanitizer,c=o.Tools,l=n.content,!(n.tool===r&&l.textContent.length1&&void 0!==c[1]&&c[1],r=this.Editor,o=r.BlockManager,a=r.Caret,s=o.currentBlock,!(n&&s&&s.isEmpty)){t.next=6;break}return o.paste(e.tool,e.event,!0),t.abrupt("return");case 6:u=o.paste(e.tool,e.event),a.setToBlock(u);case 8:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)})},{key:"getNodes",value:function(t){var e=this,n=Array.from(t.childNodes),r=Object.keys(this.toolsTags);return n.reduce(function t(n,i){if(v.default.isEmpty(i)&&!v.default.isSingleTag(i))return n;var a=n[n.length-1],s=new DocumentFragment;switch(a&&v.default.isFragment(a)&&(s=n.pop()),i.nodeType){case Node.ELEMENT_NODE:var u=i,c=e.toolsTags[u.tagName]||{},l=c.tool,f=void 0===l?"":l,d=e.tagsByTool[f]||[],p=r.includes(u.tagName),h=v.default.blockElements.includes(u.tagName.toLowerCase()),g=Array.from(u.children).some(function(t){var e=t.tagName;return r.includes(e)&&!d.includes(e)}),y=Array.from(u.children).some(function(t){var e=t.tagName;return v.default.blockElements.includes(e.toLowerCase())});if(!h&&!p)return s.appendChild(u),(0,o.default)(n).concat([s]);if(p&&!g||h&&!y&&!g)return(0,o.default)(n).concat([s,u]);break;case Node.TEXT_NODE:return s.appendChild(i),(0,o.default)(n).concat([s]);default:return(0,o.default)(n).concat([s])}return(0,o.default)(n).concat((0,o.default)(Array.from(i.childNodes).reduce(t,[])))},[])}},{key:"composePasteEvent",value:function(t,e){return new CustomEvent(t,{detail:e})}}]),e}(h.default);r.default=b,b.displayName="Paste",b.PATTERN_PROCESSING_MAX_LENGTH=450,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(6),n(7),n(5),n(4),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d){"use strict";var p=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=p(o),i=p(i),a=p(a),s=p(s),u=p(u),c=p(c),l=p(l),f=p(f),d=p(d);var h=function(t){function e(){return(0,a.default)(this,e),(0,u.default)(this,(0,c.default)(e).apply(this,arguments))}var n;return(0,l.default)(e,t),(0,s.default)(e,[{key:"render",value:function(t){var e=this,n=t.map(function(t){return{function:function(){return e.insertBlock(t)}}});return d.default.sequence(n)}},{key:"insertBlock",value:(n=(0,i.default)(o.default.mark(function t(e){var n,r,i,a,s,u,c,l,f;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.Editor,r=n.Tools,i=n.BlockManager,a=e.type,s=e.data,u=e.settings,!(a in r.available)){t.next=15;break}t.prev=5,i.insert(a,s,u),t.next=13;break;case 9:throw t.prev=9,t.t0=t.catch(5),d.default.log("Block «".concat(a,"» skipped because of plugins error"),"warn",s),Error(t.t0);case 13:t.next=20;break;case 15:c={savedData:{type:a,data:s},title:a},a in r.unavailable&&(l=r.unavailable[a].toolbox,f=r.getToolSettings(a).toolbox,c.title=l.title||f.title||c.title),i.insert(r.stubTool,c,u).stretched=!0,d.default.log("Tool «".concat(a,"» is not found. Check 'tools' property at your initial CodeX Editor config."),"warn");case 20:case"end":return t.stop()}},t,this,[[5,9]])})),function(t){return n.apply(this,arguments)})}]),e}(f.default);r.default=h,h.displayName="Renderer",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(71),n(55),n(1),n(2),n(6),n(7),n(5),n(4),n(18),n(346)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p){"use strict";var h=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=h(o),i=h(i),a=h(a),s=h(s),u=h(u),c=h(c),l=h(l),f=h(f),d=h(d),p=h(p);var v=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,u.default)(this,(0,c.default)(e).apply(this,arguments))).configCache={},t.inlineToolsConfigCache=null,t}return(0,l.default)(e,t),(0,s.default)(e,[{key:"sanitizeBlocks",value:function(t){var e=this;return t.map(function(t){var n=e.composeToolConfig(t.tool);return d.default.isEmpty(n)?t:(t.data=e.deepSanitize(t.data,n),t)})}},{key:"deepSanitize",value:function(t,e){return Array.isArray(t)?this.cleanArray(t,e):"object"===(0,i.default)(t)?this.cleanObject(t,e):"string"==typeof t?this.cleanOneItem(t,e):t}},{key:"clean",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={tags:e},r=this.createHTMLJanitorInstance(n);return r.clean(t)}},{key:"composeToolConfig",value:function(t){if(this.configCache[t])return this.configCache[t];var e=this.Editor.Tools.apiSettings.SANITIZE_CONFIG,n=this.Editor.Tools.available[t],r=this.getInlineToolsConfig(t);if(!n.sanitize||n[e]&&d.default.isEmpty(n[e]))return r;var o=n.sanitize,a={};for(var s in o)if(o.hasOwnProperty(s)){var u=o[s];"object"===(0,i.default)(u)?a[s]=Object.assign({},r,u):a[s]=u}return this.configCache[t]=a,a}},{key:"getInlineToolsConfig",value:function(t){var e=this.Editor.Tools,n=e.getToolSettings(t),r=n.inlineToolbar||[],o={};return"boolean"==typeof r&&r?o=this.getAllInlineToolsConfig():r.map(function(t){o=Object.assign(o,e.inline[t][e.apiSettings.SANITIZE_CONFIG])}),o}},{key:"getAllInlineToolsConfig",value:function(){var t=this.Editor.Tools;if(this.inlineToolsConfigCache)return this.inlineToolsConfigCache;var e={};return Object.entries(t.inline).forEach(function(n){var r=(0,o.default)(n,2),i=(r[0],r[1]);Object.assign(e,i[t.apiSettings.SANITIZE_CONFIG])}),this.inlineToolsConfigCache=e,this.inlineToolsConfigCache}},{key:"cleanArray",value:function(t,e){var n=this;return t.map(function(t){return n.deepSanitize(t,e)})}},{key:"cleanObject",value:function(t,e){var n={};for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],i=this.isRule(e[r])?e[r]:e;n[r]=this.deepSanitize(o,i)}return n}},{key:"cleanOneItem",value:function(t,e){return"object"===(0,i.default)(e)?this.clean(t,e):!1===e?this.clean(t,{}):t}},{key:"isRule",value:function(t){return"object"===(0,i.default)(t)||"boolean"==typeof t||"function"==typeof t} +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.CodexEditor=e():t.CodexEditor=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=160)}([function(t,e,n){var r=n(9),o=n(16),i=n(22),a=n(19),s=n(31),u=function(t,e,n){var c,l,f,d,p=t&u.F,h=t&u.G,v=t&u.S,g=t&u.P,y=t&u.B,b=h?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,m=h?o:o[e]||(o[e]={}),k=m.prototype||(m.prototype={});for(c in h&&(n=e),n)f=((l=!p&&b&&void 0!==b[c])?b:n)[c],d=y&&l?s(f,r):g&&"function"==typeof f?s(Function.call,f):f,b&&a(b,c,f,t&u.U),m[c]!=f&&i(m,c,d),g&&k[c]!=f&&(k[c]=f)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=document.createElement(t);for(var a in Array.isArray(n)?(e=o.classList).add.apply(e,(0,i.default)(n)):n&&o.classList.add(n),r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o}},{key:"text",value:function(t){return document.createTextNode(t)}},{key:"svg",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:14,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:14,r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.classList.add("icon","icon--"+t),r.setAttribute("width",e+"px"),r.setAttribute("height",n+"px"),r.innerHTML=''),r}},{key:"append",value:function(t,e){Array.isArray(e)?e.forEach(function(e){return t.appendChild(e)}):t.appendChild(e)}},{key:"prepend",value:function(t,e){Array.isArray(e)?(e=e.reverse()).forEach(function(e){return t.prepend(e)}):t.prepend(e)}},{key:"swap",value:function(t,e){var n=document.createElement("div"),r=t.parentNode;r.insertBefore(n,t),r.insertBefore(t,e),r.insertBefore(e,n),r.removeChild(n)}},{key:"find",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelector(e)}},{key:"get",value:function(t){return document.getElementById(t)}},{key:"findAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelectorAll(e)}},{key:"getDeepestNode",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=n?"lastChild":"firstChild",o=n?"previousSibling":"nextSibling";if(e&&e.nodeType===Node.ELEMENT_NODE&&e[r]){var i=e[r];if(t.isSingleTag(i)&&!t.isNativeInput(i))if(i[o])i=i[o];else{if(!i.parentNode[o])return i.parentNode;i=i.parentNode[o]}return this.getDeepestNode(i,n)}return e}},{key:"isElement",value:function(t){return t&&"object"===(0,o.default)(t)&&t.nodeType&&t.nodeType===Node.ELEMENT_NODE}},{key:"isFragment",value:function(t){return t&&"object"===(0,o.default)(t)&&t.nodeType&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE}},{key:"isContentEditable",value:function(t){return"true"===t.contentEditable}},{key:"isNativeInput",value:function(t){return!(!t||!t.tagName)&&["INPUT","TEXTAREA"].includes(t.tagName)}},{key:"canSetCaret",value:function(e){var n=!0;if(t.isNativeInput(e)){var r=e;switch(r.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":n=!1}}else n=t.isContentEditable(e);return n}},{key:"isNodeEmpty",value:function(t){return!this.isSingleTag(t)&&0===(this.isElement(t)&&this.isNativeInput(t)?t.value:t.textContent.replace("​","")).trim().length}},{key:"isLeaf",value:function(t){return!!t&&0===t.childNodes.length}},{key:"isEmpty",value:function(t){var e=this,n=[],r=[];if(!t)return!0;if(!t.childNodes.length)return this.isNodeEmpty(t);for(n.push(t.firstChild);n.length>0;)if(t=n.shift()){for(this.isLeaf(t)?r.push(t):n.push(t.firstChild);t&&t.nextSibling;)(t=t.nextSibling)&&n.push(t);if(t&&!this.isNodeEmpty(t))return!1}return r.every(function(t){return e.isNodeEmpty(t)})}},{key:"isHTMLString",value:function(e){var n=t.make("div");return n.innerHTML=e,n.childElementCount>0}},{key:"getContentLength",value:function(e){return t.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent.length}},{key:"blockElements",get:function(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tr","tfoot","ul","video"]}}]),t}();r.default=c,c.displayName="Dom",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(11),o=n(98),i=n(37),a=Object.defineProperty;e.f=n(15)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(35),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u){"use strict";var c=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=c(o),i=c(i),a=c(a),s=c(s),u=c(u);var l=function(){function t(){(0,a.default)(this,t)}var e;return(0,s.default)(t,null,[{key:"log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"color: inherit";if("console"in window&&window.console[e]){var o="Editor.js ".concat("2.7.19"),i="line-height: 1em;\n color: #006FEA;\n display: inline-block;\n font-size: 11px;\n line-height: 1em;\n background-color: #fff;\n padding: 4px 9px;\n border-radius: 30px;\n border: 1px solid rgba(56, 138, 229, 0.16);\n margin: 4px 5px 4px 0;";try{["time","timeEnd"].includes(e)?console[e]("( ".concat(o," ) ").concat(t)):n?console[e]("%c".concat(o,"%c ").concat(t," %o"),i,r,n):console[e]("%c".concat(o,"%c ").concat(t),i,r)}catch(t){}}}},{key:"sequence",value:(e=(0,i.default)(o.default.mark(function t(e){var n,r,a,s,u=arguments;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=function(){return(s=(0,i.default)(o.default.mark(function t(e,n,r){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.function(e.data);case 3:return t.next=5,n(void 0!==e.data?e.data:{});case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),r(void 0!==e.data?e.data:{});case 10:case"end":return t.stop()}},t,this,[[0,7]])}))).apply(this,arguments)},a=function(t,e,n){return s.apply(this,arguments)},n=u.length>1&&void 0!==u[1]?u[1]:function(){},r=u.length>2&&void 0!==u[2]?u[2]:function(){},t.next=6,e.reduce(function(){var t=(0,i.default)(o.default.mark(function t(e,i){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return t.abrupt("return",a(i,n,r));case 3:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),Promise.resolve());case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"array",value:function(t){return Array.prototype.slice.call(t)}},{key:"isFunction",value:function(t){return"function"==typeof t}},{key:"isClass",value:function(t){return"function"==typeof t&&/^\s*class\s+/.test(t.toString())}},{key:"isEmpty",value:function(t){return!t||0===Object.keys(t).length&&t.constructor===Object}},{key:"isPromise",value:function(t){return Promise.resolve(t)===t}},{key:"delay",value:function(t,e){return function(){var n=this,r=arguments;window.setTimeout(function(){return t.apply(n,r)},e)}}},{key:"getFileExtension",value:function(t){return t.name.split(".").pop()}},{key:"isValidMimeType",value:function(t){return/^[-\w]+\/([-+\w]+|\*)$/.test(t)}},{key:"debounce",value:function(t,e,n){var r,o=this,i=arguments;return function(){var a=o,s=i,u=n&&!r;window.clearTimeout(r),r=window.setTimeout(function(){r=null,n||t.apply(a,s)},e),u&&t.apply(a,s)}}},{key:"copyTextToClipboard",value:function(t){var e=u.default.make("div","codex-editor-clipboard",{innerHTML:t});document.body.appendChild(e);var n=window.getSelection(),r=document.createRange();r.selectNode(e),window.getSelection().removeAllRanges(),n.addRange(r),document.execCommand("copy"),document.body.removeChild(e)}},{key:"keyCodes",get:function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91}}}]),t}();r.default=l,l.displayName="Util",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(9),o=n(22),i=n(21),a=n(40)("src"),s=Function.toString,u=(""+s).split("toString");n(16).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,n){var r=n(0),o=n(8),i=n(34),a=/"/g,s=function(t,e,n,r){var o=String(i(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+o+""};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*o(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(14),o=n(39);t.exports=n(15)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(57),o=n(34);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(34);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var r=n(58),o=n(39),i=n(23),a=n(37),s=n(21),u=n(98),c=Object.getOwnPropertyDescriptor;e.f=n(15)?c:function(t,e){if(t=i(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(0),o=n(16),i=n(8);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(31),o=n(57),i=n(24),a=n(17),s=n(255);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,l=4==t,f=6==t,d=5==t||f,p=e||s;return function(e,s,h){for(var v,g,y=i(e),b=o(y),m=r(s,h,3),k=a(b.length),x=0,w=n?p(e,k):u?p(e,0):void 0;k>x;x++)if((d||x in b)&&(g=m(v=b[x],x,y),t))if(n)w[x]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(l)return!1;return f?-1:c||l?l:w}}},function(t,e,n){t.exports=n(333)},function(t,e){function n(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise(function(o,i){var a=t.apply(e,r);function s(t){n(a,o,i,s,u,"next",t)}function u(t){n(a,o,i,s,u,"throw",t)}s(void 0)})}}},function(t,e,n){var r=n(32);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){"use strict";if(n(15)){var r=n(41),o=n(9),i=n(8),a=n(0),s=n(69),u=n(97),c=n(31),l=n(52),f=n(39),d=n(22),p=n(53),h=n(35),v=n(17),g=n(123),y=n(43),b=n(37),m=n(21),k=n(61),x=n(10),w=n(24),S=n(90),E=n(44),T=n(46),_=n(45).f,C=n(92),B=n(40),N=n(12),I=n(28),O=n(59),A=n(66),M=n(94),L=n(49),P=n(63),j=n(51),F=n(93),R=n(115),D=n(14),U=n(26),z=D.f,H=U.f,G=o.RangeError,W=o.TypeError,V=o.Uint8Array,K=Array.prototype,q=u.ArrayBuffer,Y=u.DataView,X=I(0),J=I(2),$=I(3),Z=I(4),Q=I(5),tt=I(6),et=O(!0),nt=O(!1),rt=M.values,ot=M.keys,it=M.entries,at=K.lastIndexOf,st=K.reduce,ut=K.reduceRight,ct=K.join,lt=K.sort,ft=K.slice,dt=K.toString,pt=K.toLocaleString,ht=N("iterator"),vt=N("toStringTag"),gt=B("typed_constructor"),yt=B("def_constructor"),bt=s.CONSTR,mt=s.TYPED,kt=s.VIEW,xt=I(1,function(t,e){return _t(A(t,t[yt]),e)}),wt=i(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),St=!!V&&!!V.prototype.set&&i(function(){new V(1).set({})}),Et=function(t,e){var n=h(t);if(n<0||n%e)throw G("Wrong offset!");return n},Tt=function(t){if(x(t)&&mt in t)return t;throw W(t+" is not a typed array!")},_t=function(t,e){if(!(x(t)&> in t))throw W("It is not a typed array constructor!");return new t(e)},Ct=function(t,e){return Bt(A(t,t[yt]),e)},Bt=function(t,e){for(var n=0,r=e.length,o=_t(t,r);r>n;)o[n]=e[n++];return o},Nt=function(t,e,n){z(t,e,{get:function(){return this._d[n]}})},It=function(t){var e,n,r,o,i,a,s=w(t),u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,d=C(s);if(null!=d&&!S(d)){for(a=d.call(s),r=[],e=0;!(i=a.next()).done;e++)r.push(i.value);s=r}for(f&&u>2&&(l=c(l,arguments[2],2)),e=0,n=v(s.length),o=_t(this,n);n>e;e++)o[e]=f?l(s[e],e):s[e];return o},Ot=function(){for(var t=0,e=arguments.length,n=_t(this,e);e>t;)n[t]=arguments[t++];return n},At=!!V&&i(function(){pt.call(new V(1))}),Mt=function(){return pt.apply(At?ft.call(Tt(this)):Tt(this),arguments)},Lt={copyWithin:function(t,e){return R.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return F.apply(Tt(this),arguments)},filter:function(t){return Ct(this,J(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){X(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(Tt(this),arguments)},lastIndexOf:function(t){return at.apply(Tt(this),arguments)},map:function(t){return xt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Tt(this),arguments)},reduceRight:function(t){return ut.apply(Tt(this),arguments)},reverse:function(){for(var t,e=Tt(this).length,n=Math.floor(e/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return lt.call(Tt(this),t)},subarray:function(t,e){var n=Tt(this),r=n.length,o=y(t,r);return new(A(n,n[yt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,v((void 0===e?r:y(e,r))-o))}},Pt=function(t,e){return Ct(this,ft.call(Tt(this),t,e))},jt=function(t){Tt(this);var e=Et(arguments[1],1),n=this.length,r=w(t),o=v(r.length),i=0;if(o+e>n)throw G("Wrong length!");for(;i255?255:255&r),o.v[p](n*e+o.o,r,wt)}(this,n,t)},enumerable:!0})};m?(h=n(function(t,n,r,o){l(t,h,c,"_d");var i,a,s,u,f=0,p=0;if(x(n)){if(!(n instanceof q||"ArrayBuffer"==(u=k(n))||"SharedArrayBuffer"==u))return mt in n?Bt(h,n):It.call(h,n);i=n,p=Et(r,e);var y=n.byteLength;if(void 0===o){if(y%e)throw G("Wrong length!");if((a=y-p)<0)throw G("Wrong length!")}else if((a=v(o)*e)+p>y)throw G("Wrong length!");s=a/e}else s=g(n),i=new q(a=s*e);for(d(t,"_d",{b:i,o:p,l:a,e:s,v:new Y(i)});fdocument.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(100),o=n(77).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(21),o=n(24),i=n(76)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a){"use strict";var s=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=s(o),i=s(i),a=s(a);var u=function(){function t(){(0,o.default)(this,t),this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}return(0,i.default)(t,[{key:"removeFakeBackground",value:function(){if(this.isFakeBackgroundEnabled){var t=this.findParentTag("SPAN");t.style.paddingTop="",this.isFakeBackgroundEnabled=!1,document.execCommand(this.commandRemoveFormat)}}},{key:"setFakeBackground",value:function(){document.execCommand(this.commandBackground,!1,"#a8d6ff");var t=this.findParentTag("SPAN");t.style.paddingTop="0.30em",this.isFakeBackgroundEnabled=!0}},{key:"save",value:function(){this.savedSelectionRange=t.range}},{key:"restore",value:function(){if(this.savedSelectionRange){var t=window.getSelection();t.removeAllRanges(),t.addRange(this.savedSelectionRange)}}},{key:"clearSaved",value:function(){this.savedSelectionRange=null}},{key:"findParentTag",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=window.getSelection(),o=null;if(!r||!r.anchorNode||!r.focusNode)return null;var i=[r.anchorNode,r.focusNode];return i.forEach(function(r){for(var i=n;i>0&&r.parentNode&&(r.tagName!==t||(o=r,e&&r.classList&&!r.classList.contains(e)&&(o=null),!o));)r=r.parentNode,i--}),o}},{key:"expandToTag",value:function(t){var e=window.getSelection();e.removeAllRanges();var n=document.createRange();n.selectNodeContents(t),e.addRange(n)}}],[{key:"get",value:function(){return window.getSelection()}},{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}},{key:"anchorNode",get:function(){var t=window.getSelection();return t?t.anchorNode:null}},{key:"anchorOffset",get:function(){var t=window.getSelection();return t?t.anchorOffset:null}},{key:"isCollapsed",get:function(){var t=window.getSelection();return t?t.isCollapsed:null}},{key:"isAtEditor",get:function(){var e=t.get(),n=e.anchorNode||e.focusNode;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var r=null;return n&&(r=n.closest(".".concat(t.CSS.editorZone))),r&&r.nodeType===Node.ELEMENT_NODE}},{key:"range",get:function(){var t=window.getSelection();return t&&t.rangeCount?t.getRangeAt(0):null}},{key:"rect",get:function(){var t,e=document.selection,n={x:0,y:0,width:0,height:0};if(e&&"Control"!==e.type)return t=(e=e).createRange(),n.x=t.boundingLeft,n.y=t.boundingTop,n.width=t.boundingWidth,n.height=t.boundingHeight,n;if(!window.getSelection)return a.default.log("Method window.getSelection is not supported","warn"),n;if(null===(e=window.getSelection()).rangeCount||isNaN(e.rangeCount))return a.default.log("Method SelectionUtils.rangeCount is not supported","warn"),n;if((t=e.getRangeAt(0).cloneRange()).getBoundingClientRect&&(n=t.getBoundingClientRect()),0===n.x&&0===n.y){var r=document.createElement("span");if(r.getBoundingClientRect){r.appendChild(document.createTextNode("​")),t.insertNode(r),n=r.getBoundingClientRect();var o=r.parentNode;o.removeChild(r),o.normalize()}}return n}},{key:"text",get:function(){return window.getSelection?window.getSelection().toString():""}}]),t}();r.default=u,u.displayName="SelectionUtils",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(14).f,o=n(21),i=n(12)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e){t.exports={}},function(t,e,n){var r=n(12)("unscopables"),o=Array.prototype;null==o[r]&&n(22)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e,n){"use strict";var r=n(9),o=n(14),i=n(15),a=n(12)("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(19);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){var r=n(10);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(47),n(7),n(13),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d){"use strict";var p=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=p(o),i=p(i),a=p(a),s=p(s),u=p(u),c=p(c),l=p(l),f=p(f),d=p(d);var h=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"setToBlock",value:function(t){var n,r=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.positions.DEFAULT,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=this.Editor.BlockManager;switch(o){case e.positions.START:n=t.firstInput;break;case e.positions.END:n=t.lastInput;break;default:n=t.currentInput}if(n){var s=f.default.getDeepestNode(n,o===e.positions.END),u=f.default.getContentLength(s);switch(!0){case o===e.positions.START:i=0;break;case o===e.positions.END:case i>u:i=u}d.default.delay(function(){r.set(s,i)},20)(),a.setCurrentBlockByChildNode(t.holder),a.currentBlock.currentInput=n}}},{key:"setToInput",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.positions.DEFAULT,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.Editor.BlockManager.currentBlock,i=f.default.getDeepestNode(t);switch(n){case e.positions.START:this.set(i,0);break;case e.positions.END:var a=f.default.getContentLength(i);this.set(i,a);break;default:r&&this.set(i,r)}o.currentInput=t}},{key:"set",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.createRange(),r=c.default.get();if(f.default.isNativeInput(t)){if(!f.default.canSetCaret(t))return;return t.focus(),void(t.selectionStart=t.selectionEnd=e)}n.setStart(t,e),n.setEnd(t,e),r.removeAllRanges(),r.addRange(n);var o=n.getBoundingClientRect(),i=o.top,a=o.bottom,s=window,u=s.innerHeight;i<0&&window.scrollBy(0,i),a>u&&window.scrollBy(0,a-u)}},{key:"setToTheLastBlock",value:function(){var t=this.Editor.BlockManager.lastBlock;if(t)if(t.isEmpty)this.setToBlock(t);else{var e=this.Editor.BlockManager.insertAtEnd();this.setToBlock(e)}}},{key:"extractFragmentFromCaretPosition",value:function(){var t=c.default.get();if(t.rangeCount){var e=t.getRangeAt(0),n=this.Editor.BlockManager.currentBlock.currentInput;if(e.deleteContents(),n){var r=e.cloneRange();return r.selectNodeContents(n),r.setStart(e.endContainer,e.endOffset),r.extractContents()}}}},{key:"navigateNext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.Editor.BlockManager,r=n.currentBlock,o=n.nextContentfulBlock,i=r.nextInput;return!(!o&&!i||(t?(this.setToBlock(o,e.positions.START),0):!this.isAtEnd||(i?this.setToInput(i,e.positions.START):this.setToBlock(o,e.positions.START),0)))}},{key:"navigatePrevious",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.Editor.BlockManager,r=n.currentBlock,o=n.previousContentfulBlock;if(!r)return!1;var i=r.previousInput;return!(!o&&!i||(t?(this.setToBlock(o,e.positions.END),0):!this.isAtStart||(i?this.setToInput(i,e.positions.END):this.setToBlock(o,e.positions.END),0)))}},{key:"createShadow",value:function(t){var n=document.createElement("span");n.classList.add(e.CSS.shadowCaret),t.insertAdjacentElement("beforeEnd",n)}},{key:"restoreCaret",value:function(t){var n=t.querySelector(".".concat(e.CSS.shadowCaret));if(n){var r=new c.default;r.expandToTag(n),setTimeout(function(){var t=document.createRange();t.selectNode(n),t.extractContents()},50)}}},{key:"getHigherLevelSiblings",value:function(t,e){for(var n=t,r=[];n.parentNode&&"true"!==n.parentNode.contentEditable;)n=n.parentNode;for(var o="left"===e?"previousSibling":"nextSibling";n[o];)n=n[o],r.push(n);return r}},{key:"isAtStart",get:function(){if(!c.default.isCollapsed)return!1;var t=c.default.get(),e=t.anchorNode,n=f.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput);if(f.default.isNativeInput(n))return 0===n.selectionEnd;var r=e.textContent.search(/\S/);if(-1===r&&(r=0),f.default.isEmpty(n)){var o=this.getHigherLevelSiblings(e,"left"),i=o.every(function(t){return f.default.isEmpty(t)});if(i&&t.anchorOffset===r)return!0}return null===n||e===n&&t.anchorOffset<=r}},{key:"isAtEnd",get:function(){if(!c.default.isCollapsed)return!1;var t=c.default.get(),e=t.anchorNode,n=f.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput,!0);if(f.default.isNativeInput(n))return n.selectionEnd===n.value.length;if(f.default.isEmpty(n)){var r=this.getHigherLevelSiblings(e,"right"),o=r.every(function(t){return f.default.isEmpty(t)});if(o&&t.anchorOffset===e.textContent.length)return!0}var i=n.textContent.replace(/\s+$/,"");return e===n&&t.anchorOffset>=i.length}}],[{key:"positions",get:function(){return{START:"start",END:"end",DEFAULT:"default"}}},{key:"CSS",get:function(){return{shadowCaret:"cdx-shadow-caret"}}}]),e}(l.default);r.default=h,h.displayName="Caret",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(33);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(23),o=n(17),i=n(43);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=o(u.length),l=i(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(33),o=n(12)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(0),o=n(34),i=n(8),a=n(81),s="["+a+"]",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),l=function(t,e,n){var o={},s=i(function(){return!!a[t]()||"​…"!="​…"[t]()}),u=o[t]=s?e(f):a[t];n&&(o[n]=u),r(r.P+r.F*s,"String",o)},f=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(c,"")),t};t.exports=l},function(t,e,n){var r=n(12)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(22),o=n(19),i=n(8),a=n(34),s=n(12);t.exports=function(t,e,n){var u=s(t),c=n(a,u,""[t]),l=c[0],f=c[1];i(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,l),r(RegExp.prototype,u,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},function(t,e,n){var r=n(31),o=n(113),i=n(90),a=n(11),s=n(17),u=n(92),c={},l={};(e=t.exports=function(t,e,n,f,d){var p,h,v,g,y=d?function(){return t}:u(t),b=r(n,f,e?2:1),m=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(p=s(t.length);p>m;m++)if((g=e?b(a(h=t[m])[0],h[1]):b(t[m]))===c||g===l)return g}else for(v=y.call(t);!(h=v.next()).done;)if((g=o(v,b,h.value,e))===c||g===l)return g}).BREAK=c,e.RETURN=l},function(t,e,n){var r=n(11),o=n(32),i=n(12)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r=n(9).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){"use strict";var r=n(9),o=n(0),i=n(19),a=n(53),s=n(38),u=n(65),c=n(52),l=n(10),f=n(8),d=n(63),p=n(48),h=n(82);t.exports=function(t,e,n,v,g,y){var b=r[t],m=b,k=g?"set":"add",x=m&&m.prototype,w={},S=function(t){var e=x[t];i(x,t,"delete"==t?function(t){return!(y&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof m&&(y||x.forEach&&!f(function(){(new m).entries().next()}))){var E=new m,T=E[k](y?{}:-0,1)!=E,_=f(function(){E.has(1)}),C=d(function(t){new m(t)}),B=!y&&f(function(){for(var t=new m,e=5;e--;)t[k](e,e);return!t.has(-0)});C||((m=e(function(e,n){c(e,m,t);var r=h(new b,e,m);return null!=n&&u(n,g,r[k],r),r})).prototype=x,x.constructor=m),(_||B)&&(S("delete"),S("has"),g&&S("get")),(B||T)&&S(k),y&&x.clear&&delete x.clear}else m=v.getConstructor(e,t,g,k),a(m.prototype,n),s.NEED=!0;return p(m,t),w[t]=m,o(o.G+o.W+o.F*(m!=b),w),y||v.setStrong(m,t,g),m}},function(t,e,n){for(var r,o=n(9),i=n(22),a=n(40),s=a("typed_array"),u=a("view"),c=!(!o.ArrayBuffer||!o.DataView),l=c,f=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(r=o[d[f++]])?(i(r.prototype,s,!0),i(r.prototype,u,!0)):l=!1;t.exports={ABV:c,CONSTR:l,TYPED:s,VIEW:u}},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"methods",get:function(){return{blocks:this.Editor.BlocksAPI.methods,caret:this.Editor.CaretAPI.methods,events:this.Editor.EventsAPI.methods,listeners:this.Editor.ListenersAPI.methods,notifier:this.Editor.NotifierAPI.methods,sanitizer:this.Editor.SanitizerAPI.methods,saver:this.Editor.SaverAPI.methods,selection:this.Editor.SelectionAPI.methods,styles:this.Editor.StylesAPI.classes,toolbar:this.Editor.ToolbarAPI.methods}}}]),e}((c=l(c)).default);r.default=f,f.displayName="API",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(346),o=n(347),i=n(348);t.exports=function(t,e){return r(t)||o(t,e)||i()}},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l){"use strict";var f=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=f(o),i=f(i),a=f(a),s=f(s),u=f(u),c=f(c),l=f(l);var d=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).nodes={wrapper:null,content:null,actions:null,plusButton:null,blockActionsButtons:null,settingsToggler:null},t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"make",value:function(){var t=this;this.nodes.wrapper=l.default.make("div",e.CSS.toolbar),["content","actions"].forEach(function(n){t.nodes[n]=l.default.make("div",e.CSS[n]),l.default.append(t.nodes.wrapper,t.nodes[n])}),this.nodes.plusButton=l.default.make("div",e.CSS.plusButton),l.default.append(this.nodes.plusButton,l.default.svg("plus",14,14)),l.default.append(this.nodes.content,this.nodes.plusButton),this.Editor.Listeners.on(this.nodes.plusButton,"click",function(){return t.plusButtonClicked()},!1),this.Editor.Toolbox.make(),this.nodes.blockActionsButtons=l.default.make("div",e.CSS.blockActionsButtons),this.nodes.settingsToggler=l.default.make("span",e.CSS.settingsToggler);var n=l.default.svg("dots",18,4);l.default.append(this.nodes.settingsToggler,n),l.default.append(this.nodes.blockActionsButtons,this.nodes.settingsToggler),l.default.append(this.nodes.actions,this.nodes.blockActionsButtons),this.Editor.BlockSettings.make(),l.default.append(this.nodes.actions,this.Editor.BlockSettings.nodes.wrapper),l.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.bindEvents()}},{key:"move",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t&&(this.Editor.Toolbox.close(),this.Editor.BlockSettings.close());var e=this.Editor.BlockManager.currentBlock.holder;if(e){var n=Math.floor(e.offsetHeight/2);this.nodes.plusButton.style.transform="translate3d(0, calc(".concat(n,"px - 50%), 0)"),this.Editor.Toolbox.nodes.toolbox.style.transform="translate3d(0, calc(".concat(n,"px - 50%), 0)"),this.nodes.wrapper.style.transform="translate3D(0, ".concat(Math.floor(e.offsetTop),"px, 0)")}}},{key:"open",value:function(){var t=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];setTimeout(function(){t.move(r),t.nodes.wrapper.classList.add(e.CSS.toolbarOpened),n?t.blockActions.show():t.blockActions.hide()},50)}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(e.CSS.toolbarOpened),this.blockActions.hide(),this.Editor.Toolbox.close(),this.Editor.BlockSettings.close()}},{key:"plusButtonClicked",value:function(){this.Editor.Toolbox.toggle()}},{key:"bindEvents",value:function(){var t=this;this.Editor.Listeners.on(this.nodes.settingsToggler,"click",function(){return t.settingsTogglerClicked()})}},{key:"settingsTogglerClicked",value:function(){this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open()}},{key:"opened",get:function(){return this.nodes.wrapper.classList.contains(e.CSS.toolbarOpened)}},{key:"plusButton",get:function(){var t=this;return{hide:function(){return t.nodes.plusButton.classList.add(e.CSS.plusButtonHidden)},show:function(){t.Editor.Toolbox.isEmpty||t.nodes.plusButton.classList.remove(e.CSS.plusButtonHidden)}}}},{key:"blockActions",get:function(){var t=this;return{hide:function(){t.nodes.actions.classList.remove(e.CSS.actionsOpened)},show:function(){t.nodes.actions.classList.add(e.CSS.actionsOpened)}}}}],[{key:"CSS",get:function(){return{toolbar:"ce-toolbar",content:"ce-toolbar__content",actions:"ce-toolbar__actions",actionsOpened:"ce-toolbar__actions--opened",toolbarOpened:"ce-toolbar--opened",plusButton:"ce-toolbar__plus",plusButtonHidden:"ce-toolbar__plus--hidden",blockActionsButtons:"ce-toolbar__actions-buttons",settingsToggler:"ce-toolbar__settings-btn"}}}]),e}(c.default);r.default=d,d.displayName="Toolbar",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=n(10),o=n(9).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(16),o=n(9),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(41)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){e.f=n(12)},function(t,e,n){var r=n(74)("keys"),o=n(40);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(33);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(9).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(10),o=n(11),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(31)(Function.call,n(26).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var r=n(10),o=n(80).set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){"use strict";var r=n(35),o=n(34);t.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){"use strict";var r=n(41),o=n(0),i=n(19),a=n(22),s=n(49),u=n(112),c=n(48),l=n(46),f=n(12)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,h,v,g,y){u(n,e,h);var b,m,k,x=function(t){if(!d&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",S="values"==v,E=!1,T=t.prototype,_=T[f]||T["@@iterator"]||v&&T[v],C=_||x(v),B=v?S?x("entries"):C:void 0,N="Array"==e&&T.entries||_;if(N&&(k=l(N.call(new t)))!==Object.prototype&&k.next&&(c(k,w,!0),r||"function"==typeof k[f]||a(k,f,p)),S&&_&&"values"!==_.name&&(E=!0,C=function(){return _.call(this)}),r&&!y||!d&&!E&&T[f]||a(T,f,C),s[e]=C,s[w]=p,v)if(b={values:S?C:x("values"),keys:g?C:x("keys"),entries:B},y)for(m in b)m in T||i(T,m,b[m]);else o(o.P+o.F*(d||E),e,b);return b}},function(t,e,n){var r=n(88),o=n(34);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},function(t,e,n){var r=n(10),o=n(33),i=n(12)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(12)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(49),o=n(12)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){"use strict";var r=n(14),o=n(39);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){var r=n(61),o=n(12)("iterator"),i=n(49);t.exports=n(16).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){"use strict";var r=n(24),o=n(43),i=n(17);t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:o(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(50),o=n(116),i=n(49),a=n(23);t.exports=n(86)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r=n(11);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r,o,i,a=n(31),s=n(105),u=n(79),c=n(73),l=n(9),f=l.process,d=l.setImmediate,p=l.clearImmediate,h=l.MessageChannel,v=l.Dispatch,g=0,y={},b=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},m=function(t){b.call(t.data)};d&&p||(d=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++g]=function(){s("function"==typeof t?t:Function(t),e)},r(g),g},p=function(t){delete y[t]},"process"==n(33)(f)?r=function(t){f.nextTick(a(b,t,1))}:v&&v.now?r=function(t){v.now(a(b,t,1))}:h?(i=(o=new h).port2,o.port1.onmessage=m,r=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",m,!1)):r="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,t,1),0)}),t.exports={set:d,clear:p}},function(t,e,n){"use strict";var r=n(9),o=n(15),i=n(41),a=n(69),s=n(22),u=n(53),c=n(8),l=n(52),f=n(35),d=n(17),p=n(123),h=n(45).f,v=n(14).f,g=n(93),y=n(48),b="prototype",m="Wrong index!",k=r.ArrayBuffer,x=r.DataView,w=r.Math,S=r.RangeError,E=r.Infinity,T=k,_=w.abs,C=w.pow,B=w.floor,N=w.log,I=w.LN2,O=o?"_b":"buffer",A=o?"_l":"byteLength",M=o?"_o":"byteOffset";function L(t,e,n){var r,o,i,a=new Array(n),s=8*n-e-1,u=(1<>1,l=23===e?C(2,-24)-C(2,-77):0,f=0,d=t<0||0===t&&1/t<0?1:0;for((t=_(t))!=t||t===E?(o=t!=t?1:0,r=u):(r=B(N(t)/I),t*(i=C(2,-r))<1&&(r--,i*=2),(t+=r+c>=1?l/i:l*C(2,1-c))*i>=2&&(r++,i/=2),r+c>=u?(o=0,r=u):r+c>=1?(o=(t*i-1)*C(2,e),r+=c):(o=t*C(2,c-1)*C(2,e),r=0));e>=8;a[f++]=255&o,o/=256,e-=8);for(r=r<0;a[f++]=255&r,r/=256,s-=8);return a[--f]|=128*d,a}function P(t,e,n){var r,o=8*n-e-1,i=(1<>1,s=o-7,u=n-1,c=t[u--],l=127&c;for(c>>=7;s>0;l=256*l+t[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;r=256*r+t[u],u--,s-=8);if(0===l)l=1-a;else{if(l===i)return r?NaN:c?-E:E;r+=C(2,e),l-=a}return(c?-1:1)*r*C(2,l-e)}function j(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function F(t){return[255&t]}function R(t){return[255&t,t>>8&255]}function D(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function U(t){return L(t,52,8)}function z(t){return L(t,23,4)}function H(t,e,n){v(t[b],e,{get:function(){return this[n]}})}function G(t,e,n,r){var o=p(+n);if(o+e>t[A])throw S(m);var i=t[O]._b,a=o+t[M],s=i.slice(a,a+e);return r?s:s.reverse()}function W(t,e,n,r,o,i){var a=p(+n);if(a+e>t[A])throw S(m);for(var s=t[O]._b,u=a+t[M],c=r(+o),l=0;lY;)(V=q[Y++])in k||s(k,V,T[V]);i||(K.constructor=k)}var X=new x(new k(2)),J=x[b].setInt8;X.setInt8(0,2147483648),X.setInt8(1,2147483649),!X.getInt8(0)&&X.getInt8(1)||u(x[b],{setInt8:function(t,e){J.call(this,t,e<<24>>24)},setUint8:function(t,e){J.call(this,t,e<<24>>24)}},!0)}else k=function(t){l(this,k,"ArrayBuffer");var e=p(t);this._b=g.call(new Array(e),0),this[A]=e},x=function(t,e,n){l(this,x,"DataView"),l(t,k,"DataView");var r=t[A],o=f(e);if(o<0||o>r)throw S("Wrong offset!");if(o+(n=void 0===n?r-o:d(n))>r)throw S("Wrong length!");this[O]=t,this[M]=o,this[A]=n},o&&(H(k,"byteLength","_l"),H(x,"buffer","_b"),H(x,"byteLength","_l"),H(x,"byteOffset","_o")),u(x[b],{getInt8:function(t){return G(this,1,t)[0]<<24>>24},getUint8:function(t){return G(this,1,t)[0]},getInt16:function(t){var e=G(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=G(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return j(G(this,4,t,arguments[1]))},getUint32:function(t){return j(G(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return P(G(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return P(G(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){W(this,1,t,F,e)},setUint8:function(t,e){W(this,1,t,F,e)},setInt16:function(t,e){W(this,2,t,R,e,arguments[2])},setUint16:function(t,e){W(this,2,t,R,e,arguments[2])},setInt32:function(t,e){W(this,4,t,D,e,arguments[2])},setUint32:function(t,e){W(this,4,t,D,e,arguments[2])},setFloat32:function(t,e){W(this,4,t,z,e,arguments[2])},setFloat64:function(t,e){W(this,8,t,U,e,arguments[2])}});y(k,"ArrayBuffer"),y(x,"DataView"),s(x[b],a.VIEW,!0),e.ArrayBuffer=k,e.DataView=x},function(t,e,n){t.exports=!n(15)&&!n(8)(function(){return 7!=Object.defineProperty(n(73)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(9),o=n(16),i=n(41),a=n(75),s=n(14).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(21),o=n(23),i=n(59)(!1),a=n(76)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~i(c,n)||c.push(n));return c}},function(t,e,n){var r=n(14),o=n(11),i=n(42);t.exports=n(15)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){var r=n(23),o=n(45).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},function(t,e,n){"use strict";var r=n(42),o=n(60),i=n(58),a=n(24),s=n(57),u=Object.assign;t.exports=!u||n(8)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=a(t),u=arguments.length,c=1,l=o.f,f=i.f;u>c;)for(var d,p=s(arguments[c++]),h=l?r(p).concat(l(p)):r(p),v=h.length,g=0;v>g;)f.call(p,d=h[g++])&&(n[d]=p[d]);return n}:u},function(t,e,n){"use strict";var r=n(32),o=n(10),i=n(105),a=[].slice,s={};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),u=function(){var r=n.concat(a.call(arguments));return this instanceof u?function(t,e,n){if(!(e in s)){for(var r=[],o=0;o>>0||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(9).parseFloat,o=n(62).trim;t.exports=1/r(n(81)+"-0")!=-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(33);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(10),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var r=n(35),o=n(34);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):i:t?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(44),o=n(39),i=n(48),a={};n(22)(a,n(12)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(11);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(32),o=n(24),i=n(57),a=n(17);t.exports=function(t,e,n,s,u){r(e);var c=o(t),l=i(c),f=a(c.length),d=u?f-1:0,p=u?-1:1;if(n<2)for(;;){if(d in l){s=l[d],d+=p;break}if(d+=p,u?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;u?d>=0:f>d;d+=p)d in l&&(s=e(s,l[d],d,c));return s}},function(t,e,n){"use strict";var r=n(24),o=n(43),i=n(17);t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),s=o(t,a),u=o(e,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:o(c,a))-u,a-s),f=1;for(u0;)u in n?n[s]=n[u]:delete n[s],s+=f,u+=f;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){n(15)&&"g"!=/./g.flags&&n(14).f(RegExp.prototype,"flags",{configurable:!0,get:n(95)})},function(t,e,n){"use strict";var r,o,i,a,s=n(41),u=n(9),c=n(31),l=n(61),f=n(0),d=n(10),p=n(32),h=n(52),v=n(65),g=n(66),y=n(96).set,b=n(276)(),m=n(119),k=n(277),x=n(67),w=n(120),S=u.TypeError,E=u.process,T=E&&E.versions,_=T&&T.v8||"",C=u.Promise,B="process"==l(E),N=function(){},I=o=m.f,O=!!function(){try{var t=C.resolve(1),e=(t.constructor={})[n(12)("species")]=function(t){t(N,N)};return(B||"function"==typeof PromiseRejectionEvent)&&t.then(N)instanceof e&&0!==_.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),A=function(t){var e;return!(!d(t)||"function"!=typeof(e=t.then))&&e},M=function(t,e){if(!t._n){t._n=!0;var n=t._c;b(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(o||(2==t._h&&j(t),t._h=1),!0===s?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),a=!0)),n===e.promise?c(S("Promise-chain cycle")):(i=A(n))?i.call(n,u,c):u(n)):c(r)}catch(t){l&&!a&&l.exit(),c(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&L(t)})}},L=function(t){y.call(u,function(){var e,n,r,o=t._v,i=P(t);if(i&&(e=k(function(){B?E.emit("unhandledRejection",o,t):(n=u.onunhandledrejection)?n({promise:t,reason:o}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=B||P(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},P=function(t){return 1!==t._h&&0===(t._a||t._c).length},j=function(t){y.call(u,function(){var e;B?E.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},F=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),M(e,!0))},R=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=A(t))?b(function(){var r={_w:n,_d:!1};try{e.call(t,c(R,r,1),c(F,r,1))}catch(t){F.call(r,t)}}):(n._v=t,n._s=1,M(n,!1))}catch(t){F.call({_w:n,_d:!1},t)}}};O||(C=function(t){h(this,C,"Promise","_h"),p(t),r.call(this);try{t(c(R,this,1),c(F,this,1))}catch(t){F.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(53)(C.prototype,{then:function(t,e){var n=I(g(this,C));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=B?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&M(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=c(R,t,1),this.reject=c(F,t,1)},m.f=I=function(t){return t===C||t===a?new i(t):o(t)}),f(f.G+f.W+f.F*!O,{Promise:C}),n(48)(C,"Promise"),n(51)("Promise"),a=n(16).Promise,f(f.S+f.F*!O,"Promise",{reject:function(t){var e=I(this);return(0,e.reject)(t),e.promise}}),f(f.S+f.F*(s||!O),"Promise",{resolve:function(t){return w(s&&this===a?C:this,t)}}),f(f.S+f.F*!(O&&n(63)(function(t){C.all(t).catch(N)})),"Promise",{all:function(t){var e=this,n=I(e),r=n.resolve,o=n.reject,i=k(function(){var n=[],i=0,a=1;v(t,!1,function(t){var s=i++,u=!1;n.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=I(e),r=n.reject,o=k(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(t,e,n){"use strict";var r=n(32);function o(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},function(t,e,n){var r=n(11),o=n(10),i=n(119);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(14).f,o=n(44),i=n(53),a=n(31),s=n(52),u=n(65),c=n(86),l=n(116),f=n(51),d=n(15),p=n(38).fastKey,h=n(54),v=d?"_s":"size",g=function(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var l=t(function(t,r){s(t,l,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[v]=0,null!=r&&u(r,n,t[c],t)});return i(l.prototype,{clear:function(){for(var t=h(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=h(this,e),r=g(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[v]--}return!!r},forEach:function(t){h(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(h(this,e),t)}}),d&&r(l.prototype,"size",{get:function(){return h(this,e)[v]}}),l},def:function(t,e,n){var r,o,i=g(t,e);return i?i.v=n:(t._l=i={i:o=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[v]++,"F"!==o&&(t._i[o]=i)),t},getEntry:g,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=h(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?l(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,l(1))},n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var r=n(53),o=n(38).getWeak,i=n(11),a=n(10),s=n(52),u=n(65),c=n(28),l=n(21),f=n(54),d=c(5),p=c(6),h=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,e){return d(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var c=t(function(t,r){s(t,c,e,"_i"),t._t=e,t._i=h++,t._l=void 0,null!=r&&u(r,n,t[i],t)});return r(c.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return!0===n?v(f(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return!0===n?v(f(this,e)).has(t):n&&l(n,this._i)}}),c},def:function(t,e,n){var r=o(i(e),!0);return!0===r?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},function(t,e,n){var r=n(35),o=n(17);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(45),o=n(60),i=n(11),a=n(9).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(17),o=n(83),i=n(34);t.exports=function(t,e,n,a){var s=String(i(t)),u=s.length,c=void 0===n?" ":String(n),l=r(e);if(l<=u||""==c)return s;var f=l-u,d=o.call(c,Math.ceil(f/c.length));return d.length>f&&(d=d.slice(0,f)),a?d+s:s+d}},function(t,e,n){var r=n(42),o=n(23),i=n(58).f;t.exports=function(t){return function(e){for(var n,a=o(e),s=r(a),u=s.length,c=0,l=[];u>c;)i.call(a,n=s[c++])&&l.push(t?[n,a[n]]:a[n]);return l}}},function(t,e,n){var r=n(335),o=n(336),i=n(337);t.exports=function(t){return r(t)||o(t)||i()}},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"getBlocksCount",value:function(){return this.Editor.BlockManager.blocks.length}},{key:"getCurrentBlockIndex",value:function(){return this.Editor.BlockManager.currentBlockIndex}},{key:"getBlockByIndex",value:function(t){var e=this.Editor.BlockManager.getBlockByIndex(t);return e.holder}},{key:"swap",value:function(t,e){this.Editor.BlockManager.swap(t,e),this.Editor.Toolbar.move(!1)}},{key:"delete",value:function(t){this.Editor.BlockManager.removeBlock(t),0===this.Editor.BlockManager.blocks.length&&this.Editor.BlockManager.insert(),0===this.Editor.BlockManager.currentBlockIndex?this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock):this.Editor.Caret.navigatePrevious(!0),this.Editor.Toolbar.close()}},{key:"clear",value:function(){this.Editor.BlockManager.clear(!0)}},{key:"render",value:function(t){return this.Editor.BlockManager.clear(),this.Editor.Renderer.render(t.blocks)}},{key:"stretchBlock",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.Editor.BlockManager.getBlockByIndex(t);n&&(n.stretched=e)}},{key:"insertNewBlock",value:function(){var t=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(t)}},{key:"methods",get:function(){var t=this;return{clear:function(){return t.clear()},render:function(e){return t.render(e)},delete:function(){return t.delete()},swap:function(e,n){return t.swap(e,n)},getBlockByIndex:function(e){return t.getBlockByIndex(e)},getCurrentBlockIndex:function(){return t.getCurrentBlockIndex()},getBlocksCount:function(){return t.getBlocksCount()},stretchBlock:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.stretchBlock(e,n)},insertNewBlock:function(){return t.insertNewBlock()}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="BlocksAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"methods",get:function(){return{}}}]),e}((c=l(c)).default);r.default=f,f.displayName="CaretAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"on",value:function(t,e){this.Editor.Events.on(t,e)}},{key:"emit",value:function(t,e){this.Editor.Events.emit(t,e)}},{key:"off",value:function(t,e){this.Editor.Events.off(t,e)}},{key:"methods",get:function(){var t=this;return{emit:function(e,n){return t.emit(e,n)},off:function(e,n){return t.off(e,n)},on:function(e,n){return t.on(e,n)}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="EventsAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"on",value:function(t,e,n,r){this.Editor.Listeners.on(t,e,n,r)}},{key:"off",value:function(t,e,n){this.Editor.Listeners.off(t,e,n)}},{key:"methods",get:function(){var t=this;return{on:function(e,n,r,o){return t.on(e,n,r,o)},off:function(e,n,r){return t.off(e,n,r)}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="ListenersAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"show",value:function(t){return this.Editor.Notifier.show(t)}},{key:"methods",get:function(){var t=this;return{show:function(e){return t.show(e)}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="NotifierAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"clean",value:function(t,e){return this.Editor.Sanitizer.clean(t,e)}},{key:"methods",get:function(){var t=this;return{clean:function(e,n){return t.clean(e,n)}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="SanitizerAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"save",value:function(){return this.Editor.Saver.save()}},{key:"methods",get:function(){var t=this;return{save:function(){return t.save()}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="SaverAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(47)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l){"use strict";var f=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=f(o),i=f(i),a=f(a),s=f(s),u=f(u),c=f(c),l=f(l);var d=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"findParentTag",value:function(t,e){return(new l.default).findParentTag(t,e)}},{key:"expandToTag",value:function(t){(new l.default).expandToTag(t)}},{key:"methods",get:function(){var t=this;return{findParentTag:function(e,n){return t.findParentTag(e,n)},expandToTag:function(e){return t.expandToTag(e)}}}}]),e}(c.default);r.default=d,d.displayName="SelectionAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"classes",get:function(){return{block:"cdx-block",inlineToolButton:"ce-inline-tool",inlineToolButtonActive:"ce-inline-tool--active",input:"cdx-input",loader:"cdx-loader",button:"cdx-button",settingsButton:"cdx-settings-button",settingsButtonActive:"cdx-settings-button--active"}}}]),e}((c=l(c)).default);r.default=f,f.displayName="StylesAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"open",value:function(){this.Editor.Toolbar.open()}},{key:"close",value:function(){this.Editor.Toolbar.close()}},{key:"methods",get:function(){var t=this;return{close:function(){return t.close()},open:function(){return t.open()}}}}]),e}((c=l(c)).default);r.default=f,f.displayName="ToolbarAPI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(18),n(56)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f){"use strict";var d=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=d(o),i=d(i),a=d(a),s=d(s),u=d(u),c=d(c),l=d(l),f=d(f);var p=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"keydown",value:function(t){switch(this.beforeKeydownProcessing(t),t.keyCode){case l.default.keyCodes.BACKSPACE:this.backspace(t);break;case l.default.keyCodes.ENTER:this.enter(t);break;case l.default.keyCodes.DOWN:case l.default.keyCodes.RIGHT:this.arrowRightAndDown(t);break;case l.default.keyCodes.UP:case l.default.keyCodes.LEFT:this.arrowLeftAndUp(t);break;case l.default.keyCodes.TAB:this.tabPressed(t);break;case l.default.keyCodes.ESC:this.escapePressed(t);break;default:this.defaultHandler()}}},{key:"beforeKeydownProcessing",value:function(t){if(this.needToolbarClosing(t)){this.Editor.Toolbar.close();var e=t.ctrlKey||t.metaKey,n=t.altKey,r=t.shiftKey;e||n||r||(this.Editor.BlockManager.clearFocused(),t.keyCode!==l.default.keyCodes.ENTER&&t.keyCode!==l.default.keyCodes.BACKSPACE&&this.Editor.BlockSelection.clearSelection(!0))}}},{key:"keyup",value:function(t){this.Editor.InlineToolbar.handleShowingEvent(t)}},{key:"mouseUp",value:function(t){this.Editor.InlineToolbar.handleShowingEvent(t)}},{key:"tabPressed",value:function(t){var e=this.Editor.BlockManager.currentBlock;t.preventDefault(),t.stopPropagation();var n=t.shiftKey,r=n?"left":"right";this.Editor.Tools.isInitial(e.tool)&&(e.isEmpty&&(this.Editor.Toolbar.opened||(this.Editor.Toolbar.open(!1,!1),this.Editor.Toolbar.plusButton.show()),this.Editor.Toolbox.open()),this.Editor.Toolbox.opened&&this.Editor.Toolbox.leaf(r))}},{key:"escapePressed",value:function(t){}},{key:"dragOver",value:function(t){var e=this.Editor.BlockManager.getBlockByChildNode(t.target);e.dropTarget=!0}},{key:"dragLeave",value:function(t){var e=this.Editor.BlockManager.getBlockByChildNode(t.target);e.dropTarget=!1}},{key:"enter",value:function(t){var e=this.Editor,n=e.BlockSelection,r=e.BlockManager,o=e.Tools,i=e.Caret,a=r.currentBlock,s=o.available[a.name];if(a.selected){if(n.allBlocksSelected)r.removeAllBlocks();else{var u=r.replace();i.setToBlock(u)}n.clearSelection()}else if(!s||!s[this.Editor.Tools.apiSettings.IS_ENABLED_LINE_BREAKS]){if(this.Editor.Toolbox.opened&&this.Editor.Toolbox.getActiveTool)return t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),void this.Editor.Toolbox.toolButtonActivate(t,this.Editor.Toolbox.getActiveTool);if(!t.shiftKey){var c=this.Editor.BlockManager.split();this.Editor.Caret.setToBlock(c),this.Editor.Tools.isInitial(c.tool)&&c.isEmpty&&(this.Editor.Toolbar.open(!1),this.Editor.Toolbar.plusButton.show()),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()}}}},{key:"backspace",value:function(t){var e=this.Editor,n=e.BlockManager,r=e.BlockSelection,o=e.Caret,i=n.currentBlock,a=this.Editor.Tools.available[i.name];if(i.selected||n.currentBlock.isEmpty)return r.allBlocksSelected?this.removeAllBlocks():this.removeCurrentBlock(),void r.clearSelection();if(!a||!a[this.Editor.Tools.apiSettings.IS_ENABLED_LINE_BREAKS]){var s=0===n.currentBlockIndex,u=o.isAtStart&&!s;u&&(t.preventDefault(),this.mergeBlocks())}}},{key:"removeAllBlocks",value:function(){var t=this.Editor.BlockManager;return t.removeAllBlocks(),!0}},{key:"removeCurrentBlock",value:function(){var t=this.Editor,e=t.BlockManager,n=t.Caret;return e.removeBlock(),0===e.currentBlockIndex?n.setToBlock(e.currentBlock):n.setToBlock(e.previousBlock,f.default.positions.END),this.Editor.Toolbar.close(),!0}},{key:"mergeBlocks",value:function(){var t=this.Editor,e=t.BlockManager,n=t.Caret,r=t.Toolbar,o=e.getBlockByIndex(e.currentBlockIndex-1),i=e.currentBlock;i.name===o.name&&o.mergeable?(n.createShadow(o.pluginsContent),e.mergeBlocks(o,i).then(function(){n.restoreCaret(o.pluginsContent),o.pluginsContent.normalize(),r.close()})):n.navigatePrevious()&&r.close()}},{key:"arrowRightAndDown",value:function(t){this.Editor.Caret.navigateNext()&&t.preventDefault()}},{key:"arrowLeftAndUp",value:function(t){this.Editor.Caret.navigatePrevious()&&t.preventDefault()}},{key:"defaultHandler",value:function(){}},{key:"needToolbarClosing",value:function(t){var e=t.keyCode===l.default.keyCodes.ENTER&&this.Editor.Toolbox.opened,n=t.keyCode===l.default.keyCodes.TAB;return!(t.shiftKey||n||e)}}]),e}(c.default);r.default=p,p.displayName="BlockEvents",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(4),n(5),n(6),n(140),n(7),n(13),n(18),n(344),n(56)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p,h,v,g){"use strict";var y=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=y(o),i=y(i),a=y(a),s=y(s),u=y(u),c=y(c),l=y(l),f=y(f),d=y(d),p=y(p),h=y(h),v=y(v),g=y(g);var b=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,u.default)(this,(0,c.default)(e).apply(this,arguments))).currentBlockIndex=-1,t._blocks=null,t}var n,r;return(0,l.default)(e,t),(0,s.default)(e,[{key:"prepare",value:(r=(0,i.default)(o.default.mark(function t(){var e;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=new v.default(this.Editor.UI.nodes.redactor),this._blocks=new Proxy(e,{set:v.default.set,get:v.default.get});case 2:case"end":return t.stop()}},t,this)})),function(){return r.apply(this,arguments)})},{key:"composeBlock",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.Editor.Tools.construct(t,e),o=this.Editor.Tools.available[t],i=new f.default(t,r,o,n,this.Editor.API.methods);return this.bindEvents(i),i}},{key:"insert",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.initialBlock,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=++this.currentBlockIndex,o=this.composeBlock(t,e,n);return this._blocks[r]=o,o}},{key:"paste",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n=r?this.replace(t):this.insert(t);try{n.call("onPaste",e)}catch(e){h.default.log("".concat(t,": onPaste callback call is failed"),"error",e)}return n}},{key:"insertAtEnd",value:function(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}},{key:"mergeBlocks",value:(n=(0,i.default)(o.default.mark(function t(e,n){var r,i;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this._blocks.indexOf(n),!n.isEmpty){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,n.data;case 5:if(i=t.sent,h.default.isEmpty(i)){t.next=9;break}return t.next=9,e.mergeWith(i);case 9:this.removeBlock(r),this.currentBlockIndex=this._blocks.indexOf(e);case 11:case"end":return t.stop()}},t,this)})),function(t,e){return n.apply(this,arguments)})},{key:"removeBlock",value:function(t){t||(t=this.currentBlockIndex),this._blocks.remove(t),this.blocks.length||(this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus())}},{key:"removeAllBlocks",value:function(){for(var t=this.blocks.length-1;t>=0;t--)this._blocks.remove(t);this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus()}},{key:"split",value:function(){var t=this.Editor.Caret.extractFragmentFromCaretPosition(),e=p.default.make("div");e.append(t);var n={text:p.default.isEmpty(e)?"":e.innerHTML};return this.insert(this.config.initialBlock,n)}},{key:"replace",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.initialBlock,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.composeBlock(t,e);return this._blocks.insert(this.currentBlockIndex,n,!0),n}},{key:"getBlockByIndex",value:function(t){return this._blocks[t]}},{key:"getBlock",value:function(t){p.default.isElement(t)||(t=t.parentNode);var e=this._blocks.nodes,n=t.closest(".".concat(f.default.CSS.wrapper)),r=e.indexOf(n);if(r>=0)return this._blocks[r]}},{key:"highlightCurrentNode",value:function(){this.clearFocused(),this.currentBlock.focused=!0}},{key:"clearFocused",value:function(){this.blocks.forEach(function(t){return t.focused=!1})}},{key:"setCurrentBlockByChildNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.positions.DEFAULT;p.default.isElement(t)||(t=t.parentNode);var n=t.closest(".".concat(f.default.CSS.wrapper));if(!n)throw new Error("Can not find a Block from this child Node");this.currentBlockIndex=this._blocks.nodes.indexOf(n),this.Editor.Caret.setToInput(t,e)}},{key:"getBlockByChildNode",value:function(t){p.default.isElement(t)||(t=t.parentNode);var e=t.closest(".".concat(f.default.CSS.wrapper));return this.blocks.find(function(t){return t.holder===e})}},{key:"swap",value:function(t,e){this._blocks.swap(t,e),this.currentBlockIndex=e}},{key:"dropPointer",value:function(){this.currentBlockIndex=-1,this.clearFocused()}},{key:"clear",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._blocks.removeAll(),this.dropPointer(),t&&this.insert(this.config.initialBlock)}},{key:"bindEvents",value:function(t){var e=this.Editor,n=e.BlockEvents,r=e.Listeners;r.on(t.holder,"keydown",function(t){return n.keydown(t)},!0),r.on(t.holder,"mouseup",function(t){return n.mouseUp(t)}),r.on(t.holder,"keyup",function(t){return n.keyup(t)}),r.on(t.holder,"dragover",function(t){return n.dragOver(t)}),r.on(t.holder,"dragleave",function(t){return n.dragLeave(t)})}},{key:"lastBlock",get:function(){return this._blocks[this._blocks.length-1]}},{key:"currentBlock",get:function(){return this._blocks[this.currentBlockIndex]}},{key:"nextBlock",get:function(){var t=this.currentBlockIndex===this._blocks.length-1;return t?null:this._blocks[this.currentBlockIndex+1]}},{key:"nextContentfulBlock",get:function(){var t=this.blocks.slice(this.currentBlockIndex+1);return t.find(function(t){return!!t.inputs.length})}},{key:"previousContentfulBlock",get:function(){var t=this.blocks.slice(0,this.currentBlockIndex).reverse();return t.find(function(t){return!!t.inputs.length})}},{key:"previousBlock",get:function(){var t=0===this.currentBlockIndex;return t?null:this._blocks[this.currentBlockIndex-1]}},{key:"blocks",get:function(){return this._blocks.array}}]),e}(d.default);r.default=b,b.displayName="BlockManager",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(13),n(18),n(341),n(342),n(343)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d){"use strict";var p=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=p(o),i=p(i),a=p(a),s=p(s),u=p(u),c=p(c),l=p(l),f=p(f),d=p(d);var h=function(){function t(e,n,r,o,i){(0,a.default)(this,t),this.inputIndex=0,this.name=e,this.tool=n,this.class=r,this.settings=o,this.api=i,this.holder=this.compose(),this.tunes=this.makeTunes()}var e,n;return(0,s.default)(t,[{key:"call",value:function(t,e){this.tool[t]&&this.tool[t]instanceof Function&&this.tool[t].call(this.tool,e)}},{key:"mergeWith",value:(n=(0,i.default)(o.default.mark(function t(e){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tool.merge(e);case 2:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)})},{key:"save",value:(e=(0,i.default)(o.default.mark(function t(){var e,n,r,i=this;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tool.save(this.pluginsContent);case 2:return e=t.sent,n=window.performance.now(),t.abrupt("return",Promise.resolve(e).then(function(t){return r=window.performance.now(),{tool:i.name,data:t,time:r-n}}).catch(function(t){c.default.log("Saving proccess for ".concat(i.name," tool failed due to the ").concat(t),"log","red")}));case 5:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"validateData",value:function(t){var e=!0;return this.tool.validate instanceof Function&&(e=this.tool.validate(t)),!!e&&t}},{key:"makeTunes",value:function(){var t=this,e=[l.default,f.default,d.default];return e.map(function(e){return new e({api:t.api,settings:t.settings})})}},{key:"renderTunes",value:function(){var t=document.createDocumentFragment();return this.tunes.forEach(function(e){u.default.append(t,e.render())}),t}},{key:"compose",value:function(){var e=u.default.make("div",t.CSS.wrapper),n=u.default.make("div",t.CSS.content),r=this.tool.render();return n.appendChild(r),e.appendChild(n),e}},{key:"inputs",get:function(){var t=this.holder,e="[contenteditable], textarea, input, "+["text","password","email","number","search","tel","url"].map(function(t){return'input[type="'.concat(t,'"]')}).join(", "),n=c.default.array(t.querySelectorAll(e));return this.inputIndex>n.length-1&&(this.inputIndex=n.length-1),n}},{key:"currentInput",get:function(){return this.inputs[this.inputIndex]},set:function(t){var e=this.inputs.findIndex(function(e){return e===t||e.contains(t)});-1!==e&&(this.inputIndex=e)}},{key:"firstInput",get:function(){return this.inputs[0]}},{key:"lastInput",get:function(){var t=this.inputs;return t[t.length-1]}},{key:"nextInput",get:function(){return this.inputs[this.inputIndex+1]}},{key:"previousInput",get:function(){return this.inputs[this.inputIndex-1]}},{key:"pluginsContent",get:function(){var e=this.holder.querySelector(".".concat(t.CSS.content));return e&&e.childNodes.length?e.childNodes[0]:null}},{key:"data",get:function(){return this.save().then(function(t){return t&&!c.default.isEmpty(t.data)?t.data:{}})}},{key:"sanitize",get:function(){return this.tool.sanitize}},{key:"mergeable",get:function(){return"function"==typeof this.tool.merge}},{key:"isEmpty",get:function(){var t=u.default.isEmpty(this.pluginsContent),e=!this.hasMedia;return t&&e}},{key:"hasMedia",get:function(){return!!this.holder.querySelector(["img","iframe","video","audio","source","input","textarea","twitterwidget"].join(","))}},{key:"focused",set:function(e){this.holder.classList.toggle(t.CSS.focused,e)}},{key:"selected",set:function(e){e?this.holder.classList.add(t.CSS.selected):this.holder.classList.remove(t.CSS.selected)},get:function(){return this.holder.classList.contains(t.CSS.selected)}},{key:"stretched",set:function(e){this.holder.classList.toggle(t.CSS.wrapperStretched,e)}},{key:"dropTarget",set:function(e){this.holder.classList.toggle(t.CSS.dropTarget,e)}}],[{key:"CSS",get:function(){return{wrapper:"ce-block",wrapperStretched:"ce-block--stretched",content:"ce-block__content",focused:"ce-block--focused",selected:"ce-block--selected",dropTarget:"ce-block--drop-target"}}}]),t}();r.default=h,h.displayName="Block",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(18),n(13),n(47)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d){"use strict";var p=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=p(o),i=p(i),a=p(a),s=p(s),u=p(u),c=p(c),l=p(l),f=p(f),d=p(d);var h=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).needToSelectAll=!1,t.nativeInputSelected=!1,t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"prepare",value:function(){var t=this,e=this.Editor.Shortcuts;e.add({name:"CMD+A",handler:function(e){t.handleCommandA(e)}}),e.add({name:"CMD+C",handler:function(e){t.handleCommandC(e)}}),this.selection=new d.default}},{key:"clearSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.needToSelectAll=!1,this.nativeInputSelected=!1,this.anyBlockSelected&&(t&&this.selection.restore(),this.allBlocksSelected=!1)}},{key:"handleCommandA",value:function(t){!f.default.isNativeInput(t.target)||this.nativeInputSelected?(t.preventDefault(),this.needToSelectAll?(this.selectAllBlocks(),this.needToSelectAll=!1):(this.selectBlockByIndex(),this.needToSelectAll=!0)):this.nativeInputSelected=!0}},{key:"handleCommandC",value:function(t){var e=this,n=this.Editor,r=n.BlockManager,o=n.Sanitizer;if(this.anyBlockSelected){t.preventDefault();var i=f.default.make("div");r.blocks.filter(function(t){return t.selected}).forEach(function(t){var n=o.clean(t.holder.innerHTML,e.sanitizerConfig),r=f.default.make("p");r.innerHTML=n,i.appendChild(r)}),l.default.copyTextToClipboard(i.innerHTML)}}},{key:"selectAllBlocks",value:function(){this.Editor.BlockManager,this.allBlocksSelected=!0}},{key:"selectBlockByIndex",value:function(t){var e,n=this.Editor.BlockManager;n.clearFocused(),e=isNaN(t)?n.currentBlock:n.getBlockByIndex(t),this.selection.save(),d.default.get().removeAllRanges(),e.selected=!0}},{key:"sanitizerConfig",get:function(){return{p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}}}},{key:"allBlocksSelected",get:function(){var t=this.Editor.BlockManager;return t.blocks.every(function(t){return!0===t.selected})},set:function(t){var e=this.Editor.BlockManager;e.blocks.forEach(function(e){return e.selected=t})}},{key:"anyBlockSelected",get:function(){var t=this.Editor.BlockManager;return t.blocks.some(function(t){return!0===t.selected})}}]),e}(c.default);r.default=h,h.displayName="BlockSelection",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(4),n(5),n(6),n(47),n(7),n(56)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p){"use strict";var h=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=h(o),i=h(i),a=h(a),s=h(s),u=h(u),c=h(c),l=h(l),f=h(f),d=h(d),p=h(p);var v=function(t){function e(){var t,n;return(0,a.default)(this,e),(t=(0,u.default)(this,(0,c.default)(e).apply(this,arguments))).isStartedAtEditor=!1,t.processDrop=(n=(0,i.default)(o.default.mark(function e(n){var r,i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=t.Editor,i=r.BlockManager,a=r.Paste,n.preventDefault(),i.blocks.forEach(function(t){return t.dropTarget=!1}),f.default.isAtEditor&&!f.default.isCollapsed&&t.isStartedAtEditor&&document.execCommand("delete"),t.isStartedAtEditor=!1;try{i.setCurrentBlockByChildNode(n.target,p.default.positions.END)}catch(t){i.setCurrentBlockByChildNode(i.lastBlock.holder,p.default.positions.END)}a.processDataTransfer(n.dataTransfer,!0);case 7:case"end":return e.stop()}},e,this)})),function(t){return n.apply(this,arguments)}),t}return(0,l.default)(e,t),(0,s.default)(e,[{key:"prepare",value:function(){this.bindEvents()}},{key:"bindEvents",value:function(){var t=this;this.Editor.Listeners.on(this.Editor.UI.nodes.holder,"drop",this.processDrop,!0),this.Editor.Listeners.on(this.Editor.UI.nodes.holder,"dragstart",function(e){f.default.isAtEditor&&!f.default.isCollapsed&&(t.isStartedAtEditor=!0),t.Editor.InlineToolbar.close()}),this.Editor.Listeners.on(this.Editor.UI.nodes.holder,"dragover",function(t){return t.preventDefault()},!0)}}]),e}(d.default);r.default=v,v.displayName="DragNDrop",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c){"use strict";var l=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=l(o),i=l(i),a=l(a),s=l(s),u=l(u);var f=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).subscribers={},t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"on",value:function(t,e){t in this.subscribers||(this.subscribers[t]=[]),this.subscribers[t].push(e)}},{key:"emit",value:function(t,e){this.subscribers[t]&&this.subscribers[t].reduce(function(t,e){var n=e(t);return n||t},e)}},{key:"off",value:function(t,e){for(var n=0;n3&&void 0!==arguments[3]&&arguments[3],o={element:t,eventType:e,handler:n,useCapture:r},i=this.findOne(t,e,n);i||(this.allListeners.push(o),t.addEventListener(e,n,r))}},{key:"off",value:function(t,e,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.findAll(t,e,n);i.forEach(function(t,e){var n=r.allListeners.indexOf(i[e]);n>0&&r.allListeners.splice(n,1)}),t.removeEventListener(e,n,o)}},{key:"findOne",value:function(t,e,n){var r=this.findAll(t,e,n);return r.length>0?r[0]:null}},{key:"findAll",value:function(t,e,n){var r=t?this.findByEventTarget(t):[];return t&&e&&n?r.filter(function(t){return t.eventType===e&&t.handler===n}):t&&e?r.filter(function(t){return t.eventType===e}):r}},{key:"removeAll",value:function(){this.allListeners.map(function(t){t.element.removeEventListener(t.eventType,t.handler)}),this.allListeners=[]}},{key:"findByEventTarget",value:function(t){return this.allListeners.filter(function(e){if(e.element===t)return e})}},{key:"findByType",value:function(t){return this.allListeners.filter(function(e){if(e.eventType===t)return e})}},{key:"findByHandler",value:function(t){return this.allListeners.filter(function(e){if(e.handler===t)return e})}}]),e}((c=l(c)).default);r.default=f,f.displayName="Listeners",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(4),n(5),n(6),n(7),n(18),n(140)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p){"use strict";var h=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=h(o),i=h(i),a=h(a),s=h(s),u=h(u),c=h(c),l=h(l),f=h(f),d=h(d),p=h(p);var v=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,u.default)(this,(0,c.default)(e).apply(this,arguments))).mutationDebouncer=d.default.debounce(function(){t.config.onChange()},e.DebounceTimer),t}var n;return(0,l.default)(e,t),(0,s.default)(e,[{key:"destroy",value:function(){this.mutationDebouncer=null,this.observer.disconnect(),this.observer=null}},{key:"prepare",value:(n=(0,i.default)(o.default.mark(function t(){var e=this;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:window.setTimeout(function(){e.setObserver()},1e3);case 1:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"disable",value:function(){this.disabled=!0}},{key:"enable",value:function(){this.disabled=!1}},{key:"setObserver",value:function(){var t=this,e=this.Editor.UI;this.observer=new MutationObserver(function(e,n){t.mutationHandler(e,n)}),this.observer.observe(e.nodes.redactor,{childList:!0,attributes:!0,subtree:!0,characterData:!0,characterDataOldValue:!0})}},{key:"mutationHandler",value:function(t,e){if(!this.disabled){var n=!1;t.forEach(function(t){switch(t.type){case"childList":case"subtree":case"characterData":case"characterDataOldValue":n=!0;break;case"attributes":var e=t.target;if(!e.classList.contains(p.default.CSS.wrapper))return void(n=!0)}}),n&&this.mutationDebouncer()}}}]),e}(f.default);r.default=v,v.displayName="ModificationsObserver",v.DebounceTimer=450,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(345)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l){"use strict";var f=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=f(o),i=f(i),a=f(a),s=f(s),u=f(u),c=f(c),l=f(l);var d=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,u.default)(e,t),(0,i.default)(e,[{key:"show",value:function(t){l.default.show(t)}}]),e}(c.default);r.default=d,d.displayName="Notifier",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(127),n(29),n(30),n(71),n(1),n(2),n(4),n(5),n(6),n(56),n(7),n(13),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p,h,v,g){"use strict";var y=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=y(o),i=y(i),a=y(a),s=y(s),u=y(u),c=y(c),l=y(l),f=y(f),d=y(d),p=y(p),h=y(h),v=y(v),g=y(g);var b=function(t){function e(){var t,n;return(0,u.default)(this,e),(t=(0,l.default)(this,(0,f.default)(e).apply(this,arguments))).toolsTags={},t.tagsByTool={},t.toolsPatterns=[],t.toolsFiles={},t.processTool=function(e){var n=(0,s.default)(e,2),r=n[0],o=n[1];try{var i=new t.Editor.Tools.blockTools[r]({api:t.Editor.API.methods,config:{},data:{}});if(!i.onPaste||"function"!=typeof i.onPaste)return;var a=o.pasteConfig||{};t.getTagsConfig(r,a),t.getFilesConfig(r,a),t.getPatternsConfig(r,a)}catch(t){g.default.log("Paste handling for «".concat(r,"» Tool hasn't been set up because of the error"),"warn",t)}},t.handlePasteEvent=(n=(0,a.default)(i.default.mark(function e(n){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.isNativeBehaviour(n.target)||n.clipboardData.types.includes("Files")){e.next=2;break}return e.abrupt("return");case 2:n.preventDefault(),t.processDataTransfer(n.clipboardData);case 4:case"end":return e.stop()}},e,this)})),function(t){return n.apply(this,arguments)}),t}var n,r,h,y,b,m,k,x;return(0,d.default)(e,t),(0,c.default)(e,[{key:"prepare",value:(x=(0,a.default)(i.default.mark(function t(){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.setCallback(),this.processTools();case 2:case"end":return t.stop()}},t,this)})),function(){return x.apply(this,arguments)})},{key:"processDataTransfer",value:(k=(0,a.default)(i.default.mark(function t(e){var n,r,o,a,s,u,c,l=arguments;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=l.length>1&&void 0!==l[1]&&l[1],r=this.Editor.Sanitizer,!e.types.includes("Files")){t.next=6;break}return t.next=5,this.processFiles(e.files);case 5:return t.abrupt("return");case 6:if(o=e.getData("text/plain"),a=e.getData("text/html"),n&&o.trim()&&a.trim()&&(a="

"+(a.trim()?a:o)+"

"),s=Object.keys(this.toolsTags).reduce(function(t,e){return t[e.toLowerCase()]=!0,t},{}),u=Object.assign({},s,r.getAllInlineToolsConfig(),{br:{}}),(c=r.clean(a,u)).trim()&&c.trim()!==o&&v.default.isHTMLString(c)){t.next=17;break}return t.next=15,this.processText(o);case 15:t.next=19;break;case 17:return t.next=19,this.processText(c,!0);case 19:case"end":return t.stop()}},t,this)})),function(t){return k.apply(this,arguments)})},{key:"setCallback",value:function(){var t=this.Editor,e=t.Listeners,n=t.UI;e.on(n.nodes.redactor,"paste",this.handlePasteEvent)}},{key:"processTools",value:function(){var t=this.Editor.Tools.blockTools;Object.entries(t).forEach(this.processTool)}},{key:"getTagsConfig",value:function(t,e){var n=this,r=e.tags||[];r.forEach(function(e){n.toolsTags.hasOwnProperty(e)?g.default.log("Paste handler for «".concat(t,"» Tool on «").concat(e,"» tag is skipped ")+"because it is already used by «".concat(n.toolsTags[e].tool,"» Tool."),"warn"):n.toolsTags[e.toUpperCase()]={tool:t}}),this.tagsByTool[t]=r.map(function(t){return t.toUpperCase()})}},{key:"getFilesConfig",value:function(t,e){var n=e.files,r=void 0===n?{}:n,o=r.extensions,i=r.mimeTypes;(o||i)&&(o&&!Array.isArray(o)&&(g.default.log("«extensions» property of the onDrop config for «".concat(t,"» Tool should be an array")),o=[]),i&&!Array.isArray(i)&&(g.default.log("«mimeTypes» property of the onDrop config for «".concat(t,"» Tool should be an array")),i=[]),i&&(i=i.filter(function(e){return!!g.default.isValidMimeType(e)||(g.default.log("MIME type value «".concat(e,"» for the «").concat(t,"» Tool is not a valid MIME type"),"warn"),!1)})),this.toolsFiles[t]={extensions:o||[],mimeTypes:i||[]})}},{key:"getPatternsConfig",value:function(t,e){var n=this;e.patterns&&!g.default.isEmpty(e.patterns)&&Object.entries(e.patterns).forEach(function(e){var r=(0,s.default)(e,2),o=r[0],i=r[1];i instanceof RegExp||g.default.log("Pattern ".concat(i," for «").concat(t,"» Tool is skipped because it should be a Regexp instance."),"warn"),n.toolsPatterns.push({key:o,pattern:i,tool:t})})}},{key:"isNativeBehaviour",value:function(t){var e=this.Editor.BlockManager;if(v.default.isNativeInput(t))return!0;var n=e.getBlock(t);return!n}},{key:"processFiles",value:(m=(0,a.default)(i.default.mark(function t(e){var n,r=this;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.Editor.BlockManager,t.next=3,Promise.all(Array.from(e).map(function(t){return r.processFile(t)}));case 3:t.sent.filter(function(t){return!!t}).forEach(function(t,e){0===e&&n.currentBlock&&n.currentBlock.isEmpty?n.paste(t.type,t.event,!0):n.paste(t.type,t.event)});case 6:case"end":return t.stop()}},t,this)})),function(t){return m.apply(this,arguments)})},{key:"processFile",value:(b=(0,a.default)(i.default.mark(function t(e){var n,r,o,a,u;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=g.default.getFileExtension(e),r=Object.entries(this.toolsFiles).find(function(t){var r=(0,s.default)(t,2),o=(r[0],r[1]),i=o.mimeTypes,a=o.extensions,u=e.type.split("/"),c=(0,s.default)(u,2),l=c[0],f=c[1],d=a.find(function(t){return t.toLowerCase()===n.toLowerCase()}),p=i.find(function(t){var e=t.split("/"),n=(0,s.default)(e,2),r=n[0],o=n[1];return r===l&&(o===f||"*"===o)});return!!d||!!p})){t.next=4;break}return t.abrupt("return");case 4:return o=(0,s.default)(r,1),a=o[0],u=this.composePasteEvent("file",{file:e}),t.abrupt("return",{event:u,type:a});case 7:case"end":return t.stop()}},t,this)})),function(t){return b.apply(this,arguments)})},{key:"processText",value:(y=(0,a.default)(i.default.mark(function t(e){var n,r,o,s,u,c,l,f,d=this,h=arguments;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],r=this.Editor,o=r.Caret,s=r.BlockManager,u=r.Tools,(c=n?this.processHTML(e):this.processPlain(e)).length){t.next=5;break}return t.abrupt("return");case 5:if(1!==c.length||c[0].isBlock){t.next=8;break}return this.processSingleBlock(c.pop()),t.abrupt("return");case 8:return l=u.isInitial(s.currentBlock.tool),f=l&&s.currentBlock.isEmpty,t.next=12,Promise.all(c.map(function(){var t=(0,a.default)(i.default.mark(function t(e,n){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.insertBlock(e,0===n&&f);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}()));case 12:o.setToBlock(s.currentBlock,p.default.positions.END);case 13:case"end":return t.stop()}},t,this)})),function(t){return y.apply(this,arguments)})},{key:"processHTML",value:function(t){var e=this,n=this.Editor,r=n.Tools,o=n.Sanitizer,i=this.config.initialBlock,a=v.default.make("DIV");a.innerHTML=t;var s=this.getNodes(a);return s.map(function(t){var n,a=i,s=!1;switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:(n=v.default.make("div")).appendChild(t);break;case Node.ELEMENT_NODE:n=t,s=!0,e.toolsTags[n.tagName]&&(a=e.toolsTags[n.tagName].tool)}var u=r.blockTools[a].pasteConfig.tags,c=u.reduce(function(t,e){return t[e.toLowerCase()]={},t},{}),l=Object.assign({},c,o.getInlineToolsConfig(a));n.innerHTML=o.clean(n.innerHTML,l);var f=e.composePasteEvent("tag",{data:n});return{content:n,isBlock:s,tool:a,event:f}}).filter(function(t){return!v.default.isNodeEmpty(t.content)||v.default.isSingleTag(t.content)})}},{key:"processPlain",value:function(t){var e=this,n=this.config.initialBlock;if(this.Editor.Tools,!t)return[];var r=n;return t.split(/\r?\n/).filter(function(t){return t.trim()}).map(function(t){var n=v.default.make("div");n.innerHTML=t;var o=e.composePasteEvent("tag",{data:n});return{content:n,tool:r,isBlock:!1,event:o}})}},{key:"processSingleBlock",value:(h=(0,a.default)(i.default.mark(function t(n){var r,o,a,s,u,c,l,f,d,h,v;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.config.initialBlock,o=this.Editor,a=o.BlockManager,s=o.Caret,u=o.Sanitizer,c=o.Tools,l=n.content,!(n.tool===r&&l.textContent.length1&&void 0!==c[1]&&c[1],r=this.Editor,o=r.BlockManager,a=r.Caret,s=o.currentBlock,!(n&&s&&s.isEmpty)){t.next=6;break}return o.paste(e.tool,e.event,!0),t.abrupt("return");case 6:u=o.paste(e.tool,e.event),a.setToBlock(u);case 8:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)})},{key:"getNodes",value:function(t){var e=this,n=Array.from(t.childNodes),r=Object.keys(this.toolsTags);return n.reduce(function t(n,i){if(v.default.isEmpty(i)&&!v.default.isSingleTag(i))return n;var a=n[n.length-1],s=new DocumentFragment;switch(a&&v.default.isFragment(a)&&(s=n.pop()),i.nodeType){case Node.ELEMENT_NODE:var u=i;if("BR"===u.tagName)return(0,o.default)(n).concat([s,new DocumentFragment]);var c=e.toolsTags[u.tagName]||{},l=c.tool,f=void 0===l?"":l,d=e.tagsByTool[f]||[],p=r.includes(u.tagName),h=v.default.blockElements.includes(u.tagName.toLowerCase()),g=Array.from(u.children).some(function(t){var e=t.tagName;return r.includes(e)&&!d.includes(e)}),y=Array.from(u.children).some(function(t){var e=t.tagName;return v.default.blockElements.includes(e.toLowerCase())});if(!h&&!p)return s.appendChild(u),(0,o.default)(n).concat([s]);if(p&&!g||h&&!y&&!g)return(0,o.default)(n).concat([s,u]);break;case Node.TEXT_NODE:return s.appendChild(i),(0,o.default)(n).concat([s]);default:return(0,o.default)(n).concat([s])}return(0,o.default)(n).concat((0,o.default)(Array.from(i.childNodes).reduce(t,[])))},[])}},{key:"composePasteEvent",value:function(t,e){return new CustomEvent(t,{detail:e})}}]),e}(h.default);r.default=b,b.displayName="Paste",b.PATTERN_PROCESSING_MAX_LENGTH=450,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(4),n(5),n(6),n(7),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d){"use strict";var p=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=p(o),i=p(i),a=p(a),s=p(s),u=p(u),c=p(c),l=p(l),f=p(f),d=p(d);var h=function(t){function e(){return(0,a.default)(this,e),(0,u.default)(this,(0,c.default)(e).apply(this,arguments))}var n;return(0,l.default)(e,t),(0,s.default)(e,[{key:"render",value:function(t){var e=this,n=t.map(function(t){return{function:function(){return e.insertBlock(t)}}});return d.default.sequence(n)}},{key:"insertBlock",value:(n=(0,i.default)(o.default.mark(function t(e){var n,r,i,a,s,u,c,l,f;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.Editor,r=n.Tools,i=n.BlockManager,a=e.type,s=e.data,u=e.settings,!(a in r.available)){t.next=15;break}t.prev=5,i.insert(a,s,u),t.next=13;break;case 9:throw t.prev=9,t.t0=t.catch(5),d.default.log("Block «".concat(a,"» skipped because of plugins error"),"warn",s),Error(t.t0);case 13:t.next=20;break;case 15:c={savedData:{type:a,data:s},title:a},a in r.unavailable&&(l=r.unavailable[a].toolbox,f=r.getToolSettings(a).toolbox,c.title=l.title||f.title||c.title),i.insert(r.stubTool,c,u).stretched=!0,d.default.log("Tool «".concat(a,"» is not found. Check 'tools' property at your initial CodeX Editor config."),"warn");case 20:case"end":return t.stop()}},t,this,[[5,9]])})),function(t){return n.apply(this,arguments)})}]),e}(f.default);r.default=h,h.displayName="Renderer",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(71),n(55),n(1),n(2),n(4),n(5),n(6),n(7),n(18),n(349)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p){"use strict";var h=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=h(o),i=h(i),a=h(a),s=h(s),u=h(u),c=h(c),l=h(l),f=h(f),d=h(d),p=h(p);var v=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,u.default)(this,(0,c.default)(e).apply(this,arguments))).configCache={},t.inlineToolsConfigCache=null,t}return(0,l.default)(e,t),(0,s.default)(e,[{key:"sanitizeBlocks",value:function(t){var e=this;return t.map(function(t){var n=e.composeToolConfig(t.tool);return d.default.isEmpty(n)?t:(t.data=e.deepSanitize(t.data,n),t)})}},{key:"deepSanitize",value:function(t,e){return Array.isArray(t)?this.cleanArray(t,e):"object"===(0,i.default)(t)?this.cleanObject(t,e):"string"==typeof t?this.cleanOneItem(t,e):t}},{key:"clean",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={tags:e},r=this.createHTMLJanitorInstance(n);return r.clean(t)}},{key:"composeToolConfig",value:function(t){if(this.configCache[t])return this.configCache[t];var e=this.Editor.Tools.apiSettings.SANITIZE_CONFIG,n=this.Editor.Tools.available[t],r=this.getInlineToolsConfig(t);if(!n.sanitize||n[e]&&d.default.isEmpty(n[e]))return r;var o=n.sanitize,a={};for(var s in o)if(o.hasOwnProperty(s)){var u=o[s];"object"===(0,i.default)(u)?a[s]=Object.assign({},r,u):a[s]=u}return this.configCache[t]=a,a}},{key:"getInlineToolsConfig",value:function(t){var e=this.Editor.Tools,n=e.getToolSettings(t),r=n.inlineToolbar||[],o={};return"boolean"==typeof r&&r?o=this.getAllInlineToolsConfig():r.map(function(t){o=Object.assign(o,e.inline[t][e.apiSettings.SANITIZE_CONFIG])}),o}},{key:"getAllInlineToolsConfig",value:function(){var t=this.Editor.Tools;if(this.inlineToolsConfigCache)return this.inlineToolsConfigCache;var e={};return Object.entries(t.inline).forEach(function(n){var r=(0,o.default)(n,2),i=(r[0],r[1]);Object.assign(e,i[t.apiSettings.SANITIZE_CONFIG])}),this.inlineToolsConfigCache=e,this.inlineToolsConfigCache}},{key:"cleanArray",value:function(t,e){var n=this;return t.map(function(t){return n.deepSanitize(t,e)})}},{key:"cleanObject",value:function(t,e){var n={};for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],i=this.isRule(e[r])?e[r]:e;n[r]=this.deepSanitize(o,i)}return n}},{key:"cleanOneItem",value:function(t,e){return"object"===(0,i.default)(e)?this.clean(t,e):!1===e?this.clean(t,{}):t}},{key:"isRule",value:function(t){return"object"===(0,i.default)(t)||"boolean"==typeof t||"function"==typeof t} /** * If developer uses editor's API, then he can customize sanitize restrictions. * Or, sanitizing config can be defined globally in editors initialization. That config will be used everywhere @@ -19,7 +19,7 @@ * @license https://github.com/guardian/html-janitor/blob/master/LICENSE * * @param {SanitizerConfig} config - sanitizer extension - */},{key:"createHTMLJanitorInstance",value:function(t){return t?new p.default(t):null}}]),e}(f.default);r.default=v,v.displayName="Sanitizer",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(6),n(7),n(5),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f){"use strict";var d=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=d(o),i=d(i),a=d(a),s=d(s),u=d(u),c=d(c),l=d(l);var p=function(t){function e(){return(0,a.default)(this,e),(0,u.default)(this,(0,c.default)(e).apply(this,arguments))}var n;return(0,l.default)(e,t),(0,s.default)(e,[{key:"save",value:(n=(0,i.default)(o.default.mark(function t(){var e,n,r,i,a,s,u,c;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.Editor,n=e.BlockManager,r=e.Sanitizer,i=e.ModificationsObserver,a=n.blocks,s=[],i.disable(),a.forEach(function(t){s.push(t.save())}),t.next=6,Promise.all(s);case 6:return u=t.sent,t.next=9,r.sanitizeBlocks(u);case 9:return c=t.sent,i.enable(),t.abrupt("return",this.makeOutput(c));case 12:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"makeOutput",value:function(t){var e=this,n=0,r=[];return console.groupCollapsed("[CodexEditor saving]:"),t.forEach(function(t){console.log("«".concat(t.tool,"» saving info"),t),n+=t.time,t.tool!==e.Editor.Tools.stubTool?r.push({type:t.tool,data:t.data}):r.push(t.data)}),console.log("Total",n),console.groupEnd(),{time:+new Date,blocks:r,version:"2.7.18"}}}]),e}((f=d(f)).default);r.default=p,p.displayName="Saver",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(347),n(4)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l){"use strict";var f=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=f(o),i=f(i),a=f(a),s=f(s),u=f(u),c=f(c);var d=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).registeredShortcuts=[],t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"add",value:function(t){var e=this.Editor.UI,n=new c.default({name:t.name,on:e.nodes.redactor,callback:t.handler});this.registeredShortcuts.push(n)}},{key:"remove",value:function(t){var e=this.registeredShortcuts.findIndex(function(e){return e.name===t});this.registeredShortcuts[e].remove(),this.registeredShortcuts.splice(e,1)}}]),e}((l=f(l)).default);r.default=d,d.displayName="Shortcuts",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l){"use strict";var f=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=f(o),i=f(i),a=f(a),s=f(s),u=f(u),c=f(c),l=f(l);var d=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).nodes={wrapper:null,toolSettings:null,defaultSettings:null},t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"make",value:function(){this.nodes.wrapper=l.default.make("div",e.CSS.wrapper),this.nodes.toolSettings=l.default.make("div",e.CSS.toolSettings),this.nodes.defaultSettings=l.default.make("div",e.CSS.defaultSettings),l.default.append(this.nodes.wrapper,[this.nodes.toolSettings,this.nodes.defaultSettings])}},{key:"open",value:function(){this.nodes.wrapper.classList.add(e.CSS.wrapperOpened),this.addToolSettings(),this.addDefaultSettings(),this.Editor.Events.emit(this.events.opened)}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(e.CSS.wrapperOpened),this.nodes.toolSettings.innerHTML="",this.nodes.defaultSettings.innerHTML="",this.Editor.Events.emit(this.events.closed)}},{key:"addToolSettings",value:function(){"function"==typeof this.Editor.BlockManager.currentBlock.tool.renderSettings&&l.default.append(this.nodes.toolSettings,this.Editor.BlockManager.currentBlock.tool.renderSettings())}},{key:"addDefaultSettings",value:function(){l.default.append(this.nodes.defaultSettings,this.Editor.BlockManager.currentBlock.renderTunes())}},{key:"events",get:function(){return{opened:"block-settings-opened",closed:"block-settings-closed"}}},{key:"opened",get:function(){return this.nodes.wrapper.classList.contains(e.CSS.wrapperOpened)}}],[{key:"CSS",get:function(){return{wrapper:"ce-settings",wrapperOpened:"ce-settings--opened",toolSettings:"ce-settings__plugin-zone",defaultSettings:"ce-settings__default-zone",button:"ce-settings__button"}}}]),e}(c.default);r.default=d,d.displayName="BlockSettings",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(71),n(1),n(2),n(6),n(7),n(5),n(4),n(13),n(154),n(155),n(156),n(47),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p,h,v,g){"use strict";var y=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=y(o),i=y(i),a=y(a),s=y(s),u=y(u),c=y(c),l=y(l),f=y(f),d=y(d),p=y(p),h=y(h),v=y(v),g=y(g);var b=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,s.default)(this,(0,u.default)(e).apply(this,arguments))).CSS={inlineToolbar:"ce-inline-toolbar",inlineToolbarShowed:"ce-inline-toolbar--showed",buttonsWrapper:"ce-inline-toolbar__buttons",actionsWrapper:"ce-inline-toolbar__actions",inlineToolButton:"ce-inline-tool",inlineToolButtonLast:"ce-inline-tool--last",inputField:"cdx-input"},t.nodes={wrapper:null,buttons:null,actions:null},t.toolbarVerticalMargin=20,t}return(0,c.default)(e,t),(0,a.default)(e,[{key:"make",value:function(){this.nodes.wrapper=f.default.make("div",this.CSS.inlineToolbar),this.nodes.buttons=f.default.make("div",this.CSS.buttonsWrapper),this.nodes.actions=f.default.make("div",this.CSS.actionsWrapper),this.Editor.Listeners.on(this.nodes.wrapper,"mousedown",function(t){t.preventDefault()}),f.default.append(this.nodes.wrapper,[this.nodes.buttons,this.nodes.actions]),f.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.addTools()}},{key:"handleShowingEvent",value:function(t){this.allowedToShow()?(this.move(),this.open(),this.checkToolsState(),this.Editor.BlockSelection.clearSelection()):this.close()}},{key:"move",value:function(){var t=v.default.rect,e=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),n={x:t.x-e.left,y:t.y+t.height-e.top+this.toolbarVerticalMargin};t.width&&(n.x+=Math.floor(t.width/2)),this.nodes.wrapper.style.left=Math.floor(n.x)+"px",this.nodes.wrapper.style.top=Math.floor(n.y)+"px"}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed),this.tools.forEach(function(t){"function"==typeof t.clear&&t.clear()})}},{key:"open",value:function(){this.filterTools(),this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed),this.tools.forEach(function(t){"function"==typeof t.clear&&t.clear()})}},{key:"allowedToShow",value:function(){var t=v.default.get(),e=v.default.text;if(!t||!t.anchorNode)return!1;if(t.isCollapsed||e.length<1)return!1;var n=t.anchorNode.parentElement;if(t&&["IMG","INPUT"].includes(n.tagName))return!1;var r=n.closest('[contenteditable="true"]');if(null===r)return!1;var o=this.Editor.BlockManager.getBlock(t.anchorNode);if(!o)return!1;var i=this.Editor.Tools.getToolSettings(o.name);return i&&i[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR]}},{key:"filterTools",value:function(){var t=this,e=v.default.get(),n=this.Editor.BlockManager.getBlock(e.anchorNode),r=this.Editor.Tools.getToolSettings(n.name),o=r&&r[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR],i=Array.from(this.nodes.buttons.querySelectorAll(".".concat(this.CSS.inlineToolButton)));i.forEach(function(e){e.hidden=!1,e.classList.remove(t.CSS.inlineToolButtonLast)}),Array.isArray(o)&&i.forEach(function(t){t.hidden=!o.includes(t.dataset.tool)});var a=i.filter(function(t){return!t.hidden}).pop();a&&a.classList.add(this.CSS.inlineToolButtonLast)}},{key:"addTools",value:function(){var t=this;this.tools.forEach(function(e,n){t.addTool(n,e)})}},{key:"addTool",value:function(t,e){var n=this,r=this.Editor,i=r.Listeners,a=r.Tools,s=e.render();if(s){if(s.dataset.tool=t,this.nodes.buttons.appendChild(s),"function"==typeof e.renderActions){var u=e.renderActions();this.nodes.actions.appendChild(u)}i.on(s,"click",function(t){n.toolClicked(e),t.preventDefault()});var c=a.getToolSettings(t),l=null,f=Object.entries(a.internalTools).filter(function(t){var e=(0,o.default)(t,2),n=(e[0],e[1]);return g.default.isFunction(n)?n[a.apiSettings.IS_INLINE]:n.class[a.apiSettings.IS_INLINE]}).map(function(t){var e=(0,o.default)(t,1),n=e[0];return n});f.includes(t)?l=this.inlineTools[t].shortcut:c&&c[a.apiSettings.SHORTCUT]&&(l=c[a.apiSettings.SHORTCUT]),l&&this.enableShortcuts(e,l)}else g.default.log("Render method must return an instance of Node","warn",t)}},{key:"enableShortcuts",value:function(t,e){var n=this;this.Editor.Shortcuts.add({name:e,handler:function(e){var r=n.Editor.BlockManager.currentBlock;if(r){var o=n.Editor.Tools.getToolSettings(r.name);o&&o[n.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR]&&(e.preventDefault(),n.toolClicked(t))}}})}},{key:"toolClicked",value:function(t){var e=v.default.range;t.surround(e),this.checkToolsState()}},{key:"checkToolsState",value:function(){this.tools.forEach(function(t){t.checkState(v.default.get())})}},{key:"internalTools",get:function(){return{bold:this.Editor.Tools.constructInline(d.default),italic:this.Editor.Tools.constructInline(p.default),link:this.Editor.Tools.constructInline(h.default)}}},{key:"externalTools",get:function(){var t={};for(var e in this.Editor.Tools.inline)this.Editor.Tools.inline.hasOwnProperty(e)&&(t[e]=this.Editor.Tools.constructInline(this.Editor.Tools.inline[e]));return t}},{key:"tools",get:function(){if(!this.toolsInstances||0===this.toolsInstances.size){var t=this.inlineTools;for(var e in this.toolsInstances=new Map,t)t.hasOwnProperty(e)&&this.toolsInstances.set(e,t[e])}return this.toolsInstances}},{key:"inlineTools",get:function(){var t={};for(var e in this.Editor.Tools.inline)this.Editor.Tools.inline.hasOwnProperty(e)&&(t[e]=this.Editor.Tools.constructInline(this.Editor.Tools.inline[e]));return t}}]),e}(l.default);r.default=b,b.displayName="InlineToolbar",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a){"use strict";var s=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=s(o),i=s(i),a=s(a);var u=function(){function t(){(0,o.default)(this,t),this.commandName="bold",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--bold"},this.nodes={button:void 0}}return(0,i.default)(t,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.appendChild(a.default.svg("bold",13,15)),this.nodes.button}},{key:"surround",value:function(t){document.execCommand(this.commandName)}},{key:"checkState",value:function(t){var e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}},{key:"shortcut",get:function(){return"CMD+B"}}],[{key:"sanitize",get:function(){return{b:{}}}}]),t}();r.default=u,u.displayName="BoldInlineTool",u.isInline=!0,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a){"use strict";var s=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=s(o),i=s(i),a=s(a);var u=function(){function t(){(0,o.default)(this,t),this.commandName="italic",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--italic"},this.nodes={button:null}}return(0,i.default)(t,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.appendChild(a.default.svg("italic",6,15)),this.nodes.button}},{key:"surround",value:function(t){document.execCommand(this.commandName)}},{key:"checkState",value:function(t){var e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}},{key:"shortcut",get:function(){return"CMD+I"}}],[{key:"sanitize",get:function(){return{i:{}}}}]),t}();r.default=u,u.displayName="ItalicInlineTool",u.isInline=!0,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(47),n(13),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u){"use strict";var c=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=c(o),i=c(i),a=c(a),s=c(s),u=c(u);var l=function(){function t(e){var n=e.api;(0,o.default)(this,t),this.commandLink="createLink",this.commandUnlink="unlink",this.ENTER_KEY=13,this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--link",buttonUnlink:"ce-inline-tool--unlink",input:"ce-inline-tool-input",inputShowed:"ce-inline-tool-input--showed"},this.nodes={button:null,input:null},this.inputOpened=!1,this.inlineToolbar=n.toolbar,this.notifier=n.notifier,this.selection=new a.default}return(0,i.default)(t,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.appendChild(s.default.svg("link",15,14)),this.nodes.button.appendChild(s.default.svg("unlink",16,18)),this.nodes.button}},{key:"renderActions",value:function(){var t=this;return this.nodes.input=document.createElement("input"),this.nodes.input.placeholder="Add a link",this.nodes.input.classList.add(this.CSS.input),this.nodes.input.addEventListener("keydown",function(e){e.keyCode===t.ENTER_KEY&&t.enterPressed(e)}),this.nodes.input}},{key:"surround",value:function(t){if(t){this.inputOpened?(this.selection.restore(),this.selection.removeFakeBackground()):(this.selection.setFakeBackground(),this.selection.save());var e=this.selection.findParentTag("A");if(e)return this.selection.expandToTag(e),this.unlink(),this.closeActions(),this.checkState(),void this.inlineToolbar.close()}this.toggleActions()}},{key:"checkState",value:function(t){var e=this.selection.findParentTag("A");if(e){this.nodes.button.classList.add(this.CSS.buttonUnlink),this.nodes.button.classList.add(this.CSS.buttonActive),this.openActions();var n=e.getAttribute("href");this.nodes.input.value="null"!==n?n:"",this.selection.save()}else this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive);return!!e}},{key:"clear",value:function(){this.closeActions()}},{key:"toggleActions",value:function(){this.inputOpened?this.closeActions(!1):this.openActions(!0)}},{key:"openActions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.nodes.input.classList.add(this.CSS.inputShowed),t&&this.nodes.input.focus(),this.inputOpened=!0}},{key:"closeActions",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.selection.isFakeBackgroundEnabled){var e=new a.default;e.save(),this.selection.restore(),this.selection.removeFakeBackground(),e.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),this.nodes.input.value="",t&&this.selection.clearSaved(),this.inputOpened=!1}},{key:"enterPressed",value:function(t){var e=this.nodes.input.value||"";if(e.trim()||(this.selection.restore(),this.unlink(),t.preventDefault(),this.closeActions()),!this.validateURL(e))return this.notifier.show({message:"Pasted link is not valid.",style:"error"}),void u.default.log("Incorrect Link pasted","warn",e);e=this.prepareLink(e),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(e),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.closeActions(),this.inlineToolbar.close(),this.checkState()}},{key:"validateURL",value:function(t){return!/\s/.test(t)}},{key:"prepareLink",value:function(t){return t=t.trim(),t=this.addProtocol(t)}},{key:"addProtocol",value:function(t){if(/^(\w+):\/\//.test(t))return t;var e=/^\/[^\/\s]/.test(t),n="#"===t.substring(0,1),r=/^\/\/[^\/\s]/.test(t);return e||n||r||(t="http://"+t),t}},{key:"insertLink",value:function(t){var e=this.selection.findParentTag("A");e&&this.selection.expandToTag(e),document.execCommand(this.commandLink,!1,t)}},{key:"unlink",value:function(){document.execCommand(this.commandUnlink)}},{key:"shortcut",get:function(){return"CMD+K"}}],[{key:"sanitize",get:function(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}}]),t}();r.default=l,l.displayName="LinkInlineTool",l.isInline=!0,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(6),n(7),n(5),n(4),n(13),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f){"use strict";var d=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=d(o),i=d(i),a=d(a),s=d(s),u=d(u),c=d(c),l=d(l),f=d(f);var p=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).opened=!1,t.nodes={toolbox:null,buttons:[]},t.activeButtonIndex=-1,t.displayedToolsCount=0,t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"make",value:function(){this.nodes.toolbox=l.default.make("div",e.CSS.toolbox),l.default.append(this.Editor.Toolbar.nodes.content,this.nodes.toolbox),this.addTools()}},{key:"toolButtonActivate",value:function(t,e){var n=this.Editor.Tools.toolsClasses[e];this.insertNewBlock(n,e)}},{key:"open",value:function(){this.isEmpty||(this.nodes.toolbox.classList.add(e.CSS.toolboxOpened),this.opened=!0)}},{key:"close",value:function(){this.nodes.toolbox.classList.remove(e.CSS.toolboxOpened),this.opened=!1,this.activeButtonIndex=-1;var t=this.nodes.toolbox.querySelector(".".concat(e.CSS.toolboxButtonActive));t&&t.classList.remove(e.CSS.toolboxButtonActive)}},{key:"toggle",value:function(){this.opened?this.close():this.open()}},{key:"leaf",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.LEAF_DIRECTIONS.RIGHT,n=this.nodes.toolbox.childNodes;-1===this.activeButtonIndex?this.activeButtonIndex=t===e.LEAF_DIRECTIONS.RIGHT?-1:0:n[this.activeButtonIndex].classList.remove(e.CSS.toolboxButtonActive),t===e.LEAF_DIRECTIONS.RIGHT?this.activeButtonIndex=(this.activeButtonIndex+1)%n.length:this.activeButtonIndex=(n.length+this.activeButtonIndex-1)%n.length,n[this.activeButtonIndex].classList.add(e.CSS.toolboxButtonActive)}},{key:"addTools",value:function(){var t=this.Editor.Tools.available;for(var e in t)t.hasOwnProperty(e)&&this.addTool(e,t[e])}},{key:"addTool",value:function(t,n){var r=this,o=this.Editor.Tools.apiSettings,i=n[o.TOOLBOX];if(!f.default.isEmpty(i))if(!i||i.icon){var a=this.Editor.Tools.getToolSettings(t),s=a.toolbox,u=void 0===s?{}:s,c=l.default.make("li",[e.CSS.toolboxButton],{title:u.title||i.title||t});c.dataset.tool=t,c.innerHTML=u.icon||i.icon,l.default.append(this.nodes.toolbox,c),this.nodes.toolbox.appendChild(c),this.nodes.buttons.push(c),this.Editor.Listeners.on(c,"click",function(e){r.toolButtonActivate(e,t)});var d=this.Editor.Tools.getToolSettings(t);d&&d[this.Editor.Tools.apiSettings.SHORTCUT]&&this.enableShortcut(n,t,d[this.Editor.Tools.apiSettings.SHORTCUT]),this.displayedToolsCount++}else f.default.log("Toolbar icon is missed. Tool %o skipped","warn",t)}},{key:"enableShortcut",value:function(t,e,n){var r=this;this.Editor.Shortcuts.add({name:n,handler:function(n){n.preventDefault(),r.insertNewBlock(t,e)}})}},{key:"insertNewBlock",value:function(t,e){var n,r=this.Editor.BlockManager.currentBlock;(n=r.isEmpty?this.Editor.BlockManager.replace(e):this.Editor.BlockManager.insert(e)).call("appendCallback",{}),this.Editor.Caret.setToBlock(n),this.Editor.Toolbar.close()}},{key:"getActiveTool",get:function(){var t=this.nodes.toolbox.childNodes;return-1===this.activeButtonIndex?null:t[this.activeButtonIndex].dataset.tool}},{key:"isEmpty",get:function(){return 0===this.displayedToolsCount}}],[{key:"CSS",get:function(){return{toolbox:"ce-toolbox",toolboxButton:"ce-toolbox__button",toolboxButtonActive:"ce-toolbox__button--active",toolboxOpened:"ce-toolbox--opened"}}}]),e}(c.default);r.default=p,p.displayName="Toolbox",p.LEAF_DIRECTIONS={RIGHT:"right",LEFT:"left"},t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(71),n(55),n(1),n(2),n(6),n(7),n(5),n(349),n(4),n(18),n(154),n(155),n(156),n(348)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p,h,v,g,y){"use strict";var b=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=b(o),i=b(i),a=b(a),s=b(s),u=b(u),c=b(c),l=b(l),f=b(f),d=b(d),p=b(p),h=b(h),v=b(v),g=b(g),y=b(y);var m=function(t){function e(t){var n,r=t.config;return(0,a.default)(this,e),(n=(0,u.default)(this,(0,c.default)(e).call(this,{config:r}))).stubTool="stub",n.toolsClasses={},n.toolsAvailable={},n.toolsUnavailable={},n.toolsSettings={},n._inlineTools={},n.toolsClasses={},n.toolsSettings={},n.toolsAvailable={},n.toolsUnavailable={},n._inlineTools=null,n}return(0,l.default)(e,t),(0,s.default)(e,[{key:"prepare",value:function(){var t=this;if(Object.assign(this.config.tools,this.internalTools),!this.config.hasOwnProperty("tools")||0===Object.keys(this.config.tools).length)throw Error("Can't start without tools");for(var e in this.config.tools)"object"===(0,i.default)(this.config.tools[e])?(this.toolsClasses[e]=this.config.tools[e].class,this.toolsSettings[e]=this.config.tools[e],delete this.toolsSettings[e].class):(this.toolsClasses[e]=this.config.tools[e],this.toolsSettings[e]={class:this.config.tools[e]});var n=this.getListOfPrepareFunctions();return 0===n.length?Promise.resolve():p.default.sequence(n,function(e){t.success(e)},function(e){t.fallback(e)})}},{key:"success",value:function(t){this.toolsAvailable[t.toolName]=this.toolsClasses[t.toolName]}},{key:"fallback",value:function(t){this.toolsUnavailable[t.toolName]=this.toolsClasses[t.toolName]}},{key:"construct",value:function(t,e){var n=this.toolsClasses[t],r=this.toolsSettings[t][this.apiSettings.CONFIG],o={api:this.Editor.API.methods,config:r||{},data:e};return new n(o)}},{key:"constructInline",value:function(t){var e={api:this.Editor.API.methods};return new t(e)}},{key:"isInitial",value:function(t){return t instanceof this.available[this.config.initialBlock]}},{key:"getToolSettings",value:function(t){return this.toolsSettings[t]}},{key:"getListOfPrepareFunctions",value:function(){var t=[];for(var e in this.toolsClasses)if(this.toolsClasses.hasOwnProperty(e)){var n=this.toolsClasses[e];"function"==typeof n.prepare?t.push({function:n.prepare,data:{toolName:e,config:this.toolsSettings[e][this.apiSettings.CONFIG]}}):this.toolsAvailable[e]=n}return t}},{key:"available",get:function(){return this.toolsAvailable}},{key:"unavailable",get:function(){return this.toolsUnavailable}},{key:"inline",get:function(){var t=this;if(this._inlineTools)return this._inlineTools;var e=Object.entries(this.available).filter(function(e){var n=(0,o.default)(e,2),r=(n[0],n[1]);if(!r[t.apiSettings.IS_INLINE])return!1;var i=["render","surround","checkState"].filter(function(e){return!t.constructInline(r)[e]});return!i.length||(p.default.log("Incorrect Inline Tool: ".concat(r.name,". Some of required methods is not implemented %o"),"warn",i),!1)}),n={};return e.forEach(function(t){var e=(0,o.default)(t,2),r=e[0],i=e[1];return n[r]=i}),this._inlineTools=n,this._inlineTools}},{key:"blockTools",get:function(){var t=this,e=Object.entries(this.available).filter(function(e){var n=(0,o.default)(e,2),r=(n[0],n[1]);return!r[t.apiSettings.IS_INLINE]}),n={};return e.forEach(function(t){var e=(0,o.default)(t,2),r=e[0],i=e[1];return n[r]=i}),n}},{key:"apiSettings",get:function(){return{CONFIG:"config",IS_ENABLED_INLINE_TOOLBAR:"inlineToolbar",IS_ENABLED_LINE_BREAKS:"enableLineBreaks",IS_INLINE:"isInline",IS_PASTE_DISALLOWED:"disallowPaste",SHORTCUT:"shortcut",TOOLBOX:"toolbox",SANITIZE_CONFIG:"sanitize"}}},{key:"internalTools",get:function(){return{bold:h.default,italic:v.default,link:g.default,paragraph:{class:f.default,inlineToolbar:!0},stub:y.default}}}]),e}(d.default);r.default=m,m.displayName="Tools",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(6),n(7),n(5),n(350),n(4),n(13),n(18),n(47)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p,h,v){"use strict";var g=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=g(o),i=g(i),a=g(a),s=g(s),u=g(u),c=g(c),l=g(l),f=g(f),d=g(d),p=g(p),h=g(h),v=g(v);var y=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,u.default)(this,(0,c.default)(e).apply(this,arguments))).nodes={holder:null,wrapper:null,redactor:null},t}var r,d;return(0,l.default)(e,t),(0,s.default)(e,[{key:"prepare",value:(d=(0,i.default)(o.default.mark(function t(){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.make();case 2:return t.next=4,this.appendSVGSprite();case 4:return t.next=6,this.Editor.Toolbar.make();case 6:return t.next=8,this.Editor.InlineToolbar.make();case 8:return t.next=10,this.loadStyles();case 10:return t.next=12,this.bindEvents();case 12:case"end":return t.stop()}},t,this)})),function(){return d.apply(this,arguments)})},{key:"destroy",value:function(){this.nodes.holder.innerHTML=""}},{key:"make",value:(r=(0,i.default)(o.default.mark(function t(){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.nodes.holder=document.getElementById(this.config.holderId),this.nodes.holder){t.next=3;break}throw Error("Holder wasn't found by ID: #"+this.config.holderId);case 3:this.nodes.wrapper=p.default.make("div",this.CSS.editorWrapper),this.nodes.redactor=p.default.make("div",this.CSS.editorZone),this.nodes.wrapper.appendChild(this.nodes.redactor),this.nodes.holder.appendChild(this.nodes.wrapper);case 7:case"end":return t.stop()}},t,this)})),function(){return r.apply(this,arguments)})},{key:"loadStyles",value:function(){var t=n(351),e=p.default.make("style",null,{textContent:t.toString()});p.default.prepend(document.head,e)}},{key:"bindEvents",value:function(){var t=this;this.Editor.Listeners.on(this.nodes.redactor,"click",function(e){return t.redactorClicked(e)},!1),this.Editor.Listeners.on(document,"keydown",function(e){return t.documentKeydown(e)},!0),this.Editor.Listeners.on(document,"click",function(e){return t.documentClicked(e)},!1)}},{key:"documentKeydown",value:function(t){switch(t.keyCode){case h.default.keyCodes.ENTER:this.enterPressed(t);break;default:this.defaultBehaviour(t)}}},{key:"defaultBehaviour",value:function(t){var e=t.target.closest(".".concat(this.CSS.editorWrapper));e||(this.Editor.BlockManager.dropPointer(),this.Editor.Toolbar.close())}},{key:"enterPressed",value:function(t){var e=this.Editor.BlockManager.currentBlockIndex>=0;if(!this.Editor.BlockSelection.anyBlockSelected){if(e&&"BODY"===t.target.tagName){var n=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(n),this.Editor.BlockManager.highlightCurrentNode(),this.Editor.Toolbar.move(),this.Editor.Toolbar.plusButton.show()}this.Editor.BlockSelection.clearSelection()}}},{key:"documentClicked",value:function(t){var e=t.target,n=e.closest(".".concat(this.Editor.InlineToolbar.CSS.inlineToolbar)),r=e.closest(".".concat(this.CSS.editorWrapper));r||v.default.isAtEditor||(this.Editor.BlockManager.dropPointer(),this.Editor.Toolbar.close()),n||this.Editor.InlineToolbar.handleShowingEvent(t),v.default.isAtEditor&&this.Editor.BlockManager.setCurrentBlockByChildNode(v.default.anchorNode),this.Editor.BlockSelection.clearSelection()}},{key:"redactorClicked",value:function(t){if(v.default.isCollapsed){var e=t.target;e===this.nodes.redactor&&(e=document.elementFromPoint(t.clientX,t.clientY));try{this.Editor.BlockManager.setCurrentBlockByChildNode(e),this.Editor.BlockManager.highlightCurrentNode()}catch(t){this.Editor.Caret.setToTheLastBlock()}t.stopImmediatePropagation(),t.stopPropagation(),this.Editor.Toolbar.open(),this.Editor.Toolbar.plusButton.hide(),this.Editor.BlockManager.currentBlock||this.Editor.BlockManager.insert();var n=this.Editor.Tools.isInitial(this.Editor.BlockManager.currentBlock.tool);if(n){var r=this.Editor.BlockManager.currentBlock.isEmpty;r&&this.Editor.Toolbar.plusButton.show()}this.Editor.BlockSelection.clearSelection()}}},{key:"appendSVGSprite",value:function(){var t=p.default.make("div");t.hidden=!0,t.style.display="none",t.innerHTML=f.default,p.default.append(this.nodes.wrapper,t)}},{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}}]),e}(d.default);r.default=y,y.displayName="UI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){n(161),t.exports=n(328)},function(t,e,n){n(162)},function(t,e,n){"use strict";n(163),n(307),n(309),n(311),n(313),n(315),n(317),n(319),n(321),n(323),n(327)},function(t,e,n){n(164),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(245),n(246),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(94),n(270),n(271),n(117),n(272),n(273),n(274),n(275),n(118),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),t.exports=n(16)},function(t,e,n){"use strict";var r=n(9),o=n(21),i=n(15),a=n(0),s=n(19),u=n(38).KEY,c=n(8),l=n(74),f=n(48),d=n(40),p=n(12),h=n(75),v=n(99),g=n(165),y=n(78),b=n(11),m=n(10),k=n(23),x=n(37),w=n(39),S=n(44),E=n(102),T=n(26),_=n(14),C=n(42),B=T.f,N=_.f,I=E.f,O=r.Symbol,A=r.JSON,M=A&&A.stringify,L=p("_hidden"),P=p("toPrimitive"),j={}.propertyIsEnumerable,F=l("symbol-registry"),R=l("symbols"),D=l("op-symbols"),U=Object.prototype,z="function"==typeof O,H=r.QObject,G=!H||!H.prototype||!H.prototype.findChild,W=i&&c(function(){return 7!=S(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=B(U,e);r&&delete U[e],N(t,e,n),r&&t!==U&&N(U,e,r)}:N,V=function(t){var e=R[t]=S(O.prototype);return e._k=t,e},K=z&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O},q=function(t,e,n){return t===U&&q(D,e,n),b(t),e=x(e,!0),b(n),o(R,e)?(n.enumerable?(o(t,L)&&t[L][e]&&(t[L][e]=!1),n=S(n,{enumerable:w(0,!1)})):(o(t,L)||N(t,L,w(1,{})),t[L][e]=!0),W(t,e,n)):N(t,e,n)},Y=function(t,e){b(t);for(var n,r=g(e=k(e)),o=0,i=r.length;i>o;)q(t,n=r[o++],e[n]);return t},X=function(t){var e=j.call(this,t=x(t,!0));return!(this===U&&o(R,t)&&!o(D,t))&&(!(e||!o(this,t)||!o(R,t)||o(this,L)&&this[L][t])||e)},J=function(t,e){if(t=k(t),e=x(e,!0),t!==U||!o(R,e)||o(D,e)){var n=B(t,e);return!n||!o(R,e)||o(t,L)&&t[L][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=I(k(t)),r=[],i=0;n.length>i;)o(R,e=n[i++])||e==L||e==u||r.push(e);return r},Z=function(t){for(var e,n=t===U,r=I(n?D:k(t)),i=[],a=0;r.length>a;)!o(R,e=r[a++])||n&&!o(U,e)||i.push(R[e]);return i};z||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var t=d(arguments.length>0?arguments[0]:void 0),e=function(n){this===U&&e.call(D,n),o(this,L)&&o(this[L],t)&&(this[L][t]=!1),W(this,t,w(1,n))};return i&&G&&W(U,t,{configurable:!0,set:e}),V(t)}).prototype,"toString",function(){return this._k}),T.f=J,_.f=q,n(45).f=E.f=$,n(58).f=X,n(60).f=Z,i&&!n(41)&&s(U,"propertyIsEnumerable",X,!0),h.f=function(t){return V(p(t))}),a(a.G+a.W+a.F*!z,{Symbol:O});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)p(Q[tt++]);for(var et=C(p.store),nt=0;et.length>nt;)v(et[nt++]);a(a.S+a.F*!z,"Symbol",{for:function(t){return o(F,t+="")?F[t]:F[t]=O(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){G=!0},useSimple:function(){G=!1}}),a(a.S+a.F*!z,"Object",{create:function(t,e){return void 0===e?S(t):Y(S(t),e)},defineProperty:q,defineProperties:Y,getOwnPropertyDescriptor:J,getOwnPropertyNames:$,getOwnPropertySymbols:Z}),A&&a(a.S+a.F*(!z||c(function(){var t=O();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(m(e)||void 0!==t)&&!K(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),r[1]=e,M.apply(A,r)}}),O.prototype[P]||n(22)(O.prototype,P,O.prototype.valueOf),f(O,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){var r=n(42),o=n(60),i=n(58);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),u=i.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(0);r(r.S,"Object",{create:n(44)})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(15),"Object",{defineProperty:n(14).f})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(15),"Object",{defineProperties:n(101)})},function(t,e,n){var r=n(23),o=n(26).f;n(27)("getOwnPropertyDescriptor",function(){return function(t,e){return o(r(t),e)}})},function(t,e,n){var r=n(24),o=n(46);n(27)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(24),o=n(42);n(27)("keys",function(){return function(t){return o(r(t))}})},function(t,e,n){n(27)("getOwnPropertyNames",function(){return n(102).f})},function(t,e,n){var r=n(10),o=n(38).onFreeze;n(27)("freeze",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(10),o=n(38).onFreeze;n(27)("seal",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(10),o=n(38).onFreeze;n(27)("preventExtensions",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(10);n(27)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(10);n(27)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(10);n(27)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(103)})},function(t,e,n){var r=n(0);r(r.S,"Object",{is:n(181)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(80).set})},function(t,e,n){"use strict";var r=n(61),o={};o[n(12)("toStringTag")]="z",o+""!="[object z]"&&n(19)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(0);r(r.P,"Function",{bind:n(104)})},function(t,e,n){var r=n(14).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(15)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(10),o=n(46),i=n(12)("hasInstance"),a=Function.prototype;i in a||n(14).f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(0),o=n(106);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(t,e,n){var r=n(0),o=n(107);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(t,e,n){"use strict";var r=n(9),o=n(21),i=n(33),a=n(82),s=n(37),u=n(8),c=n(45).f,l=n(26).f,f=n(14).f,d=n(62).trim,p=r.Number,h=p,v=p.prototype,g="Number"==i(n(44)(v)),y="trim"in String.prototype,b=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=y?e.trim():d(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,u=e.slice(2),c=0,l=u.length;co)return NaN;return parseInt(u,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(g?u(function(){v.valueOf.call(n)}):"Number"!=i(n))?a(new h(b(e)),n,p):b(e)};for(var m,k=n(15)?c(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;k.length>x;x++)o(h,m=k[x])&&!o(p,m)&&f(p,m,l(h,m));p.prototype=v,v.constructor=p,n(19)(r,"Number",p)}},function(t,e,n){"use strict";var r=n(0),o=n(35),i=n(108),a=n(83),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",f=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=u(r/1e7)},d=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=u(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},h=function(t,e,n){return 0===e?n:e%2==1?h(t,e-1,n*t):h(t*t,e/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(8)(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,r,s,u=i(this,l),c=o(t),v="",g="0";if(c<0||c>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(v="-",u=-u),u>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(u*h(2,69,1))-69)<0?u*h(2,-e,1):u/h(2,e,1),n*=4503599627370496,(e=52-e)>0){for(f(0,n),r=c;r>=7;)f(1e7,0),r-=7;for(f(h(10,r,1),0),r=e-1;r>=23;)d(1<<23),r-=23;d(1<0?v+((s=g.length)<=c?"0."+a.call("0",c-s)+g:g.slice(0,s-c)+"."+g.slice(s-c)):v+g}})},function(t,e,n){"use strict";var r=n(0),o=n(8),i=n(108),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(0),o=n(9).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{isInteger:n(109)})},function(t,e,n){var r=n(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),o=n(109),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,e,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),o=n(107);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(t,e,n){var r=n(0),o=n(106);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(t,e,n){var r=n(0),o=n(110),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},function(t,e,n){var r=n(0),o=Math.asinh;r(r.S+r.F*!(o&&1/o(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var r=n(0),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),o=n(84);r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(0),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},function(t,e,n){var r=n(0),o=n(85);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,e,n){var r=n(0);r(r.S,"Math",{fround:n(209)})},function(t,e,n){var r=n(84),o=Math.pow,i=o(2,-52),a=o(2,-23),s=o(2,127)*(2-a),u=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),c=r(t);return os||n!=n?c*(1/0):c*n}},function(t,e,n){var r=n(0),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,a=0,s=arguments.length,u=0;a0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(t,e,n){var r=n(0),o=Math.imul;r(r.S+r.F*n(8)(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log1p:n(110)})},function(t,e,n){var r=n(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(0);r(r.S,"Math",{sign:n(84)})},function(t,e,n){var r=n(0),o=n(85),i=Math.exp;r(r.S+r.F*n(8)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(0),o=n(85),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(0),o=n(43),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(0),o=n(23),i=n(17);r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(0),o=n(111)(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r=n(0),o=n(17),i=n(87),a="".endsWith;r(r.P+r.F*n(89)("endsWith"),"String",{endsWith:function(t){var e=i(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),s=void 0===n?r:Math.min(o(n),r),u=String(t);return a?a.call(e,u,s):e.slice(s-u.length,s)===u}})},function(t,e,n){"use strict";var r=n(0),o=n(87);r(r.P+r.F*n(89)("includes"),"String",{includes:function(t){return!!~o(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0);r(r.P,"String",{repeat:n(83)})},function(t,e,n){"use strict";var r=n(0),o=n(17),i=n(87),a="".startsWith;r(r.P+r.F*n(89)("startsWith"),"String",{startsWith:function(t){var e=i(this,t,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(20)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(20)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(20)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(20)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(20)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(20)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(20)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(20)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(20)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(20)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(20)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(20)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(20)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(0),o=n(24),i=n(37);r(r.P+r.F*n(8)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(0),o=n(244);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(t,e,n){"use strict";var r=n(8),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},function(t,e,n){var r=Date.prototype,o=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(19)(r,"toString",function(){var t=i.call(this);return t==t?o.call(this):"Invalid Date"})},function(t,e,n){var r=n(12)("toPrimitive"),o=Date.prototype;r in o||n(22)(o,r,n(247))},function(t,e,n){"use strict";var r=n(11),o=n(37);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),"number"!=t)}},function(t,e,n){var r=n(0);r(r.S,"Array",{isArray:n(78)})},function(t,e,n){"use strict";var r=n(31),o=n(0),i=n(24),a=n(113),s=n(90),u=n(17),c=n(91),l=n(92);o(o.S+o.F*!n(63)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,f,d=i(t),p="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,g=void 0!==v,y=0,b=l(d);if(g&&(v=r(v,h>2?arguments[2]:void 0,2)),null==b||p==Array&&s(b))for(n=new p(e=u(d.length));e>y;y++)c(n,y,g?v(d[y],y):d[y]);else for(f=b.call(d),n=new p;!(o=f.next()).done;y++)c(n,y,g?a(f,v,[o.value,y],!0):o.value);return n.length=y,n}})},function(t,e,n){"use strict";var r=n(0),o=n(91);r(r.S+r.F*n(8)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),o=n(23),i=[].join;r(r.P+r.F*(n(57)!=Object||!n(25)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(0),o=n(79),i=n(33),a=n(43),s=n(17),u=[].slice;r(r.P+r.F*n(8)(function(){o&&u.call(o)}),"Array",{slice:function(t,e){var n=s(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var o=a(t,n),c=a(e,n),l=s(c-o),f=new Array(l),d=0;d1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(0);r(r.P,"Array",{copyWithin:n(115)}),n(50)("copyWithin")},function(t,e,n){var r=n(0);r(r.P,"Array",{fill:n(93)}),n(50)("fill")},function(t,e,n){"use strict";var r=n(0),o=n(28)(5),i=!0;"find"in[]&&Array(1).find(function(){i=!1}),r(r.P+r.F*i,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(50)("find")},function(t,e,n){"use strict";var r=n(0),o=n(28)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(50)(i)},function(t,e,n){n(51)("Array")},function(t,e,n){var r=n(9),o=n(82),i=n(14).f,a=n(45).f,s=n(88),u=n(95),c=r.RegExp,l=c,f=c.prototype,d=/a/g,p=/a/g,h=new c(d)!==d;if(n(15)&&(!h||n(8)(function(){return p[n(12)("match")]=!1,c(d)!=d||c(p)==p||"/a/i"!=c(d,"i")}))){c=function(t,e){var n=this instanceof c,r=s(t),i=void 0===e;return!n&&r&&t.constructor===c&&i?t:o(h?new l(r&&!i?t.source:t,e):l((r=t instanceof c)?t.source:t,r&&i?u.call(t):e),n?this:f,c)};for(var v=function(t){t in c||i(c,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})},g=a(l),y=0;g.length>y;)v(g[y++]);f.constructor=c,c.prototype=f,n(19)(r,"RegExp",c)}n(51)("RegExp")},function(t,e,n){"use strict";n(117);var r=n(11),o=n(95),i=n(15),a=/./.toString,s=function(t){n(19)(RegExp.prototype,"toString",t,!0)};n(8)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},function(t,e,n){n(64)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(64)("replace",2,function(t,e,n){return[function(r,o){"use strict";var i=t(this),a=null==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},n]})},function(t,e,n){n(64)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(64)("split",2,function(t,e,r){"use strict";var o=n(88),i=r,a=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var s=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!o(t))return i.call(n,t,e);var r,u,c,l,f,d=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,v=void 0===e?4294967295:e>>>0,g=new RegExp(t.source,p+"g");for(s||(r=new RegExp("^"+g.source+"$(?!\\s)",p));(u=g.exec(n))&&!((c=u.index+u[0].length)>h&&(d.push(n.slice(h,u.index)),!s&&u.length>1&&u[0].replace(r,function(){for(f=1;f1&&u.index=v));)g.lastIndex===u.index&&g.lastIndex++;return h===n.length?!l&&g.test("")||d.push(""):d.push(n.slice(h)),d.length>v?d.slice(0,v):d}}else"0".split(void 0,0).length&&(r=function(t,e){return void 0===t&&0===e?[]:i.call(this,t,e)});return[function(n,o){var i=t(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,i,o):r.call(String(i),n,o)},r]})},function(t,e,n){var r=n(9),o=n(96).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(33)(a);t.exports=function(){var t,e,n,c=function(){var r,o;for(u&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(c)}}else n=function(){o.call(r,c)};else{var f=!0,d=document.createTextNode("");new i(c).observe(d,{characterData:!0}),n=function(){d.data=f=!f}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){"use strict";var r=n(121),o=n(54);t.exports=n(68)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(o(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(121),o=n(54);t.exports=n(68)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,o=n(28)(0),i=n(19),a=n(38),s=n(103),u=n(122),c=n(10),l=n(8),f=n(54),d=a.getWeak,p=Object.isExtensible,h=u.ufstore,v={},g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(c(t)){var e=d(t);return!0===e?h(f(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(f(this,"WeakMap"),t,e)}},b=t.exports=n(68)("WeakMap",g,y,u,!0,!0);l(function(){return 7!=(new b).set((Object.freeze||Object)(v),7).get(v)})&&(s((r=u.getConstructor(g,"WeakMap")).prototype,y),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=b.prototype,n=e[t];i(e,t,function(e,o){if(c(e)&&!p(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},function(t,e,n){"use strict";var r=n(122),o=n(54);n(68)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(0),o=n(69),i=n(97),a=n(11),s=n(43),u=n(17),c=n(10),l=n(9).ArrayBuffer,f=n(66),d=i.ArrayBuffer,p=i.DataView,h=o.ABV&&l.isView,v=d.prototype.slice,g=o.VIEW;r(r.G+r.W+r.F*(l!==d),{ArrayBuffer:d}),r(r.S+r.F*!o.CONSTR,"ArrayBuffer",{isView:function(t){return h&&h(t)||c(t)&&g in t}}),r(r.P+r.U+r.F*n(8)(function(){return!new d(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),o=s(void 0===e?n:e,n),i=new(f(this,d))(u(o-r)),c=new p(this),l=new p(i),h=0;r=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},function(t,e,n){var r=n(26),o=n(46),i=n(21),a=n(0),s=n(10),u=n(11);a(a.S,"Reflect",{get:function t(e,n){var a,c,l=arguments.length<3?e:arguments[2];return u(e)===l?e[n]:(a=r.f(e,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(l):void 0:s(c=o(e))?t(c,n,l):void 0}})},function(t,e,n){var r=n(26),o=n(0),i=n(11);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(i(t),e)}})},function(t,e,n){var r=n(0),o=n(46),i=n(11);r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),o=n(11),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(124)})},function(t,e,n){var r=n(0),o=n(11),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(14),o=n(26),i=n(46),a=n(21),s=n(0),u=n(39),c=n(11),l=n(10);s(s.S,"Reflect",{set:function t(e,n,s){var f,d,p=arguments.length<4?e:arguments[3],h=o.f(c(e),n);if(!h){if(l(d=i(e)))return t(d,n,s,p);h=u(0)}if(a(h,"value")){if(!1===h.writable||!l(p))return!1;if(f=o.f(p,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=s,r.f(p,n,f)}else r.f(p,n,u(0,s));return!0}return void 0!==h.set&&(h.set.call(p,s),!0)}})},function(t,e,n){var r=n(0),o=n(80);o&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){n(308),t.exports=n(16).Array.includes},function(t,e,n){"use strict";var r=n(0),o=n(59)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(50)("includes")},function(t,e,n){n(310),t.exports=n(16).String.padStart},function(t,e,n){"use strict";var r=n(0),o=n(125),i=n(67);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){n(312),t.exports=n(16).String.padEnd},function(t,e,n){"use strict";var r=n(0),o=n(125),i=n(67);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){n(314),t.exports=n(75).f("asyncIterator")},function(t,e,n){n(99)("asyncIterator")},function(t,e,n){n(316),t.exports=n(16).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(0),o=n(124),i=n(23),a=n(26),s=n(91);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),u=a.f,c=o(r),l={},f=0;c.length>f;)void 0!==(n=u(r,e=c[f++]))&&s(l,e,n);return l}})},function(t,e,n){n(318),t.exports=n(16).Object.values},function(t,e,n){var r=n(0),o=n(126)(!1);r(r.S,"Object",{values:function(t){return o(t)}})},function(t,e,n){n(320),t.exports=n(16).Object.entries},function(t,e,n){var r=n(0),o=n(126)(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},function(t,e,n){"use strict";n(118),n(322),t.exports=n(16).Promise.finally},function(t,e,n){"use strict";var r=n(0),o=n(16),i=n(9),a=n(66),s=n(120);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){n(324),n(325),n(326),t.exports=n(16)},function(t,e,n){var r=n(9),o=n(0),i=n(67),a=[].slice,s=/MSIE .\./.test(i),u=function(t){return function(e,n){var r=arguments.length>2,o=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};o(o.G+o.B+o.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(t,e,n){var r=n(0),o=n(96);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},function(t,e,n){for(var r=n(94),o=n(42),i=n(19),a=n(9),s=n(22),u=n(49),c=n(12),l=c("iterator"),f=c("toStringTag"),d=u.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(p),v=0;v=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function k(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new I(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=x(t,e,n);if("normal"===u.type){if(r=n.done?h:d,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function w(){}function S(){}function E(){}function T(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function _(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,a){var s=x(t[n],t,r);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(c).then(function(t){u.value=t,i(u)},a)}a(s.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function C(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,C(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=x(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(331),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag",c="object"==typeof t,l=e.regeneratorRuntime;if(l)c&&(t.exports=l);else{(l=e.regeneratorRuntime=c?t.exports:{}).wrap=k;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",v={},g={};g[a]=function(){return this};var y=Object.getPrototypeOf,b=y&&y(y(O([])));b&&b!==r&&o.call(b,a)&&(g=b);var m=E.prototype=w.prototype=Object.create(g);S.prototype=m.constructor=E,E.constructor=S,E[u]=S.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(m),t},l.awrap=function(t){return{__await:t}},T(_.prototype),_.prototype[s]=function(){return this},l.AsyncIterator=_,l.async=function(t,e,n,r){var o=new _(k(t,e,n,r));return l.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},T(m),m[u]="Generator",m[a]=function(){return this},m.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=O,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return s.type="throw",s.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function k(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new I(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=x(t,e,n);if("normal"===u.type){if(r=n.done?h:d,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function w(){}function S(){}function E(){}function T(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function _(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,a){var s=x(t[n],t,r);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(c).then(function(t){u.value=t,i(u)},function(t){return e("throw",t,i,a)})}a(s.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function C(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,C(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=x(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r2&&void 0!==arguments[2]&&arguments[2];if(this.length){t>this.length&&(t=this.length),n&&this.blocks[t].holder.remove();var r=n?1:0;if(this.blocks.splice(t,r,e),t>0){var o=this.blocks[t-1];o.holder.insertAdjacentElement("afterend",e.holder)}else{var i=this.blocks[t+1];i?i.holder.insertAdjacentElement("beforebegin",e.holder):this.workingArea.appendChild(e.holder)}}else this.push(e)}},{key:"remove",value:function(t){isNaN(t)&&(t=this.length-1),this.blocks[t].holder.remove(),this.blocks.splice(t,1)}},{key:"removeAll",value:function(){this.workingArea.innerHTML="",this.blocks.length=0}},{key:"insertAfter",value:function(t,e){var n=this.blocks.indexOf(t);this.insert(n+1,e)}},{key:"get",value:function(t){return this.blocks[t]}},{key:"indexOf",value:function(t){return this.blocks.indexOf(t)}}]),t}();r.default=c,c.displayName="Blocks",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a){"use strict";var s=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=s(o),i=s(i),a=s(a);var u=function(){function t(e){var n=e.api;(0,o.default)(this,t),this.CSS={button:"ce-settings__button",wrapper:"ce-tune-move-down",animation:"wobble"},this.api=n}return(0,i.default)(t,[{key:"render",value:function(){var t=this,e=a.default.make("div",[this.CSS.button,this.CSS.wrapper],{});return e.appendChild(a.default.svg("arrow-down",14,14)),this.api.listeners.on(e,"click",function(n){return t.handleClick(n,e)},!1),e}},{key:"handleClick",value:function(t,e){var n=this,r=this.api.blocks.getCurrentBlockIndex();if(r===this.api.blocks.getBlocksCount()-1)return e.classList.add(this.CSS.animation),void window.setTimeout(function(){e.classList.remove(n.CSS.animation)},500);var o=this.api.blocks.getBlockByIndex(r+1),i=o.getBoundingClientRect(),a=Math.abs(window.innerHeight-o.offsetHeight);i.top0?Math.abs(s.top)-Math.abs(u.top):window.innerHeight-Math.abs(s.top)+Math.abs(u.top),window.scrollBy(0,-1*o),this.api.blocks.swap(r,r-1)}}]),t}();r.default=u,u.displayName="MoveUpTune",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}([function(t,e,n){"use strict";n(1), + */},{key:"createHTMLJanitorInstance",value:function(t){return t?new p.default(t):null}}]),e}(f.default);r.default=v,v.displayName="Sanitizer",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f){"use strict";var d=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=d(o),i=d(i),a=d(a),s=d(s),u=d(u),c=d(c),l=d(l);var p=function(t){function e(){return(0,a.default)(this,e),(0,u.default)(this,(0,c.default)(e).apply(this,arguments))}var n;return(0,l.default)(e,t),(0,s.default)(e,[{key:"save",value:(n=(0,i.default)(o.default.mark(function t(){var e,n,r,i,a,s,u,c;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.Editor,n=e.BlockManager,r=e.Sanitizer,i=e.ModificationsObserver,a=n.blocks,s=[],i.disable(),a.forEach(function(t){s.push(t.save())}),t.next=6,Promise.all(s);case 6:return u=t.sent,t.next=9,r.sanitizeBlocks(u);case 9:return c=t.sent,i.enable(),t.abrupt("return",this.makeOutput(c));case 12:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"makeOutput",value:function(t){var e=this,n=0,r=[];return console.groupCollapsed("[CodexEditor saving]:"),t.forEach(function(t){console.log("«".concat(t.tool,"» saving info"),t),n+=t.time,t.tool!==e.Editor.Tools.stubTool?r.push({type:t.tool,data:t.data}):r.push(t.data)}),console.log("Total",n),console.groupEnd(),{time:+new Date,blocks:r,version:"2.7.19"}}}]),e}((f=d(f)).default);r.default=p,p.displayName="Saver",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(350),n(7)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l){"use strict";var f=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=f(o),i=f(i),a=f(a),s=f(s),u=f(u),c=f(c);var d=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).registeredShortcuts=[],t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"add",value:function(t){var e=this.Editor.UI,n=new c.default({name:t.name,on:e.nodes.redactor,callback:t.handler});this.registeredShortcuts.push(n)}},{key:"remove",value:function(t){var e=this.registeredShortcuts.findIndex(function(e){return e.name===t});this.registeredShortcuts[e].remove(),this.registeredShortcuts.splice(e,1)}}]),e}((l=f(l)).default);r.default=d,d.displayName="Shortcuts",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l){"use strict";var f=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=f(o),i=f(i),a=f(a),s=f(s),u=f(u),c=f(c),l=f(l);var d=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).nodes={wrapper:null,toolSettings:null,defaultSettings:null},t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"make",value:function(){this.nodes.wrapper=l.default.make("div",e.CSS.wrapper),this.nodes.toolSettings=l.default.make("div",e.CSS.toolSettings),this.nodes.defaultSettings=l.default.make("div",e.CSS.defaultSettings),l.default.append(this.nodes.wrapper,[this.nodes.toolSettings,this.nodes.defaultSettings])}},{key:"open",value:function(){this.nodes.wrapper.classList.add(e.CSS.wrapperOpened),this.addToolSettings(),this.addDefaultSettings(),this.Editor.Events.emit(this.events.opened)}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(e.CSS.wrapperOpened),this.nodes.toolSettings.innerHTML="",this.nodes.defaultSettings.innerHTML="",this.Editor.Events.emit(this.events.closed)}},{key:"addToolSettings",value:function(){"function"==typeof this.Editor.BlockManager.currentBlock.tool.renderSettings&&l.default.append(this.nodes.toolSettings,this.Editor.BlockManager.currentBlock.tool.renderSettings())}},{key:"addDefaultSettings",value:function(){l.default.append(this.nodes.defaultSettings,this.Editor.BlockManager.currentBlock.renderTunes())}},{key:"events",get:function(){return{opened:"block-settings-opened",closed:"block-settings-closed"}}},{key:"opened",get:function(){return this.nodes.wrapper.classList.contains(e.CSS.wrapperOpened)}}],[{key:"CSS",get:function(){return{wrapper:"ce-settings",wrapperOpened:"ce-settings--opened",toolSettings:"ce-settings__plugin-zone",defaultSettings:"ce-settings__default-zone",button:"ce-settings__button"}}}]),e}(c.default);r.default=d,d.displayName="BlockSettings",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(71),n(1),n(2),n(4),n(5),n(6),n(7),n(13),n(154),n(155),n(156),n(47),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p,h,v,g){"use strict";var y=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=y(o),i=y(i),a=y(a),s=y(s),u=y(u),c=y(c),l=y(l),f=y(f),d=y(d),p=y(p),h=y(h),v=y(v),g=y(g);var b=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,s.default)(this,(0,u.default)(e).apply(this,arguments))).CSS={inlineToolbar:"ce-inline-toolbar",inlineToolbarShowed:"ce-inline-toolbar--showed",buttonsWrapper:"ce-inline-toolbar__buttons",actionsWrapper:"ce-inline-toolbar__actions",inlineToolButton:"ce-inline-tool",inlineToolButtonLast:"ce-inline-tool--last",inputField:"cdx-input"},t.nodes={wrapper:null,buttons:null,actions:null},t.toolbarVerticalMargin=20,t}return(0,c.default)(e,t),(0,a.default)(e,[{key:"make",value:function(){this.nodes.wrapper=f.default.make("div",this.CSS.inlineToolbar),this.nodes.buttons=f.default.make("div",this.CSS.buttonsWrapper),this.nodes.actions=f.default.make("div",this.CSS.actionsWrapper),this.Editor.Listeners.on(this.nodes.wrapper,"mousedown",function(t){t.preventDefault()}),f.default.append(this.nodes.wrapper,[this.nodes.buttons,this.nodes.actions]),f.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.addTools()}},{key:"handleShowingEvent",value:function(t){this.allowedToShow()?(this.move(),this.open(),this.checkToolsState(),this.Editor.BlockSelection.clearSelection()):this.close()}},{key:"move",value:function(){var t=v.default.rect,e=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),n={x:t.x-e.left,y:t.y+t.height-e.top+this.toolbarVerticalMargin};t.width&&(n.x+=Math.floor(t.width/2)),this.nodes.wrapper.style.left=Math.floor(n.x)+"px",this.nodes.wrapper.style.top=Math.floor(n.y)+"px"}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed),this.tools.forEach(function(t){"function"==typeof t.clear&&t.clear()})}},{key:"open",value:function(){this.filterTools(),this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed),this.tools.forEach(function(t){"function"==typeof t.clear&&t.clear()})}},{key:"allowedToShow",value:function(){var t=v.default.get(),e=v.default.text;if(!t||!t.anchorNode)return!1;if(t.isCollapsed||e.length<1)return!1;var n=t.anchorNode.parentElement;if(t&&["IMG","INPUT"].includes(n.tagName))return!1;var r=n.closest('[contenteditable="true"]');if(null===r)return!1;var o=this.Editor.BlockManager.getBlock(t.anchorNode);if(!o)return!1;var i=this.Editor.Tools.getToolSettings(o.name);return i&&i[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR]}},{key:"filterTools",value:function(){var t=this,e=v.default.get(),n=this.Editor.BlockManager.getBlock(e.anchorNode),r=this.Editor.Tools.getToolSettings(n.name),o=r&&r[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR],i=Array.from(this.nodes.buttons.querySelectorAll(".".concat(this.CSS.inlineToolButton)));i.forEach(function(e){e.hidden=!1,e.classList.remove(t.CSS.inlineToolButtonLast)}),Array.isArray(o)&&i.forEach(function(t){t.hidden=!o.includes(t.dataset.tool)});var a=i.filter(function(t){return!t.hidden}).pop();a&&a.classList.add(this.CSS.inlineToolButtonLast)}},{key:"addTools",value:function(){var t=this;this.tools.forEach(function(e,n){t.addTool(n,e)})}},{key:"addTool",value:function(t,e){var n=this,r=this.Editor,i=r.Listeners,a=r.Tools,s=e.render();if(s){if(s.dataset.tool=t,this.nodes.buttons.appendChild(s),"function"==typeof e.renderActions){var u=e.renderActions();this.nodes.actions.appendChild(u)}i.on(s,"click",function(t){n.toolClicked(e),t.preventDefault()});var c=a.getToolSettings(t),l=null,f=Object.entries(a.internalTools).filter(function(t){var e=(0,o.default)(t,2),n=(e[0],e[1]);return g.default.isFunction(n)?n[a.apiSettings.IS_INLINE]:n.class[a.apiSettings.IS_INLINE]}).map(function(t){var e=(0,o.default)(t,1),n=e[0];return n});f.includes(t)?l=this.inlineTools[t].shortcut:c&&c[a.apiSettings.SHORTCUT]&&(l=c[a.apiSettings.SHORTCUT]),l&&this.enableShortcuts(e,l)}else g.default.log("Render method must return an instance of Node","warn",t)}},{key:"enableShortcuts",value:function(t,e){var n=this;this.Editor.Shortcuts.add({name:e,handler:function(e){var r=n.Editor.BlockManager.currentBlock;if(r){var o=n.Editor.Tools.getToolSettings(r.name);o&&o[n.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR]&&(e.preventDefault(),n.toolClicked(t))}}})}},{key:"toolClicked",value:function(t){var e=v.default.range;t.surround(e),this.checkToolsState()}},{key:"checkToolsState",value:function(){this.tools.forEach(function(t){t.checkState(v.default.get())})}},{key:"internalTools",get:function(){return{bold:this.Editor.Tools.constructInline(d.default),italic:this.Editor.Tools.constructInline(p.default),link:this.Editor.Tools.constructInline(h.default)}}},{key:"externalTools",get:function(){var t={};for(var e in this.Editor.Tools.inline)this.Editor.Tools.inline.hasOwnProperty(e)&&(t[e]=this.Editor.Tools.constructInline(this.Editor.Tools.inline[e]));return t}},{key:"tools",get:function(){if(!this.toolsInstances||0===this.toolsInstances.size){var t=this.inlineTools;for(var e in this.toolsInstances=new Map,t)t.hasOwnProperty(e)&&this.toolsInstances.set(e,t[e])}return this.toolsInstances}},{key:"inlineTools",get:function(){var t={};for(var e in this.Editor.Tools.inline)this.Editor.Tools.inline.hasOwnProperty(e)&&(t[e]=this.Editor.Tools.constructInline(this.Editor.Tools.inline[e]));return t}}]),e}(l.default);r.default=b,b.displayName="InlineToolbar",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a){"use strict";var s=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=s(o),i=s(i),a=s(a);var u=function(){function t(){(0,o.default)(this,t),this.commandName="bold",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--bold"},this.nodes={button:void 0}}return(0,i.default)(t,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.appendChild(a.default.svg("bold",13,15)),this.nodes.button}},{key:"surround",value:function(t){document.execCommand(this.commandName)}},{key:"checkState",value:function(t){var e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}},{key:"shortcut",get:function(){return"CMD+B"}}],[{key:"sanitize",get:function(){return{b:{}}}}]),t}();r.default=u,u.displayName="BoldInlineTool",u.isInline=!0,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a){"use strict";var s=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=s(o),i=s(i),a=s(a);var u=function(){function t(){(0,o.default)(this,t),this.commandName="italic",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--italic"},this.nodes={button:null}}return(0,i.default)(t,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.appendChild(a.default.svg("italic",6,15)),this.nodes.button}},{key:"surround",value:function(t){document.execCommand(this.commandName)}},{key:"checkState",value:function(t){var e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}},{key:"shortcut",get:function(){return"CMD+I"}}],[{key:"sanitize",get:function(){return{i:{}}}}]),t}();r.default=u,u.displayName="ItalicInlineTool",u.isInline=!0,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(47),n(13),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u){"use strict";var c=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=c(o),i=c(i),a=c(a),s=c(s),u=c(u);var l=function(){function t(e){var n=e.api;(0,o.default)(this,t),this.commandLink="createLink",this.commandUnlink="unlink",this.ENTER_KEY=13,this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--link",buttonUnlink:"ce-inline-tool--unlink",input:"ce-inline-tool-input",inputShowed:"ce-inline-tool-input--showed"},this.nodes={button:null,input:null},this.inputOpened=!1,this.inlineToolbar=n.toolbar,this.notifier=n.notifier,this.selection=new a.default}return(0,i.default)(t,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.appendChild(s.default.svg("link",15,14)),this.nodes.button.appendChild(s.default.svg("unlink",16,18)),this.nodes.button}},{key:"renderActions",value:function(){var t=this;return this.nodes.input=document.createElement("input"),this.nodes.input.placeholder="Add a link",this.nodes.input.classList.add(this.CSS.input),this.nodes.input.addEventListener("keydown",function(e){e.keyCode===t.ENTER_KEY&&t.enterPressed(e)}),this.nodes.input}},{key:"surround",value:function(t){if(t){this.inputOpened?(this.selection.restore(),this.selection.removeFakeBackground()):(this.selection.setFakeBackground(),this.selection.save());var e=this.selection.findParentTag("A");if(e)return this.selection.expandToTag(e),this.unlink(),this.closeActions(),this.checkState(),void this.inlineToolbar.close()}this.toggleActions()}},{key:"checkState",value:function(t){var e=this.selection.findParentTag("A");if(e){this.nodes.button.classList.add(this.CSS.buttonUnlink),this.nodes.button.classList.add(this.CSS.buttonActive),this.openActions();var n=e.getAttribute("href");this.nodes.input.value="null"!==n?n:"",this.selection.save()}else this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive);return!!e}},{key:"clear",value:function(){this.closeActions()}},{key:"toggleActions",value:function(){this.inputOpened?this.closeActions(!1):this.openActions(!0)}},{key:"openActions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.nodes.input.classList.add(this.CSS.inputShowed),t&&this.nodes.input.focus(),this.inputOpened=!0}},{key:"closeActions",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.selection.isFakeBackgroundEnabled){var e=new a.default;e.save(),this.selection.restore(),this.selection.removeFakeBackground(),e.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),this.nodes.input.value="",t&&this.selection.clearSaved(),this.inputOpened=!1}},{key:"enterPressed",value:function(t){var e=this.nodes.input.value||"";if(e.trim()||(this.selection.restore(),this.unlink(),t.preventDefault(),this.closeActions()),!this.validateURL(e))return this.notifier.show({message:"Pasted link is not valid.",style:"error"}),void u.default.log("Incorrect Link pasted","warn",e);e=this.prepareLink(e),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(e),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.closeActions(),this.inlineToolbar.close(),this.checkState()}},{key:"validateURL",value:function(t){return!/\s/.test(t)}},{key:"prepareLink",value:function(t){return t=t.trim(),t=this.addProtocol(t)}},{key:"addProtocol",value:function(t){if(/^(\w+):\/\//.test(t))return t;var e=/^\/[^\/\s]/.test(t),n="#"===t.substring(0,1),r=/^\/\/[^\/\s]/.test(t);return e||n||r||(t="http://"+t),t}},{key:"insertLink",value:function(t){var e=this.selection.findParentTag("A");e&&this.selection.expandToTag(e),document.execCommand(this.commandLink,!1,t)}},{key:"unlink",value:function(){document.execCommand(this.commandUnlink)}},{key:"shortcut",get:function(){return"CMD+K"}}],[{key:"sanitize",get:function(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}}]),t}();r.default=l,l.displayName="LinkInlineTool",l.isInline=!0,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(13),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f){"use strict";var d=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=d(o),i=d(i),a=d(a),s=d(s),u=d(u),c=d(c),l=d(l),f=d(f);var p=function(t){function e(){var t;return(0,o.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).opened=!1,t.nodes={toolbox:null,buttons:[]},t.activeButtonIndex=-1,t.displayedToolsCount=0,t}return(0,u.default)(e,t),(0,i.default)(e,[{key:"make",value:function(){this.nodes.toolbox=l.default.make("div",e.CSS.toolbox),l.default.append(this.Editor.Toolbar.nodes.content,this.nodes.toolbox),this.addTools()}},{key:"toolButtonActivate",value:function(t,e){var n=this.Editor.Tools.toolsClasses[e];this.insertNewBlock(n,e)}},{key:"open",value:function(){this.isEmpty||(this.nodes.toolbox.classList.add(e.CSS.toolboxOpened),this.opened=!0)}},{key:"close",value:function(){this.nodes.toolbox.classList.remove(e.CSS.toolboxOpened),this.opened=!1,this.activeButtonIndex=-1;var t=this.nodes.toolbox.querySelector(".".concat(e.CSS.toolboxButtonActive));t&&t.classList.remove(e.CSS.toolboxButtonActive)}},{key:"toggle",value:function(){this.opened?this.close():this.open()}},{key:"leaf",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.LEAF_DIRECTIONS.RIGHT,n=this.nodes.toolbox.childNodes;-1===this.activeButtonIndex?this.activeButtonIndex=t===e.LEAF_DIRECTIONS.RIGHT?-1:0:n[this.activeButtonIndex].classList.remove(e.CSS.toolboxButtonActive),t===e.LEAF_DIRECTIONS.RIGHT?this.activeButtonIndex=(this.activeButtonIndex+1)%n.length:this.activeButtonIndex=(n.length+this.activeButtonIndex-1)%n.length,n[this.activeButtonIndex].classList.add(e.CSS.toolboxButtonActive)}},{key:"addTools",value:function(){var t=this.Editor.Tools.available;for(var e in t)t.hasOwnProperty(e)&&this.addTool(e,t[e])}},{key:"addTool",value:function(t,n){var r=this,o=this.Editor.Tools.apiSettings,i=n[o.TOOLBOX];if(!f.default.isEmpty(i))if(!i||i.icon){var a=this.Editor.Tools.getToolSettings(t),s=a.toolbox,u=void 0===s?{}:s,c=l.default.make("li",[e.CSS.toolboxButton],{title:u.title||i.title||t});c.dataset.tool=t,c.innerHTML=u.icon||i.icon,l.default.append(this.nodes.toolbox,c),this.nodes.toolbox.appendChild(c),this.nodes.buttons.push(c),this.Editor.Listeners.on(c,"click",function(e){r.toolButtonActivate(e,t)});var d=this.Editor.Tools.getToolSettings(t);d&&d[this.Editor.Tools.apiSettings.SHORTCUT]&&this.enableShortcut(n,t,d[this.Editor.Tools.apiSettings.SHORTCUT]),this.displayedToolsCount++}else f.default.log("Toolbar icon is missed. Tool %o skipped","warn",t)}},{key:"enableShortcut",value:function(t,e,n){var r=this;this.Editor.Shortcuts.add({name:n,handler:function(n){n.preventDefault(),r.insertNewBlock(t,e)}})}},{key:"insertNewBlock",value:function(t,e){var n,r=this.Editor.BlockManager.currentBlock;(n=r.isEmpty?this.Editor.BlockManager.replace(e):this.Editor.BlockManager.insert(e)).call("appendCallback",{}),this.Editor.Caret.setToBlock(n),this.Editor.Toolbar.close()}},{key:"getActiveTool",get:function(){var t=this.nodes.toolbox.childNodes;return-1===this.activeButtonIndex?null:t[this.activeButtonIndex].dataset.tool}},{key:"isEmpty",get:function(){return 0===this.displayedToolsCount}}],[{key:"CSS",get:function(){return{toolbox:"ce-toolbox",toolboxButton:"ce-toolbox__button",toolboxButtonActive:"ce-toolbox__button--active",toolboxOpened:"ce-toolbox--opened"}}}]),e}(c.default);r.default=p,p.displayName="Toolbox",p.LEAF_DIRECTIONS={RIGHT:"right",LEFT:"left"},t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(71),n(55),n(1),n(2),n(4),n(5),n(6),n(351),n(7),n(18),n(154),n(155),n(156),n(352)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p,h,v,g,y){"use strict";var b=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=b(o),i=b(i),a=b(a),s=b(s),u=b(u),c=b(c),l=b(l),f=b(f),d=b(d),p=b(p),h=b(h),v=b(v),g=b(g),y=b(y);var m=function(t){function e(t){var n,r=t.config;return(0,a.default)(this,e),(n=(0,u.default)(this,(0,c.default)(e).call(this,{config:r}))).stubTool="stub",n.toolsClasses={},n.toolsAvailable={},n.toolsUnavailable={},n.toolsSettings={},n._inlineTools={},n.toolsClasses={},n.toolsSettings={},n.toolsAvailable={},n.toolsUnavailable={},n._inlineTools=null,n}return(0,l.default)(e,t),(0,s.default)(e,[{key:"prepare",value:function(){var t=this;if(Object.assign(this.config.tools,this.internalTools),!this.config.hasOwnProperty("tools")||0===Object.keys(this.config.tools).length)throw Error("Can't start without tools");for(var e in this.config.tools)"object"===(0,i.default)(this.config.tools[e])?(this.toolsClasses[e]=this.config.tools[e].class,this.toolsSettings[e]=this.config.tools[e],delete this.toolsSettings[e].class):(this.toolsClasses[e]=this.config.tools[e],this.toolsSettings[e]={class:this.config.tools[e]});var n=this.getListOfPrepareFunctions();return 0===n.length?Promise.resolve():p.default.sequence(n,function(e){t.success(e)},function(e){t.fallback(e)})}},{key:"success",value:function(t){this.toolsAvailable[t.toolName]=this.toolsClasses[t.toolName]}},{key:"fallback",value:function(t){this.toolsUnavailable[t.toolName]=this.toolsClasses[t.toolName]}},{key:"construct",value:function(t,e){var n=this.toolsClasses[t],r=this.toolsSettings[t][this.apiSettings.CONFIG],o={api:this.Editor.API.methods,config:r||{},data:e};return new n(o)}},{key:"constructInline",value:function(t){var e={api:this.Editor.API.methods};return new t(e)}},{key:"isInitial",value:function(t){return t instanceof this.available[this.config.initialBlock]}},{key:"getToolSettings",value:function(t){return this.toolsSettings[t]}},{key:"getListOfPrepareFunctions",value:function(){var t=[];for(var e in this.toolsClasses)if(this.toolsClasses.hasOwnProperty(e)){var n=this.toolsClasses[e];"function"==typeof n.prepare?t.push({function:n.prepare,data:{toolName:e,config:this.toolsSettings[e][this.apiSettings.CONFIG]}}):this.toolsAvailable[e]=n}return t}},{key:"available",get:function(){return this.toolsAvailable}},{key:"unavailable",get:function(){return this.toolsUnavailable}},{key:"inline",get:function(){var t=this;if(this._inlineTools)return this._inlineTools;var e=Object.entries(this.available).filter(function(e){var n=(0,o.default)(e,2),r=(n[0],n[1]);if(!r[t.apiSettings.IS_INLINE])return!1;var i=["render","surround","checkState"].filter(function(e){return!t.constructInline(r)[e]});return!i.length||(p.default.log("Incorrect Inline Tool: ".concat(r.name,". Some of required methods is not implemented %o"),"warn",i),!1)}),n={};return e.forEach(function(t){var e=(0,o.default)(t,2),r=e[0],i=e[1];return n[r]=i}),this._inlineTools=n,this._inlineTools}},{key:"blockTools",get:function(){var t=this,e=Object.entries(this.available).filter(function(e){var n=(0,o.default)(e,2),r=(n[0],n[1]);return!r[t.apiSettings.IS_INLINE]}),n={};return e.forEach(function(t){var e=(0,o.default)(t,2),r=e[0],i=e[1];return n[r]=i}),n}},{key:"apiSettings",get:function(){return{CONFIG:"config",IS_ENABLED_INLINE_TOOLBAR:"inlineToolbar",IS_ENABLED_LINE_BREAKS:"enableLineBreaks",IS_INLINE:"isInline",IS_PASTE_DISALLOWED:"disallowPaste",SHORTCUT:"shortcut",TOOLBOX:"toolbox",SANITIZE_CONFIG:"sanitize"}}},{key:"internalTools",get:function(){return{bold:h.default,italic:v.default,link:g.default,paragraph:{class:f.default,inlineToolbar:!0},stub:y.default}}}]),e}(d.default);r.default=m,m.displayName="Tools",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(29),n(30),n(1),n(2),n(4),n(5),n(6),n(353),n(7),n(13),n(18),n(47)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l,f,d,p,h,v){"use strict";var g=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=g(o),i=g(i),a=g(a),s=g(s),u=g(u),c=g(c),l=g(l),f=g(f),d=g(d),p=g(p),h=g(h),v=g(v);var y=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,u.default)(this,(0,c.default)(e).apply(this,arguments))).nodes={holder:null,wrapper:null,redactor:null},t}var r,d;return(0,l.default)(e,t),(0,s.default)(e,[{key:"prepare",value:(d=(0,i.default)(o.default.mark(function t(){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.make();case 2:return t.next=4,this.appendSVGSprite();case 4:return t.next=6,this.Editor.Toolbar.make();case 6:return t.next=8,this.Editor.InlineToolbar.make();case 8:return t.next=10,this.loadStyles();case 10:return t.next=12,this.bindEvents();case 12:case"end":return t.stop()}},t,this)})),function(){return d.apply(this,arguments)})},{key:"destroy",value:function(){this.nodes.holder.innerHTML=""}},{key:"make",value:(r=(0,i.default)(o.default.mark(function t(){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.nodes.holder=document.getElementById(this.config.holderId),this.nodes.holder){t.next=3;break}throw Error("Holder wasn't found by ID: #"+this.config.holderId);case 3:this.nodes.wrapper=p.default.make("div",this.CSS.editorWrapper),this.nodes.redactor=p.default.make("div",this.CSS.editorZone),this.nodes.wrapper.appendChild(this.nodes.redactor),this.nodes.holder.appendChild(this.nodes.wrapper);case 7:case"end":return t.stop()}},t,this)})),function(){return r.apply(this,arguments)})},{key:"loadStyles",value:function(){var t=n(354),e=p.default.make("style",null,{textContent:t.toString()});p.default.prepend(document.head,e)}},{key:"bindEvents",value:function(){var t=this;this.Editor.Listeners.on(this.nodes.redactor,"click",function(e){return t.redactorClicked(e)},!1),this.Editor.Listeners.on(document,"keydown",function(e){return t.documentKeydown(e)},!0),this.Editor.Listeners.on(document,"click",function(e){return t.documentClicked(e)},!1)}},{key:"documentKeydown",value:function(t){switch(t.keyCode){case h.default.keyCodes.ENTER:this.enterPressed(t);break;default:this.defaultBehaviour(t)}}},{key:"defaultBehaviour",value:function(t){var e=t.target.closest(".".concat(this.CSS.editorWrapper));e||(this.Editor.BlockManager.dropPointer(),this.Editor.Toolbar.close())}},{key:"enterPressed",value:function(t){var e=this.Editor.BlockManager.currentBlockIndex>=0;if(!this.Editor.BlockSelection.anyBlockSelected){if(e&&"BODY"===t.target.tagName){var n=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(n),this.Editor.BlockManager.highlightCurrentNode(),this.Editor.Toolbar.move(),this.Editor.Toolbar.plusButton.show()}this.Editor.BlockSelection.clearSelection()}}},{key:"documentClicked",value:function(t){var e=t.target,n=e.closest(".".concat(this.Editor.InlineToolbar.CSS.inlineToolbar)),r=e.closest(".".concat(this.CSS.editorWrapper));r||v.default.isAtEditor||(this.Editor.BlockManager.dropPointer(),this.Editor.Toolbar.close()),n||this.Editor.InlineToolbar.handleShowingEvent(t),v.default.isAtEditor&&this.Editor.BlockManager.setCurrentBlockByChildNode(v.default.anchorNode),this.Editor.BlockSelection.clearSelection()}},{key:"redactorClicked",value:function(t){if(v.default.isCollapsed){var e=t.target;e===this.nodes.redactor&&(e=document.elementFromPoint(t.clientX,t.clientY));try{this.Editor.BlockManager.setCurrentBlockByChildNode(e),this.Editor.BlockManager.highlightCurrentNode()}catch(t){this.Editor.Caret.setToTheLastBlock()}t.stopImmediatePropagation(),t.stopPropagation(),this.Editor.Toolbar.open(),this.Editor.Toolbar.plusButton.hide(),this.Editor.BlockManager.currentBlock||this.Editor.BlockManager.insert();var n=this.Editor.Tools.isInitial(this.Editor.BlockManager.currentBlock.tool);if(n){var r=this.Editor.BlockManager.currentBlock.isEmpty;r&&this.Editor.Toolbar.plusButton.show()}this.Editor.BlockSelection.clearSelection()}}},{key:"appendSVGSprite",value:function(){var t=p.default.make("div");t.hidden=!0,t.style.display="none",t.innerHTML=f.default,p.default.append(this.nodes.wrapper,t)}},{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}}]),e}(d.default);r.default=y,y.displayName="UI",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){n(161),t.exports=n(328)},function(t,e,n){n(162)},function(t,e,n){"use strict";n(163),n(307),n(309),n(311),n(313),n(315),n(317),n(319),n(321),n(323),n(327)},function(t,e,n){n(164),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(245),n(246),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(94),n(270),n(271),n(117),n(272),n(273),n(274),n(275),n(118),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),t.exports=n(16)},function(t,e,n){"use strict";var r=n(9),o=n(21),i=n(15),a=n(0),s=n(19),u=n(38).KEY,c=n(8),l=n(74),f=n(48),d=n(40),p=n(12),h=n(75),v=n(99),g=n(165),y=n(78),b=n(11),m=n(10),k=n(23),x=n(37),w=n(39),S=n(44),E=n(102),T=n(26),_=n(14),C=n(42),B=T.f,N=_.f,I=E.f,O=r.Symbol,A=r.JSON,M=A&&A.stringify,L=p("_hidden"),P=p("toPrimitive"),j={}.propertyIsEnumerable,F=l("symbol-registry"),R=l("symbols"),D=l("op-symbols"),U=Object.prototype,z="function"==typeof O,H=r.QObject,G=!H||!H.prototype||!H.prototype.findChild,W=i&&c(function(){return 7!=S(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=B(U,e);r&&delete U[e],N(t,e,n),r&&t!==U&&N(U,e,r)}:N,V=function(t){var e=R[t]=S(O.prototype);return e._k=t,e},K=z&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O},q=function(t,e,n){return t===U&&q(D,e,n),b(t),e=x(e,!0),b(n),o(R,e)?(n.enumerable?(o(t,L)&&t[L][e]&&(t[L][e]=!1),n=S(n,{enumerable:w(0,!1)})):(o(t,L)||N(t,L,w(1,{})),t[L][e]=!0),W(t,e,n)):N(t,e,n)},Y=function(t,e){b(t);for(var n,r=g(e=k(e)),o=0,i=r.length;i>o;)q(t,n=r[o++],e[n]);return t},X=function(t){var e=j.call(this,t=x(t,!0));return!(this===U&&o(R,t)&&!o(D,t))&&(!(e||!o(this,t)||!o(R,t)||o(this,L)&&this[L][t])||e)},J=function(t,e){if(t=k(t),e=x(e,!0),t!==U||!o(R,e)||o(D,e)){var n=B(t,e);return!n||!o(R,e)||o(t,L)&&t[L][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=I(k(t)),r=[],i=0;n.length>i;)o(R,e=n[i++])||e==L||e==u||r.push(e);return r},Z=function(t){for(var e,n=t===U,r=I(n?D:k(t)),i=[],a=0;r.length>a;)!o(R,e=r[a++])||n&&!o(U,e)||i.push(R[e]);return i};z||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var t=d(arguments.length>0?arguments[0]:void 0),e=function(n){this===U&&e.call(D,n),o(this,L)&&o(this[L],t)&&(this[L][t]=!1),W(this,t,w(1,n))};return i&&G&&W(U,t,{configurable:!0,set:e}),V(t)}).prototype,"toString",function(){return this._k}),T.f=J,_.f=q,n(45).f=E.f=$,n(58).f=X,n(60).f=Z,i&&!n(41)&&s(U,"propertyIsEnumerable",X,!0),h.f=function(t){return V(p(t))}),a(a.G+a.W+a.F*!z,{Symbol:O});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)p(Q[tt++]);for(var et=C(p.store),nt=0;et.length>nt;)v(et[nt++]);a(a.S+a.F*!z,"Symbol",{for:function(t){return o(F,t+="")?F[t]:F[t]=O(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){G=!0},useSimple:function(){G=!1}}),a(a.S+a.F*!z,"Object",{create:function(t,e){return void 0===e?S(t):Y(S(t),e)},defineProperty:q,defineProperties:Y,getOwnPropertyDescriptor:J,getOwnPropertyNames:$,getOwnPropertySymbols:Z}),A&&a(a.S+a.F*(!z||c(function(){var t=O();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(m(e)||void 0!==t)&&!K(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),r[1]=e,M.apply(A,r)}}),O.prototype[P]||n(22)(O.prototype,P,O.prototype.valueOf),f(O,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){var r=n(42),o=n(60),i=n(58);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),u=i.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(0);r(r.S,"Object",{create:n(44)})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(15),"Object",{defineProperty:n(14).f})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(15),"Object",{defineProperties:n(101)})},function(t,e,n){var r=n(23),o=n(26).f;n(27)("getOwnPropertyDescriptor",function(){return function(t,e){return o(r(t),e)}})},function(t,e,n){var r=n(24),o=n(46);n(27)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(24),o=n(42);n(27)("keys",function(){return function(t){return o(r(t))}})},function(t,e,n){n(27)("getOwnPropertyNames",function(){return n(102).f})},function(t,e,n){var r=n(10),o=n(38).onFreeze;n(27)("freeze",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(10),o=n(38).onFreeze;n(27)("seal",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(10),o=n(38).onFreeze;n(27)("preventExtensions",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(10);n(27)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(10);n(27)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(10);n(27)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(103)})},function(t,e,n){var r=n(0);r(r.S,"Object",{is:n(181)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(80).set})},function(t,e,n){"use strict";var r=n(61),o={};o[n(12)("toStringTag")]="z",o+""!="[object z]"&&n(19)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(0);r(r.P,"Function",{bind:n(104)})},function(t,e,n){var r=n(14).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(15)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(10),o=n(46),i=n(12)("hasInstance"),a=Function.prototype;i in a||n(14).f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(0),o=n(106);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(t,e,n){var r=n(0),o=n(107);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(t,e,n){"use strict";var r=n(9),o=n(21),i=n(33),a=n(82),s=n(37),u=n(8),c=n(45).f,l=n(26).f,f=n(14).f,d=n(62).trim,p=r.Number,h=p,v=p.prototype,g="Number"==i(n(44)(v)),y="trim"in String.prototype,b=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=y?e.trim():d(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,u=e.slice(2),c=0,l=u.length;co)return NaN;return parseInt(u,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(g?u(function(){v.valueOf.call(n)}):"Number"!=i(n))?a(new h(b(e)),n,p):b(e)};for(var m,k=n(15)?c(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;k.length>x;x++)o(h,m=k[x])&&!o(p,m)&&f(p,m,l(h,m));p.prototype=v,v.constructor=p,n(19)(r,"Number",p)}},function(t,e,n){"use strict";var r=n(0),o=n(35),i=n(108),a=n(83),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",f=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=u(r/1e7)},d=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=u(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},h=function(t,e,n){return 0===e?n:e%2==1?h(t,e-1,n*t):h(t*t,e/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(8)(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,r,s,u=i(this,l),c=o(t),v="",g="0";if(c<0||c>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(v="-",u=-u),u>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(u*h(2,69,1))-69)<0?u*h(2,-e,1):u/h(2,e,1),n*=4503599627370496,(e=52-e)>0){for(f(0,n),r=c;r>=7;)f(1e7,0),r-=7;for(f(h(10,r,1),0),r=e-1;r>=23;)d(1<<23),r-=23;d(1<0?v+((s=g.length)<=c?"0."+a.call("0",c-s)+g:g.slice(0,s-c)+"."+g.slice(s-c)):v+g}})},function(t,e,n){"use strict";var r=n(0),o=n(8),i=n(108),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(0),o=n(9).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{isInteger:n(109)})},function(t,e,n){var r=n(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),o=n(109),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,e,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),o=n(107);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(t,e,n){var r=n(0),o=n(106);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(t,e,n){var r=n(0),o=n(110),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},function(t,e,n){var r=n(0),o=Math.asinh;r(r.S+r.F*!(o&&1/o(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var r=n(0),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),o=n(84);r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(0),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},function(t,e,n){var r=n(0),o=n(85);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,e,n){var r=n(0);r(r.S,"Math",{fround:n(209)})},function(t,e,n){var r=n(84),o=Math.pow,i=o(2,-52),a=o(2,-23),s=o(2,127)*(2-a),u=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),c=r(t);return os||n!=n?c*(1/0):c*n}},function(t,e,n){var r=n(0),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,a=0,s=arguments.length,u=0;a0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(t,e,n){var r=n(0),o=Math.imul;r(r.S+r.F*n(8)(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log1p:n(110)})},function(t,e,n){var r=n(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(0);r(r.S,"Math",{sign:n(84)})},function(t,e,n){var r=n(0),o=n(85),i=Math.exp;r(r.S+r.F*n(8)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(0),o=n(85),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(0),o=n(43),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(0),o=n(23),i=n(17);r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(0),o=n(111)(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r=n(0),o=n(17),i=n(87),a="".endsWith;r(r.P+r.F*n(89)("endsWith"),"String",{endsWith:function(t){var e=i(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),s=void 0===n?r:Math.min(o(n),r),u=String(t);return a?a.call(e,u,s):e.slice(s-u.length,s)===u}})},function(t,e,n){"use strict";var r=n(0),o=n(87);r(r.P+r.F*n(89)("includes"),"String",{includes:function(t){return!!~o(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0);r(r.P,"String",{repeat:n(83)})},function(t,e,n){"use strict";var r=n(0),o=n(17),i=n(87),a="".startsWith;r(r.P+r.F*n(89)("startsWith"),"String",{startsWith:function(t){var e=i(this,t,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(20)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(20)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(20)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(20)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(20)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(20)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(20)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(20)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(20)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(20)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(20)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(20)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(20)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(0),o=n(24),i=n(37);r(r.P+r.F*n(8)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(0),o=n(244);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(t,e,n){"use strict";var r=n(8),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},function(t,e,n){var r=Date.prototype,o=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(19)(r,"toString",function(){var t=i.call(this);return t==t?o.call(this):"Invalid Date"})},function(t,e,n){var r=n(12)("toPrimitive"),o=Date.prototype;r in o||n(22)(o,r,n(247))},function(t,e,n){"use strict";var r=n(11),o=n(37);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),"number"!=t)}},function(t,e,n){var r=n(0);r(r.S,"Array",{isArray:n(78)})},function(t,e,n){"use strict";var r=n(31),o=n(0),i=n(24),a=n(113),s=n(90),u=n(17),c=n(91),l=n(92);o(o.S+o.F*!n(63)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,f,d=i(t),p="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,g=void 0!==v,y=0,b=l(d);if(g&&(v=r(v,h>2?arguments[2]:void 0,2)),null==b||p==Array&&s(b))for(n=new p(e=u(d.length));e>y;y++)c(n,y,g?v(d[y],y):d[y]);else for(f=b.call(d),n=new p;!(o=f.next()).done;y++)c(n,y,g?a(f,v,[o.value,y],!0):o.value);return n.length=y,n}})},function(t,e,n){"use strict";var r=n(0),o=n(91);r(r.S+r.F*n(8)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),o=n(23),i=[].join;r(r.P+r.F*(n(57)!=Object||!n(25)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(0),o=n(79),i=n(33),a=n(43),s=n(17),u=[].slice;r(r.P+r.F*n(8)(function(){o&&u.call(o)}),"Array",{slice:function(t,e){var n=s(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var o=a(t,n),c=a(e,n),l=s(c-o),f=new Array(l),d=0;d1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(0);r(r.P,"Array",{copyWithin:n(115)}),n(50)("copyWithin")},function(t,e,n){var r=n(0);r(r.P,"Array",{fill:n(93)}),n(50)("fill")},function(t,e,n){"use strict";var r=n(0),o=n(28)(5),i=!0;"find"in[]&&Array(1).find(function(){i=!1}),r(r.P+r.F*i,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(50)("find")},function(t,e,n){"use strict";var r=n(0),o=n(28)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(50)(i)},function(t,e,n){n(51)("Array")},function(t,e,n){var r=n(9),o=n(82),i=n(14).f,a=n(45).f,s=n(88),u=n(95),c=r.RegExp,l=c,f=c.prototype,d=/a/g,p=/a/g,h=new c(d)!==d;if(n(15)&&(!h||n(8)(function(){return p[n(12)("match")]=!1,c(d)!=d||c(p)==p||"/a/i"!=c(d,"i")}))){c=function(t,e){var n=this instanceof c,r=s(t),i=void 0===e;return!n&&r&&t.constructor===c&&i?t:o(h?new l(r&&!i?t.source:t,e):l((r=t instanceof c)?t.source:t,r&&i?u.call(t):e),n?this:f,c)};for(var v=function(t){t in c||i(c,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})},g=a(l),y=0;g.length>y;)v(g[y++]);f.constructor=c,c.prototype=f,n(19)(r,"RegExp",c)}n(51)("RegExp")},function(t,e,n){"use strict";n(117);var r=n(11),o=n(95),i=n(15),a=/./.toString,s=function(t){n(19)(RegExp.prototype,"toString",t,!0)};n(8)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},function(t,e,n){n(64)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(64)("replace",2,function(t,e,n){return[function(r,o){"use strict";var i=t(this),a=null==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},n]})},function(t,e,n){n(64)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(64)("split",2,function(t,e,r){"use strict";var o=n(88),i=r,a=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var s=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!o(t))return i.call(n,t,e);var r,u,c,l,f,d=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,v=void 0===e?4294967295:e>>>0,g=new RegExp(t.source,p+"g");for(s||(r=new RegExp("^"+g.source+"$(?!\\s)",p));(u=g.exec(n))&&!((c=u.index+u[0].length)>h&&(d.push(n.slice(h,u.index)),!s&&u.length>1&&u[0].replace(r,function(){for(f=1;f1&&u.index=v));)g.lastIndex===u.index&&g.lastIndex++;return h===n.length?!l&&g.test("")||d.push(""):d.push(n.slice(h)),d.length>v?d.slice(0,v):d}}else"0".split(void 0,0).length&&(r=function(t,e){return void 0===t&&0===e?[]:i.call(this,t,e)});return[function(n,o){var i=t(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,i,o):r.call(String(i),n,o)},r]})},function(t,e,n){var r=n(9),o=n(96).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(33)(a);t.exports=function(){var t,e,n,c=function(){var r,o;for(u&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(c)}}else n=function(){o.call(r,c)};else{var f=!0,d=document.createTextNode("");new i(c).observe(d,{characterData:!0}),n=function(){d.data=f=!f}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){"use strict";var r=n(121),o=n(54);t.exports=n(68)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(o(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(121),o=n(54);t.exports=n(68)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,o=n(28)(0),i=n(19),a=n(38),s=n(103),u=n(122),c=n(10),l=n(8),f=n(54),d=a.getWeak,p=Object.isExtensible,h=u.ufstore,v={},g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(c(t)){var e=d(t);return!0===e?h(f(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(f(this,"WeakMap"),t,e)}},b=t.exports=n(68)("WeakMap",g,y,u,!0,!0);l(function(){return 7!=(new b).set((Object.freeze||Object)(v),7).get(v)})&&(s((r=u.getConstructor(g,"WeakMap")).prototype,y),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=b.prototype,n=e[t];i(e,t,function(e,o){if(c(e)&&!p(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},function(t,e,n){"use strict";var r=n(122),o=n(54);n(68)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(0),o=n(69),i=n(97),a=n(11),s=n(43),u=n(17),c=n(10),l=n(9).ArrayBuffer,f=n(66),d=i.ArrayBuffer,p=i.DataView,h=o.ABV&&l.isView,v=d.prototype.slice,g=o.VIEW;r(r.G+r.W+r.F*(l!==d),{ArrayBuffer:d}),r(r.S+r.F*!o.CONSTR,"ArrayBuffer",{isView:function(t){return h&&h(t)||c(t)&&g in t}}),r(r.P+r.U+r.F*n(8)(function(){return!new d(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),o=s(void 0===e?n:e,n),i=new(f(this,d))(u(o-r)),c=new p(this),l=new p(i),h=0;r=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},function(t,e,n){var r=n(26),o=n(46),i=n(21),a=n(0),s=n(10),u=n(11);a(a.S,"Reflect",{get:function t(e,n){var a,c,l=arguments.length<3?e:arguments[2];return u(e)===l?e[n]:(a=r.f(e,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(l):void 0:s(c=o(e))?t(c,n,l):void 0}})},function(t,e,n){var r=n(26),o=n(0),i=n(11);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(i(t),e)}})},function(t,e,n){var r=n(0),o=n(46),i=n(11);r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),o=n(11),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(124)})},function(t,e,n){var r=n(0),o=n(11),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(14),o=n(26),i=n(46),a=n(21),s=n(0),u=n(39),c=n(11),l=n(10);s(s.S,"Reflect",{set:function t(e,n,s){var f,d,p=arguments.length<4?e:arguments[3],h=o.f(c(e),n);if(!h){if(l(d=i(e)))return t(d,n,s,p);h=u(0)}if(a(h,"value")){if(!1===h.writable||!l(p))return!1;if(f=o.f(p,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=s,r.f(p,n,f)}else r.f(p,n,u(0,s));return!0}return void 0!==h.set&&(h.set.call(p,s),!0)}})},function(t,e,n){var r=n(0),o=n(80);o&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){n(308),t.exports=n(16).Array.includes},function(t,e,n){"use strict";var r=n(0),o=n(59)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(50)("includes")},function(t,e,n){n(310),t.exports=n(16).String.padStart},function(t,e,n){"use strict";var r=n(0),o=n(125),i=n(67);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){n(312),t.exports=n(16).String.padEnd},function(t,e,n){"use strict";var r=n(0),o=n(125),i=n(67);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){n(314),t.exports=n(75).f("asyncIterator")},function(t,e,n){n(99)("asyncIterator")},function(t,e,n){n(316),t.exports=n(16).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(0),o=n(124),i=n(23),a=n(26),s=n(91);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),u=a.f,c=o(r),l={},f=0;c.length>f;)void 0!==(n=u(r,e=c[f++]))&&s(l,e,n);return l}})},function(t,e,n){n(318),t.exports=n(16).Object.values},function(t,e,n){var r=n(0),o=n(126)(!1);r(r.S,"Object",{values:function(t){return o(t)}})},function(t,e,n){n(320),t.exports=n(16).Object.entries},function(t,e,n){var r=n(0),o=n(126)(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},function(t,e,n){"use strict";n(118),n(322),t.exports=n(16).Promise.finally},function(t,e,n){"use strict";var r=n(0),o=n(16),i=n(9),a=n(66),s=n(120);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){n(324),n(325),n(326),t.exports=n(16)},function(t,e,n){var r=n(9),o=n(0),i=n(67),a=[].slice,s=/MSIE .\./.test(i),u=function(t){return function(e,n){var r=arguments.length>2,o=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};o(o.G+o.B+o.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(t,e,n){var r=n(0),o=n(96);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},function(t,e,n){for(var r=n(94),o=n(42),i=n(19),a=n(9),s=n(22),u=n(49),c=n(12),l=c("iterator"),f=c("toStringTag"),d=u.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(p),v=0;v=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function k(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new I(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=x(t,e,n);if("normal"===u.type){if(r=n.done?h:d,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function w(){}function S(){}function E(){}function T(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function _(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,a){var s=x(t[n],t,r);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(c).then(function(t){u.value=t,i(u)},a)}a(s.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function C(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,C(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=x(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0&&e.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(t){var e=document.createDocumentFragment();Array.isArray(t)||(t=[t]),t.forEach(function(t){var n=t instanceof Node;e.appendChild(n?t:document.createTextNode(String(t)))}),this.insertBefore(e,this.firstChild)})})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(55),n(29),n(30),n(1),n(2),n(13),n(18)],void 0===(i="function"==typeof(r=function(r,o,i,a,s,u,c,l){"use strict";var f=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=f(o),i=f(i),a=f(a),s=f(s),u=f(u),c=f(c),l=f(l);var d=n(338),p=[];d.keys().forEach(function(t){t.match(/^\.\/[^_][\w\/]*\.([tj])s$/)&&p.push(d(t))});var h=function(){function t(e){var n,r,o=this;(0,s.default)(this,t),this.moduleInstances={},this.isReady=new Promise(function(t,e){n=t,r=e}),Promise.resolve().then((0,a.default)(i.default.mark(function t(){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.configuration=e,t.next=3,o.validate();case 3:return t.next=5,o.init();case 5:return t.next=7,o.start();case 7:l.default.log("I'm ready! (ノ◕ヮ◕)ノ*:・゚✧","log","","color: #E24A75"),setTimeout(function(){n()},500);case 9:case"end":return t.stop()}},t,this)}))).catch(function(t){l.default.log("CodeX Editor does not ready because of ".concat(t),"error"),r(t)})}var e,n;return(0,u.default)(t,[{key:"validate",value:(n=(0,a.default)(i.default.mark(function t(){var e,n;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.config.holderId){t.next=2;break}throw Error("«holderId» param must being not empty");case 2:if(c.default.get(this.config.holderId)){t.next=4;break}throw Error("element with ID «".concat(this.config.holderId,"» is missing. Pass correct holder's ID."));case 4:t.t0=i.default.keys(this.config.tools);case 5:if((t.t1=t.t0()).done){t.next=13;break}if(e=t.t1.value,!this.config.tools.hasOwnProperty(e)){t.next=11;break}if(n=this.config.tools[e],l.default.isFunction(n)||l.default.isFunction(n.class)){t.next=11;break}throw Error("Tool «".concat(e,"» must be a constructor function or an object with function in the «class» property"));case 11:t.next=5;break;case 13:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"init",value:function(){this.constructModules(),this.configureModules()}},{key:"start",value:(e=(0,a.default)(i.default.mark(function t(){var e,n=this;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=["Tools","UI","BlockManager","Paste","DragNDrop","ModificationsObserver","BlockSelection"],t.next=3,e.reduce(function(t,e){return t.then((0,a.default)(i.default.mark(function t(){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.moduleInstances[e].prepare();case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),l.default.log("Module ".concat(e," was skipped because of %o"),"warn",t.t0);case 8:case"end":return t.stop()}},t,this,[[0,5]])})))},Promise.resolve());case 3:return t.abrupt("return",this.moduleInstances.Renderer.render(this.config.data.blocks));case 4:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"constructModules",value:function(){var t=this;p.forEach(function(e){try{t.moduleInstances[e.displayName]=new e({config:t.configuration})}catch(t){l.default.log("Module ".concat(e.displayName," skipped because"),"warn",t)}})}},{key:"configureModules",value:function(){for(var t in this.moduleInstances)this.moduleInstances.hasOwnProperty(t)&&(this.moduleInstances[t].state=this.getModulesDiff(t))}},{key:"getModulesDiff",value:function(t){var e={};for(var n in this.moduleInstances)n!==t&&(e[n]=this.moduleInstances[n]);return e}},{key:"configuration",set:function(t){"object"!==(0,o.default)(t)&&(t={holderId:t}),this.config=t,this.config.holderId&&"string"==typeof this.config.holderId||(this.config.holderId="codex-editor"),this.config.initialBlock=this.config.initialBlock||"paragraph";var e={type:this.config.initialBlock,data:{}};this.config.placeholder=this.config.placeholder||"write your story...",this.config.sanitizer=this.config.sanitizer||{p:!0,b:!0,a:!0},this.config.hideToolbar=!!this.config.hideToolbar&&this.config.hideToolbar,this.config.tools=this.config.tools||{},this.config.data=this.config.data||{},this.config.onReady=this.config.onReady||function(){},this.config.onChange=this.config.onChange||function(){},l.default.isEmpty(this.config.data)?(this.config.data={},this.config.data.blocks=[e]):this.config.data.blocks&&0!==this.config.data.blocks.length||(this.config.data.blocks=[e])},get:function(){return this.config}}]),t}();r.default=h,h.displayName="Core",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r=function(){return this||"object"==typeof self&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(334),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag",c="object"==typeof t,l=e.regeneratorRuntime;if(l)c&&(t.exports=l);else{(l=e.regeneratorRuntime=c?t.exports:{}).wrap=k;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",v={},g={};g[a]=function(){return this};var y=Object.getPrototypeOf,b=y&&y(y(O([])));b&&b!==r&&o.call(b,a)&&(g=b);var m=E.prototype=w.prototype=Object.create(g);S.prototype=m.constructor=E,E.constructor=S,E[u]=S.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(m),t},l.awrap=function(t){return{__await:t}},T(_.prototype),_.prototype[s]=function(){return this},l.AsyncIterator=_,l.async=function(t,e,n,r){var o=new _(k(t,e,n,r));return l.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},T(m),m[u]="Generator",m[a]=function(){return this},m.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=O,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return s.type="throw",s.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function k(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new I(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=x(t,e,n);if("normal"===u.type){if(r=n.done?h:d,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function w(){}function S(){}function E(){}function T(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function _(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,a){var s=x(t[n],t,r);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(c).then(function(t){u.value=t,i(u)},function(t){return e("throw",t,i,a)})}a(s.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function C(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,C(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=x(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r0?Math.abs(s.top)-Math.abs(u.top):window.innerHeight-Math.abs(s.top)+Math.abs(u.top),window.scrollBy(0,-1*o),this.api.blocks.swap(r,r-1)}}]),t}();r.default=u,u.displayName="MoveUpTune",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a){"use strict";var s=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=s(o),i=s(i),a=s(a);var u=function(){function t(e){var n=this,r=e.api;(0,o.default)(this,t),this.CSS={wrapper:"ass",button:"ce-settings__button",buttonDelete:"ce-settings__button--delete",buttonConfirm:"ce-settings__button--confirm"},this.nodes={button:null},this.api=r,this.resetConfirmation=function(){n.setConfirmation(!1)}}return(0,i.default)(t,[{key:"render",value:function(){var t=this;return this.nodes.button=a.default.make("div",[this.CSS.button,this.CSS.buttonDelete],{}),this.nodes.button.appendChild(a.default.svg("cross",12,12)),this.api.listeners.on(this.nodes.button,"click",function(e){return t.handleClick(e)},!1),this.nodes.button}},{key:"handleClick",value:function(t){this.needConfirmation?(this.api.events.off("block-settings-closed",this.resetConfirmation),this.api.blocks.delete(),this.api.toolbar.close(),t.stopPropagation()):(this.setConfirmation(!0),this.api.events.on("block-settings-closed",this.resetConfirmation))}},{key:"setConfirmation",value:function(t){this.needConfirmation=t,this.nodes.button.classList.add(this.CSS.buttonConfirm)}}]),t}();r.default=u,u.displayName="DeleteTune",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a){"use strict";var s=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=s(o),i=s(i),a=s(a);var u=function(){function t(e){var n=e.api;(0,o.default)(this,t),this.CSS={button:"ce-settings__button",wrapper:"ce-tune-move-down",animation:"wobble"},this.api=n}return(0,i.default)(t,[{key:"render",value:function(){var t=this,e=a.default.make("div",[this.CSS.button,this.CSS.wrapper],{});return e.appendChild(a.default.svg("arrow-down",14,14)),this.api.listeners.on(e,"click",function(n){return t.handleClick(n,e)},!1),e}},{key:"handleClick",value:function(t,e){var n=this,r=this.api.blocks.getCurrentBlockIndex();if(r===this.api.blocks.getBlocksCount()-1)return e.classList.add(this.CSS.animation),void window.setTimeout(function(){e.classList.remove(n.CSS.animation)},500);var o=this.api.blocks.getBlockByIndex(r+1),i=o.getBoundingClientRect(),a=Math.abs(window.innerHeight-o.offsetHeight);i.top2&&void 0!==arguments[2]&&arguments[2];if(this.length){t>this.length&&(t=this.length),n&&this.blocks[t].holder.remove();var r=n?1:0;if(this.blocks.splice(t,r,e),t>0){var o=this.blocks[t-1];o.holder.insertAdjacentElement("afterend",e.holder)}else{var i=this.blocks[t+1];i?i.holder.insertAdjacentElement("beforebegin",e.holder):this.workingArea.appendChild(e.holder)}}else this.push(e)}},{key:"remove",value:function(t){isNaN(t)&&(t=this.length-1),this.blocks[t].holder.remove(),this.blocks.splice(t,1)}},{key:"removeAll",value:function(){this.workingArea.innerHTML="",this.blocks.length=0}},{key:"insertAfter",value:function(t,e){var n=this.blocks.indexOf(t);this.insert(n+1,e)}},{key:"get",value:function(t){return this.blocks[t]}},{key:"indexOf",value:function(t){return this.blocks.indexOf(t)}}]),t}();r.default=c,c.displayName="Blocks",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}([function(t,e,n){"use strict";n(1), /*! * Codex JavaScript Notification module * https://github.com/codex-team/js-notifier @@ -32,7 +32,7 @@ t.exports=function(){var t=n(6),e=null;return{show:function(n){if(n.message){!fu * @author CodeX (https://ifmo.su) * @version 1.0.0 */ -"undefined"!=typeof self&&self,t.exports=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1)for(var n in i)i[n].includes(t[e])&&(this.commands[n]=!0);else this.keys[t[e]]=!0}},{key:"execute",value:function(t){var e=t.ctrlKey||t.metaKey,n=t.shiftKey,r=t.altKey,i={CMD:e,SHIFT:n,ALT:r},a=void 0,s=!0;for(a in this.commands)s=s&&i[a];var u=void 0,c=!0;for(u in this.keys)c=c&&t.keyCode===o[u];s&&c&&this.callback(t)}},{key:"remove",value:function(){this.element.removeEventListener("keydown",this.executeShortcut)}}]),t}();e.default=a}])},function(t,e,n){var r,o,i;o=[e,n(1),n(2),n(13)],void 0===(i="function"==typeof(r=function(r,o,i,a){"use strict";var s=n(3);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,o=s(o),i=s(i),a=s(a);var u=function(){function t(e){var n=e.data;e.config,e.api,(0,o.default)(this,t),this.CSS={wrapper:"ce-stub",info:"ce-stub__info",title:"ce-stub__title",subtitle:"ce-stub__subtitle"},this.title=n.title||"Error",this.subtitle="The block can not be displayed correctly.",this.savedData=n.savedData,this.wrapper=this.make()}return(0,i.default)(t,[{key:"render",value:function(){return this.wrapper}},{key:"save",value:function(){return this.savedData}},{key:"make",value:function(){var t=a.default.make("div",this.CSS.wrapper),e=a.default.svg("sad-face",52,52),n=a.default.make("div",this.CSS.info),r=a.default.make("div",this.CSS.title,{textContent:this.title}),o=a.default.make("div",this.CSS.subtitle,{textContent:this.subtitle});return t.appendChild(e),n.appendChild(r),n.appendChild(o),t.appendChild(n),t}}]),t}();r.default=u,u.displayName="Stub",t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}([function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n1)for(var n in i)i[n].includes(t[e])&&(this.commands[n]=!0);else this.keys[t[e]]=!0}},{key:"execute",value:function(t){var e=t.ctrlKey||t.metaKey,n=t.shiftKey,r=t.altKey,i={CMD:e,SHIFT:n,ALT:r},a=void 0,s=!0;for(a in this.commands)s=s&&i[a];var u=void 0,c=!0;for(u in this.keys)c=c&&t.keyCode===o[u];s&&c&&this.callback(t)}},{key:"remove",value:function(){this.element.removeEventListener("keydown",this.executeShortcut)}}]),t}();e.default=a}])},function(t,e,n){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}([function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n=0&&u.splice(e,1)}function h(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),v(e,t.attrs),d(t,e),e}function v(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function g(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var u=s++;n=a||(a=h(e)),r=b.bind(null,n,u,!1),o=b.bind(null,n,u,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),d(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=c(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),o=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(e),r=function(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){p(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return l(n,e),function(t){for(var o=[],i=0;i\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n \r\n \r\n \r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n'},function(t,e,n){(t.exports=n(352)(!1)).push([t.i,":root {\r\n /**\r\n * Selection color\r\n */\r\n --selectionColor: #a8d6ff;\r\n\r\n /**\r\n * Toolbar buttons\r\n */\r\n --bg-light: #eff2f5;\r\n\r\n /**\r\n * All gray texts: placeholders, settings\r\n */\r\n --grayText: #707684;\r\n\r\n /**\r\n * Blue icons\r\n */\r\n --color-active-icon: #388AE5;\r\n\r\n /**\r\n * Gray border, loaders\r\n */\r\n --color-gray-border: rgba(201, 201, 204, 0.48);\r\n\r\n /**\r\n * Block content width\r\n */\r\n --content-width: 650px;\r\n\r\n /**\r\n * Toolbar buttons height and width\r\n */\r\n --toolbar-buttons-size: 34px;\r\n\r\n /**\r\n * Toolbar Plus Button and Toolbox buttons height and width\r\n */\r\n --toolbox-buttons-size: 24px;\r\n\r\n /**\r\n * Confirm deletion bg\r\n */\r\n --color-confirm: #E24A4A;\r\n}\r\n/**\r\n* Editor wrapper\r\n*/\r\n.codex-editor {\r\n position: relative;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n z-index: 1;\r\n}\r\n.codex-editor .hide {\r\n display: none;\r\n }\r\n.codex-editor__redactor {\r\n padding-bottom: 300px;\r\n }\r\n.codex-editor-copyable {\r\n position: absolute;\r\n height: 1px;\r\n width: 1px;\r\n top: -400%;\r\n opacity: 0.001;\r\n }\r\n.codex-editor svg {\r\n fill: currentColor;\r\n vertical-align: middle;\r\n max-height: 100%;\r\n }\r\n/**\r\n * Set color for native selection\r\n */\r\n::-moz-selection{\r\n background-color: #a8d6ff;\r\n background-color: var(--selectionColor);\r\n}\r\n::selection{\r\n background-color: #a8d6ff;\r\n background-color: var(--selectionColor);\r\n}\r\n/**\r\n * Add placeholder to content editable elements with data attribute\r\n * data-placeholder=\"Hello world!\"\r\n */\r\n[contentEditable=true][data-placeholder]:empty::before{\r\n content: attr(data-placeholder);\r\n color: #707684;\r\n color: var(--grayText);\r\n font-weight: normal;\r\n}\r\n[contentEditable=true][data-placeholder]:empty:focus::before {\r\n opacity: 0.3;\r\n}\r\n.ce-toolbar {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: 0;\r\n /*opacity: 0;*/\r\n /*visibility: hidden;*/\r\n -webkit-transition: opacity 100ms ease;\r\n transition: opacity 100ms ease;\r\n will-change: opacity, transform;\r\n display: none;\r\n}\r\n.ce-toolbar--opened {\r\n display: block;\r\n /*opacity: 1;*/\r\n /*visibility: visible;*/\r\n }\r\n.ce-toolbar__content {\r\n max-width: 650px;\r\n max-width: var(--content-width);\r\n margin: 0 auto;\r\n position: relative;\r\n }\r\n.ce-toolbar__plus {\r\n color: #707684;\r\n color: var(--grayText);\r\n cursor: pointer;\r\n width: 24px;\r\n width: var(--toolbox-buttons-size);\r\n height: 24px;\r\n height: var(--toolbox-buttons-size);\r\n display: -webkit-inline-box;\r\n display: -ms-inline-flexbox;\r\n display: inline-flex;\r\n -webkit-box-pack: center;\r\n -ms-flex-pack: center;\r\n justify-content: center;\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n align-items: center\r\n }\r\n.ce-toolbar__plus:not(:last-of-type){\r\n margin-right: 10px;\r\n }\r\n.ce-toolbar__plus {\r\n\r\n position: absolute;\r\n left: calc(calc(24px + 10px) * -1);\r\n left: calc(calc(var(--toolbox-buttons-size) + 10px) * -1);\r\n }\r\n.ce-toolbar__plus:hover,\r\n .ce-toolbar__plus--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.ce-toolbar__plus--active{\r\n -webkit-animation: bounceIn 0.75s 1;\r\n animation: bounceIn 0.75s 1;\r\n -webkit-animation-fill-mode: forwards;\r\n animation-fill-mode: forwards;\r\n }\r\n.ce-toolbar__plus--hidden {\r\n display: none;\r\n }\r\n.ce-toolbar__plus,\r\n .ce-toolbar .ce-toolbox {\r\n top: 50%;\r\n -webkit-transform: translateY(-50%);\r\n transform: translateY(-50%);\r\n }\r\n/**\r\n * Block actions Zone\r\n * -------------------------\r\n */\r\n.ce-toolbar__actions {\r\n position: absolute;\r\n right: 0;\r\n top: 10px;\r\n padding-right: 16px;\r\n opacity: 0;\r\n }\r\n.ce-toolbar__actions--opened {\r\n opacity: 1;\r\n }\r\n.ce-toolbar__actions-buttons {\r\n text-align: right;\r\n }\r\n.ce-toolbar__settings-btn {\r\n display: inline-block;\r\n width: 24px;\r\n height: 24px;\r\n color: #707684;\r\n color: var(--grayText);\r\n cursor: pointer;\r\n }\r\n.ce-toolbox {\r\n position: absolute;\r\n visibility: hidden;\r\n -webkit-transition: opacity 100ms ease;\r\n transition: opacity 100ms ease;\r\n will-change: opacity;\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-orient: horizontal;\r\n -webkit-box-direction: normal;\r\n -ms-flex-direction: row;\r\n flex-direction: row;\r\n}\r\n.ce-toolbox--opened {\r\n opacity: 1;\r\n visibility: visible;\r\n }\r\n.ce-toolbox__button {\r\n color: #707684;\r\n color: var(--grayText);\r\n cursor: pointer;\r\n width: 24px;\r\n width: var(--toolbox-buttons-size);\r\n height: 24px;\r\n height: var(--toolbox-buttons-size);\r\n display: -webkit-inline-box;\r\n display: -ms-inline-flexbox;\r\n display: inline-flex;\r\n -webkit-box-pack: center;\r\n -ms-flex-pack: center;\r\n justify-content: center;\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n }\r\n.ce-toolbox__button:not(:last-of-type){\r\n margin-right: 10px;\r\n }\r\n.ce-toolbox__button:hover,\r\n .ce-toolbox__button--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.ce-toolbox__button--active{\r\n -webkit-animation: bounceIn 0.75s 1;\r\n animation: bounceIn 0.75s 1;\r\n -webkit-animation-fill-mode: forwards;\r\n animation-fill-mode: forwards;\r\n }\r\n.ce-inline-toolbar {\r\n position: absolute;\r\n background-color: #FFFFFF;\r\n -webkit-box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\r\n box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\r\n border-radius: 4px;\r\n z-index: 2\r\n}\r\n.ce-inline-toolbar::before {\r\n content: '';\r\n width: 15px;\r\n height: 15px;\r\n position: absolute;\r\n top: -7px;\r\n left: 50%;\r\n margin-left: -7px;\r\n -webkit-transform: rotate(-45deg);\r\n transform: rotate(-45deg);\r\n background-color: #fff;\r\n z-index: -1;\r\n }\r\n.ce-inline-toolbar {\r\n padding: 6px;\r\n -webkit-transform: translateX(-50%);\r\n transform: translateX(-50%);\r\n display: none;\r\n -webkit-box-shadow: 0 6px 12px -6px rgba(131, 147, 173, 0.46),\r\n 5px -12px 34px -13px rgba(97, 105, 134, 0.6),\r\n 0 26px 52px 3px rgba(147, 165, 186, 0.24);\r\n box-shadow: 0 6px 12px -6px rgba(131, 147, 173, 0.46),\r\n 5px -12px 34px -13px rgba(97, 105, 134, 0.6),\r\n 0 26px 52px 3px rgba(147, 165, 186, 0.24);\r\n}\r\n.ce-inline-toolbar--showed {\r\n display: block;\r\n }\r\n.ce-inline-toolbar [hidden] {\r\n display: none !important;\r\n }\r\n.ce-inline-tool {\r\n display: -webkit-inline-box;\r\n display: -ms-inline-flexbox;\r\n display: inline-flex;\r\n width: 34px;\r\n height: 34px;\r\n line-height: 34px;\r\n text-align: center;\r\n border-radius: 3px;\r\n cursor: pointer;\r\n border: 0;\r\n outline: none;\r\n background-color: transparent;\r\n vertical-align: bottom;\r\n color: #707684;\r\n color: var(--grayText)\r\n}\r\n.ce-inline-tool:not(:last-of-type){\r\n margin-right: 5px;\r\n }\r\n.ce-inline-tool:hover {\r\n background-color: #eff2f5;\r\n background-color: var(--bg-light);\r\n }\r\n.ce-inline-tool {\r\n line-height: normal;\r\n}\r\n.ce-inline-tool > svg,\r\n .ce-inline-tool .icon {\r\n margin: auto;\r\n }\r\n.ce-inline-tool--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.ce-inline-tool--last {\r\n margin-right: 0 !important;\r\n }\r\n.ce-inline-tool--link .icon {\r\n margin-top: -2px;\r\n }\r\n.ce-inline-tool--link .icon--unlink {\r\n display: none;\r\n }\r\n.ce-inline-tool--unlink .icon--link {\r\n display: none;\r\n }\r\n.ce-inline-tool--unlink .icon--unlink {\r\n display: inline-block;\r\n }\r\n.ce-inline-tool-input {\r\n background-color: #eff2f5;\r\n background-color: var(--bg-light);\r\n outline: none;\r\n border: 0;\r\n border-radius: 3px;\r\n margin: 6px 0 0;\r\n font-size: 13px;\r\n padding: 8px;\r\n width: 100%;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n display: none\r\n }\r\n.ce-inline-tool-input::-webkit-input-placeholder {\r\n color: #707684;\r\n color: var(--grayText);\r\n }\r\n.ce-inline-tool-input::-ms-input-placeholder {\r\n color: #707684;\r\n color: var(--grayText);\r\n }\r\n.ce-inline-tool-input::placeholder {\r\n color: #707684;\r\n color: var(--grayText);\r\n }\r\n.ce-inline-tool-input--showed {\r\n display: block;\r\n }\r\n.ce-settings {\r\n position: absolute;\r\n background-color: #FFFFFF;\r\n -webkit-box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\r\n box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\r\n border-radius: 4px;\r\n z-index: 2\r\n}\r\n.ce-settings::before {\r\n content: '';\r\n width: 15px;\r\n height: 15px;\r\n position: absolute;\r\n top: -7px;\r\n left: 50%;\r\n margin-left: -7px;\r\n -webkit-transform: rotate(-45deg);\r\n transform: rotate(-45deg);\r\n background-color: #fff;\r\n z-index: -1;\r\n }\r\n.ce-settings {\r\n right: 5px;\r\n top: 35px;\r\n min-width: 124px\r\n}\r\n.ce-settings::before{\r\n left: auto;\r\n right: 12px;\r\n }\r\n.ce-settings {\r\n\r\n display: none;\r\n}\r\n.ce-settings--opened {\r\n display: block;\r\n -webkit-animation-duration: 0.5s;\r\n animation-duration: 0.5s;\r\n -webkit-animation-name: bounceIn;\r\n animation-name: bounceIn;\r\n }\r\n.ce-settings__plugin-zone:not(:empty){\r\n padding: 6px 6px 0;\r\n }\r\n.ce-settings__default-zone:not(:empty){\r\n padding: 6px;\r\n }\r\n.ce-settings__button {\r\n display: -webkit-inline-box;\r\n display: -ms-inline-flexbox;\r\n display: inline-flex;\r\n width: 34px;\r\n height: 34px;\r\n line-height: 34px;\r\n text-align: center;\r\n border-radius: 3px;\r\n cursor: pointer;\r\n border: 0;\r\n outline: none;\r\n background-color: transparent;\r\n vertical-align: bottom;\r\n color: #707684;\r\n color: var(--grayText)\r\n }\r\n.ce-settings__button:not(:last-of-type){\r\n margin-right: 5px;\r\n }\r\n.ce-settings__button:hover {\r\n background-color: #eff2f5;\r\n background-color: var(--bg-light);\r\n }\r\n.ce-settings__button {\r\n line-height: 32px;\r\n }\r\n.ce-settings__button > svg,\r\n .ce-settings__button .icon {\r\n margin: auto;\r\n }\r\n.ce-settings__button--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.ce-settings__button--disabled {\r\n cursor: not-allowed !important;\r\n opacity: .3;\r\n }\r\n.ce-settings__button--selected {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.ce-settings__button--delete {\r\n -webkit-transition: background-color 300ms ease;\r\n transition: background-color 300ms ease;\r\n will-change: background-color;\r\n }\r\n.ce-settings__button--delete .icon {\r\n -webkit-transition: -webkit-transform 200ms ease-out;\r\n transition: -webkit-transform 200ms ease-out;\r\n transition: transform 200ms ease-out;\r\n transition: transform 200ms ease-out, -webkit-transform 200ms ease-out;\r\n will-change: transform;\r\n }\r\n.ce-settings__button--confirm {\r\n background-color: #E24A4A;\r\n background-color: var(--color-confirm);\r\n color: #fff\r\n }\r\n.ce-settings__button--confirm:hover {\r\n background-color: rgb(213, 74, 74) !important;\r\n background-color: rgb(213, 74, 74) !important;\r\n }\r\n.ce-settings__button--confirm .icon {\r\n -webkit-transform: rotate(90deg);\r\n transform: rotate(90deg);\r\n }\r\n.ce-block:first-of-type {\r\n margin-top: 0;\r\n }\r\n.ce-block--focused {\r\n background-image: linear-gradient(17deg, rgba(243, 248, 255, 0.03) 63.45%, rgba(207, 214, 229, 0.27) 98%);\r\n border-radius: 3px;\r\n }\r\n.ce-block--selected .ce-block__content {\r\n background: #a8d6ff;\r\n background: var(--selectionColor);\r\n -webkit-box-shadow: 0 31px 23px -22px rgba(175, 220, 255, 1);\r\n box-shadow: 0 31px 23px -22px rgba(175, 220, 255, 1);\r\n -webkit-animation: selectionBounce 0.2s 1;\r\n animation: selectionBounce 0.2s 1;\r\n -webkit-animation-fill-mode: forwards;\r\n animation-fill-mode: forwards;\r\n }\r\n.ce-block--selected .ce-block__content img,\r\n .ce-block--selected .ce-block__content .ce-stub {\r\n opacity: 0.55;\r\n }\r\n.ce-block--stretched .ce-block__content {\r\n max-width: none;\r\n }\r\n.ce-block__content {\r\n position: relative;\r\n max-width: 650px;\r\n max-width: var(--content-width);\r\n margin: 0 auto;\r\n }\r\n.ce-block--drop-target .ce-block__content:before {\r\n content: '';\r\n position: absolute;\r\n top: 100%;\r\n left: -20px;\r\n margin-top: -1px;\r\n height: 8px;\r\n width: 8px;\r\n border: solid #388AE5;\r\n border: solid var(--color-active-icon);\r\n border-width: 1px 1px 0 0;\r\n -webkit-transform-origin: right;\r\n transform-origin: right;\r\n -webkit-transform: rotate(45deg);\r\n transform: rotate(45deg);\r\n }\r\n.ce-block--drop-target .ce-block__content:after {\r\n content: '';\r\n position: absolute;\r\n top: 100%;\r\n height: 1px;\r\n width: 100%;\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n background: repeating-linear-gradient(\r\n 90deg,\r\n #388AE5,\r\n #388AE5 1px,\r\n #fff 1px,\r\n #fff 6px\r\n );\r\n background: repeating-linear-gradient(\r\n 90deg,\r\n var(--color-active-icon),\r\n var(--color-active-icon) 1px,\r\n #fff 1px,\r\n #fff 6px\r\n );\r\n }\r\n.ce-block a {\r\n cursor: pointer;\r\n text-decoration: underline;\r\n }\r\n.ce-block b {\r\n font-weight: bold;\r\n }\r\n.ce-block i {\r\n font-style: italic;\r\n }\r\n.wobble {\r\n -webkit-animation-name: wobble;\r\n animation-name: wobble;\r\n -webkit-animation-duration: 400ms;\r\n animation-duration: 400ms;\r\n}\r\n/**\r\n * @author Nick Pettit - https://github.com/nickpettit/glide\r\n */\r\n@-webkit-keyframes wobble {\r\n from {\r\n -webkit-transform: translate3d(0, 0, 0);\r\n transform: translate3d(0, 0, 0);\r\n }\r\n\r\n 15% {\r\n -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\r\n transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\r\n }\r\n\r\n 30% {\r\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\r\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\r\n }\r\n\r\n 45% {\r\n -webkit-transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\r\n transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\r\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\r\n }\r\n\r\n 75% {\r\n -webkit-transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\r\n transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\r\n }\r\n\r\n to {\r\n -webkit-transform: translate3d(0, 0, 0);\r\n transform: translate3d(0, 0, 0);\r\n }\r\n}\r\n@keyframes wobble {\r\n from {\r\n -webkit-transform: translate3d(0, 0, 0);\r\n transform: translate3d(0, 0, 0);\r\n }\r\n\r\n 15% {\r\n -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\r\n transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\r\n }\r\n\r\n 30% {\r\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\r\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\r\n }\r\n\r\n 45% {\r\n -webkit-transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\r\n transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\r\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\r\n }\r\n\r\n 75% {\r\n -webkit-transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\r\n transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\r\n }\r\n\r\n to {\r\n -webkit-transform: translate3d(0, 0, 0);\r\n transform: translate3d(0, 0, 0);\r\n }\r\n}\r\n@-webkit-keyframes bounceIn {\r\n from,\r\n 20%,\r\n 40%,\r\n 60%,\r\n 80%,\r\n to {\r\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n }\r\n\r\n 0% {\r\n -webkit-transform: scale3d(0.9, 0.9, 0.9);\r\n transform: scale3d(0.9, 0.9, 0.9);\r\n }\r\n\r\n 20% {\r\n -webkit-transform: scale3d(1.03, 1.03, 1.03);\r\n transform: scale3d(1.03, 1.03, 1.03);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: scale3d(1, 1, 1);\r\n transform: scale3d(1, 1, 1);\r\n }\r\n}\r\n@keyframes bounceIn {\r\n from,\r\n 20%,\r\n 40%,\r\n 60%,\r\n 80%,\r\n to {\r\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n }\r\n\r\n 0% {\r\n -webkit-transform: scale3d(0.9, 0.9, 0.9);\r\n transform: scale3d(0.9, 0.9, 0.9);\r\n }\r\n\r\n 20% {\r\n -webkit-transform: scale3d(1.03, 1.03, 1.03);\r\n transform: scale3d(1.03, 1.03, 1.03);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: scale3d(1, 1, 1);\r\n transform: scale3d(1, 1, 1);\r\n }\r\n}\r\n@-webkit-keyframes selectionBounce {\r\n from,\r\n 20%,\r\n 40%,\r\n 60%,\r\n 80%,\r\n to {\r\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n }\r\n\r\n 50% {\r\n -webkit-transform: scale3d(1.01, 1.01, 1.01);\r\n transform: scale3d(1.01, 1.01, 1.01);\r\n }\r\n\r\n 70% {\r\n -webkit-transform: scale3d(1, 1, 1);\r\n transform: scale3d(1, 1, 1);\r\n }\r\n}\r\n@keyframes selectionBounce {\r\n from,\r\n 20%,\r\n 40%,\r\n 60%,\r\n 80%,\r\n to {\r\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n }\r\n\r\n 50% {\r\n -webkit-transform: scale3d(1.01, 1.01, 1.01);\r\n transform: scale3d(1.01, 1.01, 1.01);\r\n }\r\n\r\n 70% {\r\n -webkit-transform: scale3d(1, 1, 1);\r\n transform: scale3d(1, 1, 1);\r\n }\r\n}\r\n/**\r\n * Block Tool wrapper\r\n */\r\n.cdx-block {\r\n padding: 0.7em 0;\r\n}\r\n/**\r\n * Input\r\n */\r\n.cdx-input {\r\n border: 1px solid rgba(201, 201, 204, 0.48);\r\n border: 1px solid var(--color-gray-border);\r\n -webkit-box-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, 0.06);\r\n box-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, 0.06);\r\n border-radius: 3px;\r\n padding: 10px 12px;\r\n outline: none;\r\n width: 100%;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n/**\r\n * Settings\r\n */\r\n.cdx-settings-button {\r\n display: -webkit-inline-box;\r\n display: -ms-inline-flexbox;\r\n display: inline-flex;\r\n width: 34px;\r\n height: 34px;\r\n line-height: 34px;\r\n text-align: center;\r\n border-radius: 3px;\r\n cursor: pointer;\r\n border: 0;\r\n outline: none;\r\n background-color: transparent;\r\n vertical-align: bottom;\r\n color: #707684;\r\n color: var(--grayText)\r\n}\r\n.cdx-settings-button:not(:last-of-type){\r\n margin-right: 5px;\r\n }\r\n.cdx-settings-button:hover {\r\n background-color: #eff2f5;\r\n background-color: var(--bg-light);\r\n }\r\n.cdx-settings-button > svg,\r\n .cdx-settings-button .icon {\r\n margin: auto;\r\n }\r\n.cdx-settings-button--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.cdx-settings-button--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n/**\r\n * Loader\r\n */\r\n.cdx-loader {\r\n position: relative;\r\n border: 1px solid rgba(201, 201, 204, 0.48);\r\n border: 1px solid var(--color-gray-border)\r\n}\r\n.cdx-loader::before {\r\n content: '';\r\n position: absolute;\r\n left: 50%;\r\n top: 50%;\r\n width: 18px;\r\n height: 18px;\r\n margin: -11px 0 0 -11px;\r\n border: 2px solid rgba(201, 201, 204, 0.48);\r\n border: 2px solid var(--color-gray-border);\r\n border-left-color: #388AE5;\r\n border-left-color: var(--color-active-icon);\r\n border-radius: 50%;\r\n -webkit-animation: cdxRotation 1.2s infinite linear;\r\n animation: cdxRotation 1.2s infinite linear;\r\n }\r\n@-webkit-keyframes cdxRotation {\r\n 0% {\r\n -webkit-transform: rotate(0deg);\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n -webkit-transform: rotate(360deg);\r\n transform: rotate(360deg);\r\n }\r\n}\r\n@keyframes cdxRotation {\r\n 0% {\r\n -webkit-transform: rotate(0deg);\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n -webkit-transform: rotate(360deg);\r\n transform: rotate(360deg);\r\n }\r\n}\r\n/**\r\n * Button\r\n */\r\n.cdx-button {\r\n padding: 13px;\r\n border-radius: 3px;\r\n border: 1px solid rgba(201, 201, 204, 0.48);\r\n border: 1px solid var(--color-gray-border);\r\n font-size: 14.9px;\r\n background: #fff;\r\n -webkit-box-shadow: 0 2px 2px 0 rgba(18,30,57,0.04);\r\n box-shadow: 0 2px 2px 0 rgba(18,30,57,0.04);\r\n color: #707684;\r\n color: var(--grayText);\r\n text-align: center;\r\n cursor: pointer\r\n}\r\n.cdx-button:hover {\r\n background: #FBFCFE;\r\n -webkit-box-shadow: 0 1px 3px 0 rgba(18,30,57,0.08);\r\n box-shadow: 0 1px 3px 0 rgba(18,30,57,0.08);\r\n }\r\n.cdx-button svg {\r\n height: 20px;\r\n margin-right: 0.2em;\r\n margin-top: -2px;\r\n }\r\n.ce-stub {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n -webkit-box-pack: center;\r\n -ms-flex-pack: center;\r\n justify-content: center;\r\n width: 100%;\r\n padding: 3.5em 0;\r\n margin: 17px 0;\r\n border-radius: 3px;\r\n background: #fcf7f7;\r\n color: #b46262;\r\n}\r\n.ce-stub__info {\r\n margin-left: 20px;\r\n }\r\n.ce-stub__title {\r\n margin-bottom: 3px;\r\n font-weight: 600;\r\n font-size: 18px;\r\n text-transform: capitalize;\r\n }\r\n.ce-stub__subtitle {\r\n font-size: 16px;\r\n }\r\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o=0&&e.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(t){var e=document.createDocumentFragment();Array.isArray(t)||(t=[t]),t.forEach(function(t){var n=t instanceof Node;e.appendChild(n?t:document.createTextNode(String(t)))}),this.insertBefore(e,this.firstChild)})})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){(e=t.exports=function(...t){return o(...t)}).__esModule=!0;const r=n(355),o=r.default;Object.assign(e,r)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){},e.revert=function(){}}])}); \ No newline at end of file +var o=function(){function t(e){var n=e.data,r=(e.config,e.api);!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.api=r,this._CSS={block:this.api.styles.block,wrapper:"ce-paragraph"},this._data={},this._element=this.drawView(),this.data=n}return r(t,[{key:"drawView",value:function(){var t=document.createElement("DIV");return t.classList.add(this._CSS.wrapper,this._CSS.block),t.contentEditable=!0,t}},{key:"render",value:function(){return this._element}},{key:"merge",value:function(t){var e={text:this.data.text+t.text};this.data=e}},{key:"validate",value:function(t){return""!==t.text.trim()}},{key:"save",value:function(t){return{text:t.innerHTML}}},{key:"onPaste",value:function(t){var e={text:t.detail.data.innerHTML};this.data=e}},{key:"sanitize",get:function(){return{text:{br:!0}}}},{key:"data",get:function(){var t=this._element.innerHTML;return this._data.text=t,this._data},set:function(t){this._data=t||{},this._element.innerHTML=this._data.text||""}}],[{key:"pasteConfig",get:function(){return{tags:["P"]}}}]),t}();t.exports=o},function(t,e,n){var r=n(2);"string"==typeof r&&(r=[[t.i,r,""]]),n(4)(r,{hmr:!0,transform:void 0,insertInto:void 0}),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,".ce-paragraph {\n line-height: 1.6em;\n outline: none;\n}\n\n.ce-paragraph p:first-of-type{\n margin-top: 0;\n}\n\n.ce-paragraph p:last-of-type{\n margin-bottom: 0;\n}\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(r),i=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o=0&&u.splice(e,1)}function h(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),v(e,t.attrs),d(t,e),e}function v(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function g(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var u=s++;n=a||(a=h(e)),r=b.bind(null,n,u,!1),o=b.bind(null,n,u,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),d(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=c(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),o=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(e),r=function(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){p(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return l(n,e),function(t){for(var o=[],i=0;i\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n \r\n \r\n \r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n'},function(t,e,n){(t.exports=n(355)(!1)).push([t.i,":root {\r\n /**\r\n * Selection color\r\n */\r\n --selectionColor: #a8d6ff;\r\n\r\n /**\r\n * Toolbar buttons\r\n */\r\n --bg-light: #eff2f5;\r\n\r\n /**\r\n * All gray texts: placeholders, settings\r\n */\r\n --grayText: #707684;\r\n\r\n /**\r\n * Blue icons\r\n */\r\n --color-active-icon: #388AE5;\r\n\r\n /**\r\n * Gray border, loaders\r\n */\r\n --color-gray-border: rgba(201, 201, 204, 0.48);\r\n\r\n /**\r\n * Block content width\r\n */\r\n --content-width: 650px;\r\n\r\n /**\r\n * Toolbar buttons height and width\r\n */\r\n --toolbar-buttons-size: 34px;\r\n\r\n /**\r\n * Toolbar Plus Button and Toolbox buttons height and width\r\n */\r\n --toolbox-buttons-size: 24px;\r\n\r\n /**\r\n * Confirm deletion bg\r\n */\r\n --color-confirm: #E24A4A;\r\n}\r\n/**\r\n* Editor wrapper\r\n*/\r\n.codex-editor {\r\n position: relative;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n z-index: 1;\r\n}\r\n.codex-editor .hide {\r\n display: none;\r\n }\r\n.codex-editor__redactor {\r\n padding-bottom: 300px;\r\n }\r\n.codex-editor-copyable {\r\n position: absolute;\r\n height: 1px;\r\n width: 1px;\r\n top: -400%;\r\n opacity: 0.001;\r\n }\r\n.codex-editor svg {\r\n fill: currentColor;\r\n vertical-align: middle;\r\n max-height: 100%;\r\n }\r\n/**\r\n * Set color for native selection\r\n */\r\n::-moz-selection{\r\n background-color: #a8d6ff;\r\n background-color: var(--selectionColor);\r\n}\r\n::selection{\r\n background-color: #a8d6ff;\r\n background-color: var(--selectionColor);\r\n}\r\n/**\r\n * Add placeholder to content editable elements with data attribute\r\n * data-placeholder=\"Hello world!\"\r\n */\r\n[contentEditable=true][data-placeholder]:empty::before{\r\n content: attr(data-placeholder);\r\n color: #707684;\r\n color: var(--grayText);\r\n font-weight: normal;\r\n}\r\n[contentEditable=true][data-placeholder]:empty:focus::before {\r\n opacity: 0.3;\r\n}\r\n.ce-toolbar {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: 0;\r\n /*opacity: 0;*/\r\n /*visibility: hidden;*/\r\n -webkit-transition: opacity 100ms ease;\r\n transition: opacity 100ms ease;\r\n will-change: opacity, transform;\r\n display: none;\r\n}\r\n.ce-toolbar--opened {\r\n display: block;\r\n /*opacity: 1;*/\r\n /*visibility: visible;*/\r\n }\r\n.ce-toolbar__content {\r\n max-width: 650px;\r\n max-width: var(--content-width);\r\n margin: 0 auto;\r\n position: relative;\r\n }\r\n.ce-toolbar__plus {\r\n color: #707684;\r\n color: var(--grayText);\r\n cursor: pointer;\r\n width: 24px;\r\n width: var(--toolbox-buttons-size);\r\n height: 24px;\r\n height: var(--toolbox-buttons-size);\r\n display: -webkit-inline-box;\r\n display: -ms-inline-flexbox;\r\n display: inline-flex;\r\n -webkit-box-pack: center;\r\n -ms-flex-pack: center;\r\n justify-content: center;\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n align-items: center\r\n }\r\n.ce-toolbar__plus:not(:last-of-type){\r\n margin-right: 10px;\r\n }\r\n.ce-toolbar__plus {\r\n\r\n position: absolute;\r\n left: calc(calc(24px + 10px) * -1);\r\n left: calc(calc(var(--toolbox-buttons-size) + 10px) * -1);\r\n }\r\n.ce-toolbar__plus:hover,\r\n .ce-toolbar__plus--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.ce-toolbar__plus--active{\r\n -webkit-animation: bounceIn 0.75s 1;\r\n animation: bounceIn 0.75s 1;\r\n -webkit-animation-fill-mode: forwards;\r\n animation-fill-mode: forwards;\r\n }\r\n.ce-toolbar__plus--hidden {\r\n display: none;\r\n }\r\n.ce-toolbar__plus,\r\n .ce-toolbar .ce-toolbox {\r\n top: 50%;\r\n -webkit-transform: translateY(-50%);\r\n transform: translateY(-50%);\r\n }\r\n/**\r\n * Block actions Zone\r\n * -------------------------\r\n */\r\n.ce-toolbar__actions {\r\n position: absolute;\r\n right: 0;\r\n top: 10px;\r\n padding-right: 16px;\r\n opacity: 0;\r\n }\r\n.ce-toolbar__actions--opened {\r\n opacity: 1;\r\n }\r\n.ce-toolbar__actions-buttons {\r\n text-align: right;\r\n }\r\n.ce-toolbar__settings-btn {\r\n display: inline-block;\r\n width: 24px;\r\n height: 24px;\r\n color: #707684;\r\n color: var(--grayText);\r\n cursor: pointer;\r\n }\r\n.ce-toolbox {\r\n position: absolute;\r\n visibility: hidden;\r\n -webkit-transition: opacity 100ms ease;\r\n transition: opacity 100ms ease;\r\n will-change: opacity;\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-orient: horizontal;\r\n -webkit-box-direction: normal;\r\n -ms-flex-direction: row;\r\n flex-direction: row;\r\n}\r\n.ce-toolbox--opened {\r\n opacity: 1;\r\n visibility: visible;\r\n }\r\n.ce-toolbox__button {\r\n color: #707684;\r\n color: var(--grayText);\r\n cursor: pointer;\r\n width: 24px;\r\n width: var(--toolbox-buttons-size);\r\n height: 24px;\r\n height: var(--toolbox-buttons-size);\r\n display: -webkit-inline-box;\r\n display: -ms-inline-flexbox;\r\n display: inline-flex;\r\n -webkit-box-pack: center;\r\n -ms-flex-pack: center;\r\n justify-content: center;\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n }\r\n.ce-toolbox__button:not(:last-of-type){\r\n margin-right: 10px;\r\n }\r\n.ce-toolbox__button:hover,\r\n .ce-toolbox__button--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.ce-toolbox__button--active{\r\n -webkit-animation: bounceIn 0.75s 1;\r\n animation: bounceIn 0.75s 1;\r\n -webkit-animation-fill-mode: forwards;\r\n animation-fill-mode: forwards;\r\n }\r\n.ce-inline-toolbar {\r\n position: absolute;\r\n background-color: #FFFFFF;\r\n -webkit-box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\r\n box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\r\n border-radius: 4px;\r\n z-index: 2\r\n}\r\n.ce-inline-toolbar::before {\r\n content: '';\r\n width: 15px;\r\n height: 15px;\r\n position: absolute;\r\n top: -7px;\r\n left: 50%;\r\n margin-left: -7px;\r\n -webkit-transform: rotate(-45deg);\r\n transform: rotate(-45deg);\r\n background-color: #fff;\r\n z-index: -1;\r\n }\r\n.ce-inline-toolbar {\r\n padding: 6px;\r\n -webkit-transform: translateX(-50%);\r\n transform: translateX(-50%);\r\n display: none;\r\n -webkit-box-shadow: 0 6px 12px -6px rgba(131, 147, 173, 0.46),\r\n 5px -12px 34px -13px rgba(97, 105, 134, 0.6),\r\n 0 26px 52px 3px rgba(147, 165, 186, 0.24);\r\n box-shadow: 0 6px 12px -6px rgba(131, 147, 173, 0.46),\r\n 5px -12px 34px -13px rgba(97, 105, 134, 0.6),\r\n 0 26px 52px 3px rgba(147, 165, 186, 0.24);\r\n}\r\n.ce-inline-toolbar--showed {\r\n display: block;\r\n }\r\n.ce-inline-toolbar [hidden] {\r\n display: none !important;\r\n }\r\n.ce-inline-tool {\r\n display: -webkit-inline-box;\r\n display: -ms-inline-flexbox;\r\n display: inline-flex;\r\n width: 34px;\r\n height: 34px;\r\n line-height: 34px;\r\n text-align: center;\r\n border-radius: 3px;\r\n cursor: pointer;\r\n border: 0;\r\n outline: none;\r\n background-color: transparent;\r\n vertical-align: bottom;\r\n color: #707684;\r\n color: var(--grayText)\r\n}\r\n.ce-inline-tool:not(:last-of-type){\r\n margin-right: 5px;\r\n }\r\n.ce-inline-tool:hover {\r\n background-color: #eff2f5;\r\n background-color: var(--bg-light);\r\n }\r\n.ce-inline-tool {\r\n line-height: normal;\r\n}\r\n.ce-inline-tool > svg,\r\n .ce-inline-tool .icon {\r\n margin: auto;\r\n }\r\n.ce-inline-tool--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.ce-inline-tool--last {\r\n margin-right: 0 !important;\r\n }\r\n.ce-inline-tool--link .icon {\r\n margin-top: -2px;\r\n }\r\n.ce-inline-tool--link .icon--unlink {\r\n display: none;\r\n }\r\n.ce-inline-tool--unlink .icon--link {\r\n display: none;\r\n }\r\n.ce-inline-tool--unlink .icon--unlink {\r\n display: inline-block;\r\n }\r\n.ce-inline-tool-input {\r\n background-color: #eff2f5;\r\n background-color: var(--bg-light);\r\n outline: none;\r\n border: 0;\r\n border-radius: 3px;\r\n margin: 6px 0 0;\r\n font-size: 13px;\r\n padding: 8px;\r\n width: 100%;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n display: none\r\n }\r\n.ce-inline-tool-input::-webkit-input-placeholder {\r\n color: #707684;\r\n color: var(--grayText);\r\n }\r\n.ce-inline-tool-input::-ms-input-placeholder {\r\n color: #707684;\r\n color: var(--grayText);\r\n }\r\n.ce-inline-tool-input::placeholder {\r\n color: #707684;\r\n color: var(--grayText);\r\n }\r\n.ce-inline-tool-input--showed {\r\n display: block;\r\n }\r\n.ce-settings {\r\n position: absolute;\r\n background-color: #FFFFFF;\r\n -webkit-box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\r\n box-shadow: 0 8px 23px -6px rgba(21,40,54,0.31), 22px -14px 34px -18px rgba(33,48,73,0.26);\r\n border-radius: 4px;\r\n z-index: 2\r\n}\r\n.ce-settings::before {\r\n content: '';\r\n width: 15px;\r\n height: 15px;\r\n position: absolute;\r\n top: -7px;\r\n left: 50%;\r\n margin-left: -7px;\r\n -webkit-transform: rotate(-45deg);\r\n transform: rotate(-45deg);\r\n background-color: #fff;\r\n z-index: -1;\r\n }\r\n.ce-settings {\r\n right: 5px;\r\n top: 35px;\r\n min-width: 124px\r\n}\r\n.ce-settings::before{\r\n left: auto;\r\n right: 12px;\r\n }\r\n.ce-settings {\r\n\r\n display: none;\r\n}\r\n.ce-settings--opened {\r\n display: block;\r\n -webkit-animation-duration: 0.5s;\r\n animation-duration: 0.5s;\r\n -webkit-animation-name: bounceIn;\r\n animation-name: bounceIn;\r\n }\r\n.ce-settings__plugin-zone:not(:empty){\r\n padding: 6px 6px 0;\r\n }\r\n.ce-settings__default-zone:not(:empty){\r\n padding: 6px;\r\n }\r\n.ce-settings__button {\r\n display: -webkit-inline-box;\r\n display: -ms-inline-flexbox;\r\n display: inline-flex;\r\n width: 34px;\r\n height: 34px;\r\n line-height: 34px;\r\n text-align: center;\r\n border-radius: 3px;\r\n cursor: pointer;\r\n border: 0;\r\n outline: none;\r\n background-color: transparent;\r\n vertical-align: bottom;\r\n color: #707684;\r\n color: var(--grayText)\r\n }\r\n.ce-settings__button:not(:last-of-type){\r\n margin-right: 5px;\r\n }\r\n.ce-settings__button:hover {\r\n background-color: #eff2f5;\r\n background-color: var(--bg-light);\r\n }\r\n.ce-settings__button {\r\n line-height: 32px;\r\n }\r\n.ce-settings__button > svg,\r\n .ce-settings__button .icon {\r\n margin: auto;\r\n }\r\n.ce-settings__button--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.ce-settings__button--disabled {\r\n cursor: not-allowed !important;\r\n opacity: .3;\r\n }\r\n.ce-settings__button--selected {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.ce-settings__button--delete {\r\n -webkit-transition: background-color 300ms ease;\r\n transition: background-color 300ms ease;\r\n will-change: background-color;\r\n }\r\n.ce-settings__button--delete .icon {\r\n -webkit-transition: -webkit-transform 200ms ease-out;\r\n transition: -webkit-transform 200ms ease-out;\r\n transition: transform 200ms ease-out;\r\n transition: transform 200ms ease-out, -webkit-transform 200ms ease-out;\r\n will-change: transform;\r\n }\r\n.ce-settings__button--confirm {\r\n background-color: #E24A4A;\r\n background-color: var(--color-confirm);\r\n color: #fff\r\n }\r\n.ce-settings__button--confirm:hover {\r\n background-color: rgb(213, 74, 74) !important;\r\n background-color: rgb(213, 74, 74) !important;\r\n }\r\n.ce-settings__button--confirm .icon {\r\n -webkit-transform: rotate(90deg);\r\n transform: rotate(90deg);\r\n }\r\n.ce-block:first-of-type {\r\n margin-top: 0;\r\n }\r\n.ce-block--focused {\r\n background-image: linear-gradient(17deg, rgba(243, 248, 255, 0.03) 63.45%, rgba(207, 214, 229, 0.27) 98%);\r\n border-radius: 3px;\r\n }\r\n.ce-block--selected .ce-block__content {\r\n background: #a8d6ff;\r\n background: var(--selectionColor);\r\n -webkit-box-shadow: 0 31px 23px -22px rgba(175, 220, 255, 1);\r\n box-shadow: 0 31px 23px -22px rgba(175, 220, 255, 1);\r\n -webkit-animation: selectionBounce 0.2s 1;\r\n animation: selectionBounce 0.2s 1;\r\n -webkit-animation-fill-mode: forwards;\r\n animation-fill-mode: forwards;\r\n }\r\n.ce-block--selected .ce-block__content img,\r\n .ce-block--selected .ce-block__content .ce-stub {\r\n opacity: 0.55;\r\n }\r\n.ce-block--stretched .ce-block__content {\r\n max-width: none;\r\n }\r\n.ce-block__content {\r\n position: relative;\r\n max-width: 650px;\r\n max-width: var(--content-width);\r\n margin: 0 auto;\r\n }\r\n.ce-block--drop-target .ce-block__content:before {\r\n content: '';\r\n position: absolute;\r\n top: 100%;\r\n left: -20px;\r\n margin-top: -1px;\r\n height: 8px;\r\n width: 8px;\r\n border: solid #388AE5;\r\n border: solid var(--color-active-icon);\r\n border-width: 1px 1px 0 0;\r\n -webkit-transform-origin: right;\r\n transform-origin: right;\r\n -webkit-transform: rotate(45deg);\r\n transform: rotate(45deg);\r\n }\r\n.ce-block--drop-target .ce-block__content:after {\r\n content: '';\r\n position: absolute;\r\n top: 100%;\r\n height: 1px;\r\n width: 100%;\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n background: repeating-linear-gradient(\r\n 90deg,\r\n #388AE5,\r\n #388AE5 1px,\r\n #fff 1px,\r\n #fff 6px\r\n );\r\n background: repeating-linear-gradient(\r\n 90deg,\r\n var(--color-active-icon),\r\n var(--color-active-icon) 1px,\r\n #fff 1px,\r\n #fff 6px\r\n );\r\n }\r\n.ce-block a {\r\n cursor: pointer;\r\n text-decoration: underline;\r\n }\r\n.ce-block b {\r\n font-weight: bold;\r\n }\r\n.ce-block i {\r\n font-style: italic;\r\n }\r\n.wobble {\r\n -webkit-animation-name: wobble;\r\n animation-name: wobble;\r\n -webkit-animation-duration: 400ms;\r\n animation-duration: 400ms;\r\n}\r\n/**\r\n * @author Nick Pettit - https://github.com/nickpettit/glide\r\n */\r\n@-webkit-keyframes wobble {\r\n from {\r\n -webkit-transform: translate3d(0, 0, 0);\r\n transform: translate3d(0, 0, 0);\r\n }\r\n\r\n 15% {\r\n -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\r\n transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\r\n }\r\n\r\n 30% {\r\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\r\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\r\n }\r\n\r\n 45% {\r\n -webkit-transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\r\n transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\r\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\r\n }\r\n\r\n 75% {\r\n -webkit-transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\r\n transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\r\n }\r\n\r\n to {\r\n -webkit-transform: translate3d(0, 0, 0);\r\n transform: translate3d(0, 0, 0);\r\n }\r\n}\r\n@keyframes wobble {\r\n from {\r\n -webkit-transform: translate3d(0, 0, 0);\r\n transform: translate3d(0, 0, 0);\r\n }\r\n\r\n 15% {\r\n -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\r\n transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -5deg);\r\n }\r\n\r\n 30% {\r\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\r\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 3deg);\r\n }\r\n\r\n 45% {\r\n -webkit-transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\r\n transform: translate3d(-3%, 0, 0) rotate3d(0, 0, 1, -3deg);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\r\n transform: translate3d(2%, 0, 0) rotate3d(0, 0, 1, 2deg);\r\n }\r\n\r\n 75% {\r\n -webkit-transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\r\n transform: translate3d(-1%, 0, 0) rotate3d(0, 0, 1, -1deg);\r\n }\r\n\r\n to {\r\n -webkit-transform: translate3d(0, 0, 0);\r\n transform: translate3d(0, 0, 0);\r\n }\r\n}\r\n@-webkit-keyframes bounceIn {\r\n from,\r\n 20%,\r\n 40%,\r\n 60%,\r\n 80%,\r\n to {\r\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n }\r\n\r\n 0% {\r\n -webkit-transform: scale3d(0.9, 0.9, 0.9);\r\n transform: scale3d(0.9, 0.9, 0.9);\r\n }\r\n\r\n 20% {\r\n -webkit-transform: scale3d(1.03, 1.03, 1.03);\r\n transform: scale3d(1.03, 1.03, 1.03);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: scale3d(1, 1, 1);\r\n transform: scale3d(1, 1, 1);\r\n }\r\n}\r\n@keyframes bounceIn {\r\n from,\r\n 20%,\r\n 40%,\r\n 60%,\r\n 80%,\r\n to {\r\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n }\r\n\r\n 0% {\r\n -webkit-transform: scale3d(0.9, 0.9, 0.9);\r\n transform: scale3d(0.9, 0.9, 0.9);\r\n }\r\n\r\n 20% {\r\n -webkit-transform: scale3d(1.03, 1.03, 1.03);\r\n transform: scale3d(1.03, 1.03, 1.03);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: scale3d(1, 1, 1);\r\n transform: scale3d(1, 1, 1);\r\n }\r\n}\r\n@-webkit-keyframes selectionBounce {\r\n from,\r\n 20%,\r\n 40%,\r\n 60%,\r\n 80%,\r\n to {\r\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n }\r\n\r\n 50% {\r\n -webkit-transform: scale3d(1.01, 1.01, 1.01);\r\n transform: scale3d(1.01, 1.01, 1.01);\r\n }\r\n\r\n 70% {\r\n -webkit-transform: scale3d(1, 1, 1);\r\n transform: scale3d(1, 1, 1);\r\n }\r\n}\r\n@keyframes selectionBounce {\r\n from,\r\n 20%,\r\n 40%,\r\n 60%,\r\n 80%,\r\n to {\r\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\r\n }\r\n\r\n 50% {\r\n -webkit-transform: scale3d(1.01, 1.01, 1.01);\r\n transform: scale3d(1.01, 1.01, 1.01);\r\n }\r\n\r\n 70% {\r\n -webkit-transform: scale3d(1, 1, 1);\r\n transform: scale3d(1, 1, 1);\r\n }\r\n}\r\n/**\r\n * Block Tool wrapper\r\n */\r\n.cdx-block {\r\n padding: 0.7em 0;\r\n}\r\n/**\r\n * Input\r\n */\r\n.cdx-input {\r\n border: 1px solid rgba(201, 201, 204, 0.48);\r\n border: 1px solid var(--color-gray-border);\r\n -webkit-box-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, 0.06);\r\n box-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, 0.06);\r\n border-radius: 3px;\r\n padding: 10px 12px;\r\n outline: none;\r\n width: 100%;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n/**\r\n * Settings\r\n */\r\n.cdx-settings-button {\r\n display: -webkit-inline-box;\r\n display: -ms-inline-flexbox;\r\n display: inline-flex;\r\n width: 34px;\r\n height: 34px;\r\n line-height: 34px;\r\n text-align: center;\r\n border-radius: 3px;\r\n cursor: pointer;\r\n border: 0;\r\n outline: none;\r\n background-color: transparent;\r\n vertical-align: bottom;\r\n color: #707684;\r\n color: var(--grayText)\r\n}\r\n.cdx-settings-button:not(:last-of-type){\r\n margin-right: 5px;\r\n }\r\n.cdx-settings-button:hover {\r\n background-color: #eff2f5;\r\n background-color: var(--bg-light);\r\n }\r\n.cdx-settings-button > svg,\r\n .cdx-settings-button .icon {\r\n margin: auto;\r\n }\r\n.cdx-settings-button--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n.cdx-settings-button--active {\r\n color: #388AE5;\r\n color: var(--color-active-icon);\r\n }\r\n/**\r\n * Loader\r\n */\r\n.cdx-loader {\r\n position: relative;\r\n border: 1px solid rgba(201, 201, 204, 0.48);\r\n border: 1px solid var(--color-gray-border)\r\n}\r\n.cdx-loader::before {\r\n content: '';\r\n position: absolute;\r\n left: 50%;\r\n top: 50%;\r\n width: 18px;\r\n height: 18px;\r\n margin: -11px 0 0 -11px;\r\n border: 2px solid rgba(201, 201, 204, 0.48);\r\n border: 2px solid var(--color-gray-border);\r\n border-left-color: #388AE5;\r\n border-left-color: var(--color-active-icon);\r\n border-radius: 50%;\r\n -webkit-animation: cdxRotation 1.2s infinite linear;\r\n animation: cdxRotation 1.2s infinite linear;\r\n }\r\n@-webkit-keyframes cdxRotation {\r\n 0% {\r\n -webkit-transform: rotate(0deg);\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n -webkit-transform: rotate(360deg);\r\n transform: rotate(360deg);\r\n }\r\n}\r\n@keyframes cdxRotation {\r\n 0% {\r\n -webkit-transform: rotate(0deg);\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n -webkit-transform: rotate(360deg);\r\n transform: rotate(360deg);\r\n }\r\n}\r\n/**\r\n * Button\r\n */\r\n.cdx-button {\r\n padding: 13px;\r\n border-radius: 3px;\r\n border: 1px solid rgba(201, 201, 204, 0.48);\r\n border: 1px solid var(--color-gray-border);\r\n font-size: 14.9px;\r\n background: #fff;\r\n -webkit-box-shadow: 0 2px 2px 0 rgba(18,30,57,0.04);\r\n box-shadow: 0 2px 2px 0 rgba(18,30,57,0.04);\r\n color: #707684;\r\n color: var(--grayText);\r\n text-align: center;\r\n cursor: pointer\r\n}\r\n.cdx-button:hover {\r\n background: #FBFCFE;\r\n -webkit-box-shadow: 0 1px 3px 0 rgba(18,30,57,0.08);\r\n box-shadow: 0 1px 3px 0 rgba(18,30,57,0.08);\r\n }\r\n.cdx-button svg {\r\n height: 20px;\r\n margin-right: 0.2em;\r\n margin-top: -2px;\r\n }\r\n.ce-stub {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n -webkit-box-pack: center;\r\n -ms-flex-pack: center;\r\n justify-content: center;\r\n width: 100%;\r\n padding: 3.5em 0;\r\n margin: 17px 0;\r\n border-radius: 3px;\r\n background: #fcf7f7;\r\n color: #b46262;\r\n}\r\n.ce-stub__info {\r\n margin-left: 20px;\r\n }\r\n.ce-stub__title {\r\n margin-bottom: 3px;\r\n font-weight: 600;\r\n font-size: 18px;\r\n text-transform: capitalize;\r\n }\r\n.ce-stub__subtitle {\r\n font-size: 16px;\r\n }\r\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + codex-notifier MIT MIT License @@ -376,29 +402,3 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -@babel/register -MIT -MIT License - -Copyright (c) 2014-2018 Sebastian McKenzie - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/package.json b/package.json index 2814d877..58cf84b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codex.editor", - "version": "2.7.18", + "version": "2.7.19", "description": "CodeX Editor. Native JS, based on API and Open Source", "main": "dist/codex-editor.js", "types": "./types/index.d.ts", diff --git a/src/components/modules/paste.ts b/src/components/modules/paste.ts index 5a510319..a9ddca07 100644 --- a/src/components/modules/paste.ts +++ b/src/components/modules/paste.ts @@ -157,7 +157,7 @@ export default class Paste extends Module { return result; }, {}); - const customConfig = Object.assign({}, toolsTags, Sanitizer.getAllInlineToolsConfig()); + const customConfig = Object.assign({}, toolsTags, Sanitizer.getAllInlineToolsConfig(), {br: {}}); const cleanData = Sanitizer.clean(htmlData, customConfig); @@ -658,6 +658,10 @@ export default class Paste extends Module { case Node.ELEMENT_NODE: const element = node as HTMLElement; + if (element.tagName === 'BR') { + return [...nodes, destNode, new DocumentFragment()]; + } + const {tool = ''} = this.toolsTags[element.tagName] || {}; const toolTags = this.tagsByTool[tool] || [];