@progress/kendo-react-editor 13.3.0-develop.1 → 13.3.0-develop.2

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.
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-common"),require("@progress/kendo-editor-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-form"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-pdf")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-buttons","@progress/kendo-react-common","@progress/kendo-editor-common","@progress/kendo-svg-icons","@progress/kendo-react-dialogs","@progress/kendo-react-inputs","@progress/kendo-react-form","@progress/kendo-react-intl","@progress/kendo-react-layout","@progress/kendo-react-labels","@progress/kendo-react-popup","@progress/kendo-react-dropdowns","@progress/kendo-react-pdf"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactEditor={},e.React,e.PropTypes,e.KendoReactButtons,e.KendoReactCommon,e.KendoEditorCommon,e.KendoSvgIcons,e.KendoReactDialogs,e.KendoReactInputs,e.KendoReactForm,e.KendoReactIntl,e.KendoReactLayout,e.KendoReactLabels,e.KendoReactPopup,e.KendoReactDropdowns,e.KendoReactPdf)}(this,(function(e,t,l,o,r,n,i,a,s,c,d,p,m,u,g,h){"use strict";function f(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(l){if("default"!==l){var o=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,o.get?o:{enumerable:!0,get:function(){return e[l]}})}})),t.default=e,Object.freeze(t)}var b=f(t);const v='\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\nhtml {\n min-height: 100%;\n}\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n.k-content > p {\n margin: 0 0 1em;\n}\n.k-content table {\n white-space: pre-wrap;\n}\n.k-content .k-text-selected {\n color: HighlightText;\n background-color: Highlight;\n}\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n.k-editor-resize-wrap-element {\n display: inline-block;\n position: relative;\n}\n.ProseMirror .row-resize-handle {\n position: absolute;\n right: 0; left: 0; bottom: 0;\n transform: translate(0, 50%);\n height: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n.ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n.ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n}\n.ProseMirror.resize-cursor-vertical {\n cursor: sn-resize;\n cursor: row-resize;\n}\n.k-editor-resize-wrap-element table td p,\n.k-editor-resize-wrap-element table th p {\n margin: 0 auto;\n}\n',k='\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n .ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: "";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n .ProseMirror .selectedCell ::selection {\n background-color: transparent;\n }\n',y="editor.bold",C="editor.italic",w="editor.underline",S="editor.strikethrough",x="editor.subscript",E="editor.superscript",T="editor.hyperlink",P="editor.insertFile",I="editor.print",R="editor.selectAll",N="editor.cleanFormatting",L="editor.pdf",A="editor.foregroundColor",B="editor.backgroundColor",D="editor.createTable",M="editor.insertTableHint",z="editor.addRowBefore",F="editor.addRowAfter",H="editor.addColumnBefore",W="editor.addColumnAfter",K="editor.deleteRow",U="editor.deleteColumn",O="editor.deleteTable",V="editor.mergeCells",_="editor.splitCell",j="editor.hyperlink-dialog-title",q="editor.hyperlink-dialog-content-address",$="editor.hyperlink-dialog-content-title",G="editor.hyperlink-dialog-content-newwindow",J="editor.hyperlink-dialog-cancel",Q="editor.hyperlink-dialog-insert",X="editor.insertfile-dialog-title",Y="editor.insertfile-dialog-content-address",Z="editor.insertfile-dialog-content-title",ee="editor.insertfile-dialog-cancel",te="editor.insertfile-dialog-insert",le="editor.image",oe="editor.image-dialog-title",re="editor.image-address",ne="editor.image-title",ie="editor.image-altText",ae="editor.image-width",se="editor.image-height",ce="editor.image-cancel",de="editor.image-insert",pe="editor.viewHtml",me="editor.viewHtml-dialog-title",ue="editor.viewHtml-cancel",ge="editor.viewHtml-update",he="editor.unlink",fe="editor.undo",be="editor.redo",ve="editor.fontSize",ke="editor.fontName",ye="editor.format",Ce="editor.alignLeft",we="editor.alignRight",Se="editor.alignCenter",xe="editor.alignJustify",Ee="editor.indent",Te="editor.outdent",Pe="editor.orderedList",Ie="editor.bulletList",Re="editor.findReplace-tool-title",Ne="editor.findReplace-dialog-title",Le="editor.findReplace-tab-find",Ae="editor.findReplace-tab-replace",Be="editor.findReplace-findWhat",De="editor.findReplace-replaceWith",Me="editor.findReplace-replace",ze="editor.findReplace-replaceAll",Fe="editor.findReplace-matchCase",He="editor.findReplace-matchWord",We="editor.findReplace-matchCyclic",Ke="editor.findReplace-useRegExp",Ue="editor.findReplace-prevMatch",Oe="editor.findReplace-nextMatch",Ve="editor.findReplace-matches",_e="editor.findReplace-invalidRegExp",je="editor.iframeTitle",qe="editorTools.foreColorLabel",$e="editorTools.backColorLabel",Ge="editor.cellProperties",Je="editor.cellPropertiesLeftTop",Qe="editor.cellPropertiesCenterTop",Xe="editor.cellPropertiesRightTop",Ye="editor.cellPropertiesLeftMiddle",Ze="editor.cellPropertiesCenterMiddle",et="editor.cellPropertiesRightMiddle",tt="editor.cellPropertiesLeftBottom",lt="editor.cellPropertiesCenterBottom",ot="editor.cellPropertiesRightBottom",rt="editor.cellPropertiesNoAlignment",nt="editor.cellPropertiesWrap",it="editor.cellPropertiesFitToCell",at="editor.cellPropertiesApplyToAllCells",st="editor.cellPropertiesWidth",ct="editor.cellPropertiesApplyToColumn",dt="editor.cellPropertiesHeight",pt="editor.cellPropertiesApplyToRow",mt="editor.cellPropertiesAlignment",ut="editor.cellPropertiesTextControl",gt="editor.cellPropertiesCellPadding",ht="editor.cellPropertiesBackground",ft="editor.cellPropertiesBorderWidth",bt="editor.cellPropertiesBorderColor",vt="editor.cellPropertiesBorderStyle",kt="editor.cellPropertiesId",yt="editor.cellPropertiesCssClass",Ct="editor.cellPropertiesSave",wt="editor.cellPropertiesCancel",St="editor.tableProperties",xt="editor.tablePropertiesAlignLeft",Et="editor.tablePropertiesAlignCenter",Tt="editor.tablePropertiesAlignRight",Pt="editor.tablePropertiesNoAlignment",It="editor.tablePropertiesLeft",Rt="editor.tablePropertiesCenter",Nt="editor.tablePropertiesRight",Lt="editor.tablePropertiesTop",At="editor.tablePropertiesBottom",Bt="editor.tablePropertiesNone",Dt="editor.tablePropertiesUsingScopeAttribute",Mt="editor.tablePropertiesUsingIdAttributes",zt="editor.tablePropertiesRows",Ft="editor.tablePropertiesColumns",Ht="editor.tablePropertiesWidth",Wt="editor.tablePropertiesHeight",Kt="editor.tablePropertiesPosition",Ut="editor.tablePropertiesAlignment",Ot="editor.tablePropertiesCellSpacing",Vt="editor.tablePropertiesCellPadding",_t="editor.tablePropertiesTableBackground",jt="editor.tablePropertiesBorderWidth",qt="editor.tablePropertiesBorderColor",$t="editor.tablePropertiesBorderStyle",Gt="editor.tablePropertiesCollapseBorders",Jt="editor.tablePropertiesID",Qt="editor.tablePropertiesCssClass",Xt="editor.tablePropertiesAccessibility",Yt="editor.tablePropertiesCaption",Zt="editor.tablePropertiesCaptionPosition",el="editor.tablePropertiesCaptionAlignment",tl="editor.tablePropertiesHeaderRows",ll="editor.tablePropertiesHeaderCols",ol="editor.tablePropertiesAssociateHeaders",rl="editor.tablePropertiesGeneral",nl="editor.tablePropertiesAdvanced",il="editor.tablePropertiesSave",al="editor.tablePropertiesCancel",sl="editor.borderStyleNone",cl="editor.borderStyleSolid",dl="editor.borderStyleDotted",pl="editor.borderStyleDashed",ml="editor.borderStyleDouble",ul="editor.borderStyleGroove",gl="editor.borderStyleRidge",hl="editor.borderStyleInset",fl="editor.borderStyleOutset",bl="editor.borderStyleInitial",vl="editor.borderStyleInherit",kl="editor.borderStyleHidden",yl="editor.sizeAuto",Cl="editor.listStyleDisc",wl="editor.listStyleCircle",Sl="editor.listStyleSquare",xl="editor.listStyleDecimal",El="editor.listStyleUpperRoman",Tl="editor.listStyleLowerRoman",Pl="editor.listStyleUpperLatin",Il="editor.listStyleLowerLatin",Rl={[y]:"Bold",[C]:"Italic",[w]:"Underline",[S]:"Strikethrough",[x]:"Subscript",[E]:"Superscript",[he]:"Remove hyperlink",[fe]:"Undo",[be]:"Redo",[ve]:"Font Size",[ke]:"Font Name",[ye]:"Format",[Ce]:"Align text left",[we]:"Align text right",[Se]:"Center text",[xe]:"Justify",[Ee]:"Indent",[Te]:"Outdent",[Pe]:"Insert ordered list",[Ie]:"Insert unordered list",[I]:"Print",[R]:"Select All",[N]:"Clean formatting",[L]:"Export as PDF",[A]:"Color",[B]:"Background color",[D]:"Create a table",[M]:"Create a {0} x {1} table",[z]:"Add row above",[F]:"Add row below",[H]:"Add column on the left",[W]:"Add column on the right",[K]:"Delete row",[U]:"Delete column",[O]:"Delete table",[V]:"Merge cells",[_]:"Split cell",[T]:"Insert hyperlink",[j]:"Insert hyperlink",[q]:"Web address",[$]:"Title",[G]:"Open link in new window",[J]:"Cancel",[Q]:"Insert",[P]:"Insert file",[X]:"Insert file",[Y]:"Web address",[Z]:"Title",[ee]:"Cancel",[te]:"Insert",[le]:"Insert image",[oe]:"Insert image",[re]:"Web address",[ne]:"Title",[ie]:"Alternate text",[ae]:"Width (px)",[se]:"Height (px)",[ce]:"Cancel",[de]:"Insert",[pe]:"View HTML",[me]:"View HTML",[ue]:"Cancel",[ge]:"Update",[Re]:"Find and Replace",[Ne]:"Find and Replace",[Le]:"Find",[Ae]:"Replace",[Be]:"Find What:",[De]:"Replace With",[Me]:"Replace",[ze]:"Replace All",[Fe]:"Match Case",[He]:"Match whole word only",[We]:"Match cyclic (Wrap around)",[Ke]:"Regular Expression",[Ue]:"Prev",[Oe]:"Next",[Ve]:"{0} of {1} matches",[_e]:"Invalid regular expression.",[je]:"Editable area. Press Alt + F10 for toolbar.",[qe]:"Fore Color",[$e]:"Back Color",[Ge]:"Cell properties",[Je]:"Left Top",[Qe]:"Center Top",[Xe]:"Right Top",[Ye]:"Left Middle",[Ze]:"Center Middle",[et]:"Right Middle",[tt]:"Left Bottom",[lt]:"Center Bottom",[ot]:"Right Bottom",[rt]:"No Alignment",[nt]:"Wrap",[it]:"Fit to cell",[at]:"Apply to all cells",[st]:"Width",[ct]:"apply to column",[dt]:"Height",[pt]:"apply to row",[mt]:"Alignment",[ut]:"Text control",[gt]:"Cell padding",[ht]:"Background",[ft]:"Border width",[bt]:"Border color",[vt]:"Border style",[kt]:"ID",[yt]:"CSS class",[Ct]:"Save",[wt]:"Cancel",[St]:"Table properties",[xt]:"Align Left",[Et]:"Align Center",[Tt]:"Align Right",[Pt]:"No Alignment",[It]:"Left",[Rt]:"Center",[Nt]:"Right",[Lt]:"Top",[At]:"Bottom",[Bt]:"None",[Dt]:"Using 'scope' attribute",[Mt]:"Using 'id' attributes",[zt]:"Rows",[Ft]:"Columns",[Ht]:"Width",[Wt]:"Height",[Kt]:"Position",[Ut]:"Alignment",[Ot]:"Cell spacing",[Vt]:"Cell padding",[_t]:"Table background",[jt]:"Border width",[qt]:"Border color",[$t]:"Border style",[Gt]:"Collapse borders",[Jt]:"ID",[Qt]:"CSS class",[Xt]:"Accessibility",[Yt]:"Caption",[Zt]:"Position",[el]:"Alignment",[tl]:"Header rows",[ll]:"Header cols",[ol]:"Associate headers",[rl]:"General",[nl]:"Advanced",[il]:"Save",[al]:"Cancel",[sl]:"None",[cl]:"Solid",[dl]:"Dotted",[pl]:"Dashed",[ml]:"Double",[ul]:"Groove",[gl]:"Ridge",[hl]:"Inset",[fl]:"Outset",[bl]:"Initial",[vl]:"Inherit",[kl]:"Hidden",[yl]:"Auto",[Cl]:"Disc",[wl]:"Circle",[Sl]:"Square",[xl]:"Decimal",[El]:"Upper roman",[Tl]:"Lower roman",[Pl]:"Upper latin",[Il]:"Lower latin"},Nl={bold:y,italic:C,underline:w,strikethrough:S,subscript:x,superscript:E,unlink:he,undo:fe,redo:be,fontSize:ve,fontName:ke,format:ye,alignLeft:Ce,alignRight:we,alignCenter:Se,alignJustify:xe,indent:Ee,outdent:Te,orderedList:Pe,bulletList:Ie,print:I,selectAll:R,cleanFormatting:N,pdf:L,foregroundColor:A,backgroundColor:B,createTable:D,createTableHint:M,addRowBefore:z,addRowAfter:F,addColumnBefore:H,addColumnAfter:W,deleteRow:K,deleteColumn:U,deleteTable:O,mergeCells:V,splitCell:_,insertHyperlink:T,insertHyperlinkDialogTitle:j,insertHyperlinkAddress:q,insertHyperlinkTitle:$,insertHyperlinkNewWindow:G,insertHyperlinkCancel:J,insertHyperlinkInsert:Q,insertFile:P,insertFileDialogTitle:X,insertFileAddress:Y,insertFileTitle:Z,insertFileCancel:ee,insertFileInsert:te,insertImage:le,insertImageDialogTitle:oe,insertImageAddress:re,insertImageTitle:ne,insertImageAltText:ie,insertImageWidth:ae,insertImageHeight:se,insertImageCancel:ce,insertImageInsert:de,viewHtml:pe,viewHtmlDialogTitle:me,viewHtmlCancel:ue,viewHtmlUpdate:ge,findReplaceToolTitle:Re,findReplaceDialogTitle:Ne,findReplaceTabFind:Le,findReplaceTabReplace:Ae,findReplaceFindWhat:Be,findReplaceReplaceWith:De,findReplaceReplace:Me,findReplaceReplaceAll:ze,findReplaceMatchCase:Fe,findReplaceMatchWord:He,findReplaceMatchCyclic:We,findReplaceUseRegExp:Ke,findReplacePrevMatch:Ue,findReplaceNextMatch:Oe,findReplaceMatches:Ve,findReplaceInvalidRegExp:_e,iframeTitle:je,foreColorLabel:qe,backColorLabel:$e,cellProperties:Ge,cellPropertiesLeftTop:Je,cellPropertiesCenterTop:Qe,cellPropertiesRightTop:Xe,cellPropertiesLeftMiddle:Ye,cellPropertiesCenterMiddle:Ze,cellPropertiesRightMiddle:et,cellPropertiesLeftBottom:tt,cellPropertiesCenterBottom:lt,cellPropertiesRightBottom:ot,cellPropertiesNoAlignment:rt,cellPropertiesWrap:nt,cellPropertiesFitToCell:it,cellPropertiesApplyToAllCells:at,cellPropertiesWidth:st,cellPropertiesApplyToColumn:ct,cellPropertiesHeight:dt,cellPropertiesApplyToRow:pt,cellPropertiesAlignment:mt,cellPropertiesTextControl:ut,cellPropertiesCellPadding:gt,cellPropertiesBackground:ht,cellPropertiesBorderWidth:ft,cellPropertiesBorderColor:bt,cellPropertiesBorderStyle:vt,cellPropertiesId:kt,cellPropertiesCssClass:yt,cellPropertiesSave:Ct,cellPropertiesCancel:wt,tableProperties:St,tablePropertiesAlignLeft:xt,tablePropertiesAlignCenter:Et,tablePropertiesAlignRight:Tt,tablePropertiesNoAlignment:Pt,tablePropertiesLeft:It,tablePropertiesCenter:Rt,tablePropertiesRight:Nt,tablePropertiesTop:Lt,tablePropertiesBottom:At,tablePropertiesNone:Bt,tablePropertiesUsingScopeAttribute:Dt,tablePropertiesUsingIdAttributes:Mt,tablePropertiesRows:zt,tablePropertiesColumns:Ft,tablePropertiesWidth:Ht,tablePropertiesHeight:Wt,tablePropertiesPosition:Kt,tablePropertiesAlignment:Ut,tablePropertiesCellSpacing:Ot,tablePropertiesCellPadding:Vt,tablePropertiesTableBackground:_t,tablePropertiesBorderWidth:jt,tablePropertiesBorderColor:qt,tablePropertiesBorderStyle:$t,tablePropertiesCollapseBorders:Gt,tablePropertiesId:Jt,tablePropertiesCssClass:Qt,tablePropertiesAccessibility:Xt,tablePropertiesCaption:Yt,tablePropertiesCaptionPosition:Zt,tablePropertiesCaptionAlignment:el,tablePropertiesHeaderRows:tl,tablePropertiesHeaderCols:ll,tablePropertiesAssociateHeaders:ol,tablePropertiesGeneral:rl,tablePropertiesAdvanced:nl,tablePropertiesSave:il,tablePropertiesCancel:al,borderStyleNone:sl,borderStyleSolid:cl,borderStyleDotted:dl,borderStyleDashed:pl,borderStyleDouble:ml,borderStyleGroove:ul,borderStyleRidge:gl,borderStyleInset:hl,borderStyleOutset:fl,borderStyleInitial:bl,borderStyleInherit:vl,borderStyleHidden:kl,sizeAuto:yl,listStyleDisc:Cl,listStyleCircle:wl,listStyleSquare:Sl,listStyleDecimal:xl,listStyleUpperRoman:El,listStyleLowerRoman:Tl,listStyleUpperLatin:Pl,listStyleLowerLatin:Il},Ll={...n.indentRules.listsTypes};e.EditorToolsSettings=void 0,(e=>{const t={type:"button"};e.bold={...n.bold,props:{icon:"bold",svgIcon:i.boldIcon,...t},messages:{title:Nl.bold},commandName:"Bold"},e.italic={...n.italic,props:{icon:"italic",svgIcon:i.italicIcon,...t},messages:{title:Nl.italic},commandName:"Italic"},e.underline={...n.underline,props:{icon:"underline",svgIcon:i.underlineIcon,...t},messages:{title:Nl.underline},commandName:"Underline"},e.strikethrough={...n.strikethrough,props:{icon:"strikethrough",svgIcon:i.strikethroughIcon,...t},messages:{title:Nl.strikethrough},commandName:"Strikethrough"},e.subscript={...n.subscript,props:{icon:"subscript",svgIcon:i.subscriptIcon,...t},messages:{title:Nl.subscript},commandName:"Subscript"},e.superscript={...n.superscript,props:{icon:"supscript",svgIcon:i.supscriptIcon,...t},messages:{title:Nl.superscript},commandName:"Superscript"},e.link={...n.link,props:{icon:"link",svgIcon:i.linkIcon,...t},messages:{insertHyperlink:Nl.insertHyperlink,insertHyperlinkDialogTitle:Nl.insertHyperlinkDialogTitle,insertHyperlinkAddress:Nl.insertHyperlinkAddress,insertHyperlinkTitle:Nl.insertHyperlinkTitle,insertHyperlinkNewWindow:Nl.insertHyperlinkNewWindow,insertHyperlinkCancel:Nl.insertHyperlinkCancel,insertHyperlinkInsert:Nl.insertHyperlinkInsert},commandName:"Link"},e.insertFile={...n.link,props:{icon:"file-add",svgIcon:i.fileAddIcon,...t},messages:{insertHyperlink:Nl.insertFile,insertHyperlinkDialogTitle:Nl.insertFileDialogTitle,insertHyperlinkAddress:Nl.insertFileAddress,insertHyperlinkTitle:Nl.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:Nl.insertFileCancel,insertHyperlinkInsert:Nl.insertFileInsert},commandName:"InsertFile",linkTarget:!1},e.insertTable={props:{icon:"table-add",svgIcon:i.tableAddIcon,...t},messages:{createTable:Nl.createTable,createTableHint:Nl.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:i.tableRowInsertAboveIcon,...t},messages:{title:Nl.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:i.tableRowInsertBelowIcon,...t},messages:{title:Nl.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:i.tableColumnInsertLeftIcon,...t},messages:{title:Nl.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:i.tableColumnInsertRightIcon,...t},messages:{title:Nl.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:{icon:"table-row-delete",svgIcon:i.tableRowDeleteIcon,...t},messages:{title:Nl.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:{icon:"table-column-delete",svgIcon:i.tableColumnDeleteIcon,...t},messages:{title:Nl.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:{icon:"table-delete",svgIcon:i.tableDeleteIcon,...t},messages:{title:Nl.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:{icon:"cells-merge",svgIcon:i.cellsMergeIcon,...t},messages:{title:Nl.mergeCells},commandName:"MergeCells"},e.splitCell={props:{icon:"cell-split-horizontally",svgIcon:i.cellSplitHorizontallyIcon,...t},messages:{title:Nl.splitCell},commandName:"SplitCell"},e.print={props:{icon:"print",svgIcon:i.printIcon,...t},messages:{title:Nl.print}},e.selectAll={props:{icon:"select-all",svgIcon:i.selectAllIcon,...t},messages:{title:Nl.selectAll}},e.pdf={props:{icon:"file-pdf",svgIcon:i.filePdfIcon,...t},messages:{title:Nl.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:{icon:"clear-css",svgIcon:i.clearCssIcon,...t},messages:{title:Nl.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:{icon:"image",svgIcon:i.imageIcon,...t},messages:{insertImage:Nl.insertImage,insertImageDialogTitle:Nl.insertImageDialogTitle,insertImageAddress:Nl.insertImageAddress,insertImageTitle:Nl.insertImageTitle,insertImageAltText:Nl.insertImageAltText,insertImageWidth:Nl.insertImageWidth,insertImageHeight:Nl.insertImageHeight,insertImageCancel:Nl.insertImageCancel,insertImageInsert:Nl.insertImageInsert},commandName:"InsertImage"},e.viewHtml={props:{icon:"code",svgIcon:i.codeIcon,...t},messages:{viewHtml:Nl.viewHtml,viewHtmlDialogTitle:Nl.viewHtmlDialogTitle,viewHtmlCancel:Nl.viewHtmlCancel,viewHtmlUpdate:Nl.viewHtmlUpdate},commandName:"SetContent"},e.findAndReplace={props:{icon:"find",svgIcon:i.binocularsIcon,...t},messages:{findReplaceToolTitle:Nl.findReplaceToolTitle,findReplaceDialogTitle:Nl.findReplaceDialogTitle,findReplaceTabFind:Nl.findReplaceTabFind,findReplaceTabReplace:Nl.findReplaceTabReplace,findReplaceFindWhat:Nl.findReplaceFindWhat,findReplaceReplaceWith:Nl.findReplaceReplaceWith,findReplaceReplace:Nl.findReplaceReplace,findReplaceReplaceAll:Nl.findReplaceReplaceAll,findReplaceMatchCase:Nl.findReplaceMatchCase,findReplaceMatchWord:Nl.findReplaceMatchWord,findReplaceMatchCyclic:Nl.findReplaceMatchCyclic,findReplaceUseRegExp:Nl.findReplaceUseRegExp,findReplacePrevMatch:Nl.findReplacePrevMatch,findReplaceNextMatch:Nl.findReplaceNextMatch,findReplaceMatches:Nl.findReplaceMatches,findReplaceInvalidRegExp:Nl.findReplaceInvalidRegExp}},e.unlink={...n.link,props:{icon:"unlink",svgIcon:i.unlinkIcon,...t},messages:{title:Nl.unlink},commandName:"Unlink"},e.undo={props:{icon:"undo",svgIcon:i.undoIcon,...t},messages:{title:Nl.undo},commandName:"Undo"},e.redo={props:{icon:"redo",svgIcon:i.redoIcon,...t},messages:{title:Nl.redo},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:Rl[Nl.fontSize],value:"",localizationKey:Nl.fontSize},items:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],commandName:"FontSize"},e.fontName={style:"font-family",defaultItem:{text:Rl[Nl.fontName],value:"",localizationKey:Nl.fontName},items:[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],commandName:"FontName"},e.formatBlock={defaultItem:{text:Rl[Nl.format],value:"",localizationKey:Nl.format},items:[{text:"Paragraph",value:"p",style:{display:"block",marginLeft:0}},{text:"Heading 1",value:"h1",style:{display:"block",fontSize:"2em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 2",value:"h2",style:{display:"block",fontSize:"1.5em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 3",value:"h3",style:{display:"block",fontSize:"1.17em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 4",value:"h4",style:{display:"block",fontSize:"1em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 5",value:"h5",style:{display:"block",fontSize:"0.83em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 6",value:"h6",style:{display:"block",fontSize:"0.67em",marginLeft:0,fontWeight:"bold"}}],commandName:"FormatBlock"},e.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",svgIcon:i.foregroundColorIcon,view:"palette",title:Nl.foregroundColor,ariaLabel:Nl.foreColorLabel},commandName:"ForeColor"},e.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:i.dropletIcon,view:"palette",title:Nl.backgroundColor,ariaLabel:Nl.backColorLabel},commandName:"BackColor"},e.alignLeft={actions:[...n.alignLeftRules],props:{icon:"align-left",svgIcon:i.alignLeftIcon,...t},messages:{title:Nl.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:[...n.alignRightRules],props:{icon:"align-right",svgIcon:i.alignRightIcon,...t},messages:{title:Nl.alignRight},commandName:"AlignRight"},e.alignCenter={actions:[...n.alignCenterRules],props:{icon:"align-center",svgIcon:i.alignCenterIcon,...t},messages:{title:Nl.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:[...n.alignJustifyRules],props:{icon:"align-justify",svgIcon:i.alignJustifyIcon,...t},messages:{title:Nl.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:[...n.alignRemoveRules],props:{icon:"align-remove",svgIcon:i.alignRemoveIcon,...t},messages:{},commandName:"AlignRemove"},e.indent={actions:n.indentRules.nodes,listsTypes:Ll,props:{icon:"indent",svgIcon:i.indentIcon,...t},messages:{title:Nl.indent},commandName:"Indent"},e.outdent={actions:n.outdentRules.nodes,listsTypes:Ll,props:{icon:"outdent",svgIcon:i.outdentIcon,...t},messages:{title:Nl.outdent},commandName:"Outdent"},e.orderedList={listType:Ll.orderedList,props:{icon:"list-ordered",svgIcon:i.listOrderedIcon,...t},messages:{title:Nl.orderedList},commandName:"OrderedList",types:{...Ll}},e.bulletList={listType:Ll.bulletList,props:{icon:"list-unordered",svgIcon:i.listUnorderedIcon,...t},messages:{title:Nl.bulletList},commandName:"UnorderedList",types:{...Ll}}})(e.EditorToolsSettings||(e.EditorToolsSettings={}));let Al=class extends b.Component{constructor(){super(...arguments),this.href=null,this.title=null,this.target=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const e=this.props.view,t=this.props.settings.mark,l={href:this.href?this.href.value:void 0,title:this.title?this.title.value:void 0,target:this.target&&this.target.element&&this.target.element.checked?"_blank":void 0};n.applyLink({mark:t,attrs:l},this.props.settings.commandName)(e.state,e.dispatch),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,i=d.provideLocalizationService(this),{insertHyperlinkDialogTitle:p,insertHyperlinkAddress:m,insertHyperlinkTitle:u,insertHyperlinkNewWindow:g,insertHyperlinkCancel:h,insertHyperlinkInsert:f}=t.messages,v=!!e&&n.getMark(e.state,e.state.schema.marks[t.mark]),k=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-url",className:"k-form-label"},i.toLanguageString(m,Rl[m])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-link-url",ref:e=>{this.href=e&&e.element},defaultValue:v&&v.attrs.href||void 0,autoFocus:!0}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-text",className:"k-form-label"},i.toLanguageString(u,Rl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-link-text",ref:e=>{this.title=e&&e.element},defaultValue:v&&v.attrs.title||void 0}))),!1!==t.linkTarget&&b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},b.createElement(s.Checkbox,{id:"k-editor-link-target",ref:e=>{this.target=e},defaultChecked:v&&!!v.attrs.target||void 0}),i.toLanguageString(g,Rl[g]))))}),y=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(h,Rl[h])),b.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},i.toLanguageString(f,Rl[f]))],C=b.createElement(a.Window,{initialWidth:450,initialHeight:250,className:"k-editor-window",title:i.toLanguageString(p,Rl[p]),onClose:this.onClose,style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},k,b.createElement(a.WindowActionsBar,null,...y));return r?r(C,{content:k,actionButtons:y}):C}};d.registerForLocalization(Al);let Bl=class extends b.Component{constructor(){super(...arguments),this.src=null,this.altText=null,this.title=null,this.width=null,this.height=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const{view:e,settings:t}=this.props,l=e.state.schema.nodes[t.node],o={src:this.src?this.src.value:null,title:this.title?this.title.value:null,alt:this.altText?this.altText.value:null,width:this.width?this.width.value:null,height:this.height?this.height.value:null},r=Object.keys(o).filter((e=>null!==o[e]&&""!==o[e])).reduce(((e,t)=>Object.assign(e,{[t]:o[t]})),{}),i=l.createAndFill(r);i&&n.insertNode(i,!0)(e.state,(l=>e.dispatch(l.setMeta("commandName",t.commandName).setMeta("args",r)))),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,{insertImageDialogTitle:i,insertImageAddress:p,insertImageTitle:m,insertImageAltText:u,insertImageWidth:g,insertImageHeight:h,insertImageCancel:f,insertImageInsert:v}=t.messages,k=d.provideLocalizationService(this),y=e&&e.state;let C={};y&&y.selection instanceof n.NodeSelection&&y.selection.node.type===y.schema.nodes[t.node]&&(C=y.selection.node.attrs);const w=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(p,Rl[p])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-url",defaultValue:C.src,ref:e=>{this.src=e&&e.element},autoFocus:!0}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(u,Rl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-alt",defaultValue:C.alt,ref:e=>{this.altText=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-title",className:"k-form-label"},k.toLanguageString(m,Rl[m])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-title",defaultValue:C.title,ref:e=>{this.title=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-width",className:"k-form-label"},k.toLanguageString(g,Rl[g])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-width",defaultValue:C.width,ref:e=>{this.width=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-height",className:"k-form-label"},k.toLanguageString(h,Rl[h])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"k-editor-image-height",defaultValue:C.height,ref:e=>{this.height=e&&e.element}}))))}),S=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},k.toLanguageString(f,Rl[f])),b.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},k.toLanguageString(v,Rl[v]))],x=b.createElement(a.Window,{initialWidth:500,initialHeight:350,className:"k-editor-window",title:k.toLanguageString(i,Rl[i]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},w,b.createElement(a.WindowActionsBar,null,...S));return r?r(x,{content:w,actionButtons:S}):x}};d.registerForLocalization(Bl);const Dl=new n.PluginKey("editor-props");let Ml=class extends b.Component{constructor(){super(...arguments),this.htmlArea=null,this.textAreaRef=e=>{this.htmlArea=e;const t=e&&e.element.current;t&&(t.style.resize="none")},this.onUpdate=()=>{const{view:e,settings:t}=this.props,l=n.trimWhitespace(this.htmlArea&&this.htmlArea.value||""),{preserveWhitespace:o}=Dl.getState(e.state);n.setHtml(l,t.commandName,{preserveWhitespace:o})(e.state,e.dispatch),this.onClose()},this.onClose=()=>{this.props.view.focus(),this.props.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,i=d.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:m}=t.messages,u=b.createElement(s.TextArea,{className:"k-editor-textarea",defaultValue:n.indentHtml(n.getHtml(e.state)),autoFocus:!0,autoSize:!1,ref:this.textAreaRef}),g=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(p,Rl[p])),b.createElement(o.Button,{onClick:this.onUpdate,themeColor:"primary",dir:l,key:"update"},i.toLanguageString(m,Rl[m]))],h=b.createElement(a.Window,{className:"k-editor-window",title:i.toLanguageString(c,Rl[c]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!0,initialHeight:400,initialWidth:500},u,b.createElement(a.WindowActionsBar,null,...g));return r?r(h,{content:u,actionButtons:g}):h}};d.registerForLocalization(Ml);const zl={onMouseDown:e=>e.preventDefault(),onPointerDown:e=>e.preventDefault()},Fl={userSelect:"none"},Hl=function(e,...t){return t.forEach(((t,l)=>{e=e.replace("{"+l+"}",String(t))})),e},Wl=(e,t)=>t.dataItem.style?b.cloneElement(e,e.props,b.createElement("span",{style:t.dataItem.style},e.props.children)):e,Kl=["px","em","%"],Ul={animate:{openDuration:150,closeDuration:150}},Ol=[{textKey:Nl.borderStyleNone,text:Rl[Nl.borderStyleNone],value:"none"},{textKey:Nl.borderStyleSolid,text:Rl[Nl.borderStyleSolid],value:"solid"},{textKey:Nl.borderStyleDotted,text:Rl[Nl.borderStyleDotted],value:"dotted"},{textKey:Nl.borderStyleDashed,text:Rl[Nl.borderStyleDashed],value:"dashed"},{textKey:Nl.borderStyleDouble,text:Rl[Nl.borderStyleDouble],value:"double"},{textKey:Nl.borderStyleGroove,text:Rl[Nl.borderStyleGroove],value:"groove"},{textKey:Nl.borderStyleRidge,text:Rl[Nl.borderStyleRidge],value:"ridge"},{textKey:Nl.borderStyleInset,text:Rl[Nl.borderStyleInset],value:"inset"},{textKey:Nl.borderStyleOutset,text:Rl[Nl.borderStyleOutset],value:"outset"},{textKey:Nl.borderStyleInitial,text:Rl[Nl.borderStyleInitial],value:"initial"},{textKey:Nl.borderStyleInherit,text:Rl[Nl.borderStyleInherit],value:"inherit"},{textKey:Nl.borderStyleHidden,text:Rl[Nl.borderStyleHidden],value:"hidden"}];function Vl(e,t){for(let l=e.depth;l>0;l--){const o=e.node(l);if(t(o))return{node:o,depth:l}}return null}const _l=e.EditorToolsSettings.findAndReplace;let jl=class extends b.Component{constructor(e){super(e),this.onTabSelect=e=>{this.setState({selectedTab:e.selected})},this.onClose=()=>{const e=this.props.view,t=e.state,l=t.tr.setSelection(n.TextSelection.create(t.doc,t.selection.from,t.selection.to));e.updateState(t.apply(l)),e.focus(),this.props.onClose.call(void 0)},this.matchesMessage=e=>{const t=this.state.matches,l=this.state.nextMatch;let o=0,r=0;if(t&&l){const e=t.findIndex((e=>e.eq(l)));o=-1===e?t.length:e+1,r=t.length}return Hl(e,o,r)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(e=!1)=>{const t=this.props.view,{searchText:l,matchCase:o,matchCyclic:r,matchWord:i,useRegExp:a}=this.state,s={text:l,matchWord:i,matchCase:o,useRegExp:a,backward:e,matchCyclic:r},c=n.find(t.state,s);if(c){const e=t.state.tr.setSelection(c);e.scrollIntoView(),t.updateState(t.state.apply(e)),this.setState({nextMatch:c})}},this.onReplace=()=>{const e=this.props.view,t=e.state.selection,{replaceText:l}=this.state;if(!t.empty){const o=t.from,r=o+l.length,i=n.replace(t,l,e.state.tr);i.setSelection(n.TextSelection.create(i.doc,o,r)),i.scrollIntoView(),e.dispatch(i),this.setNextState({})}},this.onReplaceAll=()=>{const e=this.props.view,{searchText:t,replaceText:l,matchCase:o,matchWord:r,useRegExp:i}=this.state,a={text:t,matchWord:r,matchCase:o,useRegExp:i},s=n.replaceAll(e.state,l,a);s&&e.dispatch(s),this.setNextState({})},this.onKeyDown=e=>{13===e.keyCode?this.onFindNext():27===e.keyCode&&this.onClose()},this.onMatchCaseChecked=e=>this.setNextState({matchCase:e.value}),this.onMatchWordChecked=e=>this.setNextState({matchWord:e.value}),this.onMatchCyclicChecked=e=>this.setNextState({matchCyclic:e.value}),this.onUseRegExpChecked=e=>this.setNextState({useRegExp:e.value}),this.onSearchChange=e=>this.setNextState({searchText:e.target.value}),this.onReplaceChange=e=>this.setNextState({replaceText:e.target.value}),this.setNextState=e=>{const t={...this.state,...e,matches:void 0,nextMatch:void 0,error:void 0},l=this.props.view;if(t.searchText){const{searchText:e,matchWord:o,matchCase:r,useRegExp:i,matchCyclic:a}=t,s={text:e,matchWord:o,matchCase:r,useRegExp:i},c=l.state.selection;let d=[];try{d=n.findAll(l.state.doc,s)}catch(e){return e instanceof SyntaxError&&(t.error=this.settings.messages.findReplaceInvalidRegExp),void this.setState(t)}const p=e=>!e&&d[0]||d.find((e=>e.from>=c.from))||a&&d[0]||void 0;this.setState((e=>({...t,matches:d,nextMatch:p(e.searchText)})))}else this.setState(t)},this.state={selectedTab:0,searchText:n.selectedLineTextOnly(e.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1}}get settings(){return this.props.settings||_l}componentDidUpdate(e,t){const l=this.props.view,{matches:o=[],nextMatch:r}=this.state;if(t.nextMatch!==r){const e=l.state,t=e.tr,i=[];o.forEach((e=>{i.push({from:e.from,to:e.to,attrs:{class:r&&e.eq(r)?"k-text-selected":"k-text-highlighted"}})})),t.setMeta(n.textHighlightKey,i),t.setSelection(r||n.TextSelection.create(e.doc,e.selection.from)),l.dispatch(t)}}render(){const e=d.provideLocalizationService(this),{findReplaceDialogTitle:t,findReplaceTabFind:l,findReplaceTabReplace:n,findReplaceFindWhat:u,findReplaceReplaceWith:g,findReplaceReplace:h,findReplaceReplaceAll:f,findReplaceMatchCase:v,findReplaceMatchWord:k,findReplaceMatchCyclic:y,findReplaceUseRegExp:C,findReplacePrevMatch:w,findReplaceNextMatch:S,findReplaceMatches:x}=this.settings.messages,{matchCase:E,matchWord:T,matchCyclic:P,useRegExp:I,searchText:R,replaceText:N,nextMatch:L}=this.state,A=b.createElement("div",{className:"k-search-options"},b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-case",checked:E,onChange:this.onMatchCaseChecked,label:e.toLanguageString(v,Rl[v])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-whole",checked:T,onChange:this.onMatchWordChecked,label:e.toLanguageString(k,Rl[k])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-cyclic",checked:P,onChange:this.onMatchCyclicChecked,label:e.toLanguageString(y,Rl[y])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"regular-expression",checked:I,onChange:this.onUseRegExpChecked,label:e.toLanguageString(C,Rl[C])}))),B=b.createElement("div",{className:"k-matches-container"},b.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},b.createElement(r.IconWrap,{name:"chevron-left",icon:i.chevronLeftIcon}),e.toLanguageString(w,Rl[w])),b.createElement("span",null,this.matchesMessage(e.toLanguageString(x,Rl[x]))),b.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(S,Rl[S]),b.createElement(r.IconWrap,{name:"chevron-right",icon:i.chevronRightIcon}))),D=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"findWhat",className:"k-form-label"},e.toLanguageString(u,Rl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"findWhat",type:"text",value:R,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}),this.state.error&&b.createElement(m.Error,null,e.toLanguageString(this.state.error,Rl[this.state.error])))))}),M=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"replaceWith",className:"k-form-label"},e.toLanguageString(g,Rl[g])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"replaceWith",type:"text",value:N,onChange:this.onReplaceChange}))))});return b.createElement(a.Window,{title:e.toLanguageString(t,Rl[t]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:()=>null,maximizeButton:()=>null},b.createElement(p.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},b.createElement(p.TabStripTab,{title:e.toLanguageString(l,Rl[l])},D,A,B),b.createElement(p.TabStripTab,{title:e.toLanguageString(n,Rl[n])},D,M,b.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},b.createElement(o.Button,{disabled:!L,onClick:this.onReplace},e.toLanguageString(h,Rl[h])),b.createElement(o.Button,{disabled:!L,onClick:this.onReplaceAll},e.toLanguageString(f,Rl[f]))),A,B)))}};d.registerForLocalization(jl),e.EditorDialogs=void 0,(e=>{e.InsertLinkDialog=class extends Al{};e.InsertImageDialog=class extends Bl{};e.ViewHtmlDialog=class extends Ml{};e.FindAndReplaceDialog=class extends jl{}})(e.EditorDialogs||(e.EditorDialogs={}));const{bold:ql,underline:$l,italic:Gl}=e.EditorToolsSettings,Jl="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);e.EditorUtils=void 0,(e=>{e.alignBlocks=function(e,t,l){return!!n.alignBlocks(t,l)(e.state,e.dispatch)},e.applyInlineStyle=function(e,t,l){return n.applyInlineStyle(t,l)(e.state,e.dispatch)},e.applyLink=function(e,t,l){return n.applyLink(t,l)(e.state,e.dispatch)},e.canIndentList=function(e,t){return n.canIndentAsListItem(e,t)},e.canInsert=function(e,t){return n.canInsert(e,t)},e.canOutdentList=function(e,t){return n.canOutdentAsListItem(e,{listsTypes:t,nodes:[]})},e.convertMsLists=function(e){return n.convertMsLists(e)},e.createDocument=function(e,t,l){return n.parseContent(n.trimWhitespace(t),e,void 0!==l?l:{preserveWhitespace:"full"})},e.createTable=function(e,t,l){return n.createTable(e,t,l)},e.formatBlockElements=function(e,t,l){return n.formatBlockElements(t,l)(e.state,e.dispatch)},e.getBlockFormats=function(e){return n.getBlockFormats(e)},e.getHtml=function(e){return n.getHtml(e)},e.getInlineStyles=function(e,t){return n.getInlineStyles(e,t)},e.getMark=function(e,t){return n.getMark(e,t)},e.hasMark=function(e,t){return n.hasMark(e,t)},e.hasNode=function(e,t){return n.hasNode(e,t)},e.indentBlocks=function(e,t,l,o){return!!n.indentBlocks(t,l,o)(e.state,e.dispatch)},e.indentHtml=function(e){return n.indentHtml(e)},e.insertNode=function(e,t,l){n.insertNode(t,l)(e.state,e.dispatch)},e.isAligned=function(e,t){return n.isAligned(e,t)},e.isIndented=function(e,t,l){return n.isIndented(e,t,l)},e.removeComments=function(e){return n.removeComments(e)},e.removeTag=function(e,t){return n.removeTag(e,t)},e.pasteCleanup=function(e,t){return n.pasteCleanup(e,t)},e.sanitizeClassAttr=function(e){n.sanitizeClassAttr(e)},e.sanitizeStyleAttr=function(e){n.sanitizeStyleAttr(e)},e.removeAttribute=function(e){n.removeAttribute(e)},e.sanitize=function(e){return n.sanitize(e)},e.replaceImageSourcesFromRtf=function(e,t){return n.replaceImageSourcesFromRtf(e,t)},e.textHighlight=function(e){return n.textHighlight(e)},e.imageResizing=function(e){return n.imageResizing(e)},e.tableResizing=function(){return n.tableResizing()},e.setHtml=function(e,t,l,o){const r=n.trimWhitespace(t);n.setHtml(r,l,o)(e.state,e.dispatch)},e.toggleInlineFormat=function(e,t,l,o){return n.toggleInlineFormat(t,l,o)(e.state,e.dispatch)},e.toggleList=function(e,t,l){return n.toggleList(e.state,e.dispatch,e,t,l)},e.getShortcuts=function(e){return(e=>{const t=n.chainCommands(n.exitCode,((t,l)=>{const o=e&&e.types&&e.types.hardBreak||"hard_break",r=t.schema.nodes[o];return l&&l(t.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0})),l=e&&e.types&&e.types.listItem||"list_item",o=e&&e.toolsSettings||{};return{"Mod-b":(e,t)=>n.toggleInlineFormat(o.bold||ql)(e,t),"Mod-i":(e,t)=>n.toggleInlineFormat(o.italic||Gl)(e,t),"Mod-u":(e,t)=>n.toggleInlineFormat(o.underline||$l)(e,t),"Mod-z":n.undo,"Shift-Mod-z":n.redo,...Jl?{}:{"Mod-y":n.redo},Backspace:n.undoInputRule,"Mod-Enter":t,"Shift-Enter":t,...Jl?{"Ctrl-Enter":t}:{},Enter:(e,t)=>n.splitListItem(e.schema.nodes[l])(e,t),Tab:n.goToNextCell(1),"Shift-Tab":n.goToNextCell(-1)}})(e)},e.propsKey=Dl,e.imageResizeKey=n.imageResizeKey,e.marks={...n.marks},e.nodes={...n.nodes}})(e.EditorUtils||(e.EditorUtils={}));const Ql=(t,l)=>{const o=l.tr||t.state.tr.setSelection(new n.AllSelection(t.state.doc)).replaceSelectionWith(l.doc||e.EditorUtils.createDocument(t.state.schema,l.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(o))},Xl="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),Yl=Object.freeze({name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.3.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),{link:Zl,bold:eo,italic:to,underline:lo}=e.EditorToolsSettings,oo=class extends b.Component{constructor(t){super(t),this.state={view:void 0,linkDialog:!1},this._element=null,this._contentElement=null,this.iframe=null,this.trOnChange=null,this.htmlOnChange=null,this.showLicenseWatermark=!1,this.focus=()=>{this.view&&this.view.focus()},this.renderDialog=(e,t,l)=>this.state[l]&&b.createElement(e,{view:this.view,settings:t,dir:this.props.dir,onClose:()=>this.setState({[l]:!1})}),this.renderTool=(e,t,l=!1)=>{const r=b.createElement(e,{view:this.view,dir:this.props.dir,key:t,className:l?"k-toolbar-button":void 0});return r.type===o.ToolbarSeparator?b.createElement(e,{key:t}):r},this.updateTools=(e,t)=>{this.setState({view:e})},this.filterTransaction=(e,t)=>{const l={target:this,transaction:e,state:t};return!1!==(this.props.onExecute&&this.props.onExecute.call(void 0,l))},this.onPasteHtml=e=>{if(this.props.onPasteHtml&&this.pasteEvent){const t={target:this,pastedHtml:e,nativeEvent:this.pasteEvent},l=this.props.onPasteHtml.call(void 0,t);if(this.pasteEvent=void 0,"string"==typeof l)return l}return e},this.dispatchTransaction=t=>{const l=t.docChanged;if(this.props.onChange&&l){this.trOnChange=t;const l=t.doc,o=t.doc.type.schema,r={target:this,value:l,html:"",transaction:t,schema:o};Object.defineProperty(r,"html",{get:()=>(this.htmlOnChange=e.EditorUtils.getHtml({doc:l,schema:o}),this.htmlOnChange)}),this.props.onChange.call(void 0,r)}this.view&&(void 0===this.props.value||!l)&&this.view.updateState(this.view.state.apply(t))},this.onFocus=(e,t)=>{if(this.props.onFocus){const e={target:this,nativeEvent:t};this.props.onFocus.call(void 0,e)}return!1},this.onBlur=(e,t)=>{if(this.props.onBlur){const e={target:this,nativeEvent:t};this.props.onBlur.call(void 0,e)}return!1},this.onPaste=(e,t)=>(this.props.onPasteHtml&&(this.pasteEvent=t),!1),this.onIFrameInit=e=>{if(this.props.onIFrameInit){const t={target:this,iframe:e};this.props.onIFrameInit.call(void 0,t)}return!1},this.showLicenseWatermark=!r.validatePackage(Yl,{component:"Editor"}),this.licenseMessage=r.getLicenseMessage(Yl)}get value(){return null!==this.trOnChange?this.trOnChange.doc:void 0!==this.props.value?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""}get element(){return this._element}get contentElement(){return this._contentElement}get view(){return this._view}componentDidMount(){(!this.iframe||!Xl)&&this.initialize()}componentDidUpdate(e){const{value:t}=this.props,l=this.view;void 0===t||!l||(((e,t,l,o,r)=>{"string"==typeof t?o&&t===r?Ql(e,{tr:o}):t!==l&&Ql(e,{html:t}):o&&t.eq(o.doc)?Ql(e,{tr:o}):e.state.doc.eq(t)||Ql(e,{doc:t})})(l,t,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)}componentWillUnmount(){var e;this.view&&this.view.destroy(),this._view=void 0;const t=null==(e=this.iframe)?void 0:e.contentWindow;if(t){this._contentElement&&this._contentElement.parentNode&&this._contentElement.parentNode.removeChild(this._contentElement);const e=t.document.head;for(;e&&e.firstChild;)e.removeChild(e.firstChild)}}render(){const{tools:t=[],defaultEditMode:l="iframe",preserveWhitespace:n="full",style:i,className:a}=this.props,s=d.provideLocalizationService(this);if(this.view){Dl.getState(this.view.state).preserveWhitespace=n}let c=this.props.contentStyle;void 0===c&&void 0===(i||{}).height&&(c={height:"300px"});const p=t.map(((e,t)=>Array.isArray(e)?b.createElement(o.ButtonGroup,{key:t,className:"k-toolbar-button-group k-button-group-solid"},e.map(((e,t)=>this.renderTool(e,t)))):this.renderTool(e,t,!0)));return b.createElement("div",{ref:e=>{this._element=e},className:r.classNames("k-editor",a,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:i},p.length>0&&b.createElement(o.Toolbar,{className:"k-editor-toolbar",keyboardNavigation:this.props.keyboardNavigation},p),"iframe"===l?b.createElement("div",{className:"k-editor-content"},b.createElement("iframe",{onLoad:Xl?()=>{this.initialize()}:void 0,ref:e=>{this.iframe=e},frameBorder:"0",title:s.toLanguageString(Nl.iframeTitle,Rl[Nl.iframeTitle]),style:c,className:"k-iframe"})):b.createElement("div",{style:c,className:"k-editor-content"},b.createElement("div",{ref:e=>{this._contentElement=e},suppressContentEditableWarning:!0,role:"textbox","aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel})),this.renderDialog(e.EditorDialogs.InsertLinkDialog,Zl,"linkDialog"),this.showLicenseWatermark&&b.createElement(r.WatermarkOverlay,{message:this.licenseMessage}))}initialize(){const t=this.iframe&&this.iframe.contentWindow;if(t){const e=t.document,l=e.createElement("meta");l.setAttribute("charset","utf-8"),e.head.appendChild(l),this._contentElement=e.createElement("div"),e.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content"),this.iframe&&this.props.onIFrameInit?this.onIFrameInit(this.iframe):[v,k,"rtl"===this.props.dir?"body { direction: rtl }":void 0].forEach((t=>{if(t){const l=e.createElement("style");l.appendChild(e.createTextNode(t)),e.head.appendChild(l)}}))}const l=this._contentElement;if(!l)return;const{preserveWhitespace:r="full"}=this.props,i=[new n.Plugin({view:()=>({update:this.updateTools}),key:new n.PluginKey("toolbar-tools-update-plugin")}),new n.Plugin({filterTransaction:this.filterTransaction,key:new n.PluginKey("onExecute-event-plugin")}),new n.Plugin({key:Dl,state:{init:()=>({preserveWhitespace:r}),apply:(e,t)=>t}}),n.spacesFix(),n.caretColor(),n.history(),n.dropCursor(),n.gapCursor(),n.tableEditing(),n.cspFix()],a={...e.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:eo,italic:to,underline:lo}}),"Mod-k":()=>{const{linkDialog:e}=this.state,t=this.view;if(t){const l=t.state,o=l.selection.empty,r=n.getMark(l,l.schema.marks[Zl.mark]);!e&&(!o||r)&&this.setState({linkDialog:!0})}return!e},"Alt-F10":()=>{var e;const t=null==(e=this.element)?void 0:e.querySelector(".k-toolbar");if(t){const e=t.querySelector(o.toolbarButtons.join(","));if(e)return e.focus(),!0}return!1}},{defaultContent:s="",value:c,onMount:d}=this.props,p=c&&"string"!=typeof c?c:e.EditorUtils.createDocument(new n.Schema({nodes:n.nodes,marks:n.marks}),c||s,{preserveWhitespace:r}),m={state:n.EditorState.create({plugins:[...i,n.keymap(a),n.keymap(n.baseKeymap)],doc:p}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste},handleDrop:(e,t,l,o)=>{let r=!1;return l.content.nodesBetween(0,l.content.size,(e=>{r=r||"table_caption_external"===e.type.name})),r}},u={plugins:i,shortcuts:a,target:this,viewProps:m,dom:l},g=this._view=d&&d.call(void 0,u)||new n.EditorView({mount:l},m);this.setState({view:g})}};oo.propTypes={defaultContent:l.string,value:l.oneOfType([l.object,l.string]),defaultEditMode:l.oneOf(["iframe","div"]),contentStyle:l.object,dir:l.string,className:l.string,ariaDescribedBy:l.string,ariaLabelledBy:l.string,ariaLabel:l.string,style:l.object,tools:l.arrayOf(l.any),keyboardNavigation:l.bool,resizable:l.bool,preserveWhitespace:l.oneOf([!0,!1,"full"]),onMount:l.func,onFocus:l.func,onBlur:l.func,onChange:l.func,onPasteHtml:l.func,onExecute:l.func,onIFrameInit:l.func};let ro=oo;d.registerForLocalization(ro);let no=class extends b.Component{constructor(){super(...arguments),this.state={row:-1,col:-1}}renderCell(e,t,l){const o=Math.floor(e/this.props.columns),r=e%this.props.columns,n=r<=l&&o<=t;return b.createElement("span",{className:"k-ct-cell k-disabled"+(n?" k-selected":""),onMouseEnter:()=>this.setState({row:o,col:r}),onClick:()=>this.props.onCellClick.call(void 0,o,r),key:e})}render(){const e=[],t=this.props.columns*this.props.rows,{row:l,col:o}=this.state,{onDown:r}=this.props;let n=this.props.createTableMessage;o>-1&&(n=Hl(this.props.createTableHintMessage,l+1,o+1));for(let r=0;r<t;r++)e.push(this.renderCell(r,l,o));return[b.createElement("div",{onMouseLeave:()=>this.setState({row:-1,col:-1}),key:"cells",style:{borderColor:"inherit"},onPointerDown:r,onMouseDown:r},e),b.createElement("div",{className:"k-status",key:"status",onPointerDown:r,onMouseDown:r},n)]}};var io,ao;(e=>{const t=class e extends b.Component{constructor(){super(...arguments),this.pointerdown=!1,this.onWindowDown=e=>{const{anchor:t}=this.props;t&&(t===e.target||t.firstElementChild===e.target)||(this.props.show&&!this.pointerdown&&this.props.onClose(),this.pointerdown=!1)},this.onPointerDown=()=>this.pointerdown=!0}componentDidUpdate(e){e.show&&this.props.show&&this.props.onClose()}componentDidMount(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)}componentWillUnmount(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)}render(){const{show:t,anchor:l,dir:o,rows:r=e.defaultProps.rows,columns:n=e.defaultProps.columns}=this.props,i="rtl"===o?"right":"left";return b.createElement(u.Popup,{anchor:l,anchorAlign:{horizontal:i,vertical:"bottom"},popupAlign:{horizontal:i,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:t,style:"rtl"===o?{direction:"rtl"}:void 0},b.createElement(no,{rows:r,columns:n,createTableMessage:this.props.createTableMessage,createTableHintMessage:this.props.createTableHintMessage,onCellClick:this.props.onTableInsert,onDown:this.onPointerDown}))}};t.propTypes={show:l.bool.isRequired,createTableMessage:l.string.isRequired,createTableHintMessage:l.string.isRequired,onClose:l.func.isRequired,onTableInsert:l.func.isRequired,anchor:l.any,rows:l.number,columns:l.number,dir:l.string},t.defaultProps={rows:6,columns:8};let o=t;e.InsertTablePopup=o})(io||(io={})),(e=>{e.createInsertTableTool=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.state={openedPopup:!1},this.button=null,this.togglePopup=()=>{this.setState({openedPopup:!this.state.openedPopup})},this.closePopup=()=>{this.state.openedPopup&&this.togglePopup()},this.onTableInsert=(e,t)=>{const{view:l}=this.props;if(!l)return;const{table:o,table_row:r,table_cell:i}=l.state.schema.nodes,a=n.createTable({table:o,table_row:r,table_cell:i},e,t);a&&n.insertNode(a,!0)(l.state,l.dispatch),l.focus(),this.closePopup()}}render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=d.provideLocalizationService(this),{createTable:c,createTableHint:p}=e.messages,m=s.toLanguageString(c,Rl[c]),u=s.toLanguageString(p,Rl[p]),g=!(a&&n.canInsert(a,a.schema.nodes.table)&&!Vl(a.selection.$from,(e=>"table_caption_external"===e.type.name))),h=[b.createElement(o.Button,{onClick:g?void 0:this.togglePopup,"aria-disabled":!!g||void 0,ref:e=>{this.button=e&&e.element},key:"InsertTable",...zl,title:m,...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":g})}),t&&!g&&b.createElement(io.InsertTablePopup,{key:"insertTablePopup",createTableMessage:m,createTableHintMessage:u,dir:i.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(ao||(ao={}));const{alignRemove:so}=e.EditorToolsSettings,co=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...r}=this.props,i=t&&t.state,a=!!i&&n.isAligned(i,e.actions),s=a?so.actions:e.actions,c=a?so.commandName:e.commandName,p=d.provideLocalizationService(this),m=e.messages.title,u=b.createElement(o.Button,{onClick:()=>t&&n.alignBlocks(s,c)(t.state,t.dispatch),selected:a,togglable:!0,...zl,title:p.toLanguageString(m,Rl[m]),...e.props,...r});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t};var po;(e=>{e.createStyleDropDownList=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props,{style:r}=e;if(o){n.applyInlineStyle({style:r,value:l.value},e.commandName)(o.state,o.dispatch);const{syntheticEvent:i}=t;i&&"click"===i.type&&o.focus()}}}render(){const{style:t}=e,{view:l,render:o,data:r,defaultItem:i,...a}=this.props,s=r||e.items;let c=i||e.defaultItem;const p=l?n.getInlineStyles(l.state,{name:t,value:/^.+$/}):[],m=d.provideLocalizationService(this);c&&c.localizationKey&&(c={...c},c.text=c.localizationKey?m.toLanguageString(c.localizationKey,Rl[c.localizationKey]):c.text);let u=1===new Set(p).size?p[0]:null;null===u&&a.defaultValue&&(u=a.defaultValue);const h=b.createElement(g.DropDownList,{value:u&&s.find((e=>e.value===u)),data:s,defaultItem:c,itemRender:Wl,textField:"text",dataItemKey:"value",onChange:this.onChange,style:Fl,leftRightKeysNavigation:!1,title:c&&c.text,...a});return o?o.call(void 0,h,{view:l}):h}};return d.registerForLocalization(t),t}})(po||(po={}));const mo=e=>{const{view:t,style:l,colorPickerProps:o,commandName:r}=e,i=o.title,a=o.ariaLabel,{view:c="palette"}=o,p=d.useLocalization(),m=b.useCallback((e=>{t&&(n.applyInlineStyle({style:l,value:e.value},r)(t.state,t.dispatch),"palette"===c&&t.focus())}),[t,l,c,r]);return b.createElement(s.ColorPicker,{onChange:m,onActiveColorClick:m,...o,title:i&&p.toLanguageString(i,Rl[i]),ariaLabel:a&&p.toLanguageString(a,Rl[a])})};var uo;(e=>{e.createFormatBlockDropDownList=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props;if(o&&n.formatBlockElements(l.value,e.commandName)(o.state,o.dispatch)){const{syntheticEvent:e}=t;e&&"click"===e.type&&o.focus()}}}render(){const{view:t,render:l,data:o,defaultItem:r,...i}=this.props,a=o||e.items;let s=r||e.defaultItem;const c=t&&t.state,p=c?n.getBlockFormats(c):[],m=d.provideLocalizationService(this);s&&s.localizationKey&&(s={...s},s.text=s.localizationKey?m.toLanguageString(s.localizationKey,Rl[s.localizationKey]):s.text);const u=1===new Set(p).size?p[0]:null,h=b.createElement(g.DropDownList,{value:u&&a.find((e=>e.value===u)),onChange:this.onChange,itemRender:Wl,data:a,defaultItem:s,textField:"text",dataItemKey:"value",style:Fl,leftRightKeysNavigation:!1,title:s.text,...i});return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(uo||(uo={}));const go=(e,t)=>{const l=class extends b.Component{render(){const{view:l,render:n,...i}=this.props,a=d.provideLocalizationService(this),s=e.messages.title,c=l&&l.state,p=!!c&&!t(c),m=b.createElement(o.Button,{onClick:p?void 0:()=>l&&t(l.state,(t=>l.dispatch(t.setMeta("commandName",e.commandName)))),"aria-disabled":!!p||void 0,...zl,title:a.toLanguageString(s,Rl[s]),...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":p})});return n?n.call(void 0,m,{view:l}):m}};return d.registerForLocalization(l),l};var ho,fo,bo;(e=>{e.createUndoTool=e=>go(e,n.undo),e.createRedoTool=e=>go(e,n.redo)})(ho||(ho={})),(e=>{e.createIndentTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...i}=this.props,a=i.dir,s=t&&t.state,c=s&&s.schema.nodes,p=c&&c[e.listsTypes.listItem],m=e.actions,u=!!s&&!!p&&(n.isIndented(s,m,a)||m.some((e=>c&&c[e.node]&&n.hasNode(s,c[e.node]))))&&!n.hasNode(s,p),g=!!s&&n.canIndentAsListItem(s,p),h=u||g,f=d.provideLocalizationService(this),v=e.messages.title,k=!h,y=b.createElement(o.Button,{onClick:k?void 0:()=>{t&&g&&p?n.sinkListItem(p)(t.state,t.dispatch):t&&u&&n.indentBlocks(m,e.commandName,a)(t.state,t.dispatch)},"aria-disabled":!!k||void 0,title:f.toLanguageString(v,Rl[v]),...zl,...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":k})});return l?l.call(void 0,y,{view:t}):y}};return d.registerForLocalization(t),t}})(fo||(fo={})),(e=>{e.createInlineFormatTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...r}=this.props,i=t&&t.state,{mark:a,altMarks:s,altStyle:c}=e,p={mark:a,altMarks:s,altStyle:c},m=d.provideLocalizationService(this),u=e.messages.title,g=b.createElement(o.Button,{onClick:()=>t&&n.toggleInlineFormat(p,i&&i.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),selected:!!i&&n.hasMark(i,p),togglable:!0,...zl,title:m.toLanguageString(u,Rl[u]),...e.props,...r});return l?l.call(void 0,g,{view:t}):g}};return d.registerForLocalization(t),t}})(bo||(bo={}));const vo=t=>{const l=class extends b.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=s?s.schema.nodes[t.node]:void 0,p=d.provideLocalizationService(this),{insertImage:m}=t.messages,u=!c||!s||!n.canInsert(s,c),g=[b.createElement(o.Button,{onClick:u?void 0:this.toggleDialog,"aria-disabled":!!u||void 0,key:"insertImage",...zl,title:p.toLanguageString(m,Rl[m]),...t.props,...a,className:r.classNames(a.className,t.props.className,{"k-disabled":u})}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:l,settings:t,dir:a.dir,onClose:this.toggleDialog})||null];return i?i.call(void 0,g,{view:l}):g}};return d.registerForLocalization(l),l};var ko,yo,Co;(t=>{t.createLinkTool=t=>{const l=class extends b.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=!s||s.selection.empty,p=s&&n.getMark(s,s.schema.marks[t.mark]),m=d.provideLocalizationService(this),{insertHyperlink:u}=t.messages,g=c&&!p,h=[b.createElement(o.Button,{onClick:g?void 0:this.toggleDialog,"aria-disabled":!!g||void 0,key:"link",...zl,title:m.toLanguageString(u,Rl[u]),...t.props,...a,className:r.classNames(a.className,t.props.className,{"k-disabled":g})}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:t,dir:a.dir,view:l,onClose:this.toggleDialog})||null];return i?i.call(void 0,h,{view:l}):h}};return d.registerForLocalization(l),l}})(ko||(ko={})),(e=>{e.createListTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...r}=this.props;let i=!1;const a=d.provideLocalizationService(this),s=e.messages.title,c=e.types,p=e.listType;if(t){const e=t.state,l=e.schema.nodes,o=n.hasNode(e,l[c.orderedList]),r=n.hasNode(e,l[c.bulletList]);i=p===c.orderedList?o&&!r:!o&&r}const m=b.createElement(o.Button,{onClick:()=>t&&n.toggleList(t.state,t.dispatch,t,{listType:p,...c},e.commandName),togglable:!0,selected:i,title:a.toLanguageString(s,Rl[s]),...zl,...e.props,...r});return l?l.call(void 0,m,{view:t}):m}};return d.registerForLocalization(t),t}})(yo||(yo={})),(e=>{e.createOutdentTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=i.dir,c=!!a&&n.isIndented(a,e.actions,s),p=a&&a.schema.nodes[e.listsTypes.listItem],m=!!a&&n.canOutdentAsListItem(a,{nodes:e.actions,listsTypes:e.listsTypes}),u=c||m,g=d.provideLocalizationService(this),h=e.messages.title,f=!u,v=b.createElement(o.Button,{onClick:f?void 0:()=>{t&&m&&p?n.liftListItem(p)(t.state,t.dispatch):t&&c&&n.indentBlocks(e.actions,e.commandName,s)(t.state,t.dispatch)},"aria-disabled":!!f||void 0,title:g.toLanguageString(h,Rl[h]),...zl,...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":f})});return l?l.call(void 0,v,{view:t}):v}};return d.registerForLocalization(t),t}})(Co||(Co={}));const wo=(e,t)=>{const l=n.deleteColumn(e,t);if(l&&!t){const t=n.selectionCell(e),l=t&&t.node(t.depth);if(l&&1===l.content.childCount)return!1}return l},So=(e,t)=>{const l=n.deleteRow(e,t);if(l&&!t){const t=n.selectionCell(e),l=t&&t.node(t.depth-1);if(l&&1===l.content.childCount)return!1}return l};var xo,Eo,To;(e=>{e.createAddRowBeforeTool=e=>go(e,n.addRowBefore),e.createAddRowAfterTool=e=>go(e,n.addRowAfter),e.createAddColumnBeforeTool=e=>go(e,n.addColumnBefore),e.createAddColumnAfterTool=e=>go(e,n.addColumnAfter),e.createDeleteRowTool=e=>go(e,So),e.createDeleteColumnTool=e=>go(e,wo),e.createDeleteTableTool=e=>go(e,n.deleteTable),e.createMergeCellsTool=e=>go(e,n.mergeCells),e.createSplitCellTool=e=>go(e,n.splitCell)})(xo||(xo={})),(e=>{e.createUnlinkTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...i}=this.props,a={mark:e.mark},s=!!t&&n.hasMark(t.state,a),c=d.provideLocalizationService(this),p=e.messages.title,m=!s,u=b.createElement(o.Button,{onClick:m?void 0:()=>t&&n.removeLink(a,t.state.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),"aria-disabled":!!m||void 0,...zl,title:c.toLanguageString(p,Rl[p]),...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":m})});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t}})(Eo||(Eo={})),(t=>{t.createViewHtmlTool=t=>{const l=class extends b.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:r,...n}=this.props,i=d.provideLocalizationService(this),a=t.messages.viewHtml,s=[b.createElement(o.Button,{onClick:this.toggleDialog,key:"viewHtml",...zl,title:i.toLanguageString(a,Rl[a]),...t.props,...n}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:l,settings:t,dir:n.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,s,{view:l}):s}};return d.registerForLocalization(l),l}})(To||(To={}));const{print:Po}=e.EditorToolsSettings,Io=e=>{const{view:t,render:l,settings:n=Po,...i}=e,a=t&&t.dom,s=a&&a.ownerDocument,c=s&&s.defaultView,p=n.messages.title,m=!c||c===window,u=b.useCallback((()=>{c&&c.print()}),[c]),g=b.createElement(o.Button,{onClick:m?void 0:u,"aria-disabled":!!m||void 0,title:d.useLocalization().toLanguageString(p,Rl[p]),...zl,...n.props,...i,className:r.classNames(i.className,n.props.className,{"k-disabled":m})});return l?l.call(void 0,g,{view:t}):g},{pdf:Ro,savePdfOptions:No}=e.EditorToolsSettings,Lo=e=>{const{view:t,render:l,settings:r=Ro,savePdfOptions:n,savePdfCallback:i,...a}=e,s=r.messages.title,c=b.useCallback((()=>{t&&h.savePDF(t.dom,{...No,...n||{}},i)}),[t,n,i]),p=b.createElement(o.Button,{onClick:c,title:d.useLocalization().toLanguageString(s,Rl[s]),...zl,...r.props,...a});return l?l.call(void 0,p,{view:t}):p},{selectAll:Ao}=e.EditorToolsSettings,Bo=e=>{const{view:t,render:l,settings:r=Ao,...i}=e,a=r.messages.title,s=b.useCallback((()=>{t&&(n.selectAll(t.state,t.dispatch),t.focus())}),[t]),c=b.createElement(o.Button,{onClick:s,title:d.useLocalization().toLanguageString(a,Rl[a]),...zl,...r.props,...i});return l?l.call(void 0,c,{view:t}):c},{cleanFormatting:Do}=e.EditorToolsSettings,Mo=n.cleanFormatting(),zo=e=>{const{view:t,render:l,settings:n=Do,...i}=e,a=n.messages.title,s=!t||!Mo(t.state),c=b.useCallback((()=>{t&&Mo(t.state,(e=>{e.setMeta("commandName",n.commandName),t.dispatch(e)}))}),[t]),p=b.createElement(o.Button,{onClick:s?void 0:c,"aria-disabled":!!s||void 0,title:d.useLocalization().toLanguageString(a,Rl[a]),...zl,...n.props,...i,className:r.classNames(e.className,n.props.className,{"k-disabled":s})});return l?l.call(void 0,p,{view:t}):p},Fo=e.EditorToolsSettings.findAndReplace;let Ho=class extends b.Component{constructor(){super(...arguments),this.state={showDialog:!1},this.onClose=()=>this.setState({showDialog:!1}),this.onOpen=()=>this.setState({showDialog:!0})}render(){const{view:e,...t}=this.props,{props:l}=Fo,n=d.provideLocalizationService(this),i=Fo.messages.findReplaceToolTitle,a=!e;return[b.createElement(o.Button,{onClick:a?void 0:this.onOpen,"aria-disabled":!!a||void 0,...zl,title:n.toLanguageString(i,Rl[i]),key:"tool",...l,...t,className:r.classNames(t.className,l.className,{"k-disabled":a})}),this.state.showDialog&&e&&b.createElement(jl,{view:e,onClose:this.onClose,dir:t.dir,key:"dialog"})]}};d.registerForLocalization(Ho);const Wo=(e,t)=>{const{from:l,to:o}=e.selection;let r=null;return e.doc.nodesBetween(l,o,(e=>(r=r||(e.type===t?e:null),!r))),r},Ko=e=>{let t=!1;const l=e.view,r=Ll,i=e.listType,a=d.useLocalization();let s,c,p=[...e.items||[]];if(l){const e=l.state,o=e&&e.schema.nodes;s=o&&Wo(e,o[r.orderedList]),c=o&&Wo(e,o[r.bulletList]),t=!!(i===r.orderedList?s&&!c:!s&&c)}if(p=p.map((e=>({...e,text:e.textKey?a.toLanguageString(e.textKey,Rl[e.textKey]):e.text}))),t&&(s||c)){const e=n.listStyle((s||c).attrs);p=p.map(((t,l)=>({...t,selected:e?t.style===e:0===l})))}return b.createElement("span",{onMouseDown:e=>{e.preventDefault()}},b.createElement(o.SplitButton,{textField:"text",items:p,icon:e.icon,svgIcon:e.svgIcon,onButtonClick:e=>{l&&(n.toggleList(l.state,l.dispatch,l,{listType:i,...r,listAttrs:{}},"InsertList"),l.focus())},onItemClick:e=>{if(l){const t=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},o=s||c;if(o&&n.listStyle(o.attrs)!==e.item.style){const e=l.state.selection.$head.posAtIndex(0,-2)-1;l.dispatch(l.state.tr.setNodeMarkup(e,l.state.schema.nodes[i],t))}else n.toggleList(l.state,l.dispatch,l,{listType:i,...r,listAttrs:t},"InsertList");l.focus()}},buttonClass:t?"k-selected":void 0,title:void 0!==e.title?e.title:a.toLanguageString(e.titleKey,Rl[e.titleKey])}))},Uo=/[\D]+$/,Oo=e=>{const t=e.match(Uo);return t?t[0]:""},Vo=(e,t)=>{var l;const o=_o((null==(l=e.attrs)?void 0:l.style)||"")[t]||"";return{[t]:parseFloat(o)||null,[t+"Unit"]:Oo(o)}},_o=e=>(e||"").split(/\s*;\s*/).filter(Boolean).map((e=>{const t=e.split(/\s*:\s*/);return{[t[0]]:t[1]}})).reduce(((e,t)=>({...e,...t})),{}),jo=/^.+$/;function qo(e,t,l){let o;if(new RegExp("[^-]?"+t+":").test(e.style||"")){const{style:r}=((e,t)=>{const l=t.style,o=t.value,r=t.newValue;if(!e)return{changed:!1,style:null};const n=e.split(/\s*;\s*/).filter((e=>!!e)),i=n.filter((e=>{const t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===l&&o.test(t[1]))}));return r&&i.push(`${l}: ${r}`),{style:i.join("; ")+(i.length?";":""),changed:!!r||i.length!==n.length}})(e.style||"",{style:t,value:jo,newValue:l});o={...e,style:r}}else if(e.style){const r=_o(e.style);r[t]=l,o={...e,style:Object.keys(r).filter((e=>!!r[e])).reduce(((e,t)=>e+t+": "+r[t]+"; "),"").trim()}}else o=l?{...e,style:t+": "+l+";"}:{...e};return o}const $o=e=>{const t=Vl(e.selection.$from,(e=>"table"===e.type.name)),l=Vl(e.selection.$to,(e=>"table"===e.type.name));return t&&l&&t.depth===l.depth&&t.node.eq(l.node)?(e=>{const{doc:t,selection:l}=e,o=[];return l.ranges.forEach((e=>{const l=e.$from.pos,r=e.$to.pos;t.nodesBetween(l,r,((e,t,l,r)=>{("table_cell"===e.type.name||"table_header"===e.type.name)&&o.push({node:e,pos:t})}))})),o})(e).filter((({pos:l})=>{const o=Vl(e.doc.resolve(l),(e=>"table"===e.type.name));return o&&o.depth===t.depth&&t.node.eq(o.node)})):[]},Go=e=>{const t=[];if($o(e).length){const l=e.selection.$from,o=Vl(l,(e=>"table"===e.type.spec.tableRole));if(null===o)return t;const r=l.start(o.depth),i=o.node,a=n.TableMap.get(i),s=e.doc;a.map.forEach((e=>{const l=e+r;t.push({pos:l,node:s.nodeAt(l)})}))}return t},Jo="k-colgroup-data",Qo=(e,t,l)=>{const o={cellWidth:null,widthUnit:""},r=t.node,i=l.start(t.depth);if(!r.attrs[Jo])return o;const a=new Set;let s="";const c=n.htmlToFragment(r.attrs[Jo]).firstChild;return e.forEach((e=>{const t=r.resolve(e.pos-i),l=t.parent,o=t.index();let n=0;for(let e=0;e<=o;e++)n+=l.child(e).attrs.colspan;const d=c.children[n-1];d&&(s=d.style.width,a.add(s))})),1===a.size&&s&&(o.cellWidth=parseFloat(s)||null,o.widthUnit=Oo(s)),o},Xo=(e,t,l)=>{const o={cellHeight:null,heightUnit:""},r=t.node,n=l.start(t.depth),i=new Set;let a="";return e.forEach((e=>{var t;const l=r.resolve(e.pos-n).parent;a=_o((null==(t=l.attrs)?void 0:t.style)||"").height||"",i.add(a)})),1===i.size&&a&&(o.cellHeight=parseFloat(a)||null,o.heightUnit=Oo(a)),o},Yo=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{var r;o=_o((null==(r=e.node.attrs)?void 0:r.style)||"")[t]||"",l.add(o)})),1===l.size&&o?o:""},Zo=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{o=(e.node.attrs||{})[t]||"",l.add(o)})),1===l.size&&o?o:""},er={applyToAll:!1,cellWidth:null,widthUnit:"",cellHeight:null,heightUnit:"",alignment:{x:"",y:""},textControl:"",backgroundColor:void 0,cellPadding:null,borderWidth:null,borderColor:void 0,borderStyle:null,id:"",className:""},tr=e=>{const t=$o(e),l=e.selection.$from,o=t.length?Vl(l,(e=>"table"===e.type.spec.tableRole)):null;return o?{...er,...Qo(t,o,l),...Xo(t,o,l),alignment:{x:Yo(t,"text-align"),y:Yo(t,"vertical-align")},textControl:Yo(t,"white-space"),backgroundColor:Yo(t,"background-color")||void 0,cellPadding:parseFloat(Yo(t,"padding"))||null,borderWidth:parseFloat(Yo(t,"border-width"))||null,borderColor:Yo(t,"border-color")||void 0,borderStyle:Yo(t,"border-style")||null,id:Zo(t,"id"),className:Zo(t,"class")}:er},lr=(e,t,l)=>{l.forEach((({node:l,pos:o})=>{let r={...l.attrs};r=qo(r,"border-color",t.borderColor||""),r=qo(r,"border-style",t.borderStyle||""),r=qo(r,"border-width","number"==typeof t.borderWidth?t.borderWidth+"px":""),r=qo(r,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),r=qo(r,"background-color",t.backgroundColor||""),r=qo(r,"text-align",t.alignment.x||""),r=qo(r,"vertical-align",t.alignment.y||""),r=qo(r,"white-space",t.textControl||""),r.id=t.id||null,r.class=t.className||null,e.setNodeMarkup(o,null,r),"number"==typeof t.cellWidth&&((e,t,l)=>{const o=e.doc.resolve(t),r=o.parent,i=o.index();let a=0;for(let e=0;e<=i;e++)a+=r.child(e).attrs.colspan;const s=o.node(o.depth-1),c=o.posAtIndex(0,o.depth-1)-1;let d,p=s.attrs;if(p&&p[Jo]){const t=n.htmlToFragment(p[Jo]).firstChild;d=t.children[a-1],d.style.width=l,p={...p,[Jo]:t.outerHTML},e.setNodeMarkup(c,null,p)}else{let t=0;for(let e=0;e<r.childCount;e++)t+=r.child(e).attrs.colspan;const o=document.createElement("colgroup"),n=new Array(t);for(let e=0;e<t;e++)n[e]=document.createElement("col"),o.appendChild(n[e]);d=n[i],d.style.width=l,p={...p,[Jo]:"<colgroup>"+n.reduce(((e,t)=>e+t.outerHTML),"")+"</colgroup>"},e.setNodeMarkup(c,null,p)}})(e,o,t.cellWidth+(t.widthUnit||"px")),"number"==typeof t.cellHeight&&((e,t,l)=>{const o=e.doc.resolve(t),r=o.parent,n=o.posAtIndex(0)-1;e.setNodeMarkup(n,null,qo(r.attrs,"height",l))})(e,o,t.cellHeight+(t.heightUnit||"px"))}))},or=(e,t)=>{const l=e.tr,o=t.applyToAll?Go(e):$o(e);return lr(l,t,o),l},rr=e=>{const{view:t,...l}=e,[r,n]=b.useState(!1),a=d.useLocalization(),s=!(!t||!Vl(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=b.useCallback((()=>{n(!0)}),[]),p=b.useCallback((()=>{n(!1),null==t||t.focus()}),[t]),m=b.useCallback((e=>{if(t&&e){const l=or(t.state,e);l.docChanged&&t.dispatch(l)}p()}),[t,p]);return b.createElement(b.Fragment,null,b.createElement(o.Button,{type:"button",title:a.toLanguageString(Nl.cellProperties,Rl[Nl.cellProperties]),icon:"table-cell-properties",svgIcon:i.tableCellPropertiesIcon,onClick:c,disabled:!s,...zl,...l}),r&&t&&b.createElement(cr,{view:t,onCancel:p,onSave:m}))},nr=[{textKey:Nl.cellPropertiesLeftTop,text:Rl[Nl.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:i.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:Nl.cellPropertiesCenterTop,text:Rl[Nl.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:i.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:Nl.cellPropertiesRightTop,text:Rl[Nl.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:i.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:Nl.cellPropertiesLeftMiddle,text:Rl[Nl.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:Nl.cellPropertiesCenterMiddle,text:Rl[Nl.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:Nl.cellPropertiesRightMiddle,text:Rl[Nl.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:Nl.cellPropertiesLeftBottom,text:Rl[Nl.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:i.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:Nl.cellPropertiesCenterBottom,text:Rl[Nl.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:i.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:Nl.cellPropertiesRightBottom,text:Rl[Nl.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:i.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:Nl.cellPropertiesNoAlignment,text:Rl[Nl.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:i.tableAlignRemoveIcon,value:{x:"",y:""}}],ir=[{textKey:Nl.cellPropertiesWrap,text:Rl[Nl.cellPropertiesWrap],value:"",icon:"text-wrap",svgIcon:i.textWrapIcon},{textKey:Nl.cellPropertiesFitToCell,text:Rl[Nl.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:i.parameterStringIcon}],ar=(e,t)=>t?b.createElement(b.Fragment,null,b.createElement(s.InputPrefix,null,b.createElement(r.IconWrap,{icon:t.svgIcon,name:t.icon})),e):e,sr=(e,t)=>{const l=b.createElement(b.Fragment,null,b.createElement(s.InputPrefix,null,b.createElement(r.IconWrap,{icon:t.dataItem.svgIcon,name:t.dataItem.icon})),e.props.children);return b.cloneElement(e,e.props,l)},cr=e=>{const t=b.useMemo((()=>tr(e.view.state)),[e.view]),l=d.useLocalization(),r=b.useRef(null),n=t.applyToAll,i=b.useRef(null),c=t.cellWidth,p=b.useRef(null);t.widthUnit&&!Kl.includes(t.widthUnit)&&Kl.push(t.widthUnit);const m=t.widthUnit||"",u=b.useRef(null),h=t.cellHeight,f=b.useRef(null);t.heightUnit&&!Kl.includes(t.heightUnit)&&Kl.push(t.heightUnit);const v=t.heightUnit||"",k=b.useRef(null),y=nr.find((e=>void 0!==e.value.x&&t.alignment&&e.value.x===t.alignment.x&&e.value.y===t.alignment.y))||null,C=b.useRef(null),w=ir.find((e=>e.value===t.textControl)),S=b.useRef(null),x=t.backgroundColor,E=b.useRef(null),T=t.cellPadding,P=b.useRef(null),I=t.borderWidth,R=b.useRef(null),N=t.borderColor,L=b.useRef(null),A=Ol.find((e=>e.value===t.borderStyle)),B=b.useRef(null),D=t.id,M=b.useRef(null),z=t.className,F=b.useCallback((()=>{var t,l,o,n,a,s,c,d,m,g,h,b,v,y,w,x,T,I,N,A;const D={applyToAll:!(null==(l=null==(t=r.current)?void 0:t.element)||!l.checked),cellWidth:(null==(o=i.current)?void 0:o.value)||null,widthUnit:(null==(n=p.current)?void 0:n.value)||"",cellHeight:(null==(a=u.current)?void 0:a.value)||null,heightUnit:(null==(s=f.current)?void 0:s.value)||"",alignment:null==(d=null==(c=k.current)?void 0:c.value)?void 0:d.value,textControl:null==(g=null==(m=C.current)?void 0:m.value)?void 0:g.value,backgroundColor:null==(h=S.current)?void 0:h.value,cellPadding:"number"==typeof(null==(b=E.current)?void 0:b.value)?null==(v=E.current)?void 0:v.value:null,borderWidth:"number"==typeof(null==(y=P.current)?void 0:y.value)?null==(w=P.current)?void 0:w.value:null,borderColor:null==(x=R.current)?void 0:x.value,borderStyle:(null==(I=null==(T=L.current)?void 0:T.value)?void 0:I.value)||null,id:String((null==(N=B.current)?void 0:N.value)||""),className:String((null==(A=M.current)?void 0:A.value)||"")};e.onSave.call(void 0,D)}),[e.onSave]),H=b.createElement("div",{className:"k-form k-form-md"},b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("div",{className:"k-form-field-wrap"},b.createElement("span",{className:"k-checkbox-wrap"},b.createElement(s.Checkbox,{ref:r,defaultChecked:n})),b.createElement("label",{className:"k-checkbox-label"},l.toLanguageString(Nl.cellPropertiesApplyToAllCells,Rl[Nl.cellPropertiesApplyToAllCells])))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesWidth,Rl[Nl.cellPropertiesWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:i,defaultValue:c,min:0,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto])}),b.createElement("div",{className:"k-form-hint"},l.toLanguageString(Nl.cellPropertiesApplyToColumn,Rl[Nl.cellPropertiesApplyToColumn])))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:p,defaultValue:m,data:Kl,popupSettings:Ul}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesHeight,Rl[Nl.cellPropertiesHeight])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:u,defaultValue:h,min:0,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto])}),b.createElement("div",{className:"k-form-hint"},l.toLanguageString(Nl.cellPropertiesApplyToRow,Rl[Nl.cellPropertiesApplyToRow])))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:f,defaultValue:v,data:Kl,popupSettings:Ul}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesAlignment,Rl[Nl.cellPropertiesAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:k,defaultValue:y,data:nr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"text",popupSettings:Ul,valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesTextControl,Rl[Nl.cellPropertiesTextControl])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:C,defaultValue:w,data:ir.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Ul,valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesCellPadding,Rl[Nl.cellPropertiesCellPadding])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:E,defaultValue:T,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesBackground,Rl[Nl.cellPropertiesBackground])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:S,defaultValue:x}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesBorderWidth,Rl[Nl.cellPropertiesBorderWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:P,defaultValue:I,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesBorderColor,Rl[Nl.cellPropertiesBorderColor])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:R,defaultValue:N}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesBorderStyle,Rl[Nl.cellPropertiesBorderStyle])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:L,defaultValue:A,popupSettings:Ul,data:Ol,textField:"text",dataItemKey:"value"}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesId,Rl[Nl.cellPropertiesId])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:B,defaultValue:D}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesCssClass,Rl[Nl.cellPropertiesCssClass])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:M,defaultValue:z})))))),W=[b.createElement(o.Button,{themeColor:"primary",key:"save",onClick:F},l.toLanguageString(Nl.cellPropertiesSave,Rl[Nl.cellPropertiesSave])),b.createElement(o.Button,{onClick:e.onCancel,key:"cancel"},l.toLanguageString(Nl.cellPropertiesCancel,Rl[Nl.cellPropertiesCancel]))];return b.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(Nl.cellProperties,Rl[Nl.cellProperties]),onClose:e.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},H,b.createElement(a.WindowActionsBar,{layout:"start"},...W))},dr={rows:0,columns:0,width:null,widthUnit:"",height:null,heightUnit:"",position:null,textAlign:"",cellPadding:null,cellSpacing:null,backgroundColor:void 0,borderWidth:null,borderColor:void 0,borderStyle:null,collapseBorders:!1,id:"",className:"",caption:"",captionAlignment:null,captionPosition:null,headerRows:0,headerColumns:0,associateHeaders:"none"},pr={left:{"margin-left":"","margin-right":"auto"},center:{"margin-left":"auto","margin-right":"auto"},right:{"margin-left":"auto","margin-right":""},"":{}},mr=e=>{const t=[];for(let l=0;l<e.height;l++){const o=l*e.width,r=o+e.width;t.push(e.map.slice(o,r))}return t},ur=e=>{let t=!0,l=!0;return e.content.forEach((e=>{e.content.forEach((e=>{const o="table_header"===e.type.name,r="table_cell"===e.type.name;o&&!e.attrs.scope&&(t=!1),(o&&!e.attrs.id||r&&!e.attrs.headers)&&(l=!1)}))})),t?"scope":l?"id":"none"},gr=e=>{var t,l,o;const r=$o(e),i=e.selection.$from,a=r.length?Vl(i,(e=>"table"===e.type.spec.tableRole)):null;if(!a)return dr;const s=Vl(i,(e=>"table_wrapper"===e.type.name));let c="",d={},p={};s&&(p=_o(s.node.attrs.style),s.node.content.forEach((e=>{if("table_caption_external"===e.type.name){const t=n.pmDocToFragment(e);c=n.fragmentToHtml(t),c="<img>"===c?"":c,d=_o(e.attrs.style)}})));const m=_o((null==(t=a.node.attrs)?void 0:t.style)||""),u=n.TableMap.get(a.node),g="auto"===p["margin-left"]&&"auto"===p["margin-right"]?"center":"auto"===p["margin-right"]?"left":"auto"===p["margin-left"]?"right":null,h=((e,t)=>{let l=0,o=0;const r=mr(t);r.forEach((t=>{let o=!0;t.forEach((t=>{const l=e.nodeAt(t);l&&"table_header"!==l.type.name&&(o=!1)})),o&&l++}));for(let l=0;l<t.width;l++){let n=!0;for(let o=0;o<t.height;o++){const t=r[o]&&r[o][l],i="number"==typeof t&&e.nodeAt(t);i&&"table_header"!==i.type.name&&(n=!1)}n&&o++}return{rows:l,columns:o}})(a.node,u),f=(e=>{const t=new Set;return e.content.forEach((e=>{e.content.forEach((e=>{t.add(_o(e.attrs.style).padding||"")}))})),1===t.size?Array.from(t)[0]:""})(a.node);return{...dr,columns:u.width,rows:u.height,...Vo(a.node,"width"),...s&&/%/.test(p.width||"")?Vo(s.node,"width"):{},...Vo(a.node,"height"),textAlign:m["text-align"]||"",position:g||null,cellPadding:f?parseFloat(f):null,cellSpacing:m["border-spacing"]?parseFloat(m["border-spacing"]):null,backgroundColor:m["background-color"],borderWidth:m["border-width"]?parseFloat(m["border-width"]):null,borderColor:m["border-color"],borderStyle:m["border-style"]||null,collapseBorders:"collapse"===m["border-collapse"],caption:c||void 0,captionAlignment:d["text-align"]||"",captionPosition:d["caption-side"]||null,headerRows:h.rows,headerColumns:h.columns,associateHeaders:h.rows||h.columns?ur(a.node):"none",id:(null==(l=a.node.attrs)?void 0:l.id)||"",className:(null==(o=a.node.attrs)?void 0:o.class)||""}},hr=e=>{const t=e.lastChild.lastChild;return{node:t,pos:e.content.size-t.nodeSize}},fr=(e,t,l,o,r)=>{const i=t+hr(l).pos;if(!e.doc.nodeAt(i))return e;const a=e.doc.resolve(i),s=new n.CellSelection(a,a),c=e.tr.setSelection(s);let d=e.apply(c);for(let e=0;e<o;e++)r(d,(e=>{d=d.apply(e)}));return d},br=(e,t,l,o)=>{let r=e;for(let e=0;e<l;e++){const e=r.doc.nodeAt(t);if(e){const l=t+hr(e).pos,i=r.doc.resolve(l),a=new n.CellSelection(i,i),s=r.tr.setSelection(a);r=r.apply(s),o(r,(e=>{r=r.apply(e)}))}}return r},vr=(e,t,l,o,r)=>{if(t.type.name!==o.name||Object.keys(r).length>0){const n=e.tr.setNodeMarkup(l,o,{...t.attrs,...r});return e.apply(n)}return e},kr=(e,t,l)=>{const o=e.doc.nodeAt(l),r=o&&n.TableMap.get(o);if(!o||!r)return e;const i=mr(r);let a=e;const{table_header:s,table_cell:c}=e.schema.nodes,d=String((new Date).getTime()),p=[],m=(e,t,l,o)=>{const r=[];if(o)for(let l=0;l<e;l++)p[l]&&p[l][t]&&r.push(p[l][t]);if(l)for(let l=0;l<t;l++)p[e]&&p[e][l]&&r.push(p[e][l]);return r.join(" ")};return i.forEach(((e,r)=>{e.forEach(((e,n)=>{const i=o.nodeAt(e);if(i){const o=n<t.headerColumns,u=r<t.headerRows,g={...i.attrs};((e,t)=>{/^cell-[0-9]+-[0-9]+$/.test(e.attrs.id||"")&&(t.id=null)})(i,g),g.headers=null,g.scope=null,u||o?("scope"===t.associateHeaders&&(g.scope=u?"col":"row"),"id"===t.associateHeaders&&(g.id=((e,t)=>{const l=`cell-${e}${t}-${d}`;return p[e]||p.push([]),p[e][t]||p[e].push([]),p[e][t]=l,l})(r,n),(n>0||r>0)&&(g.headers=m(r,n,o,u)||null)),a=vr(a,i,l+e+1,s,g)):("id"===t.associateHeaders&&(g.headers=m(r,n,t.headerColumns>0,t.headerRows>0)||null),a=vr(a,i,l+e+1,c,g))}}))})),a},yr=(e,t)=>n.parseContent("<p>"+e+"</p>",t).content.firstChild.content,Cr=(e,t)=>{if(!e.caption)return;let l={caption:"",style:"display: table-caption"};e.captionAlignment&&(l=qo(l,"text-align",e.captionAlignment)),e.captionPosition&&(l=qo(l,"caption-side",e.captionPosition));const o=yr(e.caption,t);return o&&t.nodes.table_caption_external.createAndFill(l,o)||void 0},wr=e=>e.firstChild&&"table_caption_external"===e.firstChild.type.name,Sr=(e,t,l,o,r)=>{let n={state:e,pos:l};if(o||!t.position&&!t.caption)o&&(t.position||t.caption||!t.caption&&wr(o.node))?(e=((e,t,l,o)=>{let r={...t.attrs};return r=qo(r,"margin-left",""),r=qo(r,"margin-right",""),Object.keys(o||{}).forEach((e=>{r=qo(r,e,(o||{})[e]||"")})),e.apply(e.tr.setNodeMarkup(l,null,r))})(e,o.node,r,t.position&&pr[t.position]),e=((e,t,l,o)=>{let r,n=e;const i=l+2,a=l+1,s=n.schema;if(wr(t))if(r=t.firstChild,o.caption){const e=yr(o.caption,s);if(n=n.apply(n.tr.replaceWith(i,i+r.content.size,e)),r=n.doc.nodeAt(a),r){let e={...r.attrs};e=qo(e,"text-align",o.captionAlignment||""),e=qo(e,"caption-side",o.captionPosition||""),n=n.apply(n.tr.setNodeAttribute(a,"style",e.style))}}else n=n.apply(n.tr.deleteRange(i,i+r.content.size));else r=Cr(o,s),r&&(n=n.apply(n.tr.replaceWith(a,a,r)));return n})(e,o.node,r,t),n={state:e,pos:r}):n=!o||t.position||t.caption?{state:e,pos:l}:{state:e,node:o.node,pos:e.selection.$from.start(o.depth)-1};else{let o={table:"",style:"display: table"};const r=[],i=t.position,a=i&&pr[i];a&&Object.keys(a).forEach((e=>{o=qo(o,e,a[e]||"")})),"number"==typeof t.width&&"%"===t.widthUnit&&(o=qo(o,"width",t.width+t.widthUnit));const s=Cr(t,e.schema);s&&r.push(s);const c=e.doc.nodeAt(l);r.push(c);const d=e.schema.nodes.table_wrapper.createAndFill(o,r);if(d){const t=e.tr.replaceWith(l,l+c.content.size,d);n={state:e=e.apply(t),pos:l}}}const i=o&&n.state.doc.nodeAt(r);if(i){let e;"number"==typeof t.width&&"%"===t.widthUnit?e=qo(i.attrs,"width",t.width+t.widthUnit):"%"!==t.widthUnit&&/%/.test(_o(i.attrs.style||"").width||"")&&(e=qo(i.attrs,"width","")),e&&(n.state=n.state.apply(n.state.tr.setNodeMarkup(r,null,e)))}return n},xr=(e,t)=>{const l=e.selection.$from,o=Vl(l,(e=>"table"===e.type.spec.tableRole));if(!o)return;const r=l.start(o.depth)-1;let i=((e,t,l,o)=>{let r=e,i=r.doc.nodeAt(t);if(!i)return r;let a=n.TableMap.get(i);return a.width===o&&a.height===l||(o>a.width?r=fr(r,t,i,o-a.width,n.addColumnAfter):o<a.width&&(r=br(r,t,a.width-o,wo)),i=r.doc.nodeAt(t),!i)||(a=n.TableMap.get(i),l>a.height?r=fr(r,t,i,l-a.height,n.addRowAfter):l<a.height&&(r=br(r,t,a.height-l,So))),r})(e,r,t.rows,t.columns);if(!i)return;const a=i.tr;Go(i).forEach((e=>{let l={...e.node.attrs};l=qo(l,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),a.setNodeMarkup(e.pos,null,l)})),i=i.apply(a),i=((e,t,l)=>{const o=e.doc.nodeAt(l);if(!o)return e;let r={...o.attrs};const n=null!==t.width&&("%"!==t.widthUnit||!t.caption&&!t.position);r=qo(r,"width",n?t.width+t.widthUnit:""),r=qo(r,"height",null!==t.height?t.height+t.heightUnit:""),r=qo(r,"text-align",t.textAlign||""),r=qo(r,"background-color",t.backgroundColor||""),r=qo(r,"border-width",t.borderWidth?t.borderWidth+"px":""),r=qo(r,"border-style",t.borderStyle||""),r=qo(r,"border-color",t.borderColor||""),r=qo(r,"border-spacing",null!==t.cellSpacing?t.cellSpacing+"px":""),r=null!==t.cellSpacing?qo(r,"border-collapse","unset"):qo(r,"border-collapse",t.collapseBorders?"collapse":"");const i=pr[t.position||""]||{};Object.keys(i).forEach((e=>{r=qo(r,e,i[e])})),r.id=t.id||null,r.class=t.className||null;const a=e.tr.setNodeMarkup(l,null,r);return e.apply(a)})(i,t,r),i=kr(i,t,r);const s=Vl(l,(e=>"table_wrapper"===e.type.name)),c=l.start((null==s?void 0:s.depth)||0)-1,d=Sr(i,t,r,s,c);i=d.state;const p=d.pos,m=i.doc.nodeAt(d.pos);if(!m)return;const u=p+(s||o).node.content.size,g=e.tr.replaceWith(p,u,m),h=n.Selection.atEnd(m),f=n.TextSelection.create(g.doc,p+h.to+1);return g.setSelection(f),g},Er=e=>{const{view:t,...l}=e,r=d.useLocalization(),[n,a]=b.useState(!1),s=!(!t||!Vl(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=b.useCallback((()=>{a(!0)}),[]),p=b.useCallback((()=>{a(!1),null==t||t.focus()}),[t]),m=b.useCallback((e=>{if(t&&e){const l=xr(t.state,e);l&&t.dispatch(l)}p()}),[t,p]);return b.createElement(b.Fragment,null,b.createElement(o.Button,{type:"button",title:r.toLanguageString(Nl.tableProperties,Rl[Nl.tableProperties]),icon:"table-properties",svgIcon:i.tablePropertiesIcon,onClick:c,disabled:!s,...zl,...l}),n&&b.createElement(Nr,{onClose:p,onSave:m,view:t}))},Tr=[{textKey:Nl.tablePropertiesAlignLeft,text:Rl[Nl.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon},{textKey:Nl.tablePropertiesAlignCenter,text:Rl[Nl.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon},{textKey:Nl.tablePropertiesAlignRight,text:Rl[Nl.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon},{textKey:Nl.tablePropertiesNoAlignment,text:Rl[Nl.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:i.tableAlignRemoveIcon}],Pr=[{textKey:Nl.tablePropertiesLeft,text:Rl[Nl.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:i.tablePositionStartIcon},{textKey:Nl.tablePropertiesCenter,text:Rl[Nl.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:i.tablePositionCenterIcon},{textKey:Nl.tablePropertiesRight,text:Rl[Nl.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:i.tablePositionEndIcon}].map((e=>({...e,style:pr[e.value]}))),Ir=[{textKey:Nl.tablePropertiesTop,text:Rl[Nl.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:i.positionTopIcon},{textKey:Nl.tablePropertiesBottom,text:Rl[Nl.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:i.positionBottomIcon}],Rr=[{textKey:Nl.tablePropertiesNone,text:Rl[Nl.tablePropertiesNone],value:"none"},{textKey:Nl.tablePropertiesUsingScopeAttribute,text:Rl[Nl.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:Nl.tablePropertiesUsingIdAttributes,text:Rl[Nl.tablePropertiesUsingIdAttributes],value:"id"}],Nr=e=>{const t=b.useMemo((()=>{const t=e.view&&e.view.state;return t?gr(t):dr}),[e.view]),l=d.useLocalization(),[r,n]=b.useState(0),i=b.useCallback((e=>{n(e.selected)}),[]),c=b.useRef(null),m=b.useRef(null),u=b.useRef(null),h=b.useRef(null),f=b.useRef(null),v=b.useRef(null),k=b.useRef(null),y=b.useRef(null),C=b.useRef(null),w=b.useRef(null),S=b.useRef(null),x=b.useRef(null),E=b.useRef(null),T=b.useRef(null),P=b.useRef(null),I=b.useRef(null),R=b.useRef(null),N=b.useRef(null),L=b.useRef(null),A=b.useRef(null),B=b.useRef(null),D=b.useRef(null),M=b.useRef(null),z=b.useCallback((()=>{var t,l,o,r,n,i,a,s,d,p,g,b,z,F,H,W,K,U,O,V;const _={rows:(null==(t=c.current)?void 0:t.value)||0,columns:(null==(l=m.current)?void 0:l.value)||0,width:u.current?u.current.value:null,height:h.current?h.current.value:null,cellSpacing:f.current?f.current.value:null,cellPadding:v.current?v.current.value:null,borderWidth:k.current?k.current.value:null,widthUnit:(null==(o=y.current)?void 0:o.value)||"",heightUnit:(null==(r=C.current)?void 0:r.value)||"",position:(null==(i=null==(n=w.current)?void 0:n.value)?void 0:i.value)||null,textAlign:null!=(a=S.current)&&a.value?S.current.value.value:null,borderStyle:null!=(s=x.current)&&s.value?x.current.value.value:null,backgroundColor:null==(d=E.current)?void 0:d.value,borderColor:null==(p=T.current)?void 0:p.value,collapseBorders:!(null==(b=null==(g=P.current)?void 0:g.element)||!b.checked),id:String((null==(z=I.current)?void 0:z.value)||""),className:String((null==(F=R.current)?void 0:F.value)||""),caption:String((null==(H=N.current)?void 0:H.value)||""),headerRows:(null==(W=L.current)?void 0:W.value)||0,headerColumns:(null==(K=A.current)?void 0:K.value)||0,captionAlignment:null!=(U=B.current)&&U.value?B.current.value.value:null,captionPosition:null!=(O=D.current)&&O.value?D.current.value.value:null,associateHeaders:null!=(V=M.current)&&V.value?M.current.value.value:"none"};e.onSave.call(void 0,_)}),[e.onSave]),F=b.createElement("div",{className:"k-form k-form-md"},b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesRows,Rl[Nl.tablePropertiesRows])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:c,defaultValue:t.rows,min:1}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesColumns,Rl[Nl.tablePropertiesColumns])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:m,defaultValue:t.columns,min:1}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesWidth,Rl[Nl.tablePropertiesWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:u,defaultValue:t.width,min:0,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto])}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:y,defaultValue:t.widthUnit,data:Kl,popupSettings:Ul}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesHeight,Rl[Nl.tablePropertiesHeight])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:h,defaultValue:t.height,min:0,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto])}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:C,defaultValue:t.heightUnit,data:Kl.filter((e=>"%"!==e)),popupSettings:Ul}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesPosition,Rl[Nl.tablePropertiesPosition])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:w,defaultValue:Pr.find((e=>e.value===t.position)),popupSettings:Ul,data:Pr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesAlignment,Rl[Nl.tablePropertiesAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:S,defaultValue:Tr.find((e=>e.value===t.textAlign)),data:Tr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Ul,valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCellSpacing,Rl[Nl.tablePropertiesCellSpacing])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:f,defaultValue:t.cellSpacing,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto]),min:0}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCellPadding,Rl[Nl.tablePropertiesCellPadding])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:v,defaultValue:t.cellPadding,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto]),min:0}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesTableBackground,Rl[Nl.tablePropertiesTableBackground])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:E,defaultValue:t.backgroundColor}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesBorderWidth,Rl[Nl.tablePropertiesBorderWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:k,defaultValue:t.borderWidth,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesBorderColor,Rl[Nl.tablePropertiesBorderColor])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:T,defaultValue:t.borderColor}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesBorderStyle,Rl[Nl.tablePropertiesBorderStyle])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:x,defaultValue:Ol.find((e=>e.value===t.borderStyle)),popupSettings:Ul,data:Ol.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value"}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Checkbox,{ref:P,className:"k-checkbox-wrap",label:l.toLanguageString(Nl.tablePropertiesCollapseBorders,Rl[Nl.tablePropertiesCollapseBorders]),defaultChecked:t.collapseBorders})))))),H=b.createElement("div",{className:"k-form k-form-md"},b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("div",{className:"k-form-layout k-d-grid"},b.createElement("div",{className:"k-form-field"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesId,Rl[Nl.tablePropertiesId])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:I,defaultValue:t.id}))),b.createElement("div",{className:"k-form-field"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCssClass,Rl[Nl.tablePropertiesCssClass])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:R,defaultValue:t.className}))),b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("legend",{className:"k-form-legend"},l.toLanguageString(Nl.tablePropertiesAccessibility,Rl[Nl.tablePropertiesAccessibility])),b.createElement("div",{className:"k-d-grid k-grid-cols-4 k-gap-x-4"},b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCaption,Rl[Nl.tablePropertiesCaption])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:N,defaultValue:t.caption}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCaptionPosition,Rl[Nl.tablePropertiesCaptionPosition])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:D,defaultValue:Ir.find((e=>e.value===t.captionPosition)),data:Ir.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ul,textField:"text",dataItemKey:"value",valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCaptionAlignment,Rl[Nl.tablePropertiesCaptionAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:B,defaultValue:Tr.find((e=>e.value===t.captionAlignment)),data:Tr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ul,textField:"text",dataItemKey:"value",valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesHeaderRows,Rl[Nl.tablePropertiesHeaderRows])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:L,defaultValue:t.headerRows,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesHeaderCols,Rl[Nl.tablePropertiesHeaderCols])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:A,defaultValue:t.headerColumns,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesAssociateHeaders,Rl[Nl.tablePropertiesAssociateHeaders])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:M,defaultValue:Rr.find((e=>e.value===t.associateHeaders)),data:Rr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ul,textField:"text",dataItemKey:"value"})))))))),W=b.createElement(p.TabStrip,{selected:r,onSelect:i,animation:!1,keepTabsMounted:!0},b.createElement(p.TabStripTab,{title:l.toLanguageString(Nl.tablePropertiesGeneral,Rl[Nl.tablePropertiesGeneral])},F),b.createElement(p.TabStripTab,{title:l.toLanguageString(Nl.tablePropertiesAdvanced,Rl[Nl.tablePropertiesAdvanced])},H)),K=[b.createElement(o.Button,{themeColor:"primary",key:"save",onClick:z},l.toLanguageString(Nl.tablePropertiesSave,Rl[Nl.tablePropertiesSave])),b.createElement(o.Button,{onClick:e.onClose,key:"cancel"},l.toLanguageString(Nl.tablePropertiesCancel,Rl[Nl.tablePropertiesCancel]))];return b.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(Nl.tableProperties,Rl[Nl.tableProperties]),onClose:e.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},W,b.createElement(a.WindowActionsBar,{layout:"start"},...K))};e.EditorTools=void 0,(t=>{function l(e){return co(e)}t.createAlignTool=l;class o extends(l(e.EditorToolsSettings.alignLeft)){}t.AlignLeft=o;class r extends(l(e.EditorToolsSettings.alignRight)){}t.AlignRight=r;class n extends(l(e.EditorToolsSettings.alignCenter)){}t.AlignCenter=n;class a extends(l(e.EditorToolsSettings.alignJustify)){}function s(e){return ao.createInsertTableTool(e)}t.AlignJustify=a,t.createInsertTableTool=s;class c extends(s(e.EditorToolsSettings.insertTable)){}t.InsertTable=c;class d extends io.InsertTablePopup{}function p(e){return po.createStyleDropDownList(e)}t.InsertTablePopup=d,t.createStyleDropDownList=p;class m extends(p(e.EditorToolsSettings.fontSize)){}t.FontSize=m;class u extends(p(e.EditorToolsSettings.fontName)){}function g(e){return uo.createFormatBlockDropDownList(e)}t.FontName=u,t.ForeColor=t=>b.createElement(mo,{...e.EditorToolsSettings.foreColor,...t}),t.BackColor=t=>b.createElement(mo,{...e.EditorToolsSettings.backColor,...t}),t.createFormatBlockDropDownList=g;class h extends(g(e.EditorToolsSettings.formatBlock)){}function f(e){return ho.createUndoTool(e)}function v(e){return ho.createRedoTool(e)}t.FormatBlock=h,t.createUndoTool=f,t.createRedoTool=v;class k extends(f(e.EditorToolsSettings.undo)){}t.Undo=k;class y extends(v(e.EditorToolsSettings.redo)){}function C(e){return fo.createIndentTool(e)}t.Redo=y,t.createIndentTool=C;class w extends(C(e.EditorToolsSettings.indent)){}function S(e){return bo.createInlineFormatTool(e)}t.Indent=w,t.createInlineFormatTool=S;class x extends(S(e.EditorToolsSettings.bold)){}t.Bold=x;class E extends(S(e.EditorToolsSettings.italic)){}t.Italic=E;class T extends(S(e.EditorToolsSettings.underline)){}t.Underline=T;class P extends(S(e.EditorToolsSettings.strikethrough)){}t.Strikethrough=P;class I extends(S(e.EditorToolsSettings.subscript)){}t.Subscript=I;class R extends(S(e.EditorToolsSettings.superscript)){}function N(e){return vo(e)}t.Superscript=R,t.createInsertImageTool=N;class L extends(N(e.EditorToolsSettings.image)){}function A(e){return ko.createLinkTool(e)}t.InsertImage=L,t.createLinkTool=A;class B extends(A(e.EditorToolsSettings.link)){}t.Link=B;class D extends(A(e.EditorToolsSettings.insertFile)){}function M(e){return yo.createListTool(e)}t.InsertFile=D,t.createListTool=M;class z extends(M(e.EditorToolsSettings.orderedList)){}t.OrderedList=z;class F extends(M(e.EditorToolsSettings.bulletList)){}function H(e){return Co.createOutdentTool(e)}t.UnorderedList=F,t.BulletedList=t=>{const l=[{icon:"list-unordered",svgIcon:i.listUnorderedIcon,textKey:Nl.listStyleDisc,style:"disc"},{icon:"list-unordered-outline",svgIcon:i.listUnorderedOutlineIcon,textKey:Nl.listStyleCircle,style:"circle"},{icon:"list-unordered-square",svgIcon:i.listUnorderedSquareIcon,textKey:Nl.listStyleSquare,style:"square"}];return b.createElement(Ko,{listType:e.EditorToolsSettings.bulletList.listType,items:l,icon:"list-unordered",svgIcon:i.listUnorderedIcon,titleKey:e.EditorToolsSettings.bulletList.messages.title,...t})},t.NumberedList=t=>{const l=[{icon:"list-ordered",svgIcon:i.listOrderedIcon,textKey:Nl.listStyleDecimal},{icon:"list-roman-upper",svgIcon:i.listRomanUpperIcon,textKey:Nl.listStyleUpperRoman,style:"upper-roman"},{icon:"list-roman-lower",svgIcon:i.listRomanLowerIcon,textKey:Nl.listStyleLowerRoman,style:"lower-roman"},{icon:"list-latin-big",svgIcon:i.listLatinBigIcon,textKey:Nl.listStyleUpperLatin,style:"upper-latin"},{icon:"list-latin-small",svgIcon:i.listLatinSmallIcon,textKey:Nl.listStyleLowerLatin,style:"lower-latin"}];return b.createElement(Ko,{listType:e.EditorToolsSettings.orderedList.listType,items:l,icon:"list-ordered",svgIcon:i.listOrderedIcon,titleKey:e.EditorToolsSettings.orderedList.messages.title,...t})},t.TableCellProperties=rr,t.TableProperties=Er,t.createOutdentTool=H;class W extends(H(e.EditorToolsSettings.outdent)){}function K(e){return xo.createAddRowBeforeTool(e)}function U(e){return xo.createAddRowAfterTool(e)}function O(e){return xo.createAddColumnBeforeTool(e)}function V(e){return xo.createAddColumnAfterTool(e)}function _(e){return xo.createDeleteRowTool(e)}function j(e){return xo.createDeleteColumnTool(e)}function q(e){return xo.createDeleteTableTool(e)}function $(e){return xo.createMergeCellsTool(e)}function G(e){return xo.createSplitCellTool(e)}t.Outdent=W,t.Print=e=>b.createElement(Io,{...e}),t.Pdf=e=>b.createElement(Lo,{...e}),t.SelectAll=e=>b.createElement(Bo,{...e}),t.CleanFormatting=e=>b.createElement(zo,{...e}),t.createAddRowBeforeTool=K,t.createAddRowAfterTool=U,t.createAddColumnBeforeTool=O,t.createAddColumnAfterTool=V,t.createDeleteRowTool=_,t.createDeleteColumnTool=j,t.createDeleteTableTool=q,t.createMergeCellsTool=$,t.createSplitCellTool=G;class J extends(K(e.EditorToolsSettings.addRowBefore)){}t.AddRowBefore=J;class Q extends(U(e.EditorToolsSettings.addRowAfter)){}t.AddRowAfter=Q;class X extends(O(e.EditorToolsSettings.addColumnBefore)){}t.AddColumnBefore=X;class Y extends(V(e.EditorToolsSettings.addColumnAfter)){}t.AddColumnAfter=Y;class Z extends(_(e.EditorToolsSettings.deleteRow)){}t.DeleteRow=Z;class ee extends(j(e.EditorToolsSettings.deleteColumn)){}t.DeleteColumn=ee;class te extends(q(e.EditorToolsSettings.deleteTable)){}t.DeleteTable=te;class le extends($(e.EditorToolsSettings.mergeCells)){}t.MergeCells=le;class oe extends(G(e.EditorToolsSettings.splitCell)){}function re(e){return Eo.createUnlinkTool(e)}t.SplitCell=oe,t.createUnlinkTool=re;class ne extends(re(e.EditorToolsSettings.unlink)){}function ie(e){return To.createViewHtmlTool(e)}t.Unlink=ne,t.createViewHtmlTool=ie;class ae extends(ie(e.EditorToolsSettings.viewHtml)){}t.ViewHtml=ae;t.FindAndReplace=class extends Ho{}})(e.EditorTools||(e.EditorTools={}));const Lr={Selection:n.Selection,SelectionRange:n.SelectionRange,TextSelection:n.TextSelection,NodeSelection:n.NodeSelection,AllSelection:n.AllSelection,EditorState:n.EditorState,Plugin:n.Plugin,PluginKey:n.PluginKey,Transaction:n.Transaction,Decoration:n.Decoration,DecorationSet:n.DecorationSet,EditorView:n.EditorView,Node:n.Node,ResolvedPos:n.ResolvedPos,NodeRange:n.NodeRange,Fragment:n.Fragment,Slice:n.Slice,ReplaceError:n.ReplaceError,Mark:n.Mark,Schema:n.Schema,NodeType:n.NodeType,MarkType:n.MarkType,ContentMatch:n.ContentMatch,DOMParser:n.DOMParser,DOMSerializer:n.DOMSerializer,Transform:n.Transform,Step:n.Step,StepResult:n.StepResult,joinPoint:n.joinPoint,canJoin:n.canJoin,canSplit:n.canSplit,insertPoint:n.insertPoint,dropPoint:n.dropPoint,liftTarget:n.liftTarget,findWrapping:n.findWrapping,StepMap:n.StepMap,MapResult:n.MapResult,Mapping:n.Mapping,AddMarkStep:n.AddMarkStep,RemoveMarkStep:n.RemoveMarkStep,ReplaceStep:n.ReplaceStep,ReplaceAroundStep:n.ReplaceAroundStep,replaceStep:n.replaceStep,deleteSelection:n.deleteSelection,joinBackward:n.joinBackward,selectNodeBackward:n.selectNodeBackward,joinForward:n.joinForward,selectNodeForward:n.selectNodeForward,joinUp:n.joinUp,joinDown:n.joinDown,lift:n.lift,newlineInCode:n.newlineInCode,exitCode:n.exitCode,createParagraphNear:n.createParagraphNear,liftEmptyBlock:n.liftEmptyBlock,splitBlock:n.splitBlock,splitBlockKeepMarks:n.splitBlockKeepMarks,selectParentNode:n.selectParentNode,selectAll:n.selectAll,wrapIn:n.wrapIn,setBlockType:n.setBlockType,toggleMark:n.toggleMark,autoJoin:n.autoJoin,chainCommands:n.chainCommands,pcBaseKeymap:n.pcBaseKeymap,macBaseKeymap:n.macBaseKeymap,baseKeymap:n.baseKeymap,history:n.history,undo:n.undo,redo:n.redo,undoDepth:n.undoDepth,redoDepth:n.redoDepth,InputRule:n.InputRule,inputRules:n.inputRules,undoInputRule:n.undoInputRule,emDash:n.emDash,ellipsis:n.ellipsis,openDoubleQuote:n.openDoubleQuote,closeDoubleQuote:n.closeDoubleQuote,openSingleQuote:n.openSingleQuote,closeSingleQuote:n.closeSingleQuote,smartQuotes:n.smartQuotes,wrappingInputRule:n.wrappingInputRule,textblockTypeInputRule:n.textblockTypeInputRule,keymap:n.keymap,keydownHandler:n.keydownHandler,orderedList:n.orderedList,bulletList:n.bulletList,listItem:n.listItem,addListNodes:n.addListNodes,wrapInList:n.wrapInList,splitListItem:n.splitListItem,liftListItem:n.liftListItem,sinkListItem:n.sinkListItem,dropCursor:n.dropCursor,gapCursor:n.gapCursor,tableEditing:n.tableEditing,fixTables:n.fixTables,fixTablesKey:n.fixTablesKey,cellAround:n.cellAround,isInTable:n.isInTable,selectionCell:n.selectionCell,moveCellForward:n.moveCellForward,inSameTable:n.inSameTable,findCell:n.findCell,colCount:n.colCount,nextCell:n.nextCell,removeColSpan:n.removeColSpan,addColSpan:n.addColSpan,columnIsHeader:n.columnIsHeader,tableNodes:n.tableNodes,tableNodeTypes:n.tableNodeTypes,CellSelection:n.CellSelection,TableMap:n.TableMap,tableEditingKey:n.tableEditingKey,columnResizing:n.columnResizing,columnResizingPluginKey:n.columnResizingPluginKey,updateColumnsOnResize:n.updateColumnsOnResize,selectedRect:n.selectedRect,addColumn:n.addColumn,addColumnBefore:n.addColumnBefore,addColumnAfter:n.addColumnAfter,deleteColumn:n.deleteColumn,rowIsHeader:n.rowIsHeader,addRow:n.addRow,addRowBefore:n.addRowBefore,addRowAfter:n.addRowAfter,deleteRow:n.deleteRow,mergeCells:n.mergeCells,splitCell:n.splitCell,splitCellWithType:n.splitCellWithType,setCellAttr:n.setCellAttr,toggleHeader:n.toggleHeader,toggleHeaderRow:n.toggleHeaderRow,toggleHeaderColumn:n.toggleHeaderColumn,toggleHeaderCell:n.toggleHeaderCell,goToNextCell:n.goToNextCell,deleteTable:n.deleteTable};Object.defineProperty(e,"getHtml",{enumerable:!0,get:function(){return n.getHtml}}),Object.defineProperty(e,"marks",{enumerable:!0,get:function(){return n.marks}}),Object.defineProperty(e,"nodes",{enumerable:!0,get:function(){return n.nodes}}),Object.defineProperty(e,"parseContent",{enumerable:!0,get:function(){return n.parseContent}}),e.Editor=ro,e.ProseMirror=Lr,e.editorPropsKey=Dl}));
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-common"),require("@progress/kendo-editor-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-form"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-pdf")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-buttons","@progress/kendo-react-common","@progress/kendo-editor-common","@progress/kendo-svg-icons","@progress/kendo-react-dialogs","@progress/kendo-react-inputs","@progress/kendo-react-form","@progress/kendo-react-intl","@progress/kendo-react-layout","@progress/kendo-react-labels","@progress/kendo-react-popup","@progress/kendo-react-dropdowns","@progress/kendo-react-pdf"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactEditor={},e.React,e.PropTypes,e.KendoReactButtons,e.KendoReactCommon,e.KendoEditorCommon,e.KendoSvgIcons,e.KendoReactDialogs,e.KendoReactInputs,e.KendoReactForm,e.KendoReactIntl,e.KendoReactLayout,e.KendoReactLabels,e.KendoReactPopup,e.KendoReactDropdowns,e.KendoReactPdf)}(this,(function(e,t,l,o,r,n,i,a,s,c,d,p,m,u,g,h){"use strict";function f(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(l){if("default"!==l){var o=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,o.get?o:{enumerable:!0,get:function(){return e[l]}})}})),t.default=e,Object.freeze(t)}var b=f(t);const v='\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\nhtml {\n min-height: 100%;\n}\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n.k-content > p {\n margin: 0 0 1em;\n}\n.k-content table {\n white-space: pre-wrap;\n}\n.k-content .k-text-selected {\n color: HighlightText;\n background-color: Highlight;\n}\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n.k-editor-resize-wrap-element {\n display: inline-block;\n position: relative;\n}\n.ProseMirror .row-resize-handle {\n position: absolute;\n right: 0; left: 0; bottom: 0;\n transform: translate(0, 50%);\n height: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n.ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n.ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n}\n.ProseMirror.resize-cursor-vertical {\n cursor: sn-resize;\n cursor: row-resize;\n}\n.k-editor-resize-wrap-element table td p,\n.k-editor-resize-wrap-element table th p {\n margin: 0 auto;\n}\n',k='\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n .ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: "";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n .ProseMirror .selectedCell ::selection {\n background-color: transparent;\n }\n',y="editor.bold",C="editor.italic",w="editor.underline",S="editor.strikethrough",x="editor.subscript",E="editor.superscript",T="editor.hyperlink",P="editor.insertFile",I="editor.print",R="editor.selectAll",N="editor.cleanFormatting",L="editor.pdf",A="editor.foregroundColor",B="editor.backgroundColor",D="editor.createTable",M="editor.insertTableHint",z="editor.addRowBefore",F="editor.addRowAfter",H="editor.addColumnBefore",W="editor.addColumnAfter",K="editor.deleteRow",U="editor.deleteColumn",O="editor.deleteTable",V="editor.mergeCells",_="editor.splitCell",j="editor.hyperlink-dialog-title",q="editor.hyperlink-dialog-content-address",$="editor.hyperlink-dialog-content-title",G="editor.hyperlink-dialog-content-newwindow",J="editor.hyperlink-dialog-cancel",Q="editor.hyperlink-dialog-insert",X="editor.insertfile-dialog-title",Y="editor.insertfile-dialog-content-address",Z="editor.insertfile-dialog-content-title",ee="editor.insertfile-dialog-cancel",te="editor.insertfile-dialog-insert",le="editor.image",oe="editor.image-dialog-title",re="editor.image-address",ne="editor.image-title",ie="editor.image-altText",ae="editor.image-width",se="editor.image-height",ce="editor.image-cancel",de="editor.image-insert",pe="editor.viewHtml",me="editor.viewHtml-dialog-title",ue="editor.viewHtml-cancel",ge="editor.viewHtml-update",he="editor.unlink",fe="editor.undo",be="editor.redo",ve="editor.fontSize",ke="editor.fontName",ye="editor.format",Ce="editor.alignLeft",we="editor.alignRight",Se="editor.alignCenter",xe="editor.alignJustify",Ee="editor.indent",Te="editor.outdent",Pe="editor.orderedList",Ie="editor.bulletList",Re="editor.findReplace-tool-title",Ne="editor.findReplace-dialog-title",Le="editor.findReplace-tab-find",Ae="editor.findReplace-tab-replace",Be="editor.findReplace-findWhat",De="editor.findReplace-replaceWith",Me="editor.findReplace-replace",ze="editor.findReplace-replaceAll",Fe="editor.findReplace-matchCase",He="editor.findReplace-matchWord",We="editor.findReplace-matchCyclic",Ke="editor.findReplace-useRegExp",Ue="editor.findReplace-prevMatch",Oe="editor.findReplace-nextMatch",Ve="editor.findReplace-matches",_e="editor.findReplace-invalidRegExp",je="editor.iframeTitle",qe="editorTools.foreColorLabel",$e="editorTools.backColorLabel",Ge="editor.cellProperties",Je="editor.cellPropertiesLeftTop",Qe="editor.cellPropertiesCenterTop",Xe="editor.cellPropertiesRightTop",Ye="editor.cellPropertiesLeftMiddle",Ze="editor.cellPropertiesCenterMiddle",et="editor.cellPropertiesRightMiddle",tt="editor.cellPropertiesLeftBottom",lt="editor.cellPropertiesCenterBottom",ot="editor.cellPropertiesRightBottom",rt="editor.cellPropertiesNoAlignment",nt="editor.cellPropertiesWrap",it="editor.cellPropertiesFitToCell",at="editor.cellPropertiesApplyToAllCells",st="editor.cellPropertiesWidth",ct="editor.cellPropertiesApplyToColumn",dt="editor.cellPropertiesHeight",pt="editor.cellPropertiesApplyToRow",mt="editor.cellPropertiesAlignment",ut="editor.cellPropertiesTextControl",gt="editor.cellPropertiesCellPadding",ht="editor.cellPropertiesBackground",ft="editor.cellPropertiesBorderWidth",bt="editor.cellPropertiesBorderColor",vt="editor.cellPropertiesBorderStyle",kt="editor.cellPropertiesId",yt="editor.cellPropertiesCssClass",Ct="editor.cellPropertiesSave",wt="editor.cellPropertiesCancel",St="editor.tableProperties",xt="editor.tablePropertiesAlignLeft",Et="editor.tablePropertiesAlignCenter",Tt="editor.tablePropertiesAlignRight",Pt="editor.tablePropertiesNoAlignment",It="editor.tablePropertiesLeft",Rt="editor.tablePropertiesCenter",Nt="editor.tablePropertiesRight",Lt="editor.tablePropertiesTop",At="editor.tablePropertiesBottom",Bt="editor.tablePropertiesNone",Dt="editor.tablePropertiesUsingScopeAttribute",Mt="editor.tablePropertiesUsingIdAttributes",zt="editor.tablePropertiesRows",Ft="editor.tablePropertiesColumns",Ht="editor.tablePropertiesWidth",Wt="editor.tablePropertiesHeight",Kt="editor.tablePropertiesPosition",Ut="editor.tablePropertiesAlignment",Ot="editor.tablePropertiesCellSpacing",Vt="editor.tablePropertiesCellPadding",_t="editor.tablePropertiesTableBackground",jt="editor.tablePropertiesBorderWidth",qt="editor.tablePropertiesBorderColor",$t="editor.tablePropertiesBorderStyle",Gt="editor.tablePropertiesCollapseBorders",Jt="editor.tablePropertiesID",Qt="editor.tablePropertiesCssClass",Xt="editor.tablePropertiesAccessibility",Yt="editor.tablePropertiesCaption",Zt="editor.tablePropertiesCaptionPosition",el="editor.tablePropertiesCaptionAlignment",tl="editor.tablePropertiesHeaderRows",ll="editor.tablePropertiesHeaderCols",ol="editor.tablePropertiesAssociateHeaders",rl="editor.tablePropertiesGeneral",nl="editor.tablePropertiesAdvanced",il="editor.tablePropertiesSave",al="editor.tablePropertiesCancel",sl="editor.borderStyleNone",cl="editor.borderStyleSolid",dl="editor.borderStyleDotted",pl="editor.borderStyleDashed",ml="editor.borderStyleDouble",ul="editor.borderStyleGroove",gl="editor.borderStyleRidge",hl="editor.borderStyleInset",fl="editor.borderStyleOutset",bl="editor.borderStyleInitial",vl="editor.borderStyleInherit",kl="editor.borderStyleHidden",yl="editor.sizeAuto",Cl="editor.listStyleDisc",wl="editor.listStyleCircle",Sl="editor.listStyleSquare",xl="editor.listStyleDecimal",El="editor.listStyleUpperRoman",Tl="editor.listStyleLowerRoman",Pl="editor.listStyleUpperLatin",Il="editor.listStyleLowerLatin",Rl={[y]:"Bold",[C]:"Italic",[w]:"Underline",[S]:"Strikethrough",[x]:"Subscript",[E]:"Superscript",[he]:"Remove hyperlink",[fe]:"Undo",[be]:"Redo",[ve]:"Font Size",[ke]:"Font Name",[ye]:"Format",[Ce]:"Align text left",[we]:"Align text right",[Se]:"Center text",[xe]:"Justify",[Ee]:"Indent",[Te]:"Outdent",[Pe]:"Insert ordered list",[Ie]:"Insert unordered list",[I]:"Print",[R]:"Select All",[N]:"Clean formatting",[L]:"Export as PDF",[A]:"Color",[B]:"Background color",[D]:"Create a table",[M]:"Create a {0} x {1} table",[z]:"Add row above",[F]:"Add row below",[H]:"Add column on the left",[W]:"Add column on the right",[K]:"Delete row",[U]:"Delete column",[O]:"Delete table",[V]:"Merge cells",[_]:"Split cell",[T]:"Insert hyperlink",[j]:"Insert hyperlink",[q]:"Web address",[$]:"Title",[G]:"Open link in new window",[J]:"Cancel",[Q]:"Insert",[P]:"Insert file",[X]:"Insert file",[Y]:"Web address",[Z]:"Title",[ee]:"Cancel",[te]:"Insert",[le]:"Insert image",[oe]:"Insert image",[re]:"Web address",[ne]:"Title",[ie]:"Alternate text",[ae]:"Width (px)",[se]:"Height (px)",[ce]:"Cancel",[de]:"Insert",[pe]:"View HTML",[me]:"View HTML",[ue]:"Cancel",[ge]:"Update",[Re]:"Find and Replace",[Ne]:"Find and Replace",[Le]:"Find",[Ae]:"Replace",[Be]:"Find What:",[De]:"Replace With",[Me]:"Replace",[ze]:"Replace All",[Fe]:"Match Case",[He]:"Match whole word only",[We]:"Match cyclic (Wrap around)",[Ke]:"Regular Expression",[Ue]:"Prev",[Oe]:"Next",[Ve]:"{0} of {1} matches",[_e]:"Invalid regular expression.",[je]:"Editable area. Press Alt + F10 for toolbar.",[qe]:"Fore Color",[$e]:"Back Color",[Ge]:"Cell properties",[Je]:"Left Top",[Qe]:"Center Top",[Xe]:"Right Top",[Ye]:"Left Middle",[Ze]:"Center Middle",[et]:"Right Middle",[tt]:"Left Bottom",[lt]:"Center Bottom",[ot]:"Right Bottom",[rt]:"No Alignment",[nt]:"Wrap",[it]:"Fit to cell",[at]:"Apply to all cells",[st]:"Width",[ct]:"apply to column",[dt]:"Height",[pt]:"apply to row",[mt]:"Alignment",[ut]:"Text control",[gt]:"Cell padding",[ht]:"Background",[ft]:"Border width",[bt]:"Border color",[vt]:"Border style",[kt]:"ID",[yt]:"CSS class",[Ct]:"Save",[wt]:"Cancel",[St]:"Table properties",[xt]:"Align Left",[Et]:"Align Center",[Tt]:"Align Right",[Pt]:"No Alignment",[It]:"Left",[Rt]:"Center",[Nt]:"Right",[Lt]:"Top",[At]:"Bottom",[Bt]:"None",[Dt]:"Using 'scope' attribute",[Mt]:"Using 'id' attributes",[zt]:"Rows",[Ft]:"Columns",[Ht]:"Width",[Wt]:"Height",[Kt]:"Position",[Ut]:"Alignment",[Ot]:"Cell spacing",[Vt]:"Cell padding",[_t]:"Table background",[jt]:"Border width",[qt]:"Border color",[$t]:"Border style",[Gt]:"Collapse borders",[Jt]:"ID",[Qt]:"CSS class",[Xt]:"Accessibility",[Yt]:"Caption",[Zt]:"Position",[el]:"Alignment",[tl]:"Header rows",[ll]:"Header cols",[ol]:"Associate headers",[rl]:"General",[nl]:"Advanced",[il]:"Save",[al]:"Cancel",[sl]:"None",[cl]:"Solid",[dl]:"Dotted",[pl]:"Dashed",[ml]:"Double",[ul]:"Groove",[gl]:"Ridge",[hl]:"Inset",[fl]:"Outset",[bl]:"Initial",[vl]:"Inherit",[kl]:"Hidden",[yl]:"Auto",[Cl]:"Disc",[wl]:"Circle",[Sl]:"Square",[xl]:"Decimal",[El]:"Upper roman",[Tl]:"Lower roman",[Pl]:"Upper latin",[Il]:"Lower latin"},Nl={bold:y,italic:C,underline:w,strikethrough:S,subscript:x,superscript:E,unlink:he,undo:fe,redo:be,fontSize:ve,fontName:ke,format:ye,alignLeft:Ce,alignRight:we,alignCenter:Se,alignJustify:xe,indent:Ee,outdent:Te,orderedList:Pe,bulletList:Ie,print:I,selectAll:R,cleanFormatting:N,pdf:L,foregroundColor:A,backgroundColor:B,createTable:D,createTableHint:M,addRowBefore:z,addRowAfter:F,addColumnBefore:H,addColumnAfter:W,deleteRow:K,deleteColumn:U,deleteTable:O,mergeCells:V,splitCell:_,insertHyperlink:T,insertHyperlinkDialogTitle:j,insertHyperlinkAddress:q,insertHyperlinkTitle:$,insertHyperlinkNewWindow:G,insertHyperlinkCancel:J,insertHyperlinkInsert:Q,insertFile:P,insertFileDialogTitle:X,insertFileAddress:Y,insertFileTitle:Z,insertFileCancel:ee,insertFileInsert:te,insertImage:le,insertImageDialogTitle:oe,insertImageAddress:re,insertImageTitle:ne,insertImageAltText:ie,insertImageWidth:ae,insertImageHeight:se,insertImageCancel:ce,insertImageInsert:de,viewHtml:pe,viewHtmlDialogTitle:me,viewHtmlCancel:ue,viewHtmlUpdate:ge,findReplaceToolTitle:Re,findReplaceDialogTitle:Ne,findReplaceTabFind:Le,findReplaceTabReplace:Ae,findReplaceFindWhat:Be,findReplaceReplaceWith:De,findReplaceReplace:Me,findReplaceReplaceAll:ze,findReplaceMatchCase:Fe,findReplaceMatchWord:He,findReplaceMatchCyclic:We,findReplaceUseRegExp:Ke,findReplacePrevMatch:Ue,findReplaceNextMatch:Oe,findReplaceMatches:Ve,findReplaceInvalidRegExp:_e,iframeTitle:je,foreColorLabel:qe,backColorLabel:$e,cellProperties:Ge,cellPropertiesLeftTop:Je,cellPropertiesCenterTop:Qe,cellPropertiesRightTop:Xe,cellPropertiesLeftMiddle:Ye,cellPropertiesCenterMiddle:Ze,cellPropertiesRightMiddle:et,cellPropertiesLeftBottom:tt,cellPropertiesCenterBottom:lt,cellPropertiesRightBottom:ot,cellPropertiesNoAlignment:rt,cellPropertiesWrap:nt,cellPropertiesFitToCell:it,cellPropertiesApplyToAllCells:at,cellPropertiesWidth:st,cellPropertiesApplyToColumn:ct,cellPropertiesHeight:dt,cellPropertiesApplyToRow:pt,cellPropertiesAlignment:mt,cellPropertiesTextControl:ut,cellPropertiesCellPadding:gt,cellPropertiesBackground:ht,cellPropertiesBorderWidth:ft,cellPropertiesBorderColor:bt,cellPropertiesBorderStyle:vt,cellPropertiesId:kt,cellPropertiesCssClass:yt,cellPropertiesSave:Ct,cellPropertiesCancel:wt,tableProperties:St,tablePropertiesAlignLeft:xt,tablePropertiesAlignCenter:Et,tablePropertiesAlignRight:Tt,tablePropertiesNoAlignment:Pt,tablePropertiesLeft:It,tablePropertiesCenter:Rt,tablePropertiesRight:Nt,tablePropertiesTop:Lt,tablePropertiesBottom:At,tablePropertiesNone:Bt,tablePropertiesUsingScopeAttribute:Dt,tablePropertiesUsingIdAttributes:Mt,tablePropertiesRows:zt,tablePropertiesColumns:Ft,tablePropertiesWidth:Ht,tablePropertiesHeight:Wt,tablePropertiesPosition:Kt,tablePropertiesAlignment:Ut,tablePropertiesCellSpacing:Ot,tablePropertiesCellPadding:Vt,tablePropertiesTableBackground:_t,tablePropertiesBorderWidth:jt,tablePropertiesBorderColor:qt,tablePropertiesBorderStyle:$t,tablePropertiesCollapseBorders:Gt,tablePropertiesId:Jt,tablePropertiesCssClass:Qt,tablePropertiesAccessibility:Xt,tablePropertiesCaption:Yt,tablePropertiesCaptionPosition:Zt,tablePropertiesCaptionAlignment:el,tablePropertiesHeaderRows:tl,tablePropertiesHeaderCols:ll,tablePropertiesAssociateHeaders:ol,tablePropertiesGeneral:rl,tablePropertiesAdvanced:nl,tablePropertiesSave:il,tablePropertiesCancel:al,borderStyleNone:sl,borderStyleSolid:cl,borderStyleDotted:dl,borderStyleDashed:pl,borderStyleDouble:ml,borderStyleGroove:ul,borderStyleRidge:gl,borderStyleInset:hl,borderStyleOutset:fl,borderStyleInitial:bl,borderStyleInherit:vl,borderStyleHidden:kl,sizeAuto:yl,listStyleDisc:Cl,listStyleCircle:wl,listStyleSquare:Sl,listStyleDecimal:xl,listStyleUpperRoman:El,listStyleLowerRoman:Tl,listStyleUpperLatin:Pl,listStyleLowerLatin:Il},Ll={...n.indentRules.listsTypes};e.EditorToolsSettings=void 0,(e=>{const t={type:"button"};e.bold={...n.bold,props:{icon:"bold",svgIcon:i.boldIcon,...t},messages:{title:Nl.bold},commandName:"Bold"},e.italic={...n.italic,props:{icon:"italic",svgIcon:i.italicIcon,...t},messages:{title:Nl.italic},commandName:"Italic"},e.underline={...n.underline,props:{icon:"underline",svgIcon:i.underlineIcon,...t},messages:{title:Nl.underline},commandName:"Underline"},e.strikethrough={...n.strikethrough,props:{icon:"strikethrough",svgIcon:i.strikethroughIcon,...t},messages:{title:Nl.strikethrough},commandName:"Strikethrough"},e.subscript={...n.subscript,props:{icon:"subscript",svgIcon:i.subscriptIcon,...t},messages:{title:Nl.subscript},commandName:"Subscript"},e.superscript={...n.superscript,props:{icon:"supscript",svgIcon:i.supscriptIcon,...t},messages:{title:Nl.superscript},commandName:"Superscript"},e.link={...n.link,props:{icon:"link",svgIcon:i.linkIcon,...t},messages:{insertHyperlink:Nl.insertHyperlink,insertHyperlinkDialogTitle:Nl.insertHyperlinkDialogTitle,insertHyperlinkAddress:Nl.insertHyperlinkAddress,insertHyperlinkTitle:Nl.insertHyperlinkTitle,insertHyperlinkNewWindow:Nl.insertHyperlinkNewWindow,insertHyperlinkCancel:Nl.insertHyperlinkCancel,insertHyperlinkInsert:Nl.insertHyperlinkInsert},commandName:"Link"},e.insertFile={...n.link,props:{icon:"file-add",svgIcon:i.fileAddIcon,...t},messages:{insertHyperlink:Nl.insertFile,insertHyperlinkDialogTitle:Nl.insertFileDialogTitle,insertHyperlinkAddress:Nl.insertFileAddress,insertHyperlinkTitle:Nl.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:Nl.insertFileCancel,insertHyperlinkInsert:Nl.insertFileInsert},commandName:"InsertFile",linkTarget:!1},e.insertTable={props:{icon:"table-add",svgIcon:i.tableAddIcon,...t},messages:{createTable:Nl.createTable,createTableHint:Nl.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:i.tableRowInsertAboveIcon,...t},messages:{title:Nl.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:i.tableRowInsertBelowIcon,...t},messages:{title:Nl.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:i.tableColumnInsertLeftIcon,...t},messages:{title:Nl.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:i.tableColumnInsertRightIcon,...t},messages:{title:Nl.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:{icon:"table-row-delete",svgIcon:i.tableRowDeleteIcon,...t},messages:{title:Nl.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:{icon:"table-column-delete",svgIcon:i.tableColumnDeleteIcon,...t},messages:{title:Nl.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:{icon:"table-delete",svgIcon:i.tableDeleteIcon,...t},messages:{title:Nl.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:{icon:"cells-merge",svgIcon:i.cellsMergeIcon,...t},messages:{title:Nl.mergeCells},commandName:"MergeCells"},e.splitCell={props:{icon:"cell-split-horizontally",svgIcon:i.cellSplitHorizontallyIcon,...t},messages:{title:Nl.splitCell},commandName:"SplitCell"},e.print={props:{icon:"print",svgIcon:i.printIcon,...t},messages:{title:Nl.print}},e.selectAll={props:{icon:"select-all",svgIcon:i.selectAllIcon,...t},messages:{title:Nl.selectAll}},e.pdf={props:{icon:"file-pdf",svgIcon:i.filePdfIcon,...t},messages:{title:Nl.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:{icon:"clear-css",svgIcon:i.clearCssIcon,...t},messages:{title:Nl.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:{icon:"image",svgIcon:i.imageIcon,...t},messages:{insertImage:Nl.insertImage,insertImageDialogTitle:Nl.insertImageDialogTitle,insertImageAddress:Nl.insertImageAddress,insertImageTitle:Nl.insertImageTitle,insertImageAltText:Nl.insertImageAltText,insertImageWidth:Nl.insertImageWidth,insertImageHeight:Nl.insertImageHeight,insertImageCancel:Nl.insertImageCancel,insertImageInsert:Nl.insertImageInsert},commandName:"InsertImage"},e.viewHtml={props:{icon:"code",svgIcon:i.codeIcon,...t},messages:{viewHtml:Nl.viewHtml,viewHtmlDialogTitle:Nl.viewHtmlDialogTitle,viewHtmlCancel:Nl.viewHtmlCancel,viewHtmlUpdate:Nl.viewHtmlUpdate},commandName:"SetContent"},e.findAndReplace={props:{icon:"find",svgIcon:i.binocularsIcon,...t},messages:{findReplaceToolTitle:Nl.findReplaceToolTitle,findReplaceDialogTitle:Nl.findReplaceDialogTitle,findReplaceTabFind:Nl.findReplaceTabFind,findReplaceTabReplace:Nl.findReplaceTabReplace,findReplaceFindWhat:Nl.findReplaceFindWhat,findReplaceReplaceWith:Nl.findReplaceReplaceWith,findReplaceReplace:Nl.findReplaceReplace,findReplaceReplaceAll:Nl.findReplaceReplaceAll,findReplaceMatchCase:Nl.findReplaceMatchCase,findReplaceMatchWord:Nl.findReplaceMatchWord,findReplaceMatchCyclic:Nl.findReplaceMatchCyclic,findReplaceUseRegExp:Nl.findReplaceUseRegExp,findReplacePrevMatch:Nl.findReplacePrevMatch,findReplaceNextMatch:Nl.findReplaceNextMatch,findReplaceMatches:Nl.findReplaceMatches,findReplaceInvalidRegExp:Nl.findReplaceInvalidRegExp}},e.unlink={...n.link,props:{icon:"unlink",svgIcon:i.unlinkIcon,...t},messages:{title:Nl.unlink},commandName:"Unlink"},e.undo={props:{icon:"undo",svgIcon:i.undoIcon,...t},messages:{title:Nl.undo},commandName:"Undo"},e.redo={props:{icon:"redo",svgIcon:i.redoIcon,...t},messages:{title:Nl.redo},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:Rl[Nl.fontSize],value:"",localizationKey:Nl.fontSize},items:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],commandName:"FontSize"},e.fontName={style:"font-family",defaultItem:{text:Rl[Nl.fontName],value:"",localizationKey:Nl.fontName},items:[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],commandName:"FontName"},e.formatBlock={defaultItem:{text:Rl[Nl.format],value:"",localizationKey:Nl.format},items:[{text:"Paragraph",value:"p",style:{display:"block",marginLeft:0}},{text:"Heading 1",value:"h1",style:{display:"block",fontSize:"2em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 2",value:"h2",style:{display:"block",fontSize:"1.5em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 3",value:"h3",style:{display:"block",fontSize:"1.17em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 4",value:"h4",style:{display:"block",fontSize:"1em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 5",value:"h5",style:{display:"block",fontSize:"0.83em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 6",value:"h6",style:{display:"block",fontSize:"0.67em",marginLeft:0,fontWeight:"bold"}}],commandName:"FormatBlock"},e.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",svgIcon:i.foregroundColorIcon,view:"palette",title:Nl.foregroundColor,ariaLabel:Nl.foreColorLabel},commandName:"ForeColor"},e.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:i.dropletIcon,view:"palette",title:Nl.backgroundColor,ariaLabel:Nl.backColorLabel},commandName:"BackColor"},e.alignLeft={actions:[...n.alignLeftRules],props:{icon:"align-left",svgIcon:i.alignLeftIcon,...t},messages:{title:Nl.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:[...n.alignRightRules],props:{icon:"align-right",svgIcon:i.alignRightIcon,...t},messages:{title:Nl.alignRight},commandName:"AlignRight"},e.alignCenter={actions:[...n.alignCenterRules],props:{icon:"align-center",svgIcon:i.alignCenterIcon,...t},messages:{title:Nl.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:[...n.alignJustifyRules],props:{icon:"align-justify",svgIcon:i.alignJustifyIcon,...t},messages:{title:Nl.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:[...n.alignRemoveRules],props:{icon:"align-remove",svgIcon:i.alignRemoveIcon,...t},messages:{},commandName:"AlignRemove"},e.indent={actions:n.indentRules.nodes,listsTypes:Ll,props:{icon:"indent",svgIcon:i.indentIcon,...t},messages:{title:Nl.indent},commandName:"Indent"},e.outdent={actions:n.outdentRules.nodes,listsTypes:Ll,props:{icon:"outdent",svgIcon:i.outdentIcon,...t},messages:{title:Nl.outdent},commandName:"Outdent"},e.orderedList={listType:Ll.orderedList,props:{icon:"list-ordered",svgIcon:i.listOrderedIcon,...t},messages:{title:Nl.orderedList},commandName:"OrderedList",types:{...Ll}},e.bulletList={listType:Ll.bulletList,props:{icon:"list-unordered",svgIcon:i.listUnorderedIcon,...t},messages:{title:Nl.bulletList},commandName:"UnorderedList",types:{...Ll}}})(e.EditorToolsSettings||(e.EditorToolsSettings={}));let Al=class extends b.Component{constructor(){super(...arguments),this.href=null,this.title=null,this.target=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const e=this.props.view,t=this.props.settings.mark,l={href:this.href?this.href.value:void 0,title:this.title?this.title.value:void 0,target:this.target&&this.target.element&&this.target.element.checked?"_blank":void 0};n.applyLink({mark:t,attrs:l},this.props.settings.commandName)(e.state,e.dispatch),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,i=d.provideLocalizationService(this),{insertHyperlinkDialogTitle:p,insertHyperlinkAddress:m,insertHyperlinkTitle:u,insertHyperlinkNewWindow:g,insertHyperlinkCancel:h,insertHyperlinkInsert:f}=t.messages,v=!!e&&n.getMark(e.state,e.state.schema.marks[t.mark]),k=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-url",className:"k-form-label"},i.toLanguageString(m,Rl[m])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-link-url",ref:e=>{this.href=e&&e.element},defaultValue:v&&v.attrs.href||void 0,autoFocus:!0}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-text",className:"k-form-label"},i.toLanguageString(u,Rl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-link-text",ref:e=>{this.title=e&&e.element},defaultValue:v&&v.attrs.title||void 0}))),!1!==t.linkTarget&&b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},b.createElement(s.Checkbox,{id:"k-editor-link-target",ref:e=>{this.target=e},defaultChecked:v&&!!v.attrs.target||void 0}),i.toLanguageString(g,Rl[g]))))}),y=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(h,Rl[h])),b.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},i.toLanguageString(f,Rl[f]))],C=b.createElement(a.Window,{initialWidth:450,initialHeight:250,className:"k-editor-window",title:i.toLanguageString(p,Rl[p]),onClose:this.onClose,style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},k,b.createElement(a.WindowActionsBar,null,...y));return r?r(C,{content:k,actionButtons:y}):C}};d.registerForLocalization(Al);let Bl=class extends b.Component{constructor(){super(...arguments),this.src=null,this.altText=null,this.title=null,this.width=null,this.height=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const{view:e,settings:t}=this.props,l=e.state.schema.nodes[t.node],o={src:this.src?this.src.value:null,title:this.title?this.title.value:null,alt:this.altText?this.altText.value:null,width:this.width?this.width.value:null,height:this.height?this.height.value:null},r=Object.keys(o).filter((e=>null!==o[e]&&""!==o[e])).reduce(((e,t)=>Object.assign(e,{[t]:o[t]})),{}),i=l.createAndFill(r);i&&n.insertNode(i,!0)(e.state,(l=>e.dispatch(l.setMeta("commandName",t.commandName).setMeta("args",r)))),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,{insertImageDialogTitle:i,insertImageAddress:p,insertImageTitle:m,insertImageAltText:u,insertImageWidth:g,insertImageHeight:h,insertImageCancel:f,insertImageInsert:v}=t.messages,k=d.provideLocalizationService(this),y=e&&e.state;let C={};y&&y.selection instanceof n.NodeSelection&&y.selection.node.type===y.schema.nodes[t.node]&&(C=y.selection.node.attrs);const w=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(p,Rl[p])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-url",defaultValue:C.src,ref:e=>{this.src=e&&e.element},autoFocus:!0}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(u,Rl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-alt",defaultValue:C.alt,ref:e=>{this.altText=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-title",className:"k-form-label"},k.toLanguageString(m,Rl[m])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-title",defaultValue:C.title,ref:e=>{this.title=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-width",className:"k-form-label"},k.toLanguageString(g,Rl[g])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-width",defaultValue:C.width,ref:e=>{this.width=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-height",className:"k-form-label"},k.toLanguageString(h,Rl[h])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"k-editor-image-height",defaultValue:C.height,ref:e=>{this.height=e&&e.element}}))))}),S=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},k.toLanguageString(f,Rl[f])),b.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},k.toLanguageString(v,Rl[v]))],x=b.createElement(a.Window,{initialWidth:500,initialHeight:350,className:"k-editor-window",title:k.toLanguageString(i,Rl[i]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},w,b.createElement(a.WindowActionsBar,null,...S));return r?r(x,{content:w,actionButtons:S}):x}};d.registerForLocalization(Bl);const Dl=new n.PluginKey("editor-props");let Ml=class extends b.Component{constructor(){super(...arguments),this.htmlArea=null,this.textAreaRef=e=>{this.htmlArea=e;const t=e&&e.element.current;t&&(t.style.resize="none")},this.onUpdate=()=>{const{view:e,settings:t}=this.props,l=n.trimWhitespace(this.htmlArea&&this.htmlArea.value||""),{preserveWhitespace:o}=Dl.getState(e.state);n.setHtml(l,t.commandName,{preserveWhitespace:o})(e.state,e.dispatch),this.onClose()},this.onClose=()=>{this.props.view.focus(),this.props.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,i=d.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:m}=t.messages,u=b.createElement(s.TextArea,{className:"k-editor-textarea",defaultValue:n.indentHtml(n.getHtml(e.state)),autoFocus:!0,autoSize:!1,ref:this.textAreaRef}),g=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(p,Rl[p])),b.createElement(o.Button,{onClick:this.onUpdate,themeColor:"primary",dir:l,key:"update"},i.toLanguageString(m,Rl[m]))],h=b.createElement(a.Window,{className:"k-editor-window",title:i.toLanguageString(c,Rl[c]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!0,initialHeight:400,initialWidth:500},u,b.createElement(a.WindowActionsBar,null,...g));return r?r(h,{content:u,actionButtons:g}):h}};d.registerForLocalization(Ml);const zl={onMouseDown:e=>e.preventDefault(),onPointerDown:e=>e.preventDefault()},Fl={userSelect:"none"},Hl=function(e,...t){return t.forEach(((t,l)=>{e=e.replace("{"+l+"}",String(t))})),e},Wl=(e,t)=>t.dataItem.style?b.cloneElement(e,e.props,b.createElement("span",{style:t.dataItem.style},e.props.children)):e,Kl=["px","em","%"],Ul={animate:{openDuration:150,closeDuration:150}},Ol=[{textKey:Nl.borderStyleNone,text:Rl[Nl.borderStyleNone],value:"none"},{textKey:Nl.borderStyleSolid,text:Rl[Nl.borderStyleSolid],value:"solid"},{textKey:Nl.borderStyleDotted,text:Rl[Nl.borderStyleDotted],value:"dotted"},{textKey:Nl.borderStyleDashed,text:Rl[Nl.borderStyleDashed],value:"dashed"},{textKey:Nl.borderStyleDouble,text:Rl[Nl.borderStyleDouble],value:"double"},{textKey:Nl.borderStyleGroove,text:Rl[Nl.borderStyleGroove],value:"groove"},{textKey:Nl.borderStyleRidge,text:Rl[Nl.borderStyleRidge],value:"ridge"},{textKey:Nl.borderStyleInset,text:Rl[Nl.borderStyleInset],value:"inset"},{textKey:Nl.borderStyleOutset,text:Rl[Nl.borderStyleOutset],value:"outset"},{textKey:Nl.borderStyleInitial,text:Rl[Nl.borderStyleInitial],value:"initial"},{textKey:Nl.borderStyleInherit,text:Rl[Nl.borderStyleInherit],value:"inherit"},{textKey:Nl.borderStyleHidden,text:Rl[Nl.borderStyleHidden],value:"hidden"}];function Vl(e,t){for(let l=e.depth;l>0;l--){const o=e.node(l);if(t(o))return{node:o,depth:l}}return null}const _l=e.EditorToolsSettings.findAndReplace;let jl=class extends b.Component{constructor(e){super(e),this.onTabSelect=e=>{this.setState({selectedTab:e.selected})},this.onClose=()=>{const e=this.props.view,t=e.state,l=t.tr.setSelection(n.TextSelection.create(t.doc,t.selection.from,t.selection.to));e.updateState(t.apply(l)),e.focus(),this.props.onClose.call(void 0)},this.matchesMessage=e=>{const t=this.state.matches,l=this.state.nextMatch;let o=0,r=0;if(t&&l){const e=t.findIndex((e=>e.eq(l)));o=-1===e?t.length:e+1,r=t.length}return Hl(e,o,r)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(e=!1)=>{const t=this.props.view,{searchText:l,matchCase:o,matchCyclic:r,matchWord:i,useRegExp:a}=this.state,s={text:l,matchWord:i,matchCase:o,useRegExp:a,backward:e,matchCyclic:r},c=n.find(t.state,s);if(c){const e=t.state.tr.setSelection(c);e.scrollIntoView(),t.updateState(t.state.apply(e)),this.setState({nextMatch:c})}},this.onReplace=()=>{const e=this.props.view,t=e.state.selection,{replaceText:l}=this.state;if(!t.empty){const o=t.from,r=o+l.length,i=n.replace(t,l,e.state.tr);i.setSelection(n.TextSelection.create(i.doc,o,r)),i.scrollIntoView(),e.dispatch(i),this.setNextState({})}},this.onReplaceAll=()=>{const e=this.props.view,{searchText:t,replaceText:l,matchCase:o,matchWord:r,useRegExp:i}=this.state,a={text:t,matchWord:r,matchCase:o,useRegExp:i},s=n.replaceAll(e.state,l,a);s&&e.dispatch(s),this.setNextState({})},this.onKeyDown=e=>{13===e.keyCode?this.onFindNext():27===e.keyCode&&this.onClose()},this.onMatchCaseChecked=e=>this.setNextState({matchCase:e.value}),this.onMatchWordChecked=e=>this.setNextState({matchWord:e.value}),this.onMatchCyclicChecked=e=>this.setNextState({matchCyclic:e.value}),this.onUseRegExpChecked=e=>this.setNextState({useRegExp:e.value}),this.onSearchChange=e=>this.setNextState({searchText:e.target.value}),this.onReplaceChange=e=>this.setNextState({replaceText:e.target.value}),this.setNextState=e=>{const t={...this.state,...e,matches:void 0,nextMatch:void 0,error:void 0},l=this.props.view;if(t.searchText){const{searchText:e,matchWord:o,matchCase:r,useRegExp:i,matchCyclic:a}=t,s={text:e,matchWord:o,matchCase:r,useRegExp:i},c=l.state.selection;let d=[];try{d=n.findAll(l.state.doc,s)}catch(e){return e instanceof SyntaxError&&(t.error=this.settings.messages.findReplaceInvalidRegExp),void this.setState(t)}const p=e=>!e&&d[0]||d.find((e=>e.from>=c.from))||a&&d[0]||void 0;this.setState((e=>({...t,matches:d,nextMatch:p(e.searchText)})))}else this.setState(t)},this.state={selectedTab:0,searchText:n.selectedLineTextOnly(e.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1}}get settings(){return this.props.settings||_l}componentDidUpdate(e,t){const l=this.props.view,{matches:o=[],nextMatch:r}=this.state;if(t.nextMatch!==r){const e=l.state,t=e.tr,i=[];o.forEach((e=>{i.push({from:e.from,to:e.to,attrs:{class:r&&e.eq(r)?"k-text-selected":"k-text-highlighted"}})})),t.setMeta(n.textHighlightKey,i),t.setSelection(r||n.TextSelection.create(e.doc,e.selection.from)),l.dispatch(t)}}render(){const e=d.provideLocalizationService(this),{findReplaceDialogTitle:t,findReplaceTabFind:l,findReplaceTabReplace:n,findReplaceFindWhat:u,findReplaceReplaceWith:g,findReplaceReplace:h,findReplaceReplaceAll:f,findReplaceMatchCase:v,findReplaceMatchWord:k,findReplaceMatchCyclic:y,findReplaceUseRegExp:C,findReplacePrevMatch:w,findReplaceNextMatch:S,findReplaceMatches:x}=this.settings.messages,{matchCase:E,matchWord:T,matchCyclic:P,useRegExp:I,searchText:R,replaceText:N,nextMatch:L}=this.state,A=b.createElement("div",{className:"k-search-options"},b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-case",checked:E,onChange:this.onMatchCaseChecked,label:e.toLanguageString(v,Rl[v])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-whole",checked:T,onChange:this.onMatchWordChecked,label:e.toLanguageString(k,Rl[k])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-cyclic",checked:P,onChange:this.onMatchCyclicChecked,label:e.toLanguageString(y,Rl[y])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"regular-expression",checked:I,onChange:this.onUseRegExpChecked,label:e.toLanguageString(C,Rl[C])}))),B=b.createElement("div",{className:"k-matches-container"},b.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},b.createElement(r.IconWrap,{name:"chevron-left",icon:i.chevronLeftIcon}),e.toLanguageString(w,Rl[w])),b.createElement("span",null,this.matchesMessage(e.toLanguageString(x,Rl[x]))),b.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(S,Rl[S]),b.createElement(r.IconWrap,{name:"chevron-right",icon:i.chevronRightIcon}))),D=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"findWhat",className:"k-form-label"},e.toLanguageString(u,Rl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"findWhat",type:"text",value:R,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}),this.state.error&&b.createElement(m.Error,null,e.toLanguageString(this.state.error,Rl[this.state.error])))))}),M=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"replaceWith",className:"k-form-label"},e.toLanguageString(g,Rl[g])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"replaceWith",type:"text",value:N,onChange:this.onReplaceChange}))))});return b.createElement(a.Window,{title:e.toLanguageString(t,Rl[t]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:()=>null,maximizeButton:()=>null},b.createElement(p.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},b.createElement(p.TabStripTab,{title:e.toLanguageString(l,Rl[l])},D,A,B),b.createElement(p.TabStripTab,{title:e.toLanguageString(n,Rl[n])},D,M,b.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},b.createElement(o.Button,{disabled:!L,onClick:this.onReplace},e.toLanguageString(h,Rl[h])),b.createElement(o.Button,{disabled:!L,onClick:this.onReplaceAll},e.toLanguageString(f,Rl[f]))),A,B)))}};d.registerForLocalization(jl),e.EditorDialogs=void 0,(e=>{e.InsertLinkDialog=class extends Al{};e.InsertImageDialog=class extends Bl{};e.ViewHtmlDialog=class extends Ml{};e.FindAndReplaceDialog=class extends jl{}})(e.EditorDialogs||(e.EditorDialogs={}));const{bold:ql,underline:$l,italic:Gl}=e.EditorToolsSettings,Jl="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);e.EditorUtils=void 0,(e=>{e.alignBlocks=function(e,t,l){return!!n.alignBlocks(t,l)(e.state,e.dispatch)},e.applyInlineStyle=function(e,t,l){return n.applyInlineStyle(t,l)(e.state,e.dispatch)},e.applyLink=function(e,t,l){return n.applyLink(t,l)(e.state,e.dispatch)},e.canIndentList=function(e,t){return n.canIndentAsListItem(e,t)},e.canInsert=function(e,t){return n.canInsert(e,t)},e.canOutdentList=function(e,t){return n.canOutdentAsListItem(e,{listsTypes:t,nodes:[]})},e.convertMsLists=function(e){return n.convertMsLists(e)},e.createDocument=function(e,t,l){return n.parseContent(n.trimWhitespace(t),e,void 0!==l?l:{preserveWhitespace:"full"})},e.createTable=function(e,t,l){return n.createTable(e,t,l)},e.formatBlockElements=function(e,t,l){return n.formatBlockElements(t,l)(e.state,e.dispatch)},e.getBlockFormats=function(e){return n.getBlockFormats(e)},e.getHtml=function(e){return n.getHtml(e)},e.getInlineStyles=function(e,t){return n.getInlineStyles(e,t)},e.getMark=function(e,t){return n.getMark(e,t)},e.hasMark=function(e,t){return n.hasMark(e,t)},e.hasNode=function(e,t){return n.hasNode(e,t)},e.indentBlocks=function(e,t,l,o){return!!n.indentBlocks(t,l,o)(e.state,e.dispatch)},e.indentHtml=function(e){return n.indentHtml(e)},e.insertNode=function(e,t,l){n.insertNode(t,l)(e.state,e.dispatch)},e.isAligned=function(e,t){return n.isAligned(e,t)},e.isIndented=function(e,t,l){return n.isIndented(e,t,l)},e.removeComments=function(e){return n.removeComments(e)},e.removeTag=function(e,t){return n.removeTag(e,t)},e.pasteCleanup=function(e,t){return n.pasteCleanup(e,t)},e.sanitizeClassAttr=function(e){n.sanitizeClassAttr(e)},e.sanitizeStyleAttr=function(e){n.sanitizeStyleAttr(e)},e.removeAttribute=function(e){n.removeAttribute(e)},e.sanitize=function(e){return n.sanitize(e)},e.replaceImageSourcesFromRtf=function(e,t){return n.replaceImageSourcesFromRtf(e,t)},e.textHighlight=function(e){return n.textHighlight(e)},e.imageResizing=function(e){return n.imageResizing(e)},e.tableResizing=function(){return n.tableResizing()},e.setHtml=function(e,t,l,o){const r=n.trimWhitespace(t);n.setHtml(r,l,o)(e.state,e.dispatch)},e.toggleInlineFormat=function(e,t,l,o){return n.toggleInlineFormat(t,l,o)(e.state,e.dispatch)},e.toggleList=function(e,t,l){return n.toggleList(e.state,e.dispatch,e,t,l)},e.getShortcuts=function(e){return(e=>{const t=n.chainCommands(n.exitCode,((t,l)=>{const o=e&&e.types&&e.types.hardBreak||"hard_break",r=t.schema.nodes[o];return l&&l(t.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0})),l=e&&e.types&&e.types.listItem||"list_item",o=e&&e.toolsSettings||{};return{"Mod-b":(e,t)=>n.toggleInlineFormat(o.bold||ql)(e,t),"Mod-i":(e,t)=>n.toggleInlineFormat(o.italic||Gl)(e,t),"Mod-u":(e,t)=>n.toggleInlineFormat(o.underline||$l)(e,t),"Mod-z":n.undo,"Shift-Mod-z":n.redo,...Jl?{}:{"Mod-y":n.redo},Backspace:n.undoInputRule,"Mod-Enter":t,"Shift-Enter":t,...Jl?{"Ctrl-Enter":t}:{},Enter:(e,t)=>n.splitListItem(e.schema.nodes[l])(e,t),Tab:n.goToNextCell(1),"Shift-Tab":n.goToNextCell(-1)}})(e)},e.propsKey=Dl,e.imageResizeKey=n.imageResizeKey,e.marks={...n.marks},e.nodes={...n.nodes}})(e.EditorUtils||(e.EditorUtils={}));const Ql=(t,l)=>{const o=l.tr||t.state.tr.setSelection(new n.AllSelection(t.state.doc)).replaceSelectionWith(l.doc||e.EditorUtils.createDocument(t.state.schema,l.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(o))},Xl="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),Yl=Object.freeze({name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.3.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),{link:Zl,bold:eo,italic:to,underline:lo}=e.EditorToolsSettings,oo=class extends b.Component{constructor(t){super(t),this.state={view:void 0,linkDialog:!1},this._element=null,this._contentElement=null,this.iframe=null,this.trOnChange=null,this.htmlOnChange=null,this.showLicenseWatermark=!1,this.focus=()=>{this.view&&this.view.focus()},this.renderDialog=(e,t,l)=>this.state[l]&&b.createElement(e,{view:this.view,settings:t,dir:this.props.dir,onClose:()=>this.setState({[l]:!1})}),this.renderTool=(e,t,l=!1)=>{const r=b.createElement(e,{view:this.view,dir:this.props.dir,key:t,className:l?"k-toolbar-button":void 0});return r.type===o.ToolbarSeparator?b.createElement(e,{key:t}):r},this.updateTools=(e,t)=>{this.setState({view:e})},this.filterTransaction=(e,t)=>{const l={target:this,transaction:e,state:t};return!1!==(this.props.onExecute&&this.props.onExecute.call(void 0,l))},this.onPasteHtml=e=>{if(this.props.onPasteHtml&&this.pasteEvent){const t={target:this,pastedHtml:e,nativeEvent:this.pasteEvent},l=this.props.onPasteHtml.call(void 0,t);if(this.pasteEvent=void 0,"string"==typeof l)return l}return e},this.dispatchTransaction=t=>{const l=t.docChanged;if(this.props.onChange&&l){this.trOnChange=t;const l=t.doc,o=t.doc.type.schema,r={target:this,value:l,html:"",transaction:t,schema:o};Object.defineProperty(r,"html",{get:()=>(this.htmlOnChange=e.EditorUtils.getHtml({doc:l,schema:o}),this.htmlOnChange)}),this.props.onChange.call(void 0,r)}this.view&&(void 0===this.props.value||!l)&&this.view.updateState(this.view.state.apply(t))},this.onFocus=(e,t)=>{if(this.props.onFocus){const e={target:this,nativeEvent:t};this.props.onFocus.call(void 0,e)}return!1},this.onBlur=(e,t)=>{if(this.props.onBlur){const e={target:this,nativeEvent:t};this.props.onBlur.call(void 0,e)}return!1},this.onPaste=(e,t)=>(this.props.onPasteHtml&&(this.pasteEvent=t),!1),this.onIFrameInit=e=>{if(this.props.onIFrameInit){const t={target:this,iframe:e};this.props.onIFrameInit.call(void 0,t)}return!1},this.showLicenseWatermark=!r.validatePackage(Yl,{component:"Editor"}),this.licenseMessage=r.getLicenseMessage(Yl)}get value(){return null!==this.trOnChange?this.trOnChange.doc:void 0!==this.props.value?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""}get element(){return this._element}get contentElement(){return this._contentElement}get view(){return this._view}componentDidMount(){(!this.iframe||!Xl)&&this.initialize()}componentDidUpdate(e){const{value:t}=this.props,l=this.view;void 0===t||!l||(((e,t,l,o,r)=>{"string"==typeof t?o&&t===r?Ql(e,{tr:o}):t!==l&&Ql(e,{html:t}):o&&t.eq(o.doc)?Ql(e,{tr:o}):e.state.doc.eq(t)||Ql(e,{doc:t})})(l,t,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)}componentWillUnmount(){var e;this.view&&this.view.destroy(),this._view=void 0;const t=null==(e=this.iframe)?void 0:e.contentWindow;if(t){this._contentElement&&this._contentElement.parentNode&&this._contentElement.parentNode.removeChild(this._contentElement);const e=t.document.head;for(;e&&e.firstChild;)e.removeChild(e.firstChild)}}render(){const{tools:t=[],defaultEditMode:l="iframe",preserveWhitespace:n="full",style:i,className:a}=this.props,s=d.provideLocalizationService(this);if(this.view){Dl.getState(this.view.state).preserveWhitespace=n}let c=this.props.contentStyle;void 0===c&&void 0===(i||{}).height&&(c={height:"300px"});const p=t.map(((e,t)=>Array.isArray(e)?b.createElement(o.ButtonGroup,{key:t,className:"k-toolbar-button-group k-button-group-solid"},e.map(((e,t)=>this.renderTool(e,t)))):this.renderTool(e,t,!0)));return b.createElement("div",{ref:e=>{this._element=e},className:r.classNames("k-editor",a,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:i},p.length>0&&b.createElement(o.Toolbar,{className:"k-editor-toolbar",keyboardNavigation:this.props.keyboardNavigation},p),"iframe"===l?b.createElement("div",{className:"k-editor-content"},b.createElement("iframe",{onLoad:Xl?()=>{this.initialize()}:void 0,ref:e=>{this.iframe=e},frameBorder:"0",title:s.toLanguageString(Nl.iframeTitle,Rl[Nl.iframeTitle]),style:c,className:"k-iframe"})):b.createElement("div",{style:c,className:"k-editor-content"},b.createElement("div",{ref:e=>{this._contentElement=e},suppressContentEditableWarning:!0,role:"textbox","aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel})),this.renderDialog(e.EditorDialogs.InsertLinkDialog,Zl,"linkDialog"),this.showLicenseWatermark&&b.createElement(r.WatermarkOverlay,{message:this.licenseMessage}))}initialize(){const t=this.iframe&&this.iframe.contentWindow;if(t){const e=t.document,l=e.createElement("meta");l.setAttribute("charset","utf-8"),e.head.appendChild(l),this._contentElement=e.createElement("div"),e.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content"),this.iframe&&this.props.onIFrameInit?this.onIFrameInit(this.iframe):[v,k,"rtl"===this.props.dir?"body { direction: rtl }":void 0].forEach((t=>{if(t){const l=e.createElement("style");l.appendChild(e.createTextNode(t)),e.head.appendChild(l)}}))}const l=this._contentElement;if(!l)return;const{preserveWhitespace:r="full"}=this.props,i=[new n.Plugin({view:()=>({update:this.updateTools}),key:new n.PluginKey("toolbar-tools-update-plugin")}),new n.Plugin({filterTransaction:this.filterTransaction,key:new n.PluginKey("onExecute-event-plugin")}),new n.Plugin({key:Dl,state:{init:()=>({preserveWhitespace:r}),apply:(e,t)=>t}}),n.spacesFix(),n.caretColor(),n.history(),n.dropCursor(),n.gapCursor(),n.tableEditing(),n.cspFix()],a={...e.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:eo,italic:to,underline:lo}}),"Mod-k":()=>{const{linkDialog:e}=this.state,t=this.view;if(t){const l=t.state,o=l.selection.empty,r=n.getMark(l,l.schema.marks[Zl.mark]);!e&&(!o||r)&&this.setState({linkDialog:!0})}return!e},"Alt-F10":()=>{var e;const t=null==(e=this.element)?void 0:e.querySelector(".k-toolbar");if(t){const e=t.querySelector(o.toolbarButtons.join(","));if(e)return e.focus(),!0}return!1}},{defaultContent:s="",value:c,onMount:d}=this.props,p=c&&"string"!=typeof c?c:e.EditorUtils.createDocument(new n.Schema({nodes:n.nodes,marks:n.marks}),c||s,{preserveWhitespace:r}),m={state:n.EditorState.create({plugins:[...i,n.keymap(a),n.keymap(n.baseKeymap)],doc:p}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste},handleDrop:(e,t,l,o)=>{let r=!1;return l.content.nodesBetween(0,l.content.size,(e=>{r=r||"table_caption_external"===e.type.name})),r}},u={plugins:i,shortcuts:a,target:this,viewProps:m,dom:l},g=this._view=d&&d.call(void 0,u)||new n.EditorView({mount:l},m);this.setState({view:g})}};oo.propTypes={defaultContent:l.string,value:l.oneOfType([l.object,l.string]),defaultEditMode:l.oneOf(["iframe","div"]),contentStyle:l.object,dir:l.string,className:l.string,ariaDescribedBy:l.string,ariaLabelledBy:l.string,ariaLabel:l.string,style:l.object,tools:l.arrayOf(l.any),keyboardNavigation:l.bool,resizable:l.bool,preserveWhitespace:l.oneOf([!0,!1,"full"]),onMount:l.func,onFocus:l.func,onBlur:l.func,onChange:l.func,onPasteHtml:l.func,onExecute:l.func,onIFrameInit:l.func};let ro=oo;d.registerForLocalization(ro);let no=class extends b.Component{constructor(){super(...arguments),this.state={row:-1,col:-1}}renderCell(e,t,l){const o=Math.floor(e/this.props.columns),r=e%this.props.columns,n=r<=l&&o<=t;return b.createElement("span",{className:"k-ct-cell k-disabled"+(n?" k-selected":""),onMouseEnter:()=>this.setState({row:o,col:r}),onClick:()=>this.props.onCellClick.call(void 0,o,r),key:e})}render(){const e=[],t=this.props.columns*this.props.rows,{row:l,col:o}=this.state,{onDown:r}=this.props;let n=this.props.createTableMessage;o>-1&&(n=Hl(this.props.createTableHintMessage,l+1,o+1));for(let r=0;r<t;r++)e.push(this.renderCell(r,l,o));return[b.createElement("div",{onMouseLeave:()=>this.setState({row:-1,col:-1}),key:"cells",style:{borderColor:"inherit"},onPointerDown:r,onMouseDown:r},e),b.createElement("div",{className:"k-status",key:"status",onPointerDown:r,onMouseDown:r},n)]}};var io,ao;(e=>{const t=class e extends b.Component{constructor(){super(...arguments),this.pointerdown=!1,this.onWindowDown=e=>{const{anchor:t}=this.props;t&&(t===e.target||t.firstElementChild===e.target)||(this.props.show&&!this.pointerdown&&this.props.onClose(),this.pointerdown=!1)},this.onPointerDown=()=>this.pointerdown=!0}componentDidUpdate(e){e.show&&this.props.show&&this.props.onClose()}componentDidMount(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)}componentWillUnmount(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)}render(){const{show:t,anchor:l,dir:o,rows:r=e.defaultProps.rows,columns:n=e.defaultProps.columns}=this.props,i="rtl"===o?"right":"left";return b.createElement(u.Popup,{anchor:l,anchorAlign:{horizontal:i,vertical:"bottom"},popupAlign:{horizontal:i,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:t,style:"rtl"===o?{direction:"rtl"}:void 0},b.createElement(no,{rows:r,columns:n,createTableMessage:this.props.createTableMessage,createTableHintMessage:this.props.createTableHintMessage,onCellClick:this.props.onTableInsert,onDown:this.onPointerDown}))}};t.propTypes={show:l.bool.isRequired,createTableMessage:l.string.isRequired,createTableHintMessage:l.string.isRequired,onClose:l.func.isRequired,onTableInsert:l.func.isRequired,anchor:l.any,rows:l.number,columns:l.number,dir:l.string},t.defaultProps={rows:6,columns:8};let o=t;e.InsertTablePopup=o})(io||(io={})),(e=>{e.createInsertTableTool=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.state={openedPopup:!1},this.button=null,this.togglePopup=()=>{this.setState({openedPopup:!this.state.openedPopup})},this.closePopup=()=>{this.state.openedPopup&&this.togglePopup()},this.onTableInsert=(e,t)=>{const{view:l}=this.props;if(!l)return;const{table:o,table_row:r,table_cell:i}=l.state.schema.nodes,a=n.createTable({table:o,table_row:r,table_cell:i},e,t);a&&n.insertNode(a,!0)(l.state,l.dispatch),l.focus(),this.closePopup()}}render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=d.provideLocalizationService(this),{createTable:c,createTableHint:p}=e.messages,m=s.toLanguageString(c,Rl[c]),u=s.toLanguageString(p,Rl[p]),g=!(a&&n.canInsert(a,a.schema.nodes.table)&&!Vl(a.selection.$from,(e=>"table_caption_external"===e.type.name))),h=[b.createElement(o.Button,{onClick:g?void 0:this.togglePopup,"aria-disabled":!!g||void 0,ref:e=>{this.button=e&&e.element},key:"InsertTable",...zl,title:m,...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":g})}),t&&!g&&b.createElement(io.InsertTablePopup,{key:"insertTablePopup",createTableMessage:m,createTableHintMessage:u,dir:i.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(ao||(ao={}));const{alignRemove:so}=e.EditorToolsSettings,co=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...r}=this.props,i=t&&t.state,a=!!i&&n.isAligned(i,e.actions),s=a?so.actions:e.actions,c=a?so.commandName:e.commandName,p=d.provideLocalizationService(this),m=e.messages.title,u=b.createElement(o.Button,{onClick:()=>t&&n.alignBlocks(s,c)(t.state,t.dispatch),selected:a,togglable:!0,...zl,title:p.toLanguageString(m,Rl[m]),...e.props,...r});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t};var po;(e=>{e.createStyleDropDownList=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props,{style:r}=e;if(o){n.applyInlineStyle({style:r,value:l.value},e.commandName)(o.state,o.dispatch);const{syntheticEvent:i}=t;i&&"click"===i.type&&o.focus()}}}render(){const{style:t}=e,{view:l,render:o,data:r,defaultItem:i,...a}=this.props,s=r||e.items;let c=i||e.defaultItem;const p=l?n.getInlineStyles(l.state,{name:t,value:/^.+$/}):[],m=d.provideLocalizationService(this);c&&c.localizationKey&&(c={...c},c.text=c.localizationKey?m.toLanguageString(c.localizationKey,Rl[c.localizationKey]):c.text);let u=1===new Set(p).size?p[0]:null;null===u&&a.defaultValue&&(u=a.defaultValue);const h=b.createElement(g.DropDownList,{value:u&&s.find((e=>e.value===u)),data:s,defaultItem:c,itemRender:Wl,textField:"text",dataItemKey:"value",onChange:this.onChange,style:Fl,leftRightKeysNavigation:!1,title:c&&c.text,...a});return o?o.call(void 0,h,{view:l}):h}};return d.registerForLocalization(t),t}})(po||(po={}));const mo=e=>{const{view:t,style:l,colorPickerProps:o,commandName:r}=e,i=o.title,a=o.ariaLabel,{view:c="palette"}=o,p=d.useLocalization(),m=b.useCallback((e=>{t&&(n.applyInlineStyle({style:l,value:e.value},r)(t.state,t.dispatch),"palette"===c&&t.focus())}),[t,l,c,r]);return b.createElement(s.ColorPicker,{onChange:m,onActiveColorClick:m,...o,title:i&&p.toLanguageString(i,Rl[i]),ariaLabel:a&&p.toLanguageString(a,Rl[a])})};var uo;(e=>{e.createFormatBlockDropDownList=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props;if(o&&n.formatBlockElements(l.value,e.commandName)(o.state,o.dispatch)){const{syntheticEvent:e}=t;e&&"click"===e.type&&o.focus()}}}render(){const{view:t,render:l,data:o,defaultItem:r,...i}=this.props,a=o||e.items;let s=r||e.defaultItem;const c=t&&t.state,p=c?n.getBlockFormats(c):[],m=d.provideLocalizationService(this);s&&s.localizationKey&&(s={...s},s.text=s.localizationKey?m.toLanguageString(s.localizationKey,Rl[s.localizationKey]):s.text);const u=1===new Set(p).size?p[0]:null,h=b.createElement(g.DropDownList,{value:u&&a.find((e=>e.value===u)),onChange:this.onChange,itemRender:Wl,data:a,defaultItem:s,textField:"text",dataItemKey:"value",style:Fl,leftRightKeysNavigation:!1,title:s.text,...i});return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(uo||(uo={}));const go=(e,t)=>{const l=class extends b.Component{render(){const{view:l,render:n,...i}=this.props,a=d.provideLocalizationService(this),s=e.messages.title,c=l&&l.state,p=!!c&&!t(c),m=b.createElement(o.Button,{onClick:p?void 0:()=>l&&t(l.state,(t=>l.dispatch(t.setMeta("commandName",e.commandName)))),"aria-disabled":!!p||void 0,...zl,title:a.toLanguageString(s,Rl[s]),...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":p})});return n?n.call(void 0,m,{view:l}):m}};return d.registerForLocalization(l),l};var ho,fo,bo;(e=>{e.createUndoTool=e=>go(e,n.undo),e.createRedoTool=e=>go(e,n.redo)})(ho||(ho={})),(e=>{e.createIndentTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...i}=this.props,a=i.dir,s=t&&t.state,c=s&&s.schema.nodes,p=c&&c[e.listsTypes.listItem],m=e.actions,u=!!s&&!!p&&(n.isIndented(s,m,a)||m.some((e=>c&&c[e.node]&&n.hasNode(s,c[e.node]))))&&!n.hasNode(s,p),g=!!s&&n.canIndentAsListItem(s,p),h=u||g,f=d.provideLocalizationService(this),v=e.messages.title,k=!h,y=b.createElement(o.Button,{onClick:k?void 0:()=>{t&&g&&p?n.sinkListItem(p)(t.state,t.dispatch):t&&u&&n.indentBlocks(m,e.commandName,a)(t.state,t.dispatch)},"aria-disabled":!!k||void 0,title:f.toLanguageString(v,Rl[v]),...zl,...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":k})});return l?l.call(void 0,y,{view:t}):y}};return d.registerForLocalization(t),t}})(fo||(fo={})),(e=>{e.createInlineFormatTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...r}=this.props,i=t&&t.state,{mark:a,altMarks:s,altStyle:c}=e,p={mark:a,altMarks:s,altStyle:c},m=d.provideLocalizationService(this),u=e.messages.title,g=b.createElement(o.Button,{onClick:()=>t&&n.toggleInlineFormat(p,i&&i.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),selected:!!i&&n.hasMark(i,p),togglable:!0,...zl,title:m.toLanguageString(u,Rl[u]),...e.props,...r});return l?l.call(void 0,g,{view:t}):g}};return d.registerForLocalization(t),t}})(bo||(bo={}));const vo=t=>{const l=class extends b.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=s?s.schema.nodes[t.node]:void 0,p=d.provideLocalizationService(this),{insertImage:m}=t.messages,u=!c||!s||!n.canInsert(s,c),g=[b.createElement(o.Button,{onClick:u?void 0:this.toggleDialog,"aria-disabled":!!u||void 0,key:"insertImage",...zl,title:p.toLanguageString(m,Rl[m]),...t.props,...a,className:r.classNames(a.className,t.props.className,{"k-disabled":u})}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:l,settings:t,dir:a.dir,onClose:this.toggleDialog})||null];return i?i.call(void 0,g,{view:l}):g}};return d.registerForLocalization(l),l};var ko,yo,Co;(t=>{t.createLinkTool=t=>{const l=class extends b.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=!s||s.selection.empty,p=s&&n.getMark(s,s.schema.marks[t.mark]),m=d.provideLocalizationService(this),{insertHyperlink:u}=t.messages,g=c&&!p,h=[b.createElement(o.Button,{onClick:g?void 0:this.toggleDialog,"aria-disabled":!!g||void 0,key:"link",...zl,title:m.toLanguageString(u,Rl[u]),...t.props,...a,className:r.classNames(a.className,t.props.className,{"k-disabled":g})}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:t,dir:a.dir,view:l,onClose:this.toggleDialog})||null];return i?i.call(void 0,h,{view:l}):h}};return d.registerForLocalization(l),l}})(ko||(ko={})),(e=>{e.createListTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...r}=this.props;let i=!1;const a=d.provideLocalizationService(this),s=e.messages.title,c=e.types,p=e.listType;if(t){const e=t.state,l=e.schema.nodes,o=n.hasNode(e,l[c.orderedList]),r=n.hasNode(e,l[c.bulletList]);i=p===c.orderedList?o&&!r:!o&&r}const m=b.createElement(o.Button,{onClick:()=>t&&n.toggleList(t.state,t.dispatch,t,{listType:p,...c},e.commandName),togglable:!0,selected:i,title:a.toLanguageString(s,Rl[s]),...zl,...e.props,...r});return l?l.call(void 0,m,{view:t}):m}};return d.registerForLocalization(t),t}})(yo||(yo={})),(e=>{e.createOutdentTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=i.dir,c=!!a&&n.isIndented(a,e.actions,s),p=a&&a.schema.nodes[e.listsTypes.listItem],m=!!a&&n.canOutdentAsListItem(a,{nodes:e.actions,listsTypes:e.listsTypes}),u=c||m,g=d.provideLocalizationService(this),h=e.messages.title,f=!u,v=b.createElement(o.Button,{onClick:f?void 0:()=>{t&&m&&p?n.liftListItem(p)(t.state,t.dispatch):t&&c&&n.indentBlocks(e.actions,e.commandName,s)(t.state,t.dispatch)},"aria-disabled":!!f||void 0,title:g.toLanguageString(h,Rl[h]),...zl,...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":f})});return l?l.call(void 0,v,{view:t}):v}};return d.registerForLocalization(t),t}})(Co||(Co={}));const wo=(e,t)=>{const l=n.deleteColumn(e,t);if(l&&!t){const t=n.selectionCell(e),l=t&&t.node(t.depth);if(l&&1===l.content.childCount)return!1}return l},So=(e,t)=>{const l=n.deleteRow(e,t);if(l&&!t){const t=n.selectionCell(e),l=t&&t.node(t.depth-1);if(l&&1===l.content.childCount)return!1}return l};var xo,Eo,To;(e=>{e.createAddRowBeforeTool=e=>go(e,n.addRowBefore),e.createAddRowAfterTool=e=>go(e,n.addRowAfter),e.createAddColumnBeforeTool=e=>go(e,n.addColumnBefore),e.createAddColumnAfterTool=e=>go(e,n.addColumnAfter),e.createDeleteRowTool=e=>go(e,So),e.createDeleteColumnTool=e=>go(e,wo),e.createDeleteTableTool=e=>go(e,n.deleteTable),e.createMergeCellsTool=e=>go(e,n.mergeCells),e.createSplitCellTool=e=>go(e,n.splitCell)})(xo||(xo={})),(e=>{e.createUnlinkTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...i}=this.props,a={mark:e.mark},s=!!t&&n.hasMark(t.state,a),c=d.provideLocalizationService(this),p=e.messages.title,m=!s,u=b.createElement(o.Button,{onClick:m?void 0:()=>t&&n.removeLink(a,t.state.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),"aria-disabled":!!m||void 0,...zl,title:c.toLanguageString(p,Rl[p]),...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":m})});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t}})(Eo||(Eo={})),(t=>{t.createViewHtmlTool=t=>{const l=class extends b.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:r,...n}=this.props,i=d.provideLocalizationService(this),a=t.messages.viewHtml,s=[b.createElement(o.Button,{onClick:this.toggleDialog,key:"viewHtml",...zl,title:i.toLanguageString(a,Rl[a]),...t.props,...n}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:l,settings:t,dir:n.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,s,{view:l}):s}};return d.registerForLocalization(l),l}})(To||(To={}));const{print:Po}=e.EditorToolsSettings,Io=e=>{const{view:t,render:l,settings:n=Po,...i}=e,a=t&&t.dom,s=a&&a.ownerDocument,c=s&&s.defaultView,p=n.messages.title,m=!c||c===window,u=b.useCallback((()=>{c&&c.print()}),[c]),g=b.createElement(o.Button,{onClick:m?void 0:u,"aria-disabled":!!m||void 0,title:d.useLocalization().toLanguageString(p,Rl[p]),...zl,...n.props,...i,className:r.classNames(i.className,n.props.className,{"k-disabled":m})});return l?l.call(void 0,g,{view:t}):g},{pdf:Ro,savePdfOptions:No}=e.EditorToolsSettings,Lo=e=>{const{view:t,render:l,settings:r=Ro,savePdfOptions:n,savePdfCallback:i,...a}=e,s=r.messages.title,c=b.useCallback((()=>{t&&h.savePDF(t.dom,{...No,...n||{}},i)}),[t,n,i]),p=b.createElement(o.Button,{onClick:c,title:d.useLocalization().toLanguageString(s,Rl[s]),...zl,...r.props,...a});return l?l.call(void 0,p,{view:t}):p},{selectAll:Ao}=e.EditorToolsSettings,Bo=e=>{const{view:t,render:l,settings:r=Ao,...i}=e,a=r.messages.title,s=b.useCallback((()=>{t&&(n.selectAll(t.state,t.dispatch),t.focus())}),[t]),c=b.createElement(o.Button,{onClick:s,title:d.useLocalization().toLanguageString(a,Rl[a]),...zl,...r.props,...i});return l?l.call(void 0,c,{view:t}):c},{cleanFormatting:Do}=e.EditorToolsSettings,Mo=n.cleanFormatting(),zo=e=>{const{view:t,render:l,settings:n=Do,...i}=e,a=n.messages.title,s=!t||!Mo(t.state),c=b.useCallback((()=>{t&&Mo(t.state,(e=>{e.setMeta("commandName",n.commandName),t.dispatch(e)}))}),[t]),p=b.createElement(o.Button,{onClick:s?void 0:c,"aria-disabled":!!s||void 0,title:d.useLocalization().toLanguageString(a,Rl[a]),...zl,...n.props,...i,className:r.classNames(e.className,n.props.className,{"k-disabled":s})});return l?l.call(void 0,p,{view:t}):p},Fo=e.EditorToolsSettings.findAndReplace;let Ho=class extends b.Component{constructor(){super(...arguments),this.state={showDialog:!1},this.onClose=()=>this.setState({showDialog:!1}),this.onOpen=()=>this.setState({showDialog:!0})}render(){const{view:e,...t}=this.props,{props:l}=Fo,n=d.provideLocalizationService(this),i=Fo.messages.findReplaceToolTitle,a=!e;return[b.createElement(o.Button,{onClick:a?void 0:this.onOpen,"aria-disabled":!!a||void 0,...zl,title:n.toLanguageString(i,Rl[i]),key:"tool",...l,...t,className:r.classNames(t.className,l.className,{"k-disabled":a})}),this.state.showDialog&&e&&b.createElement(jl,{view:e,onClose:this.onClose,dir:t.dir,key:"dialog"})]}};d.registerForLocalization(Ho);const Wo=(e,t)=>{const{from:l,to:o}=e.selection;let r=null;return e.doc.nodesBetween(l,o,(e=>(r=r||(e.type===t?e:null),!r))),r},Ko=e=>{let t=!1;const l=e.view,r=Ll,i=e.listType,a=d.useLocalization();let s,c,p=[...e.items||[]];if(l){const e=l.state,o=e&&e.schema.nodes;s=o&&Wo(e,o[r.orderedList]),c=o&&Wo(e,o[r.bulletList]),t=!!(i===r.orderedList?s&&!c:!s&&c)}if(p=p.map((e=>({...e,text:e.textKey?a.toLanguageString(e.textKey,Rl[e.textKey]):e.text}))),t&&(s||c)){const e=n.listStyle((s||c).attrs);p=p.map(((t,l)=>({...t,selected:e?t.style===e:0===l})))}return b.createElement("span",{onMouseDown:e=>{e.preventDefault()}},b.createElement(o.SplitButton,{textField:"text",items:p,icon:e.icon,svgIcon:e.svgIcon,onButtonClick:e=>{l&&(n.toggleList(l.state,l.dispatch,l,{listType:i,...r,listAttrs:{}},"InsertList"),l.focus())},onItemClick:e=>{if(l){const t=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},o=s||c;if(o&&n.listStyle(o.attrs)!==e.item.style){const e=l.state.selection.$head.posAtIndex(0,-2)-1;l.dispatch(l.state.tr.setNodeMarkup(e,l.state.schema.nodes[i],t))}else n.toggleList(l.state,l.dispatch,l,{listType:i,...r,listAttrs:t},"InsertList");l.focus()}},buttonClass:t?"k-selected":void 0,title:void 0!==e.title?e.title:a.toLanguageString(e.titleKey,Rl[e.titleKey])}))},Uo=/[\D]+$/,Oo=e=>{const t=e.match(Uo);return t?t[0]:""},Vo=(e,t)=>{var l;const o=_o((null==(l=e.attrs)?void 0:l.style)||"")[t]||"";return{[t]:parseFloat(o)||null,[t+"Unit"]:Oo(o)}},_o=e=>(e||"").split(/\s*;\s*/).filter(Boolean).map((e=>{const t=e.split(/\s*:\s*/);return{[t[0]]:t[1]}})).reduce(((e,t)=>({...e,...t})),{}),jo=/^.+$/;function qo(e,t,l){let o;if(new RegExp("[^-]?"+t+":").test(e.style||"")){const{style:r}=((e,t)=>{const l=t.style,o=t.value,r=t.newValue;if(!e)return{changed:!1,style:null};const n=e.split(/\s*;\s*/).filter((e=>!!e)),i=n.filter((e=>{const t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===l&&o.test(t[1]))}));return r&&i.push(`${l}: ${r}`),{style:i.join("; ")+(i.length?";":""),changed:!!r||i.length!==n.length}})(e.style||"",{style:t,value:jo,newValue:l});o={...e,style:r}}else if(e.style){const r=_o(e.style);r[t]=l,o={...e,style:Object.keys(r).filter((e=>!!r[e])).reduce(((e,t)=>e+t+": "+r[t]+"; "),"").trim()}}else o=l?{...e,style:t+": "+l+";"}:{...e};return o}const $o=e=>{const t=Vl(e.selection.$from,(e=>"table"===e.type.name)),l=Vl(e.selection.$to,(e=>"table"===e.type.name));return t&&l&&t.depth===l.depth&&t.node.eq(l.node)?(e=>{const{doc:t,selection:l}=e,o=[];return l.ranges.forEach((e=>{const l=e.$from.pos,r=e.$to.pos;t.nodesBetween(l,r,((e,t,l,r)=>{("table_cell"===e.type.name||"table_header"===e.type.name)&&o.push({node:e,pos:t})}))})),o})(e).filter((({pos:l})=>{const o=Vl(e.doc.resolve(l),(e=>"table"===e.type.name));return o&&o.depth===t.depth&&t.node.eq(o.node)})):[]},Go=e=>{const t=[];if($o(e).length){const l=e.selection.$from,o=Vl(l,(e=>"table"===e.type.spec.tableRole));if(null===o)return t;const r=l.start(o.depth),i=o.node,a=n.TableMap.get(i),s=e.doc;a.map.forEach((e=>{const l=e+r;t.push({pos:l,node:s.nodeAt(l)})}))}return t},Jo="k-colgroup-data",Qo=(e,t,l)=>{const o={cellWidth:null,widthUnit:""},r=t.node,i=l.start(t.depth);if(!r.attrs[Jo])return o;const a=new Set;let s="";const c=n.htmlToFragment(r.attrs[Jo]).firstChild;return e.forEach((e=>{const t=r.resolve(e.pos-i),l=t.parent,o=t.index();let n=0;for(let e=0;e<=o;e++)n+=l.child(e).attrs.colspan;const d=c.children[n-1];d&&(s=d.style.width,a.add(s))})),1===a.size&&s&&(o.cellWidth=parseFloat(s)||null,o.widthUnit=Oo(s)),o},Xo=(e,t,l)=>{const o={cellHeight:null,heightUnit:""},r=t.node,n=l.start(t.depth),i=new Set;let a="";return e.forEach((e=>{var t;const l=r.resolve(e.pos-n).parent;a=_o((null==(t=l.attrs)?void 0:t.style)||"").height||"",i.add(a)})),1===i.size&&a&&(o.cellHeight=parseFloat(a)||null,o.heightUnit=Oo(a)),o},Yo=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{var r;o=_o((null==(r=e.node.attrs)?void 0:r.style)||"")[t]||"",l.add(o)})),1===l.size&&o?o:""},Zo=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{o=(e.node.attrs||{})[t]||"",l.add(o)})),1===l.size&&o?o:""},er={applyToAll:!1,cellWidth:null,widthUnit:"",cellHeight:null,heightUnit:"",alignment:{x:"",y:""},textControl:"",backgroundColor:void 0,cellPadding:null,borderWidth:null,borderColor:void 0,borderStyle:null,id:"",className:""},tr=e=>{const t=$o(e),l=e.selection.$from,o=t.length?Vl(l,(e=>"table"===e.type.spec.tableRole)):null;return o?{...er,...Qo(t,o,l),...Xo(t,o,l),alignment:{x:Yo(t,"text-align"),y:Yo(t,"vertical-align")},textControl:Yo(t,"white-space"),backgroundColor:Yo(t,"background-color")||void 0,cellPadding:parseFloat(Yo(t,"padding"))||null,borderWidth:parseFloat(Yo(t,"border-width"))||null,borderColor:Yo(t,"border-color")||void 0,borderStyle:Yo(t,"border-style")||null,id:Zo(t,"id"),className:Zo(t,"class")}:er},lr=(e,t,l)=>{l.forEach((({node:l,pos:o})=>{let r={...l.attrs};r=qo(r,"border-color",t.borderColor||""),r=qo(r,"border-style",t.borderStyle||""),r=qo(r,"border-width","number"==typeof t.borderWidth?t.borderWidth+"px":""),r=qo(r,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),r=qo(r,"background-color",t.backgroundColor||""),r=qo(r,"text-align",t.alignment.x||""),r=qo(r,"vertical-align",t.alignment.y||""),r=qo(r,"white-space",t.textControl||""),r.id=t.id||null,r.class=t.className||null,e.setNodeMarkup(o,null,r),"number"==typeof t.cellWidth&&((e,t,l)=>{const o=e.doc.resolve(t),r=o.parent,i=o.index();let a=0;for(let e=0;e<=i;e++)a+=r.child(e).attrs.colspan;const s=o.node(o.depth-1),c=o.posAtIndex(0,o.depth-1)-1;let d,p=s.attrs;if(p&&p[Jo]){const t=n.htmlToFragment(p[Jo]).firstChild;d=t.children[a-1],d.style.width=l,p={...p,[Jo]:t.outerHTML},e.setNodeMarkup(c,null,p)}else{let t=0;for(let e=0;e<r.childCount;e++)t+=r.child(e).attrs.colspan;const o=document.createElement("colgroup"),n=new Array(t);for(let e=0;e<t;e++)n[e]=document.createElement("col"),o.appendChild(n[e]);d=n[i],d.style.width=l,p={...p,[Jo]:"<colgroup>"+n.reduce(((e,t)=>e+t.outerHTML),"")+"</colgroup>"},e.setNodeMarkup(c,null,p)}})(e,o,t.cellWidth+(t.widthUnit||"px")),"number"==typeof t.cellHeight&&((e,t,l)=>{const o=e.doc.resolve(t),r=o.parent,n=o.posAtIndex(0)-1;e.setNodeMarkup(n,null,qo(r.attrs,"height",l))})(e,o,t.cellHeight+(t.heightUnit||"px"))}))},or=(e,t)=>{const l=e.tr,o=t.applyToAll?Go(e):$o(e);return lr(l,t,o),l},rr=e=>{const{view:t,...l}=e,[r,n]=b.useState(!1),a=d.useLocalization(),s=!(!t||!Vl(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=b.useCallback((()=>{n(!0)}),[]),p=b.useCallback((()=>{n(!1),null==t||t.focus()}),[t]),m=b.useCallback((e=>{if(t&&e){const l=or(t.state,e);l.docChanged&&t.dispatch(l)}p()}),[t,p]);return b.createElement(b.Fragment,null,b.createElement(o.Button,{type:"button",title:a.toLanguageString(Nl.cellProperties,Rl[Nl.cellProperties]),icon:"table-cell-properties",svgIcon:i.tableCellPropertiesIcon,onClick:c,disabled:!s,...zl,...l}),r&&t&&b.createElement(cr,{view:t,onCancel:p,onSave:m}))},nr=[{textKey:Nl.cellPropertiesLeftTop,text:Rl[Nl.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:i.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:Nl.cellPropertiesCenterTop,text:Rl[Nl.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:i.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:Nl.cellPropertiesRightTop,text:Rl[Nl.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:i.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:Nl.cellPropertiesLeftMiddle,text:Rl[Nl.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:Nl.cellPropertiesCenterMiddle,text:Rl[Nl.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:Nl.cellPropertiesRightMiddle,text:Rl[Nl.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:Nl.cellPropertiesLeftBottom,text:Rl[Nl.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:i.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:Nl.cellPropertiesCenterBottom,text:Rl[Nl.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:i.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:Nl.cellPropertiesRightBottom,text:Rl[Nl.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:i.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:Nl.cellPropertiesNoAlignment,text:Rl[Nl.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:i.tableAlignRemoveIcon,value:{x:"",y:""}}],ir=[{textKey:Nl.cellPropertiesWrap,text:Rl[Nl.cellPropertiesWrap],value:"",icon:"text-wrap",svgIcon:i.textWrapIcon},{textKey:Nl.cellPropertiesFitToCell,text:Rl[Nl.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:i.parameterStringIcon}],ar=(e,t)=>t?b.createElement(b.Fragment,null,b.createElement(s.InputPrefix,null,b.createElement(r.IconWrap,{icon:t.svgIcon,name:t.icon})),e):e,sr=(e,t)=>{const l=b.createElement(b.Fragment,null,b.createElement(s.InputPrefix,null,b.createElement(r.IconWrap,{icon:t.dataItem.svgIcon,name:t.dataItem.icon})),e.props.children);return b.cloneElement(e,e.props,l)},cr=e=>{const t=b.useMemo((()=>tr(e.view.state)),[e.view]),l=d.useLocalization(),r=b.useRef(null),n=t.applyToAll,i=b.useRef(null),c=t.cellWidth,p=b.useRef(null);t.widthUnit&&!Kl.includes(t.widthUnit)&&Kl.push(t.widthUnit);const m=t.widthUnit||"",u=b.useRef(null),h=t.cellHeight,f=b.useRef(null);t.heightUnit&&!Kl.includes(t.heightUnit)&&Kl.push(t.heightUnit);const v=t.heightUnit||"",k=b.useRef(null),y=nr.find((e=>void 0!==e.value.x&&t.alignment&&e.value.x===t.alignment.x&&e.value.y===t.alignment.y))||null,C=b.useRef(null),w=ir.find((e=>e.value===t.textControl)),S=b.useRef(null),x=t.backgroundColor,E=b.useRef(null),T=t.cellPadding,P=b.useRef(null),I=t.borderWidth,R=b.useRef(null),N=t.borderColor,L=b.useRef(null),A=Ol.find((e=>e.value===t.borderStyle)),B=b.useRef(null),D=t.id,M=b.useRef(null),z=t.className,F=b.useCallback((()=>{var t,l,o,n,a,s,c,d,m,g,h,b,v,y,w,x,T,I,N,A;const D={applyToAll:!(null==(l=null==(t=r.current)?void 0:t.element)||!l.checked),cellWidth:(null==(o=i.current)?void 0:o.value)||null,widthUnit:(null==(n=p.current)?void 0:n.value)||"",cellHeight:(null==(a=u.current)?void 0:a.value)||null,heightUnit:(null==(s=f.current)?void 0:s.value)||"",alignment:null==(d=null==(c=k.current)?void 0:c.value)?void 0:d.value,textControl:null==(g=null==(m=C.current)?void 0:m.value)?void 0:g.value,backgroundColor:null==(h=S.current)?void 0:h.value,cellPadding:"number"==typeof(null==(b=E.current)?void 0:b.value)?null==(v=E.current)?void 0:v.value:null,borderWidth:"number"==typeof(null==(y=P.current)?void 0:y.value)?null==(w=P.current)?void 0:w.value:null,borderColor:null==(x=R.current)?void 0:x.value,borderStyle:(null==(I=null==(T=L.current)?void 0:T.value)?void 0:I.value)||null,id:String((null==(N=B.current)?void 0:N.value)||""),className:String((null==(A=M.current)?void 0:A.value)||"")};e.onSave.call(void 0,D)}),[e.onSave]),H=b.createElement("div",{className:"k-form k-form-md"},b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("div",{className:"k-form-field-wrap"},b.createElement("span",{className:"k-checkbox-wrap"},b.createElement(s.Checkbox,{ref:r,defaultChecked:n})),b.createElement("label",{className:"k-checkbox-label"},l.toLanguageString(Nl.cellPropertiesApplyToAllCells,Rl[Nl.cellPropertiesApplyToAllCells])))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesWidth,Rl[Nl.cellPropertiesWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:i,defaultValue:c,min:0,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto])}),b.createElement("div",{className:"k-form-hint"},l.toLanguageString(Nl.cellPropertiesApplyToColumn,Rl[Nl.cellPropertiesApplyToColumn])))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:p,defaultValue:m,data:Kl,popupSettings:Ul}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesHeight,Rl[Nl.cellPropertiesHeight])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:u,defaultValue:h,min:0,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto])}),b.createElement("div",{className:"k-form-hint"},l.toLanguageString(Nl.cellPropertiesApplyToRow,Rl[Nl.cellPropertiesApplyToRow])))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:f,defaultValue:v,data:Kl,popupSettings:Ul}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesAlignment,Rl[Nl.cellPropertiesAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:k,defaultValue:y,data:nr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"text",popupSettings:Ul,valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesTextControl,Rl[Nl.cellPropertiesTextControl])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:C,defaultValue:w,data:ir.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Ul,valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesCellPadding,Rl[Nl.cellPropertiesCellPadding])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:E,defaultValue:T,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesBackground,Rl[Nl.cellPropertiesBackground])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:S,defaultValue:x}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesBorderWidth,Rl[Nl.cellPropertiesBorderWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:P,defaultValue:I,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesBorderColor,Rl[Nl.cellPropertiesBorderColor])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:R,defaultValue:N}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesBorderStyle,Rl[Nl.cellPropertiesBorderStyle])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:L,defaultValue:A,popupSettings:Ul,data:Ol,textField:"text",dataItemKey:"value"}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesId,Rl[Nl.cellPropertiesId])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:B,defaultValue:D}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.cellPropertiesCssClass,Rl[Nl.cellPropertiesCssClass])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:M,defaultValue:z})))))),W=[b.createElement(o.Button,{themeColor:"primary",key:"save",onClick:F},l.toLanguageString(Nl.cellPropertiesSave,Rl[Nl.cellPropertiesSave])),b.createElement(o.Button,{onClick:e.onCancel,key:"cancel"},l.toLanguageString(Nl.cellPropertiesCancel,Rl[Nl.cellPropertiesCancel]))];return b.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(Nl.cellProperties,Rl[Nl.cellProperties]),onClose:e.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},H,b.createElement(a.WindowActionsBar,{layout:"start"},...W))},dr={rows:0,columns:0,width:null,widthUnit:"",height:null,heightUnit:"",position:null,textAlign:"",cellPadding:null,cellSpacing:null,backgroundColor:void 0,borderWidth:null,borderColor:void 0,borderStyle:null,collapseBorders:!1,id:"",className:"",caption:"",captionAlignment:null,captionPosition:null,headerRows:0,headerColumns:0,associateHeaders:"none"},pr={left:{"margin-left":"","margin-right":"auto"},center:{"margin-left":"auto","margin-right":"auto"},right:{"margin-left":"auto","margin-right":""},"":{}},mr=e=>{const t=[];for(let l=0;l<e.height;l++){const o=l*e.width,r=o+e.width;t.push(e.map.slice(o,r))}return t},ur=e=>{let t=!0,l=!0;return e.content.forEach((e=>{e.content.forEach((e=>{const o="table_header"===e.type.name,r="table_cell"===e.type.name;o&&!e.attrs.scope&&(t=!1),(o&&!e.attrs.id||r&&!e.attrs.headers)&&(l=!1)}))})),t?"scope":l?"id":"none"},gr=e=>{var t,l,o;const r=$o(e),i=e.selection.$from,a=r.length?Vl(i,(e=>"table"===e.type.spec.tableRole)):null;if(!a)return dr;const s=Vl(i,(e=>"table_wrapper"===e.type.name));let c="",d={},p={};s&&(p=_o(s.node.attrs.style),s.node.content.forEach((e=>{if("table_caption_external"===e.type.name){const t=n.pmDocToFragment(e);c=n.fragmentToHtml(t),c="<img>"===c?"":c,d=_o(e.attrs.style)}})));const m=_o((null==(t=a.node.attrs)?void 0:t.style)||""),u=n.TableMap.get(a.node),g="auto"===p["margin-left"]&&"auto"===p["margin-right"]?"center":"auto"===p["margin-right"]?"left":"auto"===p["margin-left"]?"right":null,h=((e,t)=>{let l=0,o=0;const r=mr(t);r.forEach((t=>{let o=!0;t.forEach((t=>{const l=e.nodeAt(t);l&&"table_header"!==l.type.name&&(o=!1)})),o&&l++}));for(let l=0;l<t.width;l++){let n=!0;for(let o=0;o<t.height;o++){const t=r[o]&&r[o][l],i="number"==typeof t&&e.nodeAt(t);i&&"table_header"!==i.type.name&&(n=!1)}n&&o++}return{rows:l,columns:o}})(a.node,u),f=(e=>{const t=new Set;return e.content.forEach((e=>{e.content.forEach((e=>{t.add(_o(e.attrs.style).padding||"")}))})),1===t.size?Array.from(t)[0]:""})(a.node);return{...dr,columns:u.width,rows:u.height,...Vo(a.node,"width"),...s&&/%/.test(p.width||"")?Vo(s.node,"width"):{},...Vo(a.node,"height"),textAlign:m["text-align"]||"",position:g||null,cellPadding:f?parseFloat(f):null,cellSpacing:m["border-spacing"]?parseFloat(m["border-spacing"]):null,backgroundColor:m["background-color"],borderWidth:m["border-width"]?parseFloat(m["border-width"]):null,borderColor:m["border-color"],borderStyle:m["border-style"]||null,collapseBorders:"collapse"===m["border-collapse"],caption:c||void 0,captionAlignment:d["text-align"]||"",captionPosition:d["caption-side"]||null,headerRows:h.rows,headerColumns:h.columns,associateHeaders:h.rows||h.columns?ur(a.node):"none",id:(null==(l=a.node.attrs)?void 0:l.id)||"",className:(null==(o=a.node.attrs)?void 0:o.class)||""}},hr=e=>{const t=e.lastChild.lastChild;return{node:t,pos:e.content.size-t.nodeSize}},fr=(e,t,l,o,r)=>{const i=t+hr(l).pos;if(!e.doc.nodeAt(i))return e;const a=e.doc.resolve(i),s=new n.CellSelection(a,a),c=e.tr.setSelection(s);let d=e.apply(c);for(let e=0;e<o;e++)r(d,(e=>{d=d.apply(e)}));return d},br=(e,t,l,o)=>{let r=e;for(let e=0;e<l;e++){const e=r.doc.nodeAt(t);if(e){const l=t+hr(e).pos,i=r.doc.resolve(l),a=new n.CellSelection(i,i),s=r.tr.setSelection(a);r=r.apply(s),o(r,(e=>{r=r.apply(e)}))}}return r},vr=(e,t,l,o,r)=>{if(t.type.name!==o.name||Object.keys(r).length>0){const n=e.tr.setNodeMarkup(l,o,{...t.attrs,...r});return e.apply(n)}return e},kr=(e,t,l)=>{const o=e.doc.nodeAt(l),r=o&&n.TableMap.get(o);if(!o||!r)return e;const i=mr(r);let a=e;const{table_header:s,table_cell:c}=e.schema.nodes,d=String((new Date).getTime()),p=[],m=(e,t,l,o)=>{const r=[];if(o)for(let l=0;l<e;l++)p[l]&&p[l][t]&&r.push(p[l][t]);if(l)for(let l=0;l<t;l++)p[e]&&p[e][l]&&r.push(p[e][l]);return r.join(" ")};return i.forEach(((e,r)=>{e.forEach(((e,n)=>{const i=o.nodeAt(e);if(i){const o=n<t.headerColumns,u=r<t.headerRows,g={...i.attrs};((e,t)=>{/^cell-[0-9]+-[0-9]+$/.test(e.attrs.id||"")&&(t.id=null)})(i,g),g.headers=null,g.scope=null,u||o?("scope"===t.associateHeaders&&(g.scope=u?"col":"row"),"id"===t.associateHeaders&&(g.id=((e,t)=>{const l=`cell-${e}${t}-${d}`;return p[e]||p.push([]),p[e][t]||p[e].push([]),p[e][t]=l,l})(r,n),(n>0||r>0)&&(g.headers=m(r,n,o,u)||null)),a=vr(a,i,l+e+1,s,g)):("id"===t.associateHeaders&&(g.headers=m(r,n,t.headerColumns>0,t.headerRows>0)||null),a=vr(a,i,l+e+1,c,g))}}))})),a},yr=(e,t)=>n.parseContent("<p>"+e+"</p>",t).content.firstChild.content,Cr=(e,t)=>{if(!e.caption)return;let l={caption:"",style:"display: table-caption"};e.captionAlignment&&(l=qo(l,"text-align",e.captionAlignment)),e.captionPosition&&(l=qo(l,"caption-side",e.captionPosition));const o=yr(e.caption,t);return o&&t.nodes.table_caption_external.createAndFill(l,o)||void 0},wr=e=>e.firstChild&&"table_caption_external"===e.firstChild.type.name,Sr=(e,t,l,o,r)=>{let n={state:e,pos:l};if(o||!t.position&&!t.caption)o&&(t.position||t.caption||!t.caption&&wr(o.node))?(e=((e,t,l,o)=>{let r={...t.attrs};return r=qo(r,"margin-left",""),r=qo(r,"margin-right",""),Object.keys(o||{}).forEach((e=>{r=qo(r,e,(o||{})[e]||"")})),e.apply(e.tr.setNodeMarkup(l,null,r))})(e,o.node,r,t.position&&pr[t.position]),e=((e,t,l,o)=>{let r,n=e;const i=l+2,a=l+1,s=n.schema;if(wr(t))if(r=t.firstChild,o.caption){const e=yr(o.caption,s);if(n=n.apply(n.tr.replaceWith(i,i+r.content.size,e)),r=n.doc.nodeAt(a),r){let e={...r.attrs};e=qo(e,"text-align",o.captionAlignment||""),e=qo(e,"caption-side",o.captionPosition||""),n=n.apply(n.tr.setNodeAttribute(a,"style",e.style))}}else n=n.apply(n.tr.deleteRange(i,i+r.content.size));else r=Cr(o,s),r&&(n=n.apply(n.tr.replaceWith(a,a,r)));return n})(e,o.node,r,t),n={state:e,pos:r}):n=!o||t.position||t.caption?{state:e,pos:l}:{state:e,node:o.node,pos:e.selection.$from.start(o.depth)-1};else{let o={table:"",style:"display: table"};const r=[],i=t.position,a=i&&pr[i];a&&Object.keys(a).forEach((e=>{o=qo(o,e,a[e]||"")})),"number"==typeof t.width&&"%"===t.widthUnit&&(o=qo(o,"width",t.width+t.widthUnit));const s=Cr(t,e.schema);s&&r.push(s);const c=e.doc.nodeAt(l);r.push(c);const d=e.schema.nodes.table_wrapper.createAndFill(o,r);if(d){const t=e.tr.replaceWith(l,l+c.content.size,d);n={state:e=e.apply(t),pos:l}}}const i=o&&n.state.doc.nodeAt(r);if(i){let e;"number"==typeof t.width&&"%"===t.widthUnit?e=qo(i.attrs,"width",t.width+t.widthUnit):"%"!==t.widthUnit&&/%/.test(_o(i.attrs.style||"").width||"")&&(e=qo(i.attrs,"width","")),e&&(n.state=n.state.apply(n.state.tr.setNodeMarkup(r,null,e)))}return n},xr=(e,t)=>{const l=e.selection.$from,o=Vl(l,(e=>"table"===e.type.spec.tableRole));if(!o)return;const r=l.start(o.depth)-1;let i=((e,t,l,o)=>{let r=e,i=r.doc.nodeAt(t);if(!i)return r;let a=n.TableMap.get(i);return a.width===o&&a.height===l||(o>a.width?r=fr(r,t,i,o-a.width,n.addColumnAfter):o<a.width&&(r=br(r,t,a.width-o,wo)),i=r.doc.nodeAt(t),!i)||(a=n.TableMap.get(i),l>a.height?r=fr(r,t,i,l-a.height,n.addRowAfter):l<a.height&&(r=br(r,t,a.height-l,So))),r})(e,r,t.rows,t.columns);if(!i)return;const a=i.tr;Go(i).forEach((e=>{let l={...e.node.attrs};l=qo(l,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),a.setNodeMarkup(e.pos,null,l)})),i=i.apply(a),i=((e,t,l)=>{const o=e.doc.nodeAt(l);if(!o)return e;let r={...o.attrs};const n=null!==t.width&&("%"!==t.widthUnit||!t.caption&&!t.position);r=qo(r,"width",n?t.width+t.widthUnit:""),r=qo(r,"height",null!==t.height?t.height+t.heightUnit:""),r=qo(r,"text-align",t.textAlign||""),r=qo(r,"background-color",t.backgroundColor||""),r=qo(r,"border-width",t.borderWidth?t.borderWidth+"px":""),r=qo(r,"border-style",t.borderStyle||""),r=qo(r,"border-color",t.borderColor||""),r=qo(r,"border-spacing",null!==t.cellSpacing?t.cellSpacing+"px":""),r=null!==t.cellSpacing?qo(r,"border-collapse","unset"):qo(r,"border-collapse",t.collapseBorders?"collapse":"");const i=pr[t.position||""]||{};Object.keys(i).forEach((e=>{r=qo(r,e,i[e])})),r.id=t.id||null,r.class=t.className||null;const a=e.tr.setNodeMarkup(l,null,r);return e.apply(a)})(i,t,r),i=kr(i,t,r);const s=Vl(l,(e=>"table_wrapper"===e.type.name)),c=l.start((null==s?void 0:s.depth)||0)-1,d=Sr(i,t,r,s,c);i=d.state;const p=d.pos,m=i.doc.nodeAt(d.pos);if(!m)return;const u=p+(s||o).node.content.size,g=e.tr.replaceWith(p,u,m),h=n.Selection.atEnd(m),f=n.TextSelection.create(g.doc,p+h.to+1);return g.setSelection(f),g},Er=e=>{const{view:t,...l}=e,r=d.useLocalization(),[n,a]=b.useState(!1),s=!(!t||!Vl(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=b.useCallback((()=>{a(!0)}),[]),p=b.useCallback((()=>{a(!1),null==t||t.focus()}),[t]),m=b.useCallback((e=>{if(t&&e){const l=xr(t.state,e);l&&t.dispatch(l)}p()}),[t,p]);return b.createElement(b.Fragment,null,b.createElement(o.Button,{type:"button",title:r.toLanguageString(Nl.tableProperties,Rl[Nl.tableProperties]),icon:"table-properties",svgIcon:i.tablePropertiesIcon,onClick:c,disabled:!s,...zl,...l}),n&&b.createElement(Nr,{onClose:p,onSave:m,view:t}))},Tr=[{textKey:Nl.tablePropertiesAlignLeft,text:Rl[Nl.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon},{textKey:Nl.tablePropertiesAlignCenter,text:Rl[Nl.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon},{textKey:Nl.tablePropertiesAlignRight,text:Rl[Nl.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon},{textKey:Nl.tablePropertiesNoAlignment,text:Rl[Nl.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:i.tableAlignRemoveIcon}],Pr=[{textKey:Nl.tablePropertiesLeft,text:Rl[Nl.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:i.tablePositionStartIcon},{textKey:Nl.tablePropertiesCenter,text:Rl[Nl.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:i.tablePositionCenterIcon},{textKey:Nl.tablePropertiesRight,text:Rl[Nl.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:i.tablePositionEndIcon}].map((e=>({...e,style:pr[e.value]}))),Ir=[{textKey:Nl.tablePropertiesTop,text:Rl[Nl.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:i.positionTopIcon},{textKey:Nl.tablePropertiesBottom,text:Rl[Nl.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:i.positionBottomIcon}],Rr=[{textKey:Nl.tablePropertiesNone,text:Rl[Nl.tablePropertiesNone],value:"none"},{textKey:Nl.tablePropertiesUsingScopeAttribute,text:Rl[Nl.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:Nl.tablePropertiesUsingIdAttributes,text:Rl[Nl.tablePropertiesUsingIdAttributes],value:"id"}],Nr=e=>{const t=b.useMemo((()=>{const t=e.view&&e.view.state;return t?gr(t):dr}),[e.view]),l=d.useLocalization(),[r,n]=b.useState(0),i=b.useCallback((e=>{n(e.selected)}),[]),c=b.useRef(null),m=b.useRef(null),u=b.useRef(null),h=b.useRef(null),f=b.useRef(null),v=b.useRef(null),k=b.useRef(null),y=b.useRef(null),C=b.useRef(null),w=b.useRef(null),S=b.useRef(null),x=b.useRef(null),E=b.useRef(null),T=b.useRef(null),P=b.useRef(null),I=b.useRef(null),R=b.useRef(null),N=b.useRef(null),L=b.useRef(null),A=b.useRef(null),B=b.useRef(null),D=b.useRef(null),M=b.useRef(null),z=b.useCallback((()=>{var t,l,o,r,n,i,a,s,d,p,g,b,z,F,H,W,K,U,O,V;const _={rows:(null==(t=c.current)?void 0:t.value)||0,columns:(null==(l=m.current)?void 0:l.value)||0,width:u.current?u.current.value:null,height:h.current?h.current.value:null,cellSpacing:f.current?f.current.value:null,cellPadding:v.current?v.current.value:null,borderWidth:k.current?k.current.value:null,widthUnit:(null==(o=y.current)?void 0:o.value)||"",heightUnit:(null==(r=C.current)?void 0:r.value)||"",position:(null==(i=null==(n=w.current)?void 0:n.value)?void 0:i.value)||null,textAlign:null!=(a=S.current)&&a.value?S.current.value.value:null,borderStyle:null!=(s=x.current)&&s.value?x.current.value.value:null,backgroundColor:null==(d=E.current)?void 0:d.value,borderColor:null==(p=T.current)?void 0:p.value,collapseBorders:!(null==(b=null==(g=P.current)?void 0:g.element)||!b.checked),id:String((null==(z=I.current)?void 0:z.value)||""),className:String((null==(F=R.current)?void 0:F.value)||""),caption:String((null==(H=N.current)?void 0:H.value)||""),headerRows:(null==(W=L.current)?void 0:W.value)||0,headerColumns:(null==(K=A.current)?void 0:K.value)||0,captionAlignment:null!=(U=B.current)&&U.value?B.current.value.value:null,captionPosition:null!=(O=D.current)&&O.value?D.current.value.value:null,associateHeaders:null!=(V=M.current)&&V.value?M.current.value.value:"none"};e.onSave.call(void 0,_)}),[e.onSave]),F=b.createElement("div",{className:"k-form k-form-md"},b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesRows,Rl[Nl.tablePropertiesRows])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:c,defaultValue:t.rows,min:1}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesColumns,Rl[Nl.tablePropertiesColumns])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:m,defaultValue:t.columns,min:1}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesWidth,Rl[Nl.tablePropertiesWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:u,defaultValue:t.width,min:0,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto])}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:y,defaultValue:t.widthUnit,data:Kl,popupSettings:Ul}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesHeight,Rl[Nl.tablePropertiesHeight])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:h,defaultValue:t.height,min:0,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto])}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:C,defaultValue:t.heightUnit,data:Kl.filter((e=>"%"!==e)),popupSettings:Ul}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesPosition,Rl[Nl.tablePropertiesPosition])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:w,defaultValue:Pr.find((e=>e.value===t.position)),popupSettings:Ul,data:Pr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesAlignment,Rl[Nl.tablePropertiesAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:S,defaultValue:Tr.find((e=>e.value===t.textAlign)),data:Tr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Ul,valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCellSpacing,Rl[Nl.tablePropertiesCellSpacing])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:f,defaultValue:t.cellSpacing,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto]),min:0}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCellPadding,Rl[Nl.tablePropertiesCellPadding])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:v,defaultValue:t.cellPadding,placeholder:l.toLanguageString(Nl.sizeAuto,Rl[Nl.sizeAuto]),min:0}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesTableBackground,Rl[Nl.tablePropertiesTableBackground])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:E,defaultValue:t.backgroundColor}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesBorderWidth,Rl[Nl.tablePropertiesBorderWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:k,defaultValue:t.borderWidth,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesBorderColor,Rl[Nl.tablePropertiesBorderColor])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:T,defaultValue:t.borderColor}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesBorderStyle,Rl[Nl.tablePropertiesBorderStyle])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:x,defaultValue:Ol.find((e=>e.value===t.borderStyle)),popupSettings:Ul,data:Ol.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value"}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Checkbox,{ref:P,className:"k-checkbox-wrap",label:l.toLanguageString(Nl.tablePropertiesCollapseBorders,Rl[Nl.tablePropertiesCollapseBorders]),defaultChecked:t.collapseBorders})))))),H=b.createElement("div",{className:"k-form k-form-md"},b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("div",{className:"k-form-layout k-d-grid"},b.createElement("div",{className:"k-form-field"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesId,Rl[Nl.tablePropertiesId])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:I,defaultValue:t.id}))),b.createElement("div",{className:"k-form-field"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCssClass,Rl[Nl.tablePropertiesCssClass])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:R,defaultValue:t.className}))),b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("legend",{className:"k-form-legend"},l.toLanguageString(Nl.tablePropertiesAccessibility,Rl[Nl.tablePropertiesAccessibility])),b.createElement("div",{className:"k-d-grid k-grid-cols-4 k-gap-x-4"},b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCaption,Rl[Nl.tablePropertiesCaption])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:N,defaultValue:t.caption}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCaptionPosition,Rl[Nl.tablePropertiesCaptionPosition])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:D,defaultValue:Ir.find((e=>e.value===t.captionPosition)),data:Ir.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ul,textField:"text",dataItemKey:"value",valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesCaptionAlignment,Rl[Nl.tablePropertiesCaptionAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:B,defaultValue:Tr.find((e=>e.value===t.captionAlignment)),data:Tr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ul,textField:"text",dataItemKey:"value",valueRender:ar,itemRender:sr}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesHeaderRows,Rl[Nl.tablePropertiesHeaderRows])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:L,defaultValue:t.headerRows,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesHeaderCols,Rl[Nl.tablePropertiesHeaderCols])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:A,defaultValue:t.headerColumns,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Nl.tablePropertiesAssociateHeaders,Rl[Nl.tablePropertiesAssociateHeaders])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:M,defaultValue:Rr.find((e=>e.value===t.associateHeaders)),data:Rr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ul,textField:"text",dataItemKey:"value"})))))))),W=b.createElement(p.TabStrip,{selected:r,onSelect:i,animation:!1,keepTabsMounted:!0},b.createElement(p.TabStripTab,{title:l.toLanguageString(Nl.tablePropertiesGeneral,Rl[Nl.tablePropertiesGeneral])},F),b.createElement(p.TabStripTab,{title:l.toLanguageString(Nl.tablePropertiesAdvanced,Rl[Nl.tablePropertiesAdvanced])},H)),K=[b.createElement(o.Button,{themeColor:"primary",key:"save",onClick:z},l.toLanguageString(Nl.tablePropertiesSave,Rl[Nl.tablePropertiesSave])),b.createElement(o.Button,{onClick:e.onClose,key:"cancel"},l.toLanguageString(Nl.tablePropertiesCancel,Rl[Nl.tablePropertiesCancel]))];return b.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(Nl.tableProperties,Rl[Nl.tableProperties]),onClose:e.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},W,b.createElement(a.WindowActionsBar,{layout:"start"},...K))};e.EditorTools=void 0,(t=>{function l(e){return co(e)}t.createAlignTool=l;class o extends(l(e.EditorToolsSettings.alignLeft)){}t.AlignLeft=o;class r extends(l(e.EditorToolsSettings.alignRight)){}t.AlignRight=r;class n extends(l(e.EditorToolsSettings.alignCenter)){}t.AlignCenter=n;class a extends(l(e.EditorToolsSettings.alignJustify)){}function s(e){return ao.createInsertTableTool(e)}t.AlignJustify=a,t.createInsertTableTool=s;class c extends(s(e.EditorToolsSettings.insertTable)){}t.InsertTable=c;class d extends io.InsertTablePopup{}function p(e){return po.createStyleDropDownList(e)}t.InsertTablePopup=d,t.createStyleDropDownList=p;class m extends(p(e.EditorToolsSettings.fontSize)){}t.FontSize=m;class u extends(p(e.EditorToolsSettings.fontName)){}function g(e){return uo.createFormatBlockDropDownList(e)}t.FontName=u,t.ForeColor=t=>b.createElement(mo,{...e.EditorToolsSettings.foreColor,...t}),t.BackColor=t=>b.createElement(mo,{...e.EditorToolsSettings.backColor,...t}),t.createFormatBlockDropDownList=g;class h extends(g(e.EditorToolsSettings.formatBlock)){}function f(e){return ho.createUndoTool(e)}function v(e){return ho.createRedoTool(e)}t.FormatBlock=h,t.createUndoTool=f,t.createRedoTool=v;class k extends(f(e.EditorToolsSettings.undo)){}t.Undo=k;class y extends(v(e.EditorToolsSettings.redo)){}function C(e){return fo.createIndentTool(e)}t.Redo=y,t.createIndentTool=C;class w extends(C(e.EditorToolsSettings.indent)){}function S(e){return bo.createInlineFormatTool(e)}t.Indent=w,t.createInlineFormatTool=S;class x extends(S(e.EditorToolsSettings.bold)){}t.Bold=x;class E extends(S(e.EditorToolsSettings.italic)){}t.Italic=E;class T extends(S(e.EditorToolsSettings.underline)){}t.Underline=T;class P extends(S(e.EditorToolsSettings.strikethrough)){}t.Strikethrough=P;class I extends(S(e.EditorToolsSettings.subscript)){}t.Subscript=I;class R extends(S(e.EditorToolsSettings.superscript)){}function N(e){return vo(e)}t.Superscript=R,t.createInsertImageTool=N;class L extends(N(e.EditorToolsSettings.image)){}function A(e){return ko.createLinkTool(e)}t.InsertImage=L,t.createLinkTool=A;class B extends(A(e.EditorToolsSettings.link)){}t.Link=B;class D extends(A(e.EditorToolsSettings.insertFile)){}function M(e){return yo.createListTool(e)}t.InsertFile=D,t.createListTool=M;class z extends(M(e.EditorToolsSettings.orderedList)){}t.OrderedList=z;class F extends(M(e.EditorToolsSettings.bulletList)){}function H(e){return Co.createOutdentTool(e)}t.UnorderedList=F,t.BulletedList=t=>{const l=[{icon:"list-unordered",svgIcon:i.listUnorderedIcon,textKey:Nl.listStyleDisc,style:"disc"},{icon:"list-unordered-outline",svgIcon:i.listUnorderedOutlineIcon,textKey:Nl.listStyleCircle,style:"circle"},{icon:"list-unordered-square",svgIcon:i.listUnorderedSquareIcon,textKey:Nl.listStyleSquare,style:"square"}];return b.createElement(Ko,{listType:e.EditorToolsSettings.bulletList.listType,items:l,icon:"list-unordered",svgIcon:i.listUnorderedIcon,titleKey:e.EditorToolsSettings.bulletList.messages.title,...t})},t.NumberedList=t=>{const l=[{icon:"list-ordered",svgIcon:i.listOrderedIcon,textKey:Nl.listStyleDecimal},{icon:"list-roman-upper",svgIcon:i.listRomanUpperIcon,textKey:Nl.listStyleUpperRoman,style:"upper-roman"},{icon:"list-roman-lower",svgIcon:i.listRomanLowerIcon,textKey:Nl.listStyleLowerRoman,style:"lower-roman"},{icon:"list-latin-big",svgIcon:i.listLatinBigIcon,textKey:Nl.listStyleUpperLatin,style:"upper-latin"},{icon:"list-latin-small",svgIcon:i.listLatinSmallIcon,textKey:Nl.listStyleLowerLatin,style:"lower-latin"}];return b.createElement(Ko,{listType:e.EditorToolsSettings.orderedList.listType,items:l,icon:"list-ordered",svgIcon:i.listOrderedIcon,titleKey:e.EditorToolsSettings.orderedList.messages.title,...t})},t.TableCellProperties=rr,t.TableProperties=Er,t.createOutdentTool=H;class W extends(H(e.EditorToolsSettings.outdent)){}function K(e){return xo.createAddRowBeforeTool(e)}function U(e){return xo.createAddRowAfterTool(e)}function O(e){return xo.createAddColumnBeforeTool(e)}function V(e){return xo.createAddColumnAfterTool(e)}function _(e){return xo.createDeleteRowTool(e)}function j(e){return xo.createDeleteColumnTool(e)}function q(e){return xo.createDeleteTableTool(e)}function $(e){return xo.createMergeCellsTool(e)}function G(e){return xo.createSplitCellTool(e)}t.Outdent=W,t.Print=e=>b.createElement(Io,{...e}),t.Pdf=e=>b.createElement(Lo,{...e}),t.SelectAll=e=>b.createElement(Bo,{...e}),t.CleanFormatting=e=>b.createElement(zo,{...e}),t.createAddRowBeforeTool=K,t.createAddRowAfterTool=U,t.createAddColumnBeforeTool=O,t.createAddColumnAfterTool=V,t.createDeleteRowTool=_,t.createDeleteColumnTool=j,t.createDeleteTableTool=q,t.createMergeCellsTool=$,t.createSplitCellTool=G;class J extends(K(e.EditorToolsSettings.addRowBefore)){}t.AddRowBefore=J;class Q extends(U(e.EditorToolsSettings.addRowAfter)){}t.AddRowAfter=Q;class X extends(O(e.EditorToolsSettings.addColumnBefore)){}t.AddColumnBefore=X;class Y extends(V(e.EditorToolsSettings.addColumnAfter)){}t.AddColumnAfter=Y;class Z extends(_(e.EditorToolsSettings.deleteRow)){}t.DeleteRow=Z;class ee extends(j(e.EditorToolsSettings.deleteColumn)){}t.DeleteColumn=ee;class te extends(q(e.EditorToolsSettings.deleteTable)){}t.DeleteTable=te;class le extends($(e.EditorToolsSettings.mergeCells)){}t.MergeCells=le;class oe extends(G(e.EditorToolsSettings.splitCell)){}function re(e){return Eo.createUnlinkTool(e)}t.SplitCell=oe,t.createUnlinkTool=re;class ne extends(re(e.EditorToolsSettings.unlink)){}function ie(e){return To.createViewHtmlTool(e)}t.Unlink=ne,t.createViewHtmlTool=ie;class ae extends(ie(e.EditorToolsSettings.viewHtml)){}t.ViewHtml=ae;t.FindAndReplace=class extends Ho{}})(e.EditorTools||(e.EditorTools={}));const Lr={Selection:n.Selection,SelectionRange:n.SelectionRange,TextSelection:n.TextSelection,NodeSelection:n.NodeSelection,AllSelection:n.AllSelection,EditorState:n.EditorState,Plugin:n.Plugin,PluginKey:n.PluginKey,Transaction:n.Transaction,Decoration:n.Decoration,DecorationSet:n.DecorationSet,EditorView:n.EditorView,Node:n.Node,ResolvedPos:n.ResolvedPos,NodeRange:n.NodeRange,Fragment:n.Fragment,Slice:n.Slice,ReplaceError:n.ReplaceError,Mark:n.Mark,Schema:n.Schema,NodeType:n.NodeType,MarkType:n.MarkType,ContentMatch:n.ContentMatch,DOMParser:n.DOMParser,DOMSerializer:n.DOMSerializer,Transform:n.Transform,Step:n.Step,StepResult:n.StepResult,joinPoint:n.joinPoint,canJoin:n.canJoin,canSplit:n.canSplit,insertPoint:n.insertPoint,dropPoint:n.dropPoint,liftTarget:n.liftTarget,findWrapping:n.findWrapping,StepMap:n.StepMap,MapResult:n.MapResult,Mapping:n.Mapping,AddMarkStep:n.AddMarkStep,RemoveMarkStep:n.RemoveMarkStep,ReplaceStep:n.ReplaceStep,ReplaceAroundStep:n.ReplaceAroundStep,replaceStep:n.replaceStep,deleteSelection:n.deleteSelection,joinBackward:n.joinBackward,selectNodeBackward:n.selectNodeBackward,joinForward:n.joinForward,selectNodeForward:n.selectNodeForward,joinUp:n.joinUp,joinDown:n.joinDown,lift:n.lift,newlineInCode:n.newlineInCode,exitCode:n.exitCode,createParagraphNear:n.createParagraphNear,liftEmptyBlock:n.liftEmptyBlock,splitBlock:n.splitBlock,splitBlockKeepMarks:n.splitBlockKeepMarks,selectParentNode:n.selectParentNode,selectAll:n.selectAll,wrapIn:n.wrapIn,setBlockType:n.setBlockType,toggleMark:n.toggleMark,autoJoin:n.autoJoin,chainCommands:n.chainCommands,pcBaseKeymap:n.pcBaseKeymap,macBaseKeymap:n.macBaseKeymap,baseKeymap:n.baseKeymap,history:n.history,undo:n.undo,redo:n.redo,undoDepth:n.undoDepth,redoDepth:n.redoDepth,InputRule:n.InputRule,inputRules:n.inputRules,undoInputRule:n.undoInputRule,emDash:n.emDash,ellipsis:n.ellipsis,openDoubleQuote:n.openDoubleQuote,closeDoubleQuote:n.closeDoubleQuote,openSingleQuote:n.openSingleQuote,closeSingleQuote:n.closeSingleQuote,smartQuotes:n.smartQuotes,wrappingInputRule:n.wrappingInputRule,textblockTypeInputRule:n.textblockTypeInputRule,keymap:n.keymap,keydownHandler:n.keydownHandler,orderedList:n.orderedList,bulletList:n.bulletList,listItem:n.listItem,addListNodes:n.addListNodes,wrapInList:n.wrapInList,splitListItem:n.splitListItem,liftListItem:n.liftListItem,sinkListItem:n.sinkListItem,dropCursor:n.dropCursor,gapCursor:n.gapCursor,tableEditing:n.tableEditing,fixTables:n.fixTables,fixTablesKey:n.fixTablesKey,cellAround:n.cellAround,isInTable:n.isInTable,selectionCell:n.selectionCell,moveCellForward:n.moveCellForward,inSameTable:n.inSameTable,findCell:n.findCell,colCount:n.colCount,nextCell:n.nextCell,removeColSpan:n.removeColSpan,addColSpan:n.addColSpan,columnIsHeader:n.columnIsHeader,tableNodes:n.tableNodes,tableNodeTypes:n.tableNodeTypes,CellSelection:n.CellSelection,TableMap:n.TableMap,tableEditingKey:n.tableEditingKey,columnResizing:n.columnResizing,columnResizingPluginKey:n.columnResizingPluginKey,updateColumnsOnResize:n.updateColumnsOnResize,selectedRect:n.selectedRect,addColumn:n.addColumn,addColumnBefore:n.addColumnBefore,addColumnAfter:n.addColumnAfter,deleteColumn:n.deleteColumn,rowIsHeader:n.rowIsHeader,addRow:n.addRow,addRowBefore:n.addRowBefore,addRowAfter:n.addRowAfter,deleteRow:n.deleteRow,mergeCells:n.mergeCells,splitCell:n.splitCell,splitCellWithType:n.splitCellWithType,setCellAttr:n.setCellAttr,toggleHeader:n.toggleHeader,toggleHeaderRow:n.toggleHeaderRow,toggleHeaderColumn:n.toggleHeaderColumn,toggleHeaderCell:n.toggleHeaderCell,goToNextCell:n.goToNextCell,deleteTable:n.deleteTable};Object.defineProperty(e,"getHtml",{enumerable:!0,get:function(){return n.getHtml}}),Object.defineProperty(e,"marks",{enumerable:!0,get:function(){return n.marks}}),Object.defineProperty(e,"nodes",{enumerable:!0,get:function(){return n.nodes}}),Object.defineProperty(e,"parseContent",{enumerable:!0,get:function(){return n.parseContent}}),e.Editor=ro,e.ProseMirror=Lr,e.editorPropsKey=Dl}));
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1767620798,version:"13.3.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1767695905,version:"13.3.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = Object.freeze({
10
10
  productName: "KendoReact",
11
11
  productCode: "KENDOUIREACT",
12
12
  productCodes: ["KENDOUIREACT"],
13
- publishDate: 1767620798,
14
- version: "13.3.0-develop.1",
13
+ publishDate: 1767695905,
14
+ version: "13.3.0-develop.2",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  });
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-editor",
3
- "version": "13.3.0-develop.1",
3
+ "version": "13.3.0-develop.2",
4
4
  "description": "React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -27,16 +27,16 @@
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-drawing": "^1.21.2",
29
29
  "@progress/kendo-licensing": "^1.7.2",
30
- "@progress/kendo-react-buttons": "13.3.0-develop.1",
31
- "@progress/kendo-react-common": "13.3.0-develop.1",
32
- "@progress/kendo-react-dialogs": "13.3.0-develop.1",
33
- "@progress/kendo-react-dropdowns": "13.3.0-develop.1",
34
- "@progress/kendo-react-form": "13.3.0-develop.1",
35
- "@progress/kendo-react-inputs": "13.3.0-develop.1",
36
- "@progress/kendo-react-intl": "13.3.0-develop.1",
37
- "@progress/kendo-react-layout": "13.3.0-develop.1",
38
- "@progress/kendo-react-pdf": "13.3.0-develop.1",
39
- "@progress/kendo-react-popup": "13.3.0-develop.1",
30
+ "@progress/kendo-react-buttons": "13.3.0-develop.2",
31
+ "@progress/kendo-react-common": "13.3.0-develop.2",
32
+ "@progress/kendo-react-dialogs": "13.3.0-develop.2",
33
+ "@progress/kendo-react-dropdowns": "13.3.0-develop.2",
34
+ "@progress/kendo-react-form": "13.3.0-develop.2",
35
+ "@progress/kendo-react-inputs": "13.3.0-develop.2",
36
+ "@progress/kendo-react-intl": "13.3.0-develop.2",
37
+ "@progress/kendo-react-layout": "13.3.0-develop.2",
38
+ "@progress/kendo-react-pdf": "13.3.0-develop.2",
39
+ "@progress/kendo-react-popup": "13.3.0-develop.2",
40
40
  "@progress/kendo-svg-icons": "^4.0.0",
41
41
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
42
42
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
@@ -63,7 +63,7 @@
63
63
  "package": {
64
64
  "productName": "KendoReact",
65
65
  "productCode": "KENDOUIREACT",
66
- "publishDate": 1767620798,
66
+ "publishDate": 1767695905,
67
67
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
68
68
  }
69
69
  },