roosterjs 8.19.2 → 8.19.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- define((function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=106)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KnownCreateElementData=t.createElement=t.matchesSelector=t.setColor=t.getInnerHTML=t.readFile=t.safeInstanceOf=t.toArray=t.normalizeRect=t.splitTextNode=t.getLastLeafNode=t.getFirstLeafNode=t.getPreviousLeafSibling=t.getNextLeafSibling=t.wrap=t.unwrap=t.splitBalancedNodeRange=t.splitParentNode=t.queryElements=t.matchLink=t.isVoidHtmlElement=t.isNodeEmpty=t.isBlockElement=t.getTagOfNode=t.PendableFormatCommandMap=t.getPendableFormatState=t.getComputedStyle=t.getComputedStyles=t.fromHtml=t.findClosestElementAncestor=t.contains=t.collapseNodes=t.changeElementTag=t.applyFormat=t.getBrowserInfo=t.Browser=t.arrayPush=t.extractClipboardItemsForIE=t.extractClipboardItems=t.extractClipboardEvent=t.applyTextStyle=t.PartialInlineElement=t.NodeInlineElement=t.LinkInlineElement=t.ImageInlineElement=t.getInlineElementAtNode=t.PositionContentSearcher=t.ContentTraverser=t.getFirstLastBlockElement=t.getBlockElementAtNode=void 0,t.getTextContent=t.deleteSelectedContent=t.adjustInsertPosition=t.setStyles=t.getStyles=t.isCtrlOrMetaPressed=t.isCharacterValue=t.isModifierKey=t.clearEventDataCache=t.cacheGetEventData=t.getEntitySelector=t.getEntityFromElement=t.commitEntity=t.chainSanitizerCallback=t.createDefaultHtmlSanitizerOptions=t.getInheritableStyles=t.HtmlSanitizer=t.canUndoAutoComplete=t.createSnapshots=t.moveCurrentSnapsnot=t.moveCurrentSnapshot=t.clearProceedingSnapshotsV2=t.clearProceedingSnapshots=t.canMoveCurrentSnapshot=t.addSnapshotV2=t.addSnapshot=t.addRangeToSelection=t.setHtmlWithMetadata=t.setHtmlWithSelectionPath=t.getHtmlWithSelectionPath=t.getSelectionPath=t.isPositionAtBeginningOf=t.getPositionRect=t.createRange=t.Position=t.mergeBlocksInRegion=t.getSelectionRangeInRegion=t.isNodeInRegion=t.collapseNodesInRegion=t.getSelectedBlockElementsInRegion=t.getRegionsFromRange=t.setListItemStyle=t.VListChain=t.createVListFromRegion=t.VListItem=t.VList=t.isWholeTableSelected=t.VTable=t.moveChildNodes=void 0;var r=n(7);Object.defineProperty(t,"getBlockElementAtNode",{enumerable:!0,get:function(){return r.default}});var o=n(57);Object.defineProperty(t,"getFirstLastBlockElement",{enumerable:!0,get:function(){return o.default}});var i=n(22);Object.defineProperty(t,"ContentTraverser",{enumerable:!0,get:function(){return i.default}});var a=n(62);Object.defineProperty(t,"PositionContentSearcher",{enumerable:!0,get:function(){return a.default}});var l=n(15);Object.defineProperty(t,"getInlineElementAtNode",{enumerable:!0,get:function(){return l.default}});var s=n(58);Object.defineProperty(t,"ImageInlineElement",{enumerable:!0,get:function(){return s.default}});var u=n(40);Object.defineProperty(t,"LinkInlineElement",{enumerable:!0,get:function(){return u.default}});var c=n(27);Object.defineProperty(t,"NodeInlineElement",{enumerable:!0,get:function(){return c.default}});var d=n(29);Object.defineProperty(t,"PartialInlineElement",{enumerable:!0,get:function(){return d.default}});var f=n(38);Object.defineProperty(t,"applyTextStyle",{enumerable:!0,get:function(){return f.default}});var h=n(115);Object.defineProperty(t,"extractClipboardEvent",{enumerable:!0,get:function(){return h.default}});var p=n(63);Object.defineProperty(t,"extractClipboardItems",{enumerable:!0,get:function(){return p.default}});var g=n(64);Object.defineProperty(t,"extractClipboardItemsForIE",{enumerable:!0,get:function(){return g.default}});var v=n(43);Object.defineProperty(t,"arrayPush",{enumerable:!0,get:function(){return v.default}});var m=n(21);Object.defineProperty(t,"Browser",{enumerable:!0,get:function(){return m.Browser}}),Object.defineProperty(t,"getBrowserInfo",{enumerable:!0,get:function(){return m.getBrowserInfo}});var y=n(116);Object.defineProperty(t,"applyFormat",{enumerable:!0,get:function(){return y.default}});var b=n(16);Object.defineProperty(t,"changeElementTag",{enumerable:!0,get:function(){return b.default}});var E=n(18);Object.defineProperty(t,"collapseNodes",{enumerable:!0,get:function(){return E.default}});var C=n(3);Object.defineProperty(t,"contains",{enumerable:!0,get:function(){return C.default}});var S=n(11);Object.defineProperty(t,"findClosestElementAncestor",{enumerable:!0,get:function(){return S.default}});var w=n(56);Object.defineProperty(t,"fromHtml",{enumerable:!0,get:function(){return w.default}});var P=n(39);Object.defineProperty(t,"getComputedStyles",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"getComputedStyle",{enumerable:!0,get:function(){return P.getComputedStyle}});var T=n(117);Object.defineProperty(t,"getPendableFormatState",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"PendableFormatCommandMap",{enumerable:!0,get:function(){return T.PendableFormatCommandMap}});var O=n(2);Object.defineProperty(t,"getTagOfNode",{enumerable:!0,get:function(){return O.default}});var x=n(19);Object.defineProperty(t,"isBlockElement",{enumerable:!0,get:function(){return x.default}});var N=n(31);Object.defineProperty(t,"isNodeEmpty",{enumerable:!0,get:function(){return N.default}});var _=n(37);Object.defineProperty(t,"isVoidHtmlElement",{enumerable:!0,get:function(){return _.default}});var M=n(118);Object.defineProperty(t,"matchLink",{enumerable:!0,get:function(){return M.default}});var k=n(17);Object.defineProperty(t,"queryElements",{enumerable:!0,get:function(){return k.default}});var I=n(13);Object.defineProperty(t,"splitParentNode",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"splitBalancedNodeRange",{enumerable:!0,get:function(){return I.splitBalancedNodeRange}});var R=n(32);Object.defineProperty(t,"unwrap",{enumerable:!0,get:function(){return R.default}});var L=n(12);Object.defineProperty(t,"wrap",{enumerable:!0,get:function(){return L.default}});var A=n(8);Object.defineProperty(t,"getNextLeafSibling",{enumerable:!0,get:function(){return A.getNextLeafSibling}}),Object.defineProperty(t,"getPreviousLeafSibling",{enumerable:!0,get:function(){return A.getPreviousLeafSibling}});var j=n(60);Object.defineProperty(t,"getFirstLeafNode",{enumerable:!0,get:function(){return j.getFirstLeafNode}}),Object.defineProperty(t,"getLastLeafNode",{enumerable:!0,get:function(){return j.getLastLeafNode}});var D=n(28);Object.defineProperty(t,"splitTextNode",{enumerable:!0,get:function(){return D.default}});var B=n(45);Object.defineProperty(t,"normalizeRect",{enumerable:!0,get:function(){return B.default}});var F=n(5);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return F.default}});var H=n(1);Object.defineProperty(t,"safeInstanceOf",{enumerable:!0,get:function(){return H.default}});var z=n(42);Object.defineProperty(t,"readFile",{enumerable:!0,get:function(){return z.default}});var U=n(65);Object.defineProperty(t,"getInnerHTML",{enumerable:!0,get:function(){return U.default}});var W=n(44);Object.defineProperty(t,"setColor",{enumerable:!0,get:function(){return W.default}});var V=n(55);Object.defineProperty(t,"matchesSelector",{enumerable:!0,get:function(){return V.default}});var K=n(20);Object.defineProperty(t,"createElement",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(t,"KnownCreateElementData",{enumerable:!0,get:function(){return K.KnownCreateElementData}});var q=n(30);Object.defineProperty(t,"moveChildNodes",{enumerable:!0,get:function(){return q.default}});var G=n(66);Object.defineProperty(t,"VTable",{enumerable:!0,get:function(){return G.default}});var $=n(121);Object.defineProperty(t,"isWholeTableSelected",{enumerable:!0,get:function(){return $.default}});var Y=n(46);Object.defineProperty(t,"VList",{enumerable:!0,get:function(){return Y.default}});var X=n(67);Object.defineProperty(t,"VListItem",{enumerable:!0,get:function(){return X.default}});var Z=n(122);Object.defineProperty(t,"createVListFromRegion",{enumerable:!0,get:function(){return Z.default}});var Q=n(123);Object.defineProperty(t,"VListChain",{enumerable:!0,get:function(){return Q.default}});var J=n(68);Object.defineProperty(t,"setListItemStyle",{enumerable:!0,get:function(){return J.default}});var ee=n(71);Object.defineProperty(t,"getRegionsFromRange",{enumerable:!0,get:function(){return ee.default}});var te=n(70);Object.defineProperty(t,"getSelectedBlockElementsInRegion",{enumerable:!0,get:function(){return te.default}});var ne=n(72);Object.defineProperty(t,"collapseNodesInRegion",{enumerable:!0,get:function(){return ne.default}});var re=n(24);Object.defineProperty(t,"isNodeInRegion",{enumerable:!0,get:function(){return re.default}});var oe=n(48);Object.defineProperty(t,"getSelectionRangeInRegion",{enumerable:!0,get:function(){return oe.default}});var ie=n(73);Object.defineProperty(t,"mergeBlocksInRegion",{enumerable:!0,get:function(){return ie.default}});var ae=n(4);Object.defineProperty(t,"Position",{enumerable:!0,get:function(){return ae.default}});var le=n(9);Object.defineProperty(t,"createRange",{enumerable:!0,get:function(){return le.default}});var se=n(124);Object.defineProperty(t,"getPositionRect",{enumerable:!0,get:function(){return se.default}});var ue=n(75);Object.defineProperty(t,"isPositionAtBeginningOf",{enumerable:!0,get:function(){return ue.default}});var ce=n(76);Object.defineProperty(t,"getSelectionPath",{enumerable:!0,get:function(){return ce.default}});var de=n(125);Object.defineProperty(t,"getHtmlWithSelectionPath",{enumerable:!0,get:function(){return de.default}});var fe=n(126);Object.defineProperty(t,"setHtmlWithSelectionPath",{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(t,"setHtmlWithMetadata",{enumerable:!0,get:function(){return fe.setHtmlWithMetadata}});var he=n(127);Object.defineProperty(t,"addRangeToSelection",{enumerable:!0,get:function(){return he.default}});var pe=n(128);Object.defineProperty(t,"addSnapshot",{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(t,"addSnapshotV2",{enumerable:!0,get:function(){return pe.addSnapshotV2}});var ge=n(49);Object.defineProperty(t,"canMoveCurrentSnapshot",{enumerable:!0,get:function(){return ge.default}});var ve=n(77);Object.defineProperty(t,"clearProceedingSnapshots",{enumerable:!0,get:function(){return ve.default}}),Object.defineProperty(t,"clearProceedingSnapshotsV2",{enumerable:!0,get:function(){return ve.clearProceedingSnapshotsV2}});var me=n(129);Object.defineProperty(t,"moveCurrentSnapshot",{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(t,"moveCurrentSnapsnot",{enumerable:!0,get:function(){return me.moveCurrentSnapsnot}});var ye=n(130);Object.defineProperty(t,"createSnapshots",{enumerable:!0,get:function(){return ye.default}});var be=n(131);Object.defineProperty(t,"canUndoAutoComplete",{enumerable:!0,get:function(){return be.default}});var Ee=n(132);Object.defineProperty(t,"HtmlSanitizer",{enumerable:!0,get:function(){return Ee.default}});var Ce=n(78);Object.defineProperty(t,"getInheritableStyles",{enumerable:!0,get:function(){return Ce.default}});var Se=n(134);Object.defineProperty(t,"createDefaultHtmlSanitizerOptions",{enumerable:!0,get:function(){return Se.default}});var we=n(135);Object.defineProperty(t,"chainSanitizerCallback",{enumerable:!0,get:function(){return we.default}});var Pe=n(136);Object.defineProperty(t,"commitEntity",{enumerable:!0,get:function(){return Pe.default}});var Te=n(137);Object.defineProperty(t,"getEntityFromElement",{enumerable:!0,get:function(){return Te.default}});var Oe=n(138);Object.defineProperty(t,"getEntitySelector",{enumerable:!0,get:function(){return Oe.default}});var xe=n(139);Object.defineProperty(t,"cacheGetEventData",{enumerable:!0,get:function(){return xe.default}});var Ne=n(140);Object.defineProperty(t,"clearEventDataCache",{enumerable:!0,get:function(){return Ne.default}});var _e=n(80);Object.defineProperty(t,"isModifierKey",{enumerable:!0,get:function(){return _e.default}});var Me=n(141);Object.defineProperty(t,"isCharacterValue",{enumerable:!0,get:function(){return Me.default}});var ke=n(142);Object.defineProperty(t,"isCtrlOrMetaPressed",{enumerable:!0,get:function(){return ke.default}});var Ie=n(33);Object.defineProperty(t,"getStyles",{enumerable:!0,get:function(){return Ie.default}});var Re=n(34);Object.defineProperty(t,"setStyles",{enumerable:!0,get:function(){return Re.default}});var Le=n(143);Object.defineProperty(t,"adjustInsertPosition",{enumerable:!0,get:function(){return Le.default}});var Ae=n(144);Object.defineProperty(t,"deleteSelectedContent",{enumerable:!0,get:function(){return Ae.default}});var je=n(145);Object.defineProperty(t,"getTextContent",{enumerable:!0,get:function(){return je.default}})},function(e,t,n){"use strict";function r(e){var t=e&&(e.commonAncestorContainer||e),n=t&&(t.ownerDocument||("[object HTMLDocument]"==Object.prototype.toString.apply(t)?t:null));return n&&(n.defaultView||window)}Object.defineProperty(t,"__esModule",{value:!0}),t.getTargetWindow=void 0,t.getTargetWindow=r,t.default=function(e,t){var n=r(e),o=n&&n[t],i=window,a=i&&i[t];return a&&e instanceof a||o&&e instanceof o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&1==e.nodeType?e.tagName.toUpperCase():""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(e,t,n){return!(!e||!t)&&(!(!n||e!=t)||((0,r.default)(t,"Range")&&(t=t&&t.commonAncestorContainer,n=!0),t&&3==t.nodeType&&(t=t.parentNode,n=!0),1!=e.nodeType&&11!=e.nodeType?!!n&&e==t:!(!n&&e==t)&&function(e,t){if(e.contains)return e.contains(t);for(;t;){if(t==e)return!0;t=t.parentNode}return!1}(e,t)))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),o=n(14),i=function(){function e(e,t,n){switch(void 0===t&&(t=0),this.isFromEndOfRange=n,e.node?(this.node=e.node,t=e.offset):this.node=e,t){case-2:this.offset=a(this.node),this.node=this.node.parentNode,this.isAtEnd=!1;break;case-3:this.offset=a(this.node)+1,this.isAtEnd=!this.node.nextSibling,this.node=this.node.parentNode;break;case-1:this.offset=l(this.node),this.isAtEnd=!0;break;default:var o=l(this.node);this.offset=Math.max(0,Math.min(t,o)),this.isAtEnd=t>0&&t>=o}this.element=(0,r.default)(this.node)}return e.prototype.normalize=function(){if(3==this.node.nodeType||!this.node.firstChild)return this;for(var t=this.node,n=this.isAtEnd?-1:this.offset;1==t.nodeType||11==t.nodeType;){var r=this.isFromEndOfRange?-1==n?t.lastChild:t.childNodes[n-1]:0==n?t.firstChild:-1==n?t.lastChild:t.childNodes[n];if(!r)break;t=r,n=this.isAtEnd||this.isFromEndOfRange?-1:0}return new e(t,n,this.isFromEndOfRange)},e.prototype.equalTo=function(e){return e&&(this==e||this.node==e.node&&this.offset==e.offset&&this.isAtEnd==e.isAtEnd)},e.prototype.isAfter=function(e){return this.node==e.node?this.isAtEnd&&!e.isAtEnd||this.offset>e.offset:(0,o.default)(this.node,e.node)},e.prototype.move=function(t){return new e(this.node,Math.max(this.offset+t,0))},e.getStart=function(t){return new e(t.startContainer,t.startOffset)},e.getEnd=function(t){return t.collapsed?e.getStart(t):new e(t.endContainer,t.endOffset,!0)},e}();function a(e){for(var t=0;e=(null==e?void 0:e.previousSibling)||null;)t++;return t}function l(e){var t;return 3==e.nodeType?(null===(t=e.nodeValue)||void 0===t?void 0:t.length)||0:1==e.nodeType?e.childNodes.length:1}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.experimentCommitListChains=t.blockFormat=t.toggleListType=t.applyCellShading=t.toggleHeader=t.toggleUnderline=t.toggleSuperscript=t.toggleSubscript=t.toggleStrikethrough=t.toggleCodeBlock=t.toggleBlockQuote=t.setOrderedListNumbering=t.toggleNumbering=t.toggleItalic=t.toggleBullet=t.toggleBold=t.changeCapitalization=t.setIndentation=t.setImageAltText=t.setFontSize=t.setFontName=t.setDirection=t.setTextColor=t.setBackgroundColor=t.setAlignment=t.rotateElement=t.replaceWithNode=t.removeLink=t.formatTable=t.editTable=t.insertTable=t.insertImage=t.insertEntity=t.getElementBasedFormatState=t.getFormatState=t.createLink=t.clearFormat=t.clearBlockFormat=t.FONT_SIZES=t.changeFontSize=void 0;var r=n(185);Object.defineProperty(t,"changeFontSize",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"FONT_SIZES",{enumerable:!0,get:function(){return r.FONT_SIZES}});var o=n(186);Object.defineProperty(t,"clearBlockFormat",{enumerable:!0,get:function(){return o.default}});var i=n(87);Object.defineProperty(t,"clearFormat",{enumerable:!0,get:function(){return i.default}});var a=n(187);Object.defineProperty(t,"createLink",{enumerable:!0,get:function(){return a.default}});var l=n(188);Object.defineProperty(t,"getFormatState",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"getElementBasedFormatState",{enumerable:!0,get:function(){return l.getElementBasedFormatState}});var s=n(189);Object.defineProperty(t,"insertEntity",{enumerable:!0,get:function(){return s.default}});var u=n(190);Object.defineProperty(t,"insertImage",{enumerable:!0,get:function(){return u.default}});var c=n(191);Object.defineProperty(t,"insertTable",{enumerable:!0,get:function(){return c.default}});var d=n(192);Object.defineProperty(t,"editTable",{enumerable:!0,get:function(){return d.default}});var f=n(193);Object.defineProperty(t,"formatTable",{enumerable:!0,get:function(){return f.default}});var h=n(194);Object.defineProperty(t,"removeLink",{enumerable:!0,get:function(){return h.default}});var p=n(195);Object.defineProperty(t,"replaceWithNode",{enumerable:!0,get:function(){return p.default}});var g=n(196);Object.defineProperty(t,"rotateElement",{enumerable:!0,get:function(){return g.default}});var v=n(197);Object.defineProperty(t,"setAlignment",{enumerable:!0,get:function(){return v.default}});var m=n(89);Object.defineProperty(t,"setBackgroundColor",{enumerable:!0,get:function(){return m.default}});var y=n(92);Object.defineProperty(t,"setTextColor",{enumerable:!0,get:function(){return y.default}});var b=n(198);Object.defineProperty(t,"setDirection",{enumerable:!0,get:function(){return b.default}});var E=n(90);Object.defineProperty(t,"setFontName",{enumerable:!0,get:function(){return E.default}});var C=n(91);Object.defineProperty(t,"setFontSize",{enumerable:!0,get:function(){return C.default}});var S=n(200);Object.defineProperty(t,"setImageAltText",{enumerable:!0,get:function(){return S.default}});var w=n(201);Object.defineProperty(t,"setIndentation",{enumerable:!0,get:function(){return w.default}});var P=n(202);Object.defineProperty(t,"changeCapitalization",{enumerable:!0,get:function(){return P.default}});var T=n(93);Object.defineProperty(t,"toggleBold",{enumerable:!0,get:function(){return T.default}});var O=n(203);Object.defineProperty(t,"toggleBullet",{enumerable:!0,get:function(){return O.default}});var x=n(94);Object.defineProperty(t,"toggleItalic",{enumerable:!0,get:function(){return x.default}});var N=n(204);Object.defineProperty(t,"toggleNumbering",{enumerable:!0,get:function(){return N.default}});var _=n(205);Object.defineProperty(t,"setOrderedListNumbering",{enumerable:!0,get:function(){return _.default}});var M=n(206);Object.defineProperty(t,"toggleBlockQuote",{enumerable:!0,get:function(){return M.default}});var k=n(207);Object.defineProperty(t,"toggleCodeBlock",{enumerable:!0,get:function(){return k.default}});var I=n(208);Object.defineProperty(t,"toggleStrikethrough",{enumerable:!0,get:function(){return I.default}});var R=n(209);Object.defineProperty(t,"toggleSubscript",{enumerable:!0,get:function(){return R.default}});var L=n(210);Object.defineProperty(t,"toggleSuperscript",{enumerable:!0,get:function(){return L.default}});var A=n(95);Object.defineProperty(t,"toggleUnderline",{enumerable:!0,get:function(){return A.default}});var j=n(211);Object.defineProperty(t,"toggleHeader",{enumerable:!0,get:function(){return j.default}});var D=n(212);Object.defineProperty(t,"applyCellShading",{enumerable:!0,get:function(){return D.default}});var B=n(51);Object.defineProperty(t,"toggleListType",{enumerable:!0,get:function(){return B.default}});var F=n(25);Object.defineProperty(t,"blockFormat",{enumerable:!0,get:function(){return F.default}});var H=n(88);Object.defineProperty(t,"experimentCommitListChains",{enumerable:!0,get:function(){return H.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=n(3),i=n(2),a=n(19),l=n(54),s=n(111);function u(e,t,n){var r=e;if("BR"==(0,i.default)(r)&&n)return r;for(;r;){for(var o=e;e.parentNode&&!(o=n?e.nextSibling:e.previousSibling);)if((e=e.parentNode)==t)return r;for(;o;){if((0,a.default)(o))return r;if("BR"==(0,i.default)(o))return n?o:r;e=o,o=n?e.firstChild:e.lastChild}r=e}return r}t.default=function(e,t){if(!(0,o.default)(e,t))return null;var n=s.default.getBlockContext(t);if(!n)return null;if(n==t)return new l.default(n);var i=u(t,n,!1),c=u(t,n,!0),d=(0,r.default)(e,i,c,!1);if(i=d[0],c=d[d.length-1],i.parentNode!=c.parentNode)return new s.default(e,i,c);for(;!i.previousSibling&&!c.nextSibling;){var f=i.parentNode;if(f==n){n!=e&&(i=c=f);break}if(!f||f==e)break;i=c=f}return i==c&&(0,a.default)(i)?new l.default(i):new s.default(e,i,c)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPreviousLeafSibling=t.getNextLeafSibling=t.getLeafSibling=void 0;var r=n(3),o=n(2),i=n(23);function a(e,t,n,a,l){var s=null,u=n?function(e){return(null==e?void 0:e.nextSibling)||null}:function(e){return(null==e?void 0:e.previousSibling)||null},c=n?function(e){return e.firstChild}:function(e){return e.lastChild};if((0,r.default)(e,t))for(var d=t,f=!0;f;){var h=(null==d?void 0:d.parentNode)||null;for(d=u(d);!d&&h!=e;)d=u(h),h=(null==h?void 0:h.parentNode)||null;for(;d&&(!a||a.indexOf((0,o.default)(d))<0)&&c(d);)d=c(d);if(!(f=!!d&&(0,i.default)(d,l))){s=d;break}}return s}t.getLeafSibling=a,t.getNextLeafSibling=function(e,t,n){return a(e,t,!0,n)},t.getPreviousLeafSibling=function(e,t,n){return a(e,t,!1,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(37),o=n(4),i=n(1);function a(e){return 1==e.node.nodeType&&(0,r.default)(e.node)?new o.default(e.node,e.isAtEnd?-3:-2):e}function l(e){return e&&e.node}function s(e,t){if(!e||!t)return null;for(var n=0,r=0;r<t.length&&(n=t[r],r<t.length-1&&e&&1==e.nodeType&&e.childNodes.length>n);r++)e=e.childNodes[n];return new o.default(e,n)}t.default=function(e,t,n,r){var u,c=null,d=null;if(l(e)?(c=e,d=l(t)?t:null):(0,i.default)(e,"Node")&&(Array.isArray(t)?(c=s(e,t),d=Array.isArray(n)?s(e,n):null):"number"==typeof t?(c=new o.default(e,t),d=(0,i.default)(n,"Node")?new o.default(n,r):null):!(0,i.default)(t,"Node")&&t||(c=new o.default(e,-2),d=new o.default(t||e,-3))),null===(u=null==c?void 0:c.node)||void 0===u?void 0:u.ownerDocument){var f=c.node.ownerDocument.createRange();return c=a(c),d=a(d||c),f.setStart(c.node,c.offset),f.setEnd(d.node,d.offset),f}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){e.focus();var n=function(){return e.getDocument().execCommand(t,!1,null)},o=e.getSelectionRangeEx();if(o&&o.areAllCollapsed){e.addUndoSnapshot();var i=e.getPendableFormatState(!1);n();var a=Object.keys(r.PendableFormatCommandMap).filter((function(e){return r.PendableFormatCommandMap[e]==t}))[0];a&&(i[a]=!i[a],e.triggerPluginEvent(13,{formatState:i}))}else e.addUndoSnapshot((function(){var t;o.ranges.forEach((function(r){1==o.type&&e.select(r),n(),t=r})),t&&1==o.type&&e.select(o.table,o.coordinates)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(55);t.default=function(e,t,n){var i=(e=e?1==e.nodeType?e:e.parentNode:null)&&1==e.nodeType?e:null;if(i&&n)if(i.closest)i=i.closest(n);else for(;i&&i!=t&&!(0,o.default)(i,n);)i=i.parentElement;return!t||(0,r.default)(t,i)?i:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),o=n(56),i=n(1);t.default=function(e,t){if(0==(e=e?(0,i.default)(e,"Node")?[e]:e:[]).length||!e[0]||!e[0].ownerDocument)return null;if(t||(t="div"),!(0,i.default)(t,"HTMLElement")){var n=e[0].ownerDocument;t="string"==typeof t?/^\w+$/.test(t)?n.createElement(t):(0,o.default)(t,n)[0]:(0,r.default)(t,n)}var a=e[0].parentNode;a&&a.insertBefore(t,e[0]);for(var l=0,s=e;l<s.length;l++){var u=s[l];t.appendChild(u)}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitBalancedNodeRange=void 0;var r=n(14);function o(e,t){var n;if(!e||!e.parentNode)return null;var r=e.parentNode,o=r.cloneNode(!1);if(o.removeAttribute("id"),t)for(;r.firstChild&&r.firstChild!=e;)o.appendChild(r.firstChild);else for(;e.nextSibling;)o.appendChild(e.nextSibling);return o.firstChild&&""!=o.innerHTML?null===(n=r.parentNode)||void 0===n||n.insertBefore(o,t?r:r.nextSibling):o=null,o}t.default=o,t.splitBalancedNodeRange=function(e){var t=Array.isArray(e)?e[0]:e,n=Array.isArray(e)?e[e.length-1]:e,i=t&&n&&t.parentNode==n.parentNode?t.parentNode:null;if(i){if((0,r.default)(t,n)){var a=n;n=t,t=a}o(t,!0),o(n,!1)}return i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return!(!e||!t||4!=(4&t.compareDocumentPosition(e)))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),o=n(2),i=n(58),a=n(40),l=n(27),s=n(1);t.default=function(e,t){var n=(0,s.default)(e,"Node")?(0,r.default)(e,t):e;return t&&n&&function(e,t){for(var n,r=[e],s=e.parentNode;s&&t.contains(s);s=s.parentNode)r.push(s);for(var u=r.length-1;u>=0&&!n;u--){var c=r[u],d=(0,o.default)(c);"A"==d?n=new a.default(c,t):"IMG"==d&&(n=new i.default(c,t))}return n||new l.default(e,t)}(t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(39),o=n(2),i=n(30);t.default=function(e,t){var n;if(!e||!t)return null;var a=(0,o.default)(e);if(a==t.toUpperCase())return e;for(var l=e.ownerDocument.createElement(t),s=0;s<e.attributes.length;s++){var u=e.attributes[s];l.setAttribute(u.name,u.value)}return(0,i.default)(l,e),"P"!=a&&"P"!=(0,o.default)(l)||(n=(0,r.default)(e,["margin-top","margin-bottom"]),l.style.marginTop=n[0],l.style.marginBottom=n[1]),e.parentNode&&e.parentNode.replaceChild(l,e),l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);function o(e,t){return t.some((function(t){return 0==t?0==e:(e&t)==t}))}t.default=function(e,t,n,i,a){if(void 0===i&&(i=0),!e||!t)return[];var l=(0,r.default)(e.querySelectorAll(t));if(0!=i&&a){var s=a.startContainer,u=a.startOffset,c=a.endContainer,d=a.endOffset;if(1==s.nodeType&&s.firstChild){var f=s.childNodes[u];s=f||s.lastChild}c=1==c.nodeType&&c.firstChild&&d>0?c.childNodes[d-1]:c,l=l.filter((function(e){return function(e,t,n,r){var i=e.compareDocumentPosition(t),a=e.compareDocumentPosition(n),l=[0,8];r||l.push(16);return o(i,l)||o(a,l)||o(i,[2])&&o(a,[4])&&!o(a,[16])}(e,s,c,2==i)}))}return n&&l.forEach(n),l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.collapse=void 0;var r=n(3),o=n(13),i=n(5);function a(e,t,n,i,a){for(;t.parentNode!=e&&!(0,r.default)(t.parentNode,n);){if(i&&t.previousSibling||!i&&t.nextSibling){if(!a)break;(0,o.default)(t,i)}if(!t.parentNode)break;t=t.parentNode}return t}t.default=function(e,t,n,o){var l;if(!(0,r.default)(e,t)||!(0,r.default)(e,n))return[];if(t=a(e,t,n,!0,o),n=a(e,n,t,!1,o),(0,r.default)(t,n,!0))return[t];if((0,r.default)(n,t))return[n];if(t.parentNode==n.parentNode){var s=t.parentNode?(0,i.default)(null===(l=t.parentNode)||void 0===l?void 0:l.childNodes):[],u=s.indexOf(t),c=s.indexOf(n);return s.slice(u,c+1)}return[t,n]},t.collapse=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o="ADDRESS,ARTICLE,ASIDE,BLOCKQUOTE,CANVAS,DD,DIV,DL,DT,FIELDSET,FIGCAPTION,FIGURE,FOOTER,FORM,H1,H2,H3,H4,H5,H6,HEADER,HR,LI,MAIN,NAV,NOSCRIPT,OL,OUTPUT,P,PRE,SECTION,TABLE,TD,TH,TFOOT,UL,VIDEO".split(","),i=["block","list-item","table-cell"];t.default=function(e){var t=(0,r.default)(e);return!(!t||!(i.indexOf(e.style.display)>=0||o.indexOf(t)>=0))}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.KnownCreateElementData=void 0;var o=n(1),i=n(21);t.KnownCreateElementData=((r={})[0]={tag:""},r[1]=i.Browser.isEdge?{tag:"div",children:[{tag:"span",children:[{tag:"br"}]}]}:{tag:"div",children:[{tag:"br"}]},r[2]={tag:"blockquote",style:"margin-top:0;margin-bottom:0"},r[3]={tag:"div",style:"width: 1px; height: 1px; overflow: hidden; position: fixed; top: 0; left; 0; -webkit-user-select: text",attributes:{contenteditable:"true"}},r[4]={tag:"li",style:"display:block"},r[5]={tag:"div",style:"position: fixed; width: 0; height: 0"},r[6]={tag:"div",style:"width:100%;height:100%;position:relative;overflow:hidden"},r[7]={tag:"div",style:"position: fixed; cursor: row-resize; user-select: none"},r[8]={tag:"div",style:"position: fixed; cursor: col-resize; user-select: none"},r[9]={tag:"div",style:"position: fixed; cursor: nw-resize; user-select: none; border: 1px solid #808080"},r[10]={tag:"div",style:"position: fixed; cursor: ne-resize; user-select: none; border: 1px solid #808080"},r[11]={tag:"div",style:"position: fixed; cursor: all-scroll; user-select: none; border: 1px solid #808080"},r),t.default=function e(n,r){if("number"==typeof n&&(n=t.KnownCreateElementData[n]),!n||!n.tag)return null;var i=n.tag,a=n.namespace,l=n.className,s=n.style,u=n.dataset,c=n.attributes,d=n.children,f=a?r.createElementNS(a,i):r.createElement(i);return s&&f.setAttribute("style",s),l&&(f.className=l),u&&(0,o.default)(f,"HTMLElement")&&Object.keys(u).forEach((function(e){f.dataset[e]=u[e]})),c&&Object.keys(c).forEach((function(e){f.setAttribute(e,c[e])})),d&&d.forEach((function(t){if("string"==typeof t)f.appendChild(r.createTextNode(t));else if(t){var n=e(t,r);n&&f.appendChild(n)}})),f}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Browser=t.getBrowserInfo=void 0;var r=/android/i;function o(e,t){var n=-1!=e.indexOf("rv:")&&-1!=e.indexOf("Trident"),o=-1!=e.indexOf("MSIE")||n,i=!1,a=!1,l=!1,s=!1,u=-1!=e.indexOf("WebKit");return o||(i=-1!=e.indexOf("Chrome"),a=-1!=e.indexOf("Firefox"),-1!=e.indexOf("Safari")&&(l=-1==e.indexOf("Chrome")&&-1==e.indexOf("Android")),(s=-1!=e.indexOf("Edge"))&&(u=i=a=!1)),{isMac:-1!=t.indexOf("Mac"),isWin:-1!=t.indexOf("Win")||-1!=t.indexOf("NT"),isWebKit:u,isIE:o,isIE11OrGreater:n,isSafari:l,isChrome:i,isFirefox:a,isEdge:s,isIEOrEdge:o||s,isAndroid:r.test(e)}}t.getBrowserInfo=o,t.Browser=window?o(window.navigator.userAgent,window.navigator.appVersion):{}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(112),o=n(61),i=n(7),a=n(15),l=n(29),s=n(113),u=n(114),c=n(41),d=n(8),f=function(){function e(e,t){this.scoper=e,this.skipTags=t,this.currentInline=null,this.currentBlock=null}return e.createBodyTraverser=function(t,n,o){return new e(new r.default(t,n))},e.createSelectionTraverser=function(t,n,r){return new e(new u.default(t,n),r)},e.createBlockTraverser=function(t,n,r,o){return void 0===r&&(r=3),new e(new s.default(t,n,r))},Object.defineProperty(e.prototype,"currentBlockElement",{get:function(){return this.currentBlock||(this.currentBlock=this.scoper.getStartBlockElement()),this.currentBlock},enumerable:!1,configurable:!0}),e.prototype.getNextBlockElement=function(){return this.getPreviousNextBlockElement(!0)},e.prototype.getPreviousBlockElement=function(){return this.getPreviousNextBlockElement(!1)},e.prototype.getPreviousNextBlockElement=function(e){var t=this.currentBlockElement;if(!t)return null;var n=(0,d.getLeafSibling)(this.scoper.rootNode,e?t.getEndNode():t.getStartNode(),e,this.skipTags),r=n?(0,i.default)(this.scoper.rootNode,n):null;return r&&this.scoper.isBlockInScope(r)&&(e&&r.isAfter(t)||!e&&t.isAfter(r))?(this.currentBlock=r,this.currentBlock):null},Object.defineProperty(e.prototype,"currentInlineElement",{get:function(){return this.currentInline||(this.currentInline=this.scoper.getStartInlineElement()),this.currentInline instanceof o.default?null:this.currentInline},enumerable:!1,configurable:!0}),e.prototype.getNextInlineElement=function(){return this.getPreviousNextInlineElement(!0)},e.prototype.getPreviousInlineElement=function(){return this.getPreviousNextInlineElement(!1)},e.prototype.getPreviousNextInlineElement=function(e){var t,n=this.currentInlineElement||this.currentInline;return n?(n instanceof o.default?(t=(0,c.getInlineElementBeforeAfter)(this.scoper.rootNode,n.getStartPosition(),e))&&!n.getParentBlock().contains(t.getContainerNode())&&(t=null):t=(t=function(e,t,n){if(!t)return null;if(t instanceof l.default){var r=n?t.nextInlineElement:t.previousInlineElement;if(r)return r}var o=t.getContainerNode();return o=(0,d.getLeafSibling)(e,o,n),(0,a.default)(e,o)}(this.scoper.rootNode,n,e))&&n&&(e&&t.isAfter(n)||!e&&n.isAfter(t))?t:null,t&&(t=this.scoper.trimInlineElement(t))?(this.currentInline=t,this.currentInline):null):null},e}();t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(39),i=/^[\r\n]+$/gm,a=/[\t\r\n\u0020\u200B]/gm;t.default=function e(t,n){if(3==t.nodeType)return!(t.nodeValue&&""!=t.textContent&&!i.test(t.nodeValue))||!(!n||""!=t.nodeValue.replace(a,""));if(1==t.nodeType){if("none"==(0,o.getComputedStyle)(t,"display"))return!0;var l=(0,r.default)(t);if("DIV"==l||"SPAN"==l){for(var s=t.firstChild;s;s=s.nextSibling)if(!e(s,n))return!1;return!0}return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);t.default=function(e,t){return!(!e||!(0,r.default)(e.rootNode,t)||e.nodeBefore&&4!=e.nodeBefore.compareDocumentPosition(t)||e.nodeAfter&&2!=e.nodeAfter.compareDocumentPosition(t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(88),o=n(0);t.default=function(e,t,n){e.focus();var i=e.getSelectionRangeEx();e.addUndoSnapshot((function(a,l){if(!n||n()){var s=e.getSelectedRegions(),u=o.VListChain.createListChains(s,null==a?void 0:a.node);s.forEach((function(e){return t(e,a,l,u)})),(0,r.default)(e,u)}0==i.type?e.select(a,l):e.select(i.table,i.coordinates)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEditInfoFromImage=t.deleteEditInfo=t.saveEditInfo=void 0;var r=n(99);t.saveEditInfo=function(e,t){e&&(e.dataset.roosterEditInfo=JSON.stringify(t))},t.deleteEditInfo=function(e){e&&delete e.dataset.roosterEditInfo},t.getEditInfoFromImage=function(e){var t=function(e){try{return JSON.parse(e)}catch(e){return null}}(null==e?void 0:e.dataset.roosterEditInfo);return 0==(0,r.default)(t)?function(e){return{src:e.getAttribute("src")||"",widthPx:e.clientWidth,heightPx:e.clientHeight,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight,leftPercent:0,rightPercent:0,topPercent:0,bottomPercent:0,angleRad:0}}(e):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(38),o=n(14),i=n(4),a=function(){function e(e,t){this.containerNode=e,this.parentBlock=t}return e.prototype.getTextContent=function(){return(3==this.containerNode.nodeType?this.containerNode.nodeValue:this.containerNode.textContent)||""},e.prototype.getContainerNode=function(){return this.containerNode},e.prototype.getParentBlock=function(){return this.parentBlock},e.prototype.getStartPosition=function(){return new i.default(this.containerNode,0).normalize()},e.prototype.getEndPosition=function(){return new i.default(this.containerNode,-1).normalize()},e.prototype.isTextualInlineElement=function(){return this.containerNode&&3==this.containerNode.nodeType},e.prototype.isAfter=function(e){return e&&(0,o.default)(this.containerNode,e.getContainerNode())},e.prototype.contains=function(e){var t=this.getStartPosition(),n=this.getEndPosition();return e&&e.isAfter(t)&&n.isAfter(e)},e.prototype.applyStyle=function(e){(0,r.default)(this.containerNode,e)},e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,o,i,a=(null===(r=e.nodeValue)||void 0===r?void 0:r.substring(0,t))||"",l=(null===(o=e.nodeValue)||void 0===o?void 0:o.substring(t))||"",s=e.ownerDocument.createTextNode(n?a:l);return e.nodeValue=n?l:a,null===(i=e.parentNode)||void 0===i||i.insertBefore(s,n?e:e.nextSibling),s}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(38),o=n(9),i=n(4),a=n(8),l=function(){function e(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null),this.inlineElement=e,this.start=t,this.end=n}return e.prototype.getDecoratedInline=function(){return this.inlineElement},e.prototype.getContainerNode=function(){return this.inlineElement.getContainerNode()},e.prototype.getParentBlock=function(){return this.inlineElement.getParentBlock()},e.prototype.getTextContent=function(){return(0,o.default)(this.getStartPosition(),this.getEndPosition()).toString()},e.prototype.getStartPosition=function(){return this.start||this.inlineElement.getStartPosition()},e.prototype.getEndPosition=function(){return this.end||this.inlineElement.getEndPosition()},Object.defineProperty(e.prototype,"nextInlineElement",{get:function(){return this.end?new e(this.inlineElement,this.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousInlineElement",{get:function(){return this.start?new e(this.inlineElement,void 0,this.start):null},enumerable:!1,configurable:!0}),e.prototype.contains=function(e){return e&&e.isAfter(this.getStartPosition())&&this.getEndPosition().isAfter(e)},e.prototype.isTextualInlineElement=function(){return this.inlineElement&&this.inlineElement.isTextualInlineElement()},e.prototype.isAfter=function(e){var t=this.getStartPosition(),n=e&&e.getEndPosition();return n&&(t.isAfter(n)||t.equalTo(n))},e.prototype.applyStyle=function(e){var t=this.getStartPosition().normalize(),n=this.getEndPosition().normalize(),o=this.getContainerNode();if(t.isAtEnd){var l=(0,a.getNextLeafSibling)(o,t.node);t=l?new i.default(l,0):null}if(0==n.offset){var s=(0,a.getPreviousLeafSibling)(o,n.node);n=s?new i.default(s,-1):null}(0,r.default)(o,e,t||void 0,n||void 0)},e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(e){for(;!n&&e.firstChild;)e.removeChild(e.firstChild);for(;null==t?void 0:t.firstChild;)e.appendChild(t.firstChild)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=["IMG"],i=["TABLE","IMG","LI"].join(","),a=/\u200b/g;function l(e,t){return e=e.replace(a,""),t?e.trim():e}t.default=function(e,t){if(!e)return!1;if(3==e.nodeType)return""==l(e.nodeValue||"",t);if(1==e.nodeType){var n=e;if(""!=l(n.textContent||"",t)||o.indexOf((0,r.default)(n))>=0||n.querySelectorAll(i)[0])return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e?e.parentNode:null;if(!t)return null;for(;e.firstChild;)t.insertBefore(e.firstChild,e);return t.removeChild(e),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};return((null==e?void 0:e.getAttribute("style"))||"").split(";").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n),o=e.slice(n+1);r&&o&&(t[r.trim()]=o.trim())})),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e){var n=Object.keys(t||{}).map((function(e){var n=t[e],r=e?e.trim():null,o=n?n.trim():null;return r&&o?r+":"+o:null})).filter((function(e){return e})).join(";");n?e.setAttribute("style",n):e.removeAttribute("style")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){e.focus();var n=e.getSelectionRangeEx();if(n&&n.areAllCollapsed){var o=n.ranges[0],i=o.startContainer;if("SPAN"==(0,r.getTagOfNode)(i)&&(!i.firstChild||"BR"==(0,r.getTagOfNode)(i.firstChild)&&!i.firstChild.nextSibling))e.addUndoSnapshot(),t(i);else i&&3==i.nodeType&&"​"==i.nodeValue&&"SPAN"==(0,r.getTagOfNode)(i.parentNode)||(e.addUndoSnapshot(),i=e.getDocument().createTextNode("​"),o.insertNode(i)),(0,r.applyTextStyle)(i,t),e.select(i,-1)}else e.addUndoSnapshot((function(){var r,o;n.ranges.forEach((function(n){for(var i=e.getSelectionTraverser(n),a=i&&i.currentInlineElement;a;){var l=i.getNextInlineElement();a.applyStyle((function(e,n){t(e,n),r=r||e,o=e})),a=l}})),r&&o&&0==n.type&&e.select(r,-2,o,-3)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,r,o){var i=this;this.trigger=e,this.context=t,this.onSubmit=n,this.handler=r,this.zoomScale=o,this.onMouseDown=function(e){var t,n;e.preventDefault(),e.stopPropagation(),i.addDocumentEvents(),i.initX=e.pageX,i.initY=e.pageY,i.initValue=null===(n=(t=i.handler).onDragStart)||void 0===n?void 0:n.call(t,i.context,e)},this.onMouseMove=function(e){var t,n,r;e.preventDefault();var o=(e.pageX-i.initX)/i.zoomScale,a=(e.pageY-i.initY)/i.zoomScale;(null===(n=(t=i.handler).onDragging)||void 0===n?void 0:n.call(t,i.context,e,i.initValue,o,a))&&(null===(r=i.onSubmit)||void 0===r||r.call(i,i.context,i.trigger))},this.onMouseUp=function(e){var t,n,r;e.preventDefault(),i.removeDocumentEvents(),(null===(n=(t=i.handler).onDragEnd)||void 0===n?void 0:n.call(t,i.context,e,i.initValue))&&(null===(r=i.onSubmit)||void 0===r||r.call(i,i.context,i.trigger))},e.addEventListener("mousedown",this.onMouseDown)}return e.prototype.dispose=function(){this.trigger.removeEventListener("mousedown",this.onMouseDown),this.removeDocumentEvents()},e.prototype.addDocumentEvents=function(){var e=this.trigger.ownerDocument;e.addEventListener("mousemove",this.onMouseMove,!0),e.addEventListener("mouseup",this.onMouseUp,!0)},e.prototype.removeDocumentEvents=function(){var e=this.trigger.ownerDocument;e.removeEventListener("mousemove",this.onMouseMove,!0),e.removeEventListener("mouseup",this.onMouseUp,!0)},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o="AREA,BASE,BR,COL,COMMAND,EMBED,HR,IMG,INPUT,KEYGEN,LINK,META,PARAM,SOURCE,TRACK,WBR".split(",");t.default=function(e){return!!e&&o.indexOf((0,r.default)(e))>=0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(4),i=n(28),a=n(12),l=n(8),s=n(13),u="SPAN,B,I,U,EM,STRONG,STRIKE,S,SMALL".split(",");function c(e,t){e&&1==e.nodeType&&t(e,!0)}t.default=function(e,t,n,d){void 0===n&&(n=new o.default(e,0).normalize()),void 0===d&&(d=new o.default(e,-1).normalize());for(var f=[],h=n,p=d;h&&p&&p.isAfter(h);){var g=h.node,v=(0,r.default)(g.parentNode),m=(0,l.getNextLeafSibling)(e,g);3==g.nodeType&&["TR","TABLE"].indexOf(v)<0&&(g!=p.node||p.isAtEnd||(g=(0,i.default)(g,p.offset,!0)),h.offset>0&&(g=(0,i.default)(g,h.offset,!1)),f.push(g)),h=m&&new o.default(m,0)}if(f.length>0){if(f.every((function(e){return e.parentNode==f[0].parentNode}))){var y=f.shift();f.forEach((function(e){var t,n=(y.nodeValue||"")+(e.nodeValue||"");y.nodeValue=n,null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),f=[y]}f.forEach((function(e){for(;"SPAN"!=(0,r.default)(e)&&u.indexOf((0,r.default)(e.parentNode))>=0;)c(e,t),e=(0,s.splitBalancedNodeRange)(e);"SPAN"!=(0,r.default)(e)&&(c(e,t),e=(0,a.default)(e,"SPAN")),t(e)}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getComputedStyle=void 0;var r=n(11);function o(e,t){void 0===t&&(t=["font-family","font-size","color","background-color"]);var n=(0,r.default)(e),o=[];if(t=Array.isArray(t)?t:[t],n){var a=(n.ownerDocument.defaultView||window).getComputedStyle(n);if(a)for(var l=0,s=t;l<s.length;l++){var u=s[l],c=a.getPropertyValue(u)||"";c="font-family"!=u?c.toLowerCase():c,c="font-size"==u?i(c):c,o.push(c)}}return o}function i(e){return e&&e.indexOf("px")==e.length-2?Math.round(75*parseFloat(e)+.05)/100+"pt":e}t.default=o,t.getComputedStyle=function(e,t){return o(e,t)[0]||""}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){return e.call(this,t,n)||this}return o(t,e),t}(n(27).default);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInlineElementBeforeAfter=t.getInlineElementAfter=t.getInlineElementBefore=void 0;var r=n(15),o=n(29),i=n(23),a=n(8);function l(e,t,n){if(!e||!t||!t.node)return null;var l=(t=t.normalize()).offset,s=t.isAtEnd,u=t.node,c=!1;!n&&0==l&&!s||n&&s?u=(0,a.getLeafSibling)(e,u,n):3==u.nodeType&&(!n&&!s||n&&l>0)&&(c=!0),u&&(0,i.default)(u)&&(u=(0,a.getLeafSibling)(e,u,n));var d=(0,r.default)(e,u);return d&&(c||d.contains(t))&&(d=n?new o.default(d,t,void 0):new o.default(d,void 0,t)),d}t.getInlineElementBefore=function(e,t){return l(e,t,!1)},t.getInlineElementAfter=function(e,t){return l(e,t,!0)},t.getInlineElementBeforeAfter=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e){var n=new FileReader;n.onload=function(){t(n.result)},n.onerror=function(){t(null)},n.readAsDataURL(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){Array.prototype.push.apply(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t,n,o,i){var a="string"==typeof t?t.trim():"",l="string"==typeof t?null:t;if(a||l){if(e.style.setProperty(n?"background-color":"color",(o?null==l?void 0:l.darkModeColor:null==l?void 0:l.lightModeColor)||a),e.dataset){var s=n?"ogsb":"ogsc";o?l&&(e.dataset[s]=l.lightModeColor):delete e.dataset[s]}n&&i&&function(e,t){var n;if(null===(n=e.firstElementChild)||void 0===n?void 0:n.hasAttribute("style"))return;var o=e.style.getPropertyValue("background-color"),i=t&&(e.dataset.ogsb||e.dataset.ogab)||o;if(!i||"transparent"===i)return;switch(function(e){var t=function(e){var t,n,r,o,i;"#"==e.substring(0,1)?(t=function(e){4===e.length&&(e=e.replace(/(.)/g,"$1$1"));var t=e.replace("#",""),n=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),o=parseInt(t.substr(4,2),16);return[n,r,o]}(e),r=t[0],o=t[1],i=t[2]):(n=function(e){var t=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/),n=parseInt(t[1]),r=parseInt(t[2]),o=parseInt(t[3]);return[n,r,o]}(e),r=n[0],o=n[1],i=n[2]);var a=r/255,l=o/255,s=i/255;return 50*(Math.max(a,l,s)+Math.min(a,l,s))}(e);if(t<20)return 1;if(t>80)return 0;return 2}(i)){case 1:r(e,{lightModeColor:"#ffffff",darkModeColor:"#333333"},!1,t);break;case 0:r(e,{lightModeColor:"#000000",darkModeColor:"#ffffff"},!1,t)}}(e,o)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e||{left:0,right:0,top:0,bottom:0},n=t.left,r=t.right,o=t.top,i=t.bottom;return n+r+o+i>0?{left:Math.round(n),right:Math.round(r),top:Math.round(o),bottom:Math.round(i)}:null}},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var o=n(16),i=n(47),a=n(2),l=n(19),s=n(31),u=n(4),c=n(17),d=n(1),f=n(13),h=n(5),p=n(32),g=n(67),v=n(12),m=function(){function e(e){if(this.rootList=e,this.items=[],!e)throw new Error("rootList must not be null");y(this.rootList),(0,c.default)(this.rootList,"ol,ul",y),(0,c.default)(this.rootList,"li",b),this.populateItems(this.rootList)}return e.prototype.contains=function(e){return this.items.some((function(t){return t.contains(e)}))},e.prototype.getLastItemNumber=function(){var e=this.getStart();return void 0===e?e:e-1+this.items.filter((function(e){return 1==e.getListType()&&1==e.getLevel()&&!e.isDummy()})).length},e.prototype.writeBack=function(){var e=this;if(!this.rootList)throw new Error("rootList must not be null");var t,n=this.rootList.ownerDocument,r=[n.createDocumentFragment()],o=n.createTextNode(""),i=this.getStart()||1;this.rootList.parentNode.replaceChild(o,this.rootList),this.items.forEach((function(n){var o=n.getNewListStart();o&&o!=i&&(r.splice(1,r.length-1),i=o),n.writeBack(r,e.rootList);var a=r[1];(0,d.default)(a,"HTMLOListElement")&&(t!=a&&(1==i?a.removeAttribute("start"):a.start=i),1==n.getLevel()&&i++),t=a})),o.parentNode.replaceChild(r[0],o)},e.prototype.split=function(e,t){if(!this.rootList)throw new Error("rootList must not be null");for(var n=0;n<this.items.length;n++)if(this.items[n].getNode()==e)return void this.items[n].setNewListStart(t)},e.prototype.setIndentation=function(e,t,n,r,o){var i=this;void 0===o&&(o=!1);var a=!1;if(this.findListItems(e,t,(function(e){a=a||0==i.items.indexOf(e),1==n?r&&!e.isDummy()?e.setIsDummy(!0):e.outdent(o):e.indent()})),a&&o)for(var l=0;l<this.items.length;l++)this.items[l].addNegativeMargins()},e.prototype.changeListType=function(e,t,n){var r=!1;this.findListItems(e,t,(function(e){r=r||e.getListType()!=n})),this.findListItems(e,t,(function(e){return r?e.changeListType(n):e.outdent()}))},e.prototype.appendItem=function(e,t){var n=(0,a.default)(e);"DIV"==n?e=(0,o.default)(e,"LI"):"LI"!=n&&(e=(0,v.default)(e,"LI")),this.items.push(0==t?new g.default(e):new g.default(e,t))},e.prototype.mergeVList=function(e){var t,n=this;e&&e!=this&&(e.items.forEach((function(e){return n.items.push(e)})),e.items.splice(0,e.items.length),null===(t=e.rootList.parentNode)||void 0===t||t.removeChild(e.rootList))},e.prototype.getListItemIndex=function(e){if(this.items)for(var t=(this.getStart()||1)-1,n=0;n<this.items.length;n++){var r=this.items[n];if(1!=r.getLevel()||r.isDummy()||t++,r.getNode()==e)return t}return-1},e.prototype.getStart=function(){return(0,d.default)(this.rootList,"HTMLOListElement")?this.rootList.start:void 0},e.prototype.findListItems=function(e,t,n){if(0==this.items.length)return[];var r=new u.default(this.items[0].getNode(),0),o=new u.default(this.items[this.items.length-1].getNode(),-1),i=r.isAfter(e)?0:-1,a=this.items.length-(t.isAfter(o)?1:0);this.items.forEach((function(n,r){i=n.contains(e.node)?r:i,a=n.contains(t.node)?r:a})),i=a<this.items.length?Math.max(0,i):i,a=i>=0?Math.min(this.items.length-1,a):a;var l=i<=a?this.items.slice(i,a+1):[];return n&&l.forEach(n),l},e.prototype.populateItems=function(e,t){var n=this;void 0===t&&(t=[]);var o=(0,i.default)(e);(0,h.default)(e.childNodes).forEach((function(e){var a=r(r([],t,!0),[o],!1);(0,i.isListElement)(e)?n.populateItems(e,a):3==e.nodeType&&""==(e.nodeValue||"").trim()||n.items.push(new(g.default.bind.apply(g.default,r([void 0,e],a,!1))))}))},e}();function y(e){var t=null;(0,h.default)(e.childNodes).forEach((function(e){"LI"==(0,a.default)(e)?t=e:(0,i.isListElement)(e)?t=null:t&&!(0,s.default)(e,!0)&&t.appendChild((0,l.default)(e)?e:(0,v.default)(e))}))}function b(e){for(;!(0,i.isListElement)(e.parentNode);){(0,f.default)(e,!0);var t=(0,h.default)(e.parentNode.childNodes).slice(1);t.length>0&&((0,l.default)(t[0])||(t=[(0,v.default)(t)]),t.forEach((function(t){return e.appendChild(t)}))),(0,p.default)(e.parentNode)}}t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isListElement=void 0;var r=n(2);function o(e){switch((0,r.default)(e)){case"OL":return 1;case"UL":return 2;default:return 0}}t.default=o,t.isListElement=function(e){return 0!=o(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),o=n(4),i=n(8);t.default=function(e){if(!e)return null;var t=e.nodeBefore,n=e.nodeAfter,a=e.rootNode,l=e.skipTags,s=t?(0,i.getNextLeafSibling)(e.rootNode,t,e.skipTags):a.firstChild,u=n?(0,i.getPreviousLeafSibling)(a,n,l):a.lastChild,c=s&&u&&(0,r.default)(s,u);if(!function(e){var t=e;return!!t.fullSelectionEnd&&!!t.fullSelectionStart}(e))return c;if(c){var d=o.default.getStart(c).normalize(),f=o.default.getEnd(c).normalize(),h=e.fullSelectionEnd,p=e.fullSelectionStart;if(!p.isAfter(f)&&!d.isAfter(h)){var g=p.isAfter(d)?p:d,v=h.isAfter(f)?f:h;return(0,r.default)(g,v)}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.currentIndex+t;return n>=0&&n<e.snapshots.length}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=n(0);t.default=function(e,t,n){var i=[];(0,r.default)(e,(function(t,r){n(t,r);var o=e.getElementAtCursor("LI",t);o&&-1===i.indexOf(o)&&i.push(o)})),function(e,t){e.forEach((function(e){(0,o.safeInstanceOf)(e,"HTMLLIElement")&&(0,o.setListItemStyle)(e,t)}))}(i,[t])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),o=n(0);t.default=function(e,t,n,i){void 0===i&&(i=!0),(0,r.default)(e,(function(r,a,l,s){var u,c=n>0&&s.filter((function(e){return e.canAppendAtCursor(n)}))[0],d=c&&a.equalTo(l)?c.createVListAtBlock(null===(u=(0,o.getBlockElementAtNode)(r.rootNode,a.node))||void 0===u?void 0:u.collapseToSingleElement(),n):(0,o.createVListFromRegion)(r,i);d&&(d.changeListType(a,l,t),e.isFeatureEnabled("TabKeyTextFeatures")&&(d.rootList.style.listStylePosition="inside"),d.writeBack())}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.widthPx,r=e.heightPx,o=e.angleRad,i=n/(1-e.leftPercent-e.rightPercent),a=r/(1-e.topPercent-e.bottomPercent),l=t?i:n,s=t?a:r;return{targetWidth:Math.abs(l*Math.cos(o))+Math.abs(s*Math.sin(o)),targetHeight:Math.abs(l*Math.sin(o))+Math.abs(s*Math.cos(o)),originalWidth:i,originalHeight:a,visibleWidth:l,visibleHeight:s}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Editor=void 0;var r=n(108);Object.defineProperty(t,"Editor",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(14),i=function(){function e(e){this.element=e}return e.prototype.collapseToSingleElement=function(){return this.element},e.prototype.getStartNode=function(){return this.element},e.prototype.getEndNode=function(){return this.element},e.prototype.equals=function(e){return this.element==e.getStartNode()},e.prototype.isAfter=function(e){return(0,o.default)(this.element,e.getEndNode())},e.prototype.contains=function(e){return(0,r.default)(this.element,e,!0)},e.prototype.getTextContent=function(){var e;return(null===(e=this.element)||void 0===e?void 0:e.textContent)||""},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(e,t){return(0,r.default)(e,"HTMLElement")&&(e.matches||e.msMatchesSelector).call(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);t.default=function(e,t){var n=t.createElement("DIV");return n.innerHTML=e,(0,r.default)(n.childNodes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7);t.default=function(e,t){var n=e;do{n=n&&(t?n.firstChild:n.lastChild)}while(n&&n.firstChild);return n&&(0,r.default)(e,n)||null}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){return e.call(this,t,n)||this}return o(t,e),t}(n(27).default);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastInlineElement=t.getFirstInlineElement=void 0;var r=n(15),o=n(60);t.getFirstInlineElement=function(e){var t=(0,o.getFirstLeafNode)(e);return t?(0,r.default)(e,t):null},t.getLastInlineElement=function(e){var t=(0,o.getLastLeafNode)(e);return t?(0,r.default)(e,t):null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastLeafNode=t.getFirstLeafNode=void 0;var r=n(23),o=n(8);function i(e,t){for(var n=function(e){return t?e.firstChild:e.lastChild},i=n(e);i&&n(i);)i=n(i);return i&&(0,r.default)(i)&&(i=(0,o.getLeafSibling)(e,i,t)),i}t.getFirstLeafNode=function(e){return i(e,!0)},t.getLastLeafNode=function(e){return i(e,!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.position=e,this.parentBlock=t}return e.prototype.getTextContent=function(){return""},e.prototype.getContainerNode=function(){return this.position.node},e.prototype.getParentBlock=function(){return this.parentBlock},e.prototype.getStartPosition=function(){return this.position},e.prototype.getEndPosition=function(){return this.position},e.prototype.isAfter=function(e){return e&&this.position.isAfter(e.getEndPosition())},e.prototype.isTextualInlineElement=function(){return!1},e.prototype.contains=function(e){return!1},e.prototype.applyStyle=function(e){},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22),o=n(9),i=/[\s\u00A0\u200B\u3000]+([^\s\u00A0\u200B\u3000]*)$/i,a=function(){function e(e,t){this.rootNode=e,this.position=t,this.text="",this.word="",this.inlineBefore=null,this.inlineAfter=null,this.traverser=null,this.traversingComplete=!1,this.inlineElements=[],this.nearestNonTextInlineElement=null}return e.prototype.getWordBefore=function(){var e=this;return this.word||this.traverse((function(){return e.word})),this.word||""},e.prototype.getInlineElementBefore=function(){return this.inlineBefore||this.traverse(null),this.inlineBefore},e.prototype.getInlineElementAfter=function(){return this.inlineAfter||(this.inlineAfter=r.default.createBlockTraverser(this.rootNode,this.position).currentInlineElement),this.inlineAfter},e.prototype.getSubStringBefore=function(e){var t=this;return this.text.length<e&&this.traverse((function(){return t.text.length>=e})),this.text.substr(Math.max(0,this.text.length-e))},e.prototype.getRangeFromText=function(e,t){if(!e)return null;var n=null,r=null,i=e.length-1;return this.forEachTextInlineElement((function(o){for(var a=o.getTextContent()||"",l=a.length-1;l>=0&&i>=0;l--)if(e.charCodeAt(i)==a.charCodeAt(l))i--,r||(r=o.getStartPosition().move(l+1));else if(t||r)return!0;return-1==i&&(n=o.getStartPosition().move(l+1),!0)})),n&&r&&(0,o.default)(n,r)},e.prototype.forEachTextInlineElement=function(e){this.inlineElements.some(e)||this.traverse(e)},e.prototype.getNearestNonTextInlineElement=function(){var e=this;return this.nearestNonTextInlineElement||this.traverse((function(){return e.nearestNonTextInlineElement})),this.nearestNonTextInlineElement},e.prototype.traverse=function(e){if(this.traverser=this.traverser||r.default.createBlockTraverser(this.rootNode,this.position),this.traverser&&!this.traversingComplete)for(var t=this.traverser.getPreviousInlineElement();!this.traversingComplete;){if(this.inlineBefore=this.inlineBefore||t,!t||!t.isTextualInlineElement()){this.nearestNonTextInlineElement=t,this.traversingComplete=!0,this.word||(this.word=this.text);break}var n=t.getTextContent();if(!this.word){var o=i.exec(n);o&&2==o.length&&(this.word=o[1]+this.text)}if(this.text=n+this.text,this.inlineElements.push(t),e&&e(t))break;t=this.traverser.getPreviousInlineElement()}},e}();t.default=a},function(e,t,n){"use strict";var r,o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(42),a=n(21),l=/^Version:[0-9\.]+\s+StartHTML:\s*([0-9]+)\s+EndHTML:\s*([0-9]+)\s+/i,s=((r={})["text/html"]=function(e,t){return e.rawHtml=a.Browser.isEdge?function(e){var t=l.exec(e);if(3==(null==t?void 0:t.length)){var n=parseInt(t[1]),r=parseInt(t[2]);n>0&&r>n&&(e=e.substring(n,r))}return e}(t):t},r["text/plain"]=function(e,t){return e.text=t},r["text/*"]=function(e,t,n){return!!n&&(e.customValues[n]=t)},r);function u(e,t){try{e.customValues["link-preview"]=t,e.linkPreview=JSON.parse(t)}catch(e){}}t.default=function(e,t){var n={types:[],text:"",image:null,files:[],rawHtml:null,customValues:{}},r=o({},s);return(null==t?void 0:t.allowLinkPreview)&&(r["text/link-preview"]=u),Promise.all((e||[]).map((function(e){var o=e.type;if(0!=o.indexOf("image/")||n.image||"file"!=e.kind){if("file"==e.kind)return new Promise((function(t){var r=e.getAsFile();r&&(n.types.push(o),n.files.push(r)),t()}));var a=function(e,t){var n=0==e.indexOf("text/")?e.substring("text/".length):null,r=t&&n?t.indexOf(n):-1;return n&&r>=0?n:void 0}(o,null==t?void 0:t.allowedCustomPasteType),l=r[o]||(a?r["text/*"]:null);return new Promise((function(t){return l?e.getAsString((function(e){n.types.push(o),l(n,e,a),t()})):t()}))}return n.types.push(o),n.image=e.getAsFile(),new Promise((function(e){n.image?(0,i.default)(n.image,(function(t){n.imageDataUri=t,e()})):e()}))}))).then((function(){return n}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(42),o=n(5);t.default=function(e,t,n){for(var i,a,l,s={types:e.types?(0,o.default)(e.types):[],text:e.getData("text"),image:null,files:[],rawHtml:null,customValues:{}},u=0;u<(e.files?e.files.length:0);u++){var c=e.files.item(u);if(0==(null===(i=null==c?void 0:c.type)||void 0===i?void 0:i.indexOf("image/"))){s.image=c;break}}var d=function(){s.image?(0,r.default)(s.image,(function(e){s.imageDataUri=e,t(s)})):t(s)};if((null==n?void 0:n.getTempDiv)&&(null==n?void 0:n.removeTempDiv)){var f=n.getTempDiv();f.contentEditable="true",f.innerHTML="",f.focus(),null===(l=null===(a=f.ownerDocument)||void 0===a?void 0:a.defaultView)||void 0===l||l.setTimeout((function(){var e;s.rawHtml=f.innerHTML,null===(e=n.removeTempDiv)||void 0===e||e.call(n,f),d()}),0)}else s.rawHtml=void 0,d()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(e){if((0,r.default)(e,"HTMLElement"))return e.innerHTML;if(e){var t=e.ownerDocument.createElement("span");return t.appendChild(e.cloneNode(!0)),t.innerHTML}return""}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(119),i=n(30),a=n(45),l=n(1),s=n(5),u=n(120),c={topBorderColor:"#ABABAB",bottomBorderColor:"#ABABAB",verticalBorderColor:"#ABABAB",hasHeaderRow:!1,hasFirstColumn:!1,hasBandedRows:!1,hasBandedColumns:!1,bgColorEven:null,bgColorOdd:"#ABABAB20",headerRowColor:"#ABABAB",tableBorderFormat:0,keepCellShade:!1},d=function(){function e(e,t,n){var r=this;if(this.cells=null,this.selection=null,this.formatInfo=null,this.trs=[],this.table=(0,l.default)(e,"HTMLTableElement")?e:function(e){for(var t=e;t&&"TABLE"!=t.tagName;t=t.parentElement);return t}(e),this.table){var o=(0,l.default)(e,"HTMLTableElement")?null:e,i=(0,s.default)(this.table.rows);this.cells=i.map((function(e){return[]})),i.forEach((function(e,t){r.trs[t%2]=e;for(var n=0,i=0;n<e.cells.length;n++){for(;r.cells[t][i];i++);var a=e.cells[n];a==o&&(r.col=i,r.row=t);for(var l=0;l<a.colSpan;l++,i++)for(var s=0;s<a.rowSpan;s++){var u=l+s==0,c=a.getBoundingClientRect();r.cells[t+s][i]={td:u?a:null,spanLeft:l>0,spanAbove:s>0,width:u?c.width:void 0,height:u?c.height:void 0}}}})),this.formatInfo=(0,u.getTableFormatInfo)(this.table),t&&this.normalizeSize("number"==typeof n?function(e){return e/n}:n)}}return e.prototype.writeBack=function(e){var t,n=this;this.cells?((0,i.default)(this.table),this.cells.forEach((function(e,t){var r=p(n.trs[t%2]||n.trs[0]);r&&(n.table.appendChild(r),e.forEach((function(e,o){e.td&&(n.recalculateSpans(t,o),r.appendChild(e.td))})))})),this.formatInfo&&!e&&((0,u.saveTableInfo)(this.table,this.formatInfo),(0,o.default)(this.table,this.cells,this.formatInfo))):this.table&&(null===(t=this.table.parentNode)||void 0===t||t.removeChild(this.table))},e.prototype.applyFormat=function(e){this.table&&(this.formatInfo=r(r(r({},c),this.formatInfo||{}),e||{}),this.formatInfo.keepCellShade||this.deleteCellShadeDataset(this.cells))},e.prototype.deleteCellShadeDataset=function(e){null==e||e.forEach((function(e){e.forEach((function(e){e.td&&e.td.dataset.cellShade&&delete e.td.dataset.cellShade}))}))},e.prototype.edit=function(e){var t=this;if(this.table&&this.cells&&void 0!==this.row&&null!=this.col){var n=this.cells[this.row],r=n[this.col],o=this.selection?this.selection.firstCell.y:this.row,i=this.selection?this.selection.lastCell.y:this.row,a=this.selection?this.selection.firstCell.x:this.col,l=this.selection?this.selection.lastCell.x:this.col;switch(e){case 0:for(var s=o;s<=i;s++)this.cells.splice(o,0,n.map(h));break;case 1:var u=function(e){var n=i+c.countSpanAbove(i,c.col);c.cells.splice(n,0,c.cells[n-1].map((function(e,r){var o=t.getCell(n,r);if(o.spanAbove)return h(o);if(e.spanLeft){var i=h(e);return i.spanAbove=!1,i}return{td:p(t.getTd(t.row,r))}})))},c=this;for(s=o;s<=i;s++)u();break;case 2:var d=function(e){f.forEachCellOfCurrentColumn((function(t,n){n.splice(e,0,h(t))}))},f=this;for(s=a;s<=l;s++)d(s);break;case 3:var g=function(e){var n=l+v.countSpanLeft(v.row,l);v.forEachCellOfColumn(n-1,(function(e,r,o){var i,a=t.getCell(o,n);a.spanLeft?i=h(a):e.spanAbove?(i=h(e)).spanLeft=!1:i={td:p(t.getTd(o,t.col))},r.splice(n,0,i)}))},v=this;for(s=a;s<=l;s++)g();break;case 6:for(var m=function(e){y.forEachCellOfRow(e,(function(n,r){var o=t.getCell(e+1,r);n.td&&n.td.rowSpan>1&&o.spanAbove&&(o.td=n.td)}))},y=this,b=o;b<=i;b++)m(b);var E=this.selection?this.selection.lastCell.y-this.selection.firstCell.y:0;this.cells.splice(o,E+1);break;case 5:for(var C=0,S=function(e){w.forEachCellOfColumn(e,(function(n,r,o){var i=t.getCell(o,e+1);n.td&&n.td.colSpan>1&&i.spanLeft&&(i.td=n.td);var a=t.selection?e-C:t.col;r.splice(a,1)})),C++},w=this,P=a;P<=l;P++)S(P);break;case 7:case 8:var T=7==e?-1:1;for(b=this.row+T;b>=0&&b<this.cells.length;b+=T){if((k=this.getCell(b,this.col)).td&&!k.spanAbove){var O=b<this.row?k:r,x=b<this.row?r:k;this.mergeCells(O,x);break}}break;case 9:case 10:var N=9==e?-1:1;for(P=this.col+N;P>=0&&P<this.cells[this.row].length;P+=N){if((k=this.getCell(this.row,P)).td&&!k.spanLeft){var _=P<this.col?k:r,M=P<this.col?r:k;this.mergeCells(_,M,!0);break}}break;case 11:for(P=a;P<=l;P++)for(b=o+1;b<=i;b++){var k=this.getCell(o,P),I=this.getCell(b,P);this.mergeCells(k,I)}for(P=a+1;P<=l;P++){k=this.getCell(o,a);var R=this.getCell(o,P);this.mergeCells(k,R,!0)}break;case 4:this.cells=null;break;case 13:if(r.td&&r.td.rowSpan>1)this.getCell(this.row+1,this.col).td=p(r.td);else{var L=n.map((function(e){return{td:e==r?p(e.td):null,spanAbove:e!=r,spanLeft:e.spanLeft}}));this.cells.splice(this.row+1,0,L)}break;case 12:r.td&&r.td.colSpan>1?this.getCell(this.row,this.col+1).td=p(r.td):this.forEachCellOfCurrentColumn((function(e,r){r.splice(t.col+1,0,{td:r==n?p(e.td):null,spanAbove:e.spanAbove,spanLeft:r!=n})}));break;case 14:this.table.style.marginLeft="auto",this.table.style.marginRight="auto";break;case 15:this.table.style.marginLeft="",this.table.style.marginRight="auto";break;case 16:this.table.style.marginLeft="auto",this.table.style.marginRight="";break;case 18:this.setAlignmentToSelectedCells(o,i,a,l,"center");break;case 17:this.setAlignmentToSelectedCells(o,i,a,l,"left");break;case 19:this.setAlignmentToSelectedCells(o,i,a,l,"right");break;case 20:this.setAlignmentToSelectedCells(o,i,a,l,"top",!0);break;case 21:this.setAlignmentToSelectedCells(o,i,a,l,"middle",!0);break;case 22:this.setAlignmentToSelectedCells(o,i,a,l,"bottom",!0)}}},e.prototype.setAlignmentToSelectedCells=function(e,t,n,r,o,i){for(var a,l,s=e;s<=t;s++)for(var u=n;u<=r;u++)if(this.cells){var c=this.cells[s][u].td;i&&c?null===(a=c.style)||void 0===a||a.setProperty("vertical-align",o):c&&(null===(l=c.style)||void 0===l||l.setProperty("text-align",o))}},e.prototype.mergeCells=function(e,t,n){var r,o,a,l,s=n?(null===(r=e.td)||void 0===r?void 0:r.rowSpan)===(null===(o=t.td)||void 0===o?void 0:o.rowSpan)&&!e.spanLeft:(null===(a=e.td)||void 0===a?void 0:a.colSpan)===(null===(l=t.td)||void 0===l?void 0:l.colSpan)&&!e.spanAbove;e.td&&t.td&&s&&((0,i.default)(e.td,t.td,!0),t.td=null,n?t.spanLeft=!0:t.spanAbove=!0)},e.prototype.forEachCellOfCurrentColumn=function(e){this.forEachCellOfColumn(this.col,e)},e.prototype.getCellsWithBorder=function(e,t){for(var n=[],r=0;this.cells&&r<this.cells.length;r++)for(var o=0;o<this.cells[r].length;o++){var i=this.getCell(r,o);if(i.td){var l=(0,a.default)(i.td.getBoundingClientRect());if(l){var s=!1;if(t){if(l.right==e)s=!0,n.push(i.td);else if(s)break}else if(l.left==e)s=!0,n.push(i.td);else if(s)break}}}return n},e.prototype.forEachCellOfCurrentRow=function(e){this.forEachCellOfRow(this.row,e)},e.prototype.getCell=function(e,t){return this.cells&&this.cells[e]&&this.cells[e][t]||{}},e.prototype.getCurrentTd=function(){return this.getTd(this.row,this.col)},e.prototype.getTd=function(e,t){if(this.cells&&void 0!==e&&void 0!==t&&(e=Math.min(this.cells.length-1,e),t=this.cells[e]?Math.min(this.cells[e].length-1,t):t,!isNaN(e)&&!isNaN(t)))for(;e>=0&&t>=0;){var n=this.getCell(e,t);if(n.td)return n.td;if(n.spanLeft)t--;else{if(!n.spanAbove)break;e--}}return null},e.prototype.forEachCellOfColumn=function(e,t){if(void 0!==e)for(var n=0;this.cells&&n<this.cells.length;n++)t(this.getCell(n,e),this.cells[n],n)},e.prototype.forEachCellOfRow=function(e,t){if(void 0!==e)for(var n=0;this.cells&&n<this.cells[e].length;n++)t(this.getCell(e,n),n)},e.prototype.recalculateSpans=function(e,t){var n=this.getCell(e,t).td;n&&(n.colSpan=this.countSpanLeft(e,t),n.rowSpan=this.countSpanAbove(e,t),1==n.colSpan&&n.removeAttribute("colSpan"),1==n.rowSpan&&n.removeAttribute("rowSpan"))},e.prototype.countSpanLeft=function(e,t){for(var n=1,r=t+1;this.cells&&r<this.cells[e].length;r++){var o=this.getCell(e,r);if(o.td||!o.spanLeft)break;n++}return n},e.prototype.countSpanAbove=function(e,t){for(var n=1,r=e+1;this.cells&&r<this.cells.length;r++){var o=this.getCell(r,t);if(o.td||!o.spanAbove)break;n++}return n},e.prototype.normalizeEmptyTableCells=function(){for(var e=0,t=void 0;t=this.table.rows[e];e++)for(var n=0,r=void 0;r=t.cells[n];n++)r&&(r.innerHTML&&r.innerHTML.trim()||r.appendChild(document.createElement("br")))},e.prototype.normalizeTableCellSize=function(e){for(var t=0,n=void 0;n=this.table.rows[t];t++)n.removeAttribute("width"),n.style.setProperty("width",null),n.removeAttribute("height"),n.style.setProperty("height",null);for(t=0;this.cells&&t<this.cells.length;t++)for(var r=0;r<this.cells[t].length;r++){var o=this.cells[t][r];if(o){var i="number"==typeof e?function(t){return t/e}:e,a=o.width||0,l=o.height||0;f(o.td,(null==i?void 0:i(a))||a,(null==i?void 0:i(l))||l)}}},e.prototype.normalizeSize=function(e){this.normalizeEmptyTableCells(),this.normalizeTableCellSize(e);var t=this.table.getBoundingClientRect();f(this.table,(null==e?void 0:e(t.width))||t.width,(null==e?void 0:e(t.height))||t.height)},e}();function f(e,t,n){e&&(e.removeAttribute("width"),e.removeAttribute("height"),e.style.boxSizing="border-box",e.style.width=t+"px",e.style.height=n+"px")}function h(e){return{td:p(e.td),spanAbove:e.spanAbove,spanLeft:e.spanLeft}}function p(e){var t=e?e.cloneNode(!1):null;return(0,l.default)(t,"HTMLTableCellElement")&&(t.removeAttribute("id"),t.firstChild||t.appendChild(e.ownerDocument.createElement("br"))),t}t.default=d},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=n(47),a=n(2),l=n(19),s=n(30),u=n(1),c=n(68),d=n(5),f=n(32),h=n(12),p=[null,"lower-alpha","lower-roman"],g=function(){function e(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(this.newListStart=void 0,!e)throw new Error("node must not be null");this.node=(0,u.default)(e,"HTMLLIElement")?e:(0,h.default)(e,4);var o=this.node.style.display;this.dummy="list-item"!=o&&""!=o,this.listTypes=r([0],t,!0)}return e.prototype.getListType=function(){return this.listTypes[this.listTypes.length-1]},e.prototype.getLevel=function(){return this.listTypes.length-1},e.prototype.getNode=function(){return this.node},e.prototype.getNewListStart=function(){return this.newListStart},e.prototype.contains=function(e){return(0,o.default)(this.node,e,!0)},e.prototype.isDummy=function(){return this.dummy},e.prototype.isOrphanItem=function(){return!1},e.prototype.canMerge=function(e){return!(!(null==e?void 0:e.isOrphanItem())||this.listTypes.length!=e.listTypes.length)&&this.listTypes.every((function(t,n){return e.listTypes[n]==t}))},e.prototype.mergeItems=function(e){var t=this;m((null==e?void 0:e.map((function(e){return e.node})))||[],!0,!1).forEach((function(e){return t.node.appendChild(e)}))},e.prototype.indent=function(){if("-.25in"==this.node.style.marginLeft)return this.node.style.margin="",void(this.node.style.marginLeft="");var e=this.getListType();0!=e&&this.listTypes.push(e)},e.prototype.outdent=function(e){void 0===e&&(e=!1);var t=e?2:1;this.listTypes.length>t&&this.listTypes.pop()},e.prototype.addNegativeMargins=function(){this.node.style.margin="0in 0in 0in 0.5in",this.node.style.marginLeft="-.25in"},e.prototype.changeListType=function(e){0==e?this.listTypes=[e]:(this.outdent(),this.listTypes.push(e))},e.prototype.setIsDummy=function(e){this.dummy=e},e.prototype.setNewListStart=function(e){this.newListStart=e},e.prototype.writeBack=function(e,t){for(var n,r,o=1;o<e.length;o++)if((0,i.default)(e[o])!==this.listTypes[o]){e.splice(o);break}for(;o<this.listTypes.length;o++){var l=v(e[0],this.listTypes[o],o,t);e[e.length-1].appendChild(l),e.push(l)}if(e[e.length-1].appendChild(this.node),this.node.style.setProperty("display",this.dummy?"block":null),this.listTypes.length>1&&!(this.node.style.fontSize||this.node.style.color||this.node.style.fontFamily)){(0,c.default)(this.node,["font-size","font-family","color"])}this.listTypes.length<=1&&m("LI"==(0,a.default)(this.node)?(n=this.node,r=(0,d.default)(n.childNodes),(0,f.default)(n),r):[this.node],!0,!0)},e}();function v(e,t,n,r){var a,l=e.ownerDocument;return 1==n&&r&&t==(0,i.default)(r)?(0,o.default)(e,r)?(a=r.cloneNode(!1)).removeAttribute("id"):((0,s.default)(r),a=r):a=l.createElement(1==t?"ol":"ul"),1==t&&n>1&&a.style.setProperty("list-style-type",p[(n-1)%p.length]),a}function m(e,t,n){return!(e.length>0)||t&&(0,l.default)(e[0])||n&&(0,l.default)(e[e.length])||(e=[(0,h.default)(e)]),e}t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22),o=n(11),i=n(33),a=n(1),l=n(34);t.default=function(e,t){var n=function(e){var t=[],n=r.default.createBodyTraverser(e),l=null;for(;n.currentInlineElement!=l;){var s=(null==(l=n.currentInlineElement)?void 0:l.getContainerNode())||null;if(s=s?(0,o.default)(s):null,(0,a.default)(s,"HTMLElement")){var u=(0,i.default)(s);u&&t.push(u)}n.getNextInlineElement()}return t}(e),s=(0,i.default)(e);t.forEach((function(e){var t=n.map((function(t){return void 0!==t[e]?t[e]:""}));t&&(1==t.length||1==new Set(t).size)&&t[0]&&(s[e]=t[0])})),(0,l.default)(e,s)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(11);t.default=function(e,t,n){var o=e&&(0,r.default)(n,e.rootNode,t);if(o)for(var i=void 0;i=(0,r.default)(o.parentNode,e.rootNode,t);)o=i;return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22),o=n(20),i=n(7),a=n(48),l=n(23);t.default=function(e,t){var n=(0,a.default)(e),s=[];if(n){for(var u=e.rootNode,c=e.skipTags,d=r.default.createSelectionTraverser(u,n,c),f=null==d?void 0:d.currentBlockElement;f;f=d.getNextBlockElement())s.push(f);s=s.filter((function(e){var t,n=e.getStartNode();return n!=e.getEndNode()||!(0,l.default)(n,!0)||(null===(t=n.parentNode)||void 0===t||t.removeChild(n),!1)}))}if(0==s.length&&e&&!e.rootNode.firstChild&&t){var h=(0,o.default)(1,e.rootNode.ownerDocument);e.rootNode.appendChild(h),(f=(0,i.default)(e.rootNode,h))&&s.push(f)}return s}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.getRegionCreator=void 0;var o=n(3),i=n(11),a=n(4),l=n(17),s=n(8),u=((r={})[0]={skipTags:["TABLE"],outerSelector:"table",innerSelector:"td,th"},r);function c(e,t){var n=a.default.getStart(e).normalize(),r=a.default.getEnd(e).normalize();return function(e,i,a){return function(e,t,n,r){if(e){var i=t&&(0,s.getNextLeafSibling)(e,t,r),a=n&&(0,s.getPreviousLeafSibling)(e,n,r),l=!t||(0,o.default)(e,t)&&(0,o.default)(e,i),u=!n||(0,o.default)(e,n)&&(0,o.default)(e,a),c=!(t&&n&&((0,o.default)(t,n,!0)||(0,o.default)(t,a,!0)||(0,o.default)(n,t,!0)||(0,o.default)(n,i,!0)));return l&&u&&c}return!1}(e,i,a,t)?{rootNode:e,nodeBefore:i,nodeAfter:a,skipTags:t,fullSelectionStart:n,fullSelectionEnd:r}:null}}t.default=function(e,t,n){var r=[];if(e&&t){var a=u[n],s=a.innerSelector,d=a.skipTags,f=function(e,t,n){var r=[{innerNode:e,children:[]}],a=u[n],s=a.outerSelector,c=a.innerSelector,d=(0,l.default)(e,s,null,2,t);return(0,l.default)(e,c,(function(t){var n=(0,i.default)(t,e,s);if(n&&d.indexOf(n)<0){for(var a={innerNode:t,children:[]},l=r.length-1;l>=0;l--){var u=r[l],c=u.innerNode,f=u.children;if((0,o.default)(c,n)){var h=f.filter((function(e){return e.outerNode==n}))[0];h||(h={outerNode:n,boundaries:[]},f.push(h)),h.boundaries.push(a);break}}r.push(a)}}),1,t),r[0]}(e,t,n),h=(0,i.default)(t.startContainer,e,s)||e,p=(0,i.default)(t.endContainer,e,s)||e;r=function e(t,n,r,o,i){var a;i=i||n.innerNode==r;var l=!1,s=n.children,u=n.innerNode,c=[];if(0==s.length){(f=t(u))&&c.push(f)}else for(var d=0;d<=s.length&&!l;d++){var f,h=s[d]||{},p=h.outerNode,g=h.boundaries,v=null===(a=s[d-1])||void 0===a?void 0:a.outerNode;if(i)(f=t(u,v,p))&&c.push(f);null==g||g.forEach((function(n){var a,s;s=(a=e(t,n,r,o,i))[0],i=a[1],l=a[2],c=c.concat(s)}))}return[c,i,l||u==o]}(c(t,d),f,h,p)[0]}return r.filter((function(e){return!!e}))},t.getRegionCreator=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=n(24),i=n(1);t.default=function(e,t){if(!t||0==t.length)return[];var n=(0,i.default)(t[0],"Node")?t:[t[0].getStartNode(),t[t.length-1].getEndNode()],a=(n=n&&n.filter((function(t){return(0,o.default)(e,t)})))[0],l=n[n.length-1];return(0,o.default)(e,a)&&(0,o.default)(e,l)?(0,r.default)(e.rootNode,a,l,!0):[]}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(16),i=n(3),a=n(7),l=n(74),s=n(33),u=n(24),c=n(1),d=n(34),f=n(18);t.default=function(e,t,n){var h,p,g,v;if((0,u.default)(e,t)&&(0,u.default)(e,n)&&(v=(0,a.default)(e.rootNode,n))&&!v.contains(t)){for(var m=v.collapseToSingleElement(),y=(0,f.collapse)(e.rootNode,m,t,!1,!0),b=m;(0,i.default)(y,b);){var E=b.parentNode;if((0,c.default)(E,"HTMLElement")){var C=r(r(r({},(0,l.default)(E)||{}),(0,s.default)(E)),(0,s.default)(m));(0,d.default)(m,C)}b=E}var S=null,w=1==m.childNodes.length&&0==m.attributes.length?m.firstChild:(0,o.default)(m,"SPAN");for(b=w;(0,i.default)(y,b)&&1==(null===(h=b.parentNode)||void 0===h?void 0:h.childNodes.length);b=b.parentNode)S=b.parentNode;null===(p=t.parentNode)||void 0===p||p.insertBefore(w,t.nextSibling),null===(g=null==S?void 0:S.parentNode)||void 0===g||g.removeChild(S)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o={B:{"font-weight":"bold"},EM:{"font-style":"italic"},I:{"font-style":"italic"},U:{"text-decoration":"underline"},P:{"margin-top":"1em","margin-bottom":"1em"},PRE:{"white-space":"pre"},S:{"text-decoration":"line-through"},STRIKE:{"text-decoration":"line-through"},SUB:{"vertical-align":"sub","font-size":"smaller"},SUP:{"vertical-align":"super","font-size":"smaller"}};t.default=function(e,t){var n=(0,r.default)(e);return o[n]||(t||{})[n]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(2),i=n(31);function a(e){for(;e.previousSibling;)if(e=e.previousSibling,"BR"==(0,o.default)(e)||!(0,i.default)(e))return!1;return!0}t.default=function(e,t){if(e){var n=(e=e.normalize()).node;if(0==e.offset){for(;n&&(0,r.default)(t,n)&&a(n);)n=(null==n?void 0:n.parentNode)||null;return n==t}}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(4);function i(e,t){var n,o;if(!e||!t)return[];var i,a=e.node,l=e.offset,s=[];if(!(0,r.default)(t,a,!0))return[];if(3==a.nodeType){for(i=a.parentNode;a.previousSibling&&3==a.previousSibling.nodeType;)l+=(null===(n=a.previousSibling.nodeValue)||void 0===n?void 0:n.length)||0,a=a.previousSibling;s.unshift(l)}else i=a,a=a.childNodes[l];do{l=0;for(var u=!1,c=(null==i?void 0:i.firstChild)||null;c&&c!=a;c=c.nextSibling){if(3==c.nodeType){if(0===(null===(o=c.nodeValue)||void 0===o?void 0:o.length)||u)continue;u=!0}else u=!1;l++}s.unshift(l),a=i,i=(null==i?void 0:i.parentNode)||null}while(a&&a!=t);return s}t.default=function(e,t){return t?{start:i(o.default.getStart(t),e),end:i(o.default.getEnd(t),e)}:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearProceedingSnapshotsV2=void 0;var r=n(49);function o(e,t){if(t=t||function(e){var t;return(null===(t=e)||void 0===t?void 0:t.length)||0},(0,r.default)(e,1)){for(var n=0,o=e.currentIndex+1;o<e.snapshots.length;o++)n+=t(e.snapshots[o]);e.snapshots.splice(e.currentIndex+1),e.totalSize-=n,e.autoCompleteIndex=-1}}t.default=o,t.clearProceedingSnapshotsV2=function(e){o(e,(function(e){var t;return(null===(t=e.html)||void 0===t?void 0:t.length)||0}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="border-spacing,caption-side,color,cursor,direction,empty-cells,font-family,font-size,font-style,font-variant,font-weight,font,letter-spacing,line-height,list-style-image,list-style-position,list-style-type,list-style,orphans,quotes,text-align,text-indent,text-transform,visibility,white-space,widows,word-spacing".split(",");t.default=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView,n=t&&e&&t.getComputedStyle(e),o={};return r.forEach((function(e){return o[e]=n&&n.getPropertyValue(e)||""})),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cloneObject=void 0;var r=Object.assign?function(e,t){return Object.assign(t||{},e)}:function(e,t){var n=t||{};if(e)for(var r=0,o=Object.keys(e);r<o.length;r++){var i=o[r];n[i]=e[i]}return n};t.cloneObject=function(e,t){return r(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=e.ctrlKey||"Control"===e.key,n=e.altKey||"Alt"===e.key,r=e.metaKey||"Meta"===e.key;return t||n||r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasFocus=void 0;var r=n(0);t.hasFocus=function(e){var t=e.contentDiv.ownerDocument.activeElement;return t&&(0,r.contains)(e.contentDiv,t,!0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDarkColor=void 0;var r=n(174);Object.defineProperty(t,"getDarkColor",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){var r=n(83),o={};for(var i in r)r.hasOwnProperty(i)&&(o[r[i]]=i);var a=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var l in a)if(a.hasOwnProperty(l)){if(!("channels"in a[l]))throw new Error("missing channels property: "+l);if(!("labels"in a[l]))throw new Error("missing channel labels property: "+l);if(a[l].labels.length!==a[l].channels)throw new Error("channel and label counts mismatch: "+l);var s=a[l].channels,u=a[l].labels;delete a[l].channels,delete a[l].labels,Object.defineProperty(a[l],"channels",{value:s}),Object.defineProperty(a[l],"labels",{value:u})}a.rgb.hsl=function(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(r,o,i),l=Math.max(r,o,i),s=l-a;return l===a?t=0:r===l?t=(o-i)/s:o===l?t=2+(i-r)/s:i===l&&(t=4+(r-o)/s),(t=Math.min(60*t,360))<0&&(t+=360),n=(a+l)/2,[t,100*(l===a?0:n<=.5?s/(l+a):s/(2-l-a)),100*n]},a.rgb.hsv=function(e){var t,n,r,o,i,a=e[0]/255,l=e[1]/255,s=e[2]/255,u=Math.max(a,l,s),c=u-Math.min(a,l,s),d=function(e){return(u-e)/6/c+.5};return 0===c?o=i=0:(i=c/u,t=d(a),n=d(l),r=d(s),a===u?o=r-n:l===u?o=1/3+t-r:s===u&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*u]},a.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[a.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,r))),100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},a.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-o)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]},a.rgb.keyword=function(e){var t=o[e];if(t)return t;var n,i,a,l=1/0;for(var s in r)if(r.hasOwnProperty(s)){var u=r[s],c=(i=e,a=u,Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)+Math.pow(i[2]-a[2],2));c<l&&(l=c,n=s)}return n},a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){var t=a.rgb.xyz(e),n=t[0],r=t[1],o=t[2];return r/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},a.hsl.rgb=function(e){var t,n,r,o,i,a=e[0]/360,l=e[1]/100,s=e[2]/100;if(0===l)return[i=255*s,i,i];t=2*s-(n=s<.5?s*(1+l):s+l-s*l),o=[0,0,0];for(var u=0;u<3;u++)(r=a+1/3*-(u-1))<0&&r++,r>1&&r--,i=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,o[u]=255*i;return o},a.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,o=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,o*=i<=1?i:2-i,[t,100*(0===r?2*o/(i+o):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),l=255*r*(1-n*i),s=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,s,a];case 1:return[l,r,a];case 2:return[a,r,s];case 3:return[a,l,r];case 4:return[s,a,r];case 5:return[r,a,l]}},a.hsv.hsl=function(e){var t,n,r,o=e[0],i=e[1]/100,a=e[2]/100,l=Math.max(a,.01);return r=(2-i)*a,n=i*l,[o,100*(n=(n/=(t=(2-i)*l)<=1?t:2-t)||0),100*(r/=2)]},a.hwb.rgb=function(e){var t,n,r,o,i,a,l,s=e[0]/360,u=e[1]/100,c=e[2]/100,d=u+c;switch(d>1&&(u/=d,c/=d),r=6*s-(t=Math.floor(6*s)),0!=(1&t)&&(r=1-r),o=u+r*((n=1-c)-u),t){default:case 6:case 0:i=n,a=o,l=u;break;case 1:i=o,a=n,l=u;break;case 2:i=u,a=n,l=o;break;case 3:i=u,a=o,l=n;break;case 4:i=o,a=u,l=n;break;case 5:i=n,a=u,l=o}return[255*i,255*a,255*l]},a.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},a.xyz.rgb=function(e){var t,n,r,o=e[0]/100,i=e[1]/100,a=e[2]/100;return n=-.9689*o+1.8758*i+.0415*a,r=.0557*o+-.204*i+1.057*a,t=(t=3.2406*o+-1.5372*i+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.lab.xyz=function(e){var t,n,r,o=e[0];t=e[1]/500+(n=(o+16)/116),r=n-e[2]/200;var i=Math.pow(n,3),a=Math.pow(t,3),l=Math.pow(r,3);return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=l>.008856?l:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},a.lab.lch=function(e){var t,n=e[0],r=e[1],o=e[2];return(t=360*Math.atan2(o,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+o*o),t]},a.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},a.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],o=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];if(0===(o=Math.round(o/50)))return 30;var i=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===o&&(i+=60),i},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255,i=Math.max(Math.max(n,r),o),a=Math.min(Math.min(n,r),o),l=i-a;return t=l<=0?0:i===n?(r-o)/l%6:i===r?2+(o-n)/l:4+(n-r)/l+4,t/=6,[360*(t%=1),100*l,100*(l<1?a/(1-l):0)]},a.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,o=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var o,i=[0,0,0],a=t%1*6,l=a%1,s=1-l;switch(Math.floor(a)){case 0:i[0]=1,i[1]=l,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=l;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=l,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return o=(1-n)*r,[255*(n*i[0]+o),255*(n*i[1]+o),255*(n*i[2]+o)]},a.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]},a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(181),t),o(n(222),t),o(n(225),t),o(n(228),t),o(n(231),t),o(n(234),t),o(n(241),t),o(n(244),t),o(n(258),t),o(n(261),t),o(n(270),t),o(n(273),t)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(184),i=n(213),a=n(214),l=n(215),s=n(216),u=n(217),c=n(218),d=n(219),f=n(220),h=n(221),p=r(r(r(r(r(r(r(r(r(r({},l.ListFeatures),u.QuoteFeatures),f.TableFeatures),d.StructuredNodeFeatures),o.AutoLinkFeatures),c.ShortcutFeatures),i.CursorFeatures),s.MarkdownFeatures),a.EntityFeatures),h.TextFeatures);t.default=function(){return p}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),o=n(10),i=n(89),a=n(90),l=n(91),s=n(92),u=n(93),c=n(94),d=n(95),f=n(0),h=["font","text-decoration","color","background"],p="B,I,U,STRONG,EM,SUB,SUP,STRIKE,FONT,CENTER,H1,H2,H3,H4,H5,H6,UL,OL,LI,SPAN,P,BLOCKQUOTE,CODE,S,PRE".split(","),g=["href","src"],v=["TD","TH","TR","TABLE","TBODY","THEAD"];function m(e){var t=(0,f.toArray)(e.childNodes).map(m).every((function(e){return e})),n=(0,f.isBlockElement)(e),r=(0,f.getTagOfNode)(e);return r&&(p.indexOf(r)>=0||t&&!(0,f.isVoidHtmlElement)(e)&&v.indexOf(r)<0?(n&&!t&&(0,f.wrap)(e),(0,f.unwrap)(e)):function(e){for(var t=(0,f.safeInstanceOf)(e,"HTMLTableCellElement"),n=0,r=(0,f.toArray)(e.attributes);n<r.length;n++){var o=r[n];t&&"style"==o.name?y(e):g.indexOf(o.name.toLowerCase())<0&&0!=o.name.indexOf("data-")&&e.removeAttribute(o.name)}}(e)),n}function y(e){var t=(0,f.getStyles)(e),n={};return Object.keys(t).forEach((function(e){e.indexOf("border")<0&&(n[e]=t[e],delete t[e])})),(0,f.setStyles)(e,t),n}function b(e){(0,r.default)(e,(function(t){var n=(0,f.getSelectedBlockElementsInRegion)(t),r=(0,f.collapseNodesInRegion)(t,n);if(e.contains(t.rootNode)){var o=y(t.rootNode);if(Object.keys(o).length>0){var i=(0,f.wrap)((0,f.toArray)(t.rootNode.childNodes));(0,f.setStyles)(i,o)}}for(;r.length>0&&(0,f.isNodeInRegion)(t,r[0].parentNode);)r=[(0,f.splitBalancedNodeRange)(r)];r.forEach(m)}))}function E(e,t){switch(void 0===t&&(t=0),t){case 0:!function(e){e.focus(),e.addUndoSnapshot((function(){(0,o.default)(e,"removeFormat"),e.queryElements("[class]",1,(function(e){return e.removeAttribute("class")}));var t=e.getDefaultFormat(),n=0===Object.keys(t).length;if(e.queryElements("[style]",2,(function(e){h.forEach((function(t){return e.style.removeProperty(t)})),n&&""===e.getAttribute("style")&&e.removeAttribute("style")})),!n){if(t.fontFamily&&(0,a.default)(e,t.fontFamily),t.fontSize&&(0,l.default)(e,t.fontSize),t.textColor){var r=e.queryElements("a *, a",1),f=r.length>0?function(e){return-1==r.indexOf(e)}:null;t.textColors?(0,s.default)(e,t.textColors,f):(0,s.default)(e,t.textColor,f)}t.backgroundColor&&(t.backgroundColors?(0,i.default)(e,t.backgroundColors):(0,i.default)(e,t.backgroundColor)),t.bold&&(0,u.default)(e),t.italic&&(0,c.default)(e),t.underline&&(0,d.default)(e)}}),"Format")}(e);break;case 1:b(e);break;default:!function(e){if(!function(e){var t=e.getSelectionTraverser();return!!t.currentBlockElement&&!!t.getNextBlockElement()}(e)&&e.getSelectionTraverser().currentInlineElement instanceof f.PartialInlineElement)return void E(e);b(e)}(e)}}t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){if((null==t?void 0:t.length)>0){var n=e.getSelectionRange(),o=n&&r.Position.getStart(n),i=n&&r.Position.getEnd(n);t.forEach((function(e){return e.commit()})),e.select(o,i)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=n(0);t.default=function(e,t){(0,r.default)(e,(function(n,r){(0,o.setColor)(n,r?"":t,!0,e.isDarkMode())}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(50);t.default=function(e,t){(0,r.default)(e,"font-family",(function(e,n){e.style.fontFamily=n?"":t}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(50),o=n(0);t.default=function(e,t){(0,r.default)(e,"font-size",(function(e,n){e.style.fontSize=n?"":t,"normal"!=(0,o.getComputedStyle)(e,"line-height")&&(e.style.lineHeight="normal")}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(50),o=n(0);t.default=function(e,t,n){(0,r.default)(e,"color",(function(r,i){n&&!n(r)||(0,o.setColor)(r,i?"":t,!1,e.isDarkMode())}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"bold")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"italic")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"underline")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),o=n(0);t.default=function(e,t,n){(0,r.default)(e,(function(e){var n=(0,o.getSelectedBlockElementsInRegion)(e,!0),r=(0,o.collapseNodesInRegion)(e,n);if(r.length>0){if(1==r.length){var i=(0,o.getTagOfNode)(r[0]);"BR"==i?r=[(0,o.wrap)(r[0])]:"LI"!=i&&"TD"!=i||(r=(0,o.toArray)(r[0].childNodes))}for(;r[0]&&(0,o.isNodeInRegion)(e,r[0].parentNode)&&r.some((function(e){return"LI"==(0,o.getTagOfNode)(e)}));)r=[(0,o.splitBalancedNodeRange)(r)];t(r)}}),n)}},function(e,t,n){"use strict";var r,o,i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var l=n(98),s=n(100),u=n(36),c=n(52),d=n(237),f=n(26),h=n(238),p=n(6),g=n(0),v=n(101),m=2*Math.PI/8,y=["nw","n","ne","e","se","s","sw","w"],b=((r={}).SingleDirectionResize=2,r.ImageRotate=4,r.ImageCrop=8,r),E={borderColor:"#DB626C",minWidth:10,minHeight:10,preserveRatio:!1,minRotateDeg:5,imageSelector:"img",rotateIconHTML:null},C=((o={})[1]=v.getCornerResizeHTML,o[2]=v.getSideResizeHTML,o[4]=h.getRotateHTML,o[8]=d.getCropHTML,o),S=function(){function e(e){var t=this;this.allowedOperations=1,this.onBlur=function(){t.setEditingImage(null)},this.removeWrapper=function(e){var t=null==e?void 0:e.parentNode,n=null==e?void 0:e.querySelector("img");n&&t&&(n.style.position="",n.style.margin=null,n.style.textAlign=null,t.insertBefore(n,e),t.removeChild(e))},this.updateWrapper=function(e){var n,r=t.getImageWrapper(t.image);if(r){var o=T(r,"r_cropC"),i=T(r,"r_cropO"),a=T(r,"r_rotateC")[0],l=T(r,"r_rotateH")[0],s=T(r,"r_resizeH"),u=T(r,"r_cropH"),d=1==o.length&&4==i.length,f=t.editInfo,p=f.angleRad,m=f.bottomPercent,y=f.leftPercent,b=f.rightPercent,E=f.topPercent,C=(0,c.default)(t.editInfo,d),S=C.targetWidth,O=C.targetHeight,N=C.originalWidth,_=C.originalHeight,M=C.visibleWidth,k=C.visibleHeight,I=(S-M)/2,R=(O-k)/2,L=N*y,A=N*b,j=_*E,D=_*m;if(r.style.width=P(M),r.style.height=P(k),r.style.margin=R+"px "+I+"px",r.style.transform="rotate("+p+"rad)",r.style.textAlign=(n=r.parentNode,(0,g.safeInstanceOf)(n,"HTMLElement")&&"rtl"==(0,g.getComputedStyle)(n,"direction")?"right":"left"),t.image.style.width=P(N),t.image.style.height=P(_),d)w(o[0],L,j,A,D,void 0,void 0),w(i[0],0,0,A,void 0,void 0,j),w(i[1],void 0,0,0,D,A,void 0),w(i[2],L,void 0,0,0,void 0,D),w(i[3],0,j,void 0,0,L,void 0),x(u,p);else{if(t.image.style.margin=-j+"px 0 0 "+-L+"px","r_resizeH"==(null==e?void 0:e.elementClass)){var B=r.clientWidth,F=r.clientHeight;t.wasResized=!0,(0,v.doubleCheckResize)(t.editInfo,t.options.preserveRatio,B,F),t.updateWrapper()}(0,h.updateRotateHandlePosition)(t.editInfo,t.editor.getRelativeDistanceToEditor(r,!0),R,a,l),x(s,p)}}},this.options=i(i({},E),e||{})}return e.prototype.getName=function(){return"ImageEdit"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.disposer=e.addDomEventHandler("blur",this.onBlur),Object.keys(b).forEach((function(e){t.allowedOperations|=t.editor.isFeatureEnabled(e)?b[e]:0}))},e.prototype.dispose=function(){this.clearDndHelpers(),this.disposer(),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 5:this.setEditingImage(null);break;case 6:var t=e.rawEvent.target;e.isClicking&&0==e.rawEvent.button&&(0,g.safeInstanceOf)(t,"HTMLImageElement")&&t.isContentEditable&&(0,g.matchesSelector)(t,this.options.imageSelector)&&this.setEditingImage(t,7);break;case 0:var n=e.rawEvent.which;46==n||8==n?this.setEditingImage(null,!0):27==n&&this.image?(this.editInfo=(0,f.getEditInfoFromImage)(this.image),this.setEditingImage(null),e.rawEvent.preventDefault()):16!=n&&17!=n&&18!=n&&this.setEditingImage(null,!0);break;case 7:"InsertEntity"==e.source&&"IMAGE_EDIT_WRAPPER"==e.data.type||this.editor.queryElements((0,g.getEntitySelector)("IMAGE_EDIT_WRAPPER"),this.removeWrapper);break;case 15:"IMAGE_EDIT_WRAPPER"==e.entity.type&&(8==e.operation?this.removeWrapper(e.entity.wrapper):1==e.operation&&e.rawEvent.preventDefault());break;case 8:(0,g.toArray)(e.clonedRoot.querySelectorAll(this.options.imageSelector)).forEach((function(e){(0,f.deleteEditInfo)(e)}))}},e.prototype.setEditingImage=function(e,t){var n=this,r="number"==typeof t?t:0,o="number"!=typeof t&&!!t;this.image&&(this.clearDndHelpers(),(0,l.default)(this.editor,this.image,this.editInfo,this.lastSrc,this.wasResized)&&this.editor.addUndoSnapshot((function(){return n.image}),"ImageResize"),(i=this.getImageWrapper(this.image))&&this.removeWrapper(i),o&&this.editor.select(this.image),this.image=null,this.editInfo=null,this.lastSrc=null);if(!this.image&&(null==e?void 0:e.isContentEditable)){this.editor.addUndoSnapshot(),this.image=e,this.editInfo=(0,f.getEditInfoFromImage)(e),this.wasResized=function(e){var t=e.width,n=e.height,r=e.style;return!(""!==r.maxWidth&&"initial"!==r.maxWidth&&"auto"!==r.maxWidth||!(N(r.height)||N(r.width)||N(t)||N(n)))}(this.image),r=((0,s.default)(e)?r:3)&this.allowedOperations;var i=this.createWrapper(r);this.updateWrapper(),this.dndHelpers=a(a(a(a([],this.createDndHelpers("r_resizeH",v.Resizer),!0),this.createDndHelpers("r_rotateH",h.Rotator),!0),this.createDndHelpers("r_cropH",d.Cropper),!0),this.createDndHelpers("r_cropC",d.Cropper),!0),this.editor.select(i,-3)}},e.prototype.createWrapper=function(e){var t=this,n=(0,p.insertEntity)(this.editor,"IMAGE_EDIT_WRAPPER",(0,g.wrap)(this.image,6),!1,!0).wrapper;n.style.position="relative",n.style.maxWidth="100%",n.style.verticalAlign="bottom",n.style.display=g.Browser.isSafari?"inline-block":"inline-flex",this.lastSrc=this.image.getAttribute("src"),this.image.src=this.editInfo.src,this.image.style.position="absolute",this.image.style.maxWidth=null;var r={borderColor:this.options.borderColor,rotateIconHTML:this.options.rotateIconHTML,rotateHandleBackColor:this.editor.isDarkMode()?"#333":"white"},o=[];return Object.keys(C).forEach((function(t){(e&t)==t&&(0,g.arrayPush)(o,C[t](r))})),o.forEach((function(e){var r=(0,g.createElement)(e,t.image.ownerDocument);r&&n.appendChild(r)})),n},e.prototype.getImageWrapper=function(e){var t,n=(0,g.getEntityFromElement)(null===(t=null==e?void 0:e.parentNode)||void 0===t?void 0:t.parentNode);return"IMAGE_EDIT_WRAPPER"==(null==n?void 0:n.type)?n.wrapper:null},e.prototype.createDndHelpers=function(e,t){var n=this,r={editInfo:this.editInfo,options:this.options,elementClass:e},o=this.getImageWrapper(this.image);return o?T(o,e).map((function(e){return new u.default(e,i(i({},r),{x:e.dataset.x,y:e.dataset.y}),n.updateWrapper,t,n.editor.getZoomScale())})):[]},e.prototype.clearDndHelpers=function(){var e;null===(e=this.dndHelpers)||void 0===e||e.forEach((function(e){return e.dispose()})),this.dndHelpers=null},e}();function w(e,t,n,r,o,i,a){e.style.left=P(t),e.style.top=P(n),e.style.right=P(r),e.style.bottom=P(o),e.style.width=P(i),e.style.height=P(a)}function P(e){return void 0===e?null:e+"px"}function T(e,t){return(0,g.toArray)(e.querySelectorAll("."+t))}function O(e,t){var n=function(e){var t=Math.round(e/m)%8;return t<0?t+8:t}(t),r=e.dataset.y+e.dataset.x,o=y.indexOf(r);return y[(o>=0&&o+n)%8]}function x(e,t){e.map((function(e){e.style.cursor=O(e,t)+"-resize"}))}function N(e){var t="string"==typeof e?parseInt(e):e;return!isNaN(t)}t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(99),o=n(236),i=n(52),a=n(26);t.default=function(e,t,n,l,s){var u="",c=(0,a.getEditInfoFromImage)(t);switch((0,r.default)(n,c)){case 1:u=n.src;break;case 2:u=l;break;case 3:u=(0,o.default)(t,n)}var d=u!=l;d&&(u=e.triggerPluginEvent(19,{image:t,originalSrc:n.src,previousSrc:l,newSrc:u}).newSrc),u==n.src?(0,a.deleteEditInfo)(t):(0,a.saveEditInfo)(t,n);var f=(0,i.default)(n),h=f.targetWidth,p=f.targetHeight;return t.src=u,function(e,t,n,r){t?(e.style.maxWidth="initial",e.width=n,e.height=r,e.style.width=n+"px",e.style.height=r+"px"):(e.style.maxWidth="100%",e.style.height="initial",e.style.width="initial",e.removeAttribute("height"),e.removeAttribute("width"))}(t,s,h,p),d||n.widthPx!=c.widthPx||n.heightPx!=c.heightPx}},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var o=["angleRad"],i=["leftPercent","rightPercent","topPercent","bottomPercent"],a=r(r([],o,!0),i,!0),l=r(r([],a,!0),["widthPx","heightPx"],!0);function s(e,t){return Math.abs(e-t)<.001}t.default=function(e,t){return e&&e.src&&!l.some((function(t){return!("number"==typeof e[t])}))?a.every((function(t){return s(e[t],0)}))?1:t&&o.every((function(t){return s(e[t],0)}))&&o.every((function(e){return s(t[e],0)}))&&i.every((function(n){return s(e[n],t[n])}))?2:3:0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return!1;try{var t=e.ownerDocument.createElement("canvas");t.width=10,t.height=10;var n=t.getContext("2d");return n.drawImage(e,0,0),n.getImageData(0,0,1,1),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getSideResizeHTML=t.getCornerResizeHTML=t.doubleCheckResize=t.rotateCoordinate=t.Resizer=void 0;var o=["w","","e"],i=["s","","n"];function a(e,t,n){if(0==e&&0==t)return[0,0];var r=Math.sqrt(e*e+t*t);return n=Math.atan2(t,e)-n,[r*Math.cos(n),r*Math.sin(n)]}function l(e,t,n){var r="w"==e?"left":"right",o="n"==t?"top":"bottom";return""==e&&""==t?{tag:"div",style:"position:absolute;left:0;right:0;top:0;bottom:0;border:solid 1px "+n+";pointer-events:none"}:{tag:"div",style:"position:absolute;"+r+":"+(""==e?"50%":"0px")+";"+o+":"+(""==t?"50%":"0px"),children:[{tag:"div",style:"position:relative;width:7px;height:7px;background-color: "+n+";cursor:"+(t+e)+"-resize;"+o+":-3px;"+r+":-3px",className:"r_resizeH",dataset:{x:e,y:t}}]}}t.Resizer={onDragStart:function(e){var t=e.editInfo;return r({},t)},onDragging:function(e,t,n,r,o){var i,l=e.x,s=e.y,u=e.editInfo,c=e.options,d=n.widthPx>0&&n.heightPx>0?1*n.widthPx/n.heightPx:0;r=(i=a(r,o,u.angleRad))[0],o=i[1];var f=""==l,h=""==s,p=!(f||h)&&(c.preserveRatio||t.shiftKey),g=f?n.widthPx:Math.max(n.widthPx+r*("w"==l?-1:1),c.minWidth),v=h?n.heightPx:Math.max(n.heightPx+o*("n"==s?-1:1),c.minHeight);return p&&d>0&&(v=Math.min(v,g/d),(g=Math.min(g,v*d))<v*d?g=v*d:v=g/d),u.widthPx=g,u.heightPx=v,!0}},t.rotateCoordinate=a,t.doubleCheckResize=function(e,t,n,r){var o=e.widthPx,i=e.heightPx,a=i>0?o/i:0;n=Math.floor(n),r=Math.floor(r),o=Math.floor(o),i=Math.floor(i),e.widthPx=n,e.heightPx=r,t&&a>0&&(o!==n||i!==r)&&(n<o?e.heightPx=n/a:e.widthPx=r*a)},t.getCornerResizeHTML=function(e){var t=e.borderColor,n=[];return o.forEach((function(e){return i.forEach((function(r){return n.push(""==e==(""==r)?l(e,r,t):null)}))})),n},t.getSideResizeHTML=function(e){var t=e.borderColor,n=[];return o.forEach((function(e){return i.forEach((function(r){return n.push(""==e!=(""==r)?l(e,r,t):null)}))})),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.naturalWidth,r=e.naturalHeight,o=e.leftPercent,i=e.topPercent;return{width:n*(1-o-e.rightPercent)*t,height:r*(1-i-e.bottomPercent)*t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(102),o=n(26);t.default=function(e,t){var n=(0,o.getEditInfoFromImage)(e),i=(0,r.default)(n,t),a=i.width,l=i.height;return Math.round(a)==Math.round(n.widthPx)&&Math.round(l)==Math.round(n.heightPx)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getObject=t.setObject=t.createCustomData=void 0;function r(e,t){var n=t.getAttribute("NodeId");return n||(n=e.nextNodeId.toString(),e.nextNodeId++,t.setAttribute("NodeId",n)),n}t.createCustomData=function(){return{dict:{},nextNodeId:1}},t.setObject=function(e,t,n,o){if(1==t.nodeType){var i=r(e,t);""!=i&&(e.dict[i]||(e.dict[i]={}),e.dict[i][n]=o)}},t.getObject=function(e,t,n){if(1==t.nodeType){var o=r(e,t);if(""!=o)return e.dict[o]&&e.dict[o][n]}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLevelLists=void 0,t.createLevelLists=function(){return{listsMetadata:{},currentUniqueListId:-1}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createEditor=void 0;var i=n(107);Object.defineProperty(t,"createEditor",{enumerable:!0,get:function(){return i.default}}),o(n(280),t),o(n(0),t),o(n(53),t),o(n(6),t),o(n(85),t),o(n(82),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(53),o=n(82),i=n(85);t.default=function(e,t,n){var a=[new i.HyperLink,new i.Paste,new i.ContentEdit];t&&(a=a.concat(t));var l={plugins:a,initialContent:n,getDarkColor:o.getDarkColor,defaultFormat:{fontFamily:"Calibri,Arial,Helvetica,sans-serif",fontSize:"11pt",textColor:"#000000"}};return new r.Editor(e,l)}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(109),i=n(163),a=n(0),l=function(){function e(e,t){var n=this;if(void 0===t&&(t={}),"DIV"!=(0,a.getTagOfNode)(e))throw new Error("contentDiv must be an HTML DIV element");var l=(0,i.default)(e,t),s=[];Object.keys(l).forEach((function(e){"_placeholder"==e?(0,a.arrayPush)(s,t.plugins):s.push(l[e])}));var u=t.zoomScale>0?t.zoomScale:1;this.core=r(r({contentDiv:e,api:r(r({},o.coreApiMap),t.coreApiOverride||{}),plugins:s.filter((function(e){return!!e}))},(0,i.getPluginState)(l)),{trustedHTMLHandler:t.trustedHTMLHandler||function(e){return e},zoomScale:u,sizeTransformer:t.sizeTransformer||function(e){return e/u}}),this.core.plugins.forEach((function(e){return e.initialize(n)})),this.ensureTypeInContainer(new a.Position(this.core.contentDiv,0).normalize())}return e.prototype.dispose=function(){for(var e=this.core.plugins.length-1;e>=0;e--)this.core.plugins[e].dispose();this.core=null},e.prototype.isDisposed=function(){return!this.core},e.prototype.insertNode=function(e,t){return!!e&&this.core.api.insertNode(this.core,e,t)},e.prototype.deleteNode=function(e){return!(!e||!this.contains(e))&&(e.parentNode.removeChild(e),!0)},e.prototype.replaceNode=function(e,t,n){return!(!this.contains(e)||!t)&&(this.core.api.transformColor(this.core,n?t:null,!0,(function(){return e.parentNode.replaceChild(t,e)}),0),!0)},e.prototype.getBlockElementAtNode=function(e){return(0,a.getBlockElementAtNode)(this.core.contentDiv,e)},e.prototype.contains=function(e){return(0,a.contains)(this.core.contentDiv,e)},e.prototype.queryElements=function(e,t,n){var r=this;void 0===t&&(t=0);var o=[],i=t instanceof Function?0:t;n=t instanceof Function?t:n;var l=0==i?null:this.getSelectionRangeEx();return l?(l.ranges.forEach((function(t){o.push.apply(o,(0,a.queryElements)(r.core.contentDiv,e,n,i,t))})),o):(0,a.queryElements)(this.core.contentDiv,e,n,i,null)},e.prototype.collapseNodes=function(e,t,n){return(0,a.collapseNodes)(this.core.contentDiv,e,t,n)},e.prototype.isEmpty=function(e){return(0,a.isNodeEmpty)(this.core.contentDiv,e)},e.prototype.getContent=function(e){return void 0===e&&(e=0),this.core.api.getContent(this.core,e)},e.prototype.setContent=function(e,t){void 0===t&&(t=!0),this.core.api.setContent(this.core,e,t)},e.prototype.insertContent=function(e,t){var n;if(e){var r=this.getDocument(),o=null===(n=(new DOMParser).parseFromString(this.core.trustedHTMLHandler(e),"text/html"))||void 0===n?void 0:n.body,i=(null==o?void 0:o.childNodes)?(0,a.toArray)(o.childNodes):[];t&&t.insertOnNewLine&&i.length>1&&(i=[(0,a.wrap)(i)]);var l=r.createDocumentFragment();i.forEach((function(e){return l.appendChild(e)})),this.insertNode(l,t)}},e.prototype.deleteSelectedContent=function(){var e=this.getSelectionRange();return e&&!e.collapsed&&(0,a.deleteSelectedContent)(this.core.contentDiv,e)},e.prototype.paste=function(e,t,n){var r=this;if(e){e.snapshotBeforePaste?this.setContent(e.snapshotBeforePaste):e.snapshotBeforePaste=this.getContent(2);var o=this.getSelectionRange(),i=o&&a.Position.getStart(o),l=this.core.api.createPasteFragment(this.core,e,i,t,n);this.addUndoSnapshot((function(){return r.insertNode(l),e}),"Paste")}},e.prototype.getSelectionRange=function(e){return void 0===e&&(e=!0),this.core.api.getSelectionRange(this.core,e)},e.prototype.getSelectionRangeEx=function(){return this.core.api.getSelectionRangeEx(this.core)},e.prototype.getSelectionPath=function(){var e=this.getSelectionRange();return e&&(0,a.getSelectionPath)(this.core.contentDiv,e)},e.prototype.hasFocus=function(){return this.core.api.hasFocus(this.core)},e.prototype.focus=function(){this.core.api.focus(this.core)},e.prototype.select=function(e,t,n,r){var o;if(null===(o=e)||void 0===o?void 0:o.rows){var i=this.core.api.selectTable(this.core,e,t);return this.core.domEvent.tableSelectionRange=i,!!i}this.core.api.selectTable(this.core,null),this.core.domEvent.tableSelectionRange=null;var l=e?(0,a.safeInstanceOf)(e,"Range")?e:Array.isArray(e.start)&&Array.isArray(e.end)?(0,a.createRange)(this.core.contentDiv,e.start,e.end):(0,a.createRange)(e,t,n,r):null;return this.contains(l)&&this.core.api.selectRange(this.core,l)},e.prototype.getFocusedPosition=function(){var e,t=null===(e=this.getDocument().defaultView)||void 0===e?void 0:e.getSelection();if(this.contains(t&&t.focusNode))return new a.Position(t.focusNode,t.focusOffset);var n=this.getSelectionRange();return n?a.Position.getStart(n):null},e.prototype.getElementAtCursor=function(e,t,n){var r=this;return n=t?null:n,(0,a.cacheGetEventData)(n,"GET_ELEMENT_AT_CURSOR_"+e,(function(){if(!t){var n=r.getFocusedPosition();t=n&&n.node}return t&&(0,a.findClosestElementAncestor)(t,r.core.contentDiv,e)}))},e.prototype.isPositionAtBeginning=function(e){return(0,a.isPositionAtBeginningOf)(e,this.core.contentDiv)},e.prototype.getSelectedRegions=function(e){var t=this;void 0===e&&(e=0);var n=this.getSelectionRangeEx(),r=[];return n.ranges.forEach((function(n){r.push.apply(r,n?(0,a.getRegionsFromRange)(t.core.contentDiv,n,e):[])})),r.filter((function(e,t,n){return n.indexOf(e)===t}))},e.prototype.addDomEventHandler=function(e,t){var n,r="string"==typeof e?((n={})[e]=t,n):e;return this.core.api.attachDomEvent(this.core,r)},e.prototype.triggerPluginEvent=function(e,t,n){var o=r({eventType:e},t);return this.core.api.triggerEvent(this.core,o,n),o},e.prototype.triggerContentChangedEvent=function(e,t){void 0===e&&(e="SetContent"),this.triggerPluginEvent(7,{source:e,data:t})},e.prototype.undo=function(){this.focus(),this.core.api.restoreUndoSnapshot(this.core,-1)},e.prototype.redo=function(){this.focus(),this.core.api.restoreUndoSnapshot(this.core,1)},e.prototype.addUndoSnapshot=function(e,t,n){this.core.api.addUndoSnapshot(this.core,e,t,n)},e.prototype.getUndoState=function(){var e=this.core.undo,t=e.hasNewContent,n=e.snapshotsService;return{canUndo:t||n.canMove(-1),canRedo:n.canMove(1)}},e.prototype.getDocument=function(){return this.core.contentDiv.ownerDocument},e.prototype.getScrollContainer=function(){return this.core.domEvent.scrollContainer},e.prototype.getCustomData=function(e,t,n){return(this.core.lifecycle.customData[e]=this.core.lifecycle.customData[e]||{value:t?t():void 0,disposer:n}).value},e.prototype.isInIME=function(){return this.core.domEvent.isInIME},e.prototype.getDefaultFormat=function(){return this.core.lifecycle.defaultFormat},e.prototype.getBodyTraverser=function(e){return a.ContentTraverser.createBodyTraverser(this.core.contentDiv,e)},e.prototype.getSelectionTraverser=function(e){return(e=null!=e?e:this.getSelectionRange())&&a.ContentTraverser.createSelectionTraverser(this.core.contentDiv,e)},e.prototype.getBlockTraverser=function(e){void 0===e&&(e=3);var t=this.getSelectionRange();return t&&a.ContentTraverser.createBlockTraverser(this.core.contentDiv,t,e)},e.prototype.getContentSearcherOfCursor=function(e){var t=this;return(0,a.cacheGetEventData)(e,"ContentSearcher",(function(){var e=t.getSelectionRange();return e&&new a.PositionContentSearcher(t.core.contentDiv,a.Position.getStart(e))}))},e.prototype.runAsync=function(e){var t=this,n=this.core.contentDiv.ownerDocument.defaultView||window,r=n.requestAnimationFrame((function(){!t.isDisposed()&&e&&e(t)}));return function(){n.cancelAnimationFrame(r)}},e.prototype.setEditorDomAttribute=function(e,t){null===t?this.core.contentDiv.removeAttribute(e):this.core.contentDiv.setAttribute(e,t)},e.prototype.getEditorDomAttribute=function(e){return this.core.contentDiv.getAttribute(e)},e.prototype.getRelativeDistanceToEditor=function(e,t){if(this.contains(e)){var n=this.core.contentDiv,r=n.getBoundingClientRect(),o=e.getBoundingClientRect();if(r&&o){var i=o.left-(null==r?void 0:r.left),a=o.top-(null==r?void 0:r.top);return t&&(i+=n.scrollLeft,a+=n.scrollTop),[i,a]}}return null},e.prototype.addContentEditFeature=function(e){var t=this;null==e||e.keys.forEach((function(n){var r=t.core.edit.features[n]||[];r.push(e),t.core.edit.features[n]=r}))},e.prototype.getStyleBasedFormatState=function(e){if(!e){var t=this.getSelectionRange();e=t&&a.Position.getStart(t).normalize().node}return this.core.api.getStyleBasedFormatState(this.core,e)},e.prototype.getPendableFormatState=function(e){return this.core.api.getPendableFormatState(this.core,e)},e.prototype.ensureTypeInContainer=function(e,t){this.core.api.ensureTypeInContainer(this.core,e,t)},e.prototype.setDarkModeState=function(e){this.isDarkMode()!=!!e&&(this.core.api.transformColor(this.core,this.core.contentDiv,!1,null,e?0:1,!0),this.triggerContentChangedEvent(e?"SwitchToDarkMode":"SwitchToLightMode"))},e.prototype.isDarkMode=function(){return this.core.lifecycle.isDarkMode},e.prototype.transformToDarkColor=function(e){this.core.api.transformColor(this.core,e,!0,null,0)},e.prototype.startShadowEdit=function(){this.core.api.switchShadowEdit(this.core,!0)},e.prototype.stopShadowEdit=function(){this.core.api.switchShadowEdit(this.core,!1)},e.prototype.isInShadowEdit=function(){return!!this.core.lifecycle.shadowEditFragment},e.prototype.isFeatureEnabled=function(e){return this.core.lifecycle.experimentalFeatures.indexOf(e)>=0},e.prototype.getTrustedHTMLHandler=function(){return this.core.trustedHTMLHandler},e.prototype.getSizeTransformer=function(){return this.core.sizeTransformer},e.prototype.getZoomScale=function(){return this.core.zoomScale},e.prototype.setZoomScale=function(e){if(e>0&&e<=10){var t=this.core.zoomScale;this.core.zoomScale=e,t!=e&&this.triggerPluginEvent(21,{oldZoomScale:t,newZoomScale:e},!0)}},e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coreApiMap=void 0;var r=n(110),o=n(146),i=n(147),a=n(148),l=n(149),s=n(150),u=n(151),c=n(152),d=n(153),f=n(154),h=n(81),p=n(155),g=n(156),v=n(157),m=n(158),y=n(159),b=n(160),E=n(161),C=n(162);t.coreApiMap={attachDomEvent:o.attachDomEvent,addUndoSnapshot:r.addUndoSnapshot,createPasteFragment:i.createPasteFragment,ensureTypeInContainer:a.ensureTypeInContainer,focus:l.focus,getContent:s.getContent,getSelectionRange:c.getSelectionRange,getSelectionRangeEx:d.getSelectionRangeEx,getStyleBasedFormatState:f.getStyleBasedFormatState,getPendableFormatState:u.getPendableFormatState,hasFocus:h.hasFocus,insertNode:p.insertNode,restoreUndoSnapshot:g.restoreUndoSnapshot,selectRange:v.selectRange,setContent:y.setContent,switchShadowEdit:b.switchShadowEdit,transformColor:E.transformColor,triggerEvent:C.triggerEvent,selectTable:m.selectTable}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.addUndoSnapshot=void 0;var o=n(0);function i(e,t){if(!e.lifecycle.shadowEditFragment){var n=e.api.getSelectionRangeEx(e),i=e.lifecycle.isDarkMode,a=1==(null==n?void 0:n.type)?r({type:1,tableId:n.table.id,isDarkMode:i},n.coordinates):r({type:0,isDarkMode:i,start:[],end:[]},(0,o.getSelectionPath)(e.contentDiv,n.ranges[0])||{});e.undo.snapshotsService.addSnapshot({html:e.contentDiv.innerHTML,metadata:a},t),e.undo.hasNewContent=!1}}t.addUndoSnapshot=function(e,t,n,r){var a,l=e.undo,s=l.isNested;s||(l.isNested=!0,i(e,r));try{var u;if(t)a=t((u=e.api.getSelectionRange(e,!0))&&o.Position.getStart(u).normalize(),u&&o.Position.getEnd(u).normalize()),s||i(e,!1)}finally{s||(l.isNested=!1)}if(t&&n){var c={eventType:7,source:n,data:a};e.api.triggerEvent(e,c,!0)}r&&((u=e.api.getSelectionRange(e,!1))&&(e.undo.hasNewContent=!1,e.undo.autoCompletePosition=o.Position.getStart(u)))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=n(3),i=n(9),a=n(2),l=n(19),s=n(14),u=n(12),c=n(13),d=["TD","TH","LI","BLOCKQUOTE"],f=function(){function e(e,t,n){this.rootNode=e,this.startNode=t,this.endNode=n}return e.getBlockContext=function(e){for(var t=e;t&&!(0,l.default)(t);)t=t.parentNode;return t},e.prototype.collapseToSingleElement=function(){for(var t=e.getBlockContext(this.startNode),n=t?(0,r.default)(t,this.startNode,this.endNode,!0):[],o=e.getBlockContext(this.startNode);n[0]&&n[0]!=o&&n[0].parentNode!=this.rootNode&&d.indexOf((0,a.default)(n[0].parentNode))<0;)n=[(0,c.splitBalancedNodeRange)(n)];return 1==n.length&&(0,l.default)(n[0])?n[0]:(0,u.default)(n)},e.prototype.getStartNode=function(){return this.startNode},e.prototype.getEndNode=function(){return this.endNode},e.prototype.equals=function(e){return this.startNode==e.getStartNode()&&this.endNode==e.getEndNode()},e.prototype.isAfter=function(e){return(0,s.default)(this.getStartNode(),e.getEndNode())},e.prototype.contains=function(e){return(0,o.default)(this.startNode,e,!0)||(0,o.default)(this.endNode,e,!0)||(0,s.default)(e,this.startNode)&&(0,s.default)(this.endNode,e)},e.prototype.getTextContent=function(){var e=(0,i.default)(this.getStartNode(),this.getEndNode());return e?e.toString():""},e}();t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(7),i=n(57),a=n(15),l=n(59),s=function(){function e(e,t){this.rootNode=e,this.startNode=(0,r.default)(e,t)?t:null}return e.prototype.getStartBlockElement=function(){return this.startNode?(0,o.default)(this.rootNode,this.startNode):(0,i.default)(this.rootNode,!0)},e.prototype.getStartInlineElement=function(){return this.startNode?(0,a.default)(this.rootNode,this.startNode):(0,l.getFirstInlineElement)(this.rootNode)},e.prototype.isBlockInScope=function(e){return(0,r.default)(this.rootNode,e.getStartNode())},e.prototype.trimInlineElement=function(e){return e},e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(61),o=n(7),i=n(15),a=n(54),l=n(4),s=n(1),u=n(41),c=n(59),d=function(){function e(e,t,n){this.rootNode=e,this.startFrom=n,t=(0,s.default)(t,"Range")?l.default.getStart(t):t,this.position=t.normalize(),this.block=(0,o.default)(this.rootNode,this.position.node)}return e.prototype.getStartBlockElement=function(){return this.block},e.prototype.getStartInlineElement=function(){if(this.block)switch(this.startFrom){case 0:case 1:case 2:return function(e,t){if(e instanceof a.default){var n=e.getStartNode();return t?(0,c.getFirstInlineElement)(n):(0,c.getLastInlineElement)(n)}return(0,i.default)(e,t?e.getStartNode():e.getEndNode())}(this.block,0==this.startFrom);case 3:var e=(0,u.getInlineElementAfter)(this.rootNode,this.position);return e&&this.block.contains(e.getContainerNode())?e:new r.default(this.position,this.block)}return null},e.prototype.isBlockInScope=function(e){return!(!this.block||!e)&&this.block.equals(e)},e.prototype.trimInlineElement=function(e){return this.block&&e&&this.block.contains(e.getContainerNode())?e:null},e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),o=n(29),i=n(4),a=n(41),l=function(){function e(e,t){this.rootNode=e,this.startBlock=null,this.startInline=null,this.start=i.default.getStart(t).normalize(),this.end=i.default.getEnd(t).normalize()}return e.prototype.getStartBlockElement=function(){return this.startBlock||(this.startBlock=(0,r.default)(this.rootNode,this.start.node)),this.startBlock},e.prototype.getStartInlineElement=function(){return this.startInline||(this.startInline=this.trimInlineElement((0,a.getInlineElementAfter)(this.rootNode,this.start))),this.startInline},e.prototype.isBlockInScope=function(e){if(!e)return!1;var t=!1,n=this.getStartBlockElement();if(this.start.equalTo(this.end))t=!!n&&n.equals(e);else{var o=(0,r.default)(this.rootNode,this.end.node);t=!!n&&!!o&&(e.equals(n)||e.equals(o)||e.isAfter(n)&&o.isAfter(e))}return t},e.prototype.trimInlineElement=function(e){if(!e||this.start.equalTo(this.end))return null;var t=e.getStartPosition(),n=e.getEndPosition();if(t.isAfter(this.end)||this.start.isAfter(n))return null;var r=!1,i=!1;return this.start.isAfter(t)&&(t=this.start,r=!0),n.isAfter(this.end)&&(n=this.end,i=!0),t.isAfter(n)||t.equalTo(n)?null:r||i?new o.default(e,r?t:void 0,i?n:void 0):e},e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(63),o=n(64),i=n(5);t.default=function(e,t,n){var a,l=e.clipboardData||(null===(a=e.target.ownerDocument)||void 0===a?void 0:a.defaultView).clipboardData;l.items?(e.preventDefault(),(0,r.default)((0,i.default)(l.items),n).then(t)):(0,o.default)(l,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(44);t.default=function(e,t,n){if(t){var o=e.style,i=t.fontFamily,a=t.fontSize,l=t.textColor,s=t.textColors,u=t.backgroundColor,c=t.backgroundColors,d=t.bold,f=t.italic,h=t.underline;i&&(o.fontFamily=i),a&&(o.fontSize=a),s?(0,r.default)(e,s,!1,n):l&&(0,r.default)(e,l,!1,n),c?(0,r.default)(e,c,!0,n):u&&(0,r.default)(e,u,!0,n),d&&(o.fontWeight="bold"),f&&(o.fontStyle="italic"),h&&(o.textDecoration="underline")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PendableFormatCommandMap=void 0,t.PendableFormatCommandMap={isBold:"bold",isItalic:"italic",isUnderline:"underline",isStrikeThrough:"strikeThrough",isSubscript:"subscript",isSuperscript:"superscript"},t.default=function(e){return Object.keys(t.PendableFormatCommandMap).reduce((function(n,r){return n[r]=e.queryCommandState(t.PendableFormatCommandMap[r]),n}),{})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=/^[^?]+%[^0-9a-f]+|^[^?]+%[0-9a-f][^0-9a-f]+|^[^?]+%00|^[^?]+%$|^https?:\/\/[^?\/]+@|^www\.[^?\/]+@/i,o="(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\:[0-9]+)?(?:[\\/\\?]\\S*)?",i={http:{match:new RegExp("^(?:microsoft-edge:)?http:\\/\\/"+o+"|www\\."+o,"i"),except:r,normalizeUrl:function(e){return new RegExp("^(?:microsoft-edge:)?http:\\/\\/","i").test(e)?e:"http://"+e}},https:{match:new RegExp("^(?:microsoft-edge:)?https:\\/\\/"+o,"i"),except:r},mailto:{match:new RegExp("^mailto:\\S+@\\S+\\.\\S+","i")},notes:{match:new RegExp("^notes:\\/\\/\\S+","i")},file:{match:new RegExp("^file:\\/\\/\\/?\\S+","i")},unc:{match:new RegExp("^\\\\\\\\\\S+","i")},ftp:{match:new RegExp("^ftp:\\/\\/"+o+"|ftp\\."+o,"i"),normalizeUrl:function(e){return new RegExp("^ftp:\\/\\/","i").test(e)?e:"ftp://"+e}},news:{match:new RegExp("^news:(\\/\\/)?"+o,"i")},telnet:{match:new RegExp("^telnet:(\\/\\/)?"+o,"i")},gopher:{match:new RegExp("^gopher:\\/\\/"+o,"i")},wais:{match:new RegExp("^wais:(\\/\\/)?"+o,"i")}};t.default=function(e){if(e)for(var t=0,n=Object.keys(i);t<n.length;t++){var r=n[t],o=i[r],a=e.match(o.match);if(a&&a[0]==e&&(!o.except||!o.except.test(e)))return{scheme:r,originalUrl:e,normalizedUrl:o.normalizeUrl?o.normalizeUrl(e):e}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=n(44),i="transparent";function a(e){return!!e.td&&!!e.td.dataset.cellShade}function l(e){return"solid 1px "+(e||"transparent")}t.default=function(e,t,n){n&&(e.style.borderCollapse="collapse",function(e,t){e.forEach((function(n,r){n.forEach((function(o,a){o.td&&function(e,t,n,r,o,a){switch(function(e,t){e.style.borderTop=l(t.topBorderColor),e.style.borderLeft=l(t.verticalBorderColor),e.style.borderRight=l(t.verticalBorderColor),e.style.borderBottom=l(t.bottomBorderColor)}(t,e),e.tableBorderFormat){case 0:return;case 1:o||(t.style.borderLeftColor=i),a||(t.style.borderRightColor=i);break;case 4:n||(t.style.borderTopColor=i),r||n||(t.style.borderBottomColor=i),o||(t.style.borderLeftColor=i),a||o||(t.style.borderRightColor=i),o&&n&&(t.style.borderRightColor=i);break;case 2:n&&(t.style.borderTopColor=i,t.style.borderRightColor=i,t.style.borderLeftColor=i),o&&(t.style.borderLeftColor=i),a&&(t.style.borderRightColor=i);break;case 3:o&&(t.style.borderLeftColor=i),a&&(t.style.borderRightColor=i);break;case 5:n&&(t.style.borderRightColor=i,t.style.borderLeftColor=i),o&&(t.style.borderBottomColor=i,t.style.borderTopColor=i),n&&o&&(t.style.borderLeftColor=e.verticalBorderColor||i,t.style.borderBottomColor=e.bottomBorderColor||i,t.style.borderTopColor=e.topBorderColor||i);break;case 6:n&&(t.style.borderRightColor=i,t.style.borderLeftColor=i),o&&(t.style.borderBottomColor=i,t.style.borderTopColor=i),n&&o&&(t.style.borderLeftColor=e.verticalBorderColor||i,t.style.borderBottomColor=e.bottomBorderColor||i,t.style.borderTopColor=e.topBorderColor||i),n||o||(t.style.borderLeftColor=i,t.style.borderBottomColor=i,t.style.borderTopColor=i,t.style.borderRightColor=i);break;case 7:n&&(t.style.borderLeftColor=i,t.style.borderTopColor=i,t.style.borderRightColor=i),o&&(t.style.borderLeftColor=i,t.style.borderTopColor=i,t.style.borderBottomColor=i),n||o||(t.style.borderLeftColor=i,t.style.borderBottomColor=i,t.style.borderTopColor=i,t.style.borderRightColor=i),n&&o&&(t.style.borderBottomColor=e.bottomBorderColor||i)}}(t,o.td,0===r,r===e.length-1,0===a,a===n.length-1)}))}))}(t,n),function(e,t){var n=function(e){return e%2==0?t.bgColorEven:t.bgColorOdd},r=t.hasBandedRows,l=t.hasBandedColumns,s=t.bgColorOdd,u=t.bgColorEven,c=!r&&s===u;e.forEach((function(e,l){e.forEach((function(e){if(e.td&&!a(e))if(r){var s=n(l);(0,o.default)(e.td,s||i,!0,!0)}else c?(0,o.default)(e.td,t.bgColorOdd||i,!0):(0,o.default)(e.td,i,!0,!0)}))})),l&&e.forEach((function(e){e.forEach((function(e,t){var r=n(t);e.td&&r&&!a(e)&&(0,o.default)(e.td,r,!0,!0)}))}))}(t,n),function(e,t){if(!t.hasFirstColumn)return void e.forEach((function(e){e.forEach((function(e,t){e.td&&0===t&&(e.td=(0,r.default)(e.td,"TD"),e.td.scope="")}))}));e.forEach((function(t,n){t.forEach((function(t,l){t.td&&0===l&&(0===n||a(t)||(t.td.style.borderTopColor=i,(0,o.default)(t.td,i,!0,!0)),n!==e.length-1&&0!==n&&(t.td.style.borderBottomColor=i),t.td=(0,r.default)(t.td,"TH"),t.td.scope="col")}))}))}(t,n),function(e,t){var n,i;if(!t.hasHeaderRow)return void(null===(n=e[0])||void 0===n||n.forEach((function(e){e.td&&(e.td=(0,r.default)(e.td,"TD"),e.td.scope="")})));null===(i=e[0])||void 0===i||i.forEach((function(e){e.td&&t.headerRowColor&&(a(e)||(0,o.default)(e.td,t.headerRowColor,!0,!0),e.td.style.borderRightColor=t.headerRowColor,e.td.style.borderLeftColor=t.headerRowColor,e.td.style.borderTopColor=t.headerRowColor,e.td=(0,r.default)(e.td,"TH"),e.td.scope="row")}))}(t,n))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.saveTableInfo=t.getTableFormatInfo=void 0;t.getTableFormatInfo=function(e){var t=function(e){if(!e)return null;try{return JSON.parse(e)}catch(e){return null}}(null==e?void 0:e.dataset.roosterTableInfo);return function(e){if(!e)return!1;var t=e.topBorderColor,n=e.verticalBorderColor,r=e.bottomBorderColor,o=e.bgColorOdd,i=e.bgColorEven,a=e.hasBandedColumns,l=e.hasBandedRows,s=e.hasFirstColumn,u=e.hasHeaderRow,c=e.tableBorderFormat,d=[a,l,s,u];if([t,n,r,o,i].some((function(e){return!function(e){if(null==e||"string"==typeof e)return!0;return!1}(e)}))||d.some((function(e){return!function(e){if("boolean"==typeof e)return!0;return!1}(e)}))||!function(e){if(-1<e&&e<8)return!0;return!1}(c))return!1;return!0}(t)?t:null},t.saveTableInfo=function(e,t){e&&t&&(e.dataset.roosterTableInfo=JSON.stringify(t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!t||!e.cells)return!1;var n=t.firstCell,r=t.lastCell,o=e.cells.length-1,i=e.cells[o].length-1,a=n.x,l=n.y,s=r.x,u=r.y;return 0==a&&0==l&&s==i&&u==o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),o=n(69),i=n(70),a=n(24),l=n(4),s=n(1),u=n(23),c=n(5),d=n(46),f=n(12),h=n(8),p=n(47);function g(e,t,n){var r=t[n?t.length-1:0];r=(0,h.getLeafSibling)(e.rootNode,r,n,e.skipTags,!0),r=(0,o.default)(e,"ol,ul",r),(0,a.default)(e,r)&&(0,p.isListElement)(r)&&(n?(0,s.default)(r,"HTMLOListElement")&&1!=r.start||t.push(r):t.unshift(r))}t.default=function(e,t,n){if(!e)return null;var a=[];if(n){var h=(0,o.default)(e,"ol,ul",n);h&&a.push(h)}else{if((0,i.default)(e).forEach((function(n){var r=(0,o.default)(e,"ol,ul",n.getStartNode());r?(a[a.length-1]!=r&&a.push(r),1==a.length&&(0,s.default)(r,"HTMLOListElement")&&r.start>1&&(t=!1)):a.push(n.collapseToSingleElement())})),0==a.length&&!e.rootNode.firstChild){var v=(0,r.default)(1,e.rootNode.ownerDocument);e.rootNode.appendChild(v),a.push(v),e.fullSelectionStart=new l.default(v,0),e.fullSelectionEnd=new l.default(v,-1)}t&&(g(e,a,!1),g(e,a,!0)),a=a.filter((function(e){return!(0,u.default)(e,!0)}))}var m=null;if(a.length>0){var y=a.shift()||null;(m=(0,p.isListElement)(y)?new d.default(y):y?function(e){var t=(0,c.default)(e.childNodes),n=1==t.length?t[0]:(0,f.default)(t,"SPAN"),r=e.ownerDocument.createElement("ol");e.appendChild(r);var o=new d.default(r);return o.appendItem(n,0),o}(y):null)&&a.forEach((function(e){(0,p.isListElement)(e)?m.mergeVList(new d.default(e)):m.appendItem(e,0)}))}return m}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(43),o=n(69),i=n(14),a=n(24),l=n(17),s=n(46),u=0,c=function(){function e(e,t){this.region=e,this.name=t,this.lastNumber=0,this.lastNumberBeforeCursor=0}return e.createListChains=function(t,n,a){var s=Array.isArray(t)?t:t?[t]:[],u=[];return s.forEach((function(t){var s,c=[];(0,l.default)(t.rootNode,"ol",(function(r){var l=(0,o.default)(t,"ol",r);if(s!=l){var u=c.filter((function(e){return e.canAppendToTail(l)}))[0]||new e(t,(a||d)()),f=c.indexOf(u),h=!!n&&(0,i.default)(l,n);h?f<0&&c.push(u):(f>=0&&c.splice(f,1),c.unshift(u)),u.append(l,h),s=l}})),(0,r.default)(u,c)})),u},e.prototype.canAppendAtCursor=function(e){return e>1&&this.lastNumberBeforeCursor+1==e},e.prototype.createVListAtBlock=function(e,t){if(e&&e.parentNode){var n=e.ownerDocument.createElement("ol");n.start=t,this.applyChainName(n),e.parentNode.insertBefore(n,e);var r=new s.default(n);return r.appendItem(e,0),r}return null},e.prototype.commit=function(){for(var e=this.getLists(),t=0,n=0;n<e.length;n++){var r=e[n];r.start=t+1;var o=new s.default(r);t=o.getLastItemNumber()||0,delete r.dataset.listchain,delete r.dataset.listchainafter,o.writeBack()}},e.prototype.canAppendToTail=function(e){return this.lastNumber+1==e.start},e.prototype.append=function(e,t){this.applyChainName(e),this.lastNumber=new s.default(e).getLastItemNumber()||0,t?e.dataset.listchainafter="true":this.lastNumberBeforeCursor=this.lastNumber},e.prototype.applyChainName=function(e){e.dataset.listchain=this.name},e.prototype.getLists=function(){var e=this;return(0,l.default)(this.region.rootNode,"ol[data-listchain="+this.name+"]").filter((function(t){return(0,a.default)(e.region,t)}))},e}();function d(){return"__List_Chain_"+u++}t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),o=n(9),i=n(45);t.default=function(e){var t;if(!e)return null;var n=(0,o.default)(e),a=n.getBoundingClientRect&&(0,i.default)(n.getBoundingClientRect());if(a)return a;e=e.normalize();var l=n.getClientRects&&n.getClientRects();if(a=l&&1==l.length?(0,i.default)(l[0]):null)return a;if(3==e.node.nodeType&&e.node.ownerDocument){var s=(0,r.default)({tag:"span",children:["​"]},e.node.ownerDocument);if((n=(0,o.default)(e)).insertNode(s),a=s.getBoundingClientRect&&(0,i.default)(s.getBoundingClientRect()),null===(t=s.parentNode)||void 0===t||t.removeChild(s),a)return a}var u=e.element;return u&&u.getBoundingClientRect&&(a=(0,i.default)(u.getBoundingClientRect()))?a:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),o=n(76);t.default=function(e,t){if(!e)return"";var n=(0,r.default)(e),i=t&&(0,o.default)(e,t);return i?n+"\x3c!--"+JSON.stringify(i)+"--\x3e":n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setHtmlWithMetadata=void 0;var r=n(9),o=n(1);function i(e,t,n){if(e){t=t||"",e.innerHTML=(null==n?void 0:n(t))||t;var r=e.lastChild;if((0,o.default)(r,"Comment"))try{var i=JSON.parse(r.nodeValue||"");if(function(e){if(!e||"object"!=typeof e)return!1;switch(e.type||0){case 0:var t=e;if(a(t.start)&&a(t.end))return e.type=0,e.isDarkMode=!!e.isDarkMode,!0;break;case 1:var n=e;if("string"==typeof n.tableId&&n.tableId&&l(n.firstCell)&&l(n.lastCell))return e.isDarkMode=!!e.isDarkMode,!0}return!1}(i))return e.removeChild(r),i}catch(e){}}}function a(e){return e&&Array.isArray(e)&&e.every((function(e){return"number"==typeof e}))}function l(e){var t=e;return t&&"object"==typeof t&&"number"==typeof t.x&&"number"==typeof t.y}t.default=function(e,t,n){var o=i(e,t,n);return 0==(null==o?void 0:o.type)?(0,r.default)(e,o.start,o.end):null},t.setHtmlWithMetadata=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(21);t.default=function(e,t){var n,o,i,a=null===(i=null===(o=null===(n=null==e?void 0:e.commonAncestorContainer)||void 0===n?void 0:n.ownerDocument)||void 0===o?void 0:o.defaultView)||void 0===i?void 0:i.getSelection();if(a){var l=!0;if(a.rangeCount>0)try{var s=null;(t||r.Browser.isEdge)&&(s=1==a.rangeCount?a.getRangeAt(0):null)&&s.startContainer==e.startContainer&&s.startOffset==e.startOffset&&s.endContainer==e.endContainer&&s.endOffset==e.endOffset?l=!1:a.removeAllRanges()}catch(e){}l&&a.addRange(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSnapshotV2=void 0;var r=n(77);function o(e,t,n,o,i){o=o||function(e){var t;return(null===(t=e)||void 0===t?void 0:t.length)||0},i=i||a;var l=e.snapshots[e.currentIndex];if(e.currentIndex<0||!l||!i(t,l)){(0,r.default)(e,o),e.snapshots.push(t),e.currentIndex++,e.totalSize+=o(t);for(var s=0;s<e.snapshots.length&&e.totalSize>e.maxSize;)e.totalSize-=o(e.snapshots[s]),s++;s>0&&(e.snapshots.splice(0,s),e.currentIndex-=s,e.autoCompleteIndex-=s),n&&(e.autoCompleteIndex=e.currentIndex)}}function i(e,t){return e.html==t.html}function a(e,t){return e==t}t.default=o,t.addSnapshotV2=function(e,t,n){o(e,t,n,(function(e){var t;return(null===(t=e.html)||void 0===t?void 0:t.length)||0}),i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.moveCurrentSnapsnot=void 0;var r=n(49);function o(e,t){return(0,r.default)(e,t)?(e.currentIndex+=t,e.autoCompleteIndex=-1,e.snapshots[e.currentIndex]):null}t.default=o,t.moveCurrentSnapsnot=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{snapshots:[],totalSize:0,currentIndex:-1,autoCompleteIndex:-1,maxSize:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.autoCompleteIndex>=0&&e.currentIndex-e.autoCompleteIndex==1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=n(78),i=n(74),a=n(33),l=n(2),s=n(1),u=n(34),c=n(5),d=n(79),f=n(133),h=function(){function e(e){e=e||{},this.elementCallbacks=(0,d.cloneObject)(e.elementCallbacks),this.styleCallbacks=(0,f.getStyleCallbacks)(e.cssStyleCallbacks),this.attributeCallbacks=(0,d.cloneObject)(e.attributeCallbacks),this.tagReplacements=(0,f.getTagReplacement)(e.additionalTagReplacements),this.allowedAttributes=(0,f.getAllowedAttributes)(e.additionalAllowedAttributes),this.allowedCssClassesRegex=(0,f.getAllowedCssClassesRegex)(e.additionalAllowedCssClasses),this.defaultStyleValues=(0,f.getDefaultStyleValues)(e.additionalDefaultStyleValues),this.additionalPredefinedCssForElement=e.additionalPredefinedCssForElement||null,this.additionalGlobalStyleNodes=e.additionalGlobalStyleNodes||[],this.preserveHtmlComments=e.preserveHtmlComments||!1,this.unknownTagReplacement=e.unknownTagReplacement||null}return e.convertInlineCss=function(t,n){return new e({additionalGlobalStyleNodes:n}).exec(t,!0)},e.sanitizeHtml=function(t,n){var r=new e(n=n||{}),i=(0,s.default)(n.currentElementOrStyle,"HTMLElement")?(0,o.default)(n.currentElementOrStyle):n.currentElementOrStyle;return r.exec(t,n.convertCssOnly,i)},e.prototype.exec=function(e,t,n){var r=(new DOMParser).parseFromString(e||"","text/html");return r&&r.body&&r.body.firstChild&&(this.convertGlobalCssToInlineCss(r),t||this.sanitize(r.body,n)),r&&r.body&&r.body.innerHTML||""},e.prototype.sanitize=function(e,t){if(!e)return"";t=(0,d.cloneObject)(t,(0,o.default)(null)),this.processNode(e,t,{})},e.prototype.convertGlobalCssToInlineCss=function(e){for(var t=(0,c.default)(e.querySelectorAll("style")),n=0,r=this.additionalGlobalStyleNodes.reverse().map((function(e){return e.sheet})).concat(t.map((function(e){return e.sheet})).reverse()).filter((function(e){return e}));n<r.length;n++)for(var o=r[n],i=function(t){var n=o.cssRules[t],r=n&&n.style?n.style.cssText:null;if(n.type!=CSSRule.STYLE_RULE||!r||!n.selectorText)return"continue";for(var i=0,a=n.selectorText.split(",");i<a.length;i++){var l=a[i];if(l&&l.trim()&&!(l.indexOf(":")>=0))(0,c.default)(e.querySelectorAll(l)).forEach((function(e){return e.setAttribute("style",r+(e.getAttribute("style")||""))}))}},a=o.cssRules.length-1;a>=0;a--)i(a);t.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))},e.prototype.processNode=function(e,t,n){var o,i=e.nodeType,a=1==i,s=3==i,u=11==i,c=8==i,f=!1;if(a){var h=(0,l.default)(e),p=this.elementCallbacks[h],g=this.tagReplacements[h.toLowerCase()];void 0===g&&(g=this.unknownTagReplacement),p?f=p(e,n):h.indexOf(":")>0||h==g||"*"==g?f=!0:g&&/^[a-zA-Z][\w\-]*$/.test(g)&&(e=(0,r.default)(e,g),f=!0)}else if(s){var v=t["white-space"];f="pre"==v||"pre-line"==v||"pre-wrap"==v||!/^[\r\n]*$/g.test(e.nodeValue||"")}else f=!!u||!!c&&this.preserveHtmlComments;if(f)if(!s||"pre"!=t["white-space"]&&"pre-wrap"!=t["white-space"]){if(a||u){var m=(0,d.cloneObject)(t),y=e;a&&(this.processAttributes(y,n),this.preprocessCss(y,m),this.processCss(y,m,n));for(var b=y.firstChild,E=void 0;b;b=E)E=b.nextSibling,this.processNode(b,m,n)}}else e.nodeValue=(e.nodeValue||"").replace(/^ /gm," ").replace(/ {2}/g,"  ");else null===(o=e.parentNode)||void 0===o||o.removeChild(e)},e.prototype.preprocessCss=function(e,t){var n=(0,i.default)(e,this.additionalPredefinedCssForElement);n&&Object.keys(n).forEach((function(e){t[e]=n[e]}))},e.prototype.processCss=function(e,t,n){var r=this,o=(0,a.default)(e);Object.keys(o).forEach((function(i){var a=o[i],l=r.styleCallbacks[i],s=null!=t[i],u=(!l||l(a,e,t,n))&&"inherit"!=a&&a.indexOf("expression")<0&&"-"!=i.substr(0,1)&&r.defaultStyleValues[i]!=a&&(s&&a!=t[i]||!s&&"initial"!=a&&"normal"!=a);u&&s&&(t[i]=a),u||delete o[i]})),(0,u.default)(e,o)},e.prototype.processAttributes=function(e,t){for(var n=e.attributes.length-1;n>=0;n--){var r=e.attributes[n],o=r.name.toLowerCase().trim(),i=r.value,a=this.attributeCallbacks[o],l=a?a(i,e,t):this.allowedAttributes.indexOf(o)>=0||0==o.indexOf("data-")?i:null;"class"==o&&this.allowedCssClassesRegex&&(l=this.processCssClass(i,l)),null==l||l.match(/s\n*c\n*r\n*i\n*p\n*t\n*:/i)?e.removeAttribute(o):r.value=l}},e.prototype.processCssClass=function(e,t){var n=this,r=e?e.split(" "):[],o=t?t.split(" "):[];return r.forEach((function(e){var t;(null===(t=n.allowedCssClassesRegex)||void 0===t?void 0:t.test(e))&&o.indexOf(e)<0&&o.push(e)})),(null==o?void 0:o.length)>0?o.join(" "):null},e}();t.default=h},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getStyleCallbacks=t.getDefaultStyleValues=t.getAllowedCssClassesRegex=t.getAllowedAttributes=t.getTagReplacement=void 0;var o=n(79),i={a:"*",abbr:"*",address:"*",area:"*",article:"*",aside:"*",b:"*",bdi:"*",bdo:"*",blockquote:"*",body:"*",br:"*",button:"*",canvas:"*",caption:"*",center:"*",cite:"*",code:"*",col:"*",colgroup:"*",data:"*",datalist:"*",dd:"*",del:"*",details:"*",dfn:"*",dialog:"*",dir:"*",div:"*",dl:"*",dt:"*",em:"*",fieldset:"*",figcaption:"*",figure:"*",font:"*",footer:"*",h1:"*",h2:"*",h3:"*",h4:"*",h5:"*",h6:"*",head:"*",header:"*",hgroup:"*",hr:"*",html:"*",i:"*",img:"*",input:"*",ins:"*",kbd:"*",label:"*",legend:"*",li:"*",main:"*",map:"*",mark:"*",menu:"*",menuitem:"*",meter:"*",nav:"*",ol:"*",optgroup:"*",option:"*",output:"*",p:"*",picture:"*",pre:"*",progress:"*",q:"*",rp:"*",rt:"*",ruby:"*",s:"*",samp:"*",section:"*",select:"*",small:"*",span:"*",strike:"*",strong:"*",sub:"*",summary:"*",sup:"*",table:"*",tbody:"*",td:"*",textarea:"*",tfoot:"*",th:"*",thead:"*",time:"*",tr:"*",tt:"*",u:"*",ul:"*",var:"*",wbr:"*",xmp:"*",form:"SPAN",applet:null,audio:null,base:null,basefont:null,embed:null,frame:null,frameset:null,iframe:null,link:null,meta:null,noscript:null,object:null,param:null,script:null,slot:null,source:null,style:null,template:null,title:null,track:null,video:null},a="accept,align,alt,checked,cite,color,cols,colspan,contextmenu,coords,datetime,default,dir,dirname,disabled,download,face,headers,height,hidden,high,href,hreflang,ismap,kind,label,lang,list,low,max,maxlength,media,min,multiple,open,optimum,pattern,placeholder,readonly,rel,required,reversed,rows,rowspan,scope,selected,shape,size,sizes,span,spellcheck,src,srclang,srcset,start,step,style,tabindex,target,title,translate,type,usemap,valign,value,width,wrap".split(","),l={"background-color":"transparent","border-bottom-color":"rgb(0, 0, 0)","border-bottom-style":"none","border-bottom-width":"0px","border-image-outset":"0","border-image-repeat":"stretch","border-image-slice":"100%","border-image-source":"none","border-image-width":"1","border-left-color":"rgb(0, 0, 0)","border-left-style":"none","border-left-width":"0px","border-right-color":"rgb(0, 0, 0)","border-right-style":"none","border-right-width":"0px","border-top-color":"rgb(0, 0, 0)","border-top-style":"none","border-top-width":"0px","outline-color":"transparent","outline-style":"none","outline-width":"0px",overflow:"visible","text-decoration":"none","-webkit-text-stroke-width":"0px","word-wrap":"break-word","margin-left":"0px","margin-right":"0px",padding:"0px","padding-top":"0px","padding-left":"0px","padding-right":"0px","padding-bottom":"0px",border:"0px","border-top":"0px","border-left":"0px","border-right":"0px","border-bottom":"0px","vertical-align":"baseline",float:"none"},s=[];function u(){return null}function c(e,t){var n=t.tagName;return!("LI"==n||"DIV"==n)}t.getTagReplacement=function(e){var t=r({},i),n=e||{};return Object.keys(n).forEach((function(e){e&&(t[e.toLowerCase()]=n[e])})),t},t.getAllowedAttributes=function(e){return(t=a.concat(e||[]),t.filter((function(e,t,n){return n.indexOf(e)==t}))).map((function(e){return e.toLocaleLowerCase()}));var t},t.getAllowedCssClassesRegex=function(e){var t=s.concat(e||[]);return t.length>0?new RegExp(t.join("|")):null},t.getDefaultStyleValues=function(e){var t=(0,o.cloneObject)(l);return e&&Object.keys(e).forEach((function(n){var r=e[n];null!=r?t[n]=r:delete t[n]})),t},t.getStyleCallbacks=function(e){var t=(0,o.cloneObject)(e);return t.position=t.position||u,t.width=t.width||c,t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{elementCallbacks:{},attributeCallbacks:{},cssStyleCallbacks:{},additionalTagReplacements:{},additionalAllowedAttributes:[],additionalAllowedCssClasses:[],additionalDefaultStyleValues:{},additionalGlobalStyleNodes:[],additionalPredefinedCssForElement:{},preserveHtmlComments:!1,unknownTagReplacement:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(e[t]){var r=e[t];e[t]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.apply(void 0,e),n.apply(void 0,e)}}else e[t]=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,n,r){e&&(e.className="_Entity _EType_"+t+" "+(r?"_EId_"+r+" ":"")+"_EReadonly_"+(n?"1":"0"),n?e.contentEditable="false":e.getAttribute("contenteditable")&&e.removeAttribute("contenteditable"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=!1,r="",o="",i=!1;return null===(t=null==e?void 0:e.className)||void 0===t||t.split(" ").forEach((function(e){"_Entity"==e?n=!0:0==e.indexOf("_EType_")?r=e.substr("_EType_".length):0==e.indexOf("_EId_")?o=e.substr("_EId_".length):0==e.indexOf("_EReadonly_")&&(i="1"==e.substr("_EReadonly_".length))})),n?{wrapper:e,id:o,type:r,isReadonly:i}:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return"._Entity"+(e?"._EType_"+e:"")+(t?"._EId_"+t:"")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=e&&e.eventDataCache&&e.eventDataCache.hasOwnProperty(t)?e.eventDataCache[t]:n();return e&&(e.eventDataCache=e.eventDataCache||{},e.eventDataCache[t]=r),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e&&e.eventDataCache&&(t&&e.eventDataCache.hasOwnProperty(t)?delete e.eventDataCache[t]:t||(e.eventDataCache={}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80);t.default=function(e){return!(0,r.default)(e)&&!!e.key&&1==e.key.length}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(21).Browser.isMac?function(e){return e.metaKey}:function(e){return e.ctrlKey};t.default=function(e){return r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=n(3),i=n(9),a=n(11),l=n(7),s=n(2),u=n(31),c=n(75),d=n(37),f=n(40),h=n(4),p=n(62),g=n(17),v=n(28),m=n(5),y=n(32),b=n(66),E=n(12),C=n(13),S=[function(e,t,n,r){var a,s,c=(0,l.default)(e,n.node);if(c){var d=(0,g.default)(e,"a[href]",null,1,(0,i.default)(n)).filter((function(e){return c.contains(e)}))[0];if(d&&(0,u.default)(d)&&(n=new h.default(d,-2),w(d),d=null),d&&(null===(a=t)||void 0===a?void 0:a.querySelector)&&(null===(s=t)||void 0===s?void 0:s.querySelector("a[href]"))){var f=n.normalize(),p=f.node.parentNode,m=3==f.node.nodeType?(0,v.default)(f.node,f.offset,!1):f.isAtEnd?f.node.nextSibling:f.node,y=e.ownerDocument.createTextNode("");for(p.insertBefore(y,m);(0,o.default)(d,y);)y=(0,C.splitBalancedNodeRange)(y);n=new h.default(y,-2),w(y)}}return n},function(e,t,n,r){var o,i,l,u=t;if(11==u.nodeType){var d=(0,m.default)(u.childNodes).filter((function(e){return"BR"!=(0,s.default)(e)}));u=1==d.length?d[0]:null}var f=(0,s.default)(u),p=f&&u&&"BR"==(0,s.default)(u.nextSibling),g=(0,a.default)(n.node,e,"LI"),v=g&&(0,a.default)(g,e,"OL,UL"),C=(0,a.default)(n.node,e,"TD,TH"),S=C&&(0,a.default)(C,e,"TR");"LI"==f&&(f=v?(0,s.default)(v):"UL",u=(0,E.default)(u,f));if("OL"!=f&&"UL"!=f||!u||"LI"!=(0,s.default)(u.firstChild)){if("TABLE"==f&&S){var P=new b.default(u),T=new b.default(C);0==T.col&&C==T.getCell(T.row||0,0).td&&(null===(o=P.cells)||void 0===o?void 0:o[0])&&P.cells[0].length==(null===(i=T.cells)||void 0===i?void 0:i[0].length)&&(0,c.default)(n,C)&&("TBODY"!=(0,s.default)(u.firstChild)||(null===(l=u.firstChild)||void 0===l?void 0:l.nextSibling)||(0,y.default)(u.firstChild),(0,y.default)(u),n=new h.default(S,-3))}}else{var O=!u.firstChild.nextSibling&&!p;p&&u.parentNode&&w(u.nextSibling),O?((0,y.default)(u.firstChild),(0,y.default)(u)):(0,s.default)(v)==f&&((0,y.default)(u),n=new h.default(g,(0,c.default)(n,g)?-2:-3))}return n},function(e,t,n,o){if("P"==(0,s.default)(n.node)){var i=n.normalize(),a=(0,r.default)(n.node,"div");i.node!=a&&(n=i)}return n},function(e,t,n,r){(0,d.default)(n.node)&&(n=new h.default(n.node,n.isAtEnd?-3:-2));return n},function(e,t,n,r){if(r&&r.collapsed){var o=new p.default(e,h.default.getStart(r)),i=o.getInlineElementBefore(),a=o.getInlineElementAfter();i instanceof f.default?n=new h.default(i.getContainerNode(),-3):a instanceof f.default&&(n=new h.default(a.getContainerNode(),-2))}return n}];function w(e){var t;null===(t=null==e?void 0:e.parentNode)||void 0===t||t.removeChild(e)}t.default=function(e,t,n,r){return S.forEach((function(o){n=o(e,t,n,r)})),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(43),o=n(72),i=n(71),a=n(48),l=n(73),s=n(4),u=n(17),c=n(1),d=n(28);function f(e,t,n){var r,o;if((0,c.default)(e,"Text")){var i=(0,d.default)(e,t,n);return n?[i,e]:[e,i]}var a=e.childNodes[t-1],l=e.childNodes[t];if(a||l||(n?a=(l=e).previousSibling:l=(a=e).nextSibling),(a||l)&&(!a||!l)){var s=e.ownerDocument.createTextNode("");null===(o=null===(r=a||l)||void 0===r?void 0:r.parentNode)||void 0===o||o.insertBefore(s,l),a?l=s:a=s}return[a,l]}t.default=function(e,t){var n=null,c=(0,u.default)(e,"table,tr",null,2,t),d=(0,i.default)(e,t,0).map((function(e){var t=(0,a.default)(e);if(!t)return null;var i=t.startContainer,l=t.endContainer,s=t.startOffset,u=f(l,t.endOffset,!1),d=u[0],h=u[1],p=f(i,s,!0),g=p[0],v=p[1];n=n||g;var m=(0,o.default)(e,[v,d]);return(0,r.default)(c,m),{region:e,beforeStart:g,afterEnd:h}})).filter((function(e){return!!e}));return c.forEach((function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})),d.forEach((function(e){e&&(0,l.default)(e.region,e.beforeStart,e.afterEnd)})),n&&new s.default(n,-1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.default=function(e){for(var t=r.default.createBodyTraverser(e),n=t&&t.currentBlockElement,o=[];n;)o.push(n.getTextContent()),n=t.getNextBlockElement();return o.join("\n")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachDomEvent=void 0;t.attachDomEvent=function(e,t){var n=Object.keys(t||{}).map((function(n){var r=function(e){var t={pluginEventType:null,beforeDispatch:null};"number"==typeof e?t.pluginEventType=e:"function"==typeof e?t.beforeDispatch=e:"object"==typeof e&&(t=e);return t}(t[n]),o=r.pluginEventType,i=r.beforeDispatch,a=function(t){i&&i(t),null!=o&&e.api.triggerEvent(e,{eventType:o,rawEvent:t},!1)};return e.contentDiv.addEventListener(n,a),function(){e.contentDiv.removeEventListener(n,a)}}));return function(){return n.forEach((function(e){return e()}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPasteFragment=void 0;var r=n(0);function o(e,t){(0,r.toArray)(e.querySelectorAll("style")).forEach(t)}t.createPasteFragment=function(e,t,n,i,a){var l,s;if(!t)return null;var u,c=function(e,t){return{eventType:10,clipboardData:t,fragment:e.contentDiv.ownerDocument.createDocumentFragment(),sanitizingOption:(0,r.createDefaultHtmlSanitizerOptions)(),htmlBefore:"",htmlAfter:"",htmlAttributes:{}}}(e,t),d=c.fragment,f=c.sanitizingOption,h=t.rawHtml,p=t.text,g=t.imageDataUri,v=e.contentDiv.ownerDocument;if(h&&(null===(l=u=(new DOMParser).parseFromString(e.trustedHTMLHandler(h),"text/html"))||void 0===l?void 0:l.body)){var m=null===(s=u.querySelector("html"))||void 0===s?void 0:s.attributes;(m?(0,r.toArray)(m):[]).reduce((function(e,t){return e[t.name]=t.value,e}),c.htmlAttributes),(0,r.toArray)(u.querySelectorAll("meta")).reduce((function(e,t){return e[t.name]=t.content,e}),c.htmlAttributes),t.htmlFirstLevelChildTags=[],null==u||u.body.normalize(),null==u||u.body.childNodes.forEach((function(e){if(e.nodeType==Node.TEXT_NODE&&!e.nodeValue.replace(/(\r\n|\r|\n)/gm,"").trim())return;var n=(0,r.getTagOfNode)(e);e.nodeType!=Node.COMMENT_NODE&&t.htmlFirstLevelChildTags.push(n)})),o(u,(function(e){u.head.appendChild(e),f.additionalGlobalStyleNodes.push(e)}));var y=h.indexOf("\x3c!--StartFragment--\x3e"),b=h.lastIndexOf("\x3c!--EndFragment--\x3e");y>=0&&b>=y+"\x3c!--StartFragment--\x3e".length&&(c.htmlBefore=h.substr(0,y),c.htmlAfter=h.substr(b+"\x3c!--EndFragment--\x3e".length),t.html=h.substring(y+"\x3c!--StartFragment--\x3e".length,b),u.body.innerHTML=e.trustedHTMLHandler(t.html),o(u.body,(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})))}if(i||p||!g)if(!i&&h&&u&&u.body){if((0,r.moveChildNodes)(d,u.body),a&&n){var E=function(e,t){var n=e.api.getPendableFormatState(e,!0),r=e.api.getStyleBasedFormatState(e,t);return{fontFamily:r.fontName,fontSize:r.fontSize,textColor:r.textColor,backgroundColor:r.backgroundColor,textColors:r.textColors,backgroundColors:r.backgroundColors,bold:n.isBold,italic:n.isItalic,underline:n.isUnderline}}(e,n.node);(0,r.applyTextStyle)(d,(function(e){return(0,r.applyFormat)(e,E)}))}}else p&&p.split("\n").forEach((function(e,t,n){e=e.replace(/^ /g," ").replace(/\r/g,"").replace(/ {2}/g,"  ");var o=v.createTextNode(e);2==n.length&&0==t?(d.appendChild(o),d.appendChild(v.createElement("br"))):t>0&&t<n.length-1?d.appendChild((0,r.wrap)(""==e?v.createElement("br"):o)):d.appendChild(o)}));else{var C=v.createElement("img");C.style.maxWidth="100%",C.src=g,d.appendChild(C)}e.api.triggerEvent(e,c,!0);var S=new r.HtmlSanitizer(c.sanitizingOption);return S.convertGlobalCssToInlineCss(d),S.sanitize(d,n&&(0,r.getInheritableStyles)(n.element)),d}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureTypeInContainer=void 0;var r=n(0);t.ensureTypeInContainer=function(e,t,n){t=t.normalize();var o,i=(0,r.getBlockElementAtNode)(e.contentDiv,t.node);if(i){o=i.collapseToSingleElement();var a=(0,r.isNodeEmpty)(o)||n&&function(e,t){return(0,r.safeInstanceOf)(e.target,"Node")&&e.target.contains(t)&&e.key===t.innerText}(n,o);o=o&&a?o:null}else o=(0,r.createElement)(1,e.contentDiv.ownerDocument),e.api.insertNode(e,o,{position:1,updateCursor:!1,replaceSelection:!1,insertOnNewLine:!1}),t=new r.Position(o.firstChild,0);o&&(0,r.applyFormat)(o,e.lifecycle.defaultFormat,e.lifecycle.isDarkMode),n&&e.api.selectRange(e,(0,r.createRange)(t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.focus=void 0;var r=n(0);t.focus=function(e){if(!e.lifecycle.shadowEditFragment){if(!(e.api.hasFocus(e)&&e.api.getSelectionRange(e,!1)||e.domEvent.selectionRange&&e.api.selectRange(e,e.domEvent.selectionRange,!0))){var t=(0,r.getFirstLeafNode)(e.contentDiv)||e.contentDiv;e.api.selectRange(e,(0,r.createRange)(t,0),!0)}e.domEvent.selectionRange=null,e.api.hasFocus(e)||e.contentDiv.focus()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContent=void 0;var r=n(0);t.getContent=function(e,t){var n="",o=0==t,i=2==t,a=e.lifecycle.shadowEditFragment||e.contentDiv;if(4==t)n=a.textContent;else if(3==t)n=(0,r.getTextContent)(a);else if(o||e.lifecycle.isDarkMode){var l=function(e){var t;(0,r.safeInstanceOf)(e,"DocumentFragment")?(t=e.ownerDocument.createElement("div")).appendChild(e.cloneNode(!0)):t=e.cloneNode(!0);return t}(a);l.normalize();var s=e.api.getSelectionRange(e,!0),u=i?e.lifecycle.shadowEditFragment?e.lifecycle.shadowEditSelectionPath:s?(0,r.getSelectionPath)(e.contentDiv,s):null:null,c=u&&(0,r.createRange)(l,u.start,u.end);e.lifecycle.isDarkMode&&e.api.transformColor(e,l,!1,null,1),o?(e.api.triggerEvent(e,{eventType:8,clonedRoot:l},!0),n=l.innerHTML):n=c?(0,r.getHtmlWithSelectionPath)(l,c):l.innerHTML}else n=(0,r.getHtmlWithSelectionPath)(a,i&&e.api.getSelectionRange(e,!0));return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPendableFormatState=void 0;var r=n(0);t.getPendableFormatState=function(e,t){var n,a=e.api.getSelectionRange(e,!0),l=e.pendingFormatState.pendableFormatState,s=null===(n=e.pendingFormatState.pendableFormatPosition)||void 0===n?void 0:n.normalize(),u=a&&r.Position.getStart(a).normalize(),c=u&&a.collapsed&&u.equalTo(s);return a&&l&&c&&!t?l:u?function(e,t){var n=t.node,a={},l=[],s=function(){var e=(0,r.getTagOfNode)(n),t=1==n.nodeType&&n.style;e&&t&&Object.keys(o).forEach((function(n){l.indexOf(n)>=0||(a[n]=a[n]||o[n](e,t),i[n](t)&&l.push(n))})),n=n.parentNode};for(;(0,r.contains)(e.contentDiv,n);)s();return a}(e,u):{}};var o={isBold:function(e,t){return"B"==e||"STRONG"==e||parseInt(t.fontWeight)>=700||["bold","bolder"].indexOf(t.fontWeight)>=0},isUnderline:function(e,t){return"U"==e||t.textDecoration.indexOf("underline")>=0},isItalic:function(e,t){return"I"==e||"EM"==e||"italic"===t.fontStyle},isSubscript:function(e,t){return"SUB"==e||"sub"===t.verticalAlign},isSuperscript:function(e,t){return"SUP"==e||"super"===t.verticalAlign},isStrikeThrough:function(e,t){return"S"==e||"STRIKE"==e||t.textDecoration.indexOf("line-through")>=0}},i={isBold:function(e){return""!==e.fontWeight&&parseInt(e.fontWeight)<700||"normal"===e.fontWeight},isUnderline:function(e){return""!==e.textDecoration&&e.textDecoration.indexOf("underline")<0},isItalic:function(e){return""!==e.fontStyle&&"italic"!==e.fontStyle},isSubscript:function(e){return""!==e.verticalAlign&&"sub"!==e.verticalAlign},isSuperscript:function(e){return""!==e.verticalAlign&&"super"!==e.verticalAlign},isStrikeThrough:function(e){return""!==e.textDecoration&&e.textDecoration.indexOf("line-through")<0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionRange=void 0;var r=n(0);t.getSelectionRange=function(e,t){var n,o=null;if(e.lifecycle.shadowEditFragment)return o=e.lifecycle.shadowEditSelectionPath&&(0,r.createRange)(e.contentDiv,e.lifecycle.shadowEditSelectionPath.start,e.lifecycle.shadowEditSelectionPath.end);if(!t||e.api.hasFocus(e)){var i=null===(n=e.contentDiv.ownerDocument.defaultView)||void 0===n?void 0:n.getSelection();if(i&&i.rangeCount>0){var a=i.getRangeAt(0);(0,r.contains)(e.contentDiv,a)&&(o=a)}}return!o&&t&&(o=e.domEvent.selectionRange),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionRangeEx=void 0;var r=n(0);function o(e){return{type:0,ranges:e,areAllCollapsed:i(e)}}function i(e){return e.filter((function(e){return null==e?void 0:e.collapsed})).length==e.length}t.getSelectionRangeEx=function(e){var t,n;if(e.lifecycle.shadowEditFragment){var a=e.lifecycle,l=a.shadowEditTableSelectionPath,s=a.shadowEditSelectionPath;if((null==l?void 0:l.length)>0){var u=e.lifecycle.shadowEditTableSelectionPath.map((function(t){return(0,r.createRange)(e.contentDiv,t.start,t.end)}));return{type:1,ranges:u,areAllCollapsed:i(u),table:(0,r.findClosestElementAncestor)(u[0].startContainer,e.contentDiv,"table"),coordinates:null}}var c=s&&(0,r.createRange)(e.contentDiv,s.start,s.end);return o(c?[c]:[])}if(e.api.hasFocus(e)){if(e.domEvent.tableSelectionRange)return e.domEvent.tableSelectionRange;var d=null===(t=e.contentDiv.ownerDocument.defaultView)||void 0===t?void 0:t.getSelection();if(d&&d.rangeCount>0){var f=d.getRangeAt(0);if((0,r.contains)(e.contentDiv,f))return o([f])}}return null!==(n=e.domEvent.tableSelectionRange)&&void 0!==n?n:o(e.domEvent.selectionRange?[e.domEvent.selectionRange]:[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStyleBasedFormatState=void 0;var r=n(0);t.getStyleBasedFormatState=function(e,t){if(!t)return{};var n=t?(0,r.getComputedStyles)(t):[],o=e.lifecycle.isDarkMode,i=e.contentDiv,a=o&&(0,r.findClosestElementAncestor)(t,i,"[data-ogsc],[data-ogac]"),l=o&&(0,r.findClosestElementAncestor)(t,i,"[data-ogsb],[data-ogab]");return{fontName:n[0],fontSize:n[1],textColor:n[2],backgroundColor:n[3],textColors:a?{darkModeColor:n[2],lightModeColor:a.dataset.ogsc||a.dataset.ogac}:void 0,backgroundColors:l?{darkModeColor:n[3],lightModeColor:l.dataset.ogsb||l.dataset.ogab}:void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertNode=void 0;var r=n(0);t.insertNode=function(e,t,n){n=n||{position:3,insertOnNewLine:!1,updateCursor:!0,replaceSelection:!0};var o=e.contentDiv;return n.updateCursor&&e.api.focus(e),4==n.position?(o.parentNode.insertBefore(t,o.nextSibling),!0):(e.api.transformColor(e,t,!0,(function(){switch(n.position){case 0:case 1:var i,a=0==n.position,l=(0,r.getFirstLastBlockElement)(o,a);if(l){var s=a?l.getStartNode():l.getEndNode();n.insertOnNewLine||3==s.nodeType||(0,r.isVoidHtmlElement)(s)?(0,r.safeInstanceOf)(t,"DocumentFragment")?(i=(0,r.toArray)(t.childNodes),s.parentNode.insertBefore(t,a?s:s.nextSibling)):i=s.parentNode.insertBefore(t,a?s:s.nextSibling):i=s.insertBefore(t,a?s.firstChild:null)}else i=o.appendChild(t);if(i&&n.insertOnNewLine){var u=Array.isArray(i)?i:[i];(0,r.isBlockElement)(u[0])&&(0,r.isBlockElement)(u[u.length-1])||(0,r.wrap)(u)}break;case 2:var c=o.appendChild(t);c&&n.insertOnNewLine&&!(0,r.isBlockElement)(c)&&(0,r.wrap)(c);break;case 5:case 3:var d=function(e,t){var n=e.api.getSelectionRange(e,!0),r=null;return 5==t.position?(r=n,n=t.range):n&&(r=n.cloneRange()),{range:n,rangeToRestore:r}}(e,n),f=d.range,h=d.rangeToRestore;if(!f)return;n.replaceSelection&&!f.collapsed&&f.deleteContents();var p=r.Position.getStart(f),g=void 0;p=n.insertOnNewLine&&(g=(0,r.getBlockElementAtNode)(o,p.normalize().node))?new r.Position(g.getEndNode(),-3):(0,r.adjustInsertPosition)(o,t,p,f);var v=11==t.nodeType?t.lastChild:t;(f=(0,r.createRange)(p)).insertNode(t),n.updateCursor&&v&&(h=(0,r.createRange)(new r.Position(v,-3).normalize())),e.api.selectRange(e,h)}}),0),!0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.restoreUndoSnapshot=void 0;t.restoreUndoSnapshot=function(e,t){e.undo.hasNewContent&&t<0&&e.api.addUndoSnapshot(e,null,null,!1);var n=e.undo.snapshotsService.move(t);if(n&&null!=n.html)try{e.undo.isRestoring=!0,e.api.setContent(e,n.html,!0,n.metadata)}finally{e.undo.isRestoring=!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectRange=void 0;var r=n(81),o=n(0);t.selectRange=function(e,t,n){return!(e.lifecycle.shadowEditSelectionPath||!(0,o.contains)(e.contentDiv,t))&&((0,o.addRangeToSelection)(t,n),(0,r.hasFocus)(e)||(e.domEvent.selectionRange=t),t.collapsed&&function(e){var t=e.contentDiv,n=e.pendingFormatState,r=e.api.getSelectionRange;if(n.pendableFormatState){var i=t.ownerDocument,a=(0,o.getPendableFormatState)(i);Object.keys(o.PendableFormatCommandMap).forEach((function(e){!!n.pendableFormatState[e]!=a[e]&&i.execCommand(o.PendableFormatCommandMap[e],!1,null)}));var l=r(e,!0);n.pendableFormatPosition=l&&o.Position.getStart(l)}}(e),!0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectTable=void 0;var r=n(0);function o(e,t){if(e&&!e.id){for(var n=e.ownerDocument,r=function(e){return e.getElementById(t+o)},o=0,i=r(n);i;)i=r(n),o++;e.id=t+o}}function i(e,t,n,r,o,i){return e+" #"+t+n+" tr:nth-child("+r+")>"+o+":nth-child("+i+")"}function a(e){if(e){var t=(0,r.getStyles)(e),n=0;["background-color","background"].forEach((function(e){var r;if((null===(r=t[e])||void 0===r?void 0:r.indexOf("!important"))>-1){var o=t[e].indexOf("!");t[e]=t[e].substring(0,o),n++}})),n>0&&(0,r.setStyles)(e,t)}}function l(e){return(!!e||0==e)&&e>-1}t.selectTable=function(e,t,n){if(function(e){var t,n=e.contentDiv,r=n.ownerDocument.getElementById("tableStyle"+n.id);if(null===(t=null==r?void 0:r.sheet)||void 0===t?void 0:t.cssRules)for(;r.sheet.cssRules.length>0;)r.sheet.deleteRule(0)}(e),function(e){if(e){var t=e||{},n=t.firstCell,r=t.lastCell;if(n&&r){var o=function(e){return l(e.x)&&l(e.y)};return o(n)&&o(r)}}return!1}(n)&&t){o(t,"tableSelected"),o(e.contentDiv,"contentDiv_");var s=function(e,t,n){var o=e.contentDiv.ownerDocument,l="#"+e.contentDiv.id,s=function(e,t,n){var o=t.firstCell.y,l=t.firstCell.x,s=t.lastCell.y,u=t.lastCell.x,c=[],d=null,f=null,h="",p=!0,g=new r.VTable(e),v=(0,r.toArray)(e.childNodes).filter((function(e){return["THEAD","TBODY","TFOOT"].indexOf((0,r.getTagOfNode)(e))>-1})),m=0,y=v.map((function(e){var t={el:(0,r.getTagOfNode)(e),start:m,end:e.childNodes.length+m};return m=t.end,t}));return g.cells.forEach((function(t,g){var v=0,m=0;d=null,f=null;for(var b=y.filter((function(e){return e.start<=g&&e.end>g}))[0],E=b?">"+b.el+">":">",C=b&&g+1>=b.start?g+1-b.start:g+1,S=0;S<t.length;S++)if(t[S].td){var w=(0,r.getTagOfNode)(t[S].td);if("TD"==w&&v++,"TH"==w&&m++,g>=o&&g<=s&&S>=l&&S<=u){p?p=!1:h.endsWith(",")||(h+=","),a(t[S].td);var P=i(n,e.id,E,C,w,"TD"==w?v:m);h+=P,d=d||e.querySelector(P),f=e.querySelector(P)}}if(d&&f){var T=new Range;T.setStartBefore(d),T.setEndAfter(f),c.push(T)}})),{css:h+="{background-color: rgba(198,198,198,0.7) !important;}",ranges:c}}(t,n,l),u=s.css,c=s.ranges,d=o.getElementById("tableStyle"+e.contentDiv.id);d||(d=o.createElement("style"),o.head.appendChild(d),d.id="tableStyle"+e.contentDiv.id);return d.sheet.insertRule(u),c}(e,t,n);return function(e,t){var n=t.firstCell;return!(e.rows.item(n.y)&&e.rows.item(n.y).cells.item(n.x))}(t,n)||e.api.selectRange(e,(0,r.createRange)(new r.Position(t.rows.item(n.firstCell.y).cells.item(n.firstCell.x),0))),{type:1,ranges:s,table:t,areAllCollapsed:s.filter((function(e){return null==e?void 0:e.collapsed})).length==s.length,coordinates:n}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setContent=void 0;var r=n(0),o=n(0);t.setContent=function(e,t,n,i){var a=!1;if(e.contentDiv.innerHTML!=t){e.api.triggerEvent(e,{eventType:20,newContent:t},!0);var l=(0,o.setHtmlWithMetadata)(e.contentDiv,t,e.trustedHTMLHandler);(function(e,t){switch(null==t?void 0:t.type){case 0:var n=(0,r.createRange)(e.contentDiv,t.start,t.end);e.api.selectRange(e,n);break;case 1:var o=(0,r.queryElements)(e.contentDiv,"#"+t.tableId)[0];o&&e.api.selectTable(e,o,t)}})(e,i=i||l),a=!0}var s=e.lifecycle.isDarkMode;(!i&&s||i&&!!i.isDarkMode!=!!s)&&(e.api.transformColor(e,e.contentDiv,!1,null,s?0:1,!0),a=!0),n&&a&&e.api.triggerEvent(e,{eventType:7,source:"SetContent"},!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchShadowEdit=void 0;var r=n(0);t.switchShadowEdit=function(e,t){var n=e.lifecycle,o=e.contentDiv,i=n.shadowEditFragment,a=n.shadowEditSelectionPath,l=n.shadowEditTableSelectionPath,s=!!i;if(t){if(!s){var u=e.api.getSelectionRangeEx(e),c=e.api.getSelectionRange(e,!0);a=c&&(0,r.getSelectionPath)(o,c),l=1==(null==u?void 0:u.type)&&u.ranges.map((function(e){return(0,r.getSelectionPath)(o,e)})),i=e.contentDiv.ownerDocument.createDocumentFragment(),(0,r.moveChildNodes)(i,o),i.normalize(),e.api.triggerEvent(e,{eventType:17,fragment:i,selectionPath:a},!1),n.shadowEditFragment=i,n.shadowEditSelectionPath=a,n.shadowEditTableSelectionPath=l}(0,r.moveChildNodes)(o),o.appendChild(n.shadowEditFragment.cloneNode(!0))}else if(n.shadowEditFragment=null,n.shadowEditSelectionPath=null,s&&(e.api.triggerEvent(e,{eventType:18},!1),(0,r.moveChildNodes)(o),o.appendChild(i),e.api.focus(e),a&&e.api.selectRange(e,(0,r.createRange)(o,a.start,a.end)),e.domEvent.tableSelectionRange)){var d=e.domEvent.tableSelectionRange,f=d.table,h=d.coordinates,p=f.id,g=e.contentDiv.querySelector("#"+p);f&&(e.domEvent.tableSelectionRange=e.api.selectTable(e,g,h))}}},function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.transformColor=void 0;var i=n(0),a=[(r={},r[0]="color",r[1]="color",r[2]="ogsc",r[3]="ogac",r),(o={},o[0]="background-color",o[1]="bgcolor",o[2]="ogsb",o[3]="ogab",o)];function l(e,t){return e&&"undefined"!=e&&"null"!=e?e:t}function s(e){var t=e;return!!t.style&&!!t.dataset}t.transformColor=function(e,t,n,r,o,u){var c=u||e.lifecycle.isDarkMode?function(e,t){var n=[];if((0,i.safeInstanceOf)(e,"HTMLElement")){t&&n.push(e);var r=e.getElementsByTagName("*");(0,i.arrayPush)(n,(0,i.toArray)(r))}else if((0,i.safeInstanceOf)(e,"DocumentFragment")){r=e.querySelectorAll("*");(0,i.arrayPush)(n,(0,i.toArray)(r))}return n.filter(s)}(t,n):[];null==r||r(),1==o?function(e){e.forEach((function(e){a.forEach((function(t){e.style.setProperty(t[0],l(e.dataset[t[2]],"")),delete e.dataset[t[2]];var n=e.dataset[t[3]];l(n,null)?e.setAttribute(t[1],n):e.removeAttribute(t[1]),delete e.dataset[t[3]]}))}))}(c):e.lifecycle.onExternalContentTransform?c.forEach((function(t){return e.lifecycle.onExternalContentTransform(t)})):function(e,t){a.forEach((function(n){e.map((function(e){var r=e.style.getPropertyValue(n[0]),o=e.getAttribute(n[1]);return e.dataset[n[2]]||e.dataset[n[3]]||!r&&!o||"inherit"==r?null:{element:e,styleColor:r,attrColor:o,newColor:t(r||o)}})).filter((function(e){return!!e})).forEach((function(e){var t=e.element,r=e.styleColor,o=e.attrColor,i=e.newColor;t.style.setProperty(n[0],i,"important"),t.dataset[n[2]]=r||"",o&&(t.setAttribute(n[1],i),t.dataset[n[3]]=o)}))}))}(c,e.lifecycle.getDarkColor)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.triggerEvent=void 0;var r=[11,12,8,21];t.triggerEvent=function(e,t,n){e.lifecycle.shadowEditFragment&&!(r.indexOf(t.eventType)>=0)||!n&&e.plugins.some((function(e){return function(e,t){var n;if(t.onPluginEvent&&(null===(n=t.willHandleEventExclusively)||void 0===n?void 0:n.call(t,e)))return t.onPluginEvent(e),!0;return!1}(t,e)}))||e.plugins.forEach((function(e){e.onPluginEvent&&e.onPluginEvent(t)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPluginState=void 0;var r=n(164),o=n(165),i=n(166),a=n(167),l=n(168),s=n(169),u=n(170),c=n(171),d=n(172),f=n(173);t.default=function(e,t){var n=t.corePluginOverride||{};return{typeInContainer:n.typeInContainer||new d.default,edit:n.edit||new i.default,pendingFormatState:n.pendingFormatState||new c.default,_placeholder:null,typeAfterLink:null,undo:n.undo||new f.default(t),domEvent:n.domEvent||new o.default(t,e),mouseUp:n.mouseUp||new s.default,copyPaste:n.copyPaste||new r.default(t),entity:n.entity||new a.default,normalizeTable:n.normalizeTable||new u.default,lifecycle:n.lifecycle||new l.default(t,e)}},t.getPluginState=function(e){return{domEvent:e.domEvent.getState(),pendingFormatState:e.pendingFormatState.getState(),edit:e.edit.getState(),lifecycle:e.lifecycle.getState(),undo:e.undo.getState(),entity:e.entity.getState(),copyPaste:e.copyPaste.getState()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e){var t=this;this.onPaste=function(e){var n;(0,r.extractClipboardEvent)(e,(function(e){return t.editor.paste(e)}),{allowLinkPreview:t.editor.isFeatureEnabled("PasteWithLinkPreview"),allowedCustomPasteType:t.state.allowedCustomPasteType,getTempDiv:function(){return n=t.editor.getSelectionRange(),t.getTempDiv()},removeTempDiv:function(e){t.cleanUpAndRestoreSelection(e,n,!1)}})},this.state={allowedCustomPasteType:e.allowedCustomPasteType||[]}}return e.prototype.getName=function(){return"CopyPaste"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.disposer=this.editor.addDomEventHandler({paste:this.onPaste,copy:function(e){return t.onCutCopy(e,!1)},cut:function(e){return t.onCutCopy(e,!0)}})},e.prototype.dispose=function(){this.disposer(),this.disposer=null,this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onCutCopy=function(e,t){var n=this,o=this.editor.getSelectionRangeEx();if(o&&!o.areAllCollapsed){var i=this.editor.getContent(2),a=this.getTempDiv(!0),l=(0,r.setHtmlWithSelectionPath)(a,i,this.editor.getTrustedHTMLHandler());l&&(0,r.addRangeToSelection)(l),this.editor.triggerPluginEvent(9,{clonedRoot:a,range:l,rawEvent:e,isCut:t}),this.editor.runAsync((function(e){n.cleanUpAndRestoreSelection(a,o,!t),t&&e.addUndoSnapshot((function(){var t=n.editor.deleteSelectedContent();e.focus(),e.select(t)}),"Cut")}))}},e.prototype.getTempDiv=function(e){var t=this,n=this.editor.getCustomData("CopyPasteTempDiv",(function(){var e=(0,r.createElement)(3,t.editor.getDocument());return t.editor.insertNode(e,{position:4}),e}),(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)}));return e&&(n.style.backgroundColor="white",n.style.color="black"),n.style.display="",n.focus(),n},e.prototype.cleanUpAndRestoreSelection=function(e,t,n){var o,i;if((null===(o=t)||void 0===o?void 0:o.type)||0==t.type){var a=t;switch(a.type){case 1:this.editor.select(a.table,a.coordinates);break;case 0:var l=null===(i=a.ranges)||void 0===i?void 0:i[0];this.restoreRange(l,n)}}else this.restoreRange(t,n);e.style.backgroundColor="",e.style.color="",e.style.display="none",(0,r.moveChildNodes)(e)},e.prototype.restoreRange=function(e,t){e&&(t&&r.Browser.isAndroid&&e.collapse(),this.editor.select(e))},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e,t){var n,o=this;this.onDrop=function(e){o.editor.runAsync((function(e){e.addUndoSnapshot((function(){}),"Drop")}))},this.onFocus=function(){var e=o.state.tableSelectionRange||{},t=e.table,n=e.coordinates;t&&n?o.editor.select(t,n):o.editor.select(o.state.selectionRange),o.state.selectionRange=null},this.onKeyDownDocument=function(e){9!=e.which||e.defaultPrevented||o.cacheSelection()},this.onMouseDownDocument=function(e){o.state.selectionRange||o.editor.contains(e.target)||o.cacheSelection()},this.cacheSelection=function(){o.state.selectionRange||(o.state.selectionRange=o.editor.getSelectionRange(!1))},this.onScroll=function(e){o.editor.triggerPluginEvent(14,{rawEvent:e,scrollContainer:o.state.scrollContainer})},this.onKeyboardEvent=function(e){(0,r.isCharacterValue)(e)&&e.stopPropagation()},this.onInputEvent=function(e){e.stopPropagation()},this.onContextMenuEvent=function(e){var t=[],n=o.editor.getContentSearcherOfCursor(),i=null==n?void 0:n.getInlineElementBefore(),a=e.target;2!=e.button&&(a=null==i?void 0:i.getContainerNode()),o.state.contextMenuProviders.forEach((function(e){var n=e.getContextMenuItems(a);(null==n?void 0:n.length)>0&&(t.length>0&&t.push(null),(0,r.arrayPush)(t,n))})),o.editor.triggerPluginEvent(16,{rawEvent:e,items:t})},this.state={isInIME:!1,scrollContainer:e.scrollContainer||t,selectionRange:null,stopPrintableKeyboardEventPropagation:!e.allowKeyboardEventPropagation,contextMenuProviders:(null===(n=e.plugins)||void 0===n?void 0:n.filter(i))||[],tableSelectionRange:null}}return e.prototype.getName=function(){return"DOMEvent"},e.prototype.initialize=function(e){var t,n,o,i,a=this;this.editor=e;var l=this.editor.getDocument(),s=((t={keypress:this.getEventHandler(1),keydown:this.getEventHandler(0),keyup:this.getEventHandler(2),mousedown:5,contextmenu:this.onContextMenuEvent,compositionstart:function(){return a.state.isInIME=!0},compositionend:function(t){a.state.isInIME=!1,e.triggerPluginEvent(4,{rawEvent:t})},drop:this.onDrop,focus:this.onFocus})[r.Browser.isIE?"textinput":"input"]=this.getEventHandler(3),t);r.Browser.isSafari?(l.addEventListener("mousedown",this.onMouseDownDocument,!0),l.addEventListener("keydown",this.onKeyDownDocument),null===(n=l.defaultView)||void 0===n||n.addEventListener("blur",this.cacheSelection)):s[r.Browser.isIEOrEdge?"beforedeactivate":"blur"]=this.cacheSelection,this.disposer=e.addDomEventHandler(s),this.state.scrollContainer.addEventListener("scroll",this.onScroll),null===(o=l.defaultView)||void 0===o||o.addEventListener("scroll",this.onScroll),null===(i=l.defaultView)||void 0===i||i.addEventListener("resize",this.onScroll)},e.prototype.dispose=function(){var e,t,n,o=this.editor.getDocument();r.Browser.isSafari&&(o.removeEventListener("mousedown",this.onMouseDownDocument,!0),o.removeEventListener("keydown",this.onKeyDownDocument),null===(e=o.defaultView)||void 0===e||e.removeEventListener("blur",this.cacheSelection)),null===(t=o.defaultView)||void 0===t||t.removeEventListener("resize",this.onScroll),null===(n=o.defaultView)||void 0===n||n.removeEventListener("scroll",this.onScroll),this.state.scrollContainer.removeEventListener("scroll",this.onScroll),this.disposer(),this.disposer=null,this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.getEventHandler=function(e){return this.state.stopPrintableKeyboardEventPropagation?{pluginEventType:e,beforeDispatch:3==e?this.onInputEvent:this.onKeyboardEvent}:e},e}();function i(e){var t;return!!(null===(t=e)||void 0===t?void 0:t.getContextMenuItems)}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(){this.state={features:{}}}return e.prototype.getName=function(){return"Edit"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){var t,n=!1,o=!1;if(0==e.eventType){var i=e.rawEvent,a=this.editor.getSelectionRange();n=(o=(0,r.isCtrlOrMetaPressed)(i))||i.altKey,t=this.state.features[i.which]||a&&!a.collapsed&&this.state.features[258]}else 7==e.eventType&&(t=this.state.features[257]);for(var l=0;l<(null==t?void 0:t.length);l++){var s=t[l];if((s.allowFunctionKeys||!n)&&s.shouldHandleEvent(e,this.editor,o)){s.handleEvent(e,this.editor);break}}},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=/_(\d{1,8})$/,i=["^_Entity$","^_EId_","^_EType_","^_EReadonly_"],a=[6,7,4,5],l=function(){function e(){var e=this;this.handleCutEvent=function(t){var n=e.editor.getSelectionRange();n&&!n.collapsed&&e.checkRemoveEntityForRange(t)},this.state={knownEntityElements:[],shadowEntityCache:{}}}return e.prototype.getName=function(){return"Entity"},e.prototype.initialize=function(e){this.editor=e},e.prototype.willHandleEventExclusively=function(e){var t;return 1==e.eventType&&!!(null===(t=e.rawEvent.target)||void 0===t?void 0:t.shadowRoot)},e.prototype.dispose=function(){this.editor=null,this.state.knownEntityElements=[]},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 6:this.handleMouseUpEvent(e);break;case 0:this.handleKeyDownEvent(e.rawEvent);break;case 9:e.isCut&&this.handleCutEvent(e.rawEvent);break;case 10:this.handleBeforePasteEvent(e.sanitizingOption);break;case 7:this.handleContentChangedEvent(e);break;case 11:this.handleContentChangedEvent();break;case 8:this.handleExtractContentWithDomEvent(e.clonedRoot);break;case 16:this.handleContextMenuEvent(e.rawEvent);break;case 20:this.handleBeforeSetContentEvent();break;case 15:this.handleEntityOperationEvent(e)}},e.prototype.handleContextMenuEvent=function(e){var t=e.target,n=t&&this.editor.getElementAtCursor((0,r.getEntitySelector)(),t);n&&(e.preventDefault(),this.triggerEvent(n,2,e))},e.prototype.handleMouseUpEvent=function(e){var t,n=e.rawEvent,o=e.isClicking,i=n.target;o&&i&&(t=this.editor.getElementAtCursor((0,r.getEntitySelector)(),i))&&(this.triggerEvent(t,1,n),s(this.editor))},e.prototype.handleKeyDownEvent=function(e){if((0,r.isCharacterValue)(e)||8==e.which||46==e.which||13==e.which){var t=this.editor.getSelectionRange();t&&!t.collapsed&&this.checkRemoveEntityForRange(e)}},e.prototype.handleBeforePasteEvent=function(e){this.editor.getSelectionRange().collapsed||this.checkRemoveEntityForRange(null),(0,r.arrayPush)(e.additionalAllowedCssClasses,i)},e.prototype.handleBeforeSetContentEvent=function(){this.cacheShadowEntities(this.state.shadowEntityCache)},e.prototype.handleContentChangedEvent=function(e){for(var t=this,n=this.state.knownEntityElements.length-1;n>=0;n--){var o=this.state.knownEntityElements[n];this.editor.contains(o)||(this.setIsEntityKnown(o,!1),o.shadowRoot&&this.triggerEvent(o,10))}var i=this.state.knownEntityElements.map((function(e){var t;return null===(t=(0,r.getEntityFromElement)(e))||void 0===t?void 0:t.id})).filter((function(e){return!!e}));("InsertEntity"==(null==e?void 0:e.source)&&e.data?[e.data]:this.getExistingEntities().filter((function(e){var n=e.wrapper;return!t.isEntityKnown(n)}))).forEach((function(e){var n=e.wrapper,o=e.type,a=e.id,l=e.isReadonly;e.id=t.ensureUniqueId(o,a,i),(0,r.commitEntity)(n,o,l,e.id),t.handleNewEntity(e)})),Object.keys(this.state.shadowEntityCache).forEach((function(e){t.triggerEvent(t.state.shadowEntityCache[e],6),delete t.state.shadowEntityCache[e]}))},e.prototype.handleEntityOperationEvent=function(e){var t,n=this;a.indexOf(e.operation)>=0&&(null===(t=this.cancelAsyncRun)||void 0===t||t.call(this),this.cancelAsyncRun=this.editor.runAsync((function(){n.cancelAsyncRun=null,n.handleContentChangedEvent()})))},e.prototype.handleExtractContentWithDomEvent=function(e){var t=this;(0,r.toArray)(e.querySelectorAll((0,r.getEntitySelector)())).forEach((function(e){e.removeAttribute("contentEditable"),t.triggerEvent(e,8)}))},e.prototype.checkRemoveEntityForRange=function(e){var t=this,n=[],o=(0,r.getEntitySelector)();if(this.editor.queryElements(o,1,(function(r){r.isContentEditable?n.push(r):t.triggerEvent(r,6,e)})),n.length>0){var i=this.editor.queryElements(o,2);n.forEach((function(n){var r=i.indexOf(n)>=0;t.triggerEvent(n,r?6:7,e)}))}},e.prototype.triggerEvent=function(e,t,n,o){var i=e&&(0,r.getEntityFromElement)(e);i&&this.editor.triggerPluginEvent(15,{operation:t,rawEvent:n,entity:i,contentForShadowEntity:o})},e.prototype.handleNewEntity=function(e){var t=e.wrapper,n=this.editor.getDocument().createDocumentFragment(),o=this.state.shadowEntityCache[e.id];if(delete this.state.shadowEntityCache[e.id],(null==o?void 0:o.shadowRoot)&&(0,r.moveChildNodes)(n,o.shadowRoot),this.triggerEvent(t,0,void 0,n),n.firstChild)t.shadowRoot?(0,r.moveChildNodes)(t.shadowRoot,n):this.createShadowRoot(t,n);else if(t.shadowRoot){this.triggerEvent(t,10);var i=t.cloneNode();(0,r.moveChildNodes)(i,t),this.editor.replaceNode(t,i),e.wrapper=i}this.setIsEntityKnown(e.wrapper,!0)},e.prototype.getExistingEntities=function(e){return this.editor.queryElements((0,r.getEntitySelector)()).map(r.getEntityFromElement).filter((function(t){return!(!t||e&&!t.wrapper.shadowRoot)}))},e.prototype.createShadowRoot=function(e,t){if(e.attachShadow){var n=e.attachShadow({mode:"open",delegatesFocus:!0});return e.contentEditable="false",this.triggerEvent(e,9),(0,r.moveChildNodes)(n,t),n}},e.prototype.cacheShadowEntities=function(e){this.getExistingEntities(!0).forEach((function(t){var n=t.wrapper,r=t.id;e[r]=n}))},e.prototype.ensureUniqueId=function(e,t,n){for(var r=o.exec(t),i=(r?t.substr(0,t.length-r[0].length):t)||e,a="",l=r&&parseInt(r[1])||0;;l++)if(a=l>0?i+"_"+l:i,n.indexOf(a)<0){n.push(a);break}return a},e.prototype.setIsEntityKnown=function(e,t){var n=this.state.knownEntityElements.indexOf(e);t&&n<0?this.state.knownEntityElements.push(e):!t&&n>=0&&this.state.knownEntityElements.splice(n,1)},e.prototype.isEntityKnown=function(e){return this.state.knownEntityElements.indexOf(e)>=0},e}();t.default=l;var s=r.Browser.isIE?function(e){e.runAsync((function(e){var t=e.getCustomData("ENTITY_IE_FOCUS_BUTTON",(function(){var t=(0,r.createElement)({tag:"button",style:"overflow:hidden;position:fixed;width:0;height:0;top:-1000px"},e.getDocument());return t.onblur=function(){t.style.display="none"},e.insertNode(t,{position:4}),t}));t.style.display="",(0,r.addRangeToSelection)((0,r.createRange)(t,0))}))}:function(){}},function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=i.Browser.isFirefox?((r={}).enableObjectResizing=!1,r.enableInlineTableEditing=!1,r):i.Browser.isIE?((o={}).defaultParagraphSeparator="div",o.AutoUrlDetect=!1,o):{},l={darkModeColor:"rgb(51,51,51)",lightModeColor:"rgb(255,255,255)"},s={darkModeColor:"rgb(255,255,255)",lightModeColor:"rgb(0,0,0)"},u=function(){function e(e,t){var n=this;this.initialContent=e.initialContent||t.innerHTML||"",this.contentDivFormat=(0,i.getComputedStyles)(t),null===t.getAttribute("contenteditable")&&(this.initializer=function(){t.contentEditable="true",t.style.userSelect="text",t.style.webkitUserSelect="text"},this.disposer=function(){t.style.userSelect="",t.style.webkitUserSelect="",t.removeAttribute("contenteditable")}),this.adjustColor=e.doNotAdjustEditorColor?function(){}:function(){var e=s,r=l,o=n.state.isDarkMode;(0,i.setColor)(t,e,!1,o),(0,i.setColor)(t,r,!0,o)},this.state={customData:{},defaultFormat:e.defaultFormat||null,isDarkMode:!!e.inDarkMode,getDarkColor:e.getDarkColor||function(e){return e},onExternalContentTransform:e.onExternalContentTransform,experimentalFeatures:e.experimentalFeatures||[],shadowEditFragment:null,shadowEditSelectionPath:null,shadowEditTableSelectionPath:null}}return e.prototype.getName=function(){return"Lifecycle"},e.prototype.initialize=function(e){var t;this.editor=e,this.recalculateDefaultFormat(),this.editor.setContent(this.initialContent,!1),null===(t=this.initializer)||void 0===t||t.call(this),this.adjustColor(),this.adjustBrowserBehavior(),this.editor.triggerPluginEvent(11,{},!0)},e.prototype.dispose=function(){var e=this;this.editor.triggerPluginEvent(12,{},!0),Object.keys(this.state.customData).forEach((function(t){var n=e.state.customData[t];n&&n.disposer&&n.disposer(n.value),delete e.state.customData[t]})),this.disposer&&(this.disposer(),this.disposer=null,this.initializer=null),this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){7!=e.eventType||"SwitchToDarkMode"!=e.source&&"SwitchToLightMode"!=e.source||(this.state.isDarkMode="SwitchToDarkMode"==e.source,this.recalculateDefaultFormat(),this.adjustColor())},e.prototype.adjustBrowserBehavior=function(){var e=this;Object.keys(a).forEach((function(t){try{e.editor.getDocument().execCommand(t,!1,a[t])}catch(e){}}))},e.prototype.recalculateDefaultFormat=function(){var e=this.state,t=e.defaultFormat,n=e.isDarkMode;if(n&&t&&(t.backgroundColors||(t.backgroundColors=l),t.textColors||(t.textColors=s)),!t||0!==Object.keys(t).length){var r=t||{},o=r.fontFamily,i=r.fontSize,a=r.textColor,u=r.textColors,c=r.backgroundColor,d=r.backgroundColors,f=r.bold,h=r.italic,p=r.underline,g=this.contentDivFormat;this.state.defaultFormat={fontFamily:o||g[0],fontSize:i||g[1],get textColor(){return u?n?u.darkModeColor:u.lightModeColor:a||g[2]},textColors:u,get backgroundColor(){return d?n?d.darkModeColor:d.lightModeColor:c||""},backgroundColors:d,bold:f,italic:h,underline:p}}},e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){var e=this;this.onMouseUp=function(t){e.editor&&(e.removeMouseUpEventListener(),e.editor.triggerPluginEvent(6,{rawEvent:t,isClicking:e.mouseDownX==t.pageX&&e.mouseDownY==t.pageY}))}}return e.prototype.getName=function(){return"MouseUp"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.removeMouseUpEventListener(),this.editor=null},e.prototype.onPluginEvent=function(e){5!=e.eventType||this.mouseUpEventListerAdded||(this.editor.getDocument().addEventListener("mouseup",this.onMouseUp,!0),this.mouseUpEventListerAdded=!0,this.mouseDownX=e.rawEvent.pageX,this.mouseDownY=e.rawEvent.pageY)},e.prototype.removeMouseUpEventListener=function(){this.mouseUpEventListerAdded&&(this.mouseUpEventListerAdded=!1,this.editor.getDocument().removeEventListener("mouseup",this.onMouseUp,!0))},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(){}return e.prototype.getName=function(){return"NormalizeTable"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 11:case 7:this.normalizeTables(this.editor.queryElements("table"));break;case 10:this.normalizeTables((0,r.toArray)(e.fragment.querySelectorAll("table")));break;case 5:this.normalizeTableFromEvent(e.rawEvent);break;case 0:e.rawEvent.shiftKey&&this.normalizeTableFromEvent(e.rawEvent)}},e.prototype.normalizeTableFromEvent=function(e){var t=this.editor.getElementAtCursor("table",e.target);t&&this.normalizeTables([t])},e.prototype.normalizeTables=function(e){if(e.length>0){var t=this.editor.getSelectionRangeEx(),n=0==(null==t?void 0:t.type)&&t.ranges[0]||{},o=n.startContainer,i=n.endContainer,a=n.startOffset,l=n.endOffset;(function(e){var t=!1;return e.forEach((function(e){for(var n=null,o=e.firstChild;o;o=o.nextSibling){switch((0,r.getTagOfNode)(o)){case"TR":n||(n=e.ownerDocument.createElement("tbody"),e.insertBefore(n,o)),n.appendChild(o),o=n,t=!0;break;case"TBODY":n?((0,r.moveChildNodes)(n,o,!0),o.parentNode.removeChild(o),o=n,t=!0):n=o;break;default:n=null}}})),t})(e)&&(o&&i?this.editor.select(o,a,i,l):1==(null==t?void 0:t.type)&&this.editor.select(t.table,t.coordinates))}},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(){this.state={pendableFormatPosition:null,pendableFormatState:null}}return e.prototype.getName=function(){return"PendingFormatState"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null,this.clear()},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 13:this.state.pendableFormatPosition=this.getCurrentPosition(),this.state.pendableFormatState=e.formatState;break;case 0:case 5:case 7:this.state.pendableFormatPosition&&!this.state.pendableFormatPosition.equalTo(this.getCurrentPosition())&&this.clear()}},e.prototype.clear=function(){this.state.pendableFormatPosition=null,this.state.pendableFormatState=null},e.prototype.getCurrentPosition=function(){var e=this.editor.getSelectionRange();return e&&r.Position.getStart(e).normalize()},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(){}return e.prototype.getName=function(){return"TypeInContainer"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){if(1==e.eventType){var t=this.editor.getSelectionRange(),n=this.editor.isFeatureEnabled("AlwaysApplyDefaultFormat");if(!t||this.editor.contains((0,r.findClosestElementAncestor)(t.startContainer,null,n?"[style]":null)))return;t.collapsed?this.editor.ensureTypeInContainer(r.Position.getStart(t),e.rawEvent):this.editor.runAsync((function(t){t.ensureTypeInContainer(t.getFocusedPosition(),e.rawEvent)}))}},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e){var t,n;this.state={snapshotsService:e.undoMetadataSnapshotService||(n=e.undoSnapshotService,n?{canMove:function(e){return n.canMove(e)},move:function(e){return{html:n.move(e),metadata:null}},addSnapshot:function(e,t){return n.addSnapshot(e.html+(e.metadata?"\x3c!--"+JSON.stringify(e.metadata)+"--\x3e":""),t)},clearRedo:function(){return n.clearRedo()},canUndoAutoComplete:function(){return n.canUndoAutoComplete()}}:void 0)||(t=(0,r.createSnapshots)(1e7),{canMove:function(e){return(0,r.canMoveCurrentSnapshot)(t,e)},move:function(e){return(0,r.moveCurrentSnapshot)(t,e)},addSnapshot:function(e,n){return(0,r.addSnapshotV2)(t,e,n)},clearRedo:function(){return(0,r.clearProceedingSnapshotsV2)(t)},canUndoAutoComplete:function(){return(0,r.canUndoAutoComplete)(t)}}),isRestoring:!1,hasNewContent:!1,isNested:!1,autoCompletePosition:null}}return e.prototype.getName=function(){return"Undo"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.willHandleEventExclusively=function(e){return 0==e.eventType&&8==e.rawEvent.which&&this.canUndoAutoComplete()},e.prototype.onPluginEvent=function(e){if(this.editor&&!this.editor.isInIME())switch(e.eventType){case 11:var t=this.editor.getUndoState();t.canUndo||t.canRedo||this.addUndoSnapshot();break;case 0:this.onKeyDown(e.rawEvent);break;case 1:this.onKeyPress(e.rawEvent);break;case 4:this.clearRedoForInput(),this.addUndoSnapshot();break;case 7:this.state.isRestoring||"SwitchToDarkMode"==e.source||"SwitchToLightMode"==e.source||this.clearRedoForInput()}},e.prototype.onKeyDown=function(e){if(8==e.which||46==e.which)if(8==e.which&&this.canUndoAutoComplete())e.preventDefault(),this.editor.undo(),this.state.autoCompletePosition=null,this.lastKeyPress=e.which;else{var t=this.editor.getSelectionRange();!t||t.collapsed&&this.lastKeyPress==e.which&&!(0,r.isCtrlOrMetaPressed)(e)||this.addUndoSnapshot(),this.state.hasNewContent=!0,this.lastKeyPress=e.which}else e.which>=33&&e.which<=40&&(this.state.hasNewContent&&this.addUndoSnapshot(),this.lastKeyPress=0)},e.prototype.onKeyPress=function(e){if(!e.metaKey){var t=this.editor.getSelectionRange();t&&!t.collapsed||32==e.which&&32!=this.lastKeyPress||13==e.which?(this.addUndoSnapshot(),13==e.which&&(this.state.hasNewContent=!0)):this.clearRedoForInput(),this.lastKeyPress=e.which}},e.prototype.clearRedoForInput=function(){this.state.snapshotsService.clearRedo(),this.lastKeyPress=0,this.state.hasNewContent=!0},e.prototype.canUndoAutoComplete=function(){var e;return this.state.snapshotsService.canUndoAutoComplete()&&(null===(e=this.state.autoCompletePosition)||void 0===e?void 0:e.equalTo(this.editor.getFocusedPosition()))},e.prototype.addUndoSnapshot=function(){this.editor.addUndoSnapshot(),this.state.autoCompletePosition=null},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(175);t.default=function(e){try{var t=r(e||void 0),n=t.lab().array(),o=.78753*(100-n[0])+21.247;e=r.lab(o,n[1],n[2]).rgb().alpha(t.alpha()).toString()}catch(e){}return e}},function(e,t,n){"use strict";var r=n(176),o=n(179),i=[].slice,a=["keyword","gray","hex"],l={};Object.keys(o).forEach((function(e){l[i.call(o[e].labels).sort().join("")]=e}));var s={};function u(e,t){if(!(this instanceof u))return new u(e,t);if(t&&t in a&&(t=null),t&&!(t in o))throw new Error("Unknown model: "+t);var n,c;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof u)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"==typeof e){var d=r.get(e);if(null===d)throw new Error("Unable to parse color from string: "+e);this.model=d.model,c=o[this.model].channels,this.color=d.value.slice(0,c),this.valpha="number"==typeof d.value[c]?d.value[c]:1}else if(e.length){this.model=t||"rgb",c=o[this.model].channels;var f=i.call(e,0,c);this.color=h(f,c),this.valpha="number"==typeof e[c]?e[c]:1}else if("number"==typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var p=Object.keys(e);"alpha"in e&&(p.splice(p.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);var g=p.sort().join("");if(!(g in l))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=l[g];var v=o[this.model].labels,m=[];for(n=0;n<v.length;n++)m.push(e[v[n]]);this.color=h(m)}if(s[this.model])for(c=o[this.model].channels,n=0;n<c;n++){var y=s[this.model][n];y&&(this.color[n]=y(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function c(e,t,n){return(e=Array.isArray(e)?e:[e]).forEach((function(e){(s[e]||(s[e]=[]))[t]=n})),e=e[0],function(r){var o;return arguments.length?(n&&(r=n(r)),(o=this[e]()).color[t]=r,o):(o=this[e]().color[t],n&&(o=n(o)),o)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function f(e){return Array.isArray(e)?e:[e]}function h(e,t){for(var n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}u.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var t=this.model in r.to?this:this.rgb(),n=1===(t=t.round("number"==typeof e?e:1)).valpha?t.color:t.color.concat(this.valpha);return r.to[t.model](n)},percentString:function(e){var t=this.rgb().round("number"==typeof e?e:1),n=1===t.valpha?t.color:t.color.concat(this.valpha);return r.to.rgb.percent(n)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var e={},t=o[this.model].channels,n=o[this.model].labels,r=0;r<t;r++)e[n[r]]=this.color[r];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray:function(){var e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject:function(){var e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round:function(e){return e=Math.max(e||0,0),new u(this.color.map(function(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}(e)).concat(this.valpha),this.model)},alpha:function(e){return arguments.length?new u(this.color.concat(Math.max(0,Math.min(1,e))),this.model):this.valpha},red:c("rgb",0,d(255)),green:c("rgb",1,d(255)),blue:c("rgb",2,d(255)),hue:c(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:c("hsl",1,d(100)),lightness:c("hsl",2,d(100)),saturationv:c("hsv",1,d(100)),value:c("hsv",2,d(100)),chroma:c("hcg",1,d(100)),gray:c("hcg",2,d(100)),white:c("hwb",1,d(100)),wblack:c("hwb",2,d(100)),cyan:c("cmyk",0,d(100)),magenta:c("cmyk",1,d(100)),yellow:c("cmyk",2,d(100)),black:c("cmyk",3,d(100)),x:c("xyz",0,d(100)),y:c("xyz",1,d(100)),z:c("xyz",2,d(100)),l:c("lab",0,d(100)),a:c("lab",1),b:c("lab",2),keyword:function(e){return arguments.length?new u(e):o[this.model].keyword(this.color)},hex:function(e){return arguments.length?new u(e):r.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity:function(){for(var e=this.rgb().color,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return u.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var n=e.rgb(),r=this.rgb(),o=void 0===t?.5:t,i=2*o-1,a=n.alpha()-r.alpha(),l=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,s=1-l;return u.rgb(l*n.red()+s*r.red(),l*n.green()+s*r.green(),l*n.blue()+s*r.blue(),n.alpha()*o+r.alpha()*(1-o))}},Object.keys(o).forEach((function(e){if(-1===a.indexOf(e)){var t=o[e].channels;u.prototype[e]=function(){if(this.model===e)return new u(this);if(arguments.length)return new u(arguments,e);var n="number"==typeof arguments[t]?t:this.valpha;return new u(f(o[this.model][e].raw(this.color)).concat(n),e)},u[e]=function(n){return"number"==typeof n&&(n=h(i.call(arguments),t)),new u(n,e)}}})),e.exports=u},function(e,t,n){var r=n(83),o=n(177),i=Object.hasOwnProperty,a={};for(var l in r)i.call(r,l)&&(a[r[l]]=l);var s=e.exports={to:{},get:{}};function u(e,t,n){return Math.min(Math.max(t,e),n)}function c(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}s.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=s.get.hsl(e),n="hsl";break;case"hwb":t=s.get.hwb(e),n="hwb";break;default:t=s.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},s.get.rgb=function(e){if(!e)return null;var t,n,o,a=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=t[2],t=t[1],n=0;n<3;n++){var l=2*n;a[n]=parseInt(t.slice(l,l+2),16)}o&&(a[3]=parseInt(o,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(o=(t=t[1])[3],n=0;n<3;n++)a[n]=parseInt(t[n]+t[n],16);o&&(a[3]=parseInt(o+o,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)a[n]=parseInt(t[n+1],0);t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:i.call(r,t[1])?((a=r[t[1]])[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}for(n=0;n<3;n++)a[n]=u(a[n],0,255);return a[3]=u(a[3],0,1),a},s.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,u(parseFloat(t[2]),0,100),u(parseFloat(t[3]),0,100),u(isNaN(n)?1:n,0,1)]}return null},s.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,u(parseFloat(t[2]),0,100),u(parseFloat(t[3]),0,100),u(isNaN(n)?1:n,0,1)]}return null},s.to.hex=function(){var e=o(arguments);return"#"+c(e[0])+c(e[1])+c(e[2])+(e[3]<1?c(Math.round(255*e[3])):"")},s.to.rgb=function(){var e=o(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},s.to.rgb.percent=function(){var e=o(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},s.to.hsl=function(){var e=o(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},s.to.hwb=function(){var e=o(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},s.to.keyword=function(e){return a[e.slice(0,3)]}},function(e,t,n){"use strict";var r=n(178),o=Array.prototype.concat,i=Array.prototype.slice,a=e.exports=function(e){for(var t=[],n=0,a=e.length;n<a;n++){var l=e[n];r(l)?t=o.call(t,i.call(l)):t.push(l)}return t};a.wrap=function(e){return function(){return e(a(arguments))}}},function(e,t){e.exports=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},function(e,t,n){var r=n(84),o=n(180),i={};Object.keys(r).forEach((function(e){i[e]={},Object.defineProperty(i[e],"channels",{value:r[e].channels}),Object.defineProperty(i[e],"labels",{value:r[e].labels});var t=o(e);Object.keys(t).forEach((function(n){var r=t[n];i[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,o=0;o<r;o++)n[o]=Math.round(n[o]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),i[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=i},function(e,t,n){var r=n(84);function o(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,o=0;o<n;o++)e[t[o]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var o=n.pop(),i=Object.keys(r[o]),a=i.length,l=0;l<a;l++){var s=i[l],u=t[s];-1===u.distance&&(u.distance=t[o].distance+1,u.parent=o,n.unshift(s))}return t}function i(e,t){return function(n){return t(e(n))}}function a(e,t){for(var n=[t[e].parent,e],o=r[t[e].parent][e],a=t[e].parent;t[a].parent;)n.unshift(t[a].parent),o=i(r[t[a].parent][a],o),a=t[a].parent;return o.conversion=n,o}e.exports=function(e){for(var t=o(e),n={},r=Object.keys(t),i=r.length,l=0;l<i;l++){var s=r[l];null!==t[s].parent&&(n[s]=a(s,t))}return n}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(182),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllFeatures=t.ContentEdit=void 0;var r=n(183);Object.defineProperty(t,"ContentEdit",{enumerable:!0,get:function(){return r.default}});var o=n(86);Object.defineProperty(t,"getAllFeatures",{enumerable:!0,get:function(){return o.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86),o=function(){function e(e,t){this.settingsOverride=e,this.additionalFeatures=t}return e.prototype.getName=function(){return"ContentEdit"},e.prototype.initialize=function(e){var t=this,n=[],o=(0,r.default)();Object.keys(o).forEach((function(e){var r=o[e],i=t.settingsOverride&&void 0!==t.settingsOverride[e];(i&&t.settingsOverride[e]||!i&&!r.defaultDisabled)&&n.push(r)})),n.concat(this.additionalFeatures||[]).forEach((function(t){return e.addContentEditFeature(t)}))},e.prototype.dispose=function(){},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoLinkFeatures=void 0;var r=n(6),o=n(0),i=/[.+=\s:;"',>]+$/i,a={keys:[13,32,257],shouldHandleEvent:s,handleEvent:function(e,t){var n=t.getDocument().createElement("a"),i=s(e,t),a=t.getContentSearcherOfCursor();n.textContent=i.originalUrl,n.href=i.normalizedUrl,t.runAsync((function(t){t.addUndoSnapshot((function(){return(0,r.replaceWithNode)(t,i.originalUrl,n,!1,a),(0,o.clearEventDataCache)(e),n}),"AutoLink",!0)}))}},l={keys:[8],shouldHandleEvent:function(e,t){return t.getContentSearcherOfCursor(e).getInlineElementBefore()instanceof o.LinkInlineElement},handleEvent:function(e,t){e.rawEvent.preventDefault(),(0,r.removeLink)(t)},defaultDisabled:!0};function s(e,t){return 0==e.eventType||7==e.eventType&&"Paste"==e.source?(0,o.cacheGetEventData)(e,"LINK_DATA",(function(){var n=7==e.eventType&&"Paste"==e.source&&e.data,r=(0,o.matchLink)((n.text||"").trim()),a=t.getContentSearcherOfCursor(e);if(r&&a.getRangeFromText(r.originalUrl,!1))return r;var l=a&&a.getWordBefore();if(l&&l.length>5){var s=(l.match(i)||[])[0]||"",u=l.substring(0,l.length-s.length);return["()","{}","[]"].forEach((function(e){u[u.length-1]==e[1]&&u.indexOf(e[0])<0&&(u=u.substr(0,u.length-1))})),(0,o.matchLink)(u)}return null})):null}t.AutoLinkFeatures={autoLink:a,unlinkWhenBackspaceAfterLink:l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNewFontSize=t.FONT_SIZES=void 0;var r=n(35),o=n(0);t.FONT_SIZES=[8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72];function i(e,t,n){e=1==t?Math.floor(e):Math.ceil(e);var r=n[n.length-1];if(e<=n[0])e=Math.max(e+t,1);else if(e>r||e==r&&1==t)e/=10,e=1==t?Math.floor(e):Math.ceil(e),e=Math.min(Math.max(10*(e+t),r),1e3);else if(1==t){for(var o=0;o<n.length;o++)if(e<n[o]){e=n[o];break}}else for(o=n.length-1;o>=0;o--)if(e>n[o]){e=n[o];break}return e}t.default=function(e,n,a){void 0===a&&(a=t.FONT_SIZES);var l=0==n?1:-1;(0,r.default)(e,(function(e){var t=parseFloat((0,o.getComputedStyle)(e,"font-size"));e.style.fontSize=i(t,l,a)+"pt","normal"!=(0,o.getComputedStyle)(e,"line-height")&&(e.style.lineHeight="normal")}))},t.getNewFontSize=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(87);t.default=function(e){(0,r.default)(e,1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=/^[a-zA-Z]+:/i,i=/^[\w.%+-]+@/i,a=/^ftp\./i;function l(e){return e.queryElements("a[href]",1)[0]}function s(e,t){t&&e.textContent!=t&&(e.textContent=t)}t.default=function(e,t,n,u){e.focus();var c=(function(e){var t=new r.HtmlSanitizer,n=document.createElement("a");return n.href=e||"",t.sanitize(n),n.getAttribute("href")}(t)||"").trim();if(c){var d=(0,r.matchLink)(c),f=d?d.normalizedUrl:function(e){if(!e)return e;var t="";return e.search(o)<0&&(t=0==e.search(i)?"mailto:":0==e.search(a)?"ftp://":"http://"),t+e}(c),h=d?d.originalUrl:c;e.addUndoSnapshot((function(){var t=e.getSelectionRange(),r=null;if(t&&t.collapsed)(r=l(e))?(r.href=f,s(r,u)):((r=e.getDocument().createElement("A")).textContent=u||h,r.href=f,e.insertNode(r));else{e.getDocument().execCommand("createLink",!1,f);for(var o=e.getSelectionTraverser(),i=o.getNextInlineElement();i;){var a=i.getContainerNode();a.parentElement.removeChild(a),i=o.getNextInlineElement()}s(r=l(e),u)}return n&&r&&(r.title=n),r}),"CreateLink")}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getElementBasedFormatState=void 0;var o=n(0);function i(e,t){var n=(0,o.getTagOfNode)(e.getElementAtCursor("OL,UL",null,t)),r=(0,o.getTagOfNode)(e.getElementAtCursor("H1,H2,H3,H4,H5,H6",null,t));return{isBullet:"UL"==n,isNumbering:"OL"==n,headerLevel:r&&parseInt(r[1])||0,canUnlink:!!e.queryElements("a[href]",1)[0],canAddImageAltText:!!e.queryElements("img",1)[0],isBlockQuote:!!e.queryElements("blockquote",1)[0],isInTable:!!e.queryElements("table",1)[0]}}t.getElementBasedFormatState=i,t.default=function(e,t){return r(r(r(r(r({},e.getPendableFormatState(!1)),i(e,t)),e.getStyleBasedFormatState()),e.getUndoState()),{isDarkMode:e.isDarkMode(),zoomScale:e.getZoomScale()})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t,n,o,i,a){var l=(0,r.wrap)(n,o?"DIV":"SPAN");if(!o&&i&&(l.style.display="inline-block"),(0,r.commitEntity)(l,t,i),!e.contains(l)){var s=void 0,u=void 0;if("number"==typeof a)u=a;else if(a){s=e.getSelectionRange();var c=a.normalize().node,d=c&&e.getElementAtCursor((0,r.getEntitySelector)(),c);d&&(a=new r.Position(d,-3)),e.select(a),u=3}else e.focus(),u=3;e.insertNode(l,{updateCursor:!1,insertOnNewLine:o,replaceSelection:!0,position:u}),3==u&&(s?e.select(s):o||e.select(l,-3))}if(o){var f=e.getDocument().createElement("BR");l.parentNode.insertBefore(f,l.nextSibling)}var h=(0,r.getEntityFromElement)(l);return e.triggerContentChangedEvent("InsertEntity",h),h}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);function o(e,t){e.addUndoSnapshot((function(){var n=e.getDocument().createElement("img");n.src=t,n.style.maxWidth="100%",e.insertNode(n)}),"Format")}t.default=function(e,t){"string"==typeof t?o(e,t):(0,r.readFile)(t,(function(t){t&&!e.isDisposed()&&o(e,t)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);function o(e){return e<=4?"120px":e<=6?"100px":"70px"}t.default=function(e,t,n,i){var a=e.getDocument(),l=a.createDocumentFragment(),s=a.createElement("table");l.appendChild(s),s.cellSpacing="0",s.cellPadding="1";for(var u=0;u<n;u++){var c=a.createElement("tr");s.appendChild(c);for(var d=0;d<t;d++){var f=a.createElement("td");c.appendChild(f),f.appendChild(a.createElement("br")),f.style.width=o(t)}}e.focus(),e.addUndoSnapshot((function(){var t=new r.VTable(s);t.applyFormat(i),t.writeBack(),e.insertNode(l),e.runAsync((function(e){return e.select(new r.Position(s,0).normalize())}))}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){var n=e.getElementAtCursor("TD,TH");n&&e.addUndoSnapshot((function(){var o=new r.VTable(n);!function(e,t){var n=e.getSelectionRangeEx();n&&1===n.type&&(t.selection=n.coordinates)}(e,o),o.edit(t),o.writeBack(),e.transformToDarkColor(o.table),e.focus();var i=function(e,t,n){var r=t,o=n;switch(e){case 0:o=0;break;case 1:r+=1,o=0;break;case 2:r=0;break;case 3:r=0,o+=1}return{newRow:r,newCol:o}}(t,o.row,o.col);e.select(o.getCell(i.newRow,i.newCol).td,0)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t,n){(n=n||e.getElementAtCursor("TABLE"))&&e.addUndoSnapshot((function(o,i){var a=new r.VTable(n);a.applyFormat(t),a.writeBack(),e.transformToDarkColor(a.table),e.focus(),e.select(o,i)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e){e.focus(),e.addUndoSnapshot((function(t,n){e.queryElements("a[href]",1,r.unwrap),e.select(t,n)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o){if(!t||!n)return!1;var i;if(i="string"==typeof t?(o=o||e.getContentSearcherOfCursor())&&o.getRangeFromText(t,r):t){var a=e.getSelectionRange();return a.collapsed&&i.endContainer==a.startContainer&&i.endOffset==a.startOffset&&(r=!0),e.insertNode(n,{position:5,updateCursor:r,replaceSelection:!0,insertOnNewLine:!1,range:i}),!0}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){t&&e.addUndoSnapshot((function(){t.style.transform="rotate("+n+"deg)"}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),o=n(0);t.default=function(e,t){var n=e.getSelectionRangeEx(),i=n&&1===n.type;e.addUndoSnapshot((function(){e.isFeatureEnabled("TableAlignment")&&i&&(0,o.isWholeTableSelected)(new o.VTable(n.table),n.coordinates)?function(e,t){var n=e.table;1==t?(n.style.marginLeft="auto",n.style.marginRight="auto"):2==t?(n.style.marginLeft="auto",n.style.marginRight=""):(n.style.marginLeft="",n.style.marginRight="auto")}(n,t):function(e,t){var n="left",o="justifyLeft";1==t?(o="justifyCenter",n="center"):2==t&&(o="justifyRight",n="right");(0,r.default)(e,o),e.queryElements("[align]",1,(function(e){return e.style.textAlign=n}))}(e,t)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(199);t.default=function(e,t){e.focus(),e.addUndoSnapshot((function(n,o){(0,r.default)(e,(function(e){e.setAttribute("dir",0==t?"ltr":"rtl"),e.style.textAlign=0==t?"left":"right"})),e.select(n,o)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);function o(e){var t=e.getStartNode();return t==e.getEndNode()&&3==t.nodeType&&["TR","TABLE"].indexOf((0,r.getTagOfNode)(t.parentNode))>=0}t.default=function(e,t){for(var n=e.getSelectionTraverser(),r=n&&n.currentBlockElement,i=[];r;)o(r)||i.push(r),r=n.getNextBlockElement();i.forEach((function(e){var n=e.collapseToSingleElement();t(n)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e.focus(),e.addUndoSnapshot((function(){e.queryElements("img",1,(function(e){return e.setAttribute("alt",t)}))}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),o=n(0);function i(e,t){var n=(0,o.collapseNodesInRegion)(e,t);(0,o.wrap)(n,2)}function a(e,t){t.forEach((function(t){var n=t.collapseToSingleElement(),r=(0,o.findClosestElementAncestor)(n,e.rootNode,"blockquote");if(r){for(n==r&&(n=(0,o.wrap)((0,o.toArray)(n.childNodes)));(0,o.isNodeInRegion)(e,n)&&"BLOCKQUOTE"!=(0,o.getTagOfNode)(n);)n=(0,o.splitBalancedNodeRange)(n);(0,o.isNodeInRegion)(e,n)&&(0,o.unwrap)(n)}}))}function l(e,t){var n;return(null===(n=e.items[0])||void 0===n?void 0:n.getNode())==t&&e.getListItemIndex(t)==(e.getStart()||1)}function s(e,t,n){return 0==e||t.getElementAtCursor("blockquote",n)}t.default=function(e,t){var n=0==t?i:a;(0,r.default)(e,(function(r,i,a){for(var u=(0,o.getSelectedBlockElementsInRegion)(r,!0),c=[[]],d=0;d<u.length;d++){var f=u[d].getStartNode(),h=(0,o.createVListFromRegion)(r,!0,f);if(h){for(;u[d+1]&&h.contains(u[d+1].getStartNode());)d++;var p=e.isFeatureEnabled("TabKeyTextFeatures");if(h.rootList.style.listStylePosition="inside",p&&l(h,f)&&s(t,e,f)){var g=e.getBlockElementAtNode(h.rootList);c.push([g])}else 1==t?h.setIndentation(i,a,t,!1,p):h.setIndentation(i,a,t),h.writeBack(),c.push([])}else c[c.length-1].push(u[d])}c.forEach((function(e){return n(r,e)}))}),(function(){var n=e.getSelectionRangeEx();if(1==n.type&&(0,o.isWholeTableSelected)(new o.VTable(n.table),n.coordinates)){if(1==t){var r=e.getElementAtCursor("blockquote",n.table);(0,o.unwrap)(r)}else 0==t&&(0,o.wrap)(n.table,2);return!1}return!0}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=n(0);t.default=function(e,t,n){function i(e,n){switch(t){case"lowercase":return e.toLocaleLowerCase(n);case"uppercase":return e.toLocaleUpperCase(n);case"capitalize":for(var r=e.toLocaleLowerCase(n).split(" "),o=0;o<r.length;o++)r[o]=r[o].charAt(0).toLocaleUpperCase(n)+r[o].slice(1);return r.join(" ");case"sentence":var i=new RegExp("^\\s*\\w|[\\.\\!\\?]\\s+\\w","g");return e.toLocaleLowerCase(n).replace(i,(function(e){return e.toLocaleUpperCase(n)}))}}(0,r.default)(e,(function(e){for(var t=(0,o.getFirstLeafNode)(e);t;t=(0,o.getNextLeafSibling)(e,t))if(3==t.nodeType)try{t.textContent=i(t.textContent,n)}catch(e){t.textContent=i(t.textContent,void 0)}}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(51);t.default=function(e){(0,r.default)(e,2)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(51);t.default=function(e,t){(0,r.default)(e,1,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t,n){void 0===n&&(n=1),e.addUndoSnapshot((function(){e.focus();var o=e.getSelectedRegions();if(o[0]){var i=(0,r.createVListFromRegion)(o[0],!1,t);i&&(i.split(t,n),i.writeBack())}}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(96),o=n(0),i=function(e){e.style.borderLeft="3px solid",e.style.borderColor="#C8C8C8",e.style.paddingLeft="10px",e.style.color="#666666"};t.default=function(e,t){(0,r.default)(e,(function(e){var n=(0,o.wrap)(e,"blockquote");(t||i)(n)}),(function(){return 0==e.queryElements("blockquote",1,o.unwrap).length}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(96),o=n(0);t.default=function(e,t){(0,r.default)(e,(function(e){var n=(0,o.wrap)(e,"code"),r=(0,o.wrap)(n,"pre");null==t||t(r)}),(function(){return 0==e.queryElements("pre>code",1,(function(e){if(!e.previousSibling&&!e.nextSibling){var t=e.parentNode;(0,o.unwrap)(e),(0,o.unwrap)(t)}})).length}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"strikeThrough")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"subscript")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"superscript")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){t=Math.min(Math.max(Math.round(t),0),6),e.addUndoSnapshot((function(){e.focus();var n=!1;if(e.queryElements("H1,H2,H3,H4,H5,H6",1,(function(t){n||(e.getDocument().execCommand("formatBlock",!1,"<DIV>"),n=!0);var o=e.getDocument().createElement("div");(0,r.moveChildNodes)(o,t),e.replaceNode(t,o)})),t>0){for(var o=e.getSelectionTraverser(),i=o?o.currentBlockElement:null,a=new r.HtmlSanitizer({cssStyleCallbacks:{"font-size":function(){return!1}}});i;){var l=i.collapseToSingleElement();a.sanitize(l),i=o.getNextBlockElement()}e.getDocument().execCommand("formatBlock",!1,"<H"+t+">")}}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){e.focus(),e.addUndoSnapshot((function(){e.getSelectedRegions().forEach((function(n){(0,r.safeInstanceOf)(n.rootNode,"HTMLTableCellElement")&&((0,r.setColor)(n.rootNode,t,!0,e.isDarkMode(),!0),n.rootNode.dataset.cellShade="true",n.rootNode.dataset.originalBackgroundColor=n.rootNode.style.backgroundColor)}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorFeatures=void 0;var r=n(0),o={keys:[37,39],allowFunctionKeys:!0,shouldHandleEvent:function(e,t,n){var o,i;if(!(n&&(o=t.getSelectionRange())&&o.collapsed&&(i=r.Position.getStart(o))&&t.isPositionAtBeginning(i)))return!1;var a="rtl"==(0,r.getComputedStyle)(i.element,"direction"),l=e.rawEvent;return!a&&37==l.which||a&&39==l.which},handleEvent:function(e){e.rawEvent.preventDefault()},defaultDisabled:!r.Browser.isChrome};t.CursorFeatures={noCycleCursorMove:o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntityFeatures=void 0;var r=n(0),o={keys:[13],shouldHandleEvent:function(e,t){return a(e,t)},handleEvent:function(e,t){a(e,t,1)}},i={keys:[27],shouldHandleEvent:function(e,t){return a(e,t)},handleEvent:function(e,t){a(e,t,3)}};function a(e,t,n){var o=(0,r.cacheGetEventData)(e,"READONLY_ENTITY_ELEMENT",(function(){var n=e.rawEvent.target,o=n&&t.getElementAtCursor((0,r.getEntitySelector)(),n);return o&&!o.isContentEditable?o:null}));return o&&void 0!==n&&t.triggerPluginEvent(15,{operation:n,rawEvent:e.rawEvent,entity:(0,r.getEntityFromElement)(o)}),o}var l={keys:[13],shouldHandleEvent:function(e,t){return c(e,t,!0,!1)},handleEvent:function(e,t){var n;e.rawEvent.preventDefault();var o=t.getSelectionRange(),i=r.Position.getEnd(o).normalize().node,a=t.getDocument().createElement("BR");i.parentNode.insertBefore(a,i.nextSibling);var l,s=t.getBlockElementAtNode(i);s&&(l=s.collapseToSingleElement(),null===(n=a.parentNode)||void 0===n||n.removeChild(a)),t.getSelectionRange().deleteContents(),l.nextSibling&&t.select(l.nextSibling,0)}},s={keys:[8],shouldHandleEvent:function(e,t){return c(e,t,!1,!0)},handleEvent:function(e,t){c(e,t,!1,!0,5)}},u={keys:[46],shouldHandleEvent:function(e,t){return c(e,t,!0,!0)},handleEvent:function(e,t){c(e,t,!0,!0,4)}};function c(e,t,n,o,i){var a=(0,r.cacheGetEventData)(e,"NEIGHBOR_ENTITY_ELEMENT_"+n+"_"+o,(function(){var e=t.getSelectionRange();if(o&&!e.collapsed)return null;e.commonAncestorContainer.normalize();var i=r.Position.getEnd(e).normalize(),a=null;if(0==i.offset||i.isAtEnd){var l=t.getBodyTraverser(i.node),s=n?0==i.offset?l.currentInlineElement:l.getNextInlineElement():i.isAtEnd?l.currentInlineElement:l.getPreviousInlineElement(),u=s&&s.getContainerNode();if(!o){var c=t.getBlockElementAtNode(i.node);c&&c.contains(u)||(u=null)}a=u&&t.getElementAtCursor((0,r.getEntitySelector)(),u)}return a}));return a&&void 0!==i&&t.triggerPluginEvent(15,{operation:i,rawEvent:e.rawEvent,entity:(0,r.getEntityFromElement)(a)}),a}t.EntityFeatures={clickOnEntity:o,escapeFromEntity:i,enterBeforeReadonlyEntity:l,backspaceAfterEntity:s,deleteBeforeEntity:u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListFeatures=void 0;var r=n(6),o=n(0),i={keys:[9],shouldHandleEvent:function(e,t){return!e.rawEvent.shiftKey&&m(e,t)},handleEvent:function(e,t){(0,r.setIndentation)(t,0),e.rawEvent.preventDefault()}},a={keys:[9],shouldHandleEvent:function(e,t){return e.rawEvent.shiftKey&&m(e,t)},handleEvent:function(e,t){(0,r.setIndentation)(t,1),e.rawEvent.preventDefault()}},l={keys:[8],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",null,e),r=t.getSelectionRange();return n&&(null==r?void 0:r.collapsed)&&(0,o.isPositionAtBeginningOf)(o.Position.getStart(r),n)},handleEvent:function(e,t){var n=t.getElementAtCursor("LI",null,e);n.previousSibling?(0,r.blockFormat)(t,(function(t,r,i){var a=(0,o.createVListFromRegion)(t,!1,n);a.setIndentation(r,i,1,!0),a.writeBack(),e.rawEvent.preventDefault()})):v(e,t)},defaultDisabled:!0},s={keys:[8],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",null,e);return n&&(0,o.isNodeEmpty)(n)&&!n.previousSibling},handleEvent:v},u={keys:[46],shouldHandleEvent:function(e,t){if(t.getElementAtCursor("LI",null,e))return!1;var n=o.Position.getEnd(t.getSelectionRange()).isAtEnd?function(e,t){return(0,o.cacheGetEventData)(e,"nextSibling",(function(){var e,n=t.getSelectionRange(),r=o.Position.getEnd(n).normalize(),i=t.getBodyTraverser(r.node);return null===(e=null==i?void 0:i.getNextBlockElement())||void 0===e?void 0:e.getStartNode()}))}(e,t):null;return t.getElementAtCursor("LI",n,e)},handleEvent:function(e,t){var n=p(t);t.runAsync((function(e){return(0,r.experimentCommitListChains)(e,n)}))}},c={keys:[13],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",null,e);return!e.rawEvent.shiftKey&&n&&(0,o.isNodeEmpty)(n)},handleEvent:function(e,t){t.addUndoSnapshot((function(){return v(e,t,!1)}),null,!0)},defaultDisabled:!o.Browser.isIE&&!o.Browser.isChrome},d={keys:[32],shouldHandleEvent:function(e,t){if(!m(e,t)){var n=t.getContentSearcherOfCursor(e);return h(n.getSubStringBefore(4))&&!n.getNearestNonTextInlineElement()}return!1},handleEvent:function(e,t){t.insertContent("&nbsp;"),e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var e,n,o=t.getContentSearcherOfCursor(),i=o.getSubStringBefore(4),a=o.getRangeFromText(i,!0);if(a){if(0==i.indexOf("*")||0==i.indexOf("-"))g(t,a),(0,r.toggleBullet)(t);else if(h(i))g(t,a),(0,r.toggleNumbering)(t);else if((n=t.getSelectedRegions())&&1==n.length){var l=parseInt(i);g(t,a),(0,r.toggleNumbering)(t,l)}}else;null===(e=o.getRangeFromText(i,!0))||void 0===e||e.deleteContents()}),null,!0)}},f={keys:[13,9,46,8,258],shouldHandleEvent:function(e,t){return t.queryElements("li",1).length>0},handleEvent:function(e,t){var n=p(t);t.runAsync((function(e){return(0,r.experimentCommitListChains)(e,n)}))}};function h(e){return/^(\*|-|[0-9]{1,2}\.|[0-9]{1,2}\>|[0-9]{1,2}\)|[0-9]{1,2}\-|\([0-9]{1,2}\))$/.test(e)}function p(e){return o.VListChain.createListChains(e.getSelectedRegions())}function g(e,t){var n=e.getBlockElementAtNode(t.startContainer),r=null==n?void 0:n.getEndNode();if(r&&"BR"!=(0,o.getTagOfNode)(r)){var i=e.getDocument().createElement("BR");(0,o.isBlockElement)(r)?r.appendChild(i):r.parentNode.insertBefore(i,r.nextSibling),e.select(t.startContainer,t.startOffset)}}function v(e,t,n){void 0===n&&(n=!0);var i=m(e,t);if(i){var a=i[0],l=(0,o.getTagOfNode)(a);"UL"!=l&&"OL"!=l||(0,r.toggleListType)(t,"UL"==l?2:1,null,n),t.focus(),e.rawEvent.preventDefault()}}function m(e,t){var n=t.getElementAtCursor("LI,TABLE",null,e),r=n&&"LI"==(0,o.getTagOfNode)(n)&&t.getElementAtCursor("UL,OL",n);return r?[r,n]:null}t.ListFeatures={autoBullet:d,indentWhenTab:i,outdentWhenShiftTab:a,outdentWhenBackspaceOnEmptyFirstLine:s,outdentWhenEnterOnEmptyLine:c,mergeInNewLineWhenBackspaceOnFirstChar:l,maintainListChain:f,maintainListChainWhenDelete:u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownFeatures=void 0;var r=n(0);function o(e,t,n,r){return{keys:[e],shouldHandleEvent:function(e,n){return e.rawEvent.shiftKey===r&&!!i(e,n,t)},handleEvent:function(e,r){r.runAsync((function(r){!function(e,t,n,r){t.addUndoSnapshot((function(){var o=i(e,t,n);if(o){var a=o.cloneRange();a.setStart(a.startContainer,a.startOffset+1),o.setEnd(o.endContainer,o.endOffset+1);var l=t.getDocument().createElement(r);l.appendChild(a.extractContents()),o.deleteContents();var s=t.getDocument().createTextNode("​");o.insertNode(s),o.insertNode(l),t.select(s,-1)}}),"Format",!0)}(e,r,t,n)}))}}}function i(e,t,n){return(0,r.cacheGetEventData)(e,"MARKDOWN_RANGE",(function(){var o,i;return t.getContentSearcherOfCursor(e).forEachTextInlineElement((function(e){if(i&&o)return!0;var t=e.getTextContent();if(0==t[t.length-1].trim().length)return!1;if(t[t.length-1]===n)return!1;if(i||(i=e.getStartPosition().move(t.length)),t[0]==n)o=e.getStartPosition();else for(var r=t.length-1;r>0;r--){if(o)return!0;if(t[r]==n&&0==t[r-1].trim().length)return o=e.getStartPosition().move(r),!0}})),!!o&&!!i&&(0,r.createRange)(o,i)}))}var a=o(56,"*","b",!0),l=o(189,"_","i",!0),s=o(192,"~","s",!0),u=o(192,"`","code",!1);t.MarkdownFeatures={markdownBold:a,markdownItalic:l,markdownStrikethru:s,markdownInlineCode:u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteFeatures=void 0;var r=n(6),o=n(0),i="BLOCKQUOTE",a=[i,"LI","TD","TH"].join(","),l={keys:[8],shouldHandleEvent:function(e,t){var n=u(e,t);return n&&(0,o.isNodeEmpty)(n)&&!n.previousSibling},handleEvent:c},s={keys:[13],shouldHandleEvent:function(e,t){var n=u(e,t);return!e.rawEvent.shiftKey&&n&&(0,o.isNodeEmpty)(n)},handleEvent:function(e,t){return t.addUndoSnapshot((function(){return c(e,t)}),null,!0)}};function u(e,t){return(0,o.cacheGetEventData)(e,"QUOTE_CHILD",(function(){var e=t.getElementAtCursor(a);if(e&&(0,o.getTagOfNode)(e)==i){var n=t.getFocusedPosition(),r=n&&t.getBlockElementAtNode(n.normalize().node);if(r){var l=r.getStartNode()==e?r.getStartNode():r.collapseToSingleElement();return(0,o.isNodeEmpty)(l)?l:null}}return null}))}function c(e,t){t.addUndoSnapshot((function(){var n,a,l=u(e,t);(0,o.getTagOfNode)(l)==i&&(l=(0,o.wrap)((0,o.toArray)(l.childNodes))),n=(0,o.splitBalancedNodeRange)(l),a=d(n),(0,o.unwrap)(n),t.select(l,0),a&&(0,r.clearFormat)(t)})),e.rawEvent.preventDefault()}var d=function(e){return!!(e&&(0,o.safeInstanceOf)(e,"HTMLQuoteElement")&&e.style.borderLeft&&e.style.borderColor&&e.style.paddingLeft&&e.style.color)};t.QuoteFeatures={unquoteWhenBackspaceOnEmptyFirstLine:l,unquoteWhenEnterOnEmptyLine:s}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShortcutFeatures=void 0;var r=n(0),o=n(6);function i(e,t,n){return{winKey:e,macKey:t,action:n}}var a=[i(4162,8258,o.toggleBold),i(4169,8265,o.toggleItalic),i(4181,8277,o.toggleUnderline),i(4186,8282,(function(e){return e.undo()})),i(4185,24666,(function(e){return e.redo()})),i(4286,8382,o.toggleBullet),i(4287,8383,o.toggleNumbering),i(20670,24766,(function(e){return(0,o.changeFontSize)(e,0)})),i(20668,24764,(function(e){return(0,o.changeFontSize)(e,1)}))],l={allowFunctionKeys:!0,keys:[66,73,85,89,90,188,190,191],shouldHandleEvent:s,handleEvent:function(e,t){var n=s(e);n&&(n.action(t),e.rawEvent.preventDefault(),e.rawEvent.stopPropagation())}};function s(e){return(0,r.cacheGetEventData)(e,"DEFAULT_SHORT_COMMAND",(function(){var t=e.rawEvent,n=0!=e.eventType||t.altKey?0:t.which|(t.metaKey&&8192)|(t.shiftKey&&16384)|(t.ctrlKey&&4096);return n&&a.filter((function(e){return(r.Browser.isMac?e.macKey:e.winKey)==n}))[0]}))}t.ShortcutFeatures={defaultShortcut:l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructuredNodeFeatures=void 0;var r=n(0),o={TD:"TABLE",TH:"TABLE",LI:"OL,UL"},i=Object.keys(o).join(","),a={keys:[13],shouldHandleEvent:l,handleEvent:function(e,t){var n=l(e,t),o=(0,r.createElement)(1,t.getDocument());t.addUndoSnapshot((function(){n.parentNode.insertBefore(o,n),"TABLE"==(0,r.getTagOfNode)(n)&&t.select(new r.Position(o,0).normalize())})),e.rawEvent.preventDefault()},defaultDisabled:!0};function l(e,t){return(0,r.cacheGetEventData)(e,"FIRST_STRUCTURE",(function(){var n=e.rawEvent.shiftKey?null:t.getElementAtCursor(i);if(n){var a=t.getSelectionRange();if(a&&a.collapsed&&(0,r.isPositionAtBeginningOf)(r.Position.getStart(a),n)&&!t.getBodyTraverser(n).getPreviousBlockElement())return t.getElementAtCursor(o[(0,r.getTagOfNode)(n)])}return null}))}t.StructuredNodeFeatures={insertLineBeforeStructuredNodeFeature:a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableFeatures=void 0;var r=n(6),o=n(0),i={keys:[9],shouldHandleEvent:function(e,t){return s(e,t)&&!u(e,t)},handleEvent:function(e,t){for(var n=e.rawEvent.shiftKey,o=c(e,s(e,t)),i=n?-1:1,a=o.row,l=o.col+i;;l+=i){if(l<0||l>=o.cells[a].length){if((a+=i)<0){t.select(o.table,-2);break}if(a>=o.cells.length){(0,r.editTable)(t,1);break}l=n?o.cells[a].length-1:0}var u=o.getCell(a,l);if(u.td){t.select(u.td,0);break}}e.rawEvent.preventDefault()}},a={keys:[9],shouldHandleEvent:function(e,t){return s(e,t)&&u(e,t)},handleEvent:function(e,t){e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var n=e.rawEvent.shiftKey,o=t.getSelectionRangeEx(),i=s(e,t),a=c(e,i);n&&t.getElementAtCursor("blockquote",a.table,e)?(0,r.setIndentation)(t,1):n||(0,r.setIndentation)(t,0),t.select(o.table,o.coordinates)}))}},l={keys:[38,40],shouldHandleEvent:function(e,t){return s(e,t)&&!u(e,t)},handleEvent:function(e,t){var n,r=s(e,t),i=new o.VTable(r),a=38==e.rawEvent.which,l=a?-1:1,u=e.rawEvent.shiftKey,c=null===(n=t.getDocument().defaultView)||void 0===n?void 0:n.getSelection(),d=null;if(c){for(var f=c.anchorNode,h=c.anchorOffset,p=i.row;p>=0&&p<i.cells.length;p+=l){var g=i.getCell(p,i.col);if(g.td&&g.td!=r){d=g.td;break}}t.runAsync((function(e){var t,n=e.getElementAtCursor();if((0,o.contains)(i.table,n)&&!(0,o.contains)(r,n,!0)){var l=d?new o.Position(d,0):new o.Position(i.table,a?-2:-3);if(u){l=1==l.node.nodeType&&(0,o.isVoidHtmlElement)(l.node)?new o.Position(l.node,l.isAtEnd?-3:-2):l;var s=null===(t=e.getDocument().defaultView)||void 0===t?void 0:t.getSelection();null==s||s.setBaseAndExtent(f,h,l.node,l.offset)}else e.select(l)}}))}},defaultDisabled:!o.Browser.isChrome&&!o.Browser.isSafari};function s(e,t){return(0,o.cacheGetEventData)(e,"TABLE_CELL_FOR_TABLE_FEATURES",(function(){var e=t.getFocusedPosition(),n=e&&t.getElementAtCursor("TD,TH,LI",e.node);return n&&("LI"==(0,o.getTagOfNode)(n)?null:n)}))}function u(e,t){return(0,o.cacheGetEventData)(e,"WHOLE_TABLE_SELECTED_FOR_FEATURES",(function(){var n=s(e,t),r=c(e,n),i=t.getSelectionRangeEx();return 1==i.type&&(0,o.isWholeTableSelected)(r,i.coordinates)}))}function c(e,t){return(0,o.cacheGetEventData)(e,"VTABLE_FOR_TABLE_FEATURES",(function(){return new o.VTable(t)}))}t.TableFeatures={tabInTable:i,upDownInTable:l,indentTableOnTab:a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextFeatures=void 0;var r=n(0),o=n(6),i={keys:[9],shouldHandleEvent:function(e,t){return t.isFeatureEnabled("TabKeyTextFeatures")&&!e.rawEvent.shiftKey&&!t.getElementAtCursor("LI,TABLE",null,e)},handleEvent:function(e,t){var n=t.getSelectionRangeEx();0==n.type&&(t.addUndoSnapshot((function(){if(n.areAllCollapsed)u(t,e);else{var i=n.ranges,a=i[0];if(l(t,a))(0,o.setIndentation)(t,0);else{var s=(0,r.createRange)(a.startContainer,a.startOffset);i.forEach((function(e){return e.deleteContents()})),t.select(s),u(t,e)}}})),e.rawEvent.preventDefault())}},a={keys:[9],shouldHandleEvent:function(e,t){if(e.rawEvent.shiftKey&&t.isFeatureEnabled("TabKeyTextFeatures")){var n=t.getSelectionRangeEx();return 0==n.type&&!n.areAllCollapsed&&t.getElementAtCursor("blockquote",null,e)&&!t.getElementAtCursor("LI,TABLE",null,e)&&l(t,n.ranges[0])}return!1},handleEvent:function(e,t){t.addUndoSnapshot((function(){return(0,o.setIndentation)(t,1)})),e.rawEvent.preventDefault()}};function l(e,t){var n=!1,o=r.Position.getStart(t),i=r.Position.getEnd(t),a=e.getBlockElementAtNode(o.node),l=e.getBlockElementAtNode(i.node);if(a.equals(l)){var u=new r.Position(a.getStartNode(),0),c=new r.Position(a.getEndNode(),-1),d=(0,r.createRange)(u,r.Position.getStart(t)),f=(0,r.createRange)(r.Position.getEnd(t),c);return!n&&s(d)&&s(f)&&(n=!0),n}return!0}function s(e){return""==e.toString()&&0==(0,r.queryElements)(e.commonAncestorContainer,"img,table,ul,ol",null,2,e).length}function u(e,t){for(var n,o=e.getDocument().createElement("span"),i=6-e.getContentSearcherOfCursor(t).getSubStringBefore(Number.MAX_SAFE_INTEGER).length%6,a="",l=0;l<i;l++)a+="&ensp;";e.insertNode(o),o.nextElementSibling&&"A"==(0,r.getTagOfNode)(o.nextElementSibling)&&((n=e.getDocument().createElement("span")).textContent=" ",e.insertNode(n),e.select((0,r.createRange)(n,-2))),e.insertContent(a,{position:5,range:(0,r.createRange)(o,0),updateCursor:!1}),e.select((0,r.createRange)(o,-3)),n&&e.deleteNode(n)}t.TextFeatures={indentWhenTabText:i,outdentWhenTabText:a}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(223),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenu=void 0;var r=n(224);Object.defineProperty(t,"ContextMenu",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e){var t=this;this.options=e,this.onDismiss=function(){var e,n;t.container&&t.isMenuShowing&&(null===(n=(e=t.options).dismiss)||void 0===n||n.call(e,t.container),t.isMenuShowing=!1)}}return e.prototype.getName=function(){return"ContextMenu"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.onDismiss(),this.container&&(this.container.parentNode.removeChild(this.container),this.container=null),this.editor=null},e.prototype.onPluginEvent=function(e){if(16==e.eventType&&e.items.length>0){var t=e.rawEvent,n=e.items;this.onDismiss(),this.options.allowDefaultMenu||t.preventDefault(),this.initContainer(t.pageX,t.pageY),this.options.render(this.container,n,this.onDismiss),this.isMenuShowing=!0}},e.prototype.initContainer=function(e,t){this.container||(this.container=(0,r.createElement)(5,this.editor.getDocument()),this.editor.getDocument().body.appendChild(this.container)),this.container.style.left=e+"px",this.container.style.top=t+"px"},e}();t.default=o},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(226),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomReplace=void 0;var r=n(227);Object.defineProperty(t,"CustomReplace",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n,r){return{sourceString:e,replacementHTML:t,matchSourceCaseSensitive:n,shouldReplace:r}},o=[r(":)","🙂",!0),r(";)","😉",!0),r(":O","😲",!0),r(":o","😯",!0),r("<3","❤️",!0)],i=function(){function e(e){void 0===e&&(e=o),this.updateReplacements(e)}return e.prototype.updateReplacements=function(e){var t;this.replacements=e,this.longestReplacementLength=(t=this.replacements,Math.max.apply(null,t.map((function(e){return e.sourceString.length})))),this.replacementEndCharacters=function(e){for(var t=new Set,n=0,r=e;n<r.length;n++){var o=r[n],i=o.sourceString;if(0!=i.length){var a=i[i.length-1];o.matchSourceCaseSensitive?t.add(a):(t.add(a.toLocaleLowerCase()),t.add(a.toLocaleUpperCase()))}}return t}(this.replacements)},e.prototype.getName=function(){return"CustomReplace"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){var t=this;if(3==e.eventType&&!this.editor.isInIME()&&(e.rawEvent.data&&this.replacementEndCharacters.has(e.rawEvent.data)&&null!=this.editor.getSelectionRange())){var n=this.editor.getContentSearcherOfCursor(e),r=n.getSubStringBefore(this.longestReplacementLength),o=this.getMatchingReplacement(r);if(null!=o&&(!o.shouldReplace||o.shouldReplace(o,n.getWordBefore()))){var i=n.getSubStringBefore(o.sourceString.length),a=n.getRangeFromText(i,!0),l=this.editor.getDocument().createElement("span");l.innerHTML=this.editor.getTrustedHTMLHandler()(o.replacementHTML);var s=1==l.childNodes.length?l.childNodes[0]:l;this.editor.addUndoSnapshot((function(){a.deleteContents(),a.insertNode(s),t.editor.select(s,-1)}),null,!0)}}},e.prototype.getMatchingReplacement=function(e){if(0==e.length)return null;for(var t=e.replace(/\s/g," "),n=t.toLocaleLowerCase(),r=0,o=this.replacements;r<o.length;r++){var i=o[r],a=i.matchSourceCaseSensitive?[t,i.sourceString]:[n,i.sourceString.toLocaleLowerCase()],l=a[0],s=a[1];if(l.substring(l.length-s.length)==s)return i}return null},e}();t.default=i},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(229),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CutPasteListChain=void 0;var r=n(230);Object.defineProperty(t,"CutPasteListChain",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=n(0),i=function(){function e(){var e=this;this.onDrop=function(){e.cacheListChains("Drop")}}return e.prototype.getName=function(){return"CutPasteListChain"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.editor.addDomEventHandler("drop",this.onDrop)},e.prototype.dispose=function(){var e;null===(e=this.disposer)||void 0===e||e.call(this),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){var t;switch(e.eventType){case 9:e.isCut&&this.cacheListChains("Cut");break;case 10:this.cacheListChains("Paste");break;case 7:(null===(t=this.chains)||void 0===t?void 0:t.length)>0&&this.expectedChangeSource==e.source&&((0,r.experimentCommitListChains)(this.editor,this.chains),this.chains=null,this.expectedChangeSource=null)}},e.prototype.cacheListChains=function(e){this.chains=o.VListChain.createListChains(this.editor.getSelectedRegions()),this.expectedChangeSource=e},e}();t.default=i},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(232),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HyperLink=void 0;var r=n(233);Object.defineProperty(t,"HyperLink",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e,t,n){var r=this;void 0===e&&(e=function(e){return e}),this.getTooltipCallback=e,this.target=t,this.onLinkClick=n,this.trackedLink=null,this.onMouse=function(e){var t=r.editor.getElementAtCursor("a[href]",e.target),n=r.tryGetHref(t);n&&r.editor.setEditorDomAttribute("title","mouseover"==e.type?r.getTooltipCallback(n,t):null)},this.onBlur=function(e){r.trackedLink&&r.updateLinkHrefIfShouldUpdate(),r.resetLinkTracking()}}return e.prototype.getName=function(){return"Hyperlink"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.getTooltipCallback&&e.addDomEventHandler({mouseover:this.onMouse,mouseout:this.onMouse,blur:this.onBlur})},e.prototype.dispose=function(){this.disposer&&(this.disposer(),this.disposer=null),this.editor=null},e.prototype.onPluginEvent=function(e){if(6==e.eventType||2==e.eventType&&(!this.isContentEditValue(e.rawEvent)||32==e.rawEvent.which)||7==e.eventType){var t=(n=this.editor.getElementAtCursor("A[href]",null,e))!==this.trackedLink||2==e.eventType||7==e.eventType;this.trackedLink&&(t||this.tryGetHref(this.trackedLink)!==this.originalHref)&&(t&&this.updateLinkHrefIfShouldUpdate(),this.resetLinkTracking()),!this.trackedLink&&this.doesLinkDisplayMatchHref(n)&&(this.trackedLink=n,this.originalHref=this.tryGetHref(n))}var n;if(6==e.eventType&&(n=this.editor.getElementAtCursor("A",e.rawEvent.srcElement))){if(this.onLinkClick&&!1!==this.onLinkClick(n,e.rawEvent))return;var o=void 0;if(!r.Browser.isFirefox&&(o=this.tryGetHref(n))&&(0,r.isCtrlOrMetaPressed)(e.rawEvent)&&0===e.rawEvent.button)try{var i=this.target||"_blank";this.editor.getDocument().defaultView.open(o,i)}catch(e){}}},e.prototype.tryGetHref=function(e){try{return e?e.href:null}catch(e){}},e.prototype.isContentEditValue=function(e){return(0,r.isCharacterValue)(e)||8==e.which||46==e.which},e.prototype.updateLinkHrefIfShouldUpdate=function(){this.doesLinkDisplayMatchHref(this.trackedLink)||this.updateLinkHref()},e.prototype.resetLinkTracking=function(){this.trackedLink=null,this.originalHref=""},e.prototype.doesLinkDisplayMatchHref=function(e){if(e){var t=e.innerText.trim().replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),n=new RegExp("^(?:https?:\\/\\/)?"+t+"\\/?","i"),r=this.tryGetHref(e);if(null!==r)return n.test(r)}return!1},e.prototype.updateLinkHref=function(){var e=this;if(this.trackedLink){var t=(0,r.matchLink)(this.trackedLink.innerText.trim());null!==t&&this.editor.addUndoSnapshot((function(){e.trackedLink.href=t.normalizedUrl}))}},e}();t.default=o},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(235),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetImage=t.isResizedTo=t.resizeByPercentage=t.canRegenerateImage=t.ImageEdit=void 0;var r=n(97);Object.defineProperty(t,"ImageEdit",{enumerable:!0,get:function(){return r.default}});var o=n(100);Object.defineProperty(t,"canRegenerateImage",{enumerable:!0,get:function(){return o.default}});var i=n(239);Object.defineProperty(t,"resizeByPercentage",{enumerable:!0,get:function(){return i.default}});var a=n(103);Object.defineProperty(t,"isResizedTo",{enumerable:!0,get:function(){return a.default}});var l=n(240);Object.defineProperty(t,"resetImage",{enumerable:!0,get:function(){return l.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(52);t.default=function(e,t){var n=t.angleRad,o=t.widthPx,i=t.heightPx,a=t.bottomPercent,l=t.leftPercent,s=t.rightPercent,u=t.topPercent,c=t.naturalWidth,d=t.naturalHeight,f=c*(1-l-s),h=d*(1-u-a),p=document.createElement("canvas"),g=(0,r.default)(t),v=g.targetWidth,m=g.targetHeight;p.width=v,p.height=m;var y=p.getContext("2d");return y.translate(v/2,m/2),y.rotate(n),y.drawImage(e,c*l,d*u,f,h,-o/2,-i/2,o,i),p.toDataURL("image/png",1)}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getCropHTML=t.Cropper=void 0;var o=n(101),i=["w","e"],a=["s","n"],l={sw:0,nw:90,ne:180,se:270};function s(e,t,n,r,o){var i=n*(1-r)-o,a=n*e+t;return Math.max(Math.min(a,i),0)/n}function u(){var e=[];return[0,1].forEach((function(t){return[0,1].forEach((function(n){e.push(function(e,t){return{tag:"div",style:"position:absolute;left:"+e+"px;bottom:"+e+"px;"+(0==t?"right:"+e+"px;height:"+(7-2*e)+"px;":"top:"+e+"px;width:"+(7-2*e)+"px;")+";background-color:"+(0==e?"white":"black")}}(t,n))}))})),e}t.Cropper={onDragStart:function(e){var t=e.editInfo;return r({},t)},onDragging:function(e,t,n,r,i){var a,l=e.editInfo,u=e.x,c=e.y,d=e.options;r=(a=(0,o.rotateCoordinate)(r,i,l.angleRad))[0],i=a[1];var f=l.widthPx,h=l.heightPx,p=l.leftPercent,g=l.rightPercent,v=l.topPercent,m=l.bottomPercent,y=d.minWidth,b=d.minHeight,E=1-p-g,C=1-v-m;if(E>0&&C>0){var S=f/E,w=h/C,P="e"!=u?s(n.leftPercent,r,S,g,y):p,T="w"!=u?s(n.rightPercent,-r,S,p,y):g,O="s"!=c?s(n.topPercent,i,w,m,b):v,x="n"!=c?s(n.bottomPercent,-i,w,v,b):m;return l.leftPercent=P,l.rightPercent=T,l.topPercent=O,l.bottomPercent=x,l.widthPx=S*(1-P-T),l.heightPx=w*(1-O-x),!0}return!1}},t.getCropHTML=function(){var e={tag:"div",style:"position:absolute;background-color:rgb(0,0,0,0.5);pointer-events:none",className:"r_cropO"},t={tag:"div",style:"position:absolute;overflow:hidden",className:"r_cropC",children:[]};return i.forEach((function(e){return a.forEach((function(n){return t.children.push(function(e,t){return{tag:"div",className:"r_cropH",style:"position:absolute;pointer-events:auto;cursor:"+t+e+"-resize;"+("w"==e?"left":"right")+":0;"+("n"==t?"top":"bottom")+":0;width:22px;height:22px;transform:rotate("+l[t+e]+"deg)",dataset:{x:e,y:t},children:u()}}(e,n))}))})),[t,e,e,e,e]}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getRotateHTML=t.updateRotateHandlePosition=t.Rotator=void 0;var o=180/Math.PI;function i(e){var t;return{tag:"svg",namespace:"http://www.w3.org/2000/svg",style:"width:16px;height:16px;margin: 8px 8px",children:[{tag:"path",namespace:"http://www.w3.org/2000/svg",attributes:(t={d:"M 10.5,10.0 A 3.8,3.8 0 1 1 6.7,6.3",transform:"matrix(1.1 1.1 -1.1 1.1 11.6 -10.8)"},t["fill-opacity"]="0",t.stroke=e,t)},{tag:"path",namespace:"http://www.w3.org/2000/svg",attributes:{d:"M12.0 3.648l.884-.884.53 2.298-2.298-.53z",stroke:e}}]}}t.Rotator={onDragStart:function(e){var t=e.editInfo;return r({},t)},onDragging:function(e,t,n,r,i){var a=e.editInfo,l=e.options,s=a.heightPx/2+31,u=s*Math.sin(n.angleRad)+r,c=s*Math.cos(n.angleRad)-i,d=Math.atan2(u,c);if(!t.altKey){var f=d*o;d=Math.round(f/l.minRotateDeg)*l.minRotateDeg/o}return a.angleRad!=d&&(a.angleRad=d,!0)}},t.updateRotateHandlePosition=function(e,t,n,r,o){if(r&&o&&t){var i=e.angleRad,a=e.heightPx,l=Math.cos(i),s=l<=0?Number.MAX_SAFE_INTEGER:(t[1]+a/2+n)/l-a/2,u=Math.max(Math.min(15,s),0),c=Math.max(Math.min(32,s-u),0);r.style.top=-u+"px",r.style.height=u+"px",o.style.top=-c+"px"}},t.getRotateHTML=function(e){var t=e.borderColor;return[{tag:"div",className:"r_rotateC",style:"position:absolute;left:50%;width:1px;background-color:"+t,children:[{tag:"div",className:"r_rotateH",style:"position:absolute;background-color:"+e.rotateHandleBackColor+";border:solid 1px "+t+";border-radius:50%;width:32px;height:32px;left:-16px;cursor:move",children:[i(t)]}]}]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(98),o=n(102),i=n(103),a=n(26);t.default=function(e,t,n,l,s){var u,c,d,f=(0,a.getEditInfoFromImage)(t);(0,i.default)(t,n)||(u=t,c=f.src,d=function(){if(!e.isDisposed()&&e.contains(t)){var i=t.getAttribute("src"),a=(0,o.default)(f,n),u=a.width,c=a.height;f.widthPx=Math.max(u,l),f.heightPx=Math.max(c,s),e.addUndoSnapshot((function(){(0,r.default)(e,t,f,i,!0)}),"ImageResize")}},u.onload=function(){u.onload=null,u.onerror=null,d()},u.onerror=function(){u.onload=null,u.onerror=null,d()},u.src=c)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26);t.default=function(e,t){e.addUndoSnapshot((function(){t.style.width="",t.style.height="",t.style.maxWidth="100%",t.removeAttribute("width"),t.removeAttribute("height"),(0,r.deleteEditInfo)(t)}),"ImageResize")}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(242),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageResize=void 0;var r=n(243);Object.defineProperty(t,"ImageResize",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n,r,o,i){return void 0===t&&(t=10),void 0===n&&(n=10),void 0===r&&(r="#DB626C"),void 0===o&&(o=!1),void 0===i&&(i="img"),e.call(this,{minHeight:n,minWidth:t,borderColor:r,preserveRatio:o,imageSelector:i})||this}return o(t,e),t.prototype.showResizeHandle=function(e){this.setEditingImage(e,3)},t.prototype.hideResizeHandle=function(e){this.setEditingImage(null,e)},t}(n(97).default);t.default=i},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(245),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Paste=void 0;var r=n(246);Object.defineProperty(t,"Paste",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(247),o=n(248),i=n(249),a=n(250),l=n(251),s=n(255),u=n(0),c=n(256),d=function(){function e(e){void 0===e&&(e="SPAN"),this.unknownTagReplacement=e}return e.prototype.getName=function(){return"Paste"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){var t;if(10==e.eventType){var n=e.htmlAttributes,d=e.fragment,f=e.sanitizingOption,h=e.clipboardData,p=this.editor.getTrustedHTMLHandler(),g=void 0;"urn:schemas-microsoft-com:office:word"==n["xmlns:w"]?(0,l.default)(e):"urn:schemas-microsoft-com:office:excel"==n["xmlns:x"]||"Excel.Sheet"==n.ProgId?(0,i.default)(e,p):"PowerPoint.Slide"==n.ProgId?(0,a.default)(e,p):(g=(0,u.toArray)(d.querySelectorAll('ul[class^="BulletListStyle"]>.OutlineElement,ol[class^="NumberListStyle"]>.OutlineElement,span.WACImageContainer')))&&g.length>0?(g.forEach((function(e){e.style.display=null,e.style.margin=null})),(0,c.isWordOnlineWithList)(d)&&(0,c.default)(d)):d.querySelector("google-sheets-html-origin")?f.additionalTagReplacements["google-sheets-html-origin"]="*":this.editor.isFeatureEnabled("ConvertSingleImageBody")&&1==(null===(t=h.htmlFirstLevelChildTags)||void 0===t?void 0:t.length)&&"IMG"==h.htmlFirstLevelChildTags[0]?(0,r.default)(e,p):((0,o.default)(d),(0,s.default)(d)),f.unknownTagReplacement=this.unknownTagReplacement}},e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){var n=e.fragment,o=e.clipboardData,i=o.html,a=o.image;if(i&&a){var l=(new DOMParser).parseFromString(t(i),"text/html");(0,r.moveChildNodes)(n,null==l?void 0:l.body)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);function o(e){if(e&&!e.nextSibling&&["OL","UL","MENU"].indexOf((0,r.getTagOfNode)(e))<0){var t=!1;if((0,r.toArray)(e.childNodes).every((function(e){var n;return!(!(0,r.safeInstanceOf)(e,"Text")||(null===(n=e.nodeValue)||void 0===n?void 0:n.trim()))||"LI"==(0,r.getTagOfNode)(e)&&(t=!0,!0)}))&&t)return!0}return!1}t.default=function(e){o(e)?(0,r.wrap)((0,r.toArray)(e.childNodes),"UL"):(0,r.safeInstanceOf)(e.firstChild,"HTMLElement")&&o(e.firstChild)&&(0,r.changeElementTag)(e.firstChild,"UL")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.excelHandler=void 0;var r=n(0),o=/<\/\s*td\s*>((?!<\/\s*tr\s*>)[\s\S])*$/i,i=/<\/\s*tr\s*>((?!<\/\s*table\s*>)[\s\S])*$/i,a=/<tr[^>]*>[^<]*/i,l=/<table[^>]*>[^<]*/i;function s(e,t){if(e.match(o)){var n=t.match(a);e=(n?n[0]:"<TR>")+e+"</TR>"}if(e.match(i)){var r=t.match(l);e=(r?r[0]:"<TABLE>")+e+"</TABLE>"}return e}t.default=function(e,t){var n=e.fragment,o=e.sanitizingOption,i=e.htmlBefore,a=e.clipboardData,l=s(a.html,i);if(a.html!=l){var u=(new DOMParser).parseFromString(t(l),"text/html");(0,r.moveChildNodes)(n,null==u?void 0:u.body)}(0,r.chainSanitizerCallback)(o.elementCallbacks,"TD",(function(e){return"none"==e.style.borderStyle&&(e.style.border="solid 1px #d4d4d4"),!0}))},t.excelHandler=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){var n=e.fragment,o=e.clipboardData;if(o.html&&!o.text&&o.image){var i=(new DOMParser).parseFromString(t(o.html),"text/html");(0,r.moveChildNodes)(n,null==i?void 0:i.body)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(252),i=n(253),a=n(254);t.default=function(e){var t=e.sanitizingOption,n=e.fragment;(0,r.chainSanitizerCallback)(t.elementCallbacks,"O:P",(function(e){return(0,r.moveChildNodes)(e),e.appendChild(e.ownerDocument.createTextNode(" ")),!0}));var l=(0,o.createWordConverter)(),s=n.querySelectorAll("p");s.length>0&&(l.wordConverterArgs=(0,i.createWordConverterArguments)(s),(0,a.processNodesDiscovery)(l)&&(0,a.processNodeConvert)(l))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWordConverter=void 0;var r=n(104);t.createWordConverter=function(){return{nextUniqueId:1,numBulletsConverted:0,numNumberedConverted:0,wordConverterArgs:null,wordCustomData:(0,r.createCustomData)()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWordConverterArguments=void 0;var r=n(105);t.createWordConverterArguments=function(e){return{nodes:e,currentIndex:0,lists:{},listItems:[],currentListIdsByLevels:[(0,r.createLevelLists)()],lastProcessedItem:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processNodeConvert=t.processNodesDiscovery=void 0;var r=n(105),o=n(104),i=n(0),a=/[\n|\r]/gi;function l(e,t,n,r){var a=function e(t,n,r){var o,a=null;1==n?o=h(t):(a=e(t,n-1,null),o=a.lastChild);if(o&&1==o.nodeType){var l=(0,i.getTagOfNode)(o);if("UL"==l||"OL"==l)return o}var s=t.ownerDocument.createElement(r?r.tagName:"UL");1==n?t.parentNode.insertBefore(s,t):a.appendChild(s);return s}(t,n.level,r),l=(0,o.getObject)(e.wordCustomData,a,"UniqueListId");if(l&&l!=n.uniqueListId||!l&&a.firstChild){var s=t.ownerDocument.createElement(r.tagName);a.parentNode.insertBefore(s,a.nextSibling),a=s}return(0,o.setObject)(e.wordCustomData,a,"UniqueListId",n.uniqueListId),function(e,t,n){if(n.tagName!=(0,i.getTagOfNode)(t)){var r=t.ownerDocument.createElement(n.tagName);(0,o.setObject)(e.wordCustomData,r,"UniqueListId",(0,o.getObject)(e.wordCustomData,t,"UniqueListId")),(0,i.moveChildNodes)(r,t),t.parentNode.insertBefore(r,t),t.parentNode.removeChild(t),t=r}return t}(e,a,r)}function s(e,t){for(var n=[],r=e.firstChild;r;r=r.nextSibling)1==r.nodeType&&t>1&&s(r,t-1),(v(r=f(r,!0))||g(r))&&n.push(r);n.forEach((function(t){return e.removeChild(t)}))}function u(e){if(1==e.nodeType){var t=m(e,"mso-list");if(t&&t.length>0)try{var n=t.split(" ");if(3==n.length)return{level:parseInt(n[1].substr("level".length)),wordListId:t,originalNode:e,uniqueListId:0}}catch(e){}}return null}function c(e){return["o","·","§","-"].indexOf(e)>=0}function d(e,t){for(var n=null,r=e.firstChild;!n&&r;)g(r=f(r,!0))?0==(n=r.textContent.trim()).length&&(n="o"):1==r.nodeType&&t>1&&(n=d(r,t-1)),r=r.nextSibling;return n}function f(e,t){if(8==e.nodeType){var n=e.data;if(n&&"[if !supportlists]"==n.trim().toLowerCase()){for(var r=e,o=null,i=0;i<4&&(r=p(r));i++)if(8==r.nodeType&&(n=r.data)&&"[endif]"==n.trim().toLowerCase()){o=r;break}if(o){var a=e.ownerDocument.createElement("span");for(a.setAttribute("style","mso-list: ignore"),r=p(e);r!=o;)r=r.nextSibling,a.appendChild(r.previousSibling);o.parentNode.insertBefore(a,o),t&&(e.parentNode.removeChild(e),o.parentNode.removeChild(o)),e=a}}}return e}function h(e){var t=e;do{t=t.previousSibling}while(t&&y(t));return t}function p(e){var t=e;do{t=t.nextSibling}while(t&&y(t));return t}function g(e){if(1==e.nodeType){var t=m(e,"mso-list");if(t&&t.length>0&&"ignore"==t.trim().toLowerCase())return!0}return!1}function v(e){return"SPAN"==(0,i.getTagOfNode)(e)&&!e.firstChild}function m(e,t){return(0,i.getStyles)(e)[t]||null}function y(e){if(!e)return!0;if(3==e.nodeType){var t=e.nodeValue;return 0==(t=t.replace(a,"")).trim().length}var n=(0,i.getTagOfNode)(e);return e.firstChild==e.lastChild&&("SPAN"==n||"FONT"==n)&&y(e.firstChild)}function b(e){for(var t=0;t<e.currentListIdsByLevels.length;t++){var n=e.currentListIdsByLevels[t];n&&(n.currentUniqueListId=-1)}}t.processNodesDiscovery=function(e){for(var t,n=e.wordConverterArgs;n.currentIndex<n.nodes.length;){var o=n.nodes.item(n.currentIndex),a=u(o);if(a){var l=n.currentListIdsByLevels[a.level-1]||(0,r.createLevelLists)();n.currentListIdsByLevels[a.level-1]=l,n.lastProcessedItem&&h(o)!=n.lastProcessedItem&&b(n);var s=l.listsMetadata[a.wordListId];if(s){if(!s.ignore&&1==s.numberOfItems){var f=d(o,5);s.tagName=s.firstFakeBullet==f?"UL":"OL"}}else{var p=d(o,5);s={numberOfItems:0,uniqueListId:e.nextUniqueId++,firstFakeBullet:p,ignore:!p||0==p.length,tagName:(t=p,c(t)?"UL":"OL")},l.listsMetadata[a.wordListId]=s,n.lists[s.uniqueListId.toString()]=s}a.uniqueListId=s.uniqueListId,s.ignore||"OL"==s.tagName&&s.numberOfItems>0&&l.currentUniqueListId!=a.uniqueListId?(s.ignore=!0,n.currentListIdsByLevels[0].currentUniqueListId=-1,n.currentListIdsByLevels=n.currentListIdsByLevels.slice(0,1)):(n.currentListIdsByLevels.length>a.level&&(n.currentListIdsByLevels=n.currentListIdsByLevels.slice(0,a.level)),l.currentUniqueListId=a.uniqueListId,n.listItems.push(a),s.numberOfItems++),n.lastProcessedItem=o}else{var g=n.lastProcessedItem;g&&h(o)==g&&o.tagName==g.tagName&&o.className==g.className&&(g.appendChild(g.ownerDocument.createElement("br")),g.appendChild(g.ownerDocument.createElement("br")),(0,i.moveChildNodes)(g,o,!0),o.parentNode.removeChild(o))}n.currentIndex++}return n.listItems.length>0},t.processNodeConvert=function(e){var t=e.wordConverterArgs;for(t.currentIndex=0;t.currentIndex<t.listItems.length;){var n=t.listItems[t.currentIndex],r=n.originalNode,o=t.lists[n.uniqueListId.toString()];if(!o.ignore){var a=l(e,r,n,o);if(a){s(r,5);var u=r.ownerDocument.createElement("LI");(0,i.moveChildNodes)(u,r),a.appendChild(u),r.parentNode.removeChild(r),"UL"==o.tagName?e.numBulletsConverted++:e.numNumberedConverted++}}t.currentIndex++}return e.numBulletsConverted>0||e.numNumberedConverted>0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);function o(e){var t,n,o=e.start,i=e.end;if(o==i&&"DIV"==(0,r.getTagOfNode)(o)){var a=(0,r.changeElementTag)(o,"SPAN");e.start=a,e.end=a,"BR"==(0,r.getTagOfNode)(a.lastChild)&&a.removeChild(a.lastChild)}else if("BR"==(0,r.getTagOfNode)(i)){a=i.ownerDocument.createTextNode("");null===(t=i.parentNode)||void 0===t||t.insertBefore(a,i),e.end=a,null===(n=i.parentNode)||void 0===n||n.removeChild(i)}}function i(e,t,n){var o,i=(0,r.getBlockElementAtNode)(e,t.start),a=n?(0,r.getNextLeafSibling)(e,t.end):(0,r.getPreviousLeafSibling)(e,t.start);(null==i?void 0:i.contains(a))&&(null===(o=(n?t.end:t.start).parentNode)||void 0===o||o.insertBefore(t.start.ownerDocument.createElement("br"),n?t.end.nextSibling:t.start))}t.default=function(e){for(var t=r.ContentTraverser.createBodyTraverser(e),n=[],a=null==t?void 0:t.currentBlockElement;a;a=t.getNextBlockElement())n.push({start:a.getStartNode(),end:a.getEndNode()});n.length>0&&(o(n[0]),o(n[n.length-1]),i(e,n[0],!0),i(e,n[n.length-1],!1))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWordOnlineWithList=void 0;var r=n(257),o=n(0),i='div.ListContainerWrapper>ul[class^="BulletListStyle"],div.ListContainerWrapper>ol[class^="NumberListStyle"],span.WACImageContainer > img';function a(e,t,n){if(e){var r,o=n.insertPositionNode;if(o)(r=o.parentNode)&&r.insertBefore(e,o);else(r=n.startElement.parentNode)?r.appendChild(e):t.appendChild(e)}}t.isWordOnlineWithList=function(e){return!(!e||!e.querySelector(i))},t.default=function(e){!function(e){(0,o.toArray)(e.querySelectorAll(i)).forEach((function(e){var t=new RegExp("\\bListContainerWrapper\\b","g");if(e.previousSibling){var n=(0,o.splitParentNode)(e,!0);n.className=n.className.replace(t,"")}if(e.nextSibling){var r=(0,o.splitParentNode)(e,!1);r.className=r.className.replace(t,"")}}))}(e),function(e){for(var t,n=e.querySelectorAll(".ListContainerWrapper"),i=[],a=0;a<n.length;a++){var l=n[a];if(t){var s=t.listItemContainers,u=s[s.length-1];l==u.nextSibling||(0,o.getFirstLeafNode)(l)==(0,o.getNextLeafSibling)(u.parentNode,u)?(s.push(l),t.endElement=l):(t.endElement=u,i.push(t),t=(0,r.createListItemBlock)(l))}else t=(0,r.createListItemBlock)(l)}(null==t?void 0:t.listItemContainers.length)>0&&i.push(t);return i}(e).forEach((function(t){var n;!function(e,t){(0,o.collapseNodes)(e,t.startElement,t.endElement,!0).forEach((function(e){"DIV"==(0,o.getTagOfNode)(e.firstChild)&&(0,o.unwrap)(e)}))}(e,t),t.insertPositionNode=t.endElement.nextSibling;var r=e.ownerDocument;t.listItemContainers.forEach((function(i){var l=function(e){var t=(0,o.getTagOfNode)(e.firstChild);return"UL"==t||"OL"==t?t:null}(i);n||(n=r.createElement(l)),(0,o.toArray)(i.querySelectorAll("li")).forEach((function(i){var s=parseInt(i.getAttribute("data-aria-level"));(0,o.getTagOfNode)(n)!=l&&1==s&&(a(n,e,t),n=r.createElement(l)),function(e,t,n,r){if(!n)return;var i=parseInt(t.getAttribute("data-aria-level")),a=e;for(;i>1;){if(a.firstChild){var l=a.lastElementChild,s=(0,o.getTagOfNode)(l);"UL"==s||"OL"==s?a=l:(a.appendChild(r.createElement(n)),a=a.lastElementChild)}else a.appendChild(r.createElement(n)),a=a.firstElementChild;i--}a.appendChild(t)}(n,i,l,r)}))})),a(n,e,t);var i=t.startElement.parentNode;i&&t.listItemContainers.forEach((function(e){i.removeChild(e)}))})),function(e){return e.querySelectorAll(".WACImageContainer")}(e).forEach((function(e){(0,o.safeInstanceOf)(e,"HTMLSpanElement")&&e.childNodes.forEach((function(e){"IMG"!=(0,o.getTagOfNode)(e)&&e.parentElement.removeChild(e)}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createListItemBlock=void 0,t.createListItemBlock=function(e){return void 0===e&&(e=null),{startElement:e,endElement:e,insertPositionNode:null,listItemContainers:e?[e]:[]}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(259),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PickerPlugin=void 0;var r=n(260);Object.defineProperty(t,"PickerPlugin",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=n(0),i=o.Browser.isIE?"Esc":"Escape",a=o.Browser.isIE?"Left":"ArrowLeft",l=o.Browser.isIE?"Up":"ArrowUp",s=o.Browser.isIE?"Right":"ArrowRight",u=o.Browser.isIE?"Down":"ArrowDown",c=o.Browser.isIE?"Del":"Delete",d=[0,229],f=function(){function e(e,t){this.dataProvider=e,this.pickerOptions=t,this.isPendingInputEventHandling=!1}return e.prototype.getName=function(){return"Picker"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.dataProvider.onInitalize((function(e){t.editor.focus();var n=t.getWord(null);n&&0!=n.length||!t.lastKnownRange||(t.editor.select(t.lastKnownRange),n=t.getWord(null));t.editor.addUndoSnapshot((function(){n?(0,r.replaceWithNode)(t.editor,n,e,!0):t.editor.insertNode(e),t.setIsSuggesting(!1)}),t.pickerOptions.changeSource,t.pickerOptions.handleAutoComplete)}),(function(e){t.setIsSuggesting(e)}),e)},e.prototype.dispose=function(){this.editor=null,this.dataProvider.onDispose()},e.prototype.willHandleEventExclusively=function(e){return this.isSuggesting&&(0==e.eventType||2==e.eventType||3==e.eventType)},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 7:if("SetContent"==e.source&&this.dataProvider.onContentChanged){this.isSuggesting&&this.setIsSuggesting(!1);var t=[];this.editor.queryElements("[id^='"+this.pickerOptions.elementIdPrefix+"']",(function(e){e.id&&t.push(e.id)})),this.dataProvider.onContentChanged(t)}break;case 0:this.eventHandledOnKeyDown=!1,this.isAndroidKeyboardEvent(e)?(this.currentInputLength=this.calcInputLength(e),this.isPendingInputEventHandling=!0):(this.onKeyDownEvent(e),this.isPendingInputEventHandling=!1);break;case 3:this.isPendingInputEventHandling&&this.onAndroidInputEvent(e);break;case 2:!this.eventHandledOnKeyDown&&this.shouldHandleKeyUpEvent(e)&&(this.onKeyUpDomEvent(e),this.isPendingInputEventHandling=!1);break;case 6:this.isSuggesting&&this.setIsSuggesting(!1);break;case 14:this.dataProvider.onScroll&&this.dataProvider.onScroll(e.scrollContainer)}},e.prototype.setLastKnownRange=function(e){this.lastKnownRange=e},e.prototype.setIsSuggesting=function(e){this.isSuggesting=e,e||this.setLastKnownRange(null),this.dataProvider.onIsSuggestingChanged(e),this.setAriaOwns(e),this.setAriaActiveDescendant(e?0:null)},e.prototype.cancelDefaultKeyDownEvent=function(e){this.eventHandledOnKeyDown=!0,e.rawEvent.preventDefault(),e.rawEvent.stopImmediatePropagation()},e.prototype.getIdValue=function(e){var t=e;return t.attributes&&t.attributes.getNamedItem("id")?t.attributes.getNamedItem("id").value:null},e.prototype.getWordBeforeCursor=function(e){var t=this.editor.getContentSearcherOfCursor(e);return t?t.getWordBefore():null},e.prototype.replaceNode=function(e,t){e&&this.editor.deleteNode(e),t&&this.editor.insertNode(t)},e.prototype.getRangeUntilAt=function(e){var t,n,r=this;return this.editor.getContentSearcherOfCursor(e).forEachTextInlineElement((function(e){for(var o=!1,i=e.getTextContent(),a=i?i.length:-1;a>=0;){if(i[a]==r.pickerOptions.triggerCharacter){t=e.getStartPosition().move(a),o=!0;break}a--}return o&&(n=e.getEndPosition()),o})),(0,o.createRange)(t,n)||this.editor.getDocument().createRange()},e.prototype.shouldHandleKeyUpEvent=function(e){return this.isAndroidKeyboardEvent(e)||(0,o.isCharacterValue)(e.rawEvent)||this.isSuggesting&&!(0,o.isModifierKey)(e.rawEvent)},e.prototype.onKeyUpDomEvent=function(e){if(this.isSuggesting){var t=(r=(n=this.getWord(e)).substring(1)).trim();n==this.pickerOptions.triggerCharacter||t&&t.length>0&&t.split(" ").length<=4?(this.dataProvider.queryStringUpdated(t,r==t),this.setLastKnownRange(this.editor.getSelectionRange())):this.setIsSuggesting(!1)}else{var n=this.getWordBeforeCursor(e);if(this.blockSuggestions)null!=n&&n[0]!=this.pickerOptions.triggerCharacter&&(this.blockSuggestions=!1);else if(null!=n&&n.split(" ").length<=4&&n[0]==this.pickerOptions.triggerCharacter){this.setIsSuggesting(!0);var r;t=(r=n.substring(1)).trim();if(this.dataProvider.queryStringUpdated(t,r==t),this.setLastKnownRange(this.editor.getSelectionRange()),this.dataProvider.setCursorPoint){var o=this.editor.getContentSearcherOfCursor(e),i=this.editor.getDocument().createRange(),a=o.getInlineElementBefore().getContainerNode();if(!this.setRangeStart(i,a,n)){var l=a.previousSibling;this.setRangeStart(i,l,this.pickerOptions.triggerCharacter)}var s=i.getBoundingClientRect();if(0==s.left&&0==s.bottom&&0==s.top&&(s=i.getClientRects()[0]),s){i.detach();var u={x:s.left,y:(s.bottom+s.top)/2},c=(s.bottom-s.top)/2;this.dataProvider.setCursorPoint(u,c)}}}}},e.prototype.onKeyDownEvent=function(e){var t=e.rawEvent;if(this.isSuggesting)if(t.key==i)this.setIsSuggesting(!1),this.blockSuggestions=!0,this.cancelDefaultKeyDownEvent(e);else if("Backspace"==t.key){this.getWord(e)==this.pickerOptions.triggerCharacter&&this.setIsSuggesting(!1)}else this.dataProvider.shiftHighlight&&(this.pickerOptions.isHorizontal?t.key==a||t.key==s:t.key==l||t.key==u)?(this.dataProvider.shiftHighlight(this.pickerOptions.isHorizontal?t.key==s:t.key==u),this.dataProvider.getSelectedIndex&&this.setAriaActiveDescendant(this.dataProvider.getSelectedIndex()),this.cancelDefaultKeyDownEvent(e)):!this.dataProvider.selectOption||"Enter"!=t.key&&"Tab"!=t.key||(this.dataProvider.selectOption(),this.cancelDefaultKeyDownEvent(e));else if("Backspace"==t.key)this.tryRemoveNode(e)&&this.cancelDefaultKeyDownEvent(e);else if(t.key==c){var n=this.editor.getContentSearcherOfCursor(e),r=n.getInlineElementAfter()?n.getInlineElementAfter().getContainerNode():null,o=r?this.getIdValue(r):null;if(o&&0==o.indexOf(this.pickerOptions.elementIdPrefix)){var d=this.dataProvider.onRemove(r,!1);this.replaceNode(r,d),this.cancelDefaultKeyDownEvent(e)}}},e.prototype.onAndroidInputEvent=function(e){(this.newInputLength=this.calcInputLength(e),this.newInputLength<this.currentInputLength||"deleteContentBackwards"===e.rawEvent.inputType)&&(this.tryRemoveNode(e)&&(this.eventHandledOnKeyDown=!0))},e.prototype.calcInputLength=function(e){var t=this.getInlineElementBeforeCursor(e);return t?t.length:0},e.prototype.tryRemoveNode=function(e){var t=this.editor.getContentSearcherOfCursor(e),n=t.getInlineElementBefore(),r=n?n.getContainerNode():null,i=r?this.getIdValue(r):null,a=t.getInlineElementAfter();if(i&&0==i.indexOf(this.pickerOptions.elementIdPrefix)&&(null==a||!(a instanceof o.PartialInlineElement))){var l=this.dataProvider.onRemove(r,!0);return l?(this.replaceNode(r,l),this.isPendingInputEventHandling?this.editor.runAsync((function(e){e.select(l,-3)})):this.editor.select(l,-3)):this.editor.deleteNode(r),!0}return!1},e.prototype.getWord=function(e){var t=this.getRangeUntilAt(e).toString(),n=this.getWordBeforeCursor(e);return t==this.pickerOptions.triggerCharacter&&t!=n?n:t},e.prototype.setRangeStart=function(e,t,n){var r=t?t.textContent.lastIndexOf(n):-1;return r>-1&&(e.setStart(t,r),!0)},e.prototype.setAriaOwns=function(e){this.editor.setEditorDomAttribute("aria-owns",e&&this.pickerOptions.suggestionsLabel?this.pickerOptions.suggestionsLabel:null)},e.prototype.setAriaActiveDescendant=function(e){this.editor.setEditorDomAttribute("aria-activedescendant",null!=e&&this.pickerOptions.suggestionLabelPrefix?this.pickerOptions.suggestionLabelPrefix+e.toString():null)},e.prototype.getInlineElementBeforeCursor=function(e){var t=this.editor.getContentSearcherOfCursor(e),n=t?t.getInlineElementBefore():null;return n?n.getTextContent():null},e.prototype.isAndroidKeyboardEvent=function(e){return"Unidentified"==e.rawEvent.key||null==e.rawEvent.key&&d.indexOf(e.rawEvent.charCode)>-1},e}();t.default=f},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(262),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableResize=void 0;var r=n(263);Object.defineProperty(t,"TableResize",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(264),o=n(0),i=function(){function e(){var e=this;this.tableRectMap=null,this.onMouseMove=function(t){var n;if(!(t.buttons>0)){e.ensureTableRects();for(var r=e.editor.getDocument().defaultView,o=t.pageX-r.scrollX,i=t.pageY-r.scrollY,a=null,l=e.tableRectMap.length-1;l>=0;l--){var s=e.tableRectMap[l],u=s.table,c=s.rect;if(o>=c.left-12&&o<=c.right+12&&i>=c.top-12&&i<=c.bottom+12){a=u;break}}e.setTableEditor(a),null===(n=e.tableEditor)||void 0===n||n.onMouseMove(o,i)}},this.invalidateTableRects=function(){e.tableRectMap=null}}return e.prototype.getName=function(){return"TableResize"},e.prototype.initialize=function(e){this.editor=e,this.onMouseMoveDisposer=this.editor.addDomEventHandler({mousemove:this.onMouseMove})},e.prototype.dispose=function(){this.onMouseMoveDisposer(),this.invalidateTableRects(),this.setTableEditor(null),this.editor=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 3:case 7:case 14:case 21:this.setTableEditor(null),this.invalidateTableRects()}},e.prototype.setTableEditor=function(e){this.tableEditor&&e!=this.tableEditor.table&&(this.tableEditor.dispose(),this.tableEditor=null),!this.tableEditor&&e&&(this.tableEditor=new r.default(this.editor,e,this.invalidateTableRects))},e.prototype.ensureTableRects=function(){var e=this;this.tableRectMap||(this.tableRectMap=[],this.editor.queryElements("table",(function(t){if(t.isContentEditable){var n=(0,o.normalizeRect)(t.getBoundingClientRect());n&&e.tableRectMap.push({table:t,rect:n})}})))},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(265),o=n(266),i=n(267),a=n(268),l=n(269),s=n(0),u=function(){function e(e,t,n){var r=this;this.editor=e,this.table=t,this.onChanged=n,this.onFinishEditing=function(){return r.editor.focus(),r.editor.select(r.start,r.end),r.editor.addUndoSnapshot(null,"Format"),r.onChanged(),!1},this.onStartTableResize=function(){r.onStartResize()},this.onStartCellResize=function(){r.disposeTableResizer(),r.onStartResize()},this.onInserted=function(e){r.editor.transformToDarkColor(e),r.disposeTableResizer(),r.onFinishEditing()},this.onSelect=function(e){if(r.editor.focus(),e){var t=new s.VTable(e),n=t.cells.length-1,o=0;t.cells[n].forEach((function(e,t){e.td&&(o=t)}));var i={firstCell:{x:0,y:0},lastCell:{y:n,x:o}};r.editor.select(e,i)}},this.isRTL="rtl"==(0,s.getComputedStyle)(t,"direction"),this.tableResizer=(0,i.default)(t,e.getZoomScale(),this.isRTL,this.onStartTableResize,this.onFinishEditing),this.tableSelector=(0,a.default)(t,e.getZoomScale(),this.onSelect)}return e.prototype.dispose=function(){this.disposeTableResizer(),this.disposeCellResizers(),this.disposeTableInserter(),this.disposeTableSelector()},e.prototype.onMouseMove=function(e,t){for(var n,r=0;r<this.table.rows.length;r++){for(var o=this.table.rows[r],i=0;i<o.cells.length;i++){var a=o.cells[i],l=(0,s.normalizeRect)(a.getBoundingClientRect());if(l){var u=t<=l.bottom;if((this.isRTL?e>=l.right:e<=l.right)&&u){if(0==r&&t<=l.top+5){var c=(l.left+l.right)/2,d=this.isRTL?e<c:e>c;this.setInserterTd(d?a:o.cells[i-1],!1)}else 0==i&&(this.isRTL?e>=l.right-5:e<=l.left+5)?this.setInserterTd(t>(l.top+l.bottom)/2?a:null===(n=this.table.rows[r-1])||void 0===n?void 0:n.cells[0],!0):this.setInserterTd(null);this.setResizingTd(a);break}}}if(i<o.cells.length)break}},e.prototype.setResizingTd=function(e){if(this.horizontalResizer&&this.horizontalResizer.node!=e&&this.disposeCellResizers(),!this.horizontalResizer&&e){var t=this.editor.getZoomScale();this.horizontalResizer=(0,r.default)(e,t,this.isRTL,!0,this.onStartCellResize,this.onFinishEditing),this.verticalResizer=(0,r.default)(e,t,this.isRTL,!1,this.onStartCellResize,this.onFinishEditing)}},e.prototype.setInserterTd=function(e,t){var n=t?this.horizontalInserter:this.verticalInserter;if(n&&n.node!=e&&this.disposeTableInserter(),!this.horizontalInserter&&!this.verticalInserter&&e){var r=(0,o.default)(this.editor,e,this.isRTL,t,this.onInserted);t?this.horizontalInserter=r:this.verticalInserter=r}},e.prototype.disposeTableResizer=function(){this.tableResizer&&((0,l.disposeTableEditFeature)(this.tableResizer),this.tableResizer=null)},e.prototype.disposeTableInserter=function(){this.horizontalInserter&&((0,l.disposeTableEditFeature)(this.horizontalInserter),this.horizontalInserter=null),this.verticalInserter&&((0,l.disposeTableEditFeature)(this.verticalInserter),this.verticalInserter=null)},e.prototype.disposeCellResizers=function(){this.horizontalResizer&&((0,l.disposeTableEditFeature)(this.horizontalResizer),this.horizontalResizer=null),this.verticalResizer&&((0,l.disposeTableEditFeature)(this.verticalResizer),this.verticalResizer=null)},e.prototype.disposeTableSelector=function(){this.tableSelector&&((0,l.disposeTableEditFeature)(this.tableSelector),this.tableSelector=null)},e.prototype.onStartResize=function(){var e=this.editor.getSelectionRange();e&&(this.start=s.Position.getStart(e),this.end=s.Position.getEnd(e)),this.editor.addUndoSnapshot()},e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(36),o=n(0);function i(e){var t=e.td,n=e.isRTL,r=e.zoomScale,i=e.onStart,a=new o.VTable(t,!0,r),l=(0,o.normalizeRect)(t.getBoundingClientRect());if(l){i();var s=a.getCellsWithBorder(n?l.left:l.right,!n),u=a.getCellsWithBorder(n?l.left:l.right,n);return{vTable:a,currentCells:s,nextCells:u}}return{vTable:a,currentCells:[],nextCells:[]}}function a(e,t,n,r,o){var i=e.td,a=e.zoomScale,l=n.vTable;return l.table.removeAttribute("height"),l.table.style.height=null,l.forEachCellOfCurrentRow((function(e){e.td&&(e.td.style.height=e.td==i?e.height/a+o+"px":null)})),l.writeBack(!0),!0}function l(e,t,n){var r=e.isRTL,i=e.zoomScale,a=n.vTable,l=n.nextCells,u=n.currentCells;if(!function(e,t,n,r,i){for(var a=0;a<t.length;a++){var l=t[a];if(u=(0,o.normalizeRect)(l.getBoundingClientRect()))if((c=s(u,e,!r)/i)<30)return!1}for(a=0;a<n.length;a++){l=n[a];var u,c=Number.MAX_SAFE_INTEGER;if(l)(u=(0,o.normalizeRect)(l.getBoundingClientRect()))&&(c=s(u,e,r)/i);if(c<30)return!1}return!0}(t.pageX,u,l,r,i))return!1;var c=0==l.length,d=t.shiftKey;(c||d)&&(a.table.style.width=null);var f=new Map;return u.forEach((function(e){var n=(0,o.normalizeRect)(e.getBoundingClientRect());if(n){e.style.wordBreak="break-word",e.style.whiteSpace="normal",e.style.boxSizing="border-box";var a=s(n,t.pageX,!r)/i;f.set(e,a)}})),f.forEach((function(e,t){t.style.width=e+"px"})),d||l.forEach((function(e){e.style.wordBreak="break-word",e.style.whiteSpace="normal",e.style.boxSizing="border-box",e.style.width=null})),a.writeBack(!0),!0}function s(e,t,n){return n?t-e.left:e.right-t}function u(e,t){var n=e.td,r=(0,o.normalizeRect)(n.getBoundingClientRect());r&&(t.style.top=r.bottom-4+"px",t.style.left=r.left+"px",t.style.width=r.right-r.left+"px",t.style.height="4px")}function c(e,t){var n=e.td,r=e.isRTL,i=(0,o.normalizeRect)(n.getBoundingClientRect());i&&(t.style.top=i.top+"px",t.style.left=(r?i.left:i.right)-4+1+"px",t.style.width="4px",t.style.height=i.bottom-i.top+"px")}t.default=function(e,t,n,s,d,f){var h=e.ownerDocument,p=(0,o.createElement)(s?7:8,h);h.body.appendChild(p);var g={td:e,isRTL:n,zoomScale:t,onStart:d},v=s?u:c;v(g,p);var m={onDragStart:i,onDragging:s?a:l,onDragEnd:f};return{node:e,div:p,featureHandler:new r.default(p,g,v,m,t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t,n,i,a){var l=e.getElementAtCursor("table",t),s=(0,r.normalizeRect)(t.getBoundingClientRect()),u=l?(0,r.normalizeRect)(l.getBoundingClientRect()):null;if(s&&u){var c=t.ownerDocument,d=(0,r.createElement)(function(e,t,n,r){var o=t?"white":"#4A4A4A",i=n?"right":"left";return{tag:"div",style:"position: fixed; width: 12px; height: 12px; font-size: 16px; color: "+o+"; line-height: 10px; vertical-align: middle; text-align: center; cursor: pointer; border: solid 1px "+o+"; border-radius: 50%; background-color: "+r,children:[{tag:"div",style:"position: absolute; box-sizing: border-box; background-color: "+r+";"+(e?i+": 12px; top: 5px; height: 3px; border-top: 1px solid "+o+"; border-bottom: 1px solid "+o+"; border-right: 1px solid "+o+"; border-left: 0px;":"left: 5px; top: 12px; width: 3px; border-left: 1px solid "+o+"; border-right: 1px solid "+o+"; border-bottom: 1px solid "+o+"; border-top: 0px;")},"+"]}}(i,e.isDarkMode(),n,e.getDefaultFormat().backgroundColor||"white"),c);return i?(d.style.left=(n?s.right:s.left-13)+"px",d.style.top=s.bottom-8+"px",d.firstChild.style.width=u.right-u.left+"px"):(d.style.left=(n?s.left:s.right-8)+"px",d.style.top=s.top-13+"px",d.firstChild.style.height=u.bottom-u.top+"px"),c.body.appendChild(d),{div:d,featureHandler:new o(d,t,i,e,a),node:t}}};var o=function(){function e(e,t,n,o,i){var a=this;this.div=e,this.td=t,this.isHorizontal=n,this.editor=o,this.onInsert=i,this.insertTd=function(){var e=new r.VTable(a.td);a.isHorizontal||(e.normalizeTableCellSize(a.editor.getZoomScale()),e.table.removeAttribute("width"),e.table.style.width=null),e.edit(a.isHorizontal?1:3),e.writeBack(),a.onInsert(e.table)},this.div.addEventListener("click",this.insertTd)}return e.prototype.dispose=function(){this.div.removeEventListener("click",this.insertTd),this.div=null,this.editor=null},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(36),o=n(0);function i(e){return e.onStart(),{originalRect:e.table.getBoundingClientRect(),vTable:new o.VTable(e.table,!0,e.zoomScale)}}function a(e,t,n,r,o){var i=e.isRTL,a=e.zoomScale,l=n.originalRect,s=n.vTable,u=1+r/l.width*a*(i?-1:1),c=1+o/l.height*a,d=Math.abs(u-1)>.001,f=Math.abs(c-1)>.001;if(d||f){for(var h=0;h<s.cells.length;h++)for(var p=0;p<s.cells[h].length;p++){var g=s.cells[h][p];if(g.td){if(d){s.table.style.width=null;var v=g.width*u/a;g.td.style.boxSizing="border-box",v>=30&&(g.td.style.wordBreak="break-word",g.td.style.whiteSpace="normal",g.td.style.width=v+"px")}if(f)if(s.table.style.height=null,0==p){var m=g.height*c/a;m>=20&&(g.td.style.height=m+"px")}else g.td.style.height=null}}return s.writeBack(!0),!0}return!1}function l(e,t){var n=e.table,r=e.isRTL,i=(0,o.normalizeRect)(n.getBoundingClientRect());i&&(t.style.top=i.bottom+"px",t.style.left=r?i.left-12-2+"px":i.right+"px")}t.default=function(e,t,n,s,u){var c=e.ownerDocument,d=(0,o.createElement)(n?10:9,c);d.style.width="12px",d.style.height="12px",c.body.appendChild(d);var f={isRTL:n,table:e,zoomScale:t,onStart:s};return l(f,d),{node:e,div:d,featureHandler:new r.default(d,f,l,{onDragStart:i,onDragging:a,onDragEnd:u},t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(36),o=n(0);function i(e,t){var n=e.table,r=(0,o.normalizeRect)(n.getBoundingClientRect());r&&(t.style.top=r.top-12+"px",t.style.left=r.left-12-2+"px")}t.default=function(e,t,n){var a=e.ownerDocument,l=(0,o.createElement)(11,a);l.id="_Table_Selector",l.style.width="12px",l.style.height="12px",a.body.appendChild(l);var s={table:e,zoomScale:t};i(s,l);var u=new r.default(l,s,i,{onDragEnd:function(e,t){return t.target==l&&n(e.table),!1}},t);return{div:l,featureHandler:u,node:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.disposeTableEditFeature=void 0,t.disposeTableEditFeature=function(e){var t;null===(t=e.div.parentNode)||void 0===t||t.removeChild(e.div),e.div=null,e.featureHandler.dispose(),e.featureHandler=null}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(271),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watermark=void 0;var r=n(272);Object.defineProperty(t,"Watermark",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(6),i=function(){function e(e,t){var n=this;this.watermark=e,this.format=t,this.showHideWatermark=function(){var e=n.editor.hasFocus(),t=n.editor.queryElements((0,r.getEntitySelector)("WATERMARK_WRAPPER")),i=t.length>0;e&&i?(t.forEach(n.removeWatermark),n.editor.focus()):e||i||!n.editor.isEmpty()||(0,o.insertEntity)(n.editor,"WATERMARK_WRAPPER",n.editor.getDocument().createTextNode(n.watermark),!1,!1,0)},this.removeWatermark=function(e){var t=e.parentNode;null==t||t.removeChild(e),n.editor.contains(t)&&"DIV"==(0,r.getTagOfNode)(t)&&!t.firstChild&&t.appendChild(n.editor.getDocument().createElement("BR"))},this.format=this.format||{fontSize:"14px",textColors:{lightModeColor:"#AAAAAA",darkModeColor:"#6B6B6B"}}}return e.prototype.getName=function(){return"Watermark"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.editor.addDomEventHandler({focus:this.showHideWatermark,blur:this.showHideWatermark})},e.prototype.dispose=function(){this.disposer(),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){var t;if(11==e.eventType||7==e.eventType&&"WATERMARK_WRAPPER"!=(null===(t=e.data)||void 0===t?void 0:t.type))this.showHideWatermark();else if(15==e.eventType&&"WATERMARK_WRAPPER"==e.entity.type){var n=e.operation,o=e.entity.wrapper;8==n?this.removeWatermark(o):0==e.operation&&((0,r.applyFormat)(o,this.format,this.editor.isDarkMode()),o.spellcheck=!1)}},e}();t.default=i},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(274),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableCellSelection=void 0;var r=n(275);Object.defineProperty(t,"TableCellSelection",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(276),o=n(277),i=n(278),a=n(279),l=n(0),s=function(){function e(){var e=this;this.onMouseMove=function(t){if(e.editor.contains(t.target)){if(e.tableSelection&&(0,l.contains)(e.lastTarget,t.target,!0))return c(e.editor,e.firstTarget,0),void t.preventDefault();if("TABLE"!=(0,l.getTagOfNode)(t.target)){if(e.setData(t.target),!e.firstTarget||e.firstTable)if(e.lastTarget.lastChild==e.lastTarget.firstChild&&"TABLE"==(0,l.getTagOfNode)(e.lastTarget.lastChild)&&"DIV"==(0,l.getTagOfNode)(e.lastTarget)||!e.editor.contains(e.lastTarget))t.preventDefault();else{e.prepareSelection();var n=!!(0,l.safeInstanceOf)(e.lastTarget,"HTMLTableCellElement")&&(0,l.contains)(e.lastTarget,e.firstTable);e.firstTable&&e.firstTable==e.targetTable||n?e.selectionInsideTableMouseMove(t):e.tableSelection&&e.restoreSelection(),e.tableSelection&&(c(e.editor,e.firstTarget,0),t.preventDefault())}}else t.preventDefault()}},this.onMouseUp=function(){e.editor&&e.removeMouseUpEventListener()},this.DeleteTableContents={keys:[46,8],shouldHandleEvent:function(e,t){return 1==t.getSelectionRangeEx().type},handleEvent:function(e,t){1==t.getSelectionRangeEx().type&&t.addUndoSnapshot((function(){t.getSelectedRegions().forEach((function(e){(0,l.safeInstanceOf)(e.rootNode,"HTMLTableCellElement")&&u(e.rootNode,t)}))}))}},this.lastTarget=null,this.firstTarget=null,this.tableSelection=!1,this.tableRange={firstCell:null,lastCell:null},this.startedSelection=!1}return e.prototype.getName=function(){return"TableCellSelection"},e.prototype.initialize=function(e){this.editor=e,this.editor.addContentEditFeature(this.DeleteTableContents)},e.prototype.dispose=function(){this.editor.select(null),this.removeMouseUpEventListener(),this.editor=null},e.prototype.onPluginEvent=function(e){if(this.editor)switch(e.eventType){case 17:var t=this.editor.getSelectionRangeEx();1==t.type&&(this.tableRange=t.coordinates,this.firstTable=t.table,this.tableSelection=!0,this.editor.select(t.table,null));break;case 18:if(this.firstTable&&this.tableSelection&&this.tableRange){var n=this.editor.queryElements("#"+this.firstTable.id);1==n.length&&(this.firstTable=n[0],this.editor.select(this.firstTable,this.tableRange))}break;case 9:this.handleBeforeCutCopy(e);break;case 5:this.startedSelection||this.handleMouseDownEvent(e);break;case 0:this.startedSelection?e.rawEvent.preventDefault():this.handleKeyDownEvent(e);break;case 2:this.startedSelection?e.rawEvent.preventDefault():this.handleKeyUpEvent(e);break;case 14:this.startedSelection&&this.handleScrollEvent();break;case 20:this.tableRange&&(this.tableRange=null,this.firstTable=null,this.tableSelection=!1,this.editor.select(null))}},e.prototype.handleScrollEvent=function(){this.setData(this.editor.getElementAtCursor()),this.firstTable==this.targetTable?this.tableSelection&&(this.vTable.selection.lastCell=(0,i.getCellCoordinates)(this.vTable,this.lastTarget),this.selectTable(),this.tableRange.lastCell=this.vTable.selection.lastCell,c(this.editor,this.firstTarget,0)):this.tableSelection&&this.restoreSelection()},e.prototype.handleBeforeCutCopy=function(e){var t=this,n=this.editor.getSelectionRangeEx();if(1==n.type){var r=e.clonedRoot.querySelector("table#"+n.table.id);if(r){this.tableRange=n.coordinates;var i=new l.VTable(r);i.selection=this.tableRange,(0,a.removeCellsOutsideSelection)(i),i.writeBack(),i.table.id="",e.range.selectNode(r),e.isCut&&(0,o.forEachSelectedCell)(this.vTable,(function(e){(null==e?void 0:e.td)&&u(e.td,t.editor)}))}}},e.prototype.handleKeyDownEvent=function(e){var t=this,n=e.rawEvent,r=n.shiftKey,o=n.ctrlKey,i=n.metaKey,a=n.which,s=n.defaultPrevented;if(r&&(o||i)||16==a||s)this.preventKeyUp=s;else if(r){if(!this.firstTarget){var u=this.editor.getFocusedPosition(),c=d(this.editor,u.node);this.firstTarget=this.firstTarget||c}if(!(0,l.safeInstanceOf)(this.firstTarget,"HTMLTableCellElement"))return;this.editor.runAsync((function(n){var r=n.getFocusedPosition();if(t.setData(t.tableSelection?t.lastTarget:r.node),t.firstTable==t.targetTable){if(!t.shouldConvertToTableSelection()&&!t.tableSelection)return;t.handleKeySelectionInsideTable(e)}else t.tableSelection&&(t.firstTable&&t.editor.select(t.firstTable,null),t.tableSelection=!1)}))}},e.prototype.handleKeyUpEvent=function(e){var t=e.rawEvent,n=t.shiftKey,r=t.which;n||16==r||!this.firstTarget||this.preventKeyUp||this.clearState(),this.preventKeyUp=!1},e.prototype.handleKeySelectionInsideTable=function(e){if(this.firstTarget=d(this.editor,this.firstTarget),this.lastTarget=d(this.editor,this.lastTarget),c(this.editor,this.firstTarget,0),this.vTable=this.vTable||new l.VTable(this.firstTable),this.tableRange.firstCell=(0,i.getCellCoordinates)(this.vTable,this.firstTarget),this.tableRange.lastCell=this.getNextTD(e),!this.tableRange.lastCell||this.tableRange.lastCell.y>this.vTable.cells.length-1||-1==this.tableRange.lastCell.y){if(this.lastTarget=this.editor.getElementAtCursor("td,th,div",this.firstTable),!(0,l.safeInstanceOf)(this.lastTarget,"HTMLTableCellElement")){var t=new l.Position(this.targetTable,null==this.tableRange.lastCell.y||-1==this.tableRange.lastCell.y?-2:-3),n=this.editor.getDocument().defaultView.getSelection(),r=n.anchorNode,o=n.anchorOffset;return this.editor.select(n.getRangeAt(0)),n.setBaseAndExtent(r,o,t.node,t.offset),this.lastTarget=t.node,void e.rawEvent.preventDefault()}this.prepareSelection()}this.vTable.selection=this.tableRange,this.selectTable();var a=this.isAfter(this.firstTarget,this.lastTarget),s=new l.Position(this.lastTarget,a?0:-1);c(this.editor,s.node,s.offset),this.tableSelection=!0,e.rawEvent.preventDefault()},e.prototype.handleMouseDownEvent=function(e){var t=this,n=e.rawEvent,o=n.which,a=n.shiftKey;if(3==o&&this.tableSelection){var s=this.editor.getElementAtCursor("td,th"),u=(0,i.getCellCoordinates)(this.vTable,s);if(u){var h=(0,r.default)(this.vTable),p=h.firstCell,g=h.lastCell;if(u.y>=p.y&&u.y<=g.y&&u.x>=p.x&&u.x<=g.x){if(this.firstTarget=this.vTable.getCell(p.y,p.x).td,this.lastTarget=this.vTable.getCell(g.y,g.x).td,this.firstTarget&&this.lastTarget)this.editor.getDocument().defaultView.getSelection().setBaseAndExtent(this.firstTarget,0,this.lastTarget,0),this.selectTable();return}}}1!=o||a||(this.clearState(),f(this.editor,e.rawEvent.target)&&(this.editor.getDocument().addEventListener("mouseup",this.onMouseUp,!0),this.editor.getDocument().addEventListener("mousemove",this.onMouseMove,!0),this.startedSelection=!0)),1==o&&a&&this.editor.runAsync((function(e){var n=e.getDocument().defaultView.getSelection(),r=d(e,n.anchorNode),o=d(e,n.focusNode),a=f(e,r),s=f(e,r);if(a==s&&(0,l.safeInstanceOf)(r,"HTMLTableCellElement")&&(0,l.safeInstanceOf)(o,"HTMLTableCellElement")){t.vTable=new l.VTable(r);var u=(0,i.getCellCoordinates)(t.vTable,r),h=(0,i.getCellCoordinates)(t.vTable,o);t.vTable.selection={firstCell:u,lastCell:h},t.firstTarget=r,t.lastTarget=o,t.selectTable(),t.tableRange=t.vTable.selection,t.tableSelection=!0,t.firstTable=a,t.targetTable=s,c(e,r,0)}}))},e.prototype.restoreSelection=function(){this.firstTable&&this.editor.select(this.firstTable,null),this.tableSelection=!1;var e=this.isAfter(this.firstTarget,this.lastTarget),t=new l.Position(this.lastTarget,e?-1:0),n=new Range;this.firstTarget&&n.selectNodeContents(this.firstTarget),c(this.editor,this.firstTarget,e?l.Position.getEnd(n).offset:l.Position.getStart(n).offset,t.element,t.offset)},e.prototype.selectionInsideTableMouseMove=function(e){var t;this.lastTarget!=this.firstTarget?(c(this.editor,this.firstTarget,0),this.firstTable!=this.targetTable&&(null===(t=this.targetTable)||void 0===t?void 0:t.contains(this.firstTable))&&(this.firstTarget=this.editor.getElementAtCursor("td,th",this.lastTarget)),this.firstTable&&(this.tableSelection=!0,this.vTable=this.vTable||new l.VTable(this.firstTable),this.tableRange.firstCell=(0,i.getCellCoordinates)(this.vTable,this.firstTarget),this.tableRange.lastCell=(0,i.getCellCoordinates)(this.vTable,this.lastTarget),this.vTable.selection=this.tableRange,this.selectTable()),e.preventDefault()):this.lastTarget==this.firstTarget&&this.tableSelection&&(this.vTable=new l.VTable(this.firstTable),this.tableRange.firstCell=(0,i.getCellCoordinates)(this.vTable,this.firstTarget),this.tableRange.lastCell=this.tableRange.firstCell,this.vTable.selection=this.tableRange,this.selectTable())},e.prototype.removeMouseUpEventListener=function(){this.startedSelection&&(this.startedSelection=!1,this.editor.getDocument().removeEventListener("mouseup",this.onMouseUp,!0),this.editor.getDocument().removeEventListener("mousemove",this.onMouseMove,!0))},e.prototype.clearState=function(){this.editor.select(null),this.vTable=null,this.firstTarget=null,this.lastTarget=null,this.tableRange={firstCell:null,lastCell:null},this.tableSelection=!1,this.firstTable=null,this.targetTable=null},e.prototype.getNextTD=function(e){if(this.lastTarget=this.editor.getElementAtCursor("td,th",this.lastTarget),(0,l.safeInstanceOf)(this.lastTarget,"HTMLTableCellElement")){var t=(0,i.getCellCoordinates)(this.vTable,this.lastTarget);if(this.tableSelection)switch(e.rawEvent.which){case 39:t.x+=this.lastTarget.colSpan,null==this.vTable.cells[t.y][t.x]&&(t.x=this.vTable.cells[t.y].length-1,t.y++);break;case 37:0==t.x?t.y--:t.x--;break;case 38:t.y--;break;case 40:t.y++}return t.y>=0&&t.x>=0&&(this.lastTarget=this.vTable.getTd(t.y,t.x)),t}return null},e.prototype.prepareSelection=function(){var e,t,n,r,o=this.lastTarget!=this.firstTarget&&(null===(e=this.firstTable)||void 0===e?void 0:e.contains((0,l.findClosestElementAncestor)(this.targetTable,this.firstTable,"td,th")));if(o&&this.tableSelection)for(;o;)this.lastTarget=(0,l.findClosestElementAncestor)(this.targetTable,this.firstTable,"td,th"),this.targetTable=f(this.editor,this.lastTarget),o=this.lastTarget!=this.firstTarget&&(null===(t=this.firstTable)||void 0===t?void 0:t.contains((0,l.findClosestElementAncestor)(this.targetTable,this.firstTable,"td,th")));var i=this.lastTarget!=this.firstTarget&&(null===(n=this.targetTable)||void 0===n?void 0:n.contains((0,l.findClosestElementAncestor)(this.firstTable,this.targetTable,"td,th")));if(i&&this.tableSelection)for(;i;)this.firstTarget=(0,l.findClosestElementAncestor)(this.firstTable,this.targetTable,"td,th"),this.firstTable=this.editor.getElementAtCursor("table",this.firstTarget),i=this.lastTarget!=this.firstTarget&&(null===(r=this.targetTable)||void 0===r?void 0:r.contains((0,l.findClosestElementAncestor)(this.firstTable,this.targetTable,"td,th")))},e.prototype.setData=function(e){var t=this.editor.getFocusedPosition();t&&(this.firstTarget=this.firstTarget||d(this.editor,t.node),this.firstTarget.nodeType==Node.TEXT_NODE&&(this.firstTarget=this.editor.getElementAtCursor("td,th",this.firstTarget)),!this.editor.contains(this.firstTarget)&&this.lastTarget&&(this.firstTarget=this.lastTarget)),this.firstTable=f(this.editor,this.firstTarget),this.lastTarget=d(this.editor,e),this.targetTable=f(this.editor,this.lastTarget)},e.prototype.isAfter=function(e,t){var n,r,o,i;if(e&&t){if(t.contains(e)){var a=null===(r=(n=e).getBoundingClientRect)||void 0===r?void 0:r.call(n),s=null===(i=(o=t).getBoundingClientRect)||void 0===i?void 0:i.call(o);if(a&&s)return a.top>s.top&&a.bottom<s.bottom}return new l.Position(e,-1).isAfter(new l.Position(t,-1))}return!1},e.prototype.shouldConvertToTableSelection=function(){var e=this;if(!this.firstTable||!this.editor)return!1;var t=this.editor.getSelectedRegions();if(1==t.length)return!1;var n=!0;return t.forEach((function(t){(0,l.contains)(e.firstTable,t.rootNode)||(n=!1)})),n},e.prototype.selectTable=function(){var e;this.editor&&this.vTable&&(null===(e=this.editor)||void 0===e||e.select(this.vTable.table,(0,r.default)(this.vTable)))},e}();function u(e,t){var n=new Range;n.selectNodeContents(e),n.deleteContents(),e.appendChild(t.getDocument().createElement("br"))}function c(e,t,n,r,o){r=r||t,o=o||n,e.getDocument().defaultView.getSelection().setBaseAndExtent(t,n,r,o)}function d(e,t){return e&&e.getElementAtCursor("td,th",t)||t}function f(e,t){return e?e.getElementAtCursor("table",t):null}t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(null==e?void 0:e.selection)||{},n=t.firstCell,r=t.lastCell;if(!(e&&e.selection&&n&&r))return null;var o=e.table.rows,i={x:Math.min(n.x,r.x),y:Math.min(n.y,r.y)},a={x:Math.max(n.x,r.x),y:Math.max(n.y,r.y)},l=function(e){e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.y>=o.length&&(e.y=o.length-1);var t=o.item(e.y).cells.length;e.x>=t&&(e.x=t-1)};return l(i),l(a),{firstCell:i,lastCell:a}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEachSelectedCell=void 0,t.forEachSelectedCell=function(e,t){for(var n,r=e.selection,o=r.lastCell,i=r.firstCell,a=i.y;a<=o.y;a++)for(var l=i.x;l<=o.x;l++)(null===(n=e.cells[a][l])||void 0===n?void 0:n.td)&&t(e.cells[a][l])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCellCoordinates=void 0,t.getCellCoordinates=function(e,t){var n;if(null==e?void 0:e.cells)for(var r=0;r<e.cells.length;r++)for(var o=0;o<e.cells[r].length;o++)t==e.cells[r][o].td&&(n={x:o,y:r});return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeCellsOutsideSelection=void 0;var r=n(0);t.removeCellsOutsideSelection=function(e){if(!(0,r.isWholeTableSelected)(e,e.selection)){var t=e.selection,n=t.firstCell,o=t.lastCell,i=[],a=n.x,l=n.y,s=o.x,u=o.y;e.cells.forEach((function(e,t){(e=e.filter((function(e,n){return t>=l&&t<=u&&n>=a&&n<=s}))).length>0&&i.push(e)})),e.cells=i}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}])}));
1
+ define((function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=106)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KnownCreateElementData=t.createElement=t.matchesSelector=t.setColor=t.getInnerHTML=t.readFile=t.safeInstanceOf=t.toArray=t.normalizeRect=t.splitTextNode=t.getLastLeafNode=t.getFirstLeafNode=t.getPreviousLeafSibling=t.getNextLeafSibling=t.wrap=t.unwrap=t.splitBalancedNodeRange=t.splitParentNode=t.queryElements=t.matchLink=t.isVoidHtmlElement=t.isNodeEmpty=t.isBlockElement=t.getTagOfNode=t.PendableFormatCommandMap=t.getPendableFormatState=t.getComputedStyle=t.getComputedStyles=t.fromHtml=t.findClosestElementAncestor=t.contains=t.collapseNodes=t.changeElementTag=t.applyFormat=t.getBrowserInfo=t.Browser=t.arrayPush=t.extractClipboardItemsForIE=t.extractClipboardItems=t.extractClipboardEvent=t.applyTextStyle=t.PartialInlineElement=t.NodeInlineElement=t.LinkInlineElement=t.ImageInlineElement=t.getInlineElementAtNode=t.PositionContentSearcher=t.ContentTraverser=t.getFirstLastBlockElement=t.getBlockElementAtNode=void 0,t.getTextContent=t.deleteSelectedContent=t.adjustInsertPosition=t.setStyles=t.getStyles=t.isCtrlOrMetaPressed=t.isCharacterValue=t.isModifierKey=t.clearEventDataCache=t.cacheGetEventData=t.getEntitySelector=t.getEntityFromElement=t.commitEntity=t.chainSanitizerCallback=t.createDefaultHtmlSanitizerOptions=t.getInheritableStyles=t.HtmlSanitizer=t.canUndoAutoComplete=t.createSnapshots=t.moveCurrentSnapsnot=t.moveCurrentSnapshot=t.clearProceedingSnapshotsV2=t.clearProceedingSnapshots=t.canMoveCurrentSnapshot=t.addSnapshotV2=t.addSnapshot=t.addRangeToSelection=t.setHtmlWithMetadata=t.setHtmlWithSelectionPath=t.getHtmlWithSelectionPath=t.getSelectionPath=t.isPositionAtBeginningOf=t.getPositionRect=t.createRange=t.Position=t.mergeBlocksInRegion=t.getSelectionRangeInRegion=t.isNodeInRegion=t.collapseNodesInRegion=t.getSelectedBlockElementsInRegion=t.getRegionsFromRange=t.setListItemStyle=t.VListChain=t.createVListFromRegion=t.VListItem=t.VList=t.isWholeTableSelected=t.VTable=t.moveChildNodes=void 0;var r=n(7);Object.defineProperty(t,"getBlockElementAtNode",{enumerable:!0,get:function(){return r.default}});var o=n(57);Object.defineProperty(t,"getFirstLastBlockElement",{enumerable:!0,get:function(){return o.default}});var i=n(22);Object.defineProperty(t,"ContentTraverser",{enumerable:!0,get:function(){return i.default}});var a=n(62);Object.defineProperty(t,"PositionContentSearcher",{enumerable:!0,get:function(){return a.default}});var l=n(15);Object.defineProperty(t,"getInlineElementAtNode",{enumerable:!0,get:function(){return l.default}});var s=n(58);Object.defineProperty(t,"ImageInlineElement",{enumerable:!0,get:function(){return s.default}});var u=n(40);Object.defineProperty(t,"LinkInlineElement",{enumerable:!0,get:function(){return u.default}});var c=n(27);Object.defineProperty(t,"NodeInlineElement",{enumerable:!0,get:function(){return c.default}});var d=n(29);Object.defineProperty(t,"PartialInlineElement",{enumerable:!0,get:function(){return d.default}});var f=n(38);Object.defineProperty(t,"applyTextStyle",{enumerable:!0,get:function(){return f.default}});var h=n(115);Object.defineProperty(t,"extractClipboardEvent",{enumerable:!0,get:function(){return h.default}});var p=n(63);Object.defineProperty(t,"extractClipboardItems",{enumerable:!0,get:function(){return p.default}});var g=n(64);Object.defineProperty(t,"extractClipboardItemsForIE",{enumerable:!0,get:function(){return g.default}});var v=n(43);Object.defineProperty(t,"arrayPush",{enumerable:!0,get:function(){return v.default}});var m=n(21);Object.defineProperty(t,"Browser",{enumerable:!0,get:function(){return m.Browser}}),Object.defineProperty(t,"getBrowserInfo",{enumerable:!0,get:function(){return m.getBrowserInfo}});var y=n(116);Object.defineProperty(t,"applyFormat",{enumerable:!0,get:function(){return y.default}});var b=n(16);Object.defineProperty(t,"changeElementTag",{enumerable:!0,get:function(){return b.default}});var E=n(18);Object.defineProperty(t,"collapseNodes",{enumerable:!0,get:function(){return E.default}});var C=n(3);Object.defineProperty(t,"contains",{enumerable:!0,get:function(){return C.default}});var S=n(11);Object.defineProperty(t,"findClosestElementAncestor",{enumerable:!0,get:function(){return S.default}});var w=n(56);Object.defineProperty(t,"fromHtml",{enumerable:!0,get:function(){return w.default}});var P=n(39);Object.defineProperty(t,"getComputedStyles",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"getComputedStyle",{enumerable:!0,get:function(){return P.getComputedStyle}});var T=n(117);Object.defineProperty(t,"getPendableFormatState",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"PendableFormatCommandMap",{enumerable:!0,get:function(){return T.PendableFormatCommandMap}});var O=n(2);Object.defineProperty(t,"getTagOfNode",{enumerable:!0,get:function(){return O.default}});var x=n(19);Object.defineProperty(t,"isBlockElement",{enumerable:!0,get:function(){return x.default}});var N=n(31);Object.defineProperty(t,"isNodeEmpty",{enumerable:!0,get:function(){return N.default}});var _=n(37);Object.defineProperty(t,"isVoidHtmlElement",{enumerable:!0,get:function(){return _.default}});var M=n(118);Object.defineProperty(t,"matchLink",{enumerable:!0,get:function(){return M.default}});var k=n(17);Object.defineProperty(t,"queryElements",{enumerable:!0,get:function(){return k.default}});var I=n(13);Object.defineProperty(t,"splitParentNode",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"splitBalancedNodeRange",{enumerable:!0,get:function(){return I.splitBalancedNodeRange}});var R=n(32);Object.defineProperty(t,"unwrap",{enumerable:!0,get:function(){return R.default}});var L=n(12);Object.defineProperty(t,"wrap",{enumerable:!0,get:function(){return L.default}});var A=n(8);Object.defineProperty(t,"getNextLeafSibling",{enumerable:!0,get:function(){return A.getNextLeafSibling}}),Object.defineProperty(t,"getPreviousLeafSibling",{enumerable:!0,get:function(){return A.getPreviousLeafSibling}});var j=n(60);Object.defineProperty(t,"getFirstLeafNode",{enumerable:!0,get:function(){return j.getFirstLeafNode}}),Object.defineProperty(t,"getLastLeafNode",{enumerable:!0,get:function(){return j.getLastLeafNode}});var D=n(28);Object.defineProperty(t,"splitTextNode",{enumerable:!0,get:function(){return D.default}});var B=n(45);Object.defineProperty(t,"normalizeRect",{enumerable:!0,get:function(){return B.default}});var F=n(5);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return F.default}});var H=n(1);Object.defineProperty(t,"safeInstanceOf",{enumerable:!0,get:function(){return H.default}});var z=n(42);Object.defineProperty(t,"readFile",{enumerable:!0,get:function(){return z.default}});var U=n(65);Object.defineProperty(t,"getInnerHTML",{enumerable:!0,get:function(){return U.default}});var W=n(44);Object.defineProperty(t,"setColor",{enumerable:!0,get:function(){return W.default}});var V=n(55);Object.defineProperty(t,"matchesSelector",{enumerable:!0,get:function(){return V.default}});var K=n(20);Object.defineProperty(t,"createElement",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(t,"KnownCreateElementData",{enumerable:!0,get:function(){return K.KnownCreateElementData}});var q=n(30);Object.defineProperty(t,"moveChildNodes",{enumerable:!0,get:function(){return q.default}});var G=n(66);Object.defineProperty(t,"VTable",{enumerable:!0,get:function(){return G.default}});var $=n(121);Object.defineProperty(t,"isWholeTableSelected",{enumerable:!0,get:function(){return $.default}});var Y=n(46);Object.defineProperty(t,"VList",{enumerable:!0,get:function(){return Y.default}});var X=n(67);Object.defineProperty(t,"VListItem",{enumerable:!0,get:function(){return X.default}});var Z=n(122);Object.defineProperty(t,"createVListFromRegion",{enumerable:!0,get:function(){return Z.default}});var Q=n(123);Object.defineProperty(t,"VListChain",{enumerable:!0,get:function(){return Q.default}});var J=n(68);Object.defineProperty(t,"setListItemStyle",{enumerable:!0,get:function(){return J.default}});var ee=n(71);Object.defineProperty(t,"getRegionsFromRange",{enumerable:!0,get:function(){return ee.default}});var te=n(70);Object.defineProperty(t,"getSelectedBlockElementsInRegion",{enumerable:!0,get:function(){return te.default}});var ne=n(72);Object.defineProperty(t,"collapseNodesInRegion",{enumerable:!0,get:function(){return ne.default}});var re=n(24);Object.defineProperty(t,"isNodeInRegion",{enumerable:!0,get:function(){return re.default}});var oe=n(48);Object.defineProperty(t,"getSelectionRangeInRegion",{enumerable:!0,get:function(){return oe.default}});var ie=n(73);Object.defineProperty(t,"mergeBlocksInRegion",{enumerable:!0,get:function(){return ie.default}});var ae=n(4);Object.defineProperty(t,"Position",{enumerable:!0,get:function(){return ae.default}});var le=n(9);Object.defineProperty(t,"createRange",{enumerable:!0,get:function(){return le.default}});var se=n(124);Object.defineProperty(t,"getPositionRect",{enumerable:!0,get:function(){return se.default}});var ue=n(75);Object.defineProperty(t,"isPositionAtBeginningOf",{enumerable:!0,get:function(){return ue.default}});var ce=n(76);Object.defineProperty(t,"getSelectionPath",{enumerable:!0,get:function(){return ce.default}});var de=n(125);Object.defineProperty(t,"getHtmlWithSelectionPath",{enumerable:!0,get:function(){return de.default}});var fe=n(126);Object.defineProperty(t,"setHtmlWithSelectionPath",{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(t,"setHtmlWithMetadata",{enumerable:!0,get:function(){return fe.setHtmlWithMetadata}});var he=n(127);Object.defineProperty(t,"addRangeToSelection",{enumerable:!0,get:function(){return he.default}});var pe=n(128);Object.defineProperty(t,"addSnapshot",{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(t,"addSnapshotV2",{enumerable:!0,get:function(){return pe.addSnapshotV2}});var ge=n(49);Object.defineProperty(t,"canMoveCurrentSnapshot",{enumerable:!0,get:function(){return ge.default}});var ve=n(77);Object.defineProperty(t,"clearProceedingSnapshots",{enumerable:!0,get:function(){return ve.default}}),Object.defineProperty(t,"clearProceedingSnapshotsV2",{enumerable:!0,get:function(){return ve.clearProceedingSnapshotsV2}});var me=n(129);Object.defineProperty(t,"moveCurrentSnapshot",{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(t,"moveCurrentSnapsnot",{enumerable:!0,get:function(){return me.moveCurrentSnapsnot}});var ye=n(130);Object.defineProperty(t,"createSnapshots",{enumerable:!0,get:function(){return ye.default}});var be=n(131);Object.defineProperty(t,"canUndoAutoComplete",{enumerable:!0,get:function(){return be.default}});var Ee=n(132);Object.defineProperty(t,"HtmlSanitizer",{enumerable:!0,get:function(){return Ee.default}});var Ce=n(78);Object.defineProperty(t,"getInheritableStyles",{enumerable:!0,get:function(){return Ce.default}});var Se=n(134);Object.defineProperty(t,"createDefaultHtmlSanitizerOptions",{enumerable:!0,get:function(){return Se.default}});var we=n(135);Object.defineProperty(t,"chainSanitizerCallback",{enumerable:!0,get:function(){return we.default}});var Pe=n(136);Object.defineProperty(t,"commitEntity",{enumerable:!0,get:function(){return Pe.default}});var Te=n(137);Object.defineProperty(t,"getEntityFromElement",{enumerable:!0,get:function(){return Te.default}});var Oe=n(138);Object.defineProperty(t,"getEntitySelector",{enumerable:!0,get:function(){return Oe.default}});var xe=n(139);Object.defineProperty(t,"cacheGetEventData",{enumerable:!0,get:function(){return xe.default}});var Ne=n(140);Object.defineProperty(t,"clearEventDataCache",{enumerable:!0,get:function(){return Ne.default}});var _e=n(80);Object.defineProperty(t,"isModifierKey",{enumerable:!0,get:function(){return _e.default}});var Me=n(141);Object.defineProperty(t,"isCharacterValue",{enumerable:!0,get:function(){return Me.default}});var ke=n(142);Object.defineProperty(t,"isCtrlOrMetaPressed",{enumerable:!0,get:function(){return ke.default}});var Ie=n(33);Object.defineProperty(t,"getStyles",{enumerable:!0,get:function(){return Ie.default}});var Re=n(34);Object.defineProperty(t,"setStyles",{enumerable:!0,get:function(){return Re.default}});var Le=n(143);Object.defineProperty(t,"adjustInsertPosition",{enumerable:!0,get:function(){return Le.default}});var Ae=n(144);Object.defineProperty(t,"deleteSelectedContent",{enumerable:!0,get:function(){return Ae.default}});var je=n(145);Object.defineProperty(t,"getTextContent",{enumerable:!0,get:function(){return je.default}})},function(e,t,n){"use strict";function r(e){var t=e&&(e.commonAncestorContainer||e),n=t&&(t.ownerDocument||("[object HTMLDocument]"==Object.prototype.toString.apply(t)?t:null));return n&&(n.defaultView||window)}Object.defineProperty(t,"__esModule",{value:!0}),t.getTargetWindow=void 0,t.getTargetWindow=r,t.default=function(e,t){var n=r(e),o=n&&n[t],i=window,a=i&&i[t];return a&&e instanceof a||o&&e instanceof o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&1==e.nodeType?e.tagName.toUpperCase():""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(e,t,n){return!(!e||!t)&&(!(!n||e!=t)||((0,r.default)(t,"Range")&&(t=t&&t.commonAncestorContainer,n=!0),t&&3==t.nodeType&&(t=t.parentNode,n=!0),1!=e.nodeType&&11!=e.nodeType?!!n&&e==t:!(!n&&e==t)&&function(e,t){if(e.contains)return e.contains(t);for(;t;){if(t==e)return!0;t=t.parentNode}return!1}(e,t)))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),o=n(14),i=function(){function e(e,t,n){switch(void 0===t&&(t=0),this.isFromEndOfRange=n,e.node?(this.node=e.node,t=e.offset):this.node=e,t){case-2:this.offset=a(this.node),this.node=this.node.parentNode,this.isAtEnd=!1;break;case-3:this.offset=a(this.node)+1,this.isAtEnd=!this.node.nextSibling,this.node=this.node.parentNode;break;case-1:this.offset=l(this.node),this.isAtEnd=!0;break;default:var o=l(this.node);this.offset=Math.max(0,Math.min(t,o)),this.isAtEnd=t>0&&t>=o}this.element=(0,r.default)(this.node)}return e.prototype.normalize=function(){if(3==this.node.nodeType||!this.node.firstChild)return this;for(var t=this.node,n=this.isAtEnd?-1:this.offset;1==t.nodeType||11==t.nodeType;){var r=this.isFromEndOfRange?-1==n?t.lastChild:t.childNodes[n-1]:0==n?t.firstChild:-1==n?t.lastChild:t.childNodes[n];if(!r)break;t=r,n=this.isAtEnd||this.isFromEndOfRange?-1:0}return new e(t,n,this.isFromEndOfRange)},e.prototype.equalTo=function(e){return e&&(this==e||this.node==e.node&&this.offset==e.offset&&this.isAtEnd==e.isAtEnd)},e.prototype.isAfter=function(e){return this.node==e.node?this.isAtEnd&&!e.isAtEnd||this.offset>e.offset:(0,o.default)(this.node,e.node)},e.prototype.move=function(t){return new e(this.node,Math.max(this.offset+t,0))},e.getStart=function(t){return new e(t.startContainer,t.startOffset)},e.getEnd=function(t){return t.collapsed?e.getStart(t):new e(t.endContainer,t.endOffset,!0)},e}();function a(e){for(var t=0;e=(null==e?void 0:e.previousSibling)||null;)t++;return t}function l(e){var t;return 3==e.nodeType?(null===(t=e.nodeValue)||void 0===t?void 0:t.length)||0:1==e.nodeType?e.childNodes.length:1}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.experimentCommitListChains=t.blockFormat=t.toggleListType=t.applyCellShading=t.toggleHeader=t.toggleUnderline=t.toggleSuperscript=t.toggleSubscript=t.toggleStrikethrough=t.toggleCodeBlock=t.toggleBlockQuote=t.setOrderedListNumbering=t.toggleNumbering=t.toggleItalic=t.toggleBullet=t.toggleBold=t.changeCapitalization=t.setIndentation=t.setImageAltText=t.setFontSize=t.setFontName=t.setDirection=t.setTextColor=t.setBackgroundColor=t.setAlignment=t.rotateElement=t.replaceWithNode=t.removeLink=t.formatTable=t.editTable=t.insertTable=t.insertImage=t.insertEntity=t.getElementBasedFormatState=t.getFormatState=t.createLink=t.clearFormat=t.clearBlockFormat=t.FONT_SIZES=t.changeFontSize=void 0;var r=n(185);Object.defineProperty(t,"changeFontSize",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"FONT_SIZES",{enumerable:!0,get:function(){return r.FONT_SIZES}});var o=n(186);Object.defineProperty(t,"clearBlockFormat",{enumerable:!0,get:function(){return o.default}});var i=n(87);Object.defineProperty(t,"clearFormat",{enumerable:!0,get:function(){return i.default}});var a=n(187);Object.defineProperty(t,"createLink",{enumerable:!0,get:function(){return a.default}});var l=n(188);Object.defineProperty(t,"getFormatState",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"getElementBasedFormatState",{enumerable:!0,get:function(){return l.getElementBasedFormatState}});var s=n(189);Object.defineProperty(t,"insertEntity",{enumerable:!0,get:function(){return s.default}});var u=n(190);Object.defineProperty(t,"insertImage",{enumerable:!0,get:function(){return u.default}});var c=n(191);Object.defineProperty(t,"insertTable",{enumerable:!0,get:function(){return c.default}});var d=n(192);Object.defineProperty(t,"editTable",{enumerable:!0,get:function(){return d.default}});var f=n(193);Object.defineProperty(t,"formatTable",{enumerable:!0,get:function(){return f.default}});var h=n(194);Object.defineProperty(t,"removeLink",{enumerable:!0,get:function(){return h.default}});var p=n(195);Object.defineProperty(t,"replaceWithNode",{enumerable:!0,get:function(){return p.default}});var g=n(196);Object.defineProperty(t,"rotateElement",{enumerable:!0,get:function(){return g.default}});var v=n(197);Object.defineProperty(t,"setAlignment",{enumerable:!0,get:function(){return v.default}});var m=n(89);Object.defineProperty(t,"setBackgroundColor",{enumerable:!0,get:function(){return m.default}});var y=n(92);Object.defineProperty(t,"setTextColor",{enumerable:!0,get:function(){return y.default}});var b=n(198);Object.defineProperty(t,"setDirection",{enumerable:!0,get:function(){return b.default}});var E=n(90);Object.defineProperty(t,"setFontName",{enumerable:!0,get:function(){return E.default}});var C=n(91);Object.defineProperty(t,"setFontSize",{enumerable:!0,get:function(){return C.default}});var S=n(200);Object.defineProperty(t,"setImageAltText",{enumerable:!0,get:function(){return S.default}});var w=n(201);Object.defineProperty(t,"setIndentation",{enumerable:!0,get:function(){return w.default}});var P=n(202);Object.defineProperty(t,"changeCapitalization",{enumerable:!0,get:function(){return P.default}});var T=n(93);Object.defineProperty(t,"toggleBold",{enumerable:!0,get:function(){return T.default}});var O=n(203);Object.defineProperty(t,"toggleBullet",{enumerable:!0,get:function(){return O.default}});var x=n(94);Object.defineProperty(t,"toggleItalic",{enumerable:!0,get:function(){return x.default}});var N=n(204);Object.defineProperty(t,"toggleNumbering",{enumerable:!0,get:function(){return N.default}});var _=n(205);Object.defineProperty(t,"setOrderedListNumbering",{enumerable:!0,get:function(){return _.default}});var M=n(206);Object.defineProperty(t,"toggleBlockQuote",{enumerable:!0,get:function(){return M.default}});var k=n(207);Object.defineProperty(t,"toggleCodeBlock",{enumerable:!0,get:function(){return k.default}});var I=n(208);Object.defineProperty(t,"toggleStrikethrough",{enumerable:!0,get:function(){return I.default}});var R=n(209);Object.defineProperty(t,"toggleSubscript",{enumerable:!0,get:function(){return R.default}});var L=n(210);Object.defineProperty(t,"toggleSuperscript",{enumerable:!0,get:function(){return L.default}});var A=n(95);Object.defineProperty(t,"toggleUnderline",{enumerable:!0,get:function(){return A.default}});var j=n(211);Object.defineProperty(t,"toggleHeader",{enumerable:!0,get:function(){return j.default}});var D=n(212);Object.defineProperty(t,"applyCellShading",{enumerable:!0,get:function(){return D.default}});var B=n(51);Object.defineProperty(t,"toggleListType",{enumerable:!0,get:function(){return B.default}});var F=n(25);Object.defineProperty(t,"blockFormat",{enumerable:!0,get:function(){return F.default}});var H=n(88);Object.defineProperty(t,"experimentCommitListChains",{enumerable:!0,get:function(){return H.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=n(3),i=n(2),a=n(19),l=n(54),s=n(111);function u(e,t,n){var r=e;if("BR"==(0,i.default)(r)&&n)return r;for(;r;){for(var o=e;e.parentNode&&!(o=n?e.nextSibling:e.previousSibling);)if((e=e.parentNode)==t)return r;for(;o;){if((0,a.default)(o))return r;if("BR"==(0,i.default)(o))return n?o:r;e=o,o=n?e.firstChild:e.lastChild}r=e}return r}t.default=function(e,t){if(!(0,o.default)(e,t))return null;var n=s.default.getBlockContext(t);if(!n)return null;if(n==t)return new l.default(n);var i=u(t,n,!1),c=u(t,n,!0),d=(0,r.default)(e,i,c,!1);if(i=d[0],c=d[d.length-1],i.parentNode!=c.parentNode)return new s.default(e,i,c);for(;!i.previousSibling&&!c.nextSibling;){var f=i.parentNode;if(f==n){n!=e&&(i=c=f);break}if(!f||f==e)break;i=c=f}return i==c&&(0,a.default)(i)?new l.default(i):new s.default(e,i,c)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPreviousLeafSibling=t.getNextLeafSibling=t.getLeafSibling=void 0;var r=n(3),o=n(2),i=n(23);function a(e,t,n,a,l){var s=null,u=n?function(e){return(null==e?void 0:e.nextSibling)||null}:function(e){return(null==e?void 0:e.previousSibling)||null},c=n?function(e){return e.firstChild}:function(e){return e.lastChild};if((0,r.default)(e,t))for(var d=t,f=!0;f;){var h=(null==d?void 0:d.parentNode)||null;for(d=u(d);!d&&h!=e;)d=u(h),h=(null==h?void 0:h.parentNode)||null;for(;d&&(!a||a.indexOf((0,o.default)(d))<0)&&c(d);)d=c(d);if(!(f=!!d&&(0,i.default)(d,l))){s=d;break}}return s}t.getLeafSibling=a,t.getNextLeafSibling=function(e,t,n){return a(e,t,!0,n)},t.getPreviousLeafSibling=function(e,t,n){return a(e,t,!1,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(37),o=n(4),i=n(1);function a(e){return 1==e.node.nodeType&&(0,r.default)(e.node)?new o.default(e.node,e.isAtEnd?-3:-2):e}function l(e){return e&&e.node}function s(e,t){if(!e||!t)return null;for(var n=0,r=0;r<t.length&&(n=t[r],r<t.length-1&&e&&1==e.nodeType&&e.childNodes.length>n);r++)e=e.childNodes[n];return new o.default(e,n)}t.default=function(e,t,n,r){var u,c=null,d=null;if(l(e)?(c=e,d=l(t)?t:null):(0,i.default)(e,"Node")&&(Array.isArray(t)?(c=s(e,t),d=Array.isArray(n)?s(e,n):null):"number"==typeof t?(c=new o.default(e,t),d=(0,i.default)(n,"Node")?new o.default(n,r):null):!(0,i.default)(t,"Node")&&t||(c=new o.default(e,-2),d=new o.default(t||e,-3))),null===(u=null==c?void 0:c.node)||void 0===u?void 0:u.ownerDocument){var f=c.node.ownerDocument.createRange();return c=a(c),d=a(d||c),f.setStart(c.node,c.offset),f.setEnd(d.node,d.offset),f}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){e.focus();var n=function(){return e.getDocument().execCommand(t,!1,null)},o=e.getSelectionRangeEx();if(o&&o.areAllCollapsed){e.addUndoSnapshot();var i=e.getPendableFormatState(!1);n();var a=Object.keys(r.PendableFormatCommandMap).filter((function(e){return r.PendableFormatCommandMap[e]==t}))[0];a&&(i[a]=!i[a],e.triggerPluginEvent(13,{formatState:i}))}else e.addUndoSnapshot((function(){var t;o.ranges.forEach((function(r){1==o.type&&e.select(r),n(),t=r})),t&&1==o.type&&e.select(o.table,o.coordinates)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(55);t.default=function(e,t,n){var i=(e=e?1==e.nodeType?e:e.parentNode:null)&&1==e.nodeType?e:null;if(i&&n)if(i.closest)i=i.closest(n);else for(;i&&i!=t&&!(0,o.default)(i,n);)i=i.parentElement;return!t||(0,r.default)(t,i)?i:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),o=n(56),i=n(1);t.default=function(e,t){if(0==(e=e?(0,i.default)(e,"Node")?[e]:e:[]).length||!e[0]||!e[0].ownerDocument)return null;if(t||(t="div"),!(0,i.default)(t,"HTMLElement")){var n=e[0].ownerDocument;t="string"==typeof t?/^\w+$/.test(t)?n.createElement(t):(0,o.default)(t,n)[0]:(0,r.default)(t,n)}var a=e[0].parentNode;a&&a.insertBefore(t,e[0]);for(var l=0,s=e;l<s.length;l++){var u=s[l];t.appendChild(u)}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitBalancedNodeRange=void 0;var r=n(14);function o(e,t){var n;if(!e||!e.parentNode)return null;var r=e.parentNode,o=r.cloneNode(!1);if(o.removeAttribute("id"),t)for(;r.firstChild&&r.firstChild!=e;)o.appendChild(r.firstChild);else for(;e.nextSibling;)o.appendChild(e.nextSibling);return o.firstChild&&""!=o.innerHTML?null===(n=r.parentNode)||void 0===n||n.insertBefore(o,t?r:r.nextSibling):o=null,o}t.default=o,t.splitBalancedNodeRange=function(e){var t=Array.isArray(e)?e[0]:e,n=Array.isArray(e)?e[e.length-1]:e,i=t&&n&&t.parentNode==n.parentNode?t.parentNode:null;if(i){if((0,r.default)(t,n)){var a=n;n=t,t=a}o(t,!0),o(n,!1)}return i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return!(!e||!t||4!=(4&t.compareDocumentPosition(e)))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),o=n(2),i=n(58),a=n(40),l=n(27),s=n(1);t.default=function(e,t){var n=(0,s.default)(e,"Node")?(0,r.default)(e,t):e;return t&&n&&function(e,t){for(var n,r=[e],s=e.parentNode;s&&t.contains(s);s=s.parentNode)r.push(s);for(var u=r.length-1;u>=0&&!n;u--){var c=r[u],d=(0,o.default)(c);"A"==d?n=new a.default(c,t):"IMG"==d&&(n=new i.default(c,t))}return n||new l.default(e,t)}(t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(39),o=n(2),i=n(30);t.default=function(e,t){var n;if(!e||!t)return null;var a=(0,o.default)(e);if(a==t.toUpperCase())return e;for(var l=e.ownerDocument.createElement(t),s=0;s<e.attributes.length;s++){var u=e.attributes[s];l.setAttribute(u.name,u.value)}return(0,i.default)(l,e),"P"!=a&&"P"!=(0,o.default)(l)||(n=(0,r.default)(e,["margin-top","margin-bottom"]),l.style.marginTop=n[0],l.style.marginBottom=n[1]),e.parentNode&&e.parentNode.replaceChild(l,e),l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);function o(e,t){return t.some((function(t){return 0==t?0==e:(e&t)==t}))}t.default=function(e,t,n,i,a){if(void 0===i&&(i=0),!e||!t)return[];var l=(0,r.default)(e.querySelectorAll(t));if(0!=i&&a){var s=a.startContainer,u=a.startOffset,c=a.endContainer,d=a.endOffset;if(1==s.nodeType&&s.firstChild){var f=s.childNodes[u];s=f||s.lastChild}c=1==c.nodeType&&c.firstChild&&d>0?c.childNodes[d-1]:c,l=l.filter((function(e){return function(e,t,n,r){var i=e.compareDocumentPosition(t),a=e.compareDocumentPosition(n),l=[0,8];r||l.push(16);return o(i,l)||o(a,l)||o(i,[2])&&o(a,[4])&&!o(a,[16])}(e,s,c,2==i)}))}return n&&l.forEach(n),l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.collapse=void 0;var r=n(3),o=n(13),i=n(5);function a(e,t,n,i,a){for(;t.parentNode!=e&&!(0,r.default)(t.parentNode,n);){if(i&&t.previousSibling||!i&&t.nextSibling){if(!a)break;(0,o.default)(t,i)}if(!t.parentNode)break;t=t.parentNode}return t}t.default=function(e,t,n,o){var l;if(!(0,r.default)(e,t)||!(0,r.default)(e,n))return[];if(t=a(e,t,n,!0,o),n=a(e,n,t,!1,o),(0,r.default)(t,n,!0))return[t];if((0,r.default)(n,t))return[n];if(t.parentNode==n.parentNode){var s=t.parentNode?(0,i.default)(null===(l=t.parentNode)||void 0===l?void 0:l.childNodes):[],u=s.indexOf(t),c=s.indexOf(n);return s.slice(u,c+1)}return[t,n]},t.collapse=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o="ADDRESS,ARTICLE,ASIDE,BLOCKQUOTE,CANVAS,DD,DIV,DL,DT,FIELDSET,FIGCAPTION,FIGURE,FOOTER,FORM,H1,H2,H3,H4,H5,H6,HEADER,HR,LI,MAIN,NAV,NOSCRIPT,OL,OUTPUT,P,PRE,SECTION,TABLE,TD,TH,TFOOT,UL,VIDEO".split(","),i=["block","list-item","table-cell"];t.default=function(e){var t=(0,r.default)(e);return!(!t||!(i.indexOf(e.style.display)>=0||o.indexOf(t)>=0))}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.KnownCreateElementData=void 0;var o=n(1),i=n(21);t.KnownCreateElementData=((r={})[0]={tag:""},r[1]=i.Browser.isEdge?{tag:"div",children:[{tag:"span",children:[{tag:"br"}]}]}:{tag:"div",children:[{tag:"br"}]},r[2]={tag:"blockquote",style:"margin-top:0;margin-bottom:0"},r[3]={tag:"div",style:"width: 1px; height: 1px; overflow: hidden; position: fixed; top: 0; left; 0; -webkit-user-select: text",attributes:{contenteditable:"true"}},r[4]={tag:"li",style:"display:block"},r[5]={tag:"div",style:"position: fixed; width: 0; height: 0"},r[6]={tag:"div",style:"width:100%;height:100%;position:relative;overflow:hidden"},r[7]={tag:"div",style:"position: fixed; cursor: row-resize; user-select: none"},r[8]={tag:"div",style:"position: fixed; cursor: col-resize; user-select: none"},r[9]={tag:"div",style:"position: fixed; cursor: nw-resize; user-select: none; border: 1px solid #808080"},r[10]={tag:"div",style:"position: fixed; cursor: ne-resize; user-select: none; border: 1px solid #808080"},r[11]={tag:"div",style:"position: fixed; cursor: all-scroll; user-select: none; border: 1px solid #808080"},r),t.default=function e(n,r){if("number"==typeof n&&(n=t.KnownCreateElementData[n]),!n||!n.tag)return null;var i=n.tag,a=n.namespace,l=n.className,s=n.style,u=n.dataset,c=n.attributes,d=n.children,f=a?r.createElementNS(a,i):r.createElement(i);return s&&f.setAttribute("style",s),l&&(f.className=l),u&&(0,o.default)(f,"HTMLElement")&&Object.keys(u).forEach((function(e){f.dataset[e]=u[e]})),c&&Object.keys(c).forEach((function(e){f.setAttribute(e,c[e])})),d&&d.forEach((function(t){if("string"==typeof t)f.appendChild(r.createTextNode(t));else if(t){var n=e(t,r);n&&f.appendChild(n)}})),f}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Browser=t.getBrowserInfo=void 0;var r=/android/i;function o(e,t){var n=-1!=e.indexOf("rv:")&&-1!=e.indexOf("Trident"),o=-1!=e.indexOf("MSIE")||n,i=!1,a=!1,l=!1,s=!1,u=-1!=e.indexOf("WebKit");return o||(i=-1!=e.indexOf("Chrome"),a=-1!=e.indexOf("Firefox"),-1!=e.indexOf("Safari")&&(l=-1==e.indexOf("Chrome")&&-1==e.indexOf("Android")),(s=-1!=e.indexOf("Edge"))&&(u=i=a=!1)),{isMac:-1!=t.indexOf("Mac"),isWin:-1!=t.indexOf("Win")||-1!=t.indexOf("NT"),isWebKit:u,isIE:o,isIE11OrGreater:n,isSafari:l,isChrome:i,isFirefox:a,isEdge:s,isIEOrEdge:o||s,isAndroid:r.test(e)}}t.getBrowserInfo=o,t.Browser=window?o(window.navigator.userAgent,window.navigator.appVersion):{}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(112),o=n(61),i=n(7),a=n(15),l=n(29),s=n(113),u=n(114),c=n(41),d=n(8),f=function(){function e(e,t){this.scoper=e,this.skipTags=t,this.currentInline=null,this.currentBlock=null}return e.createBodyTraverser=function(t,n,o){return new e(new r.default(t,n))},e.createSelectionTraverser=function(t,n,r){return new e(new u.default(t,n),r)},e.createBlockTraverser=function(t,n,r,o){return void 0===r&&(r=3),new e(new s.default(t,n,r))},Object.defineProperty(e.prototype,"currentBlockElement",{get:function(){return this.currentBlock||(this.currentBlock=this.scoper.getStartBlockElement()),this.currentBlock},enumerable:!1,configurable:!0}),e.prototype.getNextBlockElement=function(){return this.getPreviousNextBlockElement(!0)},e.prototype.getPreviousBlockElement=function(){return this.getPreviousNextBlockElement(!1)},e.prototype.getPreviousNextBlockElement=function(e){var t=this.currentBlockElement;if(!t)return null;var n=(0,d.getLeafSibling)(this.scoper.rootNode,e?t.getEndNode():t.getStartNode(),e,this.skipTags),r=n?(0,i.default)(this.scoper.rootNode,n):null;return r&&this.scoper.isBlockInScope(r)&&(e&&r.isAfter(t)||!e&&t.isAfter(r))?(this.currentBlock=r,this.currentBlock):null},Object.defineProperty(e.prototype,"currentInlineElement",{get:function(){return this.currentInline||(this.currentInline=this.scoper.getStartInlineElement()),this.currentInline instanceof o.default?null:this.currentInline},enumerable:!1,configurable:!0}),e.prototype.getNextInlineElement=function(){return this.getPreviousNextInlineElement(!0)},e.prototype.getPreviousInlineElement=function(){return this.getPreviousNextInlineElement(!1)},e.prototype.getPreviousNextInlineElement=function(e){var t,n=this.currentInlineElement||this.currentInline;return n?(n instanceof o.default?(t=(0,c.getInlineElementBeforeAfter)(this.scoper.rootNode,n.getStartPosition(),e))&&!n.getParentBlock().contains(t.getContainerNode())&&(t=null):t=(t=function(e,t,n){if(!t)return null;if(t instanceof l.default){var r=n?t.nextInlineElement:t.previousInlineElement;if(r)return r}var o=t.getContainerNode();return o=(0,d.getLeafSibling)(e,o,n),(0,a.default)(e,o)}(this.scoper.rootNode,n,e))&&n&&(e&&t.isAfter(n)||!e&&n.isAfter(t))?t:null,t&&(t=this.scoper.trimInlineElement(t))?(this.currentInline=t,this.currentInline):null):null},e}();t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(39),i=/^[\r\n]+$/gm,a=/[\t\r\n\u0020\u200B]/gm;t.default=function e(t,n){if(3==t.nodeType)return!(t.nodeValue&&""!=t.textContent&&!i.test(t.nodeValue))||!(!n||""!=t.nodeValue.replace(a,""));if(1==t.nodeType){if("none"==(0,o.getComputedStyle)(t,"display"))return!0;var l=(0,r.default)(t);if("DIV"==l||"SPAN"==l){for(var s=t.firstChild;s;s=s.nextSibling)if(!e(s,n))return!1;return!0}return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);t.default=function(e,t){return!(!e||!(0,r.default)(e.rootNode,t)||e.nodeBefore&&4!=e.nodeBefore.compareDocumentPosition(t)||e.nodeAfter&&2!=e.nodeAfter.compareDocumentPosition(t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(88),o=n(0);t.default=function(e,t,n){e.focus();var i=e.getSelectionRangeEx();e.addUndoSnapshot((function(a,l){if(!n||n()){var s=e.getSelectedRegions(),u=o.VListChain.createListChains(s,null==a?void 0:a.node);s.forEach((function(e){return t(e,a,l,u)})),(0,r.default)(e,u)}0==i.type?e.select(a,l):e.select(i.table,i.coordinates)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEditInfoFromImage=t.deleteEditInfo=t.saveEditInfo=void 0;var r=n(99);t.saveEditInfo=function(e,t){e&&(e.dataset.roosterEditInfo=JSON.stringify(t))},t.deleteEditInfo=function(e){e&&delete e.dataset.roosterEditInfo},t.getEditInfoFromImage=function(e){var t=function(e){try{return JSON.parse(e)}catch(e){return null}}(null==e?void 0:e.dataset.roosterEditInfo);return 0==(0,r.default)(t)?function(e){return{src:e.getAttribute("src")||"",widthPx:e.clientWidth,heightPx:e.clientHeight,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight,leftPercent:0,rightPercent:0,topPercent:0,bottomPercent:0,angleRad:0}}(e):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(38),o=n(14),i=n(4),a=function(){function e(e,t){this.containerNode=e,this.parentBlock=t}return e.prototype.getTextContent=function(){return(3==this.containerNode.nodeType?this.containerNode.nodeValue:this.containerNode.textContent)||""},e.prototype.getContainerNode=function(){return this.containerNode},e.prototype.getParentBlock=function(){return this.parentBlock},e.prototype.getStartPosition=function(){return new i.default(this.containerNode,0).normalize()},e.prototype.getEndPosition=function(){return new i.default(this.containerNode,-1).normalize()},e.prototype.isTextualInlineElement=function(){return this.containerNode&&3==this.containerNode.nodeType},e.prototype.isAfter=function(e){return e&&(0,o.default)(this.containerNode,e.getContainerNode())},e.prototype.contains=function(e){var t=this.getStartPosition(),n=this.getEndPosition();return e&&e.isAfter(t)&&n.isAfter(e)},e.prototype.applyStyle=function(e){(0,r.default)(this.containerNode,e)},e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,o,i,a=(null===(r=e.nodeValue)||void 0===r?void 0:r.substring(0,t))||"",l=(null===(o=e.nodeValue)||void 0===o?void 0:o.substring(t))||"",s=e.ownerDocument.createTextNode(n?a:l);return e.nodeValue=n?l:a,null===(i=e.parentNode)||void 0===i||i.insertBefore(s,n?e:e.nextSibling),s}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(38),o=n(9),i=n(4),a=n(8),l=function(){function e(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null),this.inlineElement=e,this.start=t,this.end=n}return e.prototype.getDecoratedInline=function(){return this.inlineElement},e.prototype.getContainerNode=function(){return this.inlineElement.getContainerNode()},e.prototype.getParentBlock=function(){return this.inlineElement.getParentBlock()},e.prototype.getTextContent=function(){return(0,o.default)(this.getStartPosition(),this.getEndPosition()).toString()},e.prototype.getStartPosition=function(){return this.start||this.inlineElement.getStartPosition()},e.prototype.getEndPosition=function(){return this.end||this.inlineElement.getEndPosition()},Object.defineProperty(e.prototype,"nextInlineElement",{get:function(){return this.end?new e(this.inlineElement,this.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousInlineElement",{get:function(){return this.start?new e(this.inlineElement,void 0,this.start):null},enumerable:!1,configurable:!0}),e.prototype.contains=function(e){return e&&e.isAfter(this.getStartPosition())&&this.getEndPosition().isAfter(e)},e.prototype.isTextualInlineElement=function(){return this.inlineElement&&this.inlineElement.isTextualInlineElement()},e.prototype.isAfter=function(e){var t=this.getStartPosition(),n=e&&e.getEndPosition();return n&&(t.isAfter(n)||t.equalTo(n))},e.prototype.applyStyle=function(e){var t=this.getStartPosition().normalize(),n=this.getEndPosition().normalize(),o=this.getContainerNode();if(t.isAtEnd){var l=(0,a.getNextLeafSibling)(o,t.node);t=l?new i.default(l,0):null}if(0==n.offset){var s=(0,a.getPreviousLeafSibling)(o,n.node);n=s?new i.default(s,-1):null}(0,r.default)(o,e,t||void 0,n||void 0)},e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(e){for(;!n&&e.firstChild;)e.removeChild(e.firstChild);for(;null==t?void 0:t.firstChild;)e.appendChild(t.firstChild)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=["IMG"],i=["TABLE","IMG","LI"].join(","),a=/\u200b/g;function l(e,t){return e=e.replace(a,""),t?e.trim():e}t.default=function(e,t){if(!e)return!1;if(3==e.nodeType)return""==l(e.nodeValue||"",t);if(1==e.nodeType){var n=e;if(""!=l(n.textContent||"",t)||o.indexOf((0,r.default)(n))>=0||n.querySelectorAll(i)[0])return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e?e.parentNode:null;if(!t)return null;for(;e.firstChild;)t.insertBefore(e.firstChild,e);return t.removeChild(e),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};return((null==e?void 0:e.getAttribute("style"))||"").split(";").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n),o=e.slice(n+1);r&&o&&(t[r.trim()]=o.trim())})),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e){var n=Object.keys(t||{}).map((function(e){var n=t[e],r=e?e.trim():null,o=n?n.trim():null;return r&&o?r+":"+o:null})).filter((function(e){return e})).join(";");n?e.setAttribute("style",n):e.removeAttribute("style")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){e.focus();var n=e.getSelectionRangeEx();if(n&&n.areAllCollapsed){var o=n.ranges[0],i=o.startContainer;if("SPAN"==(0,r.getTagOfNode)(i)&&(!i.firstChild||"BR"==(0,r.getTagOfNode)(i.firstChild)&&!i.firstChild.nextSibling))e.addUndoSnapshot(),t(i);else i&&3==i.nodeType&&"​"==i.nodeValue&&"SPAN"==(0,r.getTagOfNode)(i.parentNode)||(e.addUndoSnapshot(),i=e.getDocument().createTextNode("​"),o.insertNode(i)),(0,r.applyTextStyle)(i,t),e.select(i,-1)}else e.addUndoSnapshot((function(){var r,o;n.ranges.forEach((function(n){for(var i=e.getSelectionTraverser(n),a=i&&i.currentInlineElement;a;){var l=i.getNextInlineElement();a.applyStyle((function(e,n){t(e,n),r=r||e,o=e})),a=l}})),r&&o&&0==n.type&&e.select(r,-2,o,-3)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,r,o){var i=this;this.trigger=e,this.context=t,this.onSubmit=n,this.handler=r,this.zoomScale=o,this.onMouseDown=function(e){var t,n;e.preventDefault(),e.stopPropagation(),i.addDocumentEvents(),i.initX=e.pageX,i.initY=e.pageY,i.initValue=null===(n=(t=i.handler).onDragStart)||void 0===n?void 0:n.call(t,i.context,e)},this.onMouseMove=function(e){var t,n,r;e.preventDefault();var o=(e.pageX-i.initX)/i.zoomScale,a=(e.pageY-i.initY)/i.zoomScale;(null===(n=(t=i.handler).onDragging)||void 0===n?void 0:n.call(t,i.context,e,i.initValue,o,a))&&(null===(r=i.onSubmit)||void 0===r||r.call(i,i.context,i.trigger))},this.onMouseUp=function(e){var t,n,r;e.preventDefault(),i.removeDocumentEvents(),(null===(n=(t=i.handler).onDragEnd)||void 0===n?void 0:n.call(t,i.context,e,i.initValue))&&(null===(r=i.onSubmit)||void 0===r||r.call(i,i.context,i.trigger))},e.addEventListener("mousedown",this.onMouseDown)}return e.prototype.dispose=function(){this.trigger.removeEventListener("mousedown",this.onMouseDown),this.removeDocumentEvents()},e.prototype.addDocumentEvents=function(){var e=this.trigger.ownerDocument;e.addEventListener("mousemove",this.onMouseMove,!0),e.addEventListener("mouseup",this.onMouseUp,!0)},e.prototype.removeDocumentEvents=function(){var e=this.trigger.ownerDocument;e.removeEventListener("mousemove",this.onMouseMove,!0),e.removeEventListener("mouseup",this.onMouseUp,!0)},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o="AREA,BASE,BR,COL,COMMAND,EMBED,HR,IMG,INPUT,KEYGEN,LINK,META,PARAM,SOURCE,TRACK,WBR".split(",");t.default=function(e){return!!e&&o.indexOf((0,r.default)(e))>=0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(4),i=n(28),a=n(12),l=n(8),s=n(13),u="SPAN,B,I,U,EM,STRONG,STRIKE,S,SMALL".split(",");function c(e,t){e&&1==e.nodeType&&t(e,!0)}t.default=function(e,t,n,d){void 0===n&&(n=new o.default(e,0).normalize()),void 0===d&&(d=new o.default(e,-1).normalize());for(var f=[],h=n,p=d;h&&p&&p.isAfter(h);){var g=h.node,v=(0,r.default)(g.parentNode),m=(0,l.getNextLeafSibling)(e,g);3==g.nodeType&&["TR","TABLE"].indexOf(v)<0&&(g!=p.node||p.isAtEnd||(g=(0,i.default)(g,p.offset,!0)),h.offset>0&&(g=(0,i.default)(g,h.offset,!1)),f.push(g)),h=m&&new o.default(m,0)}if(f.length>0){if(f.every((function(e){return e.parentNode==f[0].parentNode}))){var y=f.shift();f.forEach((function(e){var t,n=(y.nodeValue||"")+(e.nodeValue||"");y.nodeValue=n,null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),f=[y]}f.forEach((function(e){for(;"SPAN"!=(0,r.default)(e)&&u.indexOf((0,r.default)(e.parentNode))>=0;)c(e,t),e=(0,s.splitBalancedNodeRange)(e);"SPAN"!=(0,r.default)(e)&&(c(e,t),e=(0,a.default)(e,"SPAN")),t(e)}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getComputedStyle=void 0;var r=n(11);function o(e,t){void 0===t&&(t=["font-family","font-size","color","background-color"]);var n=(0,r.default)(e),o=[];if(t=Array.isArray(t)?t:[t],n){var a=(n.ownerDocument.defaultView||window).getComputedStyle(n);if(a)for(var l=0,s=t;l<s.length;l++){var u=s[l],c=a.getPropertyValue(u)||"";c="font-family"!=u?c.toLowerCase():c,c="font-size"==u?i(c):c,o.push(c)}}return o}function i(e){return e&&e.indexOf("px")==e.length-2?Math.round(75*parseFloat(e)+.05)/100+"pt":e}t.default=o,t.getComputedStyle=function(e,t){return o(e,t)[0]||""}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){return e.call(this,t,n)||this}return o(t,e),t}(n(27).default);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInlineElementBeforeAfter=t.getInlineElementAfter=t.getInlineElementBefore=void 0;var r=n(15),o=n(29),i=n(23),a=n(8);function l(e,t,n){if(!e||!t||!t.node)return null;var l=(t=t.normalize()).offset,s=t.isAtEnd,u=t.node,c=!1;!n&&0==l&&!s||n&&s?u=(0,a.getLeafSibling)(e,u,n):3==u.nodeType&&(!n&&!s||n&&l>0)&&(c=!0),u&&(0,i.default)(u)&&(u=(0,a.getLeafSibling)(e,u,n));var d=(0,r.default)(e,u);return d&&(c||d.contains(t))&&(d=n?new o.default(d,t,void 0):new o.default(d,void 0,t)),d}t.getInlineElementBefore=function(e,t){return l(e,t,!1)},t.getInlineElementAfter=function(e,t){return l(e,t,!0)},t.getInlineElementBeforeAfter=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e){var n=new FileReader;n.onload=function(){t(n.result)},n.onerror=function(){t(null)},n.readAsDataURL(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){Array.prototype.push.apply(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t,n,o,i){var a="string"==typeof t?t.trim():"",l="string"==typeof t?null:t;if(a||l){if(e.style.setProperty(n?"background-color":"color",(o?null==l?void 0:l.darkModeColor:null==l?void 0:l.lightModeColor)||a),e.dataset){var s=n?"ogsb":"ogsc";o?l&&(e.dataset[s]=l.lightModeColor):delete e.dataset[s]}n&&i&&function(e,t){var n;if(null===(n=e.firstElementChild)||void 0===n?void 0:n.hasAttribute("style"))return;var o=e.style.getPropertyValue("background-color"),i=t&&(e.dataset.ogsb||e.dataset.ogab)||o;if(!i||"transparent"===i)return;switch(function(e){var t=function(e){var t,n,r,o,i;"#"==e.substring(0,1)?(t=function(e){4===e.length&&(e=e.replace(/(.)/g,"$1$1"));var t=e.replace("#",""),n=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),o=parseInt(t.substr(4,2),16);return[n,r,o]}(e),r=t[0],o=t[1],i=t[2]):(n=function(e){var t=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/),n=parseInt(t[1]),r=parseInt(t[2]),o=parseInt(t[3]);return[n,r,o]}(e),r=n[0],o=n[1],i=n[2]);var a=r/255,l=o/255,s=i/255;return 50*(Math.max(a,l,s)+Math.min(a,l,s))}(e);if(t<20)return 1;if(t>80)return 0;return 2}(i)){case 1:r(e,{lightModeColor:"#ffffff",darkModeColor:"#333333"},!1,t);break;case 0:r(e,{lightModeColor:"#000000",darkModeColor:"#ffffff"},!1,t)}}(e,o)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e||{left:0,right:0,top:0,bottom:0},n=t.left,r=t.right,o=t.top,i=t.bottom;return n+r+o+i>0?{left:Math.round(n),right:Math.round(r),top:Math.round(o),bottom:Math.round(i)}:null}},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var o=n(16),i=n(47),a=n(2),l=n(19),s=n(31),u=n(4),c=n(17),d=n(1),f=n(13),h=n(5),p=n(32),g=n(67),v=n(12),m=function(){function e(e){if(this.rootList=e,this.items=[],!e)throw new Error("rootList must not be null");y(this.rootList),(0,c.default)(this.rootList,"ol,ul",y),(0,c.default)(this.rootList,"li",b),this.populateItems(this.rootList)}return e.prototype.contains=function(e){return this.items.some((function(t){return t.contains(e)}))},e.prototype.getLastItemNumber=function(){var e=this.getStart();return void 0===e?e:e-1+this.items.filter((function(e){return 1==e.getListType()&&1==e.getLevel()&&!e.isDummy()})).length},e.prototype.writeBack=function(){var e=this;if(!this.rootList)throw new Error("rootList must not be null");var t,n=this.rootList.ownerDocument,r=[n.createDocumentFragment()],o=n.createTextNode(""),i=this.getStart()||1;this.rootList.parentNode.replaceChild(o,this.rootList),this.items.forEach((function(n){var o=n.getNewListStart();o&&o!=i&&(r.splice(1,r.length-1),i=o),n.writeBack(r,e.rootList);var a=r[1];(0,d.default)(a,"HTMLOListElement")&&(t!=a&&(1==i?a.removeAttribute("start"):a.start=i),1==n.getLevel()&&i++),t=a})),o.parentNode.replaceChild(r[0],o)},e.prototype.split=function(e,t){if(!this.rootList)throw new Error("rootList must not be null");for(var n=0;n<this.items.length;n++)if(this.items[n].getNode()==e)return void this.items[n].setNewListStart(t)},e.prototype.setIndentation=function(e,t,n,r,o){var i=this;void 0===o&&(o=!1);var a=!1;if(this.findListItems(e,t,(function(e){a=a||0==i.items.indexOf(e),1==n?r&&!e.isDummy()?e.setIsDummy(!0):e.outdent(o):e.indent()})),a&&o)for(var l=0;l<this.items.length;l++)this.items[l].addNegativeMargins()},e.prototype.changeListType=function(e,t,n){var r=!1;this.findListItems(e,t,(function(e){r=r||e.getListType()!=n})),this.findListItems(e,t,(function(e){return r?e.changeListType(n):e.outdent()}))},e.prototype.appendItem=function(e,t){var n=(0,a.default)(e);"DIV"==n?e=(0,o.default)(e,"LI"):"LI"!=n&&(e=(0,v.default)(e,"LI")),this.items.push(0==t?new g.default(e):new g.default(e,t))},e.prototype.mergeVList=function(e){var t,n=this;e&&e!=this&&(e.items.forEach((function(e){return n.items.push(e)})),e.items.splice(0,e.items.length),null===(t=e.rootList.parentNode)||void 0===t||t.removeChild(e.rootList))},e.prototype.getListItemIndex=function(e){if(this.items)for(var t=(this.getStart()||1)-1,n=0;n<this.items.length;n++){var r=this.items[n];if(1!=r.getLevel()||r.isDummy()||t++,r.getNode()==e)return t}return-1},e.prototype.getStart=function(){return(0,d.default)(this.rootList,"HTMLOListElement")?this.rootList.start:void 0},e.prototype.findListItems=function(e,t,n){if(0==this.items.length)return[];var r=new u.default(this.items[0].getNode(),0),o=new u.default(this.items[this.items.length-1].getNode(),-1),i=r.isAfter(e)?0:-1,a=this.items.length-(t.isAfter(o)?1:0);this.items.forEach((function(n,r){i=n.contains(e.node)?r:i,a=n.contains(t.node)?r:a})),i=a<this.items.length?Math.max(0,i):i,a=i>=0?Math.min(this.items.length-1,a):a;var l=i<=a?this.items.slice(i,a+1):[];return n&&l.forEach(n),l},e.prototype.populateItems=function(e,t){var n=this;void 0===t&&(t=[]);var o=(0,i.default)(e);(0,h.default)(e.childNodes).forEach((function(e){var a=r(r([],t,!0),[o],!1);(0,i.isListElement)(e)?n.populateItems(e,a):3==e.nodeType&&""==(e.nodeValue||"").trim()||n.items.push(new(g.default.bind.apply(g.default,r([void 0,e],a,!1))))}))},e}();function y(e){var t=null;(0,h.default)(e.childNodes).forEach((function(e){"LI"==(0,a.default)(e)?t=e:(0,i.isListElement)(e)?t=null:t&&!(0,s.default)(e,!0)&&t.appendChild((0,l.default)(e)?e:(0,v.default)(e))}))}function b(e){for(;!(0,i.isListElement)(e.parentNode);){(0,f.default)(e,!0);var t=(0,h.default)(e.parentNode.childNodes).slice(1);t.length>0&&((0,l.default)(t[0])||(t=[(0,v.default)(t)]),t.forEach((function(t){return e.appendChild(t)}))),(0,p.default)(e.parentNode)}}t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isListElement=void 0;var r=n(2);function o(e){switch((0,r.default)(e)){case"OL":return 1;case"UL":return 2;default:return 0}}t.default=o,t.isListElement=function(e){return 0!=o(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),o=n(4),i=n(8);t.default=function(e){if(!e)return null;var t=e.nodeBefore,n=e.nodeAfter,a=e.rootNode,l=e.skipTags,s=t?(0,i.getNextLeafSibling)(e.rootNode,t,e.skipTags):a.firstChild,u=n?(0,i.getPreviousLeafSibling)(a,n,l):a.lastChild,c=s&&u&&(0,r.default)(s,u);if(!function(e){var t=e;return!!t.fullSelectionEnd&&!!t.fullSelectionStart}(e))return c;if(c){var d=o.default.getStart(c).normalize(),f=o.default.getEnd(c).normalize(),h=e.fullSelectionEnd,p=e.fullSelectionStart;if(!p.isAfter(f)&&!d.isAfter(h)){var g=p.isAfter(d)?p:d,v=h.isAfter(f)?f:h;return(0,r.default)(g,v)}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.currentIndex+t;return n>=0&&n<e.snapshots.length}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=n(0);t.default=function(e,t,n){var i=[];(0,r.default)(e,(function(t,r){n(t,r);var o=e.getElementAtCursor("LI",t);o&&-1===i.indexOf(o)&&i.push(o)})),function(e,t){e.forEach((function(e){(0,o.safeInstanceOf)(e,"HTMLLIElement")&&(0,o.setListItemStyle)(e,t)}))}(i,[t])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),o=n(0);t.default=function(e,t,n,i){void 0===i&&(i=!0),(0,r.default)(e,(function(e,r,a,l){var s,u=n>0&&l.filter((function(e){return e.canAppendAtCursor(n)}))[0],c=u&&r.equalTo(a)?u.createVListAtBlock(null===(s=(0,o.getBlockElementAtNode)(e.rootNode,r.node))||void 0===s?void 0:s.collapseToSingleElement(),n):(0,o.createVListFromRegion)(e,i);c&&(c.changeListType(r,a,t),c.writeBack())}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.widthPx,r=e.heightPx,o=e.angleRad,i=n/(1-e.leftPercent-e.rightPercent),a=r/(1-e.topPercent-e.bottomPercent),l=t?i:n,s=t?a:r;return{targetWidth:Math.abs(l*Math.cos(o))+Math.abs(s*Math.sin(o)),targetHeight:Math.abs(l*Math.sin(o))+Math.abs(s*Math.cos(o)),originalWidth:i,originalHeight:a,visibleWidth:l,visibleHeight:s}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Editor=void 0;var r=n(108);Object.defineProperty(t,"Editor",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(14),i=function(){function e(e){this.element=e}return e.prototype.collapseToSingleElement=function(){return this.element},e.prototype.getStartNode=function(){return this.element},e.prototype.getEndNode=function(){return this.element},e.prototype.equals=function(e){return this.element==e.getStartNode()},e.prototype.isAfter=function(e){return(0,o.default)(this.element,e.getEndNode())},e.prototype.contains=function(e){return(0,r.default)(this.element,e,!0)},e.prototype.getTextContent=function(){var e;return(null===(e=this.element)||void 0===e?void 0:e.textContent)||""},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(e,t){return(0,r.default)(e,"HTMLElement")&&(e.matches||e.msMatchesSelector).call(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);t.default=function(e,t){var n=t.createElement("DIV");return n.innerHTML=e,(0,r.default)(n.childNodes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7);t.default=function(e,t){var n=e;do{n=n&&(t?n.firstChild:n.lastChild)}while(n&&n.firstChild);return n&&(0,r.default)(e,n)||null}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){return e.call(this,t,n)||this}return o(t,e),t}(n(27).default);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastInlineElement=t.getFirstInlineElement=void 0;var r=n(15),o=n(60);t.getFirstInlineElement=function(e){var t=(0,o.getFirstLeafNode)(e);return t?(0,r.default)(e,t):null},t.getLastInlineElement=function(e){var t=(0,o.getLastLeafNode)(e);return t?(0,r.default)(e,t):null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastLeafNode=t.getFirstLeafNode=void 0;var r=n(23),o=n(8);function i(e,t){for(var n=function(e){return t?e.firstChild:e.lastChild},i=n(e);i&&n(i);)i=n(i);return i&&(0,r.default)(i)&&(i=(0,o.getLeafSibling)(e,i,t)),i}t.getFirstLeafNode=function(e){return i(e,!0)},t.getLastLeafNode=function(e){return i(e,!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.position=e,this.parentBlock=t}return e.prototype.getTextContent=function(){return""},e.prototype.getContainerNode=function(){return this.position.node},e.prototype.getParentBlock=function(){return this.parentBlock},e.prototype.getStartPosition=function(){return this.position},e.prototype.getEndPosition=function(){return this.position},e.prototype.isAfter=function(e){return e&&this.position.isAfter(e.getEndPosition())},e.prototype.isTextualInlineElement=function(){return!1},e.prototype.contains=function(e){return!1},e.prototype.applyStyle=function(e){},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22),o=n(9),i=/[\s\u00A0\u200B\u3000]+([^\s\u00A0\u200B\u3000]*)$/i,a=function(){function e(e,t){this.rootNode=e,this.position=t,this.text="",this.word="",this.inlineBefore=null,this.inlineAfter=null,this.traverser=null,this.traversingComplete=!1,this.inlineElements=[],this.nearestNonTextInlineElement=null}return e.prototype.getWordBefore=function(){var e=this;return this.word||this.traverse((function(){return e.word})),this.word||""},e.prototype.getInlineElementBefore=function(){return this.inlineBefore||this.traverse(null),this.inlineBefore},e.prototype.getInlineElementAfter=function(){return this.inlineAfter||(this.inlineAfter=r.default.createBlockTraverser(this.rootNode,this.position).currentInlineElement),this.inlineAfter},e.prototype.getSubStringBefore=function(e){var t=this;return this.text.length<e&&this.traverse((function(){return t.text.length>=e})),this.text.substr(Math.max(0,this.text.length-e))},e.prototype.getRangeFromText=function(e,t){if(!e)return null;var n=null,r=null,i=e.length-1;return this.forEachTextInlineElement((function(o){for(var a=o.getTextContent()||"",l=a.length-1;l>=0&&i>=0;l--)if(e.charCodeAt(i)==a.charCodeAt(l))i--,r||(r=o.getStartPosition().move(l+1));else if(t||r)return!0;return-1==i&&(n=o.getStartPosition().move(l+1),!0)})),n&&r&&(0,o.default)(n,r)},e.prototype.forEachTextInlineElement=function(e){this.inlineElements.some(e)||this.traverse(e)},e.prototype.getNearestNonTextInlineElement=function(){var e=this;return this.nearestNonTextInlineElement||this.traverse((function(){return e.nearestNonTextInlineElement})),this.nearestNonTextInlineElement},e.prototype.traverse=function(e){if(this.traverser=this.traverser||r.default.createBlockTraverser(this.rootNode,this.position),this.traverser&&!this.traversingComplete)for(var t=this.traverser.getPreviousInlineElement();!this.traversingComplete;){if(this.inlineBefore=this.inlineBefore||t,!t||!t.isTextualInlineElement()){this.nearestNonTextInlineElement=t,this.traversingComplete=!0,this.word||(this.word=this.text);break}var n=t.getTextContent();if(!this.word){var o=i.exec(n);o&&2==o.length&&(this.word=o[1]+this.text)}if(this.text=n+this.text,this.inlineElements.push(t),e&&e(t))break;t=this.traverser.getPreviousInlineElement()}},e}();t.default=a},function(e,t,n){"use strict";var r,o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(42),a=n(21),l=/^Version:[0-9\.]+\s+StartHTML:\s*([0-9]+)\s+EndHTML:\s*([0-9]+)\s+/i,s=((r={})["text/html"]=function(e,t){return e.rawHtml=a.Browser.isEdge?function(e){var t=l.exec(e);if(3==(null==t?void 0:t.length)){var n=parseInt(t[1]),r=parseInt(t[2]);n>0&&r>n&&(e=e.substring(n,r))}return e}(t):t},r["text/plain"]=function(e,t){return e.text=t},r["text/*"]=function(e,t,n){return!!n&&(e.customValues[n]=t)},r);function u(e,t){try{e.customValues["link-preview"]=t,e.linkPreview=JSON.parse(t)}catch(e){}}t.default=function(e,t){var n={types:[],text:"",image:null,files:[],rawHtml:null,customValues:{}},r=o({},s);return(null==t?void 0:t.allowLinkPreview)&&(r["text/link-preview"]=u),Promise.all((e||[]).map((function(e){var o=e.type;if(0!=o.indexOf("image/")||n.image||"file"!=e.kind){if("file"==e.kind)return new Promise((function(t){var r=e.getAsFile();r&&(n.types.push(o),n.files.push(r)),t()}));var a=function(e,t){var n=0==e.indexOf("text/")?e.substring("text/".length):null,r=t&&n?t.indexOf(n):-1;return n&&r>=0?n:void 0}(o,null==t?void 0:t.allowedCustomPasteType),l=r[o]||(a?r["text/*"]:null);return new Promise((function(t){return l?e.getAsString((function(e){n.types.push(o),l(n,e,a),t()})):t()}))}return n.types.push(o),n.image=e.getAsFile(),new Promise((function(e){n.image?(0,i.default)(n.image,(function(t){n.imageDataUri=t,e()})):e()}))}))).then((function(){return n}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(42),o=n(5);t.default=function(e,t,n){for(var i,a,l,s={types:e.types?(0,o.default)(e.types):[],text:e.getData("text"),image:null,files:[],rawHtml:null,customValues:{}},u=0;u<(e.files?e.files.length:0);u++){var c=e.files.item(u);if(0==(null===(i=null==c?void 0:c.type)||void 0===i?void 0:i.indexOf("image/"))){s.image=c;break}}var d=function(){s.image?(0,r.default)(s.image,(function(e){s.imageDataUri=e,t(s)})):t(s)};if((null==n?void 0:n.getTempDiv)&&(null==n?void 0:n.removeTempDiv)){var f=n.getTempDiv();f.contentEditable="true",f.innerHTML="",f.focus(),null===(l=null===(a=f.ownerDocument)||void 0===a?void 0:a.defaultView)||void 0===l||l.setTimeout((function(){var e;s.rawHtml=f.innerHTML,null===(e=n.removeTempDiv)||void 0===e||e.call(n,f),d()}),0)}else s.rawHtml=void 0,d()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(e){if((0,r.default)(e,"HTMLElement"))return e.innerHTML;if(e){var t=e.ownerDocument.createElement("span");return t.appendChild(e.cloneNode(!0)),t.innerHTML}return""}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(119),i=n(30),a=n(45),l=n(1),s=n(5),u=n(120),c={topBorderColor:"#ABABAB",bottomBorderColor:"#ABABAB",verticalBorderColor:"#ABABAB",hasHeaderRow:!1,hasFirstColumn:!1,hasBandedRows:!1,hasBandedColumns:!1,bgColorEven:null,bgColorOdd:"#ABABAB20",headerRowColor:"#ABABAB",tableBorderFormat:0,keepCellShade:!1},d=function(){function e(e,t,n){var r=this;if(this.cells=null,this.selection=null,this.formatInfo=null,this.trs=[],this.table=(0,l.default)(e,"HTMLTableElement")?e:function(e){for(var t=e;t&&"TABLE"!=t.tagName;t=t.parentElement);return t}(e),this.table){var o=(0,l.default)(e,"HTMLTableElement")?null:e,i=(0,s.default)(this.table.rows);this.cells=i.map((function(e){return[]})),i.forEach((function(e,t){r.trs[t%2]=e;for(var n=0,i=0;n<e.cells.length;n++){for(;r.cells[t][i];i++);var a=e.cells[n];a==o&&(r.col=i,r.row=t);for(var l=0;l<a.colSpan;l++,i++)for(var s=0;s<a.rowSpan;s++){var u=l+s==0,c=a.getBoundingClientRect();r.cells[t+s][i]={td:u?a:null,spanLeft:l>0,spanAbove:s>0,width:u?c.width:void 0,height:u?c.height:void 0}}}})),this.formatInfo=(0,u.getTableFormatInfo)(this.table),t&&this.normalizeSize("number"==typeof n?function(e){return e/n}:n)}}return e.prototype.writeBack=function(e){var t,n=this;this.cells?((0,i.default)(this.table),this.cells.forEach((function(e,t){var r=p(n.trs[t%2]||n.trs[0]);r&&(n.table.appendChild(r),e.forEach((function(e,o){e.td&&(n.recalculateSpans(t,o),r.appendChild(e.td))})))})),this.formatInfo&&!e&&((0,u.saveTableInfo)(this.table,this.formatInfo),(0,o.default)(this.table,this.cells,this.formatInfo))):this.table&&(null===(t=this.table.parentNode)||void 0===t||t.removeChild(this.table))},e.prototype.applyFormat=function(e){this.table&&(this.formatInfo=r(r(r({},c),this.formatInfo||{}),e||{}),this.formatInfo.keepCellShade||this.deleteCellShadeDataset(this.cells))},e.prototype.deleteCellShadeDataset=function(e){null==e||e.forEach((function(e){e.forEach((function(e){e.td&&e.td.dataset.cellShade&&delete e.td.dataset.cellShade}))}))},e.prototype.edit=function(e){var t=this;if(this.table&&this.cells&&void 0!==this.row&&null!=this.col){var n=this.cells[this.row],r=n[this.col],o=this.selection?this.selection.firstCell.y:this.row,i=this.selection?this.selection.lastCell.y:this.row,a=this.selection?this.selection.firstCell.x:this.col,l=this.selection?this.selection.lastCell.x:this.col;switch(e){case 0:for(var s=o;s<=i;s++)this.cells.splice(o,0,n.map(h));break;case 1:var u=function(e){var n=i+c.countSpanAbove(i,c.col);c.cells.splice(n,0,c.cells[n-1].map((function(e,r){var o=t.getCell(n,r);if(o.spanAbove)return h(o);if(e.spanLeft){var i=h(e);return i.spanAbove=!1,i}return{td:p(t.getTd(t.row,r))}})))},c=this;for(s=o;s<=i;s++)u();break;case 2:var d=function(e){f.forEachCellOfCurrentColumn((function(t,n){n.splice(e,0,h(t))}))},f=this;for(s=a;s<=l;s++)d(s);break;case 3:var g=function(e){var n=l+v.countSpanLeft(v.row,l);v.forEachCellOfColumn(n-1,(function(e,r,o){var i,a=t.getCell(o,n);a.spanLeft?i=h(a):e.spanAbove?(i=h(e)).spanLeft=!1:i={td:p(t.getTd(o,t.col))},r.splice(n,0,i)}))},v=this;for(s=a;s<=l;s++)g();break;case 6:for(var m=function(e){y.forEachCellOfRow(e,(function(n,r){var o=t.getCell(e+1,r);n.td&&n.td.rowSpan>1&&o.spanAbove&&(o.td=n.td)}))},y=this,b=o;b<=i;b++)m(b);var E=this.selection?this.selection.lastCell.y-this.selection.firstCell.y:0;this.cells.splice(o,E+1);break;case 5:for(var C=0,S=function(e){w.forEachCellOfColumn(e,(function(n,r,o){var i=t.getCell(o,e+1);n.td&&n.td.colSpan>1&&i.spanLeft&&(i.td=n.td);var a=t.selection?e-C:t.col;r.splice(a,1)})),C++},w=this,P=a;P<=l;P++)S(P);break;case 7:case 8:var T=7==e?-1:1;for(b=this.row+T;b>=0&&b<this.cells.length;b+=T){if((k=this.getCell(b,this.col)).td&&!k.spanAbove){var O=b<this.row?k:r,x=b<this.row?r:k;this.mergeCells(O,x);break}}break;case 9:case 10:var N=9==e?-1:1;for(P=this.col+N;P>=0&&P<this.cells[this.row].length;P+=N){if((k=this.getCell(this.row,P)).td&&!k.spanLeft){var _=P<this.col?k:r,M=P<this.col?r:k;this.mergeCells(_,M,!0);break}}break;case 11:for(P=a;P<=l;P++)for(b=o+1;b<=i;b++){var k=this.getCell(o,P),I=this.getCell(b,P);this.mergeCells(k,I)}for(P=a+1;P<=l;P++){k=this.getCell(o,a);var R=this.getCell(o,P);this.mergeCells(k,R,!0)}break;case 4:this.cells=null;break;case 13:if(r.td&&r.td.rowSpan>1)this.getCell(this.row+1,this.col).td=p(r.td);else{var L=n.map((function(e){return{td:e==r?p(e.td):null,spanAbove:e!=r,spanLeft:e.spanLeft}}));this.cells.splice(this.row+1,0,L)}break;case 12:r.td&&r.td.colSpan>1?this.getCell(this.row,this.col+1).td=p(r.td):this.forEachCellOfCurrentColumn((function(e,r){r.splice(t.col+1,0,{td:r==n?p(e.td):null,spanAbove:e.spanAbove,spanLeft:r!=n})}));break;case 14:this.table.style.marginLeft="auto",this.table.style.marginRight="auto";break;case 15:this.table.style.marginLeft="",this.table.style.marginRight="auto";break;case 16:this.table.style.marginLeft="auto",this.table.style.marginRight="";break;case 18:this.setAlignmentToSelectedCells(o,i,a,l,"center");break;case 17:this.setAlignmentToSelectedCells(o,i,a,l,"left");break;case 19:this.setAlignmentToSelectedCells(o,i,a,l,"right");break;case 20:this.setAlignmentToSelectedCells(o,i,a,l,"top",!0);break;case 21:this.setAlignmentToSelectedCells(o,i,a,l,"middle",!0);break;case 22:this.setAlignmentToSelectedCells(o,i,a,l,"bottom",!0)}}},e.prototype.setAlignmentToSelectedCells=function(e,t,n,r,o,i){for(var a,l,s=e;s<=t;s++)for(var u=n;u<=r;u++)if(this.cells){var c=this.cells[s][u].td;i&&c?null===(a=c.style)||void 0===a||a.setProperty("vertical-align",o):c&&(null===(l=c.style)||void 0===l||l.setProperty("text-align",o))}},e.prototype.mergeCells=function(e,t,n){var r,o,a,l,s=n?(null===(r=e.td)||void 0===r?void 0:r.rowSpan)===(null===(o=t.td)||void 0===o?void 0:o.rowSpan)&&!e.spanLeft:(null===(a=e.td)||void 0===a?void 0:a.colSpan)===(null===(l=t.td)||void 0===l?void 0:l.colSpan)&&!e.spanAbove;e.td&&t.td&&s&&((0,i.default)(e.td,t.td,!0),t.td=null,n?t.spanLeft=!0:t.spanAbove=!0)},e.prototype.forEachCellOfCurrentColumn=function(e){this.forEachCellOfColumn(this.col,e)},e.prototype.getCellsWithBorder=function(e,t){for(var n=[],r=0;this.cells&&r<this.cells.length;r++)for(var o=0;o<this.cells[r].length;o++){var i=this.getCell(r,o);if(i.td){var l=(0,a.default)(i.td.getBoundingClientRect());if(l){var s=!1;if(t){if(l.right==e)s=!0,n.push(i.td);else if(s)break}else if(l.left==e)s=!0,n.push(i.td);else if(s)break}}}return n},e.prototype.forEachCellOfCurrentRow=function(e){this.forEachCellOfRow(this.row,e)},e.prototype.getCell=function(e,t){return this.cells&&this.cells[e]&&this.cells[e][t]||{}},e.prototype.getCurrentTd=function(){return this.getTd(this.row,this.col)},e.prototype.getTd=function(e,t){if(this.cells&&void 0!==e&&void 0!==t&&(e=Math.min(this.cells.length-1,e),t=this.cells[e]?Math.min(this.cells[e].length-1,t):t,!isNaN(e)&&!isNaN(t)))for(;e>=0&&t>=0;){var n=this.getCell(e,t);if(n.td)return n.td;if(n.spanLeft)t--;else{if(!n.spanAbove)break;e--}}return null},e.prototype.forEachCellOfColumn=function(e,t){if(void 0!==e)for(var n=0;this.cells&&n<this.cells.length;n++)t(this.getCell(n,e),this.cells[n],n)},e.prototype.forEachCellOfRow=function(e,t){if(void 0!==e)for(var n=0;this.cells&&n<this.cells[e].length;n++)t(this.getCell(e,n),n)},e.prototype.recalculateSpans=function(e,t){var n=this.getCell(e,t).td;n&&(n.colSpan=this.countSpanLeft(e,t),n.rowSpan=this.countSpanAbove(e,t),1==n.colSpan&&n.removeAttribute("colSpan"),1==n.rowSpan&&n.removeAttribute("rowSpan"))},e.prototype.countSpanLeft=function(e,t){for(var n=1,r=t+1;this.cells&&r<this.cells[e].length;r++){var o=this.getCell(e,r);if(o.td||!o.spanLeft)break;n++}return n},e.prototype.countSpanAbove=function(e,t){for(var n=1,r=e+1;this.cells&&r<this.cells.length;r++){var o=this.getCell(r,t);if(o.td||!o.spanAbove)break;n++}return n},e.prototype.normalizeEmptyTableCells=function(){for(var e=0,t=void 0;t=this.table.rows[e];e++)for(var n=0,r=void 0;r=t.cells[n];n++)r&&(r.innerHTML&&r.innerHTML.trim()||r.appendChild(document.createElement("br")))},e.prototype.normalizeTableCellSize=function(e){for(var t=0,n=void 0;n=this.table.rows[t];t++)n.removeAttribute("width"),n.style.setProperty("width",null),n.removeAttribute("height"),n.style.setProperty("height",null);for(t=0;this.cells&&t<this.cells.length;t++)for(var r=0;r<this.cells[t].length;r++){var o=this.cells[t][r];if(o){var i="number"==typeof e?function(t){return t/e}:e,a=o.width||0,l=o.height||0;f(o.td,(null==i?void 0:i(a))||a,(null==i?void 0:i(l))||l)}}},e.prototype.normalizeSize=function(e){this.normalizeEmptyTableCells(),this.normalizeTableCellSize(e);var t=this.table.getBoundingClientRect();f(this.table,(null==e?void 0:e(t.width))||t.width,(null==e?void 0:e(t.height))||t.height)},e}();function f(e,t,n){e&&(e.removeAttribute("width"),e.removeAttribute("height"),e.style.boxSizing="border-box",e.style.width=t+"px",e.style.height=n+"px")}function h(e){return{td:p(e.td),spanAbove:e.spanAbove,spanLeft:e.spanLeft}}function p(e){var t=e?e.cloneNode(!1):null;return(0,l.default)(t,"HTMLTableCellElement")&&(t.removeAttribute("id"),t.firstChild||t.appendChild(e.ownerDocument.createElement("br"))),t}t.default=d},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=n(47),a=n(2),l=n(19),s=n(30),u=n(1),c=n(68),d=n(5),f=n(32),h=n(12),p=[null,"lower-alpha","lower-roman"],g=function(){function e(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(this.newListStart=void 0,!e)throw new Error("node must not be null");this.node=(0,u.default)(e,"HTMLLIElement")?e:(0,h.default)(e,4);var o=this.node.style.display;this.dummy="list-item"!=o&&""!=o,this.listTypes=r([0],t,!0)}return e.prototype.getListType=function(){return this.listTypes[this.listTypes.length-1]},e.prototype.getLevel=function(){return this.listTypes.length-1},e.prototype.getNode=function(){return this.node},e.prototype.getNewListStart=function(){return this.newListStart},e.prototype.contains=function(e){return(0,o.default)(this.node,e,!0)},e.prototype.isDummy=function(){return this.dummy},e.prototype.isOrphanItem=function(){return!1},e.prototype.canMerge=function(e){return!(!(null==e?void 0:e.isOrphanItem())||this.listTypes.length!=e.listTypes.length)&&this.listTypes.every((function(t,n){return e.listTypes[n]==t}))},e.prototype.mergeItems=function(e){var t=this;m((null==e?void 0:e.map((function(e){return e.node})))||[],!0,!1).forEach((function(e){return t.node.appendChild(e)}))},e.prototype.indent=function(){if("-.25in"==this.node.style.marginLeft)return this.node.style.margin="",void(this.node.style.marginLeft="");var e=this.getListType();0!=e&&this.listTypes.push(e)},e.prototype.outdent=function(e){void 0===e&&(e=!1);var t=e?2:1;this.listTypes.length>t&&this.listTypes.pop()},e.prototype.addNegativeMargins=function(){this.node.style.margin="0in 0in 0in 0.5in",this.node.style.marginLeft="-.25in"},e.prototype.changeListType=function(e){0==e?this.listTypes=[e]:(this.outdent(),this.listTypes.push(e))},e.prototype.setIsDummy=function(e){this.dummy=e},e.prototype.setNewListStart=function(e){this.newListStart=e},e.prototype.writeBack=function(e,t){for(var n,r,o=1;o<e.length;o++)if((0,i.default)(e[o])!==this.listTypes[o]){e.splice(o);break}for(;o<this.listTypes.length;o++){var l=v(e[0],this.listTypes[o],o,t);e[e.length-1].appendChild(l),e.push(l)}if(e[e.length-1].appendChild(this.node),this.node.style.setProperty("display",this.dummy?"block":null),this.listTypes.length>1&&!(this.node.style.fontSize||this.node.style.color||this.node.style.fontFamily)){(0,c.default)(this.node,["font-size","font-family","color"])}this.listTypes.length<=1&&m("LI"==(0,a.default)(this.node)?(n=this.node,r=(0,d.default)(n.childNodes),(0,f.default)(n),r):[this.node],!0,!0)},e}();function v(e,t,n,r){var a,l=e.ownerDocument;return 1==n&&r&&t==(0,i.default)(r)?(0,o.default)(e,r)?(a=r.cloneNode(!1)).removeAttribute("id"):((0,s.default)(r),a=r):a=l.createElement(1==t?"ol":"ul"),1==t&&n>1&&a.style.setProperty("list-style-type",p[(n-1)%p.length]),a}function m(e,t,n){return!(e.length>0)||t&&(0,l.default)(e[0])||n&&(0,l.default)(e[e.length])||(e=[(0,h.default)(e)]),e}t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22),o=n(11),i=n(33),a=n(1),l=n(34);t.default=function(e,t){var n=function(e){var t=[],n=r.default.createBodyTraverser(e),l=null;for(;n.currentInlineElement!=l;){var s=(null==(l=n.currentInlineElement)?void 0:l.getContainerNode())||null;if(s=s?(0,o.default)(s):null,(0,a.default)(s,"HTMLElement")){var u=(0,i.default)(s);u&&t.push(u)}n.getNextInlineElement()}return t}(e),s=(0,i.default)(e);t.forEach((function(e){var t=n.map((function(t){return void 0!==t[e]?t[e]:""}));t&&(1==t.length||1==new Set(t).size)&&t[0]&&(s[e]=t[0])})),(0,l.default)(e,s)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(11);t.default=function(e,t,n){var o=e&&(0,r.default)(n,e.rootNode,t);if(o)for(var i=void 0;i=(0,r.default)(o.parentNode,e.rootNode,t);)o=i;return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22),o=n(20),i=n(7),a=n(48),l=n(23);t.default=function(e,t){var n=(0,a.default)(e),s=[];if(n){for(var u=e.rootNode,c=e.skipTags,d=r.default.createSelectionTraverser(u,n,c),f=null==d?void 0:d.currentBlockElement;f;f=d.getNextBlockElement())s.push(f);s=s.filter((function(e){var t,n=e.getStartNode();return n!=e.getEndNode()||!(0,l.default)(n,!0)||(null===(t=n.parentNode)||void 0===t||t.removeChild(n),!1)}))}if(0==s.length&&e&&!e.rootNode.firstChild&&t){var h=(0,o.default)(1,e.rootNode.ownerDocument);e.rootNode.appendChild(h),(f=(0,i.default)(e.rootNode,h))&&s.push(f)}return s}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.getRegionCreator=void 0;var o=n(3),i=n(11),a=n(4),l=n(17),s=n(8),u=((r={})[0]={skipTags:["TABLE"],outerSelector:"table",innerSelector:"td,th"},r);function c(e,t){var n=a.default.getStart(e).normalize(),r=a.default.getEnd(e).normalize();return function(e,i,a){return function(e,t,n,r){if(e){var i=t&&(0,s.getNextLeafSibling)(e,t,r),a=n&&(0,s.getPreviousLeafSibling)(e,n,r),l=!t||(0,o.default)(e,t)&&(0,o.default)(e,i),u=!n||(0,o.default)(e,n)&&(0,o.default)(e,a),c=!(t&&n&&((0,o.default)(t,n,!0)||(0,o.default)(t,a,!0)||(0,o.default)(n,t,!0)||(0,o.default)(n,i,!0)));return l&&u&&c}return!1}(e,i,a,t)?{rootNode:e,nodeBefore:i,nodeAfter:a,skipTags:t,fullSelectionStart:n,fullSelectionEnd:r}:null}}t.default=function(e,t,n){var r=[];if(e&&t){var a=u[n],s=a.innerSelector,d=a.skipTags,f=function(e,t,n){var r=[{innerNode:e,children:[]}],a=u[n],s=a.outerSelector,c=a.innerSelector,d=(0,l.default)(e,s,null,2,t);return(0,l.default)(e,c,(function(t){var n=(0,i.default)(t,e,s);if(n&&d.indexOf(n)<0){for(var a={innerNode:t,children:[]},l=r.length-1;l>=0;l--){var u=r[l],c=u.innerNode,f=u.children;if((0,o.default)(c,n)){var h=f.filter((function(e){return e.outerNode==n}))[0];h||(h={outerNode:n,boundaries:[]},f.push(h)),h.boundaries.push(a);break}}r.push(a)}}),1,t),r[0]}(e,t,n),h=(0,i.default)(t.startContainer,e,s)||e,p=(0,i.default)(t.endContainer,e,s)||e;r=function e(t,n,r,o,i){var a;i=i||n.innerNode==r;var l=!1,s=n.children,u=n.innerNode,c=[];if(0==s.length){(f=t(u))&&c.push(f)}else for(var d=0;d<=s.length&&!l;d++){var f,h=s[d]||{},p=h.outerNode,g=h.boundaries,v=null===(a=s[d-1])||void 0===a?void 0:a.outerNode;if(i)(f=t(u,v,p))&&c.push(f);null==g||g.forEach((function(n){var a,s;s=(a=e(t,n,r,o,i))[0],i=a[1],l=a[2],c=c.concat(s)}))}return[c,i,l||u==o]}(c(t,d),f,h,p)[0]}return r.filter((function(e){return!!e}))},t.getRegionCreator=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=n(24),i=n(1);t.default=function(e,t){if(!t||0==t.length)return[];var n=(0,i.default)(t[0],"Node")?t:[t[0].getStartNode(),t[t.length-1].getEndNode()],a=(n=n&&n.filter((function(t){return(0,o.default)(e,t)})))[0],l=n[n.length-1];return(0,o.default)(e,a)&&(0,o.default)(e,l)?(0,r.default)(e.rootNode,a,l,!0):[]}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(16),i=n(3),a=n(7),l=n(74),s=n(33),u=n(24),c=n(1),d=n(34),f=n(18);t.default=function(e,t,n){var h,p,g,v;if((0,u.default)(e,t)&&(0,u.default)(e,n)&&(v=(0,a.default)(e.rootNode,n))&&!v.contains(t)){for(var m=v.collapseToSingleElement(),y=(0,f.collapse)(e.rootNode,m,t,!1,!0),b=m;(0,i.default)(y,b);){var E=b.parentNode;if((0,c.default)(E,"HTMLElement")){var C=r(r(r({},(0,l.default)(E)||{}),(0,s.default)(E)),(0,s.default)(m));(0,d.default)(m,C)}b=E}var S=null,w=1==m.childNodes.length&&0==m.attributes.length?m.firstChild:(0,o.default)(m,"SPAN");for(b=w;(0,i.default)(y,b)&&1==(null===(h=b.parentNode)||void 0===h?void 0:h.childNodes.length);b=b.parentNode)S=b.parentNode;null===(p=t.parentNode)||void 0===p||p.insertBefore(w,t.nextSibling),null===(g=null==S?void 0:S.parentNode)||void 0===g||g.removeChild(S)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o={B:{"font-weight":"bold"},EM:{"font-style":"italic"},I:{"font-style":"italic"},U:{"text-decoration":"underline"},P:{"margin-top":"1em","margin-bottom":"1em"},PRE:{"white-space":"pre"},S:{"text-decoration":"line-through"},STRIKE:{"text-decoration":"line-through"},SUB:{"vertical-align":"sub","font-size":"smaller"},SUP:{"vertical-align":"super","font-size":"smaller"}};t.default=function(e,t){var n=(0,r.default)(e);return o[n]||(t||{})[n]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(2),i=n(31);function a(e){for(;e.previousSibling;)if(e=e.previousSibling,"BR"==(0,o.default)(e)||!(0,i.default)(e))return!1;return!0}t.default=function(e,t){if(e){var n=(e=e.normalize()).node;if(0==e.offset){for(;n&&(0,r.default)(t,n)&&a(n);)n=(null==n?void 0:n.parentNode)||null;return n==t}}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(4);function i(e,t){var n,o;if(!e||!t)return[];var i,a=e.node,l=e.offset,s=[];if(!(0,r.default)(t,a,!0))return[];if(3==a.nodeType){for(i=a.parentNode;a.previousSibling&&3==a.previousSibling.nodeType;)l+=(null===(n=a.previousSibling.nodeValue)||void 0===n?void 0:n.length)||0,a=a.previousSibling;s.unshift(l)}else i=a,a=a.childNodes[l];do{l=0;for(var u=!1,c=(null==i?void 0:i.firstChild)||null;c&&c!=a;c=c.nextSibling){if(3==c.nodeType){if(0===(null===(o=c.nodeValue)||void 0===o?void 0:o.length)||u)continue;u=!0}else u=!1;l++}s.unshift(l),a=i,i=(null==i?void 0:i.parentNode)||null}while(a&&a!=t);return s}t.default=function(e,t){return t?{start:i(o.default.getStart(t),e),end:i(o.default.getEnd(t),e)}:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearProceedingSnapshotsV2=void 0;var r=n(49);function o(e,t){if(t=t||function(e){var t;return(null===(t=e)||void 0===t?void 0:t.length)||0},(0,r.default)(e,1)){for(var n=0,o=e.currentIndex+1;o<e.snapshots.length;o++)n+=t(e.snapshots[o]);e.snapshots.splice(e.currentIndex+1),e.totalSize-=n,e.autoCompleteIndex=-1}}t.default=o,t.clearProceedingSnapshotsV2=function(e){o(e,(function(e){var t;return(null===(t=e.html)||void 0===t?void 0:t.length)||0}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="border-spacing,caption-side,color,cursor,direction,empty-cells,font-family,font-size,font-style,font-variant,font-weight,font,letter-spacing,line-height,list-style-image,list-style-position,list-style-type,list-style,orphans,quotes,text-align,text-indent,text-transform,visibility,white-space,widows,word-spacing".split(",");t.default=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView,n=t&&e&&t.getComputedStyle(e),o={};return r.forEach((function(e){return o[e]=n&&n.getPropertyValue(e)||""})),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cloneObject=void 0;var r=Object.assign?function(e,t){return Object.assign(t||{},e)}:function(e,t){var n=t||{};if(e)for(var r=0,o=Object.keys(e);r<o.length;r++){var i=o[r];n[i]=e[i]}return n};t.cloneObject=function(e,t){return r(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=e.ctrlKey||"Control"===e.key,n=e.altKey||"Alt"===e.key,r=e.metaKey||"Meta"===e.key;return t||n||r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasFocus=void 0;var r=n(0);t.hasFocus=function(e){var t=e.contentDiv.ownerDocument.activeElement;return t&&(0,r.contains)(e.contentDiv,t,!0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDarkColor=void 0;var r=n(174);Object.defineProperty(t,"getDarkColor",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){var r=n(83),o={};for(var i in r)r.hasOwnProperty(i)&&(o[r[i]]=i);var a=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var l in a)if(a.hasOwnProperty(l)){if(!("channels"in a[l]))throw new Error("missing channels property: "+l);if(!("labels"in a[l]))throw new Error("missing channel labels property: "+l);if(a[l].labels.length!==a[l].channels)throw new Error("channel and label counts mismatch: "+l);var s=a[l].channels,u=a[l].labels;delete a[l].channels,delete a[l].labels,Object.defineProperty(a[l],"channels",{value:s}),Object.defineProperty(a[l],"labels",{value:u})}a.rgb.hsl=function(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(r,o,i),l=Math.max(r,o,i),s=l-a;return l===a?t=0:r===l?t=(o-i)/s:o===l?t=2+(i-r)/s:i===l&&(t=4+(r-o)/s),(t=Math.min(60*t,360))<0&&(t+=360),n=(a+l)/2,[t,100*(l===a?0:n<=.5?s/(l+a):s/(2-l-a)),100*n]},a.rgb.hsv=function(e){var t,n,r,o,i,a=e[0]/255,l=e[1]/255,s=e[2]/255,u=Math.max(a,l,s),c=u-Math.min(a,l,s),d=function(e){return(u-e)/6/c+.5};return 0===c?o=i=0:(i=c/u,t=d(a),n=d(l),r=d(s),a===u?o=r-n:l===u?o=1/3+t-r:s===u&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*u]},a.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[a.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,r))),100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},a.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-o)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]},a.rgb.keyword=function(e){var t=o[e];if(t)return t;var n,i,a,l=1/0;for(var s in r)if(r.hasOwnProperty(s)){var u=r[s],c=(i=e,a=u,Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)+Math.pow(i[2]-a[2],2));c<l&&(l=c,n=s)}return n},a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){var t=a.rgb.xyz(e),n=t[0],r=t[1],o=t[2];return r/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},a.hsl.rgb=function(e){var t,n,r,o,i,a=e[0]/360,l=e[1]/100,s=e[2]/100;if(0===l)return[i=255*s,i,i];t=2*s-(n=s<.5?s*(1+l):s+l-s*l),o=[0,0,0];for(var u=0;u<3;u++)(r=a+1/3*-(u-1))<0&&r++,r>1&&r--,i=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,o[u]=255*i;return o},a.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,o=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,o*=i<=1?i:2-i,[t,100*(0===r?2*o/(i+o):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),l=255*r*(1-n*i),s=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,s,a];case 1:return[l,r,a];case 2:return[a,r,s];case 3:return[a,l,r];case 4:return[s,a,r];case 5:return[r,a,l]}},a.hsv.hsl=function(e){var t,n,r,o=e[0],i=e[1]/100,a=e[2]/100,l=Math.max(a,.01);return r=(2-i)*a,n=i*l,[o,100*(n=(n/=(t=(2-i)*l)<=1?t:2-t)||0),100*(r/=2)]},a.hwb.rgb=function(e){var t,n,r,o,i,a,l,s=e[0]/360,u=e[1]/100,c=e[2]/100,d=u+c;switch(d>1&&(u/=d,c/=d),r=6*s-(t=Math.floor(6*s)),0!=(1&t)&&(r=1-r),o=u+r*((n=1-c)-u),t){default:case 6:case 0:i=n,a=o,l=u;break;case 1:i=o,a=n,l=u;break;case 2:i=u,a=n,l=o;break;case 3:i=u,a=o,l=n;break;case 4:i=o,a=u,l=n;break;case 5:i=n,a=u,l=o}return[255*i,255*a,255*l]},a.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},a.xyz.rgb=function(e){var t,n,r,o=e[0]/100,i=e[1]/100,a=e[2]/100;return n=-.9689*o+1.8758*i+.0415*a,r=.0557*o+-.204*i+1.057*a,t=(t=3.2406*o+-1.5372*i+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.lab.xyz=function(e){var t,n,r,o=e[0];t=e[1]/500+(n=(o+16)/116),r=n-e[2]/200;var i=Math.pow(n,3),a=Math.pow(t,3),l=Math.pow(r,3);return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=l>.008856?l:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},a.lab.lch=function(e){var t,n=e[0],r=e[1],o=e[2];return(t=360*Math.atan2(o,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+o*o),t]},a.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},a.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],o=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];if(0===(o=Math.round(o/50)))return 30;var i=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===o&&(i+=60),i},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255,i=Math.max(Math.max(n,r),o),a=Math.min(Math.min(n,r),o),l=i-a;return t=l<=0?0:i===n?(r-o)/l%6:i===r?2+(o-n)/l:4+(n-r)/l+4,t/=6,[360*(t%=1),100*l,100*(l<1?a/(1-l):0)]},a.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,o=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var o,i=[0,0,0],a=t%1*6,l=a%1,s=1-l;switch(Math.floor(a)){case 0:i[0]=1,i[1]=l,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=l;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=l,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return o=(1-n)*r,[255*(n*i[0]+o),255*(n*i[1]+o),255*(n*i[2]+o)]},a.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]},a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(181),t),o(n(222),t),o(n(225),t),o(n(228),t),o(n(231),t),o(n(234),t),o(n(241),t),o(n(244),t),o(n(258),t),o(n(261),t),o(n(270),t),o(n(273),t)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(184),i=n(213),a=n(214),l=n(215),s=n(216),u=n(217),c=n(218),d=n(219),f=n(220),h=n(221),p=r(r(r(r(r(r(r(r(r(r({},l.ListFeatures),u.QuoteFeatures),f.TableFeatures),d.StructuredNodeFeatures),o.AutoLinkFeatures),c.ShortcutFeatures),i.CursorFeatures),s.MarkdownFeatures),a.EntityFeatures),h.TextFeatures);t.default=function(){return p}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),o=n(10),i=n(89),a=n(90),l=n(91),s=n(92),u=n(93),c=n(94),d=n(95),f=n(0),h=["font","text-decoration","color","background"],p="B,I,U,STRONG,EM,SUB,SUP,STRIKE,FONT,CENTER,H1,H2,H3,H4,H5,H6,UL,OL,LI,SPAN,P,BLOCKQUOTE,CODE,S,PRE".split(","),g=["href","src"],v=["TD","TH","TR","TABLE","TBODY","THEAD"];function m(e){var t=(0,f.toArray)(e.childNodes).map(m).every((function(e){return e})),n=(0,f.isBlockElement)(e),r=(0,f.getTagOfNode)(e);return r&&(p.indexOf(r)>=0||t&&!(0,f.isVoidHtmlElement)(e)&&v.indexOf(r)<0?(n&&!t&&(0,f.wrap)(e),(0,f.unwrap)(e)):function(e){for(var t=(0,f.safeInstanceOf)(e,"HTMLTableCellElement"),n=0,r=(0,f.toArray)(e.attributes);n<r.length;n++){var o=r[n];t&&"style"==o.name?y(e):g.indexOf(o.name.toLowerCase())<0&&0!=o.name.indexOf("data-")&&e.removeAttribute(o.name)}}(e)),n}function y(e){var t=(0,f.getStyles)(e),n={};return Object.keys(t).forEach((function(e){e.indexOf("border")<0&&(n[e]=t[e],delete t[e])})),(0,f.setStyles)(e,t),n}function b(e){(0,r.default)(e,(function(t){var n=(0,f.getSelectedBlockElementsInRegion)(t),r=(0,f.collapseNodesInRegion)(t,n);if(e.contains(t.rootNode)){var o=y(t.rootNode);if(Object.keys(o).length>0){var i=(0,f.wrap)((0,f.toArray)(t.rootNode.childNodes));(0,f.setStyles)(i,o)}}for(;r.length>0&&(0,f.isNodeInRegion)(t,r[0].parentNode);)r=[(0,f.splitBalancedNodeRange)(r)];r.forEach(m)}))}function E(e,t){switch(void 0===t&&(t=0),t){case 0:!function(e){e.focus(),e.addUndoSnapshot((function(){(0,o.default)(e,"removeFormat"),e.queryElements("[class]",1,(function(e){return e.removeAttribute("class")}));var t=e.getDefaultFormat(),n=0===Object.keys(t).length;if(e.queryElements("[style]",2,(function(e){h.forEach((function(t){return e.style.removeProperty(t)})),n&&""===e.getAttribute("style")&&e.removeAttribute("style")})),!n){if(t.fontFamily&&(0,a.default)(e,t.fontFamily),t.fontSize&&(0,l.default)(e,t.fontSize),t.textColor){var r=e.queryElements("a *, a",1),f=r.length>0?function(e){return-1==r.indexOf(e)}:null;t.textColors?(0,s.default)(e,t.textColors,f):(0,s.default)(e,t.textColor,f)}t.backgroundColor&&(t.backgroundColors?(0,i.default)(e,t.backgroundColors):(0,i.default)(e,t.backgroundColor)),t.bold&&(0,u.default)(e),t.italic&&(0,c.default)(e),t.underline&&(0,d.default)(e)}}),"Format")}(e);break;case 1:b(e);break;default:!function(e){if(!function(e){var t=e.getSelectionTraverser();return!!t.currentBlockElement&&!!t.getNextBlockElement()}(e)&&e.getSelectionTraverser().currentInlineElement instanceof f.PartialInlineElement)return void E(e);b(e)}(e)}}t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){if((null==t?void 0:t.length)>0){var n=e.getSelectionRange(),o=n&&r.Position.getStart(n),i=n&&r.Position.getEnd(n);t.forEach((function(e){return e.commit()})),e.select(o,i)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=n(0);t.default=function(e,t){(0,r.default)(e,(function(n,r){(0,o.setColor)(n,r?"":t,!0,e.isDarkMode())}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(50);t.default=function(e,t){(0,r.default)(e,"font-family",(function(e,n){e.style.fontFamily=n?"":t}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(50),o=n(0);t.default=function(e,t){(0,r.default)(e,"font-size",(function(e,n){e.style.fontSize=n?"":t,"normal"!=(0,o.getComputedStyle)(e,"line-height")&&(e.style.lineHeight="normal")}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(50),o=n(0);t.default=function(e,t,n){(0,r.default)(e,"color",(function(r,i){n&&!n(r)||(0,o.setColor)(r,i?"":t,!1,e.isDarkMode())}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"bold")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"italic")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"underline")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),o=n(0);t.default=function(e,t,n){(0,r.default)(e,(function(e){var n=(0,o.getSelectedBlockElementsInRegion)(e,!0),r=(0,o.collapseNodesInRegion)(e,n);if(r.length>0){if(1==r.length){var i=(0,o.getTagOfNode)(r[0]);"BR"==i?r=[(0,o.wrap)(r[0])]:"LI"!=i&&"TD"!=i||(r=(0,o.toArray)(r[0].childNodes))}for(;r[0]&&(0,o.isNodeInRegion)(e,r[0].parentNode)&&r.some((function(e){return"LI"==(0,o.getTagOfNode)(e)}));)r=[(0,o.splitBalancedNodeRange)(r)];t(r)}}),n)}},function(e,t,n){"use strict";var r,o,i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var l=n(98),s=n(100),u=n(36),c=n(52),d=n(237),f=n(26),h=n(238),p=n(6),g=n(0),v=n(101),m=2*Math.PI/8,y=["nw","n","ne","e","se","s","sw","w"],b=((r={}).SingleDirectionResize=2,r.ImageRotate=4,r.ImageCrop=8,r),E={borderColor:"#DB626C",minWidth:10,minHeight:10,preserveRatio:!1,minRotateDeg:5,imageSelector:"img",rotateIconHTML:null},C=((o={})[1]=v.getCornerResizeHTML,o[2]=v.getSideResizeHTML,o[4]=h.getRotateHTML,o[8]=d.getCropHTML,o),S=function(){function e(e){var t=this;this.allowedOperations=1,this.onBlur=function(){t.setEditingImage(null)},this.removeWrapper=function(e){var t=null==e?void 0:e.parentNode,n=null==e?void 0:e.querySelector("img");n&&t&&(n.style.position="",n.style.margin=null,n.style.textAlign=null,t.insertBefore(n,e),t.removeChild(e))},this.updateWrapper=function(e){var n,r=t.getImageWrapper(t.image);if(r){var o=T(r,"r_cropC"),i=T(r,"r_cropO"),a=T(r,"r_rotateC")[0],l=T(r,"r_rotateH")[0],s=T(r,"r_resizeH"),u=T(r,"r_cropH"),d=1==o.length&&4==i.length,f=t.editInfo,p=f.angleRad,m=f.bottomPercent,y=f.leftPercent,b=f.rightPercent,E=f.topPercent,C=(0,c.default)(t.editInfo,d),S=C.targetWidth,O=C.targetHeight,N=C.originalWidth,_=C.originalHeight,M=C.visibleWidth,k=C.visibleHeight,I=(S-M)/2,R=(O-k)/2,L=N*y,A=N*b,j=_*E,D=_*m;if(r.style.width=P(M),r.style.height=P(k),r.style.margin=R+"px "+I+"px",r.style.transform="rotate("+p+"rad)",r.style.textAlign=(n=r.parentNode,(0,g.safeInstanceOf)(n,"HTMLElement")&&"rtl"==(0,g.getComputedStyle)(n,"direction")?"right":"left"),t.image.style.width=P(N),t.image.style.height=P(_),d)w(o[0],L,j,A,D,void 0,void 0),w(i[0],0,0,A,void 0,void 0,j),w(i[1],void 0,0,0,D,A,void 0),w(i[2],L,void 0,0,0,void 0,D),w(i[3],0,j,void 0,0,L,void 0),x(u,p);else{if(t.image.style.margin=-j+"px 0 0 "+-L+"px","r_resizeH"==(null==e?void 0:e.elementClass)){var B=r.clientWidth,F=r.clientHeight;t.wasResized=!0,(0,v.doubleCheckResize)(t.editInfo,t.options.preserveRatio,B,F),t.updateWrapper()}(0,h.updateRotateHandlePosition)(t.editInfo,t.editor.getRelativeDistanceToEditor(r,!0),R,a,l),x(s,p)}}},this.options=i(i({},E),e||{})}return e.prototype.getName=function(){return"ImageEdit"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.disposer=e.addDomEventHandler("blur",this.onBlur),Object.keys(b).forEach((function(e){t.allowedOperations|=t.editor.isFeatureEnabled(e)?b[e]:0}))},e.prototype.dispose=function(){this.clearDndHelpers(),this.disposer(),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 5:this.setEditingImage(null);break;case 6:var t=e.rawEvent.target;e.isClicking&&0==e.rawEvent.button&&(0,g.safeInstanceOf)(t,"HTMLImageElement")&&t.isContentEditable&&(0,g.matchesSelector)(t,this.options.imageSelector)&&this.setEditingImage(t,7);break;case 0:var n=e.rawEvent.which;46==n||8==n?this.setEditingImage(null,!0):27==n&&this.image?(this.editInfo=(0,f.getEditInfoFromImage)(this.image),this.setEditingImage(null),e.rawEvent.preventDefault()):16!=n&&17!=n&&18!=n&&this.setEditingImage(null,!0);break;case 7:"InsertEntity"==e.source&&"IMAGE_EDIT_WRAPPER"==e.data.type||this.editor.queryElements((0,g.getEntitySelector)("IMAGE_EDIT_WRAPPER"),this.removeWrapper);break;case 15:"IMAGE_EDIT_WRAPPER"==e.entity.type&&(8==e.operation?this.removeWrapper(e.entity.wrapper):1==e.operation&&e.rawEvent.preventDefault());break;case 8:(0,g.toArray)(e.clonedRoot.querySelectorAll(this.options.imageSelector)).forEach((function(e){(0,f.deleteEditInfo)(e)}))}},e.prototype.setEditingImage=function(e,t){var n=this,r="number"==typeof t?t:0,o="number"!=typeof t&&!!t;this.image&&(this.clearDndHelpers(),(0,l.default)(this.editor,this.image,this.editInfo,this.lastSrc,this.wasResized)&&this.editor.addUndoSnapshot((function(){return n.image}),"ImageResize"),(i=this.getImageWrapper(this.image))&&this.removeWrapper(i),o&&this.editor.select(this.image),this.image=null,this.editInfo=null,this.lastSrc=null);if(!this.image&&(null==e?void 0:e.isContentEditable)){this.editor.addUndoSnapshot(),this.image=e,this.editInfo=(0,f.getEditInfoFromImage)(e),this.wasResized=function(e){var t=e.width,n=e.height,r=e.style;return!(""!==r.maxWidth&&"initial"!==r.maxWidth&&"auto"!==r.maxWidth||!(N(r.height)||N(r.width)||N(t)||N(n)))}(this.image),r=((0,s.default)(e)?r:3)&this.allowedOperations;var i=this.createWrapper(r);this.updateWrapper(),this.dndHelpers=a(a(a(a([],this.createDndHelpers("r_resizeH",v.Resizer),!0),this.createDndHelpers("r_rotateH",h.Rotator),!0),this.createDndHelpers("r_cropH",d.Cropper),!0),this.createDndHelpers("r_cropC",d.Cropper),!0),this.editor.select(i,-3)}},e.prototype.createWrapper=function(e){var t=this,n=(0,p.insertEntity)(this.editor,"IMAGE_EDIT_WRAPPER",(0,g.wrap)(this.image,6),!1,!0).wrapper;n.style.position="relative",n.style.maxWidth="100%",n.style.verticalAlign="bottom",n.style.display=g.Browser.isSafari?"inline-block":"inline-flex",this.lastSrc=this.image.getAttribute("src"),this.image.src=this.editInfo.src,this.image.style.position="absolute",this.image.style.maxWidth=null;var r={borderColor:this.options.borderColor,rotateIconHTML:this.options.rotateIconHTML,rotateHandleBackColor:this.editor.isDarkMode()?"#333":"white"},o=[];return Object.keys(C).forEach((function(t){(e&t)==t&&(0,g.arrayPush)(o,C[t](r))})),o.forEach((function(e){var r=(0,g.createElement)(e,t.image.ownerDocument);r&&n.appendChild(r)})),n},e.prototype.getImageWrapper=function(e){var t,n=(0,g.getEntityFromElement)(null===(t=null==e?void 0:e.parentNode)||void 0===t?void 0:t.parentNode);return"IMAGE_EDIT_WRAPPER"==(null==n?void 0:n.type)?n.wrapper:null},e.prototype.createDndHelpers=function(e,t){var n=this,r={editInfo:this.editInfo,options:this.options,elementClass:e},o=this.getImageWrapper(this.image);return o?T(o,e).map((function(e){return new u.default(e,i(i({},r),{x:e.dataset.x,y:e.dataset.y}),n.updateWrapper,t,n.editor.getZoomScale())})):[]},e.prototype.clearDndHelpers=function(){var e;null===(e=this.dndHelpers)||void 0===e||e.forEach((function(e){return e.dispose()})),this.dndHelpers=null},e}();function w(e,t,n,r,o,i,a){e.style.left=P(t),e.style.top=P(n),e.style.right=P(r),e.style.bottom=P(o),e.style.width=P(i),e.style.height=P(a)}function P(e){return void 0===e?null:e+"px"}function T(e,t){return(0,g.toArray)(e.querySelectorAll("."+t))}function O(e,t){var n=function(e){var t=Math.round(e/m)%8;return t<0?t+8:t}(t),r=e.dataset.y+e.dataset.x,o=y.indexOf(r);return y[(o>=0&&o+n)%8]}function x(e,t){e.map((function(e){e.style.cursor=O(e,t)+"-resize"}))}function N(e){var t="string"==typeof e?parseInt(e):e;return!isNaN(t)}t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(99),o=n(236),i=n(52),a=n(26);t.default=function(e,t,n,l,s){var u="",c=(0,a.getEditInfoFromImage)(t);switch((0,r.default)(n,c)){case 1:u=n.src;break;case 2:u=l;break;case 3:u=(0,o.default)(t,n)}var d=u!=l;d&&(u=e.triggerPluginEvent(19,{image:t,originalSrc:n.src,previousSrc:l,newSrc:u}).newSrc),u==n.src?(0,a.deleteEditInfo)(t):(0,a.saveEditInfo)(t,n);var f=(0,i.default)(n),h=f.targetWidth,p=f.targetHeight;return t.src=u,function(e,t,n,r){t?(e.style.maxWidth="initial",e.width=n,e.height=r,e.style.width=n+"px",e.style.height=r+"px"):(e.style.maxWidth="100%",e.style.height="initial",e.style.width="initial",e.removeAttribute("height"),e.removeAttribute("width"))}(t,s,h,p),d||n.widthPx!=c.widthPx||n.heightPx!=c.heightPx}},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var o=["angleRad"],i=["leftPercent","rightPercent","topPercent","bottomPercent"],a=r(r([],o,!0),i,!0),l=r(r([],a,!0),["widthPx","heightPx"],!0);function s(e,t){return Math.abs(e-t)<.001}t.default=function(e,t){return e&&e.src&&!l.some((function(t){return!("number"==typeof e[t])}))?a.every((function(t){return s(e[t],0)}))?1:t&&o.every((function(t){return s(e[t],0)}))&&o.every((function(e){return s(t[e],0)}))&&i.every((function(n){return s(e[n],t[n])}))?2:3:0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return!1;try{var t=e.ownerDocument.createElement("canvas");t.width=10,t.height=10;var n=t.getContext("2d");return n.drawImage(e,0,0),n.getImageData(0,0,1,1),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getSideResizeHTML=t.getCornerResizeHTML=t.doubleCheckResize=t.rotateCoordinate=t.Resizer=void 0;var o=["w","","e"],i=["s","","n"];function a(e,t,n){if(0==e&&0==t)return[0,0];var r=Math.sqrt(e*e+t*t);return n=Math.atan2(t,e)-n,[r*Math.cos(n),r*Math.sin(n)]}function l(e,t,n){var r="w"==e?"left":"right",o="n"==t?"top":"bottom";return""==e&&""==t?{tag:"div",style:"position:absolute;left:0;right:0;top:0;bottom:0;border:solid 1px "+n+";pointer-events:none"}:{tag:"div",style:"position:absolute;"+r+":"+(""==e?"50%":"0px")+";"+o+":"+(""==t?"50%":"0px"),children:[{tag:"div",style:"position:relative;width:7px;height:7px;background-color: "+n+";cursor:"+(t+e)+"-resize;"+o+":-3px;"+r+":-3px",className:"r_resizeH",dataset:{x:e,y:t}}]}}t.Resizer={onDragStart:function(e){var t=e.editInfo;return r({},t)},onDragging:function(e,t,n,r,o){var i,l=e.x,s=e.y,u=e.editInfo,c=e.options,d=n.widthPx>0&&n.heightPx>0?1*n.widthPx/n.heightPx:0;r=(i=a(r,o,u.angleRad))[0],o=i[1];var f=""==l,h=""==s,p=!(f||h)&&(c.preserveRatio||t.shiftKey),g=f?n.widthPx:Math.max(n.widthPx+r*("w"==l?-1:1),c.minWidth),v=h?n.heightPx:Math.max(n.heightPx+o*("n"==s?-1:1),c.minHeight);return p&&d>0&&(v=Math.min(v,g/d),(g=Math.min(g,v*d))<v*d?g=v*d:v=g/d),u.widthPx=g,u.heightPx=v,!0}},t.rotateCoordinate=a,t.doubleCheckResize=function(e,t,n,r){var o=e.widthPx,i=e.heightPx,a=i>0?o/i:0;n=Math.floor(n),r=Math.floor(r),o=Math.floor(o),i=Math.floor(i),e.widthPx=n,e.heightPx=r,t&&a>0&&(o!==n||i!==r)&&(n<o?e.heightPx=n/a:e.widthPx=r*a)},t.getCornerResizeHTML=function(e){var t=e.borderColor,n=[];return o.forEach((function(e){return i.forEach((function(r){return n.push(""==e==(""==r)?l(e,r,t):null)}))})),n},t.getSideResizeHTML=function(e){var t=e.borderColor,n=[];return o.forEach((function(e){return i.forEach((function(r){return n.push(""==e!=(""==r)?l(e,r,t):null)}))})),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.naturalWidth,r=e.naturalHeight,o=e.leftPercent,i=e.topPercent;return{width:n*(1-o-e.rightPercent)*t,height:r*(1-i-e.bottomPercent)*t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(102),o=n(26);t.default=function(e,t){var n=(0,o.getEditInfoFromImage)(e),i=(0,r.default)(n,t),a=i.width,l=i.height;return Math.round(a)==Math.round(n.widthPx)&&Math.round(l)==Math.round(n.heightPx)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getObject=t.setObject=t.createCustomData=void 0;function r(e,t){var n=t.getAttribute("NodeId");return n||(n=e.nextNodeId.toString(),e.nextNodeId++,t.setAttribute("NodeId",n)),n}t.createCustomData=function(){return{dict:{},nextNodeId:1}},t.setObject=function(e,t,n,o){if(1==t.nodeType){var i=r(e,t);""!=i&&(e.dict[i]||(e.dict[i]={}),e.dict[i][n]=o)}},t.getObject=function(e,t,n){if(1==t.nodeType){var o=r(e,t);if(""!=o)return e.dict[o]&&e.dict[o][n]}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLevelLists=void 0,t.createLevelLists=function(){return{listsMetadata:{},currentUniqueListId:-1}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createEditor=void 0;var i=n(107);Object.defineProperty(t,"createEditor",{enumerable:!0,get:function(){return i.default}}),o(n(280),t),o(n(0),t),o(n(53),t),o(n(6),t),o(n(85),t),o(n(82),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(53),o=n(82),i=n(85);t.default=function(e,t,n){var a=[new i.HyperLink,new i.Paste,new i.ContentEdit];t&&(a=a.concat(t));var l={plugins:a,initialContent:n,getDarkColor:o.getDarkColor,defaultFormat:{fontFamily:"Calibri,Arial,Helvetica,sans-serif",fontSize:"11pt",textColor:"#000000"}};return new r.Editor(e,l)}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(109),i=n(163),a=n(0),l=function(){function e(e,t){var n=this;if(void 0===t&&(t={}),"DIV"!=(0,a.getTagOfNode)(e))throw new Error("contentDiv must be an HTML DIV element");var l=(0,i.default)(e,t),s=[];Object.keys(l).forEach((function(e){"_placeholder"==e?(0,a.arrayPush)(s,t.plugins):s.push(l[e])}));var u=t.zoomScale>0?t.zoomScale:1;this.core=r(r({contentDiv:e,api:r(r({},o.coreApiMap),t.coreApiOverride||{}),plugins:s.filter((function(e){return!!e}))},(0,i.getPluginState)(l)),{trustedHTMLHandler:t.trustedHTMLHandler||function(e){return e},zoomScale:u,sizeTransformer:t.sizeTransformer||function(e){return e/u}}),this.core.plugins.forEach((function(e){return e.initialize(n)})),this.ensureTypeInContainer(new a.Position(this.core.contentDiv,0).normalize())}return e.prototype.dispose=function(){for(var e=this.core.plugins.length-1;e>=0;e--)this.core.plugins[e].dispose();this.core=null},e.prototype.isDisposed=function(){return!this.core},e.prototype.insertNode=function(e,t){return!!e&&this.core.api.insertNode(this.core,e,t)},e.prototype.deleteNode=function(e){return!(!e||!this.contains(e))&&(e.parentNode.removeChild(e),!0)},e.prototype.replaceNode=function(e,t,n){return!(!this.contains(e)||!t)&&(this.core.api.transformColor(this.core,n?t:null,!0,(function(){return e.parentNode.replaceChild(t,e)}),0),!0)},e.prototype.getBlockElementAtNode=function(e){return(0,a.getBlockElementAtNode)(this.core.contentDiv,e)},e.prototype.contains=function(e){return(0,a.contains)(this.core.contentDiv,e)},e.prototype.queryElements=function(e,t,n){var r=this;void 0===t&&(t=0);var o=[],i=t instanceof Function?0:t;n=t instanceof Function?t:n;var l=0==i?null:this.getSelectionRangeEx();return l?(l.ranges.forEach((function(t){o.push.apply(o,(0,a.queryElements)(r.core.contentDiv,e,n,i,t))})),o):(0,a.queryElements)(this.core.contentDiv,e,n,i,null)},e.prototype.collapseNodes=function(e,t,n){return(0,a.collapseNodes)(this.core.contentDiv,e,t,n)},e.prototype.isEmpty=function(e){return(0,a.isNodeEmpty)(this.core.contentDiv,e)},e.prototype.getContent=function(e){return void 0===e&&(e=0),this.core.api.getContent(this.core,e)},e.prototype.setContent=function(e,t){void 0===t&&(t=!0),this.core.api.setContent(this.core,e,t)},e.prototype.insertContent=function(e,t){var n;if(e){var r=this.getDocument(),o=null===(n=(new DOMParser).parseFromString(this.core.trustedHTMLHandler(e),"text/html"))||void 0===n?void 0:n.body,i=(null==o?void 0:o.childNodes)?(0,a.toArray)(o.childNodes):[];t&&t.insertOnNewLine&&i.length>1&&(i=[(0,a.wrap)(i)]);var l=r.createDocumentFragment();i.forEach((function(e){return l.appendChild(e)})),this.insertNode(l,t)}},e.prototype.deleteSelectedContent=function(){var e=this.getSelectionRange();return e&&!e.collapsed&&(0,a.deleteSelectedContent)(this.core.contentDiv,e)},e.prototype.paste=function(e,t,n){var r=this;if(e){e.snapshotBeforePaste?this.setContent(e.snapshotBeforePaste):e.snapshotBeforePaste=this.getContent(2);var o=this.getSelectionRange(),i=o&&a.Position.getStart(o),l=this.core.api.createPasteFragment(this.core,e,i,t,n);this.addUndoSnapshot((function(){return r.insertNode(l),e}),"Paste")}},e.prototype.getSelectionRange=function(e){return void 0===e&&(e=!0),this.core.api.getSelectionRange(this.core,e)},e.prototype.getSelectionRangeEx=function(){return this.core.api.getSelectionRangeEx(this.core)},e.prototype.getSelectionPath=function(){var e=this.getSelectionRange();return e&&(0,a.getSelectionPath)(this.core.contentDiv,e)},e.prototype.hasFocus=function(){return this.core.api.hasFocus(this.core)},e.prototype.focus=function(){this.core.api.focus(this.core)},e.prototype.select=function(e,t,n,r){var o;if(null===(o=e)||void 0===o?void 0:o.rows){var i=this.core.api.selectTable(this.core,e,t);return this.core.domEvent.tableSelectionRange=i,!!i}this.core.api.selectTable(this.core,null),this.core.domEvent.tableSelectionRange=null;var l=e?(0,a.safeInstanceOf)(e,"Range")?e:Array.isArray(e.start)&&Array.isArray(e.end)?(0,a.createRange)(this.core.contentDiv,e.start,e.end):(0,a.createRange)(e,t,n,r):null;return this.contains(l)&&this.core.api.selectRange(this.core,l)},e.prototype.getFocusedPosition=function(){var e,t=null===(e=this.getDocument().defaultView)||void 0===e?void 0:e.getSelection();if(this.contains(t&&t.focusNode))return new a.Position(t.focusNode,t.focusOffset);var n=this.getSelectionRange();return n?a.Position.getStart(n):null},e.prototype.getElementAtCursor=function(e,t,n){var r=this;return n=t?null:n,(0,a.cacheGetEventData)(n,"GET_ELEMENT_AT_CURSOR_"+e,(function(){if(!t){var n=r.getFocusedPosition();t=n&&n.node}return t&&(0,a.findClosestElementAncestor)(t,r.core.contentDiv,e)}))},e.prototype.isPositionAtBeginning=function(e){return(0,a.isPositionAtBeginningOf)(e,this.core.contentDiv)},e.prototype.getSelectedRegions=function(e){var t=this;void 0===e&&(e=0);var n=this.getSelectionRangeEx(),r=[];return n.ranges.forEach((function(n){r.push.apply(r,n?(0,a.getRegionsFromRange)(t.core.contentDiv,n,e):[])})),r.filter((function(e,t,n){return n.indexOf(e)===t}))},e.prototype.addDomEventHandler=function(e,t){var n,r="string"==typeof e?((n={})[e]=t,n):e;return this.core.api.attachDomEvent(this.core,r)},e.prototype.triggerPluginEvent=function(e,t,n){var o=r({eventType:e},t);return this.core.api.triggerEvent(this.core,o,n),o},e.prototype.triggerContentChangedEvent=function(e,t){void 0===e&&(e="SetContent"),this.triggerPluginEvent(7,{source:e,data:t})},e.prototype.undo=function(){this.focus(),this.core.api.restoreUndoSnapshot(this.core,-1)},e.prototype.redo=function(){this.focus(),this.core.api.restoreUndoSnapshot(this.core,1)},e.prototype.addUndoSnapshot=function(e,t,n){this.core.api.addUndoSnapshot(this.core,e,t,n)},e.prototype.getUndoState=function(){var e=this.core.undo,t=e.hasNewContent,n=e.snapshotsService;return{canUndo:t||n.canMove(-1),canRedo:n.canMove(1)}},e.prototype.getDocument=function(){return this.core.contentDiv.ownerDocument},e.prototype.getScrollContainer=function(){return this.core.domEvent.scrollContainer},e.prototype.getCustomData=function(e,t,n){return(this.core.lifecycle.customData[e]=this.core.lifecycle.customData[e]||{value:t?t():void 0,disposer:n}).value},e.prototype.isInIME=function(){return this.core.domEvent.isInIME},e.prototype.getDefaultFormat=function(){return this.core.lifecycle.defaultFormat},e.prototype.getBodyTraverser=function(e){return a.ContentTraverser.createBodyTraverser(this.core.contentDiv,e)},e.prototype.getSelectionTraverser=function(e){return(e=null!=e?e:this.getSelectionRange())&&a.ContentTraverser.createSelectionTraverser(this.core.contentDiv,e)},e.prototype.getBlockTraverser=function(e){void 0===e&&(e=3);var t=this.getSelectionRange();return t&&a.ContentTraverser.createBlockTraverser(this.core.contentDiv,t,e)},e.prototype.getContentSearcherOfCursor=function(e){var t=this;return(0,a.cacheGetEventData)(e,"ContentSearcher",(function(){var e=t.getSelectionRange();return e&&new a.PositionContentSearcher(t.core.contentDiv,a.Position.getStart(e))}))},e.prototype.runAsync=function(e){var t=this,n=this.core.contentDiv.ownerDocument.defaultView||window,r=n.requestAnimationFrame((function(){!t.isDisposed()&&e&&e(t)}));return function(){n.cancelAnimationFrame(r)}},e.prototype.setEditorDomAttribute=function(e,t){null===t?this.core.contentDiv.removeAttribute(e):this.core.contentDiv.setAttribute(e,t)},e.prototype.getEditorDomAttribute=function(e){return this.core.contentDiv.getAttribute(e)},e.prototype.getRelativeDistanceToEditor=function(e,t){if(this.contains(e)){var n=this.core.contentDiv,r=n.getBoundingClientRect(),o=e.getBoundingClientRect();if(r&&o){var i=o.left-(null==r?void 0:r.left),a=o.top-(null==r?void 0:r.top);return t&&(i+=n.scrollLeft,a+=n.scrollTop),[i,a]}}return null},e.prototype.addContentEditFeature=function(e){var t=this;null==e||e.keys.forEach((function(n){var r=t.core.edit.features[n]||[];r.push(e),t.core.edit.features[n]=r}))},e.prototype.getStyleBasedFormatState=function(e){if(!e){var t=this.getSelectionRange();e=t&&a.Position.getStart(t).normalize().node}return this.core.api.getStyleBasedFormatState(this.core,e)},e.prototype.getPendableFormatState=function(e){return this.core.api.getPendableFormatState(this.core,e)},e.prototype.ensureTypeInContainer=function(e,t){this.core.api.ensureTypeInContainer(this.core,e,t)},e.prototype.setDarkModeState=function(e){this.isDarkMode()!=!!e&&(this.core.api.transformColor(this.core,this.core.contentDiv,!1,null,e?0:1,!0),this.triggerContentChangedEvent(e?"SwitchToDarkMode":"SwitchToLightMode"))},e.prototype.isDarkMode=function(){return this.core.lifecycle.isDarkMode},e.prototype.transformToDarkColor=function(e){this.core.api.transformColor(this.core,e,!0,null,0)},e.prototype.startShadowEdit=function(){this.core.api.switchShadowEdit(this.core,!0)},e.prototype.stopShadowEdit=function(){this.core.api.switchShadowEdit(this.core,!1)},e.prototype.isInShadowEdit=function(){return!!this.core.lifecycle.shadowEditFragment},e.prototype.isFeatureEnabled=function(e){return this.core.lifecycle.experimentalFeatures.indexOf(e)>=0},e.prototype.getTrustedHTMLHandler=function(){return this.core.trustedHTMLHandler},e.prototype.getSizeTransformer=function(){return this.core.sizeTransformer},e.prototype.getZoomScale=function(){return this.core.zoomScale},e.prototype.setZoomScale=function(e){if(e>0&&e<=10){var t=this.core.zoomScale;this.core.zoomScale=e,t!=e&&this.triggerPluginEvent(21,{oldZoomScale:t,newZoomScale:e},!0)}},e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coreApiMap=void 0;var r=n(110),o=n(146),i=n(147),a=n(148),l=n(149),s=n(150),u=n(151),c=n(152),d=n(153),f=n(154),h=n(81),p=n(155),g=n(156),v=n(157),m=n(158),y=n(159),b=n(160),E=n(161),C=n(162);t.coreApiMap={attachDomEvent:o.attachDomEvent,addUndoSnapshot:r.addUndoSnapshot,createPasteFragment:i.createPasteFragment,ensureTypeInContainer:a.ensureTypeInContainer,focus:l.focus,getContent:s.getContent,getSelectionRange:c.getSelectionRange,getSelectionRangeEx:d.getSelectionRangeEx,getStyleBasedFormatState:f.getStyleBasedFormatState,getPendableFormatState:u.getPendableFormatState,hasFocus:h.hasFocus,insertNode:p.insertNode,restoreUndoSnapshot:g.restoreUndoSnapshot,selectRange:v.selectRange,setContent:y.setContent,switchShadowEdit:b.switchShadowEdit,transformColor:E.transformColor,triggerEvent:C.triggerEvent,selectTable:m.selectTable}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.addUndoSnapshot=void 0;var o=n(0);function i(e,t){if(!e.lifecycle.shadowEditFragment){var n=e.api.getSelectionRangeEx(e),i=e.lifecycle.isDarkMode,a=1==(null==n?void 0:n.type)?r({type:1,tableId:n.table.id,isDarkMode:i},n.coordinates):r({type:0,isDarkMode:i,start:[],end:[]},(0,o.getSelectionPath)(e.contentDiv,n.ranges[0])||{});e.undo.snapshotsService.addSnapshot({html:e.contentDiv.innerHTML,metadata:a},t),e.undo.hasNewContent=!1}}t.addUndoSnapshot=function(e,t,n,r){var a,l=e.undo,s=l.isNested;s||(l.isNested=!0,i(e,r));try{var u;if(t)a=t((u=e.api.getSelectionRange(e,!0))&&o.Position.getStart(u).normalize(),u&&o.Position.getEnd(u).normalize()),s||i(e,!1)}finally{s||(l.isNested=!1)}if(t&&n){var c={eventType:7,source:n,data:a};e.api.triggerEvent(e,c,!0)}r&&((u=e.api.getSelectionRange(e,!1))&&(e.undo.hasNewContent=!1,e.undo.autoCompletePosition=o.Position.getStart(u)))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=n(3),i=n(9),a=n(2),l=n(19),s=n(14),u=n(12),c=n(13),d=["TD","TH","LI","BLOCKQUOTE"],f=function(){function e(e,t,n){this.rootNode=e,this.startNode=t,this.endNode=n}return e.getBlockContext=function(e){for(var t=e;t&&!(0,l.default)(t);)t=t.parentNode;return t},e.prototype.collapseToSingleElement=function(){for(var t=e.getBlockContext(this.startNode),n=t?(0,r.default)(t,this.startNode,this.endNode,!0):[],o=e.getBlockContext(this.startNode);n[0]&&n[0]!=o&&n[0].parentNode!=this.rootNode&&d.indexOf((0,a.default)(n[0].parentNode))<0;)n=[(0,c.splitBalancedNodeRange)(n)];return 1==n.length&&(0,l.default)(n[0])?n[0]:(0,u.default)(n)},e.prototype.getStartNode=function(){return this.startNode},e.prototype.getEndNode=function(){return this.endNode},e.prototype.equals=function(e){return this.startNode==e.getStartNode()&&this.endNode==e.getEndNode()},e.prototype.isAfter=function(e){return(0,s.default)(this.getStartNode(),e.getEndNode())},e.prototype.contains=function(e){return(0,o.default)(this.startNode,e,!0)||(0,o.default)(this.endNode,e,!0)||(0,s.default)(e,this.startNode)&&(0,s.default)(this.endNode,e)},e.prototype.getTextContent=function(){var e=(0,i.default)(this.getStartNode(),this.getEndNode());return e?e.toString():""},e}();t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(7),i=n(57),a=n(15),l=n(59),s=function(){function e(e,t){this.rootNode=e,this.startNode=(0,r.default)(e,t)?t:null}return e.prototype.getStartBlockElement=function(){return this.startNode?(0,o.default)(this.rootNode,this.startNode):(0,i.default)(this.rootNode,!0)},e.prototype.getStartInlineElement=function(){return this.startNode?(0,a.default)(this.rootNode,this.startNode):(0,l.getFirstInlineElement)(this.rootNode)},e.prototype.isBlockInScope=function(e){return(0,r.default)(this.rootNode,e.getStartNode())},e.prototype.trimInlineElement=function(e){return e},e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(61),o=n(7),i=n(15),a=n(54),l=n(4),s=n(1),u=n(41),c=n(59),d=function(){function e(e,t,n){this.rootNode=e,this.startFrom=n,t=(0,s.default)(t,"Range")?l.default.getStart(t):t,this.position=t.normalize(),this.block=(0,o.default)(this.rootNode,this.position.node)}return e.prototype.getStartBlockElement=function(){return this.block},e.prototype.getStartInlineElement=function(){if(this.block)switch(this.startFrom){case 0:case 1:case 2:return function(e,t){if(e instanceof a.default){var n=e.getStartNode();return t?(0,c.getFirstInlineElement)(n):(0,c.getLastInlineElement)(n)}return(0,i.default)(e,t?e.getStartNode():e.getEndNode())}(this.block,0==this.startFrom);case 3:var e=(0,u.getInlineElementAfter)(this.rootNode,this.position);return e&&this.block.contains(e.getContainerNode())?e:new r.default(this.position,this.block)}return null},e.prototype.isBlockInScope=function(e){return!(!this.block||!e)&&this.block.equals(e)},e.prototype.trimInlineElement=function(e){return this.block&&e&&this.block.contains(e.getContainerNode())?e:null},e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),o=n(29),i=n(4),a=n(41),l=function(){function e(e,t){this.rootNode=e,this.startBlock=null,this.startInline=null,this.start=i.default.getStart(t).normalize(),this.end=i.default.getEnd(t).normalize()}return e.prototype.getStartBlockElement=function(){return this.startBlock||(this.startBlock=(0,r.default)(this.rootNode,this.start.node)),this.startBlock},e.prototype.getStartInlineElement=function(){return this.startInline||(this.startInline=this.trimInlineElement((0,a.getInlineElementAfter)(this.rootNode,this.start))),this.startInline},e.prototype.isBlockInScope=function(e){if(!e)return!1;var t=!1,n=this.getStartBlockElement();if(this.start.equalTo(this.end))t=!!n&&n.equals(e);else{var o=(0,r.default)(this.rootNode,this.end.node);t=!!n&&!!o&&(e.equals(n)||e.equals(o)||e.isAfter(n)&&o.isAfter(e))}return t},e.prototype.trimInlineElement=function(e){if(!e||this.start.equalTo(this.end))return null;var t=e.getStartPosition(),n=e.getEndPosition();if(t.isAfter(this.end)||this.start.isAfter(n))return null;var r=!1,i=!1;return this.start.isAfter(t)&&(t=this.start,r=!0),n.isAfter(this.end)&&(n=this.end,i=!0),t.isAfter(n)||t.equalTo(n)?null:r||i?new o.default(e,r?t:void 0,i?n:void 0):e},e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(63),o=n(64),i=n(5);t.default=function(e,t,n){var a,l=e.clipboardData||(null===(a=e.target.ownerDocument)||void 0===a?void 0:a.defaultView).clipboardData;l.items?(e.preventDefault(),(0,r.default)((0,i.default)(l.items),n).then(t)):(0,o.default)(l,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(44);t.default=function(e,t,n){if(t){var o=e.style,i=t.fontFamily,a=t.fontSize,l=t.textColor,s=t.textColors,u=t.backgroundColor,c=t.backgroundColors,d=t.bold,f=t.italic,h=t.underline;i&&(o.fontFamily=i),a&&(o.fontSize=a),s?(0,r.default)(e,s,!1,n):l&&(0,r.default)(e,l,!1,n),c?(0,r.default)(e,c,!0,n):u&&(0,r.default)(e,u,!0,n),d&&(o.fontWeight="bold"),f&&(o.fontStyle="italic"),h&&(o.textDecoration="underline")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PendableFormatCommandMap=void 0,t.PendableFormatCommandMap={isBold:"bold",isItalic:"italic",isUnderline:"underline",isStrikeThrough:"strikeThrough",isSubscript:"subscript",isSuperscript:"superscript"},t.default=function(e){return Object.keys(t.PendableFormatCommandMap).reduce((function(n,r){return n[r]=e.queryCommandState(t.PendableFormatCommandMap[r]),n}),{})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=/^[^?]+%[^0-9a-f]+|^[^?]+%[0-9a-f][^0-9a-f]+|^[^?]+%00|^[^?]+%$|^https?:\/\/[^?\/]+@|^www\.[^?\/]+@/i,o="(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\:[0-9]+)?(?:[\\/\\?]\\S*)?",i={http:{match:new RegExp("^(?:microsoft-edge:)?http:\\/\\/"+o+"|www\\."+o,"i"),except:r,normalizeUrl:function(e){return new RegExp("^(?:microsoft-edge:)?http:\\/\\/","i").test(e)?e:"http://"+e}},https:{match:new RegExp("^(?:microsoft-edge:)?https:\\/\\/"+o,"i"),except:r},mailto:{match:new RegExp("^mailto:\\S+@\\S+\\.\\S+","i")},notes:{match:new RegExp("^notes:\\/\\/\\S+","i")},file:{match:new RegExp("^file:\\/\\/\\/?\\S+","i")},unc:{match:new RegExp("^\\\\\\\\\\S+","i")},ftp:{match:new RegExp("^ftp:\\/\\/"+o+"|ftp\\."+o,"i"),normalizeUrl:function(e){return new RegExp("^ftp:\\/\\/","i").test(e)?e:"ftp://"+e}},news:{match:new RegExp("^news:(\\/\\/)?"+o,"i")},telnet:{match:new RegExp("^telnet:(\\/\\/)?"+o,"i")},gopher:{match:new RegExp("^gopher:\\/\\/"+o,"i")},wais:{match:new RegExp("^wais:(\\/\\/)?"+o,"i")}};t.default=function(e){if(e)for(var t=0,n=Object.keys(i);t<n.length;t++){var r=n[t],o=i[r],a=e.match(o.match);if(a&&a[0]==e&&(!o.except||!o.except.test(e)))return{scheme:r,originalUrl:e,normalizedUrl:o.normalizeUrl?o.normalizeUrl(e):e}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=n(44),i="transparent";function a(e){return!!e.td&&!!e.td.dataset.cellShade}function l(e){return"solid 1px "+(e||"transparent")}t.default=function(e,t,n){n&&(e.style.borderCollapse="collapse",function(e,t){e.forEach((function(n,r){n.forEach((function(o,a){o.td&&function(e,t,n,r,o,a){switch(function(e,t){e.style.borderTop=l(t.topBorderColor),e.style.borderLeft=l(t.verticalBorderColor),e.style.borderRight=l(t.verticalBorderColor),e.style.borderBottom=l(t.bottomBorderColor)}(t,e),e.tableBorderFormat){case 0:return;case 1:o||(t.style.borderLeftColor=i),a||(t.style.borderRightColor=i);break;case 4:n||(t.style.borderTopColor=i),r||n||(t.style.borderBottomColor=i),o||(t.style.borderLeftColor=i),a||o||(t.style.borderRightColor=i),o&&n&&(t.style.borderRightColor=i);break;case 2:n&&(t.style.borderTopColor=i,t.style.borderRightColor=i,t.style.borderLeftColor=i),o&&(t.style.borderLeftColor=i),a&&(t.style.borderRightColor=i);break;case 3:o&&(t.style.borderLeftColor=i),a&&(t.style.borderRightColor=i);break;case 5:n&&(t.style.borderRightColor=i,t.style.borderLeftColor=i),o&&(t.style.borderBottomColor=i,t.style.borderTopColor=i),n&&o&&(t.style.borderLeftColor=e.verticalBorderColor||i,t.style.borderBottomColor=e.bottomBorderColor||i,t.style.borderTopColor=e.topBorderColor||i);break;case 6:n&&(t.style.borderRightColor=i,t.style.borderLeftColor=i),o&&(t.style.borderBottomColor=i,t.style.borderTopColor=i),n&&o&&(t.style.borderLeftColor=e.verticalBorderColor||i,t.style.borderBottomColor=e.bottomBorderColor||i,t.style.borderTopColor=e.topBorderColor||i),n||o||(t.style.borderLeftColor=i,t.style.borderBottomColor=i,t.style.borderTopColor=i,t.style.borderRightColor=i);break;case 7:n&&(t.style.borderLeftColor=i,t.style.borderTopColor=i,t.style.borderRightColor=i),o&&(t.style.borderLeftColor=i,t.style.borderTopColor=i,t.style.borderBottomColor=i),n||o||(t.style.borderLeftColor=i,t.style.borderBottomColor=i,t.style.borderTopColor=i,t.style.borderRightColor=i),n&&o&&(t.style.borderBottomColor=e.bottomBorderColor||i)}}(t,o.td,0===r,r===e.length-1,0===a,a===n.length-1)}))}))}(t,n),function(e,t){var n=function(e){return e%2==0?t.bgColorEven:t.bgColorOdd},r=t.hasBandedRows,l=t.hasBandedColumns,s=t.bgColorOdd,u=t.bgColorEven,c=!r&&s===u;e.forEach((function(e,l){e.forEach((function(e){if(e.td&&!a(e))if(r){var s=n(l);(0,o.default)(e.td,s||i,!0,!0)}else c?(0,o.default)(e.td,t.bgColorOdd||i,!0):(0,o.default)(e.td,i,!0,!0)}))})),l&&e.forEach((function(e){e.forEach((function(e,t){var r=n(t);e.td&&r&&!a(e)&&(0,o.default)(e.td,r,!0,!0)}))}))}(t,n),function(e,t){if(!t.hasFirstColumn)return void e.forEach((function(e){e.forEach((function(e,t){e.td&&0===t&&(e.td=(0,r.default)(e.td,"TD"),e.td.scope="")}))}));e.forEach((function(t,n){t.forEach((function(t,l){t.td&&0===l&&(0===n||a(t)||(t.td.style.borderTopColor=i,(0,o.default)(t.td,i,!0,!0)),n!==e.length-1&&0!==n&&(t.td.style.borderBottomColor=i),t.td=(0,r.default)(t.td,"TH"),t.td.scope="col")}))}))}(t,n),function(e,t){var n,i;if(!t.hasHeaderRow)return void(null===(n=e[0])||void 0===n||n.forEach((function(e){e.td&&(e.td=(0,r.default)(e.td,"TD"),e.td.scope="")})));null===(i=e[0])||void 0===i||i.forEach((function(e){e.td&&t.headerRowColor&&(a(e)||(0,o.default)(e.td,t.headerRowColor,!0,!0),e.td.style.borderRightColor=t.headerRowColor,e.td.style.borderLeftColor=t.headerRowColor,e.td.style.borderTopColor=t.headerRowColor,e.td=(0,r.default)(e.td,"TH"),e.td.scope="row")}))}(t,n))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.saveTableInfo=t.getTableFormatInfo=void 0;t.getTableFormatInfo=function(e){var t=function(e){if(!e)return null;try{return JSON.parse(e)}catch(e){return null}}(null==e?void 0:e.dataset.roosterTableInfo);return function(e){if(!e)return!1;var t=e.topBorderColor,n=e.verticalBorderColor,r=e.bottomBorderColor,o=e.bgColorOdd,i=e.bgColorEven,a=e.hasBandedColumns,l=e.hasBandedRows,s=e.hasFirstColumn,u=e.hasHeaderRow,c=e.tableBorderFormat,d=[a,l,s,u];if([t,n,r,o,i].some((function(e){return!function(e){if(null==e||"string"==typeof e)return!0;return!1}(e)}))||d.some((function(e){return!function(e){if("boolean"==typeof e)return!0;return!1}(e)}))||!function(e){if(-1<e&&e<8)return!0;return!1}(c))return!1;return!0}(t)?t:null},t.saveTableInfo=function(e,t){e&&t&&(e.dataset.roosterTableInfo=JSON.stringify(t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!t||!e.cells)return!1;var n=t.firstCell,r=t.lastCell,o=e.cells.length-1,i=e.cells[o].length-1,a=n.x,l=n.y,s=r.x,u=r.y;return 0==a&&0==l&&s==i&&u==o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),o=n(69),i=n(70),a=n(24),l=n(4),s=n(1),u=n(23),c=n(5),d=n(46),f=n(12),h=n(8),p=n(47);function g(e,t,n){var r=t[n?t.length-1:0];r=(0,h.getLeafSibling)(e.rootNode,r,n,e.skipTags,!0),r=(0,o.default)(e,"ol,ul",r),(0,a.default)(e,r)&&(0,p.isListElement)(r)&&(n?(0,s.default)(r,"HTMLOListElement")&&1!=r.start||t.push(r):t.unshift(r))}t.default=function(e,t,n){if(!e)return null;var a=[];if(n){var h=(0,o.default)(e,"ol,ul",n);h&&a.push(h)}else{if((0,i.default)(e).forEach((function(n){var r=(0,o.default)(e,"ol,ul",n.getStartNode());r?(a[a.length-1]!=r&&a.push(r),1==a.length&&(0,s.default)(r,"HTMLOListElement")&&r.start>1&&(t=!1)):a.push(n.collapseToSingleElement())})),0==a.length&&!e.rootNode.firstChild){var v=(0,r.default)(1,e.rootNode.ownerDocument);e.rootNode.appendChild(v),a.push(v),e.fullSelectionStart=new l.default(v,0),e.fullSelectionEnd=new l.default(v,-1)}t&&(g(e,a,!1),g(e,a,!0)),a=a.filter((function(e){return!(0,u.default)(e,!0)}))}var m=null;if(a.length>0){var y=a.shift()||null;(m=(0,p.isListElement)(y)?new d.default(y):y?function(e){var t=(0,c.default)(e.childNodes),n=1==t.length?t[0]:(0,f.default)(t,"SPAN"),r=e.ownerDocument.createElement("ol");e.appendChild(r);var o=new d.default(r);return o.appendItem(n,0),o}(y):null)&&a.forEach((function(e){(0,p.isListElement)(e)?m.mergeVList(new d.default(e)):m.appendItem(e,0)}))}return m}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(43),o=n(69),i=n(14),a=n(24),l=n(17),s=n(46),u=0,c=function(){function e(e,t){this.region=e,this.name=t,this.lastNumber=0,this.lastNumberBeforeCursor=0}return e.createListChains=function(t,n,a){var s=Array.isArray(t)?t:t?[t]:[],u=[];return s.forEach((function(t){var s,c=[];(0,l.default)(t.rootNode,"ol",(function(r){var l=(0,o.default)(t,"ol",r);if(s!=l){var u=c.filter((function(e){return e.canAppendToTail(l)}))[0]||new e(t,(a||d)()),f=c.indexOf(u),h=!!n&&(0,i.default)(l,n);h?f<0&&c.push(u):(f>=0&&c.splice(f,1),c.unshift(u)),u.append(l,h),s=l}})),(0,r.default)(u,c)})),u},e.prototype.canAppendAtCursor=function(e){return e>1&&this.lastNumberBeforeCursor+1==e},e.prototype.createVListAtBlock=function(e,t){if(e&&e.parentNode){var n=e.ownerDocument.createElement("ol");n.start=t,this.applyChainName(n),e.parentNode.insertBefore(n,e);var r=new s.default(n);return r.appendItem(e,0),r}return null},e.prototype.commit=function(){for(var e=this.getLists(),t=0,n=0;n<e.length;n++){var r=e[n];r.start=t+1;var o=new s.default(r);t=o.getLastItemNumber()||0,delete r.dataset.listchain,delete r.dataset.listchainafter,o.writeBack()}},e.prototype.canAppendToTail=function(e){return this.lastNumber+1==e.start},e.prototype.append=function(e,t){this.applyChainName(e),this.lastNumber=new s.default(e).getLastItemNumber()||0,t?e.dataset.listchainafter="true":this.lastNumberBeforeCursor=this.lastNumber},e.prototype.applyChainName=function(e){e.dataset.listchain=this.name},e.prototype.getLists=function(){var e=this;return(0,l.default)(this.region.rootNode,"ol[data-listchain="+this.name+"]").filter((function(t){return(0,a.default)(e.region,t)}))},e}();function d(){return"__List_Chain_"+u++}t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),o=n(9),i=n(45);t.default=function(e){var t;if(!e)return null;var n=(0,o.default)(e),a=n.getBoundingClientRect&&(0,i.default)(n.getBoundingClientRect());if(a)return a;e=e.normalize();var l=n.getClientRects&&n.getClientRects();if(a=l&&1==l.length?(0,i.default)(l[0]):null)return a;if(3==e.node.nodeType&&e.node.ownerDocument){var s=(0,r.default)({tag:"span",children:["​"]},e.node.ownerDocument);if((n=(0,o.default)(e)).insertNode(s),a=s.getBoundingClientRect&&(0,i.default)(s.getBoundingClientRect()),null===(t=s.parentNode)||void 0===t||t.removeChild(s),a)return a}var u=e.element;return u&&u.getBoundingClientRect&&(a=(0,i.default)(u.getBoundingClientRect()))?a:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),o=n(76);t.default=function(e,t){if(!e)return"";var n=(0,r.default)(e),i=t&&(0,o.default)(e,t);return i?n+"\x3c!--"+JSON.stringify(i)+"--\x3e":n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setHtmlWithMetadata=void 0;var r=n(9),o=n(1);function i(e,t,n){if(e){t=t||"",e.innerHTML=(null==n?void 0:n(t))||t;var r=e.lastChild;if((0,o.default)(r,"Comment"))try{var i=JSON.parse(r.nodeValue||"");if(function(e){if(!e||"object"!=typeof e)return!1;switch(e.type||0){case 0:var t=e;if(a(t.start)&&a(t.end))return e.type=0,e.isDarkMode=!!e.isDarkMode,!0;break;case 1:var n=e;if("string"==typeof n.tableId&&n.tableId&&l(n.firstCell)&&l(n.lastCell))return e.isDarkMode=!!e.isDarkMode,!0}return!1}(i))return e.removeChild(r),i}catch(e){}}}function a(e){return e&&Array.isArray(e)&&e.every((function(e){return"number"==typeof e}))}function l(e){var t=e;return t&&"object"==typeof t&&"number"==typeof t.x&&"number"==typeof t.y}t.default=function(e,t,n){var o=i(e,t,n);return 0==(null==o?void 0:o.type)?(0,r.default)(e,o.start,o.end):null},t.setHtmlWithMetadata=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(21);t.default=function(e,t){var n,o,i,a=null===(i=null===(o=null===(n=null==e?void 0:e.commonAncestorContainer)||void 0===n?void 0:n.ownerDocument)||void 0===o?void 0:o.defaultView)||void 0===i?void 0:i.getSelection();if(a){var l=!0;if(a.rangeCount>0)try{var s=null;(t||r.Browser.isEdge)&&(s=1==a.rangeCount?a.getRangeAt(0):null)&&s.startContainer==e.startContainer&&s.startOffset==e.startOffset&&s.endContainer==e.endContainer&&s.endOffset==e.endOffset?l=!1:a.removeAllRanges()}catch(e){}l&&a.addRange(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSnapshotV2=void 0;var r=n(77);function o(e,t,n,o,i){o=o||function(e){var t;return(null===(t=e)||void 0===t?void 0:t.length)||0},i=i||a;var l=e.snapshots[e.currentIndex];if(e.currentIndex<0||!l||!i(t,l)){(0,r.default)(e,o),e.snapshots.push(t),e.currentIndex++,e.totalSize+=o(t);for(var s=0;s<e.snapshots.length&&e.totalSize>e.maxSize;)e.totalSize-=o(e.snapshots[s]),s++;s>0&&(e.snapshots.splice(0,s),e.currentIndex-=s,e.autoCompleteIndex-=s),n&&(e.autoCompleteIndex=e.currentIndex)}}function i(e,t){return e.html==t.html}function a(e,t){return e==t}t.default=o,t.addSnapshotV2=function(e,t,n){o(e,t,n,(function(e){var t;return(null===(t=e.html)||void 0===t?void 0:t.length)||0}),i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.moveCurrentSnapsnot=void 0;var r=n(49);function o(e,t){return(0,r.default)(e,t)?(e.currentIndex+=t,e.autoCompleteIndex=-1,e.snapshots[e.currentIndex]):null}t.default=o,t.moveCurrentSnapsnot=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{snapshots:[],totalSize:0,currentIndex:-1,autoCompleteIndex:-1,maxSize:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.autoCompleteIndex>=0&&e.currentIndex-e.autoCompleteIndex==1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=n(78),i=n(74),a=n(33),l=n(2),s=n(1),u=n(34),c=n(5),d=n(79),f=n(133),h=function(){function e(e){e=e||{},this.elementCallbacks=(0,d.cloneObject)(e.elementCallbacks),this.styleCallbacks=(0,f.getStyleCallbacks)(e.cssStyleCallbacks),this.attributeCallbacks=(0,d.cloneObject)(e.attributeCallbacks),this.tagReplacements=(0,f.getTagReplacement)(e.additionalTagReplacements),this.allowedAttributes=(0,f.getAllowedAttributes)(e.additionalAllowedAttributes),this.allowedCssClassesRegex=(0,f.getAllowedCssClassesRegex)(e.additionalAllowedCssClasses),this.defaultStyleValues=(0,f.getDefaultStyleValues)(e.additionalDefaultStyleValues),this.additionalPredefinedCssForElement=e.additionalPredefinedCssForElement||null,this.additionalGlobalStyleNodes=e.additionalGlobalStyleNodes||[],this.preserveHtmlComments=e.preserveHtmlComments||!1,this.unknownTagReplacement=e.unknownTagReplacement||null}return e.convertInlineCss=function(t,n){return new e({additionalGlobalStyleNodes:n}).exec(t,!0)},e.sanitizeHtml=function(t,n){var r=new e(n=n||{}),i=(0,s.default)(n.currentElementOrStyle,"HTMLElement")?(0,o.default)(n.currentElementOrStyle):n.currentElementOrStyle;return r.exec(t,n.convertCssOnly,i)},e.prototype.exec=function(e,t,n){var r=(new DOMParser).parseFromString(e||"","text/html");return r&&r.body&&r.body.firstChild&&(this.convertGlobalCssToInlineCss(r),t||this.sanitize(r.body,n)),r&&r.body&&r.body.innerHTML||""},e.prototype.sanitize=function(e,t){if(!e)return"";t=(0,d.cloneObject)(t,(0,o.default)(null)),this.processNode(e,t,{})},e.prototype.convertGlobalCssToInlineCss=function(e){for(var t=(0,c.default)(e.querySelectorAll("style")),n=0,r=this.additionalGlobalStyleNodes.reverse().map((function(e){return e.sheet})).concat(t.map((function(e){return e.sheet})).reverse()).filter((function(e){return e}));n<r.length;n++)for(var o=r[n],i=function(t){var n=o.cssRules[t],r=n&&n.style?n.style.cssText:null;if(n.type!=CSSRule.STYLE_RULE||!r||!n.selectorText)return"continue";for(var i=0,a=n.selectorText.split(",");i<a.length;i++){var l=a[i];if(l&&l.trim()&&!(l.indexOf(":")>=0))(0,c.default)(e.querySelectorAll(l)).forEach((function(e){return e.setAttribute("style",r+(e.getAttribute("style")||""))}))}},a=o.cssRules.length-1;a>=0;a--)i(a);t.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))},e.prototype.processNode=function(e,t,n){var o,i=e.nodeType,a=1==i,s=3==i,u=11==i,c=8==i,f=!1;if(a){var h=(0,l.default)(e),p=this.elementCallbacks[h],g=this.tagReplacements[h.toLowerCase()];void 0===g&&(g=this.unknownTagReplacement),p?f=p(e,n):h.indexOf(":")>0||h==g||"*"==g?f=!0:g&&/^[a-zA-Z][\w\-]*$/.test(g)&&(e=(0,r.default)(e,g),f=!0)}else if(s){var v=t["white-space"];f="pre"==v||"pre-line"==v||"pre-wrap"==v||!/^[\r\n]*$/g.test(e.nodeValue||"")}else f=!!u||!!c&&this.preserveHtmlComments;if(f)if(!s||"pre"!=t["white-space"]&&"pre-wrap"!=t["white-space"]){if(a||u){var m=(0,d.cloneObject)(t),y=e;a&&(this.processAttributes(y,n),this.preprocessCss(y,m),this.processCss(y,m,n));for(var b=y.firstChild,E=void 0;b;b=E)E=b.nextSibling,this.processNode(b,m,n)}}else e.nodeValue=(e.nodeValue||"").replace(/^ /gm," ").replace(/ {2}/g,"  ");else null===(o=e.parentNode)||void 0===o||o.removeChild(e)},e.prototype.preprocessCss=function(e,t){var n=(0,i.default)(e,this.additionalPredefinedCssForElement);n&&Object.keys(n).forEach((function(e){t[e]=n[e]}))},e.prototype.processCss=function(e,t,n){var r=this,o=(0,a.default)(e);Object.keys(o).forEach((function(i){var a=o[i],l=r.styleCallbacks[i],s=null!=t[i],u=(!l||l(a,e,t,n))&&"inherit"!=a&&a.indexOf("expression")<0&&"-"!=i.substr(0,1)&&r.defaultStyleValues[i]!=a&&(s&&a!=t[i]||!s&&"initial"!=a&&"normal"!=a);u&&s&&(t[i]=a),u||delete o[i]})),(0,u.default)(e,o)},e.prototype.processAttributes=function(e,t){for(var n=e.attributes.length-1;n>=0;n--){var r=e.attributes[n],o=r.name.toLowerCase().trim(),i=r.value,a=this.attributeCallbacks[o],l=a?a(i,e,t):this.allowedAttributes.indexOf(o)>=0||0==o.indexOf("data-")?i:null;"class"==o&&this.allowedCssClassesRegex&&(l=this.processCssClass(i,l)),null==l||l.match(/s\n*c\n*r\n*i\n*p\n*t\n*:/i)?e.removeAttribute(o):r.value=l}},e.prototype.processCssClass=function(e,t){var n=this,r=e?e.split(" "):[],o=t?t.split(" "):[];return r.forEach((function(e){var t;(null===(t=n.allowedCssClassesRegex)||void 0===t?void 0:t.test(e))&&o.indexOf(e)<0&&o.push(e)})),(null==o?void 0:o.length)>0?o.join(" "):null},e}();t.default=h},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getStyleCallbacks=t.getDefaultStyleValues=t.getAllowedCssClassesRegex=t.getAllowedAttributes=t.getTagReplacement=void 0;var o=n(79),i={a:"*",abbr:"*",address:"*",area:"*",article:"*",aside:"*",b:"*",bdi:"*",bdo:"*",blockquote:"*",body:"*",br:"*",button:"*",canvas:"*",caption:"*",center:"*",cite:"*",code:"*",col:"*",colgroup:"*",data:"*",datalist:"*",dd:"*",del:"*",details:"*",dfn:"*",dialog:"*",dir:"*",div:"*",dl:"*",dt:"*",em:"*",fieldset:"*",figcaption:"*",figure:"*",font:"*",footer:"*",h1:"*",h2:"*",h3:"*",h4:"*",h5:"*",h6:"*",head:"*",header:"*",hgroup:"*",hr:"*",html:"*",i:"*",img:"*",input:"*",ins:"*",kbd:"*",label:"*",legend:"*",li:"*",main:"*",map:"*",mark:"*",menu:"*",menuitem:"*",meter:"*",nav:"*",ol:"*",optgroup:"*",option:"*",output:"*",p:"*",picture:"*",pre:"*",progress:"*",q:"*",rp:"*",rt:"*",ruby:"*",s:"*",samp:"*",section:"*",select:"*",small:"*",span:"*",strike:"*",strong:"*",sub:"*",summary:"*",sup:"*",table:"*",tbody:"*",td:"*",textarea:"*",tfoot:"*",th:"*",thead:"*",time:"*",tr:"*",tt:"*",u:"*",ul:"*",var:"*",wbr:"*",xmp:"*",form:"SPAN",applet:null,audio:null,base:null,basefont:null,embed:null,frame:null,frameset:null,iframe:null,link:null,meta:null,noscript:null,object:null,param:null,script:null,slot:null,source:null,style:null,template:null,title:null,track:null,video:null},a="accept,align,alt,checked,cite,color,cols,colspan,contextmenu,coords,datetime,default,dir,dirname,disabled,download,face,headers,height,hidden,high,href,hreflang,ismap,kind,label,lang,list,low,max,maxlength,media,min,multiple,open,optimum,pattern,placeholder,readonly,rel,required,reversed,rows,rowspan,scope,selected,shape,size,sizes,span,spellcheck,src,srclang,srcset,start,step,style,tabindex,target,title,translate,type,usemap,valign,value,width,wrap".split(","),l={"background-color":"transparent","border-bottom-color":"rgb(0, 0, 0)","border-bottom-style":"none","border-bottom-width":"0px","border-image-outset":"0","border-image-repeat":"stretch","border-image-slice":"100%","border-image-source":"none","border-image-width":"1","border-left-color":"rgb(0, 0, 0)","border-left-style":"none","border-left-width":"0px","border-right-color":"rgb(0, 0, 0)","border-right-style":"none","border-right-width":"0px","border-top-color":"rgb(0, 0, 0)","border-top-style":"none","border-top-width":"0px","outline-color":"transparent","outline-style":"none","outline-width":"0px",overflow:"visible","text-decoration":"none","-webkit-text-stroke-width":"0px","word-wrap":"break-word","margin-left":"0px","margin-right":"0px",padding:"0px","padding-top":"0px","padding-left":"0px","padding-right":"0px","padding-bottom":"0px",border:"0px","border-top":"0px","border-left":"0px","border-right":"0px","border-bottom":"0px","vertical-align":"baseline",float:"none"},s=[];function u(){return null}function c(e,t){var n=t.tagName;return!("LI"==n||"DIV"==n)}t.getTagReplacement=function(e){var t=r({},i),n=e||{};return Object.keys(n).forEach((function(e){e&&(t[e.toLowerCase()]=n[e])})),t},t.getAllowedAttributes=function(e){return(t=a.concat(e||[]),t.filter((function(e,t,n){return n.indexOf(e)==t}))).map((function(e){return e.toLocaleLowerCase()}));var t},t.getAllowedCssClassesRegex=function(e){var t=s.concat(e||[]);return t.length>0?new RegExp(t.join("|")):null},t.getDefaultStyleValues=function(e){var t=(0,o.cloneObject)(l);return e&&Object.keys(e).forEach((function(n){var r=e[n];null!=r?t[n]=r:delete t[n]})),t},t.getStyleCallbacks=function(e){var t=(0,o.cloneObject)(e);return t.position=t.position||u,t.width=t.width||c,t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{elementCallbacks:{},attributeCallbacks:{},cssStyleCallbacks:{},additionalTagReplacements:{},additionalAllowedAttributes:[],additionalAllowedCssClasses:[],additionalDefaultStyleValues:{},additionalGlobalStyleNodes:[],additionalPredefinedCssForElement:{},preserveHtmlComments:!1,unknownTagReplacement:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(e[t]){var r=e[t];e[t]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.apply(void 0,e),n.apply(void 0,e)}}else e[t]=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,n,r){e&&(e.className="_Entity _EType_"+t+" "+(r?"_EId_"+r+" ":"")+"_EReadonly_"+(n?"1":"0"),n?e.contentEditable="false":e.getAttribute("contenteditable")&&e.removeAttribute("contenteditable"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=!1,r="",o="",i=!1;return null===(t=null==e?void 0:e.className)||void 0===t||t.split(" ").forEach((function(e){"_Entity"==e?n=!0:0==e.indexOf("_EType_")?r=e.substr("_EType_".length):0==e.indexOf("_EId_")?o=e.substr("_EId_".length):0==e.indexOf("_EReadonly_")&&(i="1"==e.substr("_EReadonly_".length))})),n?{wrapper:e,id:o,type:r,isReadonly:i}:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return"._Entity"+(e?"._EType_"+e:"")+(t?"._EId_"+t:"")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=e&&e.eventDataCache&&e.eventDataCache.hasOwnProperty(t)?e.eventDataCache[t]:n();return e&&(e.eventDataCache=e.eventDataCache||{},e.eventDataCache[t]=r),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e&&e.eventDataCache&&(t&&e.eventDataCache.hasOwnProperty(t)?delete e.eventDataCache[t]:t||(e.eventDataCache={}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80);t.default=function(e){return!(0,r.default)(e)&&!!e.key&&1==e.key.length}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(21).Browser.isMac?function(e){return e.metaKey}:function(e){return e.ctrlKey};t.default=function(e){return r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=n(3),i=n(9),a=n(11),l=n(7),s=n(2),u=n(31),c=n(75),d=n(37),f=n(40),h=n(4),p=n(62),g=n(17),v=n(28),m=n(5),y=n(32),b=n(66),E=n(12),C=n(13),S=[function(e,t,n,r){var a,s,c=(0,l.default)(e,n.node);if(c){var d=(0,g.default)(e,"a[href]",null,1,(0,i.default)(n)).filter((function(e){return c.contains(e)}))[0];if(d&&(0,u.default)(d)&&(n=new h.default(d,-2),w(d),d=null),d&&(null===(a=t)||void 0===a?void 0:a.querySelector)&&(null===(s=t)||void 0===s?void 0:s.querySelector("a[href]"))){var f=n.normalize(),p=f.node.parentNode,m=3==f.node.nodeType?(0,v.default)(f.node,f.offset,!1):f.isAtEnd?f.node.nextSibling:f.node,y=e.ownerDocument.createTextNode("");for(p.insertBefore(y,m);(0,o.default)(d,y);)y=(0,C.splitBalancedNodeRange)(y);n=new h.default(y,-2),w(y)}}return n},function(e,t,n,r){var o,i,l,u=t;if(11==u.nodeType){var d=(0,m.default)(u.childNodes).filter((function(e){return"BR"!=(0,s.default)(e)}));u=1==d.length?d[0]:null}var f=(0,s.default)(u),p=f&&u&&"BR"==(0,s.default)(u.nextSibling),g=(0,a.default)(n.node,e,"LI"),v=g&&(0,a.default)(g,e,"OL,UL"),C=(0,a.default)(n.node,e,"TD,TH"),S=C&&(0,a.default)(C,e,"TR");"LI"==f&&(f=v?(0,s.default)(v):"UL",u=(0,E.default)(u,f));if("OL"!=f&&"UL"!=f||!u||"LI"!=(0,s.default)(u.firstChild)){if("TABLE"==f&&S){var P=new b.default(u),T=new b.default(C);0==T.col&&C==T.getCell(T.row||0,0).td&&(null===(o=P.cells)||void 0===o?void 0:o[0])&&P.cells[0].length==(null===(i=T.cells)||void 0===i?void 0:i[0].length)&&(0,c.default)(n,C)&&("TBODY"!=(0,s.default)(u.firstChild)||(null===(l=u.firstChild)||void 0===l?void 0:l.nextSibling)||(0,y.default)(u.firstChild),(0,y.default)(u),n=new h.default(S,-3))}}else{var O=!u.firstChild.nextSibling&&!p;p&&u.parentNode&&w(u.nextSibling),O?((0,y.default)(u.firstChild),(0,y.default)(u)):(0,s.default)(v)==f&&((0,y.default)(u),n=new h.default(g,(0,c.default)(n,g)?-2:-3))}return n},function(e,t,n,o){if("P"==(0,s.default)(n.node)){var i=n.normalize(),a=(0,r.default)(n.node,"div");i.node!=a&&(n=i)}return n},function(e,t,n,r){(0,d.default)(n.node)&&(n=new h.default(n.node,n.isAtEnd?-3:-2));return n},function(e,t,n,r){if(r&&r.collapsed){var o=new p.default(e,h.default.getStart(r)),i=o.getInlineElementBefore(),a=o.getInlineElementAfter();i instanceof f.default?n=new h.default(i.getContainerNode(),-3):a instanceof f.default&&(n=new h.default(a.getContainerNode(),-2))}return n}];function w(e){var t;null===(t=null==e?void 0:e.parentNode)||void 0===t||t.removeChild(e)}t.default=function(e,t,n,r){return S.forEach((function(o){n=o(e,t,n,r)})),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(43),o=n(72),i=n(71),a=n(48),l=n(73),s=n(4),u=n(17),c=n(1),d=n(28);function f(e,t,n){var r,o;if((0,c.default)(e,"Text")){var i=(0,d.default)(e,t,n);return n?[i,e]:[e,i]}var a=e.childNodes[t-1],l=e.childNodes[t];if(a||l||(n?a=(l=e).previousSibling:l=(a=e).nextSibling),(a||l)&&(!a||!l)){var s=e.ownerDocument.createTextNode("");null===(o=null===(r=a||l)||void 0===r?void 0:r.parentNode)||void 0===o||o.insertBefore(s,l),a?l=s:a=s}return[a,l]}t.default=function(e,t){var n=null,c=(0,u.default)(e,"table,tr",null,2,t),d=(0,i.default)(e,t,0).map((function(e){var t=(0,a.default)(e);if(!t)return null;var i=t.startContainer,l=t.endContainer,s=t.startOffset,u=f(l,t.endOffset,!1),d=u[0],h=u[1],p=f(i,s,!0),g=p[0],v=p[1];n=n||g;var m=(0,o.default)(e,[v,d]);return(0,r.default)(c,m),{region:e,beforeStart:g,afterEnd:h}})).filter((function(e){return!!e}));return c.forEach((function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})),d.forEach((function(e){e&&(0,l.default)(e.region,e.beforeStart,e.afterEnd)})),n&&new s.default(n,-1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.default=function(e){for(var t=r.default.createBodyTraverser(e),n=t&&t.currentBlockElement,o=[];n;)o.push(n.getTextContent()),n=t.getNextBlockElement();return o.join("\n")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachDomEvent=void 0;t.attachDomEvent=function(e,t){var n=Object.keys(t||{}).map((function(n){var r=function(e){var t={pluginEventType:null,beforeDispatch:null};"number"==typeof e?t.pluginEventType=e:"function"==typeof e?t.beforeDispatch=e:"object"==typeof e&&(t=e);return t}(t[n]),o=r.pluginEventType,i=r.beforeDispatch,a=function(t){i&&i(t),null!=o&&e.api.triggerEvent(e,{eventType:o,rawEvent:t},!1)};return e.contentDiv.addEventListener(n,a),function(){e.contentDiv.removeEventListener(n,a)}}));return function(){return n.forEach((function(e){return e()}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPasteFragment=void 0;var r=n(0);function o(e,t){(0,r.toArray)(e.querySelectorAll("style")).forEach(t)}t.createPasteFragment=function(e,t,n,i,a){var l,s;if(!t)return null;var u,c=function(e,t){return{eventType:10,clipboardData:t,fragment:e.contentDiv.ownerDocument.createDocumentFragment(),sanitizingOption:(0,r.createDefaultHtmlSanitizerOptions)(),htmlBefore:"",htmlAfter:"",htmlAttributes:{}}}(e,t),d=c.fragment,f=c.sanitizingOption,h=t.rawHtml,p=t.text,g=t.imageDataUri,v=e.contentDiv.ownerDocument;if(h&&(null===(l=u=(new DOMParser).parseFromString(e.trustedHTMLHandler(h),"text/html"))||void 0===l?void 0:l.body)){var m=null===(s=u.querySelector("html"))||void 0===s?void 0:s.attributes;(m?(0,r.toArray)(m):[]).reduce((function(e,t){return e[t.name]=t.value,e}),c.htmlAttributes),(0,r.toArray)(u.querySelectorAll("meta")).reduce((function(e,t){return e[t.name]=t.content,e}),c.htmlAttributes),t.htmlFirstLevelChildTags=[],null==u||u.body.normalize(),null==u||u.body.childNodes.forEach((function(e){if(e.nodeType==Node.TEXT_NODE&&!e.nodeValue.replace(/(\r\n|\r|\n)/gm,"").trim())return;var n=(0,r.getTagOfNode)(e);e.nodeType!=Node.COMMENT_NODE&&t.htmlFirstLevelChildTags.push(n)})),o(u,(function(e){u.head.appendChild(e),f.additionalGlobalStyleNodes.push(e)}));var y=h.indexOf("\x3c!--StartFragment--\x3e"),b=h.lastIndexOf("\x3c!--EndFragment--\x3e");y>=0&&b>=y+"\x3c!--StartFragment--\x3e".length&&(c.htmlBefore=h.substr(0,y),c.htmlAfter=h.substr(b+"\x3c!--EndFragment--\x3e".length),t.html=h.substring(y+"\x3c!--StartFragment--\x3e".length,b),u.body.innerHTML=e.trustedHTMLHandler(t.html),o(u.body,(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})))}if(i||p||!g)if(!i&&h&&u&&u.body){if((0,r.moveChildNodes)(d,u.body),a&&n){var E=function(e,t){var n=e.api.getPendableFormatState(e,!0),r=e.api.getStyleBasedFormatState(e,t);return{fontFamily:r.fontName,fontSize:r.fontSize,textColor:r.textColor,backgroundColor:r.backgroundColor,textColors:r.textColors,backgroundColors:r.backgroundColors,bold:n.isBold,italic:n.isItalic,underline:n.isUnderline}}(e,n.node);(0,r.applyTextStyle)(d,(function(e){return(0,r.applyFormat)(e,E)}))}}else p&&p.split("\n").forEach((function(e,t,n){e=e.replace(/^ /g," ").replace(/\r/g,"").replace(/ {2}/g,"  ");var o=v.createTextNode(e);2==n.length&&0==t?(d.appendChild(o),d.appendChild(v.createElement("br"))):t>0&&t<n.length-1?d.appendChild((0,r.wrap)(""==e?v.createElement("br"):o)):d.appendChild(o)}));else{var C=v.createElement("img");C.style.maxWidth="100%",C.src=g,d.appendChild(C)}e.api.triggerEvent(e,c,!0);var S=new r.HtmlSanitizer(c.sanitizingOption);return S.convertGlobalCssToInlineCss(d),S.sanitize(d,n&&(0,r.getInheritableStyles)(n.element)),d}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureTypeInContainer=void 0;var r=n(0);t.ensureTypeInContainer=function(e,t,n){t=t.normalize();var o,i=(0,r.getBlockElementAtNode)(e.contentDiv,t.node);if(i){o=i.collapseToSingleElement();var a=(0,r.isNodeEmpty)(o)||n&&function(e,t){return(0,r.safeInstanceOf)(e.target,"Node")&&e.target.contains(t)&&e.key===t.innerText}(n,o);o=o&&a?o:null}else o=(0,r.createElement)(1,e.contentDiv.ownerDocument),e.api.insertNode(e,o,{position:1,updateCursor:!1,replaceSelection:!1,insertOnNewLine:!1}),t=new r.Position(o.firstChild,0);o&&(0,r.applyFormat)(o,e.lifecycle.defaultFormat,e.lifecycle.isDarkMode),n&&e.api.selectRange(e,(0,r.createRange)(t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.focus=void 0;var r=n(0);t.focus=function(e){if(!e.lifecycle.shadowEditFragment){if(!(e.api.hasFocus(e)&&e.api.getSelectionRange(e,!1)||e.domEvent.selectionRange&&e.api.selectRange(e,e.domEvent.selectionRange,!0))){var t=(0,r.getFirstLeafNode)(e.contentDiv)||e.contentDiv;e.api.selectRange(e,(0,r.createRange)(t,0),!0)}e.domEvent.selectionRange=null,e.api.hasFocus(e)||e.contentDiv.focus()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContent=void 0;var r=n(0);t.getContent=function(e,t){var n="",o=0==t,i=2==t,a=e.lifecycle.shadowEditFragment||e.contentDiv;if(4==t)n=a.textContent;else if(3==t)n=(0,r.getTextContent)(a);else if(o||e.lifecycle.isDarkMode){var l=function(e){var t;(0,r.safeInstanceOf)(e,"DocumentFragment")?(t=e.ownerDocument.createElement("div")).appendChild(e.cloneNode(!0)):t=e.cloneNode(!0);return t}(a);l.normalize();var s=e.api.getSelectionRange(e,!0),u=i?e.lifecycle.shadowEditFragment?e.lifecycle.shadowEditSelectionPath:s?(0,r.getSelectionPath)(e.contentDiv,s):null:null,c=u&&(0,r.createRange)(l,u.start,u.end);e.lifecycle.isDarkMode&&e.api.transformColor(e,l,!1,null,1),o?(e.api.triggerEvent(e,{eventType:8,clonedRoot:l},!0),n=l.innerHTML):n=c?(0,r.getHtmlWithSelectionPath)(l,c):l.innerHTML}else n=(0,r.getHtmlWithSelectionPath)(a,i&&e.api.getSelectionRange(e,!0));return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPendableFormatState=void 0;var r=n(0);t.getPendableFormatState=function(e,t){var n,a=e.api.getSelectionRange(e,!0),l=e.pendingFormatState.pendableFormatState,s=null===(n=e.pendingFormatState.pendableFormatPosition)||void 0===n?void 0:n.normalize(),u=a&&r.Position.getStart(a).normalize(),c=u&&a.collapsed&&u.equalTo(s);return a&&l&&c&&!t?l:u?function(e,t){var n=t.node,a={},l=[],s=function(){var e=(0,r.getTagOfNode)(n),t=1==n.nodeType&&n.style;e&&t&&Object.keys(o).forEach((function(n){l.indexOf(n)>=0||(a[n]=a[n]||o[n](e,t),i[n](t)&&l.push(n))})),n=n.parentNode};for(;(0,r.contains)(e.contentDiv,n);)s();return a}(e,u):{}};var o={isBold:function(e,t){return"B"==e||"STRONG"==e||parseInt(t.fontWeight)>=700||["bold","bolder"].indexOf(t.fontWeight)>=0},isUnderline:function(e,t){return"U"==e||t.textDecoration.indexOf("underline")>=0},isItalic:function(e,t){return"I"==e||"EM"==e||"italic"===t.fontStyle},isSubscript:function(e,t){return"SUB"==e||"sub"===t.verticalAlign},isSuperscript:function(e,t){return"SUP"==e||"super"===t.verticalAlign},isStrikeThrough:function(e,t){return"S"==e||"STRIKE"==e||t.textDecoration.indexOf("line-through")>=0}},i={isBold:function(e){return""!==e.fontWeight&&parseInt(e.fontWeight)<700||"normal"===e.fontWeight},isUnderline:function(e){return""!==e.textDecoration&&e.textDecoration.indexOf("underline")<0},isItalic:function(e){return""!==e.fontStyle&&"italic"!==e.fontStyle},isSubscript:function(e){return""!==e.verticalAlign&&"sub"!==e.verticalAlign},isSuperscript:function(e){return""!==e.verticalAlign&&"super"!==e.verticalAlign},isStrikeThrough:function(e){return""!==e.textDecoration&&e.textDecoration.indexOf("line-through")<0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionRange=void 0;var r=n(0);t.getSelectionRange=function(e,t){var n,o=null;if(e.lifecycle.shadowEditFragment)return o=e.lifecycle.shadowEditSelectionPath&&(0,r.createRange)(e.contentDiv,e.lifecycle.shadowEditSelectionPath.start,e.lifecycle.shadowEditSelectionPath.end);if(!t||e.api.hasFocus(e)){var i=null===(n=e.contentDiv.ownerDocument.defaultView)||void 0===n?void 0:n.getSelection();if(i&&i.rangeCount>0){var a=i.getRangeAt(0);(0,r.contains)(e.contentDiv,a)&&(o=a)}}return!o&&t&&(o=e.domEvent.selectionRange),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionRangeEx=void 0;var r=n(0);function o(e){return{type:0,ranges:e,areAllCollapsed:i(e)}}function i(e){return e.filter((function(e){return null==e?void 0:e.collapsed})).length==e.length}t.getSelectionRangeEx=function(e){var t,n;if(e.lifecycle.shadowEditFragment){var a=e.lifecycle,l=a.shadowEditTableSelectionPath,s=a.shadowEditSelectionPath;if((null==l?void 0:l.length)>0){var u=e.lifecycle.shadowEditTableSelectionPath.map((function(t){return(0,r.createRange)(e.contentDiv,t.start,t.end)}));return{type:1,ranges:u,areAllCollapsed:i(u),table:(0,r.findClosestElementAncestor)(u[0].startContainer,e.contentDiv,"table"),coordinates:null}}var c=s&&(0,r.createRange)(e.contentDiv,s.start,s.end);return o(c?[c]:[])}if(e.api.hasFocus(e)){if(e.domEvent.tableSelectionRange)return e.domEvent.tableSelectionRange;var d=null===(t=e.contentDiv.ownerDocument.defaultView)||void 0===t?void 0:t.getSelection();if(d&&d.rangeCount>0){var f=d.getRangeAt(0);if((0,r.contains)(e.contentDiv,f))return o([f])}}return null!==(n=e.domEvent.tableSelectionRange)&&void 0!==n?n:o(e.domEvent.selectionRange?[e.domEvent.selectionRange]:[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStyleBasedFormatState=void 0;var r=n(0);t.getStyleBasedFormatState=function(e,t){if(!t)return{};var n=t?(0,r.getComputedStyles)(t):[],o=e.lifecycle.isDarkMode,i=e.contentDiv,a=o&&(0,r.findClosestElementAncestor)(t,i,"[data-ogsc],[data-ogac]"),l=o&&(0,r.findClosestElementAncestor)(t,i,"[data-ogsb],[data-ogab]");return{fontName:n[0],fontSize:n[1],textColor:n[2],backgroundColor:n[3],textColors:a?{darkModeColor:n[2],lightModeColor:a.dataset.ogsc||a.dataset.ogac}:void 0,backgroundColors:l?{darkModeColor:n[3],lightModeColor:l.dataset.ogsb||l.dataset.ogab}:void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertNode=void 0;var r=n(0);t.insertNode=function(e,t,n){n=n||{position:3,insertOnNewLine:!1,updateCursor:!0,replaceSelection:!0};var o=e.contentDiv;return n.updateCursor&&e.api.focus(e),4==n.position?(o.parentNode.insertBefore(t,o.nextSibling),!0):(e.api.transformColor(e,t,!0,(function(){switch(n.position){case 0:case 1:var i,a=0==n.position,l=(0,r.getFirstLastBlockElement)(o,a);if(l){var s=a?l.getStartNode():l.getEndNode();n.insertOnNewLine||3==s.nodeType||(0,r.isVoidHtmlElement)(s)?(0,r.safeInstanceOf)(t,"DocumentFragment")?(i=(0,r.toArray)(t.childNodes),s.parentNode.insertBefore(t,a?s:s.nextSibling)):i=s.parentNode.insertBefore(t,a?s:s.nextSibling):i=s.insertBefore(t,a?s.firstChild:null)}else i=o.appendChild(t);if(i&&n.insertOnNewLine){var u=Array.isArray(i)?i:[i];(0,r.isBlockElement)(u[0])&&(0,r.isBlockElement)(u[u.length-1])||(0,r.wrap)(u)}break;case 2:var c=o.appendChild(t);c&&n.insertOnNewLine&&!(0,r.isBlockElement)(c)&&(0,r.wrap)(c);break;case 5:case 3:var d=function(e,t){var n=e.api.getSelectionRange(e,!0),r=null;return 5==t.position?(r=n,n=t.range):n&&(r=n.cloneRange()),{range:n,rangeToRestore:r}}(e,n),f=d.range,h=d.rangeToRestore;if(!f)return;n.replaceSelection&&!f.collapsed&&f.deleteContents();var p=r.Position.getStart(f),g=void 0;p=n.insertOnNewLine&&(g=(0,r.getBlockElementAtNode)(o,p.normalize().node))?new r.Position(g.getEndNode(),-3):(0,r.adjustInsertPosition)(o,t,p,f);var v=11==t.nodeType?t.lastChild:t;(f=(0,r.createRange)(p)).insertNode(t),n.updateCursor&&v&&(h=(0,r.createRange)(new r.Position(v,-3).normalize())),e.api.selectRange(e,h)}}),0),!0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.restoreUndoSnapshot=void 0;t.restoreUndoSnapshot=function(e,t){e.undo.hasNewContent&&t<0&&e.api.addUndoSnapshot(e,null,null,!1);var n=e.undo.snapshotsService.move(t);if(n&&null!=n.html)try{e.undo.isRestoring=!0,e.api.setContent(e,n.html,!0,n.metadata)}finally{e.undo.isRestoring=!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectRange=void 0;var r=n(81),o=n(0);t.selectRange=function(e,t,n){return!(e.lifecycle.shadowEditSelectionPath||!(0,o.contains)(e.contentDiv,t))&&((0,o.addRangeToSelection)(t,n),(0,r.hasFocus)(e)||(e.domEvent.selectionRange=t),t.collapsed&&function(e){var t=e.contentDiv,n=e.pendingFormatState,r=e.api.getSelectionRange;if(n.pendableFormatState){var i=t.ownerDocument,a=(0,o.getPendableFormatState)(i);Object.keys(o.PendableFormatCommandMap).forEach((function(e){!!n.pendableFormatState[e]!=a[e]&&i.execCommand(o.PendableFormatCommandMap[e],!1,null)}));var l=r(e,!0);n.pendableFormatPosition=l&&o.Position.getStart(l)}}(e),!0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectTable=void 0;var r=n(0);function o(e,t){if(e&&!e.id){for(var n=e.ownerDocument,r=function(e){return e.getElementById(t+o)},o=0,i=r(n);i;)i=r(n),o++;e.id=t+o}}function i(e,t,n,r,o,i){return e+" #"+t+n+" tr:nth-child("+r+")>"+o+":nth-child("+i+")"}function a(e){if(e){var t=(0,r.getStyles)(e),n=0;["background-color","background"].forEach((function(e){var r;if((null===(r=t[e])||void 0===r?void 0:r.indexOf("!important"))>-1){var o=t[e].indexOf("!");t[e]=t[e].substring(0,o),n++}})),n>0&&(0,r.setStyles)(e,t)}}function l(e){return(!!e||0==e)&&e>-1}t.selectTable=function(e,t,n){if(function(e){var t,n=e.contentDiv,r=n.ownerDocument.getElementById("tableStyle"+n.id);if(null===(t=null==r?void 0:r.sheet)||void 0===t?void 0:t.cssRules)for(;r.sheet.cssRules.length>0;)r.sheet.deleteRule(0)}(e),function(e){if(e){var t=e||{},n=t.firstCell,r=t.lastCell;if(n&&r){var o=function(e){return l(e.x)&&l(e.y)};return o(n)&&o(r)}}return!1}(n)&&t){o(t,"tableSelected"),o(e.contentDiv,"contentDiv_");var s=function(e,t,n){var o=e.contentDiv.ownerDocument,l="#"+e.contentDiv.id,s=function(e,t,n){var o=t.firstCell.y,l=t.firstCell.x,s=t.lastCell.y,u=t.lastCell.x,c=[],d=null,f=null,h="",p=!0,g=new r.VTable(e),v=(0,r.toArray)(e.childNodes).filter((function(e){return["THEAD","TBODY","TFOOT"].indexOf((0,r.getTagOfNode)(e))>-1})),m=0,y=v.map((function(e){var t={el:(0,r.getTagOfNode)(e),start:m,end:e.childNodes.length+m};return m=t.end,t}));return g.cells.forEach((function(t,g){var v=0,m=0;d=null,f=null;for(var b=y.filter((function(e){return e.start<=g&&e.end>g}))[0],E=b?">"+b.el+">":">",C=b&&g+1>=b.start?g+1-b.start:g+1,S=0;S<t.length;S++)if(t[S].td){var w=(0,r.getTagOfNode)(t[S].td);if("TD"==w&&v++,"TH"==w&&m++,g>=o&&g<=s&&S>=l&&S<=u){p?p=!1:h.endsWith(",")||(h+=","),a(t[S].td);var P=i(n,e.id,E,C,w,"TD"==w?v:m);h+=P,d=d||e.querySelector(P),f=e.querySelector(P)}}if(d&&f){var T=new Range;T.setStartBefore(d),T.setEndAfter(f),c.push(T)}})),{css:h+="{background-color: rgba(198,198,198,0.7) !important;}",ranges:c}}(t,n,l),u=s.css,c=s.ranges,d=o.getElementById("tableStyle"+e.contentDiv.id);d||(d=o.createElement("style"),o.head.appendChild(d),d.id="tableStyle"+e.contentDiv.id);return d.sheet.insertRule(u),c}(e,t,n);return function(e,t){var n=t.firstCell;return!(e.rows.item(n.y)&&e.rows.item(n.y).cells.item(n.x))}(t,n)||e.api.selectRange(e,(0,r.createRange)(new r.Position(t.rows.item(n.firstCell.y).cells.item(n.firstCell.x),0))),{type:1,ranges:s,table:t,areAllCollapsed:s.filter((function(e){return null==e?void 0:e.collapsed})).length==s.length,coordinates:n}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setContent=void 0;var r=n(0),o=n(0);t.setContent=function(e,t,n,i){var a=!1;if(e.contentDiv.innerHTML!=t){e.api.triggerEvent(e,{eventType:20,newContent:t},!0);var l=(0,o.setHtmlWithMetadata)(e.contentDiv,t,e.trustedHTMLHandler);(function(e,t){switch(null==t?void 0:t.type){case 0:var n=(0,r.createRange)(e.contentDiv,t.start,t.end);e.api.selectRange(e,n);break;case 1:var o=(0,r.queryElements)(e.contentDiv,"#"+t.tableId)[0];o&&e.api.selectTable(e,o,t)}})(e,i=i||l),a=!0}var s=e.lifecycle.isDarkMode;(!i&&s||i&&!!i.isDarkMode!=!!s)&&(e.api.transformColor(e,e.contentDiv,!1,null,s?0:1,!0),a=!0),n&&a&&e.api.triggerEvent(e,{eventType:7,source:"SetContent"},!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchShadowEdit=void 0;var r=n(0);t.switchShadowEdit=function(e,t){var n=e.lifecycle,o=e.contentDiv,i=n.shadowEditFragment,a=n.shadowEditSelectionPath,l=n.shadowEditTableSelectionPath,s=!!i;if(t){if(!s){var u=e.api.getSelectionRangeEx(e),c=e.api.getSelectionRange(e,!0);a=c&&(0,r.getSelectionPath)(o,c),l=1==(null==u?void 0:u.type)&&u.ranges.map((function(e){return(0,r.getSelectionPath)(o,e)})),i=e.contentDiv.ownerDocument.createDocumentFragment(),(0,r.moveChildNodes)(i,o),i.normalize(),e.api.triggerEvent(e,{eventType:17,fragment:i,selectionPath:a},!1),n.shadowEditFragment=i,n.shadowEditSelectionPath=a,n.shadowEditTableSelectionPath=l}(0,r.moveChildNodes)(o),o.appendChild(n.shadowEditFragment.cloneNode(!0))}else if(n.shadowEditFragment=null,n.shadowEditSelectionPath=null,s&&(e.api.triggerEvent(e,{eventType:18},!1),(0,r.moveChildNodes)(o),o.appendChild(i),e.api.focus(e),a&&e.api.selectRange(e,(0,r.createRange)(o,a.start,a.end)),e.domEvent.tableSelectionRange)){var d=e.domEvent.tableSelectionRange,f=d.table,h=d.coordinates,p=f.id,g=e.contentDiv.querySelector("#"+p);f&&(e.domEvent.tableSelectionRange=e.api.selectTable(e,g,h))}}},function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.transformColor=void 0;var i=n(0),a=[(r={},r[0]="color",r[1]="color",r[2]="ogsc",r[3]="ogac",r),(o={},o[0]="background-color",o[1]="bgcolor",o[2]="ogsb",o[3]="ogab",o)];function l(e,t){return e&&"undefined"!=e&&"null"!=e?e:t}function s(e){var t=e;return!!t.style&&!!t.dataset}t.transformColor=function(e,t,n,r,o,u){var c=u||e.lifecycle.isDarkMode?function(e,t){var n=[];if((0,i.safeInstanceOf)(e,"HTMLElement")){t&&n.push(e);var r=e.getElementsByTagName("*");(0,i.arrayPush)(n,(0,i.toArray)(r))}else if((0,i.safeInstanceOf)(e,"DocumentFragment")){r=e.querySelectorAll("*");(0,i.arrayPush)(n,(0,i.toArray)(r))}return n.filter(s)}(t,n):[];null==r||r(),1==o?function(e){e.forEach((function(e){a.forEach((function(t){e.style.setProperty(t[0],l(e.dataset[t[2]],"")),delete e.dataset[t[2]];var n=e.dataset[t[3]];l(n,null)?e.setAttribute(t[1],n):e.removeAttribute(t[1]),delete e.dataset[t[3]]}))}))}(c):e.lifecycle.onExternalContentTransform?c.forEach((function(t){return e.lifecycle.onExternalContentTransform(t)})):function(e,t){a.forEach((function(n){e.map((function(e){var r=e.style.getPropertyValue(n[0]),o=e.getAttribute(n[1]);return e.dataset[n[2]]||e.dataset[n[3]]||!r&&!o||"inherit"==r?null:{element:e,styleColor:r,attrColor:o,newColor:t(r||o)}})).filter((function(e){return!!e})).forEach((function(e){var t=e.element,r=e.styleColor,o=e.attrColor,i=e.newColor;t.style.setProperty(n[0],i,"important"),t.dataset[n[2]]=r||"",o&&(t.setAttribute(n[1],i),t.dataset[n[3]]=o)}))}))}(c,e.lifecycle.getDarkColor)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.triggerEvent=void 0;var r=[11,12,8,21];t.triggerEvent=function(e,t,n){e.lifecycle.shadowEditFragment&&!(r.indexOf(t.eventType)>=0)||!n&&e.plugins.some((function(e){return function(e,t){var n;if(t.onPluginEvent&&(null===(n=t.willHandleEventExclusively)||void 0===n?void 0:n.call(t,e)))return t.onPluginEvent(e),!0;return!1}(t,e)}))||e.plugins.forEach((function(e){e.onPluginEvent&&e.onPluginEvent(t)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPluginState=void 0;var r=n(164),o=n(165),i=n(166),a=n(167),l=n(168),s=n(169),u=n(170),c=n(171),d=n(172),f=n(173);t.default=function(e,t){var n=t.corePluginOverride||{};return{typeInContainer:n.typeInContainer||new d.default,edit:n.edit||new i.default,pendingFormatState:n.pendingFormatState||new c.default,_placeholder:null,typeAfterLink:null,undo:n.undo||new f.default(t),domEvent:n.domEvent||new o.default(t,e),mouseUp:n.mouseUp||new s.default,copyPaste:n.copyPaste||new r.default(t),entity:n.entity||new a.default,normalizeTable:n.normalizeTable||new u.default,lifecycle:n.lifecycle||new l.default(t,e)}},t.getPluginState=function(e){return{domEvent:e.domEvent.getState(),pendingFormatState:e.pendingFormatState.getState(),edit:e.edit.getState(),lifecycle:e.lifecycle.getState(),undo:e.undo.getState(),entity:e.entity.getState(),copyPaste:e.copyPaste.getState()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e){var t=this;this.onPaste=function(e){var n;(0,r.extractClipboardEvent)(e,(function(e){return t.editor.paste(e)}),{allowLinkPreview:t.editor.isFeatureEnabled("PasteWithLinkPreview"),allowedCustomPasteType:t.state.allowedCustomPasteType,getTempDiv:function(){return n=t.editor.getSelectionRange(),t.getTempDiv()},removeTempDiv:function(e){t.cleanUpAndRestoreSelection(e,n,!1)}})},this.state={allowedCustomPasteType:e.allowedCustomPasteType||[]}}return e.prototype.getName=function(){return"CopyPaste"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.disposer=this.editor.addDomEventHandler({paste:this.onPaste,copy:function(e){return t.onCutCopy(e,!1)},cut:function(e){return t.onCutCopy(e,!0)}})},e.prototype.dispose=function(){this.disposer(),this.disposer=null,this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onCutCopy=function(e,t){var n=this,o=this.editor.getSelectionRangeEx();if(o&&!o.areAllCollapsed){var i=this.editor.getContent(2),a=this.getTempDiv(!0),l=(0,r.setHtmlWithSelectionPath)(a,i,this.editor.getTrustedHTMLHandler());l&&(0,r.addRangeToSelection)(l),this.editor.triggerPluginEvent(9,{clonedRoot:a,range:l,rawEvent:e,isCut:t}),this.editor.runAsync((function(e){n.cleanUpAndRestoreSelection(a,o,!t),t&&e.addUndoSnapshot((function(){var t=n.editor.deleteSelectedContent();e.focus(),e.select(t)}),"Cut")}))}},e.prototype.getTempDiv=function(e){var t=this,n=this.editor.getCustomData("CopyPasteTempDiv",(function(){var e=(0,r.createElement)(3,t.editor.getDocument());return t.editor.insertNode(e,{position:4}),e}),(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)}));return e&&(n.style.backgroundColor="white",n.style.color="black"),n.style.display="",n.focus(),n},e.prototype.cleanUpAndRestoreSelection=function(e,t,n){var o,i;if((null===(o=t)||void 0===o?void 0:o.type)||0==t.type){var a=t;switch(a.type){case 1:this.editor.select(a.table,a.coordinates);break;case 0:var l=null===(i=a.ranges)||void 0===i?void 0:i[0];this.restoreRange(l,n)}}else this.restoreRange(t,n);e.style.backgroundColor="",e.style.color="",e.style.display="none",(0,r.moveChildNodes)(e)},e.prototype.restoreRange=function(e,t){e&&(t&&r.Browser.isAndroid&&e.collapse(),this.editor.select(e))},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e,t){var n,o=this;this.onDrop=function(e){o.editor.runAsync((function(e){e.addUndoSnapshot((function(){}),"Drop")}))},this.onFocus=function(){var e=o.state.tableSelectionRange||{},t=e.table,n=e.coordinates;t&&n?o.editor.select(t,n):o.editor.select(o.state.selectionRange),o.state.selectionRange=null},this.onKeyDownDocument=function(e){9!=e.which||e.defaultPrevented||o.cacheSelection()},this.onMouseDownDocument=function(e){o.state.selectionRange||o.editor.contains(e.target)||o.cacheSelection()},this.cacheSelection=function(){o.state.selectionRange||(o.state.selectionRange=o.editor.getSelectionRange(!1))},this.onScroll=function(e){o.editor.triggerPluginEvent(14,{rawEvent:e,scrollContainer:o.state.scrollContainer})},this.onKeyboardEvent=function(e){(0,r.isCharacterValue)(e)&&e.stopPropagation()},this.onInputEvent=function(e){e.stopPropagation()},this.onContextMenuEvent=function(e){var t=[],n=o.editor.getContentSearcherOfCursor(),i=null==n?void 0:n.getInlineElementBefore(),a=e.target;2!=e.button&&(a=null==i?void 0:i.getContainerNode()),o.state.contextMenuProviders.forEach((function(e){var n=e.getContextMenuItems(a);(null==n?void 0:n.length)>0&&(t.length>0&&t.push(null),(0,r.arrayPush)(t,n))})),o.editor.triggerPluginEvent(16,{rawEvent:e,items:t})},this.state={isInIME:!1,scrollContainer:e.scrollContainer||t,selectionRange:null,stopPrintableKeyboardEventPropagation:!e.allowKeyboardEventPropagation,contextMenuProviders:(null===(n=e.plugins)||void 0===n?void 0:n.filter(i))||[],tableSelectionRange:null}}return e.prototype.getName=function(){return"DOMEvent"},e.prototype.initialize=function(e){var t,n,o,i,a=this;this.editor=e;var l=this.editor.getDocument(),s=((t={keypress:this.getEventHandler(1),keydown:this.getEventHandler(0),keyup:this.getEventHandler(2),mousedown:5,contextmenu:this.onContextMenuEvent,compositionstart:function(){return a.state.isInIME=!0},compositionend:function(t){a.state.isInIME=!1,e.triggerPluginEvent(4,{rawEvent:t})},drop:this.onDrop,focus:this.onFocus})[r.Browser.isIE?"textinput":"input"]=this.getEventHandler(3),t);r.Browser.isSafari?(l.addEventListener("mousedown",this.onMouseDownDocument,!0),l.addEventListener("keydown",this.onKeyDownDocument),null===(n=l.defaultView)||void 0===n||n.addEventListener("blur",this.cacheSelection)):s[r.Browser.isIEOrEdge?"beforedeactivate":"blur"]=this.cacheSelection,this.disposer=e.addDomEventHandler(s),this.state.scrollContainer.addEventListener("scroll",this.onScroll),null===(o=l.defaultView)||void 0===o||o.addEventListener("scroll",this.onScroll),null===(i=l.defaultView)||void 0===i||i.addEventListener("resize",this.onScroll)},e.prototype.dispose=function(){var e,t,n,o=this.editor.getDocument();r.Browser.isSafari&&(o.removeEventListener("mousedown",this.onMouseDownDocument,!0),o.removeEventListener("keydown",this.onKeyDownDocument),null===(e=o.defaultView)||void 0===e||e.removeEventListener("blur",this.cacheSelection)),null===(t=o.defaultView)||void 0===t||t.removeEventListener("resize",this.onScroll),null===(n=o.defaultView)||void 0===n||n.removeEventListener("scroll",this.onScroll),this.state.scrollContainer.removeEventListener("scroll",this.onScroll),this.disposer(),this.disposer=null,this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.getEventHandler=function(e){return this.state.stopPrintableKeyboardEventPropagation?{pluginEventType:e,beforeDispatch:3==e?this.onInputEvent:this.onKeyboardEvent}:e},e}();function i(e){var t;return!!(null===(t=e)||void 0===t?void 0:t.getContextMenuItems)}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(){this.state={features:{}}}return e.prototype.getName=function(){return"Edit"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){var t,n=!1,o=!1;if(0==e.eventType){var i=e.rawEvent,a=this.editor.getSelectionRange();n=(o=(0,r.isCtrlOrMetaPressed)(i))||i.altKey,t=this.state.features[i.which]||a&&!a.collapsed&&this.state.features[258]}else 7==e.eventType&&(t=this.state.features[257]);for(var l=0;l<(null==t?void 0:t.length);l++){var s=t[l];if((s.allowFunctionKeys||!n)&&s.shouldHandleEvent(e,this.editor,o)){s.handleEvent(e,this.editor);break}}},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=/_(\d{1,8})$/,i=["^_Entity$","^_EId_","^_EType_","^_EReadonly_"],a=[6,7,4,5],l=function(){function e(){var e=this;this.handleCutEvent=function(t){var n=e.editor.getSelectionRange();n&&!n.collapsed&&e.checkRemoveEntityForRange(t)},this.state={knownEntityElements:[],shadowEntityCache:{}}}return e.prototype.getName=function(){return"Entity"},e.prototype.initialize=function(e){this.editor=e},e.prototype.willHandleEventExclusively=function(e){var t;return 1==e.eventType&&!!(null===(t=e.rawEvent.target)||void 0===t?void 0:t.shadowRoot)},e.prototype.dispose=function(){this.editor=null,this.state.knownEntityElements=[]},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 6:this.handleMouseUpEvent(e);break;case 0:this.handleKeyDownEvent(e.rawEvent);break;case 9:e.isCut&&this.handleCutEvent(e.rawEvent);break;case 10:this.handleBeforePasteEvent(e.sanitizingOption);break;case 7:this.handleContentChangedEvent(e);break;case 11:this.handleContentChangedEvent();break;case 8:this.handleExtractContentWithDomEvent(e.clonedRoot);break;case 16:this.handleContextMenuEvent(e.rawEvent);break;case 20:this.handleBeforeSetContentEvent();break;case 15:this.handleEntityOperationEvent(e)}},e.prototype.handleContextMenuEvent=function(e){var t=e.target,n=t&&this.editor.getElementAtCursor((0,r.getEntitySelector)(),t);n&&(e.preventDefault(),this.triggerEvent(n,2,e))},e.prototype.handleMouseUpEvent=function(e){var t,n=e.rawEvent,o=e.isClicking,i=n.target;o&&i&&(t=this.editor.getElementAtCursor((0,r.getEntitySelector)(),i))&&(this.triggerEvent(t,1,n),s(this.editor))},e.prototype.handleKeyDownEvent=function(e){if((0,r.isCharacterValue)(e)||8==e.which||46==e.which||13==e.which){var t=this.editor.getSelectionRange();t&&!t.collapsed&&this.checkRemoveEntityForRange(e)}},e.prototype.handleBeforePasteEvent=function(e){this.editor.getSelectionRange().collapsed||this.checkRemoveEntityForRange(null),(0,r.arrayPush)(e.additionalAllowedCssClasses,i)},e.prototype.handleBeforeSetContentEvent=function(){this.cacheShadowEntities(this.state.shadowEntityCache)},e.prototype.handleContentChangedEvent=function(e){for(var t=this,n=this.state.knownEntityElements.length-1;n>=0;n--){var o=this.state.knownEntityElements[n];this.editor.contains(o)||(this.setIsEntityKnown(o,!1),o.shadowRoot&&this.triggerEvent(o,10))}var i=this.state.knownEntityElements.map((function(e){var t;return null===(t=(0,r.getEntityFromElement)(e))||void 0===t?void 0:t.id})).filter((function(e){return!!e}));("InsertEntity"==(null==e?void 0:e.source)&&e.data?[e.data]:this.getExistingEntities().filter((function(e){var n=e.wrapper;return!t.isEntityKnown(n)}))).forEach((function(e){var n=e.wrapper,o=e.type,a=e.id,l=e.isReadonly;e.id=t.ensureUniqueId(o,a,i),(0,r.commitEntity)(n,o,l,e.id),t.handleNewEntity(e)})),Object.keys(this.state.shadowEntityCache).forEach((function(e){t.triggerEvent(t.state.shadowEntityCache[e],6),delete t.state.shadowEntityCache[e]}))},e.prototype.handleEntityOperationEvent=function(e){var t,n=this;a.indexOf(e.operation)>=0&&(null===(t=this.cancelAsyncRun)||void 0===t||t.call(this),this.cancelAsyncRun=this.editor.runAsync((function(){n.cancelAsyncRun=null,n.handleContentChangedEvent()})))},e.prototype.handleExtractContentWithDomEvent=function(e){var t=this;(0,r.toArray)(e.querySelectorAll((0,r.getEntitySelector)())).forEach((function(e){e.removeAttribute("contentEditable"),t.triggerEvent(e,8)}))},e.prototype.checkRemoveEntityForRange=function(e){var t=this,n=[],o=(0,r.getEntitySelector)();if(this.editor.queryElements(o,1,(function(r){r.isContentEditable?n.push(r):t.triggerEvent(r,6,e)})),n.length>0){var i=this.editor.queryElements(o,2);n.forEach((function(n){var r=i.indexOf(n)>=0;t.triggerEvent(n,r?6:7,e)}))}},e.prototype.triggerEvent=function(e,t,n,o){var i=e&&(0,r.getEntityFromElement)(e);i&&this.editor.triggerPluginEvent(15,{operation:t,rawEvent:n,entity:i,contentForShadowEntity:o})},e.prototype.handleNewEntity=function(e){var t=e.wrapper,n=this.editor.getDocument().createDocumentFragment(),o=this.state.shadowEntityCache[e.id];if(delete this.state.shadowEntityCache[e.id],(null==o?void 0:o.shadowRoot)&&(0,r.moveChildNodes)(n,o.shadowRoot),this.triggerEvent(t,0,void 0,n),n.firstChild)t.shadowRoot?(0,r.moveChildNodes)(t.shadowRoot,n):this.createShadowRoot(t,n);else if(t.shadowRoot){this.triggerEvent(t,10);var i=t.cloneNode();(0,r.moveChildNodes)(i,t),this.editor.replaceNode(t,i),e.wrapper=i}this.setIsEntityKnown(e.wrapper,!0)},e.prototype.getExistingEntities=function(e){return this.editor.queryElements((0,r.getEntitySelector)()).map(r.getEntityFromElement).filter((function(t){return!(!t||e&&!t.wrapper.shadowRoot)}))},e.prototype.createShadowRoot=function(e,t){if(e.attachShadow){var n=e.attachShadow({mode:"open",delegatesFocus:!0});return e.contentEditable="false",this.triggerEvent(e,9),(0,r.moveChildNodes)(n,t),n}},e.prototype.cacheShadowEntities=function(e){this.getExistingEntities(!0).forEach((function(t){var n=t.wrapper,r=t.id;e[r]=n}))},e.prototype.ensureUniqueId=function(e,t,n){for(var r=o.exec(t),i=(r?t.substr(0,t.length-r[0].length):t)||e,a="",l=r&&parseInt(r[1])||0;;l++)if(a=l>0?i+"_"+l:i,n.indexOf(a)<0){n.push(a);break}return a},e.prototype.setIsEntityKnown=function(e,t){var n=this.state.knownEntityElements.indexOf(e);t&&n<0?this.state.knownEntityElements.push(e):!t&&n>=0&&this.state.knownEntityElements.splice(n,1)},e.prototype.isEntityKnown=function(e){return this.state.knownEntityElements.indexOf(e)>=0},e}();t.default=l;var s=r.Browser.isIE?function(e){e.runAsync((function(e){var t=e.getCustomData("ENTITY_IE_FOCUS_BUTTON",(function(){var t=(0,r.createElement)({tag:"button",style:"overflow:hidden;position:fixed;width:0;height:0;top:-1000px"},e.getDocument());return t.onblur=function(){t.style.display="none"},e.insertNode(t,{position:4}),t}));t.style.display="",(0,r.addRangeToSelection)((0,r.createRange)(t,0))}))}:function(){}},function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=i.Browser.isFirefox?((r={}).enableObjectResizing=!1,r.enableInlineTableEditing=!1,r):i.Browser.isIE?((o={}).defaultParagraphSeparator="div",o.AutoUrlDetect=!1,o):{},l={darkModeColor:"rgb(51,51,51)",lightModeColor:"rgb(255,255,255)"},s={darkModeColor:"rgb(255,255,255)",lightModeColor:"rgb(0,0,0)"},u=function(){function e(e,t){var n=this;this.initialContent=e.initialContent||t.innerHTML||"",this.contentDivFormat=(0,i.getComputedStyles)(t),null===t.getAttribute("contenteditable")&&(this.initializer=function(){t.contentEditable="true",t.style.userSelect="text",t.style.webkitUserSelect="text"},this.disposer=function(){t.style.userSelect="",t.style.webkitUserSelect="",t.removeAttribute("contenteditable")}),this.adjustColor=e.doNotAdjustEditorColor?function(){}:function(){var e=s,r=l,o=n.state.isDarkMode;(0,i.setColor)(t,e,!1,o),(0,i.setColor)(t,r,!0,o)},this.state={customData:{},defaultFormat:e.defaultFormat||null,isDarkMode:!!e.inDarkMode,getDarkColor:e.getDarkColor||function(e){return e},onExternalContentTransform:e.onExternalContentTransform,experimentalFeatures:e.experimentalFeatures||[],shadowEditFragment:null,shadowEditSelectionPath:null,shadowEditTableSelectionPath:null}}return e.prototype.getName=function(){return"Lifecycle"},e.prototype.initialize=function(e){var t;this.editor=e,this.recalculateDefaultFormat(),this.editor.setContent(this.initialContent,!1),null===(t=this.initializer)||void 0===t||t.call(this),this.adjustColor(),this.adjustBrowserBehavior(),this.editor.triggerPluginEvent(11,{},!0)},e.prototype.dispose=function(){var e=this;this.editor.triggerPluginEvent(12,{},!0),Object.keys(this.state.customData).forEach((function(t){var n=e.state.customData[t];n&&n.disposer&&n.disposer(n.value),delete e.state.customData[t]})),this.disposer&&(this.disposer(),this.disposer=null,this.initializer=null),this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){7!=e.eventType||"SwitchToDarkMode"!=e.source&&"SwitchToLightMode"!=e.source||(this.state.isDarkMode="SwitchToDarkMode"==e.source,this.recalculateDefaultFormat(),this.adjustColor())},e.prototype.adjustBrowserBehavior=function(){var e=this;Object.keys(a).forEach((function(t){try{e.editor.getDocument().execCommand(t,!1,a[t])}catch(e){}}))},e.prototype.recalculateDefaultFormat=function(){var e=this.state,t=e.defaultFormat,n=e.isDarkMode;if(n&&t&&(t.backgroundColors||(t.backgroundColors=l),t.textColors||(t.textColors=s)),!t||0!==Object.keys(t).length){var r=t||{},o=r.fontFamily,i=r.fontSize,a=r.textColor,u=r.textColors,c=r.backgroundColor,d=r.backgroundColors,f=r.bold,h=r.italic,p=r.underline,g=this.contentDivFormat;this.state.defaultFormat={fontFamily:o||g[0],fontSize:i||g[1],get textColor(){return u?n?u.darkModeColor:u.lightModeColor:a||g[2]},textColors:u,get backgroundColor(){return d?n?d.darkModeColor:d.lightModeColor:c||""},backgroundColors:d,bold:f,italic:h,underline:p}}},e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){var e=this;this.onMouseUp=function(t){e.editor&&(e.removeMouseUpEventListener(),e.editor.triggerPluginEvent(6,{rawEvent:t,isClicking:e.mouseDownX==t.pageX&&e.mouseDownY==t.pageY}))}}return e.prototype.getName=function(){return"MouseUp"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.removeMouseUpEventListener(),this.editor=null},e.prototype.onPluginEvent=function(e){5!=e.eventType||this.mouseUpEventListerAdded||(this.editor.getDocument().addEventListener("mouseup",this.onMouseUp,!0),this.mouseUpEventListerAdded=!0,this.mouseDownX=e.rawEvent.pageX,this.mouseDownY=e.rawEvent.pageY)},e.prototype.removeMouseUpEventListener=function(){this.mouseUpEventListerAdded&&(this.mouseUpEventListerAdded=!1,this.editor.getDocument().removeEventListener("mouseup",this.onMouseUp,!0))},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(){}return e.prototype.getName=function(){return"NormalizeTable"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 11:case 7:this.normalizeTables(this.editor.queryElements("table"));break;case 10:this.normalizeTables((0,r.toArray)(e.fragment.querySelectorAll("table")));break;case 5:this.normalizeTableFromEvent(e.rawEvent);break;case 0:e.rawEvent.shiftKey&&this.normalizeTableFromEvent(e.rawEvent)}},e.prototype.normalizeTableFromEvent=function(e){var t=this.editor.getElementAtCursor("table",e.target);t&&this.normalizeTables([t])},e.prototype.normalizeTables=function(e){if(e.length>0){var t=this.editor.getSelectionRangeEx(),n=0==(null==t?void 0:t.type)&&t.ranges[0]||{},o=n.startContainer,i=n.endContainer,a=n.startOffset,l=n.endOffset;(function(e){var t=!1;return e.forEach((function(e){for(var n=null,o=e.firstChild;o;o=o.nextSibling){switch((0,r.getTagOfNode)(o)){case"TR":n||(n=e.ownerDocument.createElement("tbody"),e.insertBefore(n,o)),n.appendChild(o),o=n,t=!0;break;case"TBODY":n?((0,r.moveChildNodes)(n,o,!0),o.parentNode.removeChild(o),o=n,t=!0):n=o;break;default:n=null}}})),t})(e)&&(o&&i?this.editor.select(o,a,i,l):1==(null==t?void 0:t.type)&&this.editor.select(t.table,t.coordinates))}},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(){this.state={pendableFormatPosition:null,pendableFormatState:null}}return e.prototype.getName=function(){return"PendingFormatState"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null,this.clear()},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 13:this.state.pendableFormatPosition=this.getCurrentPosition(),this.state.pendableFormatState=e.formatState;break;case 0:case 5:case 7:this.state.pendableFormatPosition&&!this.state.pendableFormatPosition.equalTo(this.getCurrentPosition())&&this.clear()}},e.prototype.clear=function(){this.state.pendableFormatPosition=null,this.state.pendableFormatState=null},e.prototype.getCurrentPosition=function(){var e=this.editor.getSelectionRange();return e&&r.Position.getStart(e).normalize()},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(){}return e.prototype.getName=function(){return"TypeInContainer"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){if(1==e.eventType){var t=this.editor.getSelectionRange(),n=this.editor.isFeatureEnabled("AlwaysApplyDefaultFormat");if(!t||this.editor.contains((0,r.findClosestElementAncestor)(t.startContainer,null,n?"[style]":null)))return;t.collapsed?this.editor.ensureTypeInContainer(r.Position.getStart(t),e.rawEvent):this.editor.runAsync((function(t){t.ensureTypeInContainer(t.getFocusedPosition(),e.rawEvent)}))}},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e){var t,n;this.state={snapshotsService:e.undoMetadataSnapshotService||(n=e.undoSnapshotService,n?{canMove:function(e){return n.canMove(e)},move:function(e){return{html:n.move(e),metadata:null}},addSnapshot:function(e,t){return n.addSnapshot(e.html+(e.metadata?"\x3c!--"+JSON.stringify(e.metadata)+"--\x3e":""),t)},clearRedo:function(){return n.clearRedo()},canUndoAutoComplete:function(){return n.canUndoAutoComplete()}}:void 0)||(t=(0,r.createSnapshots)(1e7),{canMove:function(e){return(0,r.canMoveCurrentSnapshot)(t,e)},move:function(e){return(0,r.moveCurrentSnapshot)(t,e)},addSnapshot:function(e,n){return(0,r.addSnapshotV2)(t,e,n)},clearRedo:function(){return(0,r.clearProceedingSnapshotsV2)(t)},canUndoAutoComplete:function(){return(0,r.canUndoAutoComplete)(t)}}),isRestoring:!1,hasNewContent:!1,isNested:!1,autoCompletePosition:null}}return e.prototype.getName=function(){return"Undo"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.willHandleEventExclusively=function(e){return 0==e.eventType&&8==e.rawEvent.which&&this.canUndoAutoComplete()},e.prototype.onPluginEvent=function(e){if(this.editor&&!this.editor.isInIME())switch(e.eventType){case 11:var t=this.editor.getUndoState();t.canUndo||t.canRedo||this.addUndoSnapshot();break;case 0:this.onKeyDown(e.rawEvent);break;case 1:this.onKeyPress(e.rawEvent);break;case 4:this.clearRedoForInput(),this.addUndoSnapshot();break;case 7:this.state.isRestoring||"SwitchToDarkMode"==e.source||"SwitchToLightMode"==e.source||this.clearRedoForInput()}},e.prototype.onKeyDown=function(e){if(8==e.which||46==e.which)if(8==e.which&&this.canUndoAutoComplete())e.preventDefault(),this.editor.undo(),this.state.autoCompletePosition=null,this.lastKeyPress=e.which;else{var t=this.editor.getSelectionRange();!t||t.collapsed&&this.lastKeyPress==e.which&&!(0,r.isCtrlOrMetaPressed)(e)||this.addUndoSnapshot(),this.state.hasNewContent=!0,this.lastKeyPress=e.which}else e.which>=33&&e.which<=40&&(this.state.hasNewContent&&this.addUndoSnapshot(),this.lastKeyPress=0)},e.prototype.onKeyPress=function(e){if(!e.metaKey){var t=this.editor.getSelectionRange();t&&!t.collapsed||32==e.which&&32!=this.lastKeyPress||13==e.which?(this.addUndoSnapshot(),13==e.which&&(this.state.hasNewContent=!0)):this.clearRedoForInput(),this.lastKeyPress=e.which}},e.prototype.clearRedoForInput=function(){this.state.snapshotsService.clearRedo(),this.lastKeyPress=0,this.state.hasNewContent=!0},e.prototype.canUndoAutoComplete=function(){var e;return this.state.snapshotsService.canUndoAutoComplete()&&(null===(e=this.state.autoCompletePosition)||void 0===e?void 0:e.equalTo(this.editor.getFocusedPosition()))},e.prototype.addUndoSnapshot=function(){this.editor.addUndoSnapshot(),this.state.autoCompletePosition=null},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(175);t.default=function(e){try{var t=r(e||void 0),n=t.lab().array(),o=.78753*(100-n[0])+21.247;e=r.lab(o,n[1],n[2]).rgb().alpha(t.alpha()).toString()}catch(e){}return e}},function(e,t,n){"use strict";var r=n(176),o=n(179),i=[].slice,a=["keyword","gray","hex"],l={};Object.keys(o).forEach((function(e){l[i.call(o[e].labels).sort().join("")]=e}));var s={};function u(e,t){if(!(this instanceof u))return new u(e,t);if(t&&t in a&&(t=null),t&&!(t in o))throw new Error("Unknown model: "+t);var n,c;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof u)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"==typeof e){var d=r.get(e);if(null===d)throw new Error("Unable to parse color from string: "+e);this.model=d.model,c=o[this.model].channels,this.color=d.value.slice(0,c),this.valpha="number"==typeof d.value[c]?d.value[c]:1}else if(e.length){this.model=t||"rgb",c=o[this.model].channels;var f=i.call(e,0,c);this.color=h(f,c),this.valpha="number"==typeof e[c]?e[c]:1}else if("number"==typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var p=Object.keys(e);"alpha"in e&&(p.splice(p.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);var g=p.sort().join("");if(!(g in l))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=l[g];var v=o[this.model].labels,m=[];for(n=0;n<v.length;n++)m.push(e[v[n]]);this.color=h(m)}if(s[this.model])for(c=o[this.model].channels,n=0;n<c;n++){var y=s[this.model][n];y&&(this.color[n]=y(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function c(e,t,n){return(e=Array.isArray(e)?e:[e]).forEach((function(e){(s[e]||(s[e]=[]))[t]=n})),e=e[0],function(r){var o;return arguments.length?(n&&(r=n(r)),(o=this[e]()).color[t]=r,o):(o=this[e]().color[t],n&&(o=n(o)),o)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function f(e){return Array.isArray(e)?e:[e]}function h(e,t){for(var n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}u.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var t=this.model in r.to?this:this.rgb(),n=1===(t=t.round("number"==typeof e?e:1)).valpha?t.color:t.color.concat(this.valpha);return r.to[t.model](n)},percentString:function(e){var t=this.rgb().round("number"==typeof e?e:1),n=1===t.valpha?t.color:t.color.concat(this.valpha);return r.to.rgb.percent(n)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var e={},t=o[this.model].channels,n=o[this.model].labels,r=0;r<t;r++)e[n[r]]=this.color[r];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray:function(){var e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject:function(){var e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round:function(e){return e=Math.max(e||0,0),new u(this.color.map(function(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}(e)).concat(this.valpha),this.model)},alpha:function(e){return arguments.length?new u(this.color.concat(Math.max(0,Math.min(1,e))),this.model):this.valpha},red:c("rgb",0,d(255)),green:c("rgb",1,d(255)),blue:c("rgb",2,d(255)),hue:c(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:c("hsl",1,d(100)),lightness:c("hsl",2,d(100)),saturationv:c("hsv",1,d(100)),value:c("hsv",2,d(100)),chroma:c("hcg",1,d(100)),gray:c("hcg",2,d(100)),white:c("hwb",1,d(100)),wblack:c("hwb",2,d(100)),cyan:c("cmyk",0,d(100)),magenta:c("cmyk",1,d(100)),yellow:c("cmyk",2,d(100)),black:c("cmyk",3,d(100)),x:c("xyz",0,d(100)),y:c("xyz",1,d(100)),z:c("xyz",2,d(100)),l:c("lab",0,d(100)),a:c("lab",1),b:c("lab",2),keyword:function(e){return arguments.length?new u(e):o[this.model].keyword(this.color)},hex:function(e){return arguments.length?new u(e):r.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity:function(){for(var e=this.rgb().color,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return u.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var n=e.rgb(),r=this.rgb(),o=void 0===t?.5:t,i=2*o-1,a=n.alpha()-r.alpha(),l=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,s=1-l;return u.rgb(l*n.red()+s*r.red(),l*n.green()+s*r.green(),l*n.blue()+s*r.blue(),n.alpha()*o+r.alpha()*(1-o))}},Object.keys(o).forEach((function(e){if(-1===a.indexOf(e)){var t=o[e].channels;u.prototype[e]=function(){if(this.model===e)return new u(this);if(arguments.length)return new u(arguments,e);var n="number"==typeof arguments[t]?t:this.valpha;return new u(f(o[this.model][e].raw(this.color)).concat(n),e)},u[e]=function(n){return"number"==typeof n&&(n=h(i.call(arguments),t)),new u(n,e)}}})),e.exports=u},function(e,t,n){var r=n(83),o=n(177),i=Object.hasOwnProperty,a={};for(var l in r)i.call(r,l)&&(a[r[l]]=l);var s=e.exports={to:{},get:{}};function u(e,t,n){return Math.min(Math.max(t,e),n)}function c(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}s.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=s.get.hsl(e),n="hsl";break;case"hwb":t=s.get.hwb(e),n="hwb";break;default:t=s.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},s.get.rgb=function(e){if(!e)return null;var t,n,o,a=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=t[2],t=t[1],n=0;n<3;n++){var l=2*n;a[n]=parseInt(t.slice(l,l+2),16)}o&&(a[3]=parseInt(o,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(o=(t=t[1])[3],n=0;n<3;n++)a[n]=parseInt(t[n]+t[n],16);o&&(a[3]=parseInt(o+o,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)a[n]=parseInt(t[n+1],0);t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:i.call(r,t[1])?((a=r[t[1]])[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}for(n=0;n<3;n++)a[n]=u(a[n],0,255);return a[3]=u(a[3],0,1),a},s.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,u(parseFloat(t[2]),0,100),u(parseFloat(t[3]),0,100),u(isNaN(n)?1:n,0,1)]}return null},s.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,u(parseFloat(t[2]),0,100),u(parseFloat(t[3]),0,100),u(isNaN(n)?1:n,0,1)]}return null},s.to.hex=function(){var e=o(arguments);return"#"+c(e[0])+c(e[1])+c(e[2])+(e[3]<1?c(Math.round(255*e[3])):"")},s.to.rgb=function(){var e=o(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},s.to.rgb.percent=function(){var e=o(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},s.to.hsl=function(){var e=o(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},s.to.hwb=function(){var e=o(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},s.to.keyword=function(e){return a[e.slice(0,3)]}},function(e,t,n){"use strict";var r=n(178),o=Array.prototype.concat,i=Array.prototype.slice,a=e.exports=function(e){for(var t=[],n=0,a=e.length;n<a;n++){var l=e[n];r(l)?t=o.call(t,i.call(l)):t.push(l)}return t};a.wrap=function(e){return function(){return e(a(arguments))}}},function(e,t){e.exports=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},function(e,t,n){var r=n(84),o=n(180),i={};Object.keys(r).forEach((function(e){i[e]={},Object.defineProperty(i[e],"channels",{value:r[e].channels}),Object.defineProperty(i[e],"labels",{value:r[e].labels});var t=o(e);Object.keys(t).forEach((function(n){var r=t[n];i[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,o=0;o<r;o++)n[o]=Math.round(n[o]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),i[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=i},function(e,t,n){var r=n(84);function o(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,o=0;o<n;o++)e[t[o]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var o=n.pop(),i=Object.keys(r[o]),a=i.length,l=0;l<a;l++){var s=i[l],u=t[s];-1===u.distance&&(u.distance=t[o].distance+1,u.parent=o,n.unshift(s))}return t}function i(e,t){return function(n){return t(e(n))}}function a(e,t){for(var n=[t[e].parent,e],o=r[t[e].parent][e],a=t[e].parent;t[a].parent;)n.unshift(t[a].parent),o=i(r[t[a].parent][a],o),a=t[a].parent;return o.conversion=n,o}e.exports=function(e){for(var t=o(e),n={},r=Object.keys(t),i=r.length,l=0;l<i;l++){var s=r[l];null!==t[s].parent&&(n[s]=a(s,t))}return n}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(182),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllFeatures=t.ContentEdit=void 0;var r=n(183);Object.defineProperty(t,"ContentEdit",{enumerable:!0,get:function(){return r.default}});var o=n(86);Object.defineProperty(t,"getAllFeatures",{enumerable:!0,get:function(){return o.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86),o=function(){function e(e,t){this.settingsOverride=e,this.additionalFeatures=t}return e.prototype.getName=function(){return"ContentEdit"},e.prototype.initialize=function(e){var t=this,n=[],o=(0,r.default)();Object.keys(o).forEach((function(e){var r=o[e],i=t.settingsOverride&&void 0!==t.settingsOverride[e];(i&&t.settingsOverride[e]||!i&&!r.defaultDisabled)&&n.push(r)})),n.concat(this.additionalFeatures||[]).forEach((function(t){return e.addContentEditFeature(t)}))},e.prototype.dispose=function(){},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoLinkFeatures=void 0;var r=n(6),o=n(0),i=/[.+=\s:;"',>]+$/i,a={keys:[13,32,257],shouldHandleEvent:s,handleEvent:function(e,t){var n=t.getDocument().createElement("a"),i=s(e,t),a=t.getContentSearcherOfCursor();n.textContent=i.originalUrl,n.href=i.normalizedUrl,t.runAsync((function(t){t.addUndoSnapshot((function(){return(0,r.replaceWithNode)(t,i.originalUrl,n,!1,a),(0,o.clearEventDataCache)(e),n}),"AutoLink",!0)}))}},l={keys:[8],shouldHandleEvent:function(e,t){return t.getContentSearcherOfCursor(e).getInlineElementBefore()instanceof o.LinkInlineElement},handleEvent:function(e,t){e.rawEvent.preventDefault(),(0,r.removeLink)(t)},defaultDisabled:!0};function s(e,t){return 0==e.eventType||7==e.eventType&&"Paste"==e.source?(0,o.cacheGetEventData)(e,"LINK_DATA",(function(){var n=7==e.eventType&&"Paste"==e.source&&e.data,r=(0,o.matchLink)((n.text||"").trim()),a=t.getContentSearcherOfCursor(e);if(r&&a.getRangeFromText(r.originalUrl,!1))return r;var l=a&&a.getWordBefore();if(l&&l.length>5){var s=(l.match(i)||[])[0]||"",u=l.substring(0,l.length-s.length);return["()","{}","[]"].forEach((function(e){u[u.length-1]==e[1]&&u.indexOf(e[0])<0&&(u=u.substr(0,u.length-1))})),(0,o.matchLink)(u)}return null})):null}t.AutoLinkFeatures={autoLink:a,unlinkWhenBackspaceAfterLink:l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNewFontSize=t.FONT_SIZES=void 0;var r=n(35),o=n(0);t.FONT_SIZES=[8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72];function i(e,t,n){e=1==t?Math.floor(e):Math.ceil(e);var r=n[n.length-1];if(e<=n[0])e=Math.max(e+t,1);else if(e>r||e==r&&1==t)e/=10,e=1==t?Math.floor(e):Math.ceil(e),e=Math.min(Math.max(10*(e+t),r),1e3);else if(1==t){for(var o=0;o<n.length;o++)if(e<n[o]){e=n[o];break}}else for(o=n.length-1;o>=0;o--)if(e>n[o]){e=n[o];break}return e}t.default=function(e,n,a){void 0===a&&(a=t.FONT_SIZES);var l=0==n?1:-1;(0,r.default)(e,(function(e){var t=parseFloat((0,o.getComputedStyle)(e,"font-size"));e.style.fontSize=i(t,l,a)+"pt","normal"!=(0,o.getComputedStyle)(e,"line-height")&&(e.style.lineHeight="normal")}))},t.getNewFontSize=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(87);t.default=function(e){(0,r.default)(e,1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=/^[a-zA-Z]+:/i,i=/^[\w.%+-]+@/i,a=/^ftp\./i;function l(e){return e.queryElements("a[href]",1)[0]}function s(e,t){t&&e.textContent!=t&&(e.textContent=t)}t.default=function(e,t,n,u){e.focus();var c=(function(e){var t=new r.HtmlSanitizer,n=document.createElement("a");return n.href=e||"",t.sanitize(n),n.getAttribute("href")}(t)||"").trim();if(c){var d=(0,r.matchLink)(c),f=d?d.normalizedUrl:function(e){if(!e)return e;var t="";return e.search(o)<0&&(t=0==e.search(i)?"mailto:":0==e.search(a)?"ftp://":"http://"),t+e}(c),h=d?d.originalUrl:c;e.addUndoSnapshot((function(){var t=e.getSelectionRange(),r=null;if(t&&t.collapsed)(r=l(e))?(r.href=f,s(r,u)):((r=e.getDocument().createElement("A")).textContent=u||h,r.href=f,e.insertNode(r));else{e.getDocument().execCommand("createLink",!1,f);for(var o=e.getSelectionTraverser(),i=o.getNextInlineElement();i;){var a=i.getContainerNode();a.parentElement.removeChild(a),i=o.getNextInlineElement()}s(r=l(e),u)}return n&&r&&(r.title=n),r}),"CreateLink")}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getElementBasedFormatState=void 0;var o=n(0);function i(e,t){var n=(0,o.getTagOfNode)(e.getElementAtCursor("OL,UL",null,t)),r=(0,o.getTagOfNode)(e.getElementAtCursor("H1,H2,H3,H4,H5,H6",null,t));return{isBullet:"UL"==n,isNumbering:"OL"==n,headerLevel:r&&parseInt(r[1])||0,canUnlink:!!e.queryElements("a[href]",1)[0],canAddImageAltText:!!e.queryElements("img",1)[0],isBlockQuote:!!e.queryElements("blockquote",1)[0],isInTable:!!e.queryElements("table",1)[0]}}t.getElementBasedFormatState=i,t.default=function(e,t){return r(r(r(r(r({},e.getPendableFormatState(!1)),i(e,t)),e.getStyleBasedFormatState()),e.getUndoState()),{isDarkMode:e.isDarkMode(),zoomScale:e.getZoomScale()})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t,n,o,i,a){var l=(0,r.wrap)(n,o?"DIV":"SPAN");if(!o&&i&&(l.style.display="inline-block"),(0,r.commitEntity)(l,t,i),!e.contains(l)){var s=void 0,u=void 0;if("number"==typeof a)u=a;else if(a){s=e.getSelectionRange();var c=a.normalize().node,d=c&&e.getElementAtCursor((0,r.getEntitySelector)(),c);d&&(a=new r.Position(d,-3)),e.select(a),u=3}else e.focus(),u=3;e.insertNode(l,{updateCursor:!1,insertOnNewLine:o,replaceSelection:!0,position:u}),3==u&&(s?e.select(s):o||e.select(l,-3))}if(o){var f=e.getDocument().createElement("BR");l.parentNode.insertBefore(f,l.nextSibling)}var h=(0,r.getEntityFromElement)(l);return e.triggerContentChangedEvent("InsertEntity",h),h}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);function o(e,t){e.addUndoSnapshot((function(){var n=e.getDocument().createElement("img");n.src=t,n.style.maxWidth="100%",e.insertNode(n)}),"Format")}t.default=function(e,t){"string"==typeof t?o(e,t):(0,r.readFile)(t,(function(t){t&&!e.isDisposed()&&o(e,t)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);function o(e){return e<=4?"120px":e<=6?"100px":"70px"}t.default=function(e,t,n,i){var a=e.getDocument(),l=a.createDocumentFragment(),s=a.createElement("table");l.appendChild(s),s.cellSpacing="0",s.cellPadding="1";for(var u=0;u<n;u++){var c=a.createElement("tr");s.appendChild(c);for(var d=0;d<t;d++){var f=a.createElement("td");c.appendChild(f),f.appendChild(a.createElement("br")),f.style.width=o(t)}}e.focus(),e.addUndoSnapshot((function(){var t=new r.VTable(s);t.applyFormat(i),t.writeBack(),e.insertNode(l),e.runAsync((function(e){return e.select(new r.Position(s,0).normalize())}))}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){var n=e.getElementAtCursor("TD,TH");n&&e.addUndoSnapshot((function(){var o=new r.VTable(n);!function(e,t){var n=e.getSelectionRangeEx();n&&1===n.type&&(t.selection=n.coordinates)}(e,o),o.edit(t),o.writeBack(),e.transformToDarkColor(o.table),e.focus();var i=function(e,t,n){var r=t,o=n;switch(e){case 0:o=0;break;case 1:r+=1,o=0;break;case 2:r=0;break;case 3:r=0,o+=1}return{newRow:r,newCol:o}}(t,o.row,o.col);e.select(o.getCell(i.newRow,i.newCol).td,0)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t,n){(n=n||e.getElementAtCursor("TABLE"))&&e.addUndoSnapshot((function(o,i){var a=new r.VTable(n);a.applyFormat(t),a.writeBack(),e.transformToDarkColor(a.table),e.focus(),e.select(o,i)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e){e.focus(),e.addUndoSnapshot((function(t,n){e.queryElements("a[href]",1,r.unwrap),e.select(t,n)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o){if(!t||!n)return!1;var i;if(i="string"==typeof t?(o=o||e.getContentSearcherOfCursor())&&o.getRangeFromText(t,r):t){var a=e.getSelectionRange();return a.collapsed&&i.endContainer==a.startContainer&&i.endOffset==a.startOffset&&(r=!0),e.insertNode(n,{position:5,updateCursor:r,replaceSelection:!0,insertOnNewLine:!1,range:i}),!0}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){t&&e.addUndoSnapshot((function(){t.style.transform="rotate("+n+"deg)"}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),o=n(0);t.default=function(e,t){var n=e.getSelectionRangeEx(),i=n&&1===n.type;e.addUndoSnapshot((function(){e.isFeatureEnabled("TableAlignment")&&i&&(0,o.isWholeTableSelected)(new o.VTable(n.table),n.coordinates)?function(e,t){var n=e.table;1==t?(n.style.marginLeft="auto",n.style.marginRight="auto"):2==t?(n.style.marginLeft="auto",n.style.marginRight=""):(n.style.marginLeft="",n.style.marginRight="auto")}(n,t):function(e,t){var n="left",o="justifyLeft";1==t?(o="justifyCenter",n="center"):2==t&&(o="justifyRight",n="right");(0,r.default)(e,o),e.queryElements("[align]",1,(function(e){return e.style.textAlign=n}))}(e,t)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(199);t.default=function(e,t){e.focus(),e.addUndoSnapshot((function(n,o){(0,r.default)(e,(function(e){e.setAttribute("dir",0==t?"ltr":"rtl"),e.style.textAlign=0==t?"left":"right"})),e.select(n,o)}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);function o(e){var t=e.getStartNode();return t==e.getEndNode()&&3==t.nodeType&&["TR","TABLE"].indexOf((0,r.getTagOfNode)(t.parentNode))>=0}t.default=function(e,t){for(var n=e.getSelectionTraverser(),r=n&&n.currentBlockElement,i=[];r;)o(r)||i.push(r),r=n.getNextBlockElement();i.forEach((function(e){var n=e.collapseToSingleElement();t(n)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e.focus(),e.addUndoSnapshot((function(){e.queryElements("img",1,(function(e){return e.setAttribute("alt",t)}))}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),o=n(0);function i(e,t){var n=(0,o.collapseNodesInRegion)(e,t);(0,o.wrap)(n,2)}function a(e,t){t.forEach((function(t){var n=t.collapseToSingleElement(),r=(0,o.findClosestElementAncestor)(n,e.rootNode,"blockquote");if(r){for(n==r&&(n=(0,o.wrap)((0,o.toArray)(n.childNodes)));(0,o.isNodeInRegion)(e,n)&&"BLOCKQUOTE"!=(0,o.getTagOfNode)(n);)n=(0,o.splitBalancedNodeRange)(n);(0,o.isNodeInRegion)(e,n)&&(0,o.unwrap)(n)}}))}function l(e,t){var n;return(null===(n=e.items[0])||void 0===n?void 0:n.getNode())==t&&e.getListItemIndex(t)==(e.getStart()||1)}function s(e,t,n){return 0==e||t.getElementAtCursor("blockquote",n)}t.default=function(e,t){var n=0==t?i:a;(0,r.default)(e,(function(r,i,a){for(var u=(0,o.getSelectedBlockElementsInRegion)(r,!0),c=[[]],d=0;d<u.length;d++){var f=u[d].getStartNode(),h=(0,o.createVListFromRegion)(r,!0,f);if(h){for(;u[d+1]&&h.contains(u[d+1].getStartNode());)d++;var p=e.isFeatureEnabled("TabKeyTextFeatures");if(p&&l(h,f)&&s(t,e,f)){var g=e.getBlockElementAtNode(h.rootList);c.push([g])}else 1==t?h.setIndentation(i,a,t,!1,p):h.setIndentation(i,a,t),h.writeBack(),c.push([])}else c[c.length-1].push(u[d])}c.forEach((function(e){return n(r,e)}))}),(function(){var n=e.getSelectionRangeEx();if(1==n.type&&(0,o.isWholeTableSelected)(new o.VTable(n.table),n.coordinates)){if(1==t){var r=e.getElementAtCursor("blockquote",n.table);(0,o.unwrap)(r)}else 0==t&&(0,o.wrap)(n.table,2);return!1}return!0}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=n(0);t.default=function(e,t,n){function i(e,n){switch(t){case"lowercase":return e.toLocaleLowerCase(n);case"uppercase":return e.toLocaleUpperCase(n);case"capitalize":for(var r=e.toLocaleLowerCase(n).split(" "),o=0;o<r.length;o++)r[o]=r[o].charAt(0).toLocaleUpperCase(n)+r[o].slice(1);return r.join(" ");case"sentence":var i=new RegExp("^\\s*\\w|[\\.\\!\\?]\\s+\\w","g");return e.toLocaleLowerCase(n).replace(i,(function(e){return e.toLocaleUpperCase(n)}))}}(0,r.default)(e,(function(e){for(var t=(0,o.getFirstLeafNode)(e);t;t=(0,o.getNextLeafSibling)(e,t))if(3==t.nodeType)try{t.textContent=i(t.textContent,n)}catch(e){t.textContent=i(t.textContent,void 0)}}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(51);t.default=function(e){(0,r.default)(e,2)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(51);t.default=function(e,t){(0,r.default)(e,1,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t,n){void 0===n&&(n=1),e.addUndoSnapshot((function(){e.focus();var o=e.getSelectedRegions();if(o[0]){var i=(0,r.createVListFromRegion)(o[0],!1,t);i&&(i.split(t,n),i.writeBack())}}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(96),o=n(0),i=function(e){e.style.borderLeft="3px solid",e.style.borderColor="#C8C8C8",e.style.paddingLeft="10px",e.style.color="#666666"};t.default=function(e,t){(0,r.default)(e,(function(e){var n=(0,o.wrap)(e,"blockquote");(t||i)(n)}),(function(){return 0==e.queryElements("blockquote",1,o.unwrap).length}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(96),o=n(0);t.default=function(e,t){(0,r.default)(e,(function(e){var n=(0,o.wrap)(e,"code"),r=(0,o.wrap)(n,"pre");null==t||t(r)}),(function(){return 0==e.queryElements("pre>code",1,(function(e){if(!e.previousSibling&&!e.nextSibling){var t=e.parentNode;(0,o.unwrap)(e),(0,o.unwrap)(t)}})).length}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"strikeThrough")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"subscript")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=function(e){(0,r.default)(e,"superscript")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){t=Math.min(Math.max(Math.round(t),0),6),e.addUndoSnapshot((function(){e.focus();var n=!1;if(e.queryElements("H1,H2,H3,H4,H5,H6",1,(function(t){n||(e.getDocument().execCommand("formatBlock",!1,"<DIV>"),n=!0);var o=e.getDocument().createElement("div");(0,r.moveChildNodes)(o,t),e.replaceNode(t,o)})),t>0){for(var o=e.getSelectionTraverser(),i=o?o.currentBlockElement:null,a=new r.HtmlSanitizer({cssStyleCallbacks:{"font-size":function(){return!1}}});i;){var l=i.collapseToSingleElement();a.sanitize(l),i=o.getNextBlockElement()}e.getDocument().execCommand("formatBlock",!1,"<H"+t+">")}}),"Format")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){e.focus(),e.addUndoSnapshot((function(){e.getSelectedRegions().forEach((function(n){(0,r.safeInstanceOf)(n.rootNode,"HTMLTableCellElement")&&((0,r.setColor)(n.rootNode,t,!0,e.isDarkMode(),!0),n.rootNode.dataset.cellShade="true",n.rootNode.dataset.originalBackgroundColor=n.rootNode.style.backgroundColor)}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorFeatures=void 0;var r=n(0),o={keys:[37,39],allowFunctionKeys:!0,shouldHandleEvent:function(e,t,n){var o,i;if(!(n&&(o=t.getSelectionRange())&&o.collapsed&&(i=r.Position.getStart(o))&&t.isPositionAtBeginning(i)))return!1;var a="rtl"==(0,r.getComputedStyle)(i.element,"direction"),l=e.rawEvent;return!a&&37==l.which||a&&39==l.which},handleEvent:function(e){e.rawEvent.preventDefault()},defaultDisabled:!r.Browser.isChrome};t.CursorFeatures={noCycleCursorMove:o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntityFeatures=void 0;var r=n(0),o={keys:[13],shouldHandleEvent:function(e,t){return a(e,t)},handleEvent:function(e,t){a(e,t,1)}},i={keys:[27],shouldHandleEvent:function(e,t){return a(e,t)},handleEvent:function(e,t){a(e,t,3)}};function a(e,t,n){var o=(0,r.cacheGetEventData)(e,"READONLY_ENTITY_ELEMENT",(function(){var n=e.rawEvent.target,o=n&&t.getElementAtCursor((0,r.getEntitySelector)(),n);return o&&!o.isContentEditable?o:null}));return o&&void 0!==n&&t.triggerPluginEvent(15,{operation:n,rawEvent:e.rawEvent,entity:(0,r.getEntityFromElement)(o)}),o}var l={keys:[13],shouldHandleEvent:function(e,t){return c(e,t,!0,!1)},handleEvent:function(e,t){var n;e.rawEvent.preventDefault();var o=t.getSelectionRange(),i=r.Position.getEnd(o).normalize().node,a=t.getDocument().createElement("BR");i.parentNode.insertBefore(a,i.nextSibling);var l,s=t.getBlockElementAtNode(i);s&&(l=s.collapseToSingleElement(),null===(n=a.parentNode)||void 0===n||n.removeChild(a)),t.getSelectionRange().deleteContents(),l.nextSibling&&t.select(l.nextSibling,0)}},s={keys:[8],shouldHandleEvent:function(e,t){return c(e,t,!1,!0)},handleEvent:function(e,t){c(e,t,!1,!0,5)}},u={keys:[46],shouldHandleEvent:function(e,t){return c(e,t,!0,!0)},handleEvent:function(e,t){c(e,t,!0,!0,4)}};function c(e,t,n,o,i){var a=(0,r.cacheGetEventData)(e,"NEIGHBOR_ENTITY_ELEMENT_"+n+"_"+o,(function(){var e=t.getSelectionRange();if(o&&!e.collapsed)return null;e.commonAncestorContainer.normalize();var i=r.Position.getEnd(e).normalize(),a=null;if(0==i.offset||i.isAtEnd){var l=t.getBodyTraverser(i.node),s=n?0==i.offset?l.currentInlineElement:l.getNextInlineElement():i.isAtEnd?l.currentInlineElement:l.getPreviousInlineElement(),u=s&&s.getContainerNode();if(!o){var c=t.getBlockElementAtNode(i.node);c&&c.contains(u)||(u=null)}a=u&&t.getElementAtCursor((0,r.getEntitySelector)(),u)}return a}));return a&&void 0!==i&&t.triggerPluginEvent(15,{operation:i,rawEvent:e.rawEvent,entity:(0,r.getEntityFromElement)(a)}),a}t.EntityFeatures={clickOnEntity:o,escapeFromEntity:i,enterBeforeReadonlyEntity:l,backspaceAfterEntity:s,deleteBeforeEntity:u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListFeatures=void 0;var r=n(6),o=n(0),i={keys:[9],shouldHandleEvent:function(e,t){return!e.rawEvent.shiftKey&&m(e,t)},handleEvent:function(e,t){(0,r.setIndentation)(t,0),e.rawEvent.preventDefault()}},a={keys:[9],shouldHandleEvent:function(e,t){return e.rawEvent.shiftKey&&m(e,t)},handleEvent:function(e,t){(0,r.setIndentation)(t,1),e.rawEvent.preventDefault()}},l={keys:[8],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",null,e),r=t.getSelectionRange();return n&&(null==r?void 0:r.collapsed)&&(0,o.isPositionAtBeginningOf)(o.Position.getStart(r),n)},handleEvent:function(e,t){var n=t.getElementAtCursor("LI",null,e);n.previousSibling?(0,r.blockFormat)(t,(function(t,r,i){var a=(0,o.createVListFromRegion)(t,!1,n);a.setIndentation(r,i,1,!0),a.writeBack(),e.rawEvent.preventDefault()})):v(e,t)},defaultDisabled:!0},s={keys:[8],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",null,e);return n&&(0,o.isNodeEmpty)(n)&&!n.previousSibling},handleEvent:v},u={keys:[46],shouldHandleEvent:function(e,t){if(t.getElementAtCursor("LI",null,e))return!1;var n=o.Position.getEnd(t.getSelectionRange()).isAtEnd?function(e,t){return(0,o.cacheGetEventData)(e,"nextSibling",(function(){var e,n=t.getSelectionRange(),r=o.Position.getEnd(n).normalize(),i=t.getBodyTraverser(r.node);return null===(e=null==i?void 0:i.getNextBlockElement())||void 0===e?void 0:e.getStartNode()}))}(e,t):null;return t.getElementAtCursor("LI",n,e)},handleEvent:function(e,t){var n=p(t);t.runAsync((function(e){return(0,r.experimentCommitListChains)(e,n)}))}},c={keys:[13],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",null,e);return!e.rawEvent.shiftKey&&n&&(0,o.isNodeEmpty)(n)},handleEvent:function(e,t){t.addUndoSnapshot((function(){return v(e,t,!1)}),null,!0)},defaultDisabled:!o.Browser.isIE&&!o.Browser.isChrome},d={keys:[32],shouldHandleEvent:function(e,t){if(!m(e,t)){var n=t.getContentSearcherOfCursor(e);return h(n.getSubStringBefore(4))&&!n.getNearestNonTextInlineElement()}return!1},handleEvent:function(e,t){t.insertContent("&nbsp;"),e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var e,n,o=t.getContentSearcherOfCursor(),i=o.getSubStringBefore(4),a=o.getRangeFromText(i,!0);if(a){if(0==i.indexOf("*")||0==i.indexOf("-"))g(t,a),(0,r.toggleBullet)(t);else if(h(i))g(t,a),(0,r.toggleNumbering)(t);else if((n=t.getSelectedRegions())&&1==n.length){var l=parseInt(i);g(t,a),(0,r.toggleNumbering)(t,l)}}else;null===(e=o.getRangeFromText(i,!0))||void 0===e||e.deleteContents()}),null,!0)}},f={keys:[13,9,46,8,258],shouldHandleEvent:function(e,t){return t.queryElements("li",1).length>0},handleEvent:function(e,t){var n=p(t);t.runAsync((function(e){return(0,r.experimentCommitListChains)(e,n)}))}};function h(e){return/^(\*|-|[0-9]{1,2}\.|[0-9]{1,2}\>|[0-9]{1,2}\)|[0-9]{1,2}\-|\([0-9]{1,2}\))$/.test(e)}function p(e){return o.VListChain.createListChains(e.getSelectedRegions())}function g(e,t){var n=e.getBlockElementAtNode(t.startContainer),r=null==n?void 0:n.getEndNode();if(r&&"BR"!=(0,o.getTagOfNode)(r)){var i=e.getDocument().createElement("BR");(0,o.isBlockElement)(r)?r.appendChild(i):r.parentNode.insertBefore(i,r.nextSibling),e.select(t.startContainer,t.startOffset)}}function v(e,t,n){void 0===n&&(n=!0);var i=m(e,t);if(i){var a=i[0],l=(0,o.getTagOfNode)(a);"UL"!=l&&"OL"!=l||(0,r.toggleListType)(t,"UL"==l?2:1,null,n),t.focus(),e.rawEvent.preventDefault()}}function m(e,t){var n=t.getElementAtCursor("LI,TABLE",null,e),r=n&&"LI"==(0,o.getTagOfNode)(n)&&t.getElementAtCursor("UL,OL",n);return r?[r,n]:null}t.ListFeatures={autoBullet:d,indentWhenTab:i,outdentWhenShiftTab:a,outdentWhenBackspaceOnEmptyFirstLine:s,outdentWhenEnterOnEmptyLine:c,mergeInNewLineWhenBackspaceOnFirstChar:l,maintainListChain:f,maintainListChainWhenDelete:u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownFeatures=void 0;var r=n(0);function o(e,t,n,r){return{keys:[e],shouldHandleEvent:function(e,n){return e.rawEvent.shiftKey===r&&!!i(e,n,t)},handleEvent:function(e,r){r.runAsync((function(r){!function(e,t,n,r){t.addUndoSnapshot((function(){var o=i(e,t,n);if(o){var a=o.cloneRange();a.setStart(a.startContainer,a.startOffset+1),o.setEnd(o.endContainer,o.endOffset+1);var l=t.getDocument().createElement(r);l.appendChild(a.extractContents()),o.deleteContents();var s=t.getDocument().createTextNode("​");o.insertNode(s),o.insertNode(l),t.select(s,-1)}}),"Format",!0)}(e,r,t,n)}))}}}function i(e,t,n){return(0,r.cacheGetEventData)(e,"MARKDOWN_RANGE",(function(){var o,i;return t.getContentSearcherOfCursor(e).forEachTextInlineElement((function(e){if(i&&o)return!0;var t=e.getTextContent();if(0==t[t.length-1].trim().length)return!1;if(t[t.length-1]===n)return!1;if(i||(i=e.getStartPosition().move(t.length)),t[0]==n)o=e.getStartPosition();else for(var r=t.length-1;r>0;r--){if(o)return!0;if(t[r]==n&&0==t[r-1].trim().length)return o=e.getStartPosition().move(r),!0}})),!!o&&!!i&&(0,r.createRange)(o,i)}))}var a=o(56,"*","b",!0),l=o(189,"_","i",!0),s=o(192,"~","s",!0),u=o(192,"`","code",!1);t.MarkdownFeatures={markdownBold:a,markdownItalic:l,markdownStrikethru:s,markdownInlineCode:u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteFeatures=void 0;var r=n(6),o=n(0),i="BLOCKQUOTE",a=[i,"LI","TD","TH"].join(","),l={keys:[8],shouldHandleEvent:function(e,t){var n=u(e,t);return n&&(0,o.isNodeEmpty)(n)&&!n.previousSibling},handleEvent:c},s={keys:[13],shouldHandleEvent:function(e,t){var n=u(e,t);return!e.rawEvent.shiftKey&&n&&(0,o.isNodeEmpty)(n)},handleEvent:function(e,t){return t.addUndoSnapshot((function(){return c(e,t)}),null,!0)}};function u(e,t){return(0,o.cacheGetEventData)(e,"QUOTE_CHILD",(function(){var e=t.getElementAtCursor(a);if(e&&(0,o.getTagOfNode)(e)==i){var n=t.getFocusedPosition(),r=n&&t.getBlockElementAtNode(n.normalize().node);if(r){var l=r.getStartNode()==e?r.getStartNode():r.collapseToSingleElement();return(0,o.isNodeEmpty)(l)?l:null}}return null}))}function c(e,t){t.addUndoSnapshot((function(){var n,a,l=u(e,t);(0,o.getTagOfNode)(l)==i&&(l=(0,o.wrap)((0,o.toArray)(l.childNodes))),n=(0,o.splitBalancedNodeRange)(l),a=d(n),(0,o.unwrap)(n),t.select(l,0),a&&(0,r.clearFormat)(t)})),e.rawEvent.preventDefault()}var d=function(e){return!!(e&&(0,o.safeInstanceOf)(e,"HTMLQuoteElement")&&e.style.borderLeft&&e.style.borderColor&&e.style.paddingLeft&&e.style.color)};t.QuoteFeatures={unquoteWhenBackspaceOnEmptyFirstLine:l,unquoteWhenEnterOnEmptyLine:s}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShortcutFeatures=void 0;var r=n(0),o=n(6);function i(e,t,n){return{winKey:e,macKey:t,action:n}}var a=[i(4162,8258,o.toggleBold),i(4169,8265,o.toggleItalic),i(4181,8277,o.toggleUnderline),i(4186,8282,(function(e){return e.undo()})),i(4185,24666,(function(e){return e.redo()})),i(4286,8382,o.toggleBullet),i(4287,8383,o.toggleNumbering),i(20670,24766,(function(e){return(0,o.changeFontSize)(e,0)})),i(20668,24764,(function(e){return(0,o.changeFontSize)(e,1)}))],l={allowFunctionKeys:!0,keys:[66,73,85,89,90,188,190,191],shouldHandleEvent:s,handleEvent:function(e,t){var n=s(e);n&&(n.action(t),e.rawEvent.preventDefault(),e.rawEvent.stopPropagation())}};function s(e){return(0,r.cacheGetEventData)(e,"DEFAULT_SHORT_COMMAND",(function(){var t=e.rawEvent,n=0!=e.eventType||t.altKey?0:t.which|(t.metaKey&&8192)|(t.shiftKey&&16384)|(t.ctrlKey&&4096);return n&&a.filter((function(e){return(r.Browser.isMac?e.macKey:e.winKey)==n}))[0]}))}t.ShortcutFeatures={defaultShortcut:l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructuredNodeFeatures=void 0;var r=n(0),o={TD:"TABLE",TH:"TABLE",LI:"OL,UL"},i=Object.keys(o).join(","),a={keys:[13],shouldHandleEvent:l,handleEvent:function(e,t){var n=l(e,t),o=(0,r.createElement)(1,t.getDocument());t.addUndoSnapshot((function(){n.parentNode.insertBefore(o,n),"TABLE"==(0,r.getTagOfNode)(n)&&t.select(new r.Position(o,0).normalize())})),e.rawEvent.preventDefault()},defaultDisabled:!0};function l(e,t){return(0,r.cacheGetEventData)(e,"FIRST_STRUCTURE",(function(){var n=e.rawEvent.shiftKey?null:t.getElementAtCursor(i);if(n){var a=t.getSelectionRange();if(a&&a.collapsed&&(0,r.isPositionAtBeginningOf)(r.Position.getStart(a),n)&&!t.getBodyTraverser(n).getPreviousBlockElement())return t.getElementAtCursor(o[(0,r.getTagOfNode)(n)])}return null}))}t.StructuredNodeFeatures={insertLineBeforeStructuredNodeFeature:a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableFeatures=void 0;var r=n(6),o=n(0),i={keys:[9],shouldHandleEvent:function(e,t){return s(e,t)&&!u(e,t)},handleEvent:function(e,t){for(var n=e.rawEvent.shiftKey,o=c(e,s(e,t)),i=n?-1:1,a=o.row,l=o.col+i;;l+=i){if(l<0||l>=o.cells[a].length){if((a+=i)<0){t.select(o.table,-2);break}if(a>=o.cells.length){(0,r.editTable)(t,1);break}l=n?o.cells[a].length-1:0}var u=o.getCell(a,l);if(u.td){t.select(u.td,0);break}}e.rawEvent.preventDefault()}},a={keys:[9],shouldHandleEvent:function(e,t){return s(e,t)&&u(e,t)},handleEvent:function(e,t){e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var n=e.rawEvent.shiftKey,o=t.getSelectionRangeEx(),i=s(e,t),a=c(e,i);n&&t.getElementAtCursor("blockquote",a.table,e)?(0,r.setIndentation)(t,1):n||(0,r.setIndentation)(t,0),t.select(o.table,o.coordinates)}))}},l={keys:[38,40],shouldHandleEvent:function(e,t){return s(e,t)&&!u(e,t)},handleEvent:function(e,t){var n,r=s(e,t),i=new o.VTable(r),a=38==e.rawEvent.which,l=a?-1:1,u=e.rawEvent.shiftKey,c=null===(n=t.getDocument().defaultView)||void 0===n?void 0:n.getSelection(),d=null;if(c){for(var f=c.anchorNode,h=c.anchorOffset,p=i.row;p>=0&&p<i.cells.length;p+=l){var g=i.getCell(p,i.col);if(g.td&&g.td!=r){d=g.td;break}}t.runAsync((function(e){var t,n=e.getElementAtCursor();if((0,o.contains)(i.table,n)&&!(0,o.contains)(r,n,!0)){var l=d?new o.Position(d,0):new o.Position(i.table,a?-2:-3);if(u){l=1==l.node.nodeType&&(0,o.isVoidHtmlElement)(l.node)?new o.Position(l.node,l.isAtEnd?-3:-2):l;var s=null===(t=e.getDocument().defaultView)||void 0===t?void 0:t.getSelection();null==s||s.setBaseAndExtent(f,h,l.node,l.offset)}else e.select(l)}}))}},defaultDisabled:!o.Browser.isChrome&&!o.Browser.isSafari};function s(e,t){return(0,o.cacheGetEventData)(e,"TABLE_CELL_FOR_TABLE_FEATURES",(function(){var e=t.getFocusedPosition(),n=e&&t.getElementAtCursor("TD,TH,LI",e.node);return n&&("LI"==(0,o.getTagOfNode)(n)?null:n)}))}function u(e,t){return(0,o.cacheGetEventData)(e,"WHOLE_TABLE_SELECTED_FOR_FEATURES",(function(){var n=s(e,t),r=c(e,n),i=t.getSelectionRangeEx();return 1==i.type&&(0,o.isWholeTableSelected)(r,i.coordinates)}))}function c(e,t){return(0,o.cacheGetEventData)(e,"VTABLE_FOR_TABLE_FEATURES",(function(){return new o.VTable(t)}))}t.TableFeatures={tabInTable:i,upDownInTable:l,indentTableOnTab:a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextFeatures=void 0;var r=n(0),o=n(6),i={keys:[9],shouldHandleEvent:function(e,t){return t.isFeatureEnabled("TabKeyTextFeatures")&&!e.rawEvent.shiftKey&&!t.getElementAtCursor("LI,TABLE",null,e)},handleEvent:function(e,t){var n=t.getSelectionRangeEx();0==n.type&&(t.addUndoSnapshot((function(){if(n.areAllCollapsed)u(t,e);else{var i=n.ranges,a=i[0];if(l(t,a))(0,o.setIndentation)(t,0);else{var s=(0,r.createRange)(a.startContainer,a.startOffset);i.forEach((function(e){return e.deleteContents()})),t.select(s),u(t,e)}}})),e.rawEvent.preventDefault())}},a={keys:[9],shouldHandleEvent:function(e,t){if(e.rawEvent.shiftKey&&t.isFeatureEnabled("TabKeyTextFeatures")){var n=t.getSelectionRangeEx();return 0==n.type&&!n.areAllCollapsed&&t.getElementAtCursor("blockquote",null,e)&&!t.getElementAtCursor("LI,TABLE",null,e)&&l(t,n.ranges[0])}return!1},handleEvent:function(e,t){t.addUndoSnapshot((function(){return(0,o.setIndentation)(t,1)})),e.rawEvent.preventDefault()}};function l(e,t){var n=!1,o=r.Position.getStart(t),i=r.Position.getEnd(t),a=e.getBlockElementAtNode(o.node),l=e.getBlockElementAtNode(i.node);if(a.equals(l)){var u=new r.Position(a.getStartNode(),0),c=new r.Position(a.getEndNode(),-1),d=(0,r.createRange)(u,r.Position.getStart(t)),f=(0,r.createRange)(r.Position.getEnd(t),c);return!n&&s(d)&&s(f)&&(n=!0),n}return!0}function s(e){return""==e.toString()&&0==(0,r.queryElements)(e.commonAncestorContainer,"img,table,ul,ol",null,2,e).length}function u(e,t){for(var n,o=e.getDocument().createElement("span"),i=6-e.getContentSearcherOfCursor(t).getSubStringBefore(Number.MAX_SAFE_INTEGER).length%6,a="",l=0;l<i;l++)a+="&ensp;";e.insertNode(o),o.nextElementSibling&&"A"==(0,r.getTagOfNode)(o.nextElementSibling)&&((n=e.getDocument().createElement("span")).textContent=" ",e.insertNode(n),e.select((0,r.createRange)(n,-2))),e.insertContent(a,{position:5,range:(0,r.createRange)(o,0),updateCursor:!1}),e.select((0,r.createRange)(o,-3)),n&&e.deleteNode(n)}t.TextFeatures={indentWhenTabText:i,outdentWhenTabText:a}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(223),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenu=void 0;var r=n(224);Object.defineProperty(t,"ContextMenu",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e){var t=this;this.options=e,this.onDismiss=function(){var e,n;t.container&&t.isMenuShowing&&(null===(n=(e=t.options).dismiss)||void 0===n||n.call(e,t.container),t.isMenuShowing=!1)}}return e.prototype.getName=function(){return"ContextMenu"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.onDismiss(),this.container&&(this.container.parentNode.removeChild(this.container),this.container=null),this.editor=null},e.prototype.onPluginEvent=function(e){if(16==e.eventType&&e.items.length>0){var t=e.rawEvent,n=e.items;this.onDismiss(),this.options.allowDefaultMenu||t.preventDefault(),this.initContainer(t.pageX,t.pageY),this.options.render(this.container,n,this.onDismiss),this.isMenuShowing=!0}},e.prototype.initContainer=function(e,t){this.container||(this.container=(0,r.createElement)(5,this.editor.getDocument()),this.editor.getDocument().body.appendChild(this.container)),this.container.style.left=e+"px",this.container.style.top=t+"px"},e}();t.default=o},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(226),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomReplace=void 0;var r=n(227);Object.defineProperty(t,"CustomReplace",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n,r){return{sourceString:e,replacementHTML:t,matchSourceCaseSensitive:n,shouldReplace:r}},o=[r(":)","🙂",!0),r(";)","😉",!0),r(":O","😲",!0),r(":o","😯",!0),r("<3","❤️",!0)],i=function(){function e(e){void 0===e&&(e=o),this.updateReplacements(e)}return e.prototype.updateReplacements=function(e){var t;this.replacements=e,this.longestReplacementLength=(t=this.replacements,Math.max.apply(null,t.map((function(e){return e.sourceString.length})))),this.replacementEndCharacters=function(e){for(var t=new Set,n=0,r=e;n<r.length;n++){var o=r[n],i=o.sourceString;if(0!=i.length){var a=i[i.length-1];o.matchSourceCaseSensitive?t.add(a):(t.add(a.toLocaleLowerCase()),t.add(a.toLocaleUpperCase()))}}return t}(this.replacements)},e.prototype.getName=function(){return"CustomReplace"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){var t=this;if(3==e.eventType&&!this.editor.isInIME()&&(e.rawEvent.data&&this.replacementEndCharacters.has(e.rawEvent.data)&&null!=this.editor.getSelectionRange())){var n=this.editor.getContentSearcherOfCursor(e),r=n.getSubStringBefore(this.longestReplacementLength),o=this.getMatchingReplacement(r);if(null!=o&&(!o.shouldReplace||o.shouldReplace(o,n.getWordBefore()))){var i=n.getSubStringBefore(o.sourceString.length),a=n.getRangeFromText(i,!0),l=this.editor.getDocument().createElement("span");l.innerHTML=this.editor.getTrustedHTMLHandler()(o.replacementHTML);var s=1==l.childNodes.length?l.childNodes[0]:l;this.editor.addUndoSnapshot((function(){a.deleteContents(),a.insertNode(s),t.editor.select(s,-1)}),null,!0)}}},e.prototype.getMatchingReplacement=function(e){if(0==e.length)return null;for(var t=e.replace(/\s/g," "),n=t.toLocaleLowerCase(),r=0,o=this.replacements;r<o.length;r++){var i=o[r],a=i.matchSourceCaseSensitive?[t,i.sourceString]:[n,i.sourceString.toLocaleLowerCase()],l=a[0],s=a[1];if(l.substring(l.length-s.length)==s)return i}return null},e}();t.default=i},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(229),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CutPasteListChain=void 0;var r=n(230);Object.defineProperty(t,"CutPasteListChain",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=n(0),i=function(){function e(){var e=this;this.onDrop=function(){e.cacheListChains("Drop")}}return e.prototype.getName=function(){return"CutPasteListChain"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.editor.addDomEventHandler("drop",this.onDrop)},e.prototype.dispose=function(){var e;null===(e=this.disposer)||void 0===e||e.call(this),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){var t;switch(e.eventType){case 9:e.isCut&&this.cacheListChains("Cut");break;case 10:this.cacheListChains("Paste");break;case 7:(null===(t=this.chains)||void 0===t?void 0:t.length)>0&&this.expectedChangeSource==e.source&&((0,r.experimentCommitListChains)(this.editor,this.chains),this.chains=null,this.expectedChangeSource=null)}},e.prototype.cacheListChains=function(e){this.chains=o.VListChain.createListChains(this.editor.getSelectedRegions()),this.expectedChangeSource=e},e}();t.default=i},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(232),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HyperLink=void 0;var r=n(233);Object.defineProperty(t,"HyperLink",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e,t,n){var r=this;void 0===e&&(e=function(e){return e}),this.getTooltipCallback=e,this.target=t,this.onLinkClick=n,this.trackedLink=null,this.onMouse=function(e){var t=r.editor.getElementAtCursor("a[href]",e.target),n=r.tryGetHref(t);n&&r.editor.setEditorDomAttribute("title","mouseover"==e.type?r.getTooltipCallback(n,t):null)},this.onBlur=function(e){r.trackedLink&&r.updateLinkHrefIfShouldUpdate(),r.resetLinkTracking()}}return e.prototype.getName=function(){return"Hyperlink"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.getTooltipCallback&&e.addDomEventHandler({mouseover:this.onMouse,mouseout:this.onMouse,blur:this.onBlur})},e.prototype.dispose=function(){this.disposer&&(this.disposer(),this.disposer=null),this.editor=null},e.prototype.onPluginEvent=function(e){if(6==e.eventType||2==e.eventType&&(!this.isContentEditValue(e.rawEvent)||32==e.rawEvent.which)||7==e.eventType){var t=(n=this.editor.getElementAtCursor("A[href]",null,e))!==this.trackedLink||2==e.eventType||7==e.eventType;this.trackedLink&&(t||this.tryGetHref(this.trackedLink)!==this.originalHref)&&(t&&this.updateLinkHrefIfShouldUpdate(),this.resetLinkTracking()),!this.trackedLink&&this.doesLinkDisplayMatchHref(n)&&(this.trackedLink=n,this.originalHref=this.tryGetHref(n))}var n;if(6==e.eventType&&(n=this.editor.getElementAtCursor("A",e.rawEvent.srcElement))){if(this.onLinkClick&&!1!==this.onLinkClick(n,e.rawEvent))return;var o=void 0;if(!r.Browser.isFirefox&&(o=this.tryGetHref(n))&&(0,r.isCtrlOrMetaPressed)(e.rawEvent)&&0===e.rawEvent.button)try{var i=this.target||"_blank";this.editor.getDocument().defaultView.open(o,i)}catch(e){}}},e.prototype.tryGetHref=function(e){try{return e?e.href:null}catch(e){}},e.prototype.isContentEditValue=function(e){return(0,r.isCharacterValue)(e)||8==e.which||46==e.which},e.prototype.updateLinkHrefIfShouldUpdate=function(){this.doesLinkDisplayMatchHref(this.trackedLink)||this.updateLinkHref()},e.prototype.resetLinkTracking=function(){this.trackedLink=null,this.originalHref=""},e.prototype.doesLinkDisplayMatchHref=function(e){if(e){var t=e.innerText.trim().replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),n=new RegExp("^(?:https?:\\/\\/)?"+t+"\\/?","i"),r=this.tryGetHref(e);if(null!==r)return n.test(r)}return!1},e.prototype.updateLinkHref=function(){var e=this;if(this.trackedLink){var t=(0,r.matchLink)(this.trackedLink.innerText.trim());null!==t&&this.editor.addUndoSnapshot((function(){e.trackedLink.href=t.normalizedUrl}))}},e}();t.default=o},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(235),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetImage=t.isResizedTo=t.resizeByPercentage=t.canRegenerateImage=t.ImageEdit=void 0;var r=n(97);Object.defineProperty(t,"ImageEdit",{enumerable:!0,get:function(){return r.default}});var o=n(100);Object.defineProperty(t,"canRegenerateImage",{enumerable:!0,get:function(){return o.default}});var i=n(239);Object.defineProperty(t,"resizeByPercentage",{enumerable:!0,get:function(){return i.default}});var a=n(103);Object.defineProperty(t,"isResizedTo",{enumerable:!0,get:function(){return a.default}});var l=n(240);Object.defineProperty(t,"resetImage",{enumerable:!0,get:function(){return l.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(52);t.default=function(e,t){var n=t.angleRad,o=t.widthPx,i=t.heightPx,a=t.bottomPercent,l=t.leftPercent,s=t.rightPercent,u=t.topPercent,c=t.naturalWidth,d=t.naturalHeight,f=c*(1-l-s),h=d*(1-u-a),p=document.createElement("canvas"),g=(0,r.default)(t),v=g.targetWidth,m=g.targetHeight;p.width=v,p.height=m;var y=p.getContext("2d");return y.translate(v/2,m/2),y.rotate(n),y.drawImage(e,c*l,d*u,f,h,-o/2,-i/2,o,i),p.toDataURL("image/png",1)}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getCropHTML=t.Cropper=void 0;var o=n(101),i=["w","e"],a=["s","n"],l={sw:0,nw:90,ne:180,se:270};function s(e,t,n,r,o){var i=n*(1-r)-o,a=n*e+t;return Math.max(Math.min(a,i),0)/n}function u(){var e=[];return[0,1].forEach((function(t){return[0,1].forEach((function(n){e.push(function(e,t){return{tag:"div",style:"position:absolute;left:"+e+"px;bottom:"+e+"px;"+(0==t?"right:"+e+"px;height:"+(7-2*e)+"px;":"top:"+e+"px;width:"+(7-2*e)+"px;")+";background-color:"+(0==e?"white":"black")}}(t,n))}))})),e}t.Cropper={onDragStart:function(e){var t=e.editInfo;return r({},t)},onDragging:function(e,t,n,r,i){var a,l=e.editInfo,u=e.x,c=e.y,d=e.options;r=(a=(0,o.rotateCoordinate)(r,i,l.angleRad))[0],i=a[1];var f=l.widthPx,h=l.heightPx,p=l.leftPercent,g=l.rightPercent,v=l.topPercent,m=l.bottomPercent,y=d.minWidth,b=d.minHeight,E=1-p-g,C=1-v-m;if(E>0&&C>0){var S=f/E,w=h/C,P="e"!=u?s(n.leftPercent,r,S,g,y):p,T="w"!=u?s(n.rightPercent,-r,S,p,y):g,O="s"!=c?s(n.topPercent,i,w,m,b):v,x="n"!=c?s(n.bottomPercent,-i,w,v,b):m;return l.leftPercent=P,l.rightPercent=T,l.topPercent=O,l.bottomPercent=x,l.widthPx=S*(1-P-T),l.heightPx=w*(1-O-x),!0}return!1}},t.getCropHTML=function(){var e={tag:"div",style:"position:absolute;background-color:rgb(0,0,0,0.5);pointer-events:none",className:"r_cropO"},t={tag:"div",style:"position:absolute;overflow:hidden",className:"r_cropC",children:[]};return i.forEach((function(e){return a.forEach((function(n){return t.children.push(function(e,t){return{tag:"div",className:"r_cropH",style:"position:absolute;pointer-events:auto;cursor:"+t+e+"-resize;"+("w"==e?"left":"right")+":0;"+("n"==t?"top":"bottom")+":0;width:22px;height:22px;transform:rotate("+l[t+e]+"deg)",dataset:{x:e,y:t},children:u()}}(e,n))}))})),[t,e,e,e,e]}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getRotateHTML=t.updateRotateHandlePosition=t.Rotator=void 0;var o=180/Math.PI;function i(e){var t;return{tag:"svg",namespace:"http://www.w3.org/2000/svg",style:"width:16px;height:16px;margin: 8px 8px",children:[{tag:"path",namespace:"http://www.w3.org/2000/svg",attributes:(t={d:"M 10.5,10.0 A 3.8,3.8 0 1 1 6.7,6.3",transform:"matrix(1.1 1.1 -1.1 1.1 11.6 -10.8)"},t["fill-opacity"]="0",t.stroke=e,t)},{tag:"path",namespace:"http://www.w3.org/2000/svg",attributes:{d:"M12.0 3.648l.884-.884.53 2.298-2.298-.53z",stroke:e}}]}}t.Rotator={onDragStart:function(e){var t=e.editInfo;return r({},t)},onDragging:function(e,t,n,r,i){var a=e.editInfo,l=e.options,s=a.heightPx/2+31,u=s*Math.sin(n.angleRad)+r,c=s*Math.cos(n.angleRad)-i,d=Math.atan2(u,c);if(!t.altKey){var f=d*o;d=Math.round(f/l.minRotateDeg)*l.minRotateDeg/o}return a.angleRad!=d&&(a.angleRad=d,!0)}},t.updateRotateHandlePosition=function(e,t,n,r,o){if(r&&o&&t){var i=e.angleRad,a=e.heightPx,l=Math.cos(i),s=l<=0?Number.MAX_SAFE_INTEGER:(t[1]+a/2+n)/l-a/2,u=Math.max(Math.min(15,s),0),c=Math.max(Math.min(32,s-u),0);r.style.top=-u+"px",r.style.height=u+"px",o.style.top=-c+"px"}},t.getRotateHTML=function(e){var t=e.borderColor;return[{tag:"div",className:"r_rotateC",style:"position:absolute;left:50%;width:1px;background-color:"+t,children:[{tag:"div",className:"r_rotateH",style:"position:absolute;background-color:"+e.rotateHandleBackColor+";border:solid 1px "+t+";border-radius:50%;width:32px;height:32px;left:-16px;cursor:move",children:[i(t)]}]}]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(98),o=n(102),i=n(103),a=n(26);t.default=function(e,t,n,l,s){var u,c,d,f=(0,a.getEditInfoFromImage)(t);(0,i.default)(t,n)||(u=t,c=f.src,d=function(){if(!e.isDisposed()&&e.contains(t)){var i=t.getAttribute("src"),a=(0,o.default)(f,n),u=a.width,c=a.height;f.widthPx=Math.max(u,l),f.heightPx=Math.max(c,s),e.addUndoSnapshot((function(){(0,r.default)(e,t,f,i,!0)}),"ImageResize")}},u.onload=function(){u.onload=null,u.onerror=null,d()},u.onerror=function(){u.onload=null,u.onerror=null,d()},u.src=c)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26);t.default=function(e,t){e.addUndoSnapshot((function(){t.style.width="",t.style.height="",t.style.maxWidth="100%",t.removeAttribute("width"),t.removeAttribute("height"),(0,r.deleteEditInfo)(t)}),"ImageResize")}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(242),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageResize=void 0;var r=n(243);Object.defineProperty(t,"ImageResize",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n,r,o,i){return void 0===t&&(t=10),void 0===n&&(n=10),void 0===r&&(r="#DB626C"),void 0===o&&(o=!1),void 0===i&&(i="img"),e.call(this,{minHeight:n,minWidth:t,borderColor:r,preserveRatio:o,imageSelector:i})||this}return o(t,e),t.prototype.showResizeHandle=function(e){this.setEditingImage(e,3)},t.prototype.hideResizeHandle=function(e){this.setEditingImage(null,e)},t}(n(97).default);t.default=i},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(245),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Paste=void 0;var r=n(246);Object.defineProperty(t,"Paste",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(247),o=n(248),i=n(249),a=n(250),l=n(251),s=n(255),u=n(0),c=n(256),d=function(){function e(e){void 0===e&&(e="SPAN"),this.unknownTagReplacement=e}return e.prototype.getName=function(){return"Paste"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){var t;if(10==e.eventType){var n=e.htmlAttributes,d=e.fragment,f=e.sanitizingOption,h=e.clipboardData,p=this.editor.getTrustedHTMLHandler(),g=void 0;"urn:schemas-microsoft-com:office:word"==n["xmlns:w"]?(0,l.default)(e):"urn:schemas-microsoft-com:office:excel"==n["xmlns:x"]||"Excel.Sheet"==n.ProgId?(0,i.default)(e,p):"PowerPoint.Slide"==n.ProgId?(0,a.default)(e,p):(g=(0,u.toArray)(d.querySelectorAll('ul[class^="BulletListStyle"]>.OutlineElement,ol[class^="NumberListStyle"]>.OutlineElement,span.WACImageContainer')))&&g.length>0?(g.forEach((function(e){e.style.display=null,e.style.margin=null})),(0,c.isWordOnlineWithList)(d)&&(0,c.default)(d)):d.querySelector("google-sheets-html-origin")?f.additionalTagReplacements["google-sheets-html-origin"]="*":this.editor.isFeatureEnabled("ConvertSingleImageBody")&&1==(null===(t=h.htmlFirstLevelChildTags)||void 0===t?void 0:t.length)&&"IMG"==h.htmlFirstLevelChildTags[0]?(0,r.default)(e,p):((0,o.default)(d),(0,s.default)(d)),f.unknownTagReplacement=this.unknownTagReplacement}},e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){var n=e.fragment,o=e.clipboardData,i=o.html,a=o.image;if(i&&a){var l=(new DOMParser).parseFromString(t(i),"text/html");(0,r.moveChildNodes)(n,null==l?void 0:l.body)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);function o(e){if(e&&!e.nextSibling&&["OL","UL","MENU"].indexOf((0,r.getTagOfNode)(e))<0){var t=!1;if((0,r.toArray)(e.childNodes).every((function(e){var n;return!(!(0,r.safeInstanceOf)(e,"Text")||(null===(n=e.nodeValue)||void 0===n?void 0:n.trim()))||"LI"==(0,r.getTagOfNode)(e)&&(t=!0,!0)}))&&t)return!0}return!1}t.default=function(e){o(e)?(0,r.wrap)((0,r.toArray)(e.childNodes),"UL"):(0,r.safeInstanceOf)(e.firstChild,"HTMLElement")&&o(e.firstChild)&&(0,r.changeElementTag)(e.firstChild,"UL")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.excelHandler=void 0;var r=n(0),o=/<\/\s*td\s*>((?!<\/\s*tr\s*>)[\s\S])*$/i,i=/<\/\s*tr\s*>((?!<\/\s*table\s*>)[\s\S])*$/i,a=/<tr[^>]*>[^<]*/i,l=/<table[^>]*>[^<]*/i;function s(e,t){if(e.match(o)){var n=t.match(a);e=(n?n[0]:"<TR>")+e+"</TR>"}if(e.match(i)){var r=t.match(l);e=(r?r[0]:"<TABLE>")+e+"</TABLE>"}return e}t.default=function(e,t){var n=e.fragment,o=e.sanitizingOption,i=e.htmlBefore,a=e.clipboardData,l=s(a.html,i);if(a.html!=l){var u=(new DOMParser).parseFromString(t(l),"text/html");(0,r.moveChildNodes)(n,null==u?void 0:u.body)}(0,r.chainSanitizerCallback)(o.elementCallbacks,"TD",(function(e){return"none"==e.style.borderStyle&&(e.style.border="solid 1px #d4d4d4"),!0}))},t.excelHandler=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t){var n=e.fragment,o=e.clipboardData;if(o.html&&!o.text&&o.image){var i=(new DOMParser).parseFromString(t(o.html),"text/html");(0,r.moveChildNodes)(n,null==i?void 0:i.body)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(252),i=n(253),a=n(254);t.default=function(e){var t=e.sanitizingOption,n=e.fragment;(0,r.chainSanitizerCallback)(t.elementCallbacks,"O:P",(function(e){return(0,r.moveChildNodes)(e),e.appendChild(e.ownerDocument.createTextNode(" ")),!0}));var l=(0,o.createWordConverter)(),s=n.querySelectorAll("p");s.length>0&&(l.wordConverterArgs=(0,i.createWordConverterArguments)(s),(0,a.processNodesDiscovery)(l)&&(0,a.processNodeConvert)(l))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWordConverter=void 0;var r=n(104);t.createWordConverter=function(){return{nextUniqueId:1,numBulletsConverted:0,numNumberedConverted:0,wordConverterArgs:null,wordCustomData:(0,r.createCustomData)()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWordConverterArguments=void 0;var r=n(105);t.createWordConverterArguments=function(e){return{nodes:e,currentIndex:0,lists:{},listItems:[],currentListIdsByLevels:[(0,r.createLevelLists)()],lastProcessedItem:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processNodeConvert=t.processNodesDiscovery=void 0;var r=n(105),o=n(104),i=n(0),a=/[\n|\r]/gi;function l(e,t,n,r){var a=function e(t,n,r){var o,a=null;1==n?o=h(t):(a=e(t,n-1,null),o=a.lastChild);if(o&&1==o.nodeType){var l=(0,i.getTagOfNode)(o);if("UL"==l||"OL"==l)return o}var s=t.ownerDocument.createElement(r?r.tagName:"UL");1==n?t.parentNode.insertBefore(s,t):a.appendChild(s);return s}(t,n.level,r),l=(0,o.getObject)(e.wordCustomData,a,"UniqueListId");if(l&&l!=n.uniqueListId||!l&&a.firstChild){var s=t.ownerDocument.createElement(r.tagName);a.parentNode.insertBefore(s,a.nextSibling),a=s}return(0,o.setObject)(e.wordCustomData,a,"UniqueListId",n.uniqueListId),function(e,t,n){if(n.tagName!=(0,i.getTagOfNode)(t)){var r=t.ownerDocument.createElement(n.tagName);(0,o.setObject)(e.wordCustomData,r,"UniqueListId",(0,o.getObject)(e.wordCustomData,t,"UniqueListId")),(0,i.moveChildNodes)(r,t),t.parentNode.insertBefore(r,t),t.parentNode.removeChild(t),t=r}return t}(e,a,r)}function s(e,t){for(var n=[],r=e.firstChild;r;r=r.nextSibling)1==r.nodeType&&t>1&&s(r,t-1),(v(r=f(r,!0))||g(r))&&n.push(r);n.forEach((function(t){return e.removeChild(t)}))}function u(e){if(1==e.nodeType){var t=m(e,"mso-list");if(t&&t.length>0)try{var n=t.split(" ");if(3==n.length)return{level:parseInt(n[1].substr("level".length)),wordListId:t,originalNode:e,uniqueListId:0}}catch(e){}}return null}function c(e){return["o","·","§","-"].indexOf(e)>=0}function d(e,t){for(var n=null,r=e.firstChild;!n&&r;)g(r=f(r,!0))?0==(n=r.textContent.trim()).length&&(n="o"):1==r.nodeType&&t>1&&(n=d(r,t-1)),r=r.nextSibling;return n}function f(e,t){if(8==e.nodeType){var n=e.data;if(n&&"[if !supportlists]"==n.trim().toLowerCase()){for(var r=e,o=null,i=0;i<4&&(r=p(r));i++)if(8==r.nodeType&&(n=r.data)&&"[endif]"==n.trim().toLowerCase()){o=r;break}if(o){var a=e.ownerDocument.createElement("span");for(a.setAttribute("style","mso-list: ignore"),r=p(e);r!=o;)r=r.nextSibling,a.appendChild(r.previousSibling);o.parentNode.insertBefore(a,o),t&&(e.parentNode.removeChild(e),o.parentNode.removeChild(o)),e=a}}}return e}function h(e){var t=e;do{t=t.previousSibling}while(t&&y(t));return t}function p(e){var t=e;do{t=t.nextSibling}while(t&&y(t));return t}function g(e){if(1==e.nodeType){var t=m(e,"mso-list");if(t&&t.length>0&&"ignore"==t.trim().toLowerCase())return!0}return!1}function v(e){return"SPAN"==(0,i.getTagOfNode)(e)&&!e.firstChild}function m(e,t){return(0,i.getStyles)(e)[t]||null}function y(e){if(!e)return!0;if(3==e.nodeType){var t=e.nodeValue;return 0==(t=t.replace(a,"")).trim().length}var n=(0,i.getTagOfNode)(e);return e.firstChild==e.lastChild&&("SPAN"==n||"FONT"==n)&&y(e.firstChild)}function b(e){for(var t=0;t<e.currentListIdsByLevels.length;t++){var n=e.currentListIdsByLevels[t];n&&(n.currentUniqueListId=-1)}}t.processNodesDiscovery=function(e){for(var t,n=e.wordConverterArgs;n.currentIndex<n.nodes.length;){var o=n.nodes.item(n.currentIndex),a=u(o);if(a){var l=n.currentListIdsByLevels[a.level-1]||(0,r.createLevelLists)();n.currentListIdsByLevels[a.level-1]=l,n.lastProcessedItem&&h(o)!=n.lastProcessedItem&&b(n);var s=l.listsMetadata[a.wordListId];if(s){if(!s.ignore&&1==s.numberOfItems){var f=d(o,5);s.tagName=s.firstFakeBullet==f?"UL":"OL"}}else{var p=d(o,5);s={numberOfItems:0,uniqueListId:e.nextUniqueId++,firstFakeBullet:p,ignore:!p||0==p.length,tagName:(t=p,c(t)?"UL":"OL")},l.listsMetadata[a.wordListId]=s,n.lists[s.uniqueListId.toString()]=s}a.uniqueListId=s.uniqueListId,s.ignore||"OL"==s.tagName&&s.numberOfItems>0&&l.currentUniqueListId!=a.uniqueListId?(s.ignore=!0,n.currentListIdsByLevels[0].currentUniqueListId=-1,n.currentListIdsByLevels=n.currentListIdsByLevels.slice(0,1)):(n.currentListIdsByLevels.length>a.level&&(n.currentListIdsByLevels=n.currentListIdsByLevels.slice(0,a.level)),l.currentUniqueListId=a.uniqueListId,n.listItems.push(a),s.numberOfItems++),n.lastProcessedItem=o}else{var g=n.lastProcessedItem;g&&h(o)==g&&o.tagName==g.tagName&&o.className==g.className&&(g.appendChild(g.ownerDocument.createElement("br")),g.appendChild(g.ownerDocument.createElement("br")),(0,i.moveChildNodes)(g,o,!0),o.parentNode.removeChild(o))}n.currentIndex++}return n.listItems.length>0},t.processNodeConvert=function(e){var t=e.wordConverterArgs;for(t.currentIndex=0;t.currentIndex<t.listItems.length;){var n=t.listItems[t.currentIndex],r=n.originalNode,o=t.lists[n.uniqueListId.toString()];if(!o.ignore){var a=l(e,r,n,o);if(a){s(r,5);var u=r.ownerDocument.createElement("LI");(0,i.moveChildNodes)(u,r),a.appendChild(u),r.parentNode.removeChild(r),"UL"==o.tagName?e.numBulletsConverted++:e.numNumberedConverted++}}t.currentIndex++}return e.numBulletsConverted>0||e.numNumberedConverted>0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);function o(e){var t,n,o=e.start,i=e.end;if(o==i&&"DIV"==(0,r.getTagOfNode)(o)){var a=(0,r.changeElementTag)(o,"SPAN");e.start=a,e.end=a,"BR"==(0,r.getTagOfNode)(a.lastChild)&&a.removeChild(a.lastChild)}else if("BR"==(0,r.getTagOfNode)(i)){a=i.ownerDocument.createTextNode("");null===(t=i.parentNode)||void 0===t||t.insertBefore(a,i),e.end=a,null===(n=i.parentNode)||void 0===n||n.removeChild(i)}}function i(e,t,n){var o,i=(0,r.getBlockElementAtNode)(e,t.start),a=n?(0,r.getNextLeafSibling)(e,t.end):(0,r.getPreviousLeafSibling)(e,t.start);(null==i?void 0:i.contains(a))&&(null===(o=(n?t.end:t.start).parentNode)||void 0===o||o.insertBefore(t.start.ownerDocument.createElement("br"),n?t.end.nextSibling:t.start))}t.default=function(e){for(var t=r.ContentTraverser.createBodyTraverser(e),n=[],a=null==t?void 0:t.currentBlockElement;a;a=t.getNextBlockElement())n.push({start:a.getStartNode(),end:a.getEndNode()});n.length>0&&(o(n[0]),o(n[n.length-1]),i(e,n[0],!0),i(e,n[n.length-1],!1))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWordOnlineWithList=void 0;var r=n(257),o=n(0),i='div.ListContainerWrapper>ul[class^="BulletListStyle"],div.ListContainerWrapper>ol[class^="NumberListStyle"],span.WACImageContainer > img';function a(e,t,n){if(e){var r,o=n.insertPositionNode;if(o)(r=o.parentNode)&&r.insertBefore(e,o);else(r=n.startElement.parentNode)?r.appendChild(e):t.appendChild(e)}}t.isWordOnlineWithList=function(e){return!(!e||!e.querySelector(i))},t.default=function(e){!function(e){(0,o.toArray)(e.querySelectorAll(i)).forEach((function(e){var t=new RegExp("\\bListContainerWrapper\\b","g");if(e.previousSibling){var n=(0,o.splitParentNode)(e,!0);n.className=n.className.replace(t,"")}if(e.nextSibling){var r=(0,o.splitParentNode)(e,!1);r.className=r.className.replace(t,"")}}))}(e),function(e){for(var t,n=e.querySelectorAll(".ListContainerWrapper"),i=[],a=0;a<n.length;a++){var l=n[a];if(t){var s=t.listItemContainers,u=s[s.length-1];l==u.nextSibling||(0,o.getFirstLeafNode)(l)==(0,o.getNextLeafSibling)(u.parentNode,u)?(s.push(l),t.endElement=l):(t.endElement=u,i.push(t),t=(0,r.createListItemBlock)(l))}else t=(0,r.createListItemBlock)(l)}(null==t?void 0:t.listItemContainers.length)>0&&i.push(t);return i}(e).forEach((function(t){var n;!function(e,t){(0,o.collapseNodes)(e,t.startElement,t.endElement,!0).forEach((function(e){"DIV"==(0,o.getTagOfNode)(e.firstChild)&&(0,o.unwrap)(e)}))}(e,t),t.insertPositionNode=t.endElement.nextSibling;var r=e.ownerDocument;t.listItemContainers.forEach((function(i){var l=function(e){var t=(0,o.getTagOfNode)(e.firstChild);return"UL"==t||"OL"==t?t:null}(i);n||(n=r.createElement(l)),(0,o.toArray)(i.querySelectorAll("li")).forEach((function(i){var s=parseInt(i.getAttribute("data-aria-level"));(0,o.getTagOfNode)(n)!=l&&1==s&&(a(n,e,t),n=r.createElement(l)),function(e,t,n,r){if(!n)return;var i=parseInt(t.getAttribute("data-aria-level")),a=e;for(;i>1;){if(a.firstChild){var l=a.lastElementChild,s=(0,o.getTagOfNode)(l);"UL"==s||"OL"==s?a=l:(a.appendChild(r.createElement(n)),a=a.lastElementChild)}else a.appendChild(r.createElement(n)),a=a.firstElementChild;i--}a.appendChild(t)}(n,i,l,r)}))})),a(n,e,t);var i=t.startElement.parentNode;i&&t.listItemContainers.forEach((function(e){i.removeChild(e)}))})),function(e){return e.querySelectorAll(".WACImageContainer")}(e).forEach((function(e){(0,o.safeInstanceOf)(e,"HTMLSpanElement")&&e.childNodes.forEach((function(e){"IMG"!=(0,o.getTagOfNode)(e)&&e.parentElement.removeChild(e)}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createListItemBlock=void 0,t.createListItemBlock=function(e){return void 0===e&&(e=null),{startElement:e,endElement:e,insertPositionNode:null,listItemContainers:e?[e]:[]}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(259),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PickerPlugin=void 0;var r=n(260);Object.defineProperty(t,"PickerPlugin",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=n(0),i=o.Browser.isIE?"Esc":"Escape",a=o.Browser.isIE?"Left":"ArrowLeft",l=o.Browser.isIE?"Up":"ArrowUp",s=o.Browser.isIE?"Right":"ArrowRight",u=o.Browser.isIE?"Down":"ArrowDown",c=o.Browser.isIE?"Del":"Delete",d=[0,229],f=function(){function e(e,t){this.dataProvider=e,this.pickerOptions=t,this.isPendingInputEventHandling=!1}return e.prototype.getName=function(){return"Picker"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.dataProvider.onInitalize((function(e){t.editor.focus();var n=t.getWord(null);n&&0!=n.length||!t.lastKnownRange||(t.editor.select(t.lastKnownRange),n=t.getWord(null));t.editor.addUndoSnapshot((function(){n?(0,r.replaceWithNode)(t.editor,n,e,!0):t.editor.insertNode(e),t.setIsSuggesting(!1)}),t.pickerOptions.changeSource,t.pickerOptions.handleAutoComplete)}),(function(e){t.setIsSuggesting(e)}),e)},e.prototype.dispose=function(){this.editor=null,this.dataProvider.onDispose()},e.prototype.willHandleEventExclusively=function(e){return this.isSuggesting&&(0==e.eventType||2==e.eventType||3==e.eventType)},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 7:if("SetContent"==e.source&&this.dataProvider.onContentChanged){this.isSuggesting&&this.setIsSuggesting(!1);var t=[];this.editor.queryElements("[id^='"+this.pickerOptions.elementIdPrefix+"']",(function(e){e.id&&t.push(e.id)})),this.dataProvider.onContentChanged(t)}break;case 0:this.eventHandledOnKeyDown=!1,this.isAndroidKeyboardEvent(e)?(this.currentInputLength=this.calcInputLength(e),this.isPendingInputEventHandling=!0):(this.onKeyDownEvent(e),this.isPendingInputEventHandling=!1);break;case 3:this.isPendingInputEventHandling&&this.onAndroidInputEvent(e);break;case 2:!this.eventHandledOnKeyDown&&this.shouldHandleKeyUpEvent(e)&&(this.onKeyUpDomEvent(e),this.isPendingInputEventHandling=!1);break;case 6:this.isSuggesting&&this.setIsSuggesting(!1);break;case 14:this.dataProvider.onScroll&&this.dataProvider.onScroll(e.scrollContainer)}},e.prototype.setLastKnownRange=function(e){this.lastKnownRange=e},e.prototype.setIsSuggesting=function(e){this.isSuggesting=e,e||this.setLastKnownRange(null),this.dataProvider.onIsSuggestingChanged(e),this.setAriaOwns(e),this.setAriaActiveDescendant(e?0:null)},e.prototype.cancelDefaultKeyDownEvent=function(e){this.eventHandledOnKeyDown=!0,e.rawEvent.preventDefault(),e.rawEvent.stopImmediatePropagation()},e.prototype.getIdValue=function(e){var t=e;return t.attributes&&t.attributes.getNamedItem("id")?t.attributes.getNamedItem("id").value:null},e.prototype.getWordBeforeCursor=function(e){var t=this.editor.getContentSearcherOfCursor(e);return t?t.getWordBefore():null},e.prototype.replaceNode=function(e,t){e&&this.editor.deleteNode(e),t&&this.editor.insertNode(t)},e.prototype.getRangeUntilAt=function(e){var t,n,r=this;return this.editor.getContentSearcherOfCursor(e).forEachTextInlineElement((function(e){for(var o=!1,i=e.getTextContent(),a=i?i.length:-1;a>=0;){if(i[a]==r.pickerOptions.triggerCharacter){t=e.getStartPosition().move(a),o=!0;break}a--}return o&&(n=e.getEndPosition()),o})),(0,o.createRange)(t,n)||this.editor.getDocument().createRange()},e.prototype.shouldHandleKeyUpEvent=function(e){return this.isAndroidKeyboardEvent(e)||(0,o.isCharacterValue)(e.rawEvent)||this.isSuggesting&&!(0,o.isModifierKey)(e.rawEvent)},e.prototype.onKeyUpDomEvent=function(e){if(this.isSuggesting){var t=(r=(n=this.getWord(e)).substring(1)).trim();n==this.pickerOptions.triggerCharacter||t&&t.length>0&&t.split(" ").length<=4?(this.dataProvider.queryStringUpdated(t,r==t),this.setLastKnownRange(this.editor.getSelectionRange())):this.setIsSuggesting(!1)}else{var n=this.getWordBeforeCursor(e);if(this.blockSuggestions)null!=n&&n[0]!=this.pickerOptions.triggerCharacter&&(this.blockSuggestions=!1);else if(null!=n&&n.split(" ").length<=4&&n[0]==this.pickerOptions.triggerCharacter){this.setIsSuggesting(!0);var r;t=(r=n.substring(1)).trim();if(this.dataProvider.queryStringUpdated(t,r==t),this.setLastKnownRange(this.editor.getSelectionRange()),this.dataProvider.setCursorPoint){var o=this.editor.getContentSearcherOfCursor(e),i=this.editor.getDocument().createRange(),a=o.getInlineElementBefore().getContainerNode();if(!this.setRangeStart(i,a,n)){var l=a.previousSibling;this.setRangeStart(i,l,this.pickerOptions.triggerCharacter)}var s=i.getBoundingClientRect();if(0==s.left&&0==s.bottom&&0==s.top&&(s=i.getClientRects()[0]),s){i.detach();var u={x:s.left,y:(s.bottom+s.top)/2},c=(s.bottom-s.top)/2;this.dataProvider.setCursorPoint(u,c)}}}}},e.prototype.onKeyDownEvent=function(e){var t=e.rawEvent;if(this.isSuggesting)if(t.key==i)this.setIsSuggesting(!1),this.blockSuggestions=!0,this.cancelDefaultKeyDownEvent(e);else if("Backspace"==t.key){this.getWord(e)==this.pickerOptions.triggerCharacter&&this.setIsSuggesting(!1)}else this.dataProvider.shiftHighlight&&(this.pickerOptions.isHorizontal?t.key==a||t.key==s:t.key==l||t.key==u)?(this.dataProvider.shiftHighlight(this.pickerOptions.isHorizontal?t.key==s:t.key==u),this.dataProvider.getSelectedIndex&&this.setAriaActiveDescendant(this.dataProvider.getSelectedIndex()),this.cancelDefaultKeyDownEvent(e)):!this.dataProvider.selectOption||"Enter"!=t.key&&"Tab"!=t.key||(this.dataProvider.selectOption(),this.cancelDefaultKeyDownEvent(e));else if("Backspace"==t.key)this.tryRemoveNode(e)&&this.cancelDefaultKeyDownEvent(e);else if(t.key==c){var n=this.editor.getContentSearcherOfCursor(e),r=n.getInlineElementAfter()?n.getInlineElementAfter().getContainerNode():null,o=r?this.getIdValue(r):null;if(o&&0==o.indexOf(this.pickerOptions.elementIdPrefix)){var d=this.dataProvider.onRemove(r,!1);this.replaceNode(r,d),this.cancelDefaultKeyDownEvent(e)}}},e.prototype.onAndroidInputEvent=function(e){(this.newInputLength=this.calcInputLength(e),this.newInputLength<this.currentInputLength||"deleteContentBackwards"===e.rawEvent.inputType)&&(this.tryRemoveNode(e)&&(this.eventHandledOnKeyDown=!0))},e.prototype.calcInputLength=function(e){var t=this.getInlineElementBeforeCursor(e);return t?t.length:0},e.prototype.tryRemoveNode=function(e){var t=this.editor.getContentSearcherOfCursor(e),n=t.getInlineElementBefore(),r=n?n.getContainerNode():null,i=r?this.getIdValue(r):null,a=t.getInlineElementAfter();if(i&&0==i.indexOf(this.pickerOptions.elementIdPrefix)&&(null==a||!(a instanceof o.PartialInlineElement))){var l=this.dataProvider.onRemove(r,!0);return l?(this.replaceNode(r,l),this.isPendingInputEventHandling?this.editor.runAsync((function(e){e.select(l,-3)})):this.editor.select(l,-3)):this.editor.deleteNode(r),!0}return!1},e.prototype.getWord=function(e){var t=this.getRangeUntilAt(e).toString(),n=this.getWordBeforeCursor(e);return t==this.pickerOptions.triggerCharacter&&t!=n?n:t},e.prototype.setRangeStart=function(e,t,n){var r=t?t.textContent.lastIndexOf(n):-1;return r>-1&&(e.setStart(t,r),!0)},e.prototype.setAriaOwns=function(e){this.editor.setEditorDomAttribute("aria-owns",e&&this.pickerOptions.suggestionsLabel?this.pickerOptions.suggestionsLabel:null)},e.prototype.setAriaActiveDescendant=function(e){this.editor.setEditorDomAttribute("aria-activedescendant",null!=e&&this.pickerOptions.suggestionLabelPrefix?this.pickerOptions.suggestionLabelPrefix+e.toString():null)},e.prototype.getInlineElementBeforeCursor=function(e){var t=this.editor.getContentSearcherOfCursor(e),n=t?t.getInlineElementBefore():null;return n?n.getTextContent():null},e.prototype.isAndroidKeyboardEvent=function(e){return"Unidentified"==e.rawEvent.key||null==e.rawEvent.key&&d.indexOf(e.rawEvent.charCode)>-1},e}();t.default=f},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(262),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableResize=void 0;var r=n(263);Object.defineProperty(t,"TableResize",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(264),o=n(0),i=function(){function e(){var e=this;this.tableRectMap=null,this.onMouseMove=function(t){var n;if(!(t.buttons>0)){e.ensureTableRects();for(var r=e.editor.getDocument().defaultView,o=t.pageX-r.scrollX,i=t.pageY-r.scrollY,a=null,l=e.tableRectMap.length-1;l>=0;l--){var s=e.tableRectMap[l],u=s.table,c=s.rect;if(o>=c.left-12&&o<=c.right+12&&i>=c.top-12&&i<=c.bottom+12){a=u;break}}e.setTableEditor(a),null===(n=e.tableEditor)||void 0===n||n.onMouseMove(o,i)}},this.invalidateTableRects=function(){e.tableRectMap=null}}return e.prototype.getName=function(){return"TableResize"},e.prototype.initialize=function(e){this.editor=e,this.onMouseMoveDisposer=this.editor.addDomEventHandler({mousemove:this.onMouseMove})},e.prototype.dispose=function(){this.onMouseMoveDisposer(),this.invalidateTableRects(),this.setTableEditor(null),this.editor=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 3:case 7:case 14:case 21:this.setTableEditor(null),this.invalidateTableRects()}},e.prototype.setTableEditor=function(e){this.tableEditor&&e!=this.tableEditor.table&&(this.tableEditor.dispose(),this.tableEditor=null),!this.tableEditor&&e&&(this.tableEditor=new r.default(this.editor,e,this.invalidateTableRects))},e.prototype.ensureTableRects=function(){var e=this;this.tableRectMap||(this.tableRectMap=[],this.editor.queryElements("table",(function(t){if(t.isContentEditable){var n=(0,o.normalizeRect)(t.getBoundingClientRect());n&&e.tableRectMap.push({table:t,rect:n})}})))},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(265),o=n(266),i=n(267),a=n(268),l=n(269),s=n(0),u=function(){function e(e,t,n){var r=this;this.editor=e,this.table=t,this.onChanged=n,this.onFinishEditing=function(){return r.editor.focus(),r.editor.select(r.start,r.end),r.editor.addUndoSnapshot(null,"Format"),r.onChanged(),!1},this.onStartTableResize=function(){r.onStartResize()},this.onStartCellResize=function(){r.disposeTableResizer(),r.onStartResize()},this.onInserted=function(e){r.editor.transformToDarkColor(e),r.disposeTableResizer(),r.onFinishEditing()},this.onSelect=function(e){if(r.editor.focus(),e){var t=new s.VTable(e),n=t.cells.length-1,o=0;t.cells[n].forEach((function(e,t){e.td&&(o=t)}));var i={firstCell:{x:0,y:0},lastCell:{y:n,x:o}};r.editor.select(e,i)}},this.isRTL="rtl"==(0,s.getComputedStyle)(t,"direction"),this.tableResizer=(0,i.default)(t,e.getZoomScale(),this.isRTL,this.onStartTableResize,this.onFinishEditing),this.tableSelector=(0,a.default)(t,e.getZoomScale(),this.onSelect)}return e.prototype.dispose=function(){this.disposeTableResizer(),this.disposeCellResizers(),this.disposeTableInserter(),this.disposeTableSelector()},e.prototype.onMouseMove=function(e,t){for(var n,r=0;r<this.table.rows.length;r++){for(var o=this.table.rows[r],i=0;i<o.cells.length;i++){var a=o.cells[i],l=(0,s.normalizeRect)(a.getBoundingClientRect());if(l){var u=t<=l.bottom;if((this.isRTL?e>=l.right:e<=l.right)&&u){if(0==r&&t<=l.top+5){var c=(l.left+l.right)/2,d=this.isRTL?e<c:e>c;this.setInserterTd(d?a:o.cells[i-1],!1)}else 0==i&&(this.isRTL?e>=l.right-5:e<=l.left+5)?this.setInserterTd(t>(l.top+l.bottom)/2?a:null===(n=this.table.rows[r-1])||void 0===n?void 0:n.cells[0],!0):this.setInserterTd(null);this.setResizingTd(a);break}}}if(i<o.cells.length)break}},e.prototype.setResizingTd=function(e){if(this.horizontalResizer&&this.horizontalResizer.node!=e&&this.disposeCellResizers(),!this.horizontalResizer&&e){var t=this.editor.getZoomScale();this.horizontalResizer=(0,r.default)(e,t,this.isRTL,!0,this.onStartCellResize,this.onFinishEditing),this.verticalResizer=(0,r.default)(e,t,this.isRTL,!1,this.onStartCellResize,this.onFinishEditing)}},e.prototype.setInserterTd=function(e,t){var n=t?this.horizontalInserter:this.verticalInserter;if(n&&n.node!=e&&this.disposeTableInserter(),!this.horizontalInserter&&!this.verticalInserter&&e){var r=(0,o.default)(this.editor,e,this.isRTL,t,this.onInserted);t?this.horizontalInserter=r:this.verticalInserter=r}},e.prototype.disposeTableResizer=function(){this.tableResizer&&((0,l.disposeTableEditFeature)(this.tableResizer),this.tableResizer=null)},e.prototype.disposeTableInserter=function(){this.horizontalInserter&&((0,l.disposeTableEditFeature)(this.horizontalInserter),this.horizontalInserter=null),this.verticalInserter&&((0,l.disposeTableEditFeature)(this.verticalInserter),this.verticalInserter=null)},e.prototype.disposeCellResizers=function(){this.horizontalResizer&&((0,l.disposeTableEditFeature)(this.horizontalResizer),this.horizontalResizer=null),this.verticalResizer&&((0,l.disposeTableEditFeature)(this.verticalResizer),this.verticalResizer=null)},e.prototype.disposeTableSelector=function(){this.tableSelector&&((0,l.disposeTableEditFeature)(this.tableSelector),this.tableSelector=null)},e.prototype.onStartResize=function(){var e=this.editor.getSelectionRange();e&&(this.start=s.Position.getStart(e),this.end=s.Position.getEnd(e)),this.editor.addUndoSnapshot()},e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(36),o=n(0);function i(e){var t=e.td,n=e.isRTL,r=e.zoomScale,i=e.onStart,a=new o.VTable(t,!0,r),l=(0,o.normalizeRect)(t.getBoundingClientRect());if(l){i();var s=a.getCellsWithBorder(n?l.left:l.right,!n),u=a.getCellsWithBorder(n?l.left:l.right,n);return{vTable:a,currentCells:s,nextCells:u}}return{vTable:a,currentCells:[],nextCells:[]}}function a(e,t,n,r,o){var i=e.td,a=e.zoomScale,l=n.vTable;return l.table.removeAttribute("height"),l.table.style.height=null,l.forEachCellOfCurrentRow((function(e){e.td&&(e.td.style.height=e.td==i?e.height/a+o+"px":null)})),l.writeBack(!0),!0}function l(e,t,n){var r=e.isRTL,i=e.zoomScale,a=n.vTable,l=n.nextCells,u=n.currentCells;if(!function(e,t,n,r,i){for(var a=0;a<t.length;a++){var l=t[a];if(u=(0,o.normalizeRect)(l.getBoundingClientRect()))if((c=s(u,e,!r)/i)<30)return!1}for(a=0;a<n.length;a++){l=n[a];var u,c=Number.MAX_SAFE_INTEGER;if(l)(u=(0,o.normalizeRect)(l.getBoundingClientRect()))&&(c=s(u,e,r)/i);if(c<30)return!1}return!0}(t.pageX,u,l,r,i))return!1;var c=0==l.length,d=t.shiftKey;(c||d)&&(a.table.style.width=null);var f=new Map;return u.forEach((function(e){var n=(0,o.normalizeRect)(e.getBoundingClientRect());if(n){e.style.wordBreak="break-word",e.style.whiteSpace="normal",e.style.boxSizing="border-box";var a=s(n,t.pageX,!r)/i;f.set(e,a)}})),f.forEach((function(e,t){t.style.width=e+"px"})),d||l.forEach((function(e){e.style.wordBreak="break-word",e.style.whiteSpace="normal",e.style.boxSizing="border-box",e.style.width=null})),a.writeBack(!0),!0}function s(e,t,n){return n?t-e.left:e.right-t}function u(e,t){var n=e.td,r=(0,o.normalizeRect)(n.getBoundingClientRect());r&&(t.style.top=r.bottom-4+"px",t.style.left=r.left+"px",t.style.width=r.right-r.left+"px",t.style.height="4px")}function c(e,t){var n=e.td,r=e.isRTL,i=(0,o.normalizeRect)(n.getBoundingClientRect());i&&(t.style.top=i.top+"px",t.style.left=(r?i.left:i.right)-4+1+"px",t.style.width="4px",t.style.height=i.bottom-i.top+"px")}t.default=function(e,t,n,s,d,f){var h=e.ownerDocument,p=(0,o.createElement)(s?7:8,h);h.body.appendChild(p);var g={td:e,isRTL:n,zoomScale:t,onStart:d},v=s?u:c;v(g,p);var m={onDragStart:i,onDragging:s?a:l,onDragEnd:f};return{node:e,div:p,featureHandler:new r.default(p,g,v,m,t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e,t,n,i,a){var l=e.getElementAtCursor("table",t),s=(0,r.normalizeRect)(t.getBoundingClientRect()),u=l?(0,r.normalizeRect)(l.getBoundingClientRect()):null;if(s&&u){var c=t.ownerDocument,d=(0,r.createElement)(function(e,t,n,r){var o=t?"white":"#4A4A4A",i=n?"right":"left";return{tag:"div",style:"position: fixed; width: 12px; height: 12px; font-size: 16px; color: "+o+"; line-height: 10px; vertical-align: middle; text-align: center; cursor: pointer; border: solid 1px "+o+"; border-radius: 50%; background-color: "+r,children:[{tag:"div",style:"position: absolute; box-sizing: border-box; background-color: "+r+";"+(e?i+": 12px; top: 5px; height: 3px; border-top: 1px solid "+o+"; border-bottom: 1px solid "+o+"; border-right: 1px solid "+o+"; border-left: 0px;":"left: 5px; top: 12px; width: 3px; border-left: 1px solid "+o+"; border-right: 1px solid "+o+"; border-bottom: 1px solid "+o+"; border-top: 0px;")},"+"]}}(i,e.isDarkMode(),n,e.getDefaultFormat().backgroundColor||"white"),c);return i?(d.style.left=(n?s.right:s.left-13)+"px",d.style.top=s.bottom-8+"px",d.firstChild.style.width=u.right-u.left+"px"):(d.style.left=(n?s.left:s.right-8)+"px",d.style.top=s.top-13+"px",d.firstChild.style.height=u.bottom-u.top+"px"),c.body.appendChild(d),{div:d,featureHandler:new o(d,t,i,e,a),node:t}}};var o=function(){function e(e,t,n,o,i){var a=this;this.div=e,this.td=t,this.isHorizontal=n,this.editor=o,this.onInsert=i,this.insertTd=function(){var e=new r.VTable(a.td);a.isHorizontal||(e.normalizeTableCellSize(a.editor.getZoomScale()),e.table.removeAttribute("width"),e.table.style.width=null),e.edit(a.isHorizontal?1:3),e.writeBack(),a.onInsert(e.table)},this.div.addEventListener("click",this.insertTd)}return e.prototype.dispose=function(){this.div.removeEventListener("click",this.insertTd),this.div=null,this.editor=null},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(36),o=n(0);function i(e){return e.onStart(),{originalRect:e.table.getBoundingClientRect(),vTable:new o.VTable(e.table,!0,e.zoomScale)}}function a(e,t,n,r,o){var i=e.isRTL,a=e.zoomScale,l=n.originalRect,s=n.vTable,u=1+r/l.width*a*(i?-1:1),c=1+o/l.height*a,d=Math.abs(u-1)>.001,f=Math.abs(c-1)>.001;if(d||f){for(var h=0;h<s.cells.length;h++)for(var p=0;p<s.cells[h].length;p++){var g=s.cells[h][p];if(g.td){if(d){s.table.style.width=null;var v=g.width*u/a;g.td.style.boxSizing="border-box",v>=30&&(g.td.style.wordBreak="break-word",g.td.style.whiteSpace="normal",g.td.style.width=v+"px")}if(f)if(s.table.style.height=null,0==p){var m=g.height*c/a;m>=20&&(g.td.style.height=m+"px")}else g.td.style.height=null}}return s.writeBack(!0),!0}return!1}function l(e,t){var n=e.table,r=e.isRTL,i=(0,o.normalizeRect)(n.getBoundingClientRect());i&&(t.style.top=i.bottom+"px",t.style.left=r?i.left-12-2+"px":i.right+"px")}t.default=function(e,t,n,s,u){var c=e.ownerDocument,d=(0,o.createElement)(n?10:9,c);d.style.width="12px",d.style.height="12px",c.body.appendChild(d);var f={isRTL:n,table:e,zoomScale:t,onStart:s};return l(f,d),{node:e,div:d,featureHandler:new r.default(d,f,l,{onDragStart:i,onDragging:a,onDragEnd:u},t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(36),o=n(0);function i(e,t){var n=e.table,r=(0,o.normalizeRect)(n.getBoundingClientRect());r&&(t.style.top=r.top-12+"px",t.style.left=r.left-12-2+"px")}t.default=function(e,t,n){var a=e.ownerDocument,l=(0,o.createElement)(11,a);l.id="_Table_Selector",l.style.width="12px",l.style.height="12px",a.body.appendChild(l);var s={table:e,zoomScale:t};i(s,l);var u=new r.default(l,s,i,{onDragEnd:function(e,t){return t.target==l&&n(e.table),!1}},t);return{div:l,featureHandler:u,node:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.disposeTableEditFeature=void 0,t.disposeTableEditFeature=function(e){var t;null===(t=e.div.parentNode)||void 0===t||t.removeChild(e.div),e.div=null,e.featureHandler.dispose(),e.featureHandler=null}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(271),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watermark=void 0;var r=n(272);Object.defineProperty(t,"Watermark",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(6),i=function(){function e(e,t){var n=this;this.watermark=e,this.format=t,this.showHideWatermark=function(){var e=n.editor.hasFocus(),t=n.editor.queryElements((0,r.getEntitySelector)("WATERMARK_WRAPPER")),i=t.length>0;e&&i?(t.forEach(n.removeWatermark),n.editor.focus()):e||i||!n.editor.isEmpty()||(0,o.insertEntity)(n.editor,"WATERMARK_WRAPPER",n.editor.getDocument().createTextNode(n.watermark),!1,!1,0)},this.removeWatermark=function(e){var t=e.parentNode;null==t||t.removeChild(e),n.editor.contains(t)&&"DIV"==(0,r.getTagOfNode)(t)&&!t.firstChild&&t.appendChild(n.editor.getDocument().createElement("BR"))},this.format=this.format||{fontSize:"14px",textColors:{lightModeColor:"#AAAAAA",darkModeColor:"#6B6B6B"}}}return e.prototype.getName=function(){return"Watermark"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.editor.addDomEventHandler({focus:this.showHideWatermark,blur:this.showHideWatermark})},e.prototype.dispose=function(){this.disposer(),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){var t;if(11==e.eventType||7==e.eventType&&"WATERMARK_WRAPPER"!=(null===(t=e.data)||void 0===t?void 0:t.type))this.showHideWatermark();else if(15==e.eventType&&"WATERMARK_WRAPPER"==e.entity.type){var n=e.operation,o=e.entity.wrapper;8==n?this.removeWatermark(o):0==e.operation&&((0,r.applyFormat)(o,this.format,this.editor.isDarkMode()),o.spellcheck=!1)}},e}();t.default=i},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(274),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableCellSelection=void 0;var r=n(275);Object.defineProperty(t,"TableCellSelection",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(276),o=n(277),i=n(278),a=n(279),l=n(0),s=function(){function e(){var e=this;this.onMouseMove=function(t){if(e.editor.contains(t.target)){if(e.tableSelection&&(0,l.contains)(e.lastTarget,t.target,!0))return c(e.editor,e.firstTarget,0),void t.preventDefault();if("TABLE"!=(0,l.getTagOfNode)(t.target)){if(e.setData(t.target),!e.firstTarget||e.firstTable)if(e.lastTarget.lastChild==e.lastTarget.firstChild&&"TABLE"==(0,l.getTagOfNode)(e.lastTarget.lastChild)&&"DIV"==(0,l.getTagOfNode)(e.lastTarget)||!e.editor.contains(e.lastTarget))t.preventDefault();else{e.prepareSelection();var n=!!(0,l.safeInstanceOf)(e.lastTarget,"HTMLTableCellElement")&&(0,l.contains)(e.lastTarget,e.firstTable);e.firstTable&&e.firstTable==e.targetTable||n?e.selectionInsideTableMouseMove(t):e.tableSelection&&e.restoreSelection(),e.tableSelection&&(c(e.editor,e.firstTarget,0),t.preventDefault())}}else t.preventDefault()}},this.onMouseUp=function(){e.editor&&e.removeMouseUpEventListener()},this.DeleteTableContents={keys:[46,8],shouldHandleEvent:function(e,t){return 1==t.getSelectionRangeEx().type},handleEvent:function(e,t){1==t.getSelectionRangeEx().type&&t.addUndoSnapshot((function(){t.getSelectedRegions().forEach((function(e){(0,l.safeInstanceOf)(e.rootNode,"HTMLTableCellElement")&&u(e.rootNode,t)}))}))}},this.lastTarget=null,this.firstTarget=null,this.tableSelection=!1,this.tableRange={firstCell:null,lastCell:null},this.startedSelection=!1}return e.prototype.getName=function(){return"TableCellSelection"},e.prototype.initialize=function(e){this.editor=e,this.editor.addContentEditFeature(this.DeleteTableContents)},e.prototype.dispose=function(){this.editor.select(null),this.removeMouseUpEventListener(),this.editor=null},e.prototype.onPluginEvent=function(e){if(this.editor)switch(e.eventType){case 17:var t=this.editor.getSelectionRangeEx();1==t.type&&(this.tableRange=t.coordinates,this.firstTable=t.table,this.tableSelection=!0,this.editor.select(t.table,null));break;case 18:if(this.firstTable&&this.tableSelection&&this.tableRange){var n=this.editor.queryElements("#"+this.firstTable.id);1==n.length&&(this.firstTable=n[0],this.editor.select(this.firstTable,this.tableRange))}break;case 9:this.handleBeforeCutCopy(e);break;case 5:this.startedSelection||this.handleMouseDownEvent(e);break;case 0:this.startedSelection?e.rawEvent.preventDefault():this.handleKeyDownEvent(e);break;case 2:this.startedSelection?e.rawEvent.preventDefault():this.handleKeyUpEvent(e);break;case 14:this.startedSelection&&this.handleScrollEvent();break;case 20:this.tableRange&&(this.tableRange=null,this.firstTable=null,this.tableSelection=!1,this.editor.select(null))}},e.prototype.handleScrollEvent=function(){this.setData(this.editor.getElementAtCursor()),this.firstTable==this.targetTable?this.tableSelection&&(this.vTable.selection.lastCell=(0,i.getCellCoordinates)(this.vTable,this.lastTarget),this.selectTable(),this.tableRange.lastCell=this.vTable.selection.lastCell,c(this.editor,this.firstTarget,0)):this.tableSelection&&this.restoreSelection()},e.prototype.handleBeforeCutCopy=function(e){var t=this,n=this.editor.getSelectionRangeEx();if(1==n.type){var r=e.clonedRoot.querySelector("table#"+n.table.id);if(r){this.tableRange=n.coordinates;var i=new l.VTable(r);i.selection=this.tableRange,(0,a.removeCellsOutsideSelection)(i),i.writeBack(),i.table.id="",e.range.selectNode(r),e.isCut&&(0,o.forEachSelectedCell)(this.vTable,(function(e){(null==e?void 0:e.td)&&u(e.td,t.editor)}))}}},e.prototype.handleKeyDownEvent=function(e){var t=this,n=e.rawEvent,r=n.shiftKey,o=n.ctrlKey,i=n.metaKey,a=n.which,s=n.defaultPrevented;if(r&&(o||i)||16==a||s)this.preventKeyUp=s;else if(r){if(!this.firstTarget){var u=this.editor.getFocusedPosition(),c=d(this.editor,u.node);this.firstTarget=this.firstTarget||c}if(!(0,l.safeInstanceOf)(this.firstTarget,"HTMLTableCellElement"))return;this.editor.runAsync((function(n){var r=n.getFocusedPosition();if(t.setData(t.tableSelection?t.lastTarget:r.node),t.firstTable==t.targetTable){if(!t.shouldConvertToTableSelection()&&!t.tableSelection)return;t.handleKeySelectionInsideTable(e)}else t.tableSelection&&(t.firstTable&&t.editor.select(t.firstTable,null),t.tableSelection=!1)}))}},e.prototype.handleKeyUpEvent=function(e){var t=e.rawEvent,n=t.shiftKey,r=t.which;n||16==r||!this.firstTarget||this.preventKeyUp||this.clearState(),this.preventKeyUp=!1},e.prototype.handleKeySelectionInsideTable=function(e){if(this.firstTarget=d(this.editor,this.firstTarget),this.lastTarget=d(this.editor,this.lastTarget),c(this.editor,this.firstTarget,0),this.vTable=this.vTable||new l.VTable(this.firstTable),this.tableRange.firstCell=(0,i.getCellCoordinates)(this.vTable,this.firstTarget),this.tableRange.lastCell=this.getNextTD(e),!this.tableRange.lastCell||this.tableRange.lastCell.y>this.vTable.cells.length-1||-1==this.tableRange.lastCell.y){if(this.lastTarget=this.editor.getElementAtCursor("td,th,div",this.firstTable),!(0,l.safeInstanceOf)(this.lastTarget,"HTMLTableCellElement")){var t=new l.Position(this.targetTable,null==this.tableRange.lastCell.y||-1==this.tableRange.lastCell.y?-2:-3),n=this.editor.getDocument().defaultView.getSelection(),r=n.anchorNode,o=n.anchorOffset;return this.editor.select(n.getRangeAt(0)),n.setBaseAndExtent(r,o,t.node,t.offset),this.lastTarget=t.node,void e.rawEvent.preventDefault()}this.prepareSelection()}this.vTable.selection=this.tableRange,this.selectTable();var a=this.isAfter(this.firstTarget,this.lastTarget),s=new l.Position(this.lastTarget,a?0:-1);c(this.editor,s.node,s.offset),this.tableSelection=!0,e.rawEvent.preventDefault()},e.prototype.handleMouseDownEvent=function(e){var t=this,n=e.rawEvent,o=n.which,a=n.shiftKey;if(3==o&&this.tableSelection){var s=this.editor.getElementAtCursor("td,th"),u=(0,i.getCellCoordinates)(this.vTable,s);if(u){var h=(0,r.default)(this.vTable),p=h.firstCell,g=h.lastCell;if(u.y>=p.y&&u.y<=g.y&&u.x>=p.x&&u.x<=g.x){if(this.firstTarget=this.vTable.getCell(p.y,p.x).td,this.lastTarget=this.vTable.getCell(g.y,g.x).td,this.firstTarget&&this.lastTarget)this.editor.getDocument().defaultView.getSelection().setBaseAndExtent(this.firstTarget,0,this.lastTarget,0),this.selectTable();return}}}1!=o||a||(this.clearState(),f(this.editor,e.rawEvent.target)&&(this.editor.getDocument().addEventListener("mouseup",this.onMouseUp,!0),this.editor.getDocument().addEventListener("mousemove",this.onMouseMove,!0),this.startedSelection=!0)),1==o&&a&&this.editor.runAsync((function(e){var n=e.getDocument().defaultView.getSelection(),r=d(e,n.anchorNode),o=d(e,n.focusNode),a=f(e,r),s=f(e,r);if(a==s&&(0,l.safeInstanceOf)(r,"HTMLTableCellElement")&&(0,l.safeInstanceOf)(o,"HTMLTableCellElement")){t.vTable=new l.VTable(r);var u=(0,i.getCellCoordinates)(t.vTable,r),h=(0,i.getCellCoordinates)(t.vTable,o);t.vTable.selection={firstCell:u,lastCell:h},t.firstTarget=r,t.lastTarget=o,t.selectTable(),t.tableRange=t.vTable.selection,t.tableSelection=!0,t.firstTable=a,t.targetTable=s,c(e,r,0)}}))},e.prototype.restoreSelection=function(){this.firstTable&&this.editor.select(this.firstTable,null),this.tableSelection=!1;var e=this.isAfter(this.firstTarget,this.lastTarget),t=new l.Position(this.lastTarget,e?-1:0),n=new Range;this.firstTarget&&n.selectNodeContents(this.firstTarget),c(this.editor,this.firstTarget,e?l.Position.getEnd(n).offset:l.Position.getStart(n).offset,t.element,t.offset)},e.prototype.selectionInsideTableMouseMove=function(e){var t;this.lastTarget!=this.firstTarget?(c(this.editor,this.firstTarget,0),this.firstTable!=this.targetTable&&(null===(t=this.targetTable)||void 0===t?void 0:t.contains(this.firstTable))&&(this.firstTarget=this.editor.getElementAtCursor("td,th",this.lastTarget)),this.firstTable&&(this.tableSelection=!0,this.vTable=this.vTable||new l.VTable(this.firstTable),this.tableRange.firstCell=(0,i.getCellCoordinates)(this.vTable,this.firstTarget),this.tableRange.lastCell=(0,i.getCellCoordinates)(this.vTable,this.lastTarget),this.vTable.selection=this.tableRange,this.selectTable()),e.preventDefault()):this.lastTarget==this.firstTarget&&this.tableSelection&&(this.vTable=new l.VTable(this.firstTable),this.tableRange.firstCell=(0,i.getCellCoordinates)(this.vTable,this.firstTarget),this.tableRange.lastCell=this.tableRange.firstCell,this.vTable.selection=this.tableRange,this.selectTable())},e.prototype.removeMouseUpEventListener=function(){this.startedSelection&&(this.startedSelection=!1,this.editor.getDocument().removeEventListener("mouseup",this.onMouseUp,!0),this.editor.getDocument().removeEventListener("mousemove",this.onMouseMove,!0))},e.prototype.clearState=function(){this.editor.select(null),this.vTable=null,this.firstTarget=null,this.lastTarget=null,this.tableRange={firstCell:null,lastCell:null},this.tableSelection=!1,this.firstTable=null,this.targetTable=null},e.prototype.getNextTD=function(e){if(this.lastTarget=this.editor.getElementAtCursor("td,th",this.lastTarget),(0,l.safeInstanceOf)(this.lastTarget,"HTMLTableCellElement")){var t=(0,i.getCellCoordinates)(this.vTable,this.lastTarget);if(this.tableSelection)switch(e.rawEvent.which){case 39:t.x+=this.lastTarget.colSpan,null==this.vTable.cells[t.y][t.x]&&(t.x=this.vTable.cells[t.y].length-1,t.y++);break;case 37:0==t.x?t.y--:t.x--;break;case 38:t.y--;break;case 40:t.y++}return t.y>=0&&t.x>=0&&(this.lastTarget=this.vTable.getTd(t.y,t.x)),t}return null},e.prototype.prepareSelection=function(){var e,t,n,r,o=this.lastTarget!=this.firstTarget&&(null===(e=this.firstTable)||void 0===e?void 0:e.contains((0,l.findClosestElementAncestor)(this.targetTable,this.firstTable,"td,th")));if(o&&this.tableSelection)for(;o;)this.lastTarget=(0,l.findClosestElementAncestor)(this.targetTable,this.firstTable,"td,th"),this.targetTable=f(this.editor,this.lastTarget),o=this.lastTarget!=this.firstTarget&&(null===(t=this.firstTable)||void 0===t?void 0:t.contains((0,l.findClosestElementAncestor)(this.targetTable,this.firstTable,"td,th")));var i=this.lastTarget!=this.firstTarget&&(null===(n=this.targetTable)||void 0===n?void 0:n.contains((0,l.findClosestElementAncestor)(this.firstTable,this.targetTable,"td,th")));if(i&&this.tableSelection)for(;i;)this.firstTarget=(0,l.findClosestElementAncestor)(this.firstTable,this.targetTable,"td,th"),this.firstTable=this.editor.getElementAtCursor("table",this.firstTarget),i=this.lastTarget!=this.firstTarget&&(null===(r=this.targetTable)||void 0===r?void 0:r.contains((0,l.findClosestElementAncestor)(this.firstTable,this.targetTable,"td,th")))},e.prototype.setData=function(e){var t=this.editor.getFocusedPosition();t&&(this.firstTarget=this.firstTarget||d(this.editor,t.node),this.firstTarget.nodeType==Node.TEXT_NODE&&(this.firstTarget=this.editor.getElementAtCursor("td,th",this.firstTarget)),!this.editor.contains(this.firstTarget)&&this.lastTarget&&(this.firstTarget=this.lastTarget)),this.firstTable=f(this.editor,this.firstTarget),this.lastTarget=d(this.editor,e),this.targetTable=f(this.editor,this.lastTarget)},e.prototype.isAfter=function(e,t){var n,r,o,i;if(e&&t){if(t.contains(e)){var a=null===(r=(n=e).getBoundingClientRect)||void 0===r?void 0:r.call(n),s=null===(i=(o=t).getBoundingClientRect)||void 0===i?void 0:i.call(o);if(a&&s)return a.top>s.top&&a.bottom<s.bottom}return new l.Position(e,-1).isAfter(new l.Position(t,-1))}return!1},e.prototype.shouldConvertToTableSelection=function(){var e=this;if(!this.firstTable||!this.editor)return!1;var t=this.editor.getSelectedRegions();if(1==t.length)return!1;var n=!0;return t.forEach((function(t){(0,l.contains)(e.firstTable,t.rootNode)||(n=!1)})),n},e.prototype.selectTable=function(){var e;this.editor&&this.vTable&&(null===(e=this.editor)||void 0===e||e.select(this.vTable.table,(0,r.default)(this.vTable)))},e}();function u(e,t){var n=new Range;n.selectNodeContents(e),n.deleteContents(),e.appendChild(t.getDocument().createElement("br"))}function c(e,t,n,r,o){r=r||t,o=o||n,e.getDocument().defaultView.getSelection().setBaseAndExtent(t,n,r,o)}function d(e,t){return e&&e.getElementAtCursor("td,th",t)||t}function f(e,t){return e?e.getElementAtCursor("table",t):null}t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(null==e?void 0:e.selection)||{},n=t.firstCell,r=t.lastCell;if(!(e&&e.selection&&n&&r))return null;var o=e.table.rows,i={x:Math.min(n.x,r.x),y:Math.min(n.y,r.y)},a={x:Math.max(n.x,r.x),y:Math.max(n.y,r.y)},l=function(e){e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.y>=o.length&&(e.y=o.length-1);var t=o.item(e.y).cells.length;e.x>=t&&(e.x=t-1)};return l(i),l(a),{firstCell:i,lastCell:a}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEachSelectedCell=void 0,t.forEachSelectedCell=function(e,t){for(var n,r=e.selection,o=r.lastCell,i=r.firstCell,a=i.y;a<=o.y;a++)for(var l=i.x;l<=o.x;l++)(null===(n=e.cells[a][l])||void 0===n?void 0:n.td)&&t(e.cells[a][l])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCellCoordinates=void 0,t.getCellCoordinates=function(e,t){var n;if(null==e?void 0:e.cells)for(var r=0;r<e.cells.length;r++)for(var o=0;o<e.cells[r].length;o++)t==e.cells[r][o].td&&(n={x:o,y:r});return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeCellsOutsideSelection=void 0;var r=n(0);t.removeCellsOutsideSelection=function(e){if(!(0,r.isWholeTableSelected)(e,e.selection)){var t=e.selection,n=t.firstCell,o=t.lastCell,i=[],a=n.x,l=n.y,s=o.x,u=o.y;e.cells.forEach((function(e,t){(e=e.filter((function(e,n){return t>=l&&t<=u&&n>=a&&n<=s}))).length>0&&i.push(e)})),e.cells=i}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}])}));
2
2
  //# sourceMappingURL=rooster-amd-min.js.map