@progress/kendo-react-editor 16.2.1-develop.1 → 16.2.1-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,r,o,n,a,i,s,c,d,p,u,m,g,h){"use strict";function f(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(l){if("default"!==l){var r=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,r.get?r:{enumerable:!0,get:function(){return e[l]}})}}),t.default=e,Object.freeze(t)}var b=f(t);const v=e=>{const t=(e.parseDOM||[]).map(e=>({...e,getAttrs:t=>{const l="function"==typeof e.getAttrs?e.getAttrs(t):{};return l&&"object"==typeof l&&"href"in l&&(l.href=o.sanitizeUrl(l.href)||null),l}})),l=e.toDOM;return{...e,parseDOM:t,toDOM:"function"==typeof l?(e,t)=>{var r;return l({...e,attrs:{...e.attrs,href:o.sanitizeUrl(null==(r=e.attrs)?void 0:r.href)||null}},t)}:l}},k={...n.marks,link:v(n.marks.link)},y=new WeakMap,C=new WeakMap,w=e=>{const t=y.get(e);if(t)return t;const l=e.spec.marks.get("link");if(!l)return y.set(e,e),e;const r=new n.Schema({...e.spec,marks:e.spec.marks.update("link",v(l))});return y.set(e,r),y.set(r,r),r},S=e=>{const t=e.marks.map(e=>"link"===e.type.name?e.type.create({...e.attrs,href:o.sanitizeUrl(e.attrs.href)||null}):e);if(e.isText)return e.mark(t);const l=[];return e.forEach(e=>l.push(S(e))),e.copy(n.Fragment.fromArray(l)).mark(t)},x=(e,t,l)=>S(n.parseContent(e,t,l)),E=e=>{const t=C.get(e);if(t)return t;const l=w(e.type.schema),r=S(l===e.type.schema?e:l.nodeFromJSON(e.toJSON()));return C.set(e,r),C.set(r,r),r},T='\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',P='\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',R="editor.bold",I="editor.italic",N="editor.underline",L="editor.strikethrough",A="editor.subscript",B="editor.superscript",D="editor.hyperlink",M="editor.insertFile",z="editor.print",F="editor.selectAll",H="editor.cleanFormatting",W="editor.pdf",K="editor.foregroundColor",U="editor.backgroundColor",V="editor.createTable",O="editor.insertTableHint",q="editor.addRowBefore",j="editor.addRowAfter",_="editor.addColumnBefore",$="editor.addColumnAfter",G="editor.deleteRow",J="editor.deleteColumn",Q="editor.deleteTable",X="editor.mergeCells",Y="editor.splitCell",Z="editor.hyperlink-dialog-title",ee="editor.hyperlink-dialog-content-address",te="editor.hyperlink-dialog-content-title",le="editor.hyperlink-dialog-content-newwindow",re="editor.hyperlink-dialog-cancel",oe="editor.hyperlink-dialog-insert",ne="editor.insertfile-dialog-title",ae="editor.insertfile-dialog-content-address",ie="editor.insertfile-dialog-content-title",se="editor.insertfile-dialog-cancel",ce="editor.insertfile-dialog-insert",de="editor.image",pe="editor.image-dialog-title",ue="editor.image-address",me="editor.image-title",ge="editor.image-altText",he="editor.image-width",fe="editor.image-height",be="editor.image-cancel",ve="editor.image-insert",ke="editor.viewHtml",ye="editor.viewHtml-dialog-title",Ce="editor.viewHtml-cancel",we="editor.viewHtml-update",Se="editor.unlink",xe="editor.undo",Ee="editor.redo",Te="editor.fontSize",Pe="editor.fontName",Re="editor.format",Ie="editor.alignLeft",Ne="editor.alignRight",Le="editor.alignCenter",Ae="editor.alignJustify",Be="editor.indent",De="editor.outdent",Me="editor.orderedList",ze="editor.bulletList",Fe="editor.findReplace-tool-title",He="editor.findReplace-dialog-title",We="editor.findReplace-tab-find",Ke="editor.findReplace-tab-replace",Ue="editor.findReplace-findWhat",Ve="editor.findReplace-replaceWith",Oe="editor.findReplace-replace",qe="editor.findReplace-replaceAll",je="editor.findReplace-matchCase",_e="editor.findReplace-matchWord",$e="editor.findReplace-matchCyclic",Ge="editor.findReplace-useRegExp",Je="editor.findReplace-prevMatch",Qe="editor.findReplace-nextMatch",Xe="editor.findReplace-matches",Ye="editor.findReplace-invalidRegExp",Ze="editor.iframeTitle",et="editor.contentAreaLabel",tt="editorTools.foreColorLabel",lt="editorTools.backColorLabel",rt="editor.cellProperties",ot="editor.cellPropertiesLeftTop",nt="editor.cellPropertiesCenterTop",at="editor.cellPropertiesRightTop",it="editor.cellPropertiesLeftMiddle",st="editor.cellPropertiesCenterMiddle",ct="editor.cellPropertiesRightMiddle",dt="editor.cellPropertiesLeftBottom",pt="editor.cellPropertiesCenterBottom",ut="editor.cellPropertiesRightBottom",mt="editor.cellPropertiesNoAlignment",gt="editor.cellPropertiesWrap",ht="editor.cellPropertiesFitToCell",ft="editor.cellPropertiesApplyToAllCells",bt="editor.cellPropertiesWidth",vt="editor.cellPropertiesApplyToColumn",kt="editor.cellPropertiesHeight",yt="editor.cellPropertiesApplyToRow",Ct="editor.cellPropertiesAlignment",wt="editor.cellPropertiesTextControl",St="editor.cellPropertiesCellPadding",xt="editor.cellPropertiesBackground",Et="editor.cellPropertiesBorderWidth",Tt="editor.cellPropertiesBorderColor",Pt="editor.cellPropertiesBorderStyle",Rt="editor.cellPropertiesId",It="editor.cellPropertiesCssClass",Nt="editor.cellPropertiesSave",Lt="editor.cellPropertiesCancel",At="editor.tableProperties",Bt="editor.tablePropertiesAlignLeft",Dt="editor.tablePropertiesAlignCenter",Mt="editor.tablePropertiesAlignRight",zt="editor.tablePropertiesNoAlignment",Ft="editor.tablePropertiesLeft",Ht="editor.tablePropertiesCenter",Wt="editor.tablePropertiesRight",Kt="editor.tablePropertiesTop",Ut="editor.tablePropertiesBottom",Vt="editor.tablePropertiesNone",Ot="editor.tablePropertiesUsingScopeAttribute",qt="editor.tablePropertiesUsingIdAttributes",jt="editor.tablePropertiesRows",_t="editor.tablePropertiesColumns",$t="editor.tablePropertiesWidth",Gt="editor.tablePropertiesHeight",Jt="editor.tablePropertiesPosition",Qt="editor.tablePropertiesAlignment",Xt="editor.tablePropertiesCellSpacing",Yt="editor.tablePropertiesCellPadding",Zt="editor.tablePropertiesTableBackground",el="editor.tablePropertiesBorderWidth",tl="editor.tablePropertiesBorderColor",ll="editor.tablePropertiesBorderStyle",rl="editor.tablePropertiesCollapseBorders",ol="editor.tablePropertiesID",nl="editor.tablePropertiesCssClass",al="editor.tablePropertiesAccessibility",il="editor.tablePropertiesCaption",sl="editor.tablePropertiesCaptionPosition",cl="editor.tablePropertiesCaptionAlignment",dl="editor.tablePropertiesHeaderRows",pl="editor.tablePropertiesHeaderCols",ul="editor.tablePropertiesAssociateHeaders",ml="editor.tablePropertiesGeneral",gl="editor.tablePropertiesAdvanced",hl="editor.tablePropertiesSave",fl="editor.tablePropertiesCancel",bl="editor.borderStyleNone",vl="editor.borderStyleSolid",kl="editor.borderStyleDotted",yl="editor.borderStyleDashed",Cl="editor.borderStyleDouble",wl="editor.borderStyleGroove",Sl="editor.borderStyleRidge",xl="editor.borderStyleInset",El="editor.borderStyleOutset",Tl="editor.borderStyleInitial",Pl="editor.borderStyleInherit",Rl="editor.borderStyleHidden",Il="editor.sizeAuto",Nl="editor.listStyleDisc",Ll="editor.listStyleCircle",Al="editor.listStyleSquare",Bl="editor.listStyleDecimal",Dl="editor.listStyleUpperRoman",Ml="editor.listStyleLowerRoman",zl="editor.listStyleUpperLatin",Fl="editor.listStyleLowerLatin",Hl="editor.toolbarAriaLabel",Wl={[R]:"Bold",[I]:"Italic",[N]:"Underline",[L]:"Strikethrough",[A]:"Subscript",[B]:"Superscript",[Se]:"Remove hyperlink",[xe]:"Undo",[Ee]:"Redo",[Te]:"Font Size",[Pe]:"Font Name",[Re]:"Format",[Ie]:"Align text left",[Ne]:"Align text right",[Le]:"Center text",[Ae]:"Justify",[Be]:"Indent",[De]:"Outdent",[Me]:"Insert ordered list",[ze]:"Insert unordered list",[z]:"Print",[F]:"Select All",[H]:"Clean formatting",[W]:"Export as PDF",[K]:"Color",[U]:"Background color",[V]:"Create a table",[O]:"Create a {0} x {1} table",[q]:"Add row above",[j]:"Add row below",[_]:"Add column on the left",[$]:"Add column on the right",[G]:"Delete row",[J]:"Delete column",[Q]:"Delete table",[X]:"Merge cells",[Y]:"Split cell",[D]:"Insert hyperlink",[Z]:"Insert hyperlink",[ee]:"Web address",[te]:"Title",[le]:"Open link in new window",[re]:"Cancel",[oe]:"Insert",[M]:"Insert file",[ne]:"Insert file",[ae]:"Web address",[ie]:"Title",[se]:"Cancel",[ce]:"Insert",[de]:"Insert image",[pe]:"Insert image",[ue]:"Web address",[me]:"Title",[ge]:"Alternate text",[he]:"Width (px)",[fe]:"Height (px)",[be]:"Cancel",[ve]:"Insert",[ke]:"View HTML",[ye]:"View HTML",[Ce]:"Cancel",[we]:"Update",[Fe]:"Find and Replace",[He]:"Find and Replace",[We]:"Find",[Ke]:"Replace",[Ue]:"Find What:",[Ve]:"Replace With",[Oe]:"Replace",[qe]:"Replace All",[je]:"Match Case",[_e]:"Match whole word only",[$e]:"Match cyclic (Wrap around)",[Ge]:"Regular Expression",[Je]:"Prev",[Qe]:"Next",[Xe]:"{0} of {1} matches",[Ye]:"Invalid regular expression.",[Ze]:"Editable area. Press Alt + F10 for toolbar.",[et]:"Editor content",[tt]:"Fore Color",[lt]:"Back Color",[rt]:"Cell properties",[ot]:"Left Top",[nt]:"Center Top",[at]:"Right Top",[it]:"Left Middle",[st]:"Center Middle",[ct]:"Right Middle",[dt]:"Left Bottom",[pt]:"Center Bottom",[ut]:"Right Bottom",[mt]:"No Alignment",[gt]:"Wrap",[ht]:"Fit to cell",[ft]:"Apply to all cells",[bt]:"Width",[vt]:"apply to column",[kt]:"Height",[yt]:"apply to row",[Ct]:"Alignment",[wt]:"Text control",[St]:"Cell padding",[xt]:"Background",[Et]:"Border width",[Tt]:"Border color",[Pt]:"Border style",[Rt]:"ID",[It]:"CSS class",[Nt]:"Save",[Lt]:"Cancel",[At]:"Table properties",[Bt]:"Align Left",[Dt]:"Align Center",[Mt]:"Align Right",[zt]:"No Alignment",[Ft]:"Left",[Ht]:"Center",[Wt]:"Right",[Kt]:"Top",[Ut]:"Bottom",[Vt]:"None",[Ot]:"Using 'scope' attribute",[qt]:"Using 'id' attributes",[jt]:"Rows",[_t]:"Columns",[$t]:"Width",[Gt]:"Height",[Jt]:"Position",[Qt]:"Alignment",[Xt]:"Cell spacing",[Yt]:"Cell padding",[Zt]:"Table background",[el]:"Border width",[tl]:"Border color",[ll]:"Border style",[rl]:"Collapse borders",[ol]:"ID",[nl]:"CSS class",[al]:"Accessibility",[il]:"Caption",[sl]:"Position",[cl]:"Alignment",[dl]:"Header rows",[pl]:"Header cols",[ul]:"Associate headers",[ml]:"General",[gl]:"Advanced",[hl]:"Save",[fl]:"Cancel",[bl]:"None",[vl]:"Solid",[kl]:"Dotted",[yl]:"Dashed",[Cl]:"Double",[wl]:"Groove",[Sl]:"Ridge",[xl]:"Inset",[El]:"Outset",[Tl]:"Initial",[Pl]:"Inherit",[Rl]:"Hidden",[Il]:"Auto",[Nl]:"Disc",[Ll]:"Circle",[Al]:"Square",[Bl]:"Decimal",[Dl]:"Upper roman",[Ml]:"Lower roman",[zl]:"Upper latin",[Fl]:"Lower latin",[Hl]:"Toolbar"},Kl={bold:R,italic:I,underline:N,strikethrough:L,subscript:A,superscript:B,unlink:Se,undo:xe,redo:Ee,fontSize:Te,fontName:Pe,format:Re,alignLeft:Ie,alignRight:Ne,alignCenter:Le,alignJustify:Ae,indent:Be,outdent:De,orderedList:Me,bulletList:ze,print:z,selectAll:F,cleanFormatting:H,pdf:W,foregroundColor:K,backgroundColor:U,createTable:V,createTableHint:O,addRowBefore:q,addRowAfter:j,addColumnBefore:_,addColumnAfter:$,deleteRow:G,deleteColumn:J,deleteTable:Q,mergeCells:X,splitCell:Y,insertHyperlink:D,insertHyperlinkDialogTitle:Z,insertHyperlinkAddress:ee,insertHyperlinkTitle:te,insertHyperlinkNewWindow:le,insertHyperlinkCancel:re,insertHyperlinkInsert:oe,insertFile:M,insertFileDialogTitle:ne,insertFileAddress:ae,insertFileTitle:ie,insertFileCancel:se,insertFileInsert:ce,insertImage:de,insertImageDialogTitle:pe,insertImageAddress:ue,insertImageTitle:me,insertImageAltText:ge,insertImageWidth:he,insertImageHeight:fe,insertImageCancel:be,insertImageInsert:ve,viewHtml:ke,viewHtmlDialogTitle:ye,viewHtmlCancel:Ce,viewHtmlUpdate:we,findReplaceToolTitle:Fe,findReplaceDialogTitle:He,findReplaceTabFind:We,findReplaceTabReplace:Ke,findReplaceFindWhat:Ue,findReplaceReplaceWith:Ve,findReplaceReplace:Oe,findReplaceReplaceAll:qe,findReplaceMatchCase:je,findReplaceMatchWord:_e,findReplaceMatchCyclic:$e,findReplaceUseRegExp:Ge,findReplacePrevMatch:Je,findReplaceNextMatch:Qe,findReplaceMatches:Xe,findReplaceInvalidRegExp:Ye,iframeTitle:Ze,contentAreaLabel:et,foreColorLabel:tt,backColorLabel:lt,cellProperties:rt,cellPropertiesLeftTop:ot,cellPropertiesCenterTop:nt,cellPropertiesRightTop:at,cellPropertiesLeftMiddle:it,cellPropertiesCenterMiddle:st,cellPropertiesRightMiddle:ct,cellPropertiesLeftBottom:dt,cellPropertiesCenterBottom:pt,cellPropertiesRightBottom:ut,cellPropertiesNoAlignment:mt,cellPropertiesWrap:gt,cellPropertiesFitToCell:ht,cellPropertiesApplyToAllCells:ft,cellPropertiesWidth:bt,cellPropertiesApplyToColumn:vt,cellPropertiesHeight:kt,cellPropertiesApplyToRow:yt,cellPropertiesAlignment:Ct,cellPropertiesTextControl:wt,cellPropertiesCellPadding:St,cellPropertiesBackground:xt,cellPropertiesBorderWidth:Et,cellPropertiesBorderColor:Tt,cellPropertiesBorderStyle:Pt,cellPropertiesId:Rt,cellPropertiesCssClass:It,cellPropertiesSave:Nt,cellPropertiesCancel:Lt,tableProperties:At,tablePropertiesAlignLeft:Bt,tablePropertiesAlignCenter:Dt,tablePropertiesAlignRight:Mt,tablePropertiesNoAlignment:zt,tablePropertiesLeft:Ft,tablePropertiesCenter:Ht,tablePropertiesRight:Wt,tablePropertiesTop:Kt,tablePropertiesBottom:Ut,tablePropertiesNone:Vt,tablePropertiesUsingScopeAttribute:Ot,tablePropertiesUsingIdAttributes:qt,tablePropertiesRows:jt,tablePropertiesColumns:_t,tablePropertiesWidth:$t,tablePropertiesHeight:Gt,tablePropertiesPosition:Jt,tablePropertiesAlignment:Qt,tablePropertiesCellSpacing:Xt,tablePropertiesCellPadding:Yt,tablePropertiesTableBackground:Zt,tablePropertiesBorderWidth:el,tablePropertiesBorderColor:tl,tablePropertiesBorderStyle:ll,tablePropertiesCollapseBorders:rl,tablePropertiesId:ol,tablePropertiesCssClass:nl,tablePropertiesAccessibility:al,tablePropertiesCaption:il,tablePropertiesCaptionPosition:sl,tablePropertiesCaptionAlignment:cl,tablePropertiesHeaderRows:dl,tablePropertiesHeaderCols:pl,tablePropertiesAssociateHeaders:ul,tablePropertiesGeneral:ml,tablePropertiesAdvanced:gl,tablePropertiesSave:hl,tablePropertiesCancel:fl,borderStyleNone:bl,borderStyleSolid:vl,borderStyleDotted:kl,borderStyleDashed:yl,borderStyleDouble:Cl,borderStyleGroove:wl,borderStyleRidge:Sl,borderStyleInset:xl,borderStyleOutset:El,borderStyleInitial:Tl,borderStyleInherit:Pl,borderStyleHidden:Rl,sizeAuto:Il,listStyleDisc:Nl,listStyleCircle:Ll,listStyleSquare:Al,listStyleDecimal:Bl,listStyleUpperRoman:Dl,listStyleLowerRoman:Ml,listStyleUpperLatin:zl,listStyleLowerLatin:Fl,toolbarAriaLabel:Hl},Ul={...n.indentRules.listsTypes};e.EditorToolsSettings=void 0,(e=>{const t={type:"button"};e.bold={...n.bold,props:{icon:"bold",svgIcon:a.boldIcon,...t},messages:{title:Kl.bold},commandName:"Bold"},e.italic={...n.italic,props:{icon:"italic",svgIcon:a.italicIcon,...t},messages:{title:Kl.italic},commandName:"Italic"},e.underline={...n.underline,props:{icon:"underline",svgIcon:a.underlineIcon,...t},messages:{title:Kl.underline},commandName:"Underline"},e.strikethrough={...n.strikethrough,props:{icon:"strikethrough",svgIcon:a.strikethroughIcon,...t},messages:{title:Kl.strikethrough},commandName:"Strikethrough"},e.subscript={...n.subscript,props:{icon:"subscript",svgIcon:a.subscriptIcon,...t},messages:{title:Kl.subscript},commandName:"Subscript"},e.superscript={...n.superscript,props:{icon:"superscript",svgIcon:a.superscriptIcon,...t},messages:{title:Kl.superscript},commandName:"Superscript"},e.link={...n.link,props:{icon:"link",svgIcon:a.linkIcon,...t},messages:{insertHyperlink:Kl.insertHyperlink,insertHyperlinkDialogTitle:Kl.insertHyperlinkDialogTitle,insertHyperlinkAddress:Kl.insertHyperlinkAddress,insertHyperlinkTitle:Kl.insertHyperlinkTitle,insertHyperlinkNewWindow:Kl.insertHyperlinkNewWindow,insertHyperlinkCancel:Kl.insertHyperlinkCancel,insertHyperlinkInsert:Kl.insertHyperlinkInsert},commandName:"Link"},e.insertFile={...n.link,props:{icon:"file-add",svgIcon:a.fileAddIcon,...t},messages:{insertHyperlink:Kl.insertFile,insertHyperlinkDialogTitle:Kl.insertFileDialogTitle,insertHyperlinkAddress:Kl.insertFileAddress,insertHyperlinkTitle:Kl.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:Kl.insertFileCancel,insertHyperlinkInsert:Kl.insertFileInsert},commandName:"InsertFile",linkTarget:!1},e.insertTable={props:{icon:"table-add",svgIcon:a.tableAddIcon,...t},messages:{createTable:Kl.createTable,createTableHint:Kl.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:a.tableRowInsertAboveIcon,...t},messages:{title:Kl.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:a.tableRowInsertBelowIcon,...t},messages:{title:Kl.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:a.tableColumnInsertLeftIcon,...t},messages:{title:Kl.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:a.tableColumnInsertRightIcon,...t},messages:{title:Kl.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:{icon:"table-row-delete",svgIcon:a.tableRowDeleteIcon,...t},messages:{title:Kl.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:{icon:"table-column-delete",svgIcon:a.tableColumnDeleteIcon,...t},messages:{title:Kl.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:{icon:"table-delete",svgIcon:a.tableDeleteIcon,...t},messages:{title:Kl.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:{icon:"cells-merge",svgIcon:a.cellsMergeIcon,...t},messages:{title:Kl.mergeCells},commandName:"MergeCells"},e.splitCell={props:{icon:"cell-split-horizontally",svgIcon:a.cellSplitHorizontallyIcon,...t},messages:{title:Kl.splitCell},commandName:"SplitCell"},e.print={props:{icon:"print",svgIcon:a.printIcon,...t},messages:{title:Kl.print}},e.selectAll={props:{icon:"select-all",svgIcon:a.selectAllIcon,...t},messages:{title:Kl.selectAll}},e.pdf={props:{icon:"file-pdf",svgIcon:a.filePdfIcon,...t},messages:{title:Kl.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:{icon:"clear-css",svgIcon:a.clearCssIcon,...t},messages:{title:Kl.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:{icon:"image",svgIcon:a.imageIcon,...t},messages:{insertImage:Kl.insertImage,insertImageDialogTitle:Kl.insertImageDialogTitle,insertImageAddress:Kl.insertImageAddress,insertImageTitle:Kl.insertImageTitle,insertImageAltText:Kl.insertImageAltText,insertImageWidth:Kl.insertImageWidth,insertImageHeight:Kl.insertImageHeight,insertImageCancel:Kl.insertImageCancel,insertImageInsert:Kl.insertImageInsert},commandName:"InsertImage"},e.viewHtml={props:{icon:"code",svgIcon:a.codeIcon,...t},messages:{viewHtml:Kl.viewHtml,viewHtmlDialogTitle:Kl.viewHtmlDialogTitle,viewHtmlCancel:Kl.viewHtmlCancel,viewHtmlUpdate:Kl.viewHtmlUpdate},commandName:"SetContent"},e.findAndReplace={props:{icon:"find",svgIcon:a.binocularsIcon,...t},messages:{findReplaceToolTitle:Kl.findReplaceToolTitle,findReplaceDialogTitle:Kl.findReplaceDialogTitle,findReplaceTabFind:Kl.findReplaceTabFind,findReplaceTabReplace:Kl.findReplaceTabReplace,findReplaceFindWhat:Kl.findReplaceFindWhat,findReplaceReplaceWith:Kl.findReplaceReplaceWith,findReplaceReplace:Kl.findReplaceReplace,findReplaceReplaceAll:Kl.findReplaceReplaceAll,findReplaceMatchCase:Kl.findReplaceMatchCase,findReplaceMatchWord:Kl.findReplaceMatchWord,findReplaceMatchCyclic:Kl.findReplaceMatchCyclic,findReplaceUseRegExp:Kl.findReplaceUseRegExp,findReplacePrevMatch:Kl.findReplacePrevMatch,findReplaceNextMatch:Kl.findReplaceNextMatch,findReplaceMatches:Kl.findReplaceMatches,findReplaceInvalidRegExp:Kl.findReplaceInvalidRegExp}},e.unlink={...n.link,props:{icon:"unlink",svgIcon:a.unlinkIcon,...t},messages:{title:Kl.unlink},commandName:"Unlink"},e.undo={props:{icon:"undo",svgIcon:a.undoIcon,...t},messages:{title:Kl.undo},commandName:"Undo"},e.redo={props:{icon:"redo",svgIcon:a.redoIcon,...t},messages:{title:Kl.redo},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:Wl[Kl.fontSize],value:"",localizationKey:Kl.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:Wl[Kl.fontName],value:"",localizationKey:Kl.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:Wl[Kl.format],value:"",localizationKey:Kl.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:a.foregroundColorIcon,view:"palette",title:Kl.foregroundColor,ariaLabel:Kl.foreColorLabel},commandName:"ForeColor"},e.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:a.dropletIcon,view:"palette",title:Kl.backgroundColor,ariaLabel:Kl.backColorLabel},commandName:"BackColor"},e.alignLeft={actions:[...n.alignLeftRules],props:{icon:"align-left",svgIcon:a.alignLeftIcon,...t},messages:{title:Kl.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:[...n.alignRightRules],props:{icon:"align-right",svgIcon:a.alignRightIcon,...t},messages:{title:Kl.alignRight},commandName:"AlignRight"},e.alignCenter={actions:[...n.alignCenterRules],props:{icon:"align-center",svgIcon:a.alignCenterIcon,...t},messages:{title:Kl.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:[...n.alignJustifyRules],props:{icon:"align-justify",svgIcon:a.alignJustifyIcon,...t},messages:{title:Kl.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:[...n.alignRemoveRules],props:{icon:"align-remove",svgIcon:a.alignRemoveIcon,...t},messages:{},commandName:"AlignRemove"},e.indent={actions:n.indentRules.nodes,listsTypes:Ul,props:{icon:"indent",svgIcon:a.indentIcon,...t},messages:{title:Kl.indent},commandName:"Indent"},e.outdent={actions:n.outdentRules.nodes,listsTypes:Ul,props:{icon:"outdent",svgIcon:a.outdentIcon,...t},messages:{title:Kl.outdent},commandName:"Outdent"},e.orderedList={listType:Ul.orderedList,props:{icon:"list-ordered",svgIcon:a.listOrderedIcon,...t},messages:{title:Kl.orderedList},commandName:"OrderedList",types:{...Ul}},e.bulletList={listType:Ul.bulletList,props:{icon:"list-unordered",svgIcon:a.listUnorderedIcon,...t},messages:{title:Kl.bulletList},commandName:"UnorderedList",types:{...Ul}}})(e.EditorToolsSettings||(e.EditorToolsSettings={}));let Vl=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?o.sanitizeUrl(this.href.value):void 0)||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:o}=this.props,a=d.provideLocalizationService(this),{insertHyperlinkDialogTitle:p,insertHyperlinkAddress:u,insertHyperlinkTitle:m,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"},a.toLanguageString(u,Wl[u])),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"},a.toLanguageString(m,Wl[m])),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}),a.toLanguageString(g,Wl[g]))))}),y=[b.createElement(r.Button,{onClick:this.onClose,dir:l,key:"cancel"},a.toLanguageString(h,Wl[h])),b.createElement(r.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},a.toLanguageString(f,Wl[f]))],C=b.createElement(i.Window,{initialWidth:450,initialHeight:250,className:"k-editor-window",title:a.toLanguageString(p,Wl[p]),onClose:this.onClose,style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},k,b.createElement(i.WindowActionsBar,null,...y));return o?o(C,{content:k,actionButtons:y}):C}};d.registerForLocalization(Vl);let Ol=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],r={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},o=Object.keys(r).filter(e=>null!==r[e]&&""!==r[e]).reduce((e,t)=>Object.assign(e,{[t]:r[t]}),{}),a=l.createAndFill(o);a&&n.insertNode(a,!0)(e.state,l=>e.dispatch(l.setMeta("commandName",t.commandName).setMeta("args",o))),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:o}=this.props,{insertImageDialogTitle:a,insertImageAddress:p,insertImageTitle:u,insertImageAltText:m,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,Wl[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(m,Wl[m])),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(u,Wl[u])),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,Wl[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,Wl[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(r.Button,{onClick:this.onClose,dir:l,key:"cancel"},k.toLanguageString(f,Wl[f])),b.createElement(r.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},k.toLanguageString(v,Wl[v]))],x=b.createElement(i.Window,{initialWidth:500,initialHeight:350,className:"k-editor-window",title:k.toLanguageString(a,Wl[a]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},w,b.createElement(i.WindowActionsBar,null,...S));return o?o(x,{content:w,actionButtons:S}):x}};d.registerForLocalization(Ol);const ql=new n.PluginKey("editor-props");let jl=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:r}=ql.getState(e.state);n.setHtml(l,t.commandName,{preserveWhitespace:r})(e.state,e.dispatch),this.onClose()},this.onClose=()=>{this.props.view.focus(),this.props.onClose()}}render(){const{view:e,settings:t,dir:l,render:o}=this.props,a=d.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:u}=t.messages,m=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(r.Button,{onClick:this.onClose,dir:l,key:"cancel"},a.toLanguageString(p,Wl[p])),b.createElement(r.Button,{onClick:this.onUpdate,themeColor:"primary",dir:l,key:"update"},a.toLanguageString(u,Wl[u]))],h=b.createElement(i.Window,{className:"k-editor-window",title:a.toLanguageString(c,Wl[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},m,b.createElement(i.WindowActionsBar,null,...g));return o?o(h,{content:m,actionButtons:g}):h}};d.registerForLocalization(jl);const _l={onMouseDown:e=>e.preventDefault(),onPointerDown:e=>e.preventDefault()},$l={userSelect:"none"},Gl=function(e,...t){return t.forEach((t,l)=>{e=e.replace("{"+l+"}",String(t))}),e},Jl=(e,t)=>t.dataItem.style?b.cloneElement(e,e.props,b.createElement("span",{style:t.dataItem.style},e.props.children)):e,Ql=["px","em","%"],Xl={animate:{openDuration:150,closeDuration:150}},Yl=[{textKey:Kl.borderStyleNone,text:Wl[Kl.borderStyleNone],value:"none"},{textKey:Kl.borderStyleSolid,text:Wl[Kl.borderStyleSolid],value:"solid"},{textKey:Kl.borderStyleDotted,text:Wl[Kl.borderStyleDotted],value:"dotted"},{textKey:Kl.borderStyleDashed,text:Wl[Kl.borderStyleDashed],value:"dashed"},{textKey:Kl.borderStyleDouble,text:Wl[Kl.borderStyleDouble],value:"double"},{textKey:Kl.borderStyleGroove,text:Wl[Kl.borderStyleGroove],value:"groove"},{textKey:Kl.borderStyleRidge,text:Wl[Kl.borderStyleRidge],value:"ridge"},{textKey:Kl.borderStyleInset,text:Wl[Kl.borderStyleInset],value:"inset"},{textKey:Kl.borderStyleOutset,text:Wl[Kl.borderStyleOutset],value:"outset"},{textKey:Kl.borderStyleInitial,text:Wl[Kl.borderStyleInitial],value:"initial"},{textKey:Kl.borderStyleInherit,text:Wl[Kl.borderStyleInherit],value:"inherit"},{textKey:Kl.borderStyleHidden,text:Wl[Kl.borderStyleHidden],value:"hidden"}];function Zl(e,t){for(let l=e.depth;l>0;l--){const r=e.node(l);if(t(r))return{node:r,depth:l}}return null}const er=e.EditorToolsSettings.findAndReplace;let tr=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 r=0,o=0;if(t&&l){const e=t.findIndex(e=>e.eq(l));r=-1===e?t.length:e+1,o=t.length}return Gl(e,r,o)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(e=!1)=>{const t=this.props.view,{searchText:l,matchCase:r,matchCyclic:o,matchWord:a,useRegExp:i}=this.state,s={text:l,matchWord:a,matchCase:r,useRegExp:i,backward:e,matchCyclic:o},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 r=t.from,o=r+l.length,a=n.replace(t,l,e.state.tr);a.setSelection(n.TextSelection.create(a.doc,r,o)),a.scrollIntoView(),e.dispatch(a),this.setNextState({})}},this.onReplaceAll=()=>{const e=this.props.view,{searchText:t,replaceText:l,matchCase:r,matchWord:o,useRegExp:a}=this.state,i={text:t,matchWord:o,matchCase:r,useRegExp:a},s=n.replaceAll(e.state,l,i);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:r,matchCase:o,useRegExp:a,matchCyclic:i}=t,s={text:e,matchWord:r,matchCase:o,useRegExp:a},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)||i&&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||er}componentDidUpdate(e,t){const l=this.props.view,{matches:r=[],nextMatch:o}=this.state;if(t.nextMatch!==o){const e=l.state,t=e.tr,a=[];r.forEach(e=>{a.push({from:e.from,to:e.to,attrs:{class:o&&e.eq(o)?"k-text-selected":"k-text-highlighted"}})}),t.setMeta(n.textHighlightKey,a),t.setSelection(o||n.TextSelection.create(e.doc,e.selection.from)),l.dispatch(t)}}render(){const e=d.provideLocalizationService(this),{findReplaceDialogTitle:t,findReplaceTabFind:l,findReplaceTabReplace:n,findReplaceFindWhat:m,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:R,searchText:I,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,Wl[v])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-whole",checked:T,onChange:this.onMatchWordChecked,label:e.toLanguageString(k,Wl[k])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-cyclic",checked:P,onChange:this.onMatchCyclicChecked,label:e.toLanguageString(y,Wl[y])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"regular-expression",checked:R,onChange:this.onUseRegExpChecked,label:e.toLanguageString(C,Wl[C])}))),B=b.createElement("div",{className:"k-matches-container"},b.createElement(r.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},b.createElement(o.IconWrap,{name:"chevron-left",icon:a.chevronLeftIcon}),e.toLanguageString(w,Wl[w])),b.createElement("span",null,this.matchesMessage(e.toLanguageString(x,Wl[x]))),b.createElement(r.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(S,Wl[S]),b.createElement(o.IconWrap,{name:"chevron-right",icon:a.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(m,Wl[m])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"findWhat",type:"text",value:I,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}),this.state.error&&b.createElement(u.Error,null,e.toLanguageString(this.state.error,Wl[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,Wl[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(i.Window,{title:e.toLanguageString(t,Wl[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,Wl[l])},D,A,B),b.createElement(p.TabStripTab,{title:e.toLanguageString(n,Wl[n])},D,M,b.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},b.createElement(r.Button,{disabled:!L,onClick:this.onReplace},e.toLanguageString(h,Wl[h])),b.createElement(r.Button,{disabled:!L,onClick:this.onReplaceAll},e.toLanguageString(f,Wl[f]))),A,B)))}};d.registerForLocalization(tr),e.EditorDialogs=void 0,(e=>{e.InsertLinkDialog=class extends Vl{};e.InsertImageDialog=class extends Ol{};e.ViewHtmlDialog=class extends jl{};e.FindAndReplaceDialog=class extends tr{}})(e.EditorDialogs||(e.EditorDialogs={}));const{bold:lr,underline:rr,italic:or}=e.EditorToolsSettings,nr="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 x(n.trimWhitespace(t),w(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){const t=e.doc.type.schema,l=w(t),r=l===t?e.doc:l.nodeFromJSON(e.doc.toJSON());return n.getHtml({doc:r,schema:l})},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,r){return!!n.indentBlocks(t,l,r)(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,r){const o=n.trimWhitespace(t),a=x(o,e.state.schema,void 0===r?{preserveWhitespace:"full"}:r);e.dispatch(e.state.tr.setSelection(new n.AllSelection(e.state.doc)).replaceSelectionWith(a).setMeta("commandName",void 0===l?"setHTML":l))},e.toggleInlineFormat=function(e,t,l,r){return n.toggleInlineFormat(t,l,r)(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 r=e&&e.types&&e.types.hardBreak||"hard_break",o=t.schema.nodes[r];return l&&l(t.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0}),l=e&&e.types&&e.types.listItem||"list_item",r=e&&e.toolsSettings||{};return{"Mod-b":(e,t)=>n.toggleInlineFormat(r.bold||lr)(e,t),"Mod-i":(e,t)=>n.toggleInlineFormat(r.italic||or)(e,t),"Mod-u":(e,t)=>n.toggleInlineFormat(r.underline||rr)(e,t),"Mod-z":n.undo,"Shift-Mod-z":n.redo,...nr?{}:{"Mod-y":n.redo},Backspace:n.undoInputRule,"Mod-Enter":t,"Shift-Enter":t,...nr?{"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.placeholder=function(e){return n.placeholder(e)},e.propsKey=ql,e.imageResizeKey=n.imageResizeKey,e.marks={...k},e.nodes={...n.nodes}})(e.EditorUtils||(e.EditorUtils={}));const ar=(t,l)=>{const r=l.tr||t.state.tr.setSelection(new n.AllSelection(t.state.doc)).replaceSelectionWith(l.doc?E(l.doc):e.EditorUtils.createDocument(t.state.schema,l.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(r))},ir=Object.freeze({name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"16.2.1-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),{link:sr,bold:cr,italic:dr,underline:pr}=e.EditorToolsSettings,ur=b.forwardRef((t,l)=>{const{tools:a=[],defaultEditMode:i="iframe",preserveWhitespace:s="full",style:c,className:p}=t,[u,m]=b.useState({view:void 0,linkDialog:!1}),g=b.useRef(null),h=b.useRef(null),f=b.useRef(null),v=b.useRef(void 0),y=b.useRef(null),C=b.useRef(null),w=b.useRef(void 0),S=b.useRef(t);S.current=t;const x=b.useCallback(e=>{g.current=e},[]),R=b.useCallback(e=>{f.current=e},[]),I=b.useCallback(e=>{h.current=e},[]),[N]=b.useState(()=>!o.validatePackage(ir,{component:"Editor"})),[L]=b.useState(()=>o.getLicenseMessage(ir)),A=d.useLocalization(),B=b.useRef(null);b.useImperativeHandle(B,()=>({get element(){return g.current},get contentElement(){return h.current},get view(){return v.current},get value(){return null!==y.current?y.current.doc:void 0!==S.current.value?S.current.value:v.current?v.current.state.doc:S.current.defaultContent||""},get props(){return S.current},focus:()=>{v.current&&v.current.focus()}})),b.useImperativeHandle(l,()=>B.current),o.useWebMcpRegister("editor",B,t,t.webMcp);const D=()=>B.current,M=b.useRef((e,t)=>{var l,r;const o={target:D(),transaction:e,state:t};return!1!==(null==(r=(l=S.current).onExecute)?void 0:r.call(l,o))}).current,z=b.useRef(e=>{if(S.current.onPasteHtml&&w.current){const t={target:D(),pastedHtml:e,nativeEvent:w.current},l=S.current.onPasteHtml(t);if(w.current=void 0,"string"==typeof l)return l}return e}).current,F=b.useRef(t=>{const l=t.docChanged;if(S.current.onChange&&l){y.current=t;const l=t.doc,r=t.doc.type.schema,o={target:D(),value:l,html:"",transaction:t,schema:r};Object.defineProperty(o,"html",{get:()=>(C.current=e.EditorUtils.getHtml({doc:l,schema:r}),C.current)}),S.current.onChange(o)}const r=v.current;r&&(void 0===S.current.value||!l)&&r.updateState(r.state.apply(t))}).current,H=b.useRef((e,t)=>{if(S.current.onFocus){const e={target:D(),nativeEvent:t};S.current.onFocus(e)}return!1}).current,W=b.useRef((e,t)=>{if(S.current.onBlur){const e={target:D(),nativeEvent:t};S.current.onBlur(e)}return!1}).current,K=b.useRef((e,t)=>(S.current.onPasteHtml&&(w.current=t),!1)).current,U=b.useRef(e=>{if(S.current.onIFrameInit){const t={target:D(),iframe:e};S.current.onIFrameInit(t)}return!1}).current,V=b.useRef((e,t)=>{m(t=>({...t,view:e}))}).current;b.useEffect(()=>{var t;const l=f.current,o=null==l?void 0:l.contentWindow;if(o){const e=o.document;if(!e.head.querySelector("meta[charset]")){const t=e.createElement("meta");t.setAttribute("charset","utf-8"),e.head.appendChild(t)}const t=e.body.querySelector(".k-content");t?(t.textContent="",h.current=t):(h.current=e.createElement("div"),e.body.appendChild(h.current),h.current.classList.add("k-content")),h.current.setAttribute("role","textbox"),h.current.setAttribute("aria-label",S.current.ariaLabel||A.toLanguageString(Kl.contentAreaLabel,Wl[Kl.contentAreaLabel])),S.current.ariaLabelledBy&&h.current.setAttribute("aria-labelledby",S.current.ariaLabelledBy),S.current.ariaDescribedBy&&h.current.setAttribute("aria-describedby",S.current.ariaDescribedBy),l&&S.current.onIFrameInit?U(l):e.head.querySelector("style")||[T,P,"rtl"===S.current.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 a=h.current;if(!a)return;const i=null!=(t=S.current.preserveWhitespace)?t:"full",s=[new n.Plugin({view:()=>({update:V}),key:new n.PluginKey("toolbar-tools-update-plugin")}),new n.Plugin({filterTransaction:M,key:new n.PluginKey("onExecute-event-plugin")}),new n.Plugin({key:ql,state:{init:()=>({preserveWhitespace:i}),apply:(e,t)=>t}}),n.spacesFix(),n.caretColor(),n.history(),n.dropCursor(),n.gapCursor(),n.tableEditing(),n.cspFix()],c={...e.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:cr,italic:dr,underline:pr}}),"Mod-k":()=>{const e=v.current;if(e){const t=e.state,l=t.selection.empty,r=n.getMark(t,t.schema.marks[sr.mark]);l&&!r||m(e=>e.linkDialog?e:{...e,linkDialog:!0})}return!0},"Alt-F10":()=>{var e;const t=null==(e=g.current)?void 0:e.querySelector(".k-toolbar");if(t){const e=t.querySelector(r.toolbarButtons.join(","));if(e)return e.focus(),!0}return!1}},{defaultContent:d="",value:p,onMount:u}=S.current,b=p&&"string"!=typeof p?E(p):e.EditorUtils.createDocument(new n.Schema({nodes:n.nodes,marks:k}),p||d,{preserveWhitespace:i}),y={state:n.EditorState.create({plugins:[...s,n.keymap(c),n.keymap(n.baseKeymap)],doc:b}),transformPastedHTML:z,dispatchTransaction:F,handleDOMEvents:{focus:H,blur:W,paste:K},handleDrop:(e,t,l,r)=>{let o=!1;return l.content.nodesBetween(0,l.content.size,e=>{o=o||"table_caption_external"===e.type.name}),o}},C={plugins:s,shortcuts:c,target:D(),viewProps:y,dom:a},w=(null==u?void 0:u(C))||new n.EditorView({mount:a},y);return v.current=w,m(e=>({...e,view:w})),()=>{var e,t;v.current&&v.current.destroy(),v.current=void 0;const r=null==l?void 0:l.contentWindow;if(null!=r&&r.document){null==(t=null==(e=h.current)?void 0:e.parentNode)||t.removeChild(h.current);const l=r.document.head;for(;null!=l&&l.firstChild;)l.removeChild(l.firstChild)}}},[]);const O=b.useRef(t.value);if(b.useEffect(()=>{const{value:e}=S.current,t=v.current;void 0!==e&&t?(((e,t,l,r,o)=>{if("string"==typeof t)r&&t===o?ar(e,{tr:r}):t!==l&&ar(e,{html:t});else{const l=E(t);r&&l.eq(r.doc)?ar(e,{tr:r}):e.state.doc.eq(l)||ar(e,{doc:l})}})(t,e,O.current,y.current,C.current),y.current=null,C.current=null,O.current=e):O.current=e}),v.current){ql.getState(v.current.state).preserveWhitespace=s}let q=t.contentStyle;void 0===q&&void 0===(null==c?void 0:c.height)&&(q={height:"300px"});const j=(e,t,l)=>e.displayName||e.name||`tool-${t}-${l}`,_=(e,t)=>e.map((e,l)=>j(e,t,l)).join("-")||`group-${t}`,$=(e,l,o=!1)=>{const n=b.createElement(e,{view:v.current,dir:t.dir,key:l,className:o?"k-toolbar-button":void 0});return n.type===r.ToolbarSeparator?b.createElement(e,{key:l}):n},G=a.map((e,t)=>Array.isArray(e)?b.createElement(r.ButtonGroup,{key:_(e,t),className:"k-toolbar-button-group"},e.map((e,l)=>$(e,j(e,t,l)))):$(e,j(e,t,0),!0)),J=A.toLanguageString(Kl.toolbarAriaLabel,Wl[Kl.toolbarAriaLabel]),Q=A.toLanguageString(Kl.contentAreaLabel,Wl[Kl.contentAreaLabel]);return b.createElement("div",{ref:x,className:o.classNames("k-editor",p,{"k-editor-resizable":t.resizable}),dir:t.dir,style:c},G.length>0&&b.createElement(r.Toolbar,{className:"k-editor-toolbar",keyboardNavigation:t.keyboardNavigation,ariaLabel:J},G),"iframe"===i?b.createElement("div",{className:"k-editor-content"},b.createElement("iframe",{ref:R,frameBorder:"0",title:A.toLanguageString(Kl.iframeTitle,Wl[Kl.iframeTitle]),style:q,className:"k-iframe"})):b.createElement("div",{ref:I,style:q,className:"k-editor-content",role:"textbox","aria-label":Q,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy,suppressContentEditableWarning:!0}),((e,l,r)=>u[r]&&b.createElement(e,{view:v.current,settings:l,dir:t.dir,onClose:()=>m(e=>({...e,[r]:!1}))}))(e.EditorDialogs.InsertLinkDialog,sr,"linkDialog"),N&&b.createElement(o.WatermarkOverlay,{message:L}))});ur.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},ur.displayName="KendoReactEditor";let mr=class extends b.Component{constructor(){super(...arguments),this.state={row:-1,col:-1}}renderCell(e,t,l){const r=Math.floor(e/this.props.columns),o=e%this.props.columns,n=o<=l&&r<=t;return b.createElement("span",{className:"k-ct-cell k-disabled"+(n?" k-selected":""),onMouseEnter:()=>this.setState({row:r,col:o}),onClick:()=>this.props.onCellClick.call(void 0,r,o),key:e})}render(){const e=[],t=this.props.columns*this.props.rows,{row:l,col:r}=this.state,{onDown:o}=this.props;let n=this.props.createTableMessage;r>-1&&(n=Gl(this.props.createTableHintMessage,l+1,r+1));for(let o=0;o<t;o++)e.push(this.renderCell(o,l,r));return[b.createElement("div",{onMouseLeave:()=>this.setState({row:-1,col:-1}),key:"cells",style:{borderColor:"inherit"},onPointerDown:o,onMouseDown:o},e),b.createElement("div",{className:"k-status",key:"status",onPointerDown:o,onMouseDown:o},n)]}};var gr,hr;(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:r,rows:o=e.defaultProps.rows,columns:n=e.defaultProps.columns}=this.props,a="rtl"===r?"right":"left";return b.createElement(m.Popup,{anchor:l,anchorAlign:{horizontal:a,vertical:"bottom"},popupAlign:{horizontal:a,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:t,style:"rtl"===r?{direction:"rtl"}:void 0},b.createElement(mr,{rows:o,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 r=t;e.InsertTablePopup=r})(gr||(gr={})),(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:r,table_row:o,table_cell:a}=l.state.schema.nodes,i=n.createTable({table:r,table_row:o,table_cell:a},e,t);i&&n.insertNode(i,!0)(l.state,l.dispatch),l.focus(),this.closePopup()}}render(){const{view:t,render:l,...a}=this.props,i=t&&t.state,s=d.provideLocalizationService(this),{createTable:c,createTableHint:p}=e.messages,u=s.toLanguageString(c,Wl[c]),m=s.toLanguageString(p,Wl[p]),g=!(i&&n.canInsert(i,i.schema.nodes.table)&&!Zl(i.selection.$from,e=>"table_caption_external"===e.type.name)),h=[b.createElement(r.Button,{onClick:g?void 0:this.togglePopup,"aria-disabled":!!g||void 0,ref:e=>{this.button=e&&e.element},key:"InsertTable",..._l,title:u,...e.props,...a,className:o.classNames(a.className,e.props.className,{"k-disabled":g})}),t&&!g&&b.createElement(gr.InsertTablePopup,{key:"insertTablePopup",createTableMessage:u,createTableHintMessage:m,dir:a.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}})(hr||(hr={}));const{alignRemove:fr}=e.EditorToolsSettings,br=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...o}=this.props,a=t&&t.state,i=!!a&&n.isAligned(a,e.actions),s=i?fr.actions:e.actions,c=i?fr.commandName:e.commandName,p=d.provideLocalizationService(this),u=e.messages.title,m=b.createElement(r.Button,{onClick:()=>t&&n.alignBlocks(s,c)(t.state,t.dispatch),selected:i,togglable:!0,..._l,title:p.toLanguageString(u,Wl[u]),"aria-label":p.toLanguageString(u,Wl[u]),...e.props,...o});return l?l.call(void 0,m,{view:t}):m}};return d.registerForLocalization(t),t};var vr;(e=>{e.createStyleDropDownList=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:r}=this.props,{style:o}=e;if(r){n.applyInlineStyle({style:o,value:l.value},e.commandName)(r.state,r.dispatch);const{syntheticEvent:a}=t;a&&"click"===a.type&&r.focus()}}}render(){const{style:t}=e,{view:l,render:r,data:o,defaultItem:a,...i}=this.props,s=o||e.items;let c=a||e.defaultItem;const p=l?n.getInlineStyles(l.state,{name:t,value:/^.+$/}):[],u=d.provideLocalizationService(this);c&&c.localizationKey&&(c={...c},c.text=c.localizationKey?u.toLanguageString(c.localizationKey,Wl[c.localizationKey]):c.text);let m=1===new Set(p).size?p[0]:null;null===m&&i.defaultValue&&(m=i.defaultValue);const h=b.createElement(g.DropDownList,{value:m&&s.find(e=>e.value===m),data:s,defaultItem:c,itemRender:Jl,textField:"text",dataItemKey:"value",onChange:this.onChange,style:$l,leftRightKeysNavigation:!1,title:c&&c.text,...i});return r?r.call(void 0,h,{view:l}):h}};return d.registerForLocalization(t),t}})(vr||(vr={}));const kr=e=>{const{view:t,style:l,colorPickerProps:r,commandName:o}=e,a=r.title,i=r.ariaLabel,{view:c="palette"}=r,p=d.useLocalization(),u=b.useCallback(e=>{t&&(n.applyInlineStyle({style:l,value:e.value},o)(t.state,t.dispatch),"palette"===c&&t.focus())},[t,l,c,o]);return b.createElement(s.ColorPicker,{onChange:u,onActiveColorClick:u,...r,title:a&&p.toLanguageString(a,Wl[a]),ariaLabel:i&&p.toLanguageString(i,Wl[i])})};var yr;(e=>{e.createFormatBlockDropDownList=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:r}=this.props;if(r&&n.formatBlockElements(l.value,e.commandName)(r.state,r.dispatch)){const{syntheticEvent:e}=t;e&&"click"===e.type&&r.focus()}}}render(){const{view:t,render:l,data:r,defaultItem:o,...a}=this.props,i=r||e.items;let s=o||e.defaultItem;const c=t&&t.state,p=c?n.getBlockFormats(c):[],u=d.provideLocalizationService(this);s&&s.localizationKey&&(s={...s},s.text=s.localizationKey?u.toLanguageString(s.localizationKey,Wl[s.localizationKey]):s.text);const m=1===new Set(p).size?p[0]:null,h=b.createElement(g.DropDownList,{value:m&&i.find(e=>e.value===m),onChange:this.onChange,itemRender:Jl,data:i,defaultItem:s,textField:"text",dataItemKey:"value",style:$l,leftRightKeysNavigation:!1,title:s.text,...a});return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(yr||(yr={}));const Cr=(e,t)=>{const l=class extends b.Component{render(){const{view:l,render:n,...a}=this.props,i=d.provideLocalizationService(this),s=e.messages.title,c=l&&l.state,p=!!c&&!t(c),u=b.createElement(r.Button,{onClick:p?void 0:()=>l&&t(l.state,t=>l.dispatch(t.setMeta("commandName",e.commandName))),"aria-disabled":!!p||void 0,..._l,title:i.toLanguageString(s,Wl[s]),"aria-label":i.toLanguageString(s,Wl[s]),...e.props,...a,className:o.classNames(a.className,e.props.className,{"k-disabled":p})});return n?n.call(void 0,u,{view:l}):u}};return d.registerForLocalization(l),l};var wr,Sr,xr;(e=>{e.createUndoTool=e=>Cr(e,n.undo),e.createRedoTool=e=>Cr(e,n.redo)})(wr||(wr={})),(e=>{e.createIndentTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...a}=this.props,i=a.dir,s=t&&t.state,c=s&&s.schema.nodes,p=c&&c[e.listsTypes.listItem],u=e.actions,m=!!s&&!!p&&(n.isIndented(s,u,i)||u.some(e=>c&&c[e.node]&&n.hasNode(s,c[e.node])))&&!n.hasNode(s,p),g=!!s&&n.canIndentAsListItem(s,p),h=m||g,f=d.provideLocalizationService(this),v=e.messages.title,k=!h,y=b.createElement(r.Button,{onClick:k?void 0:()=>{t&&g&&p?n.sinkListItem(p)(t.state,t.dispatch):t&&m&&n.indentBlocks(u,e.commandName,i)(t.state,t.dispatch)},"aria-disabled":!!k||void 0,title:f.toLanguageString(v,Wl[v]),"aria-label":f.toLanguageString(v,Wl[v]),..._l,...e.props,...a,className:o.classNames(a.className,e.props.className,{"k-disabled":k})});return l?l.call(void 0,y,{view:t}):y}};return d.registerForLocalization(t),t}})(Sr||(Sr={})),(e=>{e.createInlineFormatTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...o}=this.props,a=t&&t.state,{mark:i,altMarks:s,altStyle:c}=e,p={mark:i,altMarks:s,altStyle:c},u=d.provideLocalizationService(this),m=e.messages.title,g=b.createElement(r.Button,{onClick:()=>t&&n.toggleInlineFormat(p,a&&a.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),selected:!!a&&n.hasMark(a,p),togglable:!0,..._l,title:u.toLanguageString(m,Wl[m]),"aria-label":u.toLanguageString(m,Wl[m]),...e.props,...o});return l?l.call(void 0,g,{view:t}):g}};return d.registerForLocalization(t),t}})(xr||(xr={}));const Er=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:a,...i}=this.props,s=l&&l.state,c=s?s.schema.nodes[t.node]:void 0,p=d.provideLocalizationService(this),{insertImage:u}=t.messages,m=!c||!s||!n.canInsert(s,c),g=[b.createElement(r.Button,{onClick:m?void 0:this.toggleDialog,"aria-disabled":!!m||void 0,key:"insertImage",..._l,title:p.toLanguageString(u,Wl[u]),...t.props,...i,className:o.classNames(i.className,t.props.className,{"k-disabled":m})}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:l,settings:t,dir:i.dir,onClose:this.toggleDialog})||null];return a?a.call(void 0,g,{view:l}):g}};return d.registerForLocalization(l),l};var Tr,Pr,Rr;(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:a,...i}=this.props,s=l&&l.state,c=!s||s.selection.empty,p=s&&n.getMark(s,s.schema.marks[t.mark]),u=d.provideLocalizationService(this),{insertHyperlink:m}=t.messages,g=c&&!p,h=[b.createElement(r.Button,{onClick:g?void 0:this.toggleDialog,"aria-disabled":!!g||void 0,key:"link",..._l,title:u.toLanguageString(m,Wl[m]),...t.props,...i,className:o.classNames(i.className,t.props.className,{"k-disabled":g})}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:t,dir:i.dir,view:l,onClose:this.toggleDialog})||null];return a?a.call(void 0,h,{view:l}):h}};return d.registerForLocalization(l),l}})(Tr||(Tr={})),(e=>{e.createListTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...o}=this.props;let a=!1;const i=d.provideLocalizationService(this),s=e.messages.title,c=e.types,p=e.listType;if(t){const e=t.state,l=e.schema.nodes,r=n.hasNode(e,l[c.orderedList]),o=n.hasNode(e,l[c.bulletList]);a=p===c.orderedList?r&&!o:!r&&o}const u=b.createElement(r.Button,{onClick:()=>t&&n.toggleList(t.state,t.dispatch,t,{listType:p,...c},e.commandName),togglable:!0,selected:a,title:i.toLanguageString(s,Wl[s]),..._l,...e.props,...o});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t}})(Pr||(Pr={})),(e=>{e.createOutdentTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...a}=this.props,i=t&&t.state,s=a.dir,c=!!i&&n.isIndented(i,e.actions,s),p=i&&i.schema.nodes[e.listsTypes.listItem],u=!!i&&n.canOutdentAsListItem(i,{nodes:e.actions,listsTypes:e.listsTypes}),m=c||u,g=d.provideLocalizationService(this),h=e.messages.title,f=!m,v=b.createElement(r.Button,{onClick:f?void 0:()=>{t&&u&&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,Wl[h]),"aria-label":g.toLanguageString(h,Wl[h]),..._l,...e.props,...a,className:o.classNames(a.className,e.props.className,{"k-disabled":f})});return l?l.call(void 0,v,{view:t}):v}};return d.registerForLocalization(t),t}})(Rr||(Rr={}));const Ir=(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},Nr=(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 Lr,Ar,Br;(e=>{e.createAddRowBeforeTool=e=>Cr(e,n.addRowBefore),e.createAddRowAfterTool=e=>Cr(e,n.addRowAfter),e.createAddColumnBeforeTool=e=>Cr(e,n.addColumnBefore),e.createAddColumnAfterTool=e=>Cr(e,n.addColumnAfter),e.createDeleteRowTool=e=>Cr(e,Nr),e.createDeleteColumnTool=e=>Cr(e,Ir),e.createDeleteTableTool=e=>Cr(e,n.deleteTable),e.createMergeCellsTool=e=>Cr(e,n.mergeCells),e.createSplitCellTool=e=>Cr(e,n.splitCell)})(Lr||(Lr={})),(e=>{e.createUnlinkTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...a}=this.props,i={mark:e.mark},s=!!t&&n.hasMark(t.state,i),c=d.provideLocalizationService(this),p=e.messages.title,u=!s,m=b.createElement(r.Button,{onClick:u?void 0:()=>t&&n.removeLink(i,t.state.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),"aria-disabled":!!u||void 0,..._l,title:c.toLanguageString(p,Wl[p]),...e.props,...a,className:o.classNames(a.className,e.props.className,{"k-disabled":u})});return l?l.call(void 0,m,{view:t}):m}};return d.registerForLocalization(t),t}})(Ar||(Ar={})),(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:o,...n}=this.props,a=d.provideLocalizationService(this),i=t.messages.viewHtml,s=[b.createElement(r.Button,{onClick:this.toggleDialog,key:"viewHtml",..._l,title:a.toLanguageString(i,Wl[i]),...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 o?o.call(void 0,s,{view:l}):s}};return d.registerForLocalization(l),l}})(Br||(Br={}));const{print:Dr}=e.EditorToolsSettings,Mr=e=>{const{view:t,render:l,settings:n=Dr,...a}=e,i=t&&t.dom,s=i&&i.ownerDocument,c=s&&s.defaultView,p=n.messages.title,u=!c||c===window,m=b.useCallback(()=>{c&&c.print()},[c]),g=b.createElement(r.Button,{onClick:u?void 0:m,"aria-disabled":!!u||void 0,title:d.useLocalization().toLanguageString(p,Wl[p]),..._l,...n.props,...a,className:o.classNames(a.className,n.props.className,{"k-disabled":u})});return l?l.call(void 0,g,{view:t}):g},{pdf:zr,savePdfOptions:Fr}=e.EditorToolsSettings,Hr=e=>{const{view:t,render:l,settings:o=zr,savePdfOptions:n,savePdfCallback:a,...i}=e,s=o.messages.title,c=b.useCallback(()=>{t&&h.savePDF(t.dom,{...Fr,...n||{}},a)},[t,n,a]),p=b.createElement(r.Button,{onClick:c,title:d.useLocalization().toLanguageString(s,Wl[s]),..._l,...o.props,...i});return l?l.call(void 0,p,{view:t}):p},{selectAll:Wr}=e.EditorToolsSettings,Kr=e=>{const{view:t,render:l,settings:o=Wr,...a}=e,i=o.messages.title,s=b.useCallback(()=>{t&&(n.selectAll(t.state,t.dispatch),t.focus())},[t]),c=b.createElement(r.Button,{onClick:s,title:d.useLocalization().toLanguageString(i,Wl[i]),..._l,...o.props,...a});return l?l.call(void 0,c,{view:t}):c},{cleanFormatting:Ur}=e.EditorToolsSettings,Vr=n.cleanFormatting(),Or=e=>{const{view:t,render:l,settings:n=Ur,...a}=e,i=n.messages.title,s=!t||!Vr(t.state),c=b.useCallback(()=>{t&&Vr(t.state,e=>{e.setMeta("commandName",n.commandName),t.dispatch(e)})},[t]),p=b.createElement(r.Button,{onClick:s?void 0:c,"aria-disabled":!!s||void 0,title:d.useLocalization().toLanguageString(i,Wl[i]),..._l,...n.props,...a,className:o.classNames(e.className,n.props.className,{"k-disabled":s})});return l?l.call(void 0,p,{view:t}):p},qr=e.EditorToolsSettings.findAndReplace;let jr=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}=qr,n=d.provideLocalizationService(this),a=qr.messages.findReplaceToolTitle,i=!e;return[b.createElement(r.Button,{onClick:i?void 0:this.onOpen,"aria-disabled":!!i||void 0,..._l,title:n.toLanguageString(a,Wl[a]),key:"tool",...l,...t,className:o.classNames(t.className,l.className,{"k-disabled":i})}),this.state.showDialog&&e&&b.createElement(tr,{view:e,onClose:this.onClose,dir:t.dir,key:"dialog"})]}};d.registerForLocalization(jr);const _r=(e,t)=>{const{from:l,to:r}=e.selection;let o=null;return e.doc.nodesBetween(l,r,e=>(o=o||(e.type===t?e:null),!o)),o},$r=e=>{let t=!1;const l=e.view,o=Ul,a=e.listType,i=d.useLocalization();let s,c,p=[...e.items||[]];if(l){const e=l.state,r=e&&e.schema.nodes;s=r&&_r(e,r[o.orderedList]),c=r&&_r(e,r[o.bulletList]),t=!!(a===o.orderedList?s&&!c:!s&&c)}if(p=p.map(e=>({...e,text:e.textKey?i.toLanguageString(e.textKey,Wl[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(r.SplitButton,{textField:"text",items:p,icon:e.icon,svgIcon:e.svgIcon,onButtonClick:e=>{l&&(n.toggleList(l.state,l.dispatch,l,{listType:a,...o,listAttrs:{}},"InsertList"),l.focus())},onItemClick:e=>{if(l){const t=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},r=s||c;if(r&&n.listStyle(r.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[a],t))}else n.toggleList(l.state,l.dispatch,l,{listType:a,...o,listAttrs:t},"InsertList");l.focus()}},buttonClass:t?"k-selected":void 0,title:void 0!==e.title?e.title:i.toLanguageString(e.titleKey,Wl[e.titleKey])}))},Gr=/[\D]+$/,Jr=e=>{const t=e.match(Gr);return t?t[0]:""},Qr=(e,t)=>{var l;const r=Xr((null==(l=e.attrs)?void 0:l.style)||"")[t]||"";return{[t]:parseFloat(r)||null,[t+"Unit"]:Jr(r)}},Xr=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}),{}),Yr=/^.+$/;function Zr(e,t,l){let r;if(new RegExp("[^-]?"+t+":").test(e.style||"")){const{style:o}=((e,t)=>{const l=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};const n=e.split(/\s*;\s*/).filter(e=>!!e),a=n.filter(e=>{const t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===l&&r.test(t[1]))});return o&&a.push(`${l}: ${o}`),{style:a.join("; ")+(a.length?";":""),changed:!!o||a.length!==n.length}})(e.style||"",{style:t,value:Yr,newValue:l});r={...e,style:o}}else if(e.style){const o=Xr(e.style);o[t]=l,r={...e,style:Object.keys(o).filter(e=>!!o[e]).reduce((e,t)=>e+t+": "+o[t]+"; ","").trim()}}else r=l?{...e,style:t+": "+l+";"}:{...e};return r}const eo=e=>{const t=Zl(e.selection.$from,e=>"table"===e.type.name),l=Zl(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,r=[];return l.ranges.forEach(e=>{const l=e.$from.pos,o=e.$to.pos;t.nodesBetween(l,o,(e,t,l,o)=>{("table_cell"===e.type.name||"table_header"===e.type.name)&&r.push({node:e,pos:t})})}),r})(e).filter(({pos:l})=>{const r=Zl(e.doc.resolve(l),e=>"table"===e.type.name);return r&&r.depth===t.depth&&t.node.eq(r.node)}):[]},to=e=>{const t=[];if(eo(e).length){const l=e.selection.$from,r=Zl(l,e=>"table"===e.type.spec.tableRole);if(null===r)return t;const o=l.start(r.depth),a=r.node,i=n.TableMap.get(a),s=e.doc;i.map.forEach(e=>{const l=e+o;t.push({pos:l,node:s.nodeAt(l)})})}return t},lo="k-colgroup-data",ro=(e,t,l)=>{const r={cellWidth:null,widthUnit:""},o=t.node,a=l.start(t.depth);if(!o.attrs[lo])return r;const i=new Set;let s="";const c=n.htmlToFragment(o.attrs[lo]).firstChild;return e.forEach(e=>{const t=o.resolve(e.pos-a),l=t.parent,r=t.index();let n=0;for(let e=0;e<=r;e++)n+=l.child(e).attrs.colspan;const d=c.children[n-1];d&&(s=d.style.width,i.add(s))}),1===i.size&&s&&(r.cellWidth=parseFloat(s)||null,r.widthUnit=Jr(s)),r},oo=(e,t,l)=>{const r={cellHeight:null,heightUnit:""},o=t.node,n=l.start(t.depth),a=new Set;let i="";return e.forEach(e=>{var t;const l=o.resolve(e.pos-n).parent;i=Xr((null==(t=l.attrs)?void 0:t.style)||"").height||"",a.add(i)}),1===a.size&&i&&(r.cellHeight=parseFloat(i)||null,r.heightUnit=Jr(i)),r},no=(e,t)=>{const l=new Set;let r="";return e.forEach(e=>{var o;r=Xr((null==(o=e.node.attrs)?void 0:o.style)||"")[t]||"",l.add(r)}),1===l.size&&r?r:""},ao=(e,t)=>{const l=new Set;let r="";return e.forEach(e=>{r=(e.node.attrs||{})[t]||"",l.add(r)}),1===l.size&&r?r:""},io={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:""},so=e=>{const t=eo(e),l=e.selection.$from,r=t.length?Zl(l,e=>"table"===e.type.spec.tableRole):null;return r?{...io,...ro(t,r,l),...oo(t,r,l),alignment:{x:no(t,"text-align"),y:no(t,"vertical-align")},textControl:no(t,"white-space"),backgroundColor:no(t,"background-color")||void 0,cellPadding:parseFloat(no(t,"padding"))||null,borderWidth:parseFloat(no(t,"border-width"))||null,borderColor:no(t,"border-color")||void 0,borderStyle:no(t,"border-style")||null,id:ao(t,"id"),className:ao(t,"class")}:io},co=(e,t,l)=>{l.forEach(({node:l,pos:r})=>{let o={...l.attrs};o=Zr(o,"border-color",t.borderColor||""),o=Zr(o,"border-style",t.borderStyle||""),o=Zr(o,"border-width","number"==typeof t.borderWidth?t.borderWidth+"px":""),o=Zr(o,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),o=Zr(o,"background-color",t.backgroundColor||""),o=Zr(o,"text-align",t.alignment.x||""),o=Zr(o,"vertical-align",t.alignment.y||""),o=Zr(o,"white-space",t.textControl||""),o.id=t.id||null,o.class=t.className||null,e.setNodeMarkup(r,null,o),"number"==typeof t.cellWidth&&((e,t,l)=>{const r=e.doc.resolve(t),o=r.parent,a=r.index();let i=0;for(let e=0;e<=a;e++)i+=o.child(e).attrs.colspan;const s=r.node(r.depth-1),c=r.posAtIndex(0,r.depth-1)-1;let d,p=s.attrs;if(p&&p[lo]){const t=n.htmlToFragment(p[lo]).firstChild;d=t.children[i-1],d.style.width=l,p={...p,[lo]:t.outerHTML},e.setNodeMarkup(c,null,p)}else{let t=0;for(let e=0;e<o.childCount;e++)t+=o.child(e).attrs.colspan;const r=document.createElement("colgroup"),n=new Array(t);for(let e=0;e<t;e++)n[e]=document.createElement("col"),r.appendChild(n[e]);d=n[a],d.style.width=l,p={...p,[lo]:"<colgroup>"+n.reduce((e,t)=>e+t.outerHTML,"")+"</colgroup>"},e.setNodeMarkup(c,null,p)}})(e,r,t.cellWidth+(t.widthUnit||"px")),"number"==typeof t.cellHeight&&((e,t,l)=>{const r=e.doc.resolve(t),o=r.parent,n=r.posAtIndex(0)-1;e.setNodeMarkup(n,null,Zr(o.attrs,"height",l))})(e,r,t.cellHeight+(t.heightUnit||"px"))})},po=(e,t)=>{const l=e.tr,r=t.applyToAll?to(e):eo(e);return co(l,t,r),l},uo=e=>{const{view:t,...l}=e,[o,n]=b.useState(!1),i=d.useLocalization(),s=!(!t||!Zl(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]),u=b.useCallback(e=>{if(t&&e){const l=po(t.state,e);l.docChanged&&t.dispatch(l)}p()},[t,p]);return b.createElement(b.Fragment,null,b.createElement(r.Button,{type:"button",title:i.toLanguageString(Kl.cellProperties,Wl[Kl.cellProperties]),icon:"table-cell-properties",svgIcon:a.tableCellPropertiesIcon,onClick:c,disabled:!s,..._l,...l}),o&&t&&b.createElement(bo,{view:t,onCancel:p,onSave:u}))},mo=[{textKey:Kl.cellPropertiesLeftTop,text:Wl[Kl.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:a.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:Kl.cellPropertiesCenterTop,text:Wl[Kl.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:a.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:Kl.cellPropertiesRightTop,text:Wl[Kl.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:a.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:Kl.cellPropertiesLeftMiddle,text:Wl[Kl.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:a.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:Kl.cellPropertiesCenterMiddle,text:Wl[Kl.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:a.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:Kl.cellPropertiesRightMiddle,text:Wl[Kl.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:a.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:Kl.cellPropertiesLeftBottom,text:Wl[Kl.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:a.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:Kl.cellPropertiesCenterBottom,text:Wl[Kl.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:a.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:Kl.cellPropertiesRightBottom,text:Wl[Kl.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:a.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:Kl.cellPropertiesNoAlignment,text:Wl[Kl.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:a.tableAlignRemoveIcon,value:{x:"",y:""}}],go=[{textKey:Kl.cellPropertiesWrap,text:Wl[Kl.cellPropertiesWrap],value:"",icon:"text-wrap-arrow",svgIcon:a.textWrapArrowIcon},{textKey:Kl.cellPropertiesFitToCell,text:Wl[Kl.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:a.parameterStringIcon}],ho=(e,t)=>t?b.createElement(b.Fragment,null,b.createElement(s.InputPrefix,null,b.createElement(o.IconWrap,{icon:t.svgIcon,name:t.icon})),e):e,fo=(e,t)=>{const l=b.createElement(b.Fragment,null,b.createElement(s.InputPrefix,null,b.createElement(o.IconWrap,{icon:t.dataItem.svgIcon,name:t.dataItem.icon})),e.props.children);return b.cloneElement(e,e.props,l)},bo=e=>{const t=b.useMemo(()=>so(e.view.state),[e.view]),l=d.useLocalization(),o=b.useRef(null),n=t.applyToAll,a=b.useRef(null),c=t.cellWidth,p=b.useRef(null);t.widthUnit&&!Ql.includes(t.widthUnit)&&Ql.push(t.widthUnit);const u=t.widthUnit||"",m=b.useRef(null),h=t.cellHeight,f=b.useRef(null);t.heightUnit&&!Ql.includes(t.heightUnit)&&Ql.push(t.heightUnit);const v=t.heightUnit||"",k=b.useRef(null),y=mo.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=go.find(e=>e.value===t.textControl),S=b.useRef(null),x=t.backgroundColor,E=b.useRef(null),T=t.cellPadding,P=b.useRef(null),R=t.borderWidth,I=b.useRef(null),N=t.borderColor,L=b.useRef(null),A=Yl.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,r,n,i,s,c,d,u,g,h,b,v,y,w,x,T,R,N,A;const D={applyToAll:!(null==(l=null==(t=o.current)?void 0:t.element)||!l.checked),cellWidth:(null==(r=a.current)?void 0:r.value)||null,widthUnit:(null==(n=p.current)?void 0:n.value)||"",cellHeight:(null==(i=m.current)?void 0:i.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==(u=C.current)?void 0:u.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=I.current)?void 0:x.value,borderStyle:(null==(R=null==(T=L.current)?void 0:T.value)?void 0:R.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:o,defaultChecked:n})),b.createElement("label",{className:"k-checkbox-label"},l.toLanguageString(Kl.cellPropertiesApplyToAllCells,Wl[Kl.cellPropertiesApplyToAllCells])))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesWidth,Wl[Kl.cellPropertiesWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:a,defaultValue:c,min:0,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.sizeAuto])}),b.createElement("div",{className:"k-form-hint"},l.toLanguageString(Kl.cellPropertiesApplyToColumn,Wl[Kl.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:u,data:Ql,popupSettings:Xl}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesHeight,Wl[Kl.cellPropertiesHeight])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:m,defaultValue:h,min:0,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.sizeAuto])}),b.createElement("div",{className:"k-form-hint"},l.toLanguageString(Kl.cellPropertiesApplyToRow,Wl[Kl.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:Ql,popupSettings:Xl}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesAlignment,Wl[Kl.cellPropertiesAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:k,defaultValue:y,data:mo.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),textField:"text",dataItemKey:"text",popupSettings:Xl,valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesTextControl,Wl[Kl.cellPropertiesTextControl])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:C,defaultValue:w,data:go.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),textField:"text",dataItemKey:"value",popupSettings:Xl,valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesCellPadding,Wl[Kl.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(Kl.cellPropertiesBackground,Wl[Kl.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(Kl.cellPropertiesBorderWidth,Wl[Kl.cellPropertiesBorderWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:P,defaultValue:R,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesBorderColor,Wl[Kl.cellPropertiesBorderColor])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:I,defaultValue:N}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesBorderStyle,Wl[Kl.cellPropertiesBorderStyle])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:L,defaultValue:A,popupSettings:Xl,data:Yl,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(Kl.cellPropertiesId,Wl[Kl.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(Kl.cellPropertiesCssClass,Wl[Kl.cellPropertiesCssClass])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:M,defaultValue:z})))))),W=[b.createElement(r.Button,{onClick:e.onCancel,key:"cancel"},l.toLanguageString(Kl.cellPropertiesCancel,Wl[Kl.cellPropertiesCancel])),b.createElement(r.Button,{themeColor:"primary",key:"save",onClick:F},l.toLanguageString(Kl.cellPropertiesSave,Wl[Kl.cellPropertiesSave]))];return b.createElement(i.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(Kl.cellProperties,Wl[Kl.cellProperties]),onClose:e.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},H,b.createElement(i.WindowActionsBar,{layout:"end"},...W))},vo={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"},ko={left:{"margin-left":"","margin-right":"auto"},center:{"margin-left":"auto","margin-right":"auto"},right:{"margin-left":"auto","margin-right":""},"":{}},yo=e=>{const t=[];for(let l=0;l<e.height;l++){const r=l*e.width,o=r+e.width;t.push(e.map.slice(r,o))}return t},Co=e=>{let t=!0,l=!0;return e.content.forEach(e=>{e.content.forEach(e=>{const r="table_header"===e.type.name,o="table_cell"===e.type.name;r&&!e.attrs.scope&&(t=!1),(r&&!e.attrs.id||o&&!e.attrs.headers)&&(l=!1)})}),t?"scope":l?"id":"none"},wo=e=>{var t,l,r;const o=eo(e),a=e.selection.$from,i=o.length?Zl(a,e=>"table"===e.type.spec.tableRole):null;if(!i)return vo;const s=Zl(a,e=>"table_wrapper"===e.type.name);let c="",d={},p={};s&&(p=Xr(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=Xr(e.attrs.style)}}));const u=Xr((null==(t=i.node.attrs)?void 0:t.style)||""),m=n.TableMap.get(i.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,r=0;const o=yo(t);o.forEach(t=>{let r=!0;t.forEach(t=>{const l=e.nodeAt(t);l&&"table_header"!==l.type.name&&(r=!1)}),r&&l++});for(let l=0;l<t.width;l++){let n=!0;for(let r=0;r<t.height;r++){const t=o[r]&&o[r][l],a="number"==typeof t&&e.nodeAt(t);a&&"table_header"!==a.type.name&&(n=!1)}n&&r++}return{rows:l,columns:r}})(i.node,m),f=(e=>{const t=new Set;return e.content.forEach(e=>{e.content.forEach(e=>{t.add(Xr(e.attrs.style).padding||"")})}),1===t.size?Array.from(t)[0]:""})(i.node);return{...vo,columns:m.width,rows:m.height,...Qr(i.node,"width"),...s&&/%/.test(p.width||"")?Qr(s.node,"width"):{},...Qr(i.node,"height"),textAlign:u["text-align"]||"",position:g||null,cellPadding:f?parseFloat(f):null,cellSpacing:u["border-spacing"]?parseFloat(u["border-spacing"]):null,backgroundColor:u["background-color"],borderWidth:u["border-width"]?parseFloat(u["border-width"]):null,borderColor:u["border-color"],borderStyle:u["border-style"]||null,collapseBorders:"collapse"===u["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?Co(i.node):"none",id:(null==(l=i.node.attrs)?void 0:l.id)||"",className:(null==(r=i.node.attrs)?void 0:r.class)||""}},So=e=>{const t=e.lastChild.lastChild;return{node:t,pos:e.content.size-t.nodeSize}},xo=(e,t,l,r,o)=>{const a=t+So(l).pos;if(!e.doc.nodeAt(a))return e;const i=e.doc.resolve(a),s=new n.CellSelection(i,i),c=e.tr.setSelection(s);let d=e.apply(c);for(let e=0;e<r;e++)o(d,e=>{d=d.apply(e)});return d},Eo=(e,t,l,r)=>{let o=e;for(let e=0;e<l;e++){const e=o.doc.nodeAt(t);if(e){const l=t+So(e).pos,a=o.doc.resolve(l),i=new n.CellSelection(a,a),s=o.tr.setSelection(i);o=o.apply(s),r(o,e=>{o=o.apply(e)})}}return o},To=(e,t,l,r,o)=>{if(t.type.name!==r.name||Object.keys(o).length>0){const n=e.tr.setNodeMarkup(l,r,{...t.attrs,...o});return e.apply(n)}return e},Po=(e,t,l)=>{const r=e.doc.nodeAt(l),o=r&&n.TableMap.get(r);if(!r||!o)return e;const a=yo(o);let i=e;const{table_header:s,table_cell:c}=e.schema.nodes,d=String((new Date).getTime()),p=[],u=(e,t,l,r)=>{const o=[];if(r)for(let l=0;l<e;l++)p[l]&&p[l][t]&&o.push(p[l][t]);if(l)for(let l=0;l<t;l++)p[e]&&p[e][l]&&o.push(p[e][l]);return o.join(" ")};return a.forEach((e,o)=>{e.forEach((e,n)=>{const a=r.nodeAt(e);if(a){const r=n<t.headerColumns,m=o<t.headerRows,g={...a.attrs};((e,t)=>{/^cell-[0-9]+-[0-9]+$/.test(e.attrs.id||"")&&(t.id=null)})(a,g),g.headers=null,g.scope=null,m||r?("scope"===t.associateHeaders&&(g.scope=m?"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})(o,n),(n>0||o>0)&&(g.headers=u(o,n,r,m)||null)),i=To(i,a,l+e+1,s,g)):("id"===t.associateHeaders&&(g.headers=u(o,n,t.headerColumns>0,t.headerRows>0)||null),i=To(i,a,l+e+1,c,g))}})}),i},Ro=(e,t)=>n.parseContent("<p>"+e+"</p>",t).content.firstChild.content,Io=(e,t)=>{if(!e.caption)return;let l={caption:"",style:"display: table-caption"};e.captionAlignment&&(l=Zr(l,"text-align",e.captionAlignment)),e.captionPosition&&(l=Zr(l,"caption-side",e.captionPosition));const r=Ro(e.caption,t);return r&&t.nodes.table_caption_external.createAndFill(l,r)||void 0},No=e=>e.firstChild&&"table_caption_external"===e.firstChild.type.name,Lo=(e,t,l,r,o)=>{let n={state:e,pos:l};if(r||!t.position&&!t.caption)r&&(t.position||t.caption||!t.caption&&No(r.node))?(e=((e,t,l,r)=>{let o={...t.attrs};return o=Zr(o,"margin-left",""),o=Zr(o,"margin-right",""),Object.keys(r||{}).forEach(e=>{o=Zr(o,e,(r||{})[e]||"")}),e.apply(e.tr.setNodeMarkup(l,null,o))})(e,r.node,o,t.position&&ko[t.position]),e=((e,t,l,r)=>{let o,n=e;const a=l+2,i=l+1,s=n.schema;if(No(t))if(o=t.firstChild,r.caption){const e=Ro(r.caption,s);if(n=n.apply(n.tr.replaceWith(a,a+o.content.size,e)),o=n.doc.nodeAt(i),o){let e={...o.attrs};e=Zr(e,"text-align",r.captionAlignment||""),e=Zr(e,"caption-side",r.captionPosition||""),n=n.apply(n.tr.setNodeAttribute(i,"style",e.style))}}else n=n.apply(n.tr.deleteRange(a,a+o.content.size));else o=Io(r,s),o&&(n=n.apply(n.tr.replaceWith(i,i,o)));return n})(e,r.node,o,t),n={state:e,pos:o}):n=!r||t.position||t.caption?{state:e,pos:l}:{state:e,node:r.node,pos:e.selection.$from.start(r.depth)-1};else{let r={table:"",style:"display: table"};const o=[],a=t.position,i=a&&ko[a];i&&Object.keys(i).forEach(e=>{r=Zr(r,e,i[e]||"")}),"number"==typeof t.width&&"%"===t.widthUnit&&(r=Zr(r,"width",t.width+t.widthUnit));const s=Io(t,e.schema);s&&o.push(s);const c=e.doc.nodeAt(l);o.push(c);const d=e.schema.nodes.table_wrapper.createAndFill(r,o);if(d){const t=e.tr.replaceWith(l,l+c.content.size,d);n={state:e=e.apply(t),pos:l}}}const a=r&&n.state.doc.nodeAt(o);if(a){let e;"number"==typeof t.width&&"%"===t.widthUnit?e=Zr(a.attrs,"width",t.width+t.widthUnit):"%"!==t.widthUnit&&/%/.test(Xr(a.attrs.style||"").width||"")&&(e=Zr(a.attrs,"width","")),e&&(n.state=n.state.apply(n.state.tr.setNodeMarkup(o,null,e)))}return n},Ao=(e,t)=>{const l=e.selection.$from,r=Zl(l,e=>"table"===e.type.spec.tableRole);if(!r)return;const o=l.start(r.depth)-1;let a=((e,t,l,r)=>{let o=e,a=o.doc.nodeAt(t);if(!a)return o;let i=n.TableMap.get(a);return i.width===r&&i.height===l||(r>i.width?o=xo(o,t,a,r-i.width,n.addColumnAfter):r<i.width&&(o=Eo(o,t,i.width-r,Ir)),a=o.doc.nodeAt(t),!a)||(i=n.TableMap.get(a),l>i.height?o=xo(o,t,a,l-i.height,n.addRowAfter):l<i.height&&(o=Eo(o,t,i.height-l,Nr))),o})(e,o,t.rows,t.columns);if(!a)return;const i=a.tr;to(a).forEach(e=>{let l={...e.node.attrs};l=Zr(l,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),i.setNodeMarkup(e.pos,null,l)}),a=a.apply(i),a=((e,t,l)=>{const r=e.doc.nodeAt(l);if(!r)return e;let o={...r.attrs};const n=null!==t.width&&("%"!==t.widthUnit||!t.caption&&!t.position);o=Zr(o,"width",n?t.width+t.widthUnit:""),o=Zr(o,"height",null!==t.height?t.height+t.heightUnit:""),o=Zr(o,"text-align",t.textAlign||""),o=Zr(o,"background-color",t.backgroundColor||""),o=Zr(o,"border-width",t.borderWidth?t.borderWidth+"px":""),o=Zr(o,"border-style",t.borderStyle||""),o=Zr(o,"border-color",t.borderColor||""),o=Zr(o,"border-spacing",null!==t.cellSpacing?t.cellSpacing+"px":""),o=null!==t.cellSpacing?Zr(o,"border-collapse","unset"):Zr(o,"border-collapse",t.collapseBorders?"collapse":"");const a=ko[t.position||""]||{};Object.keys(a).forEach(e=>{o=Zr(o,e,a[e])}),o.id=t.id||null,o.class=t.className||null;const i=e.tr.setNodeMarkup(l,null,o);return e.apply(i)})(a,t,o),a=Po(a,t,o);const s=Zl(l,e=>"table_wrapper"===e.type.name),c=l.start((null==s?void 0:s.depth)||0)-1,d=Lo(a,t,o,s,c);a=d.state;const p=d.pos,u=a.doc.nodeAt(d.pos);if(!u)return;const m=p+(s||r).node.content.size,g=e.tr.replaceWith(p,m,u),h=n.Selection.atEnd(u),f=n.TextSelection.create(g.doc,p+h.to+1);return g.setSelection(f),g},Bo=e=>{const{view:t,...l}=e,o=d.useLocalization(),[n,i]=b.useState(!1),s=!(!t||!Zl(t.state.selection.$from,e=>"table"===e.type.spec.tableRole)),c=b.useCallback(()=>{i(!0)},[]),p=b.useCallback(()=>{i(!1),null==t||t.focus()},[t]),u=b.useCallback(e=>{if(t&&e){const l=Ao(t.state,e);l&&t.dispatch(l)}p()},[t,p]);return b.createElement(b.Fragment,null,b.createElement(r.Button,{type:"button",title:o.toLanguageString(Kl.tableProperties,Wl[Kl.tableProperties]),icon:"table-properties",svgIcon:a.tablePropertiesIcon,onClick:c,disabled:!s,..._l,...l}),n&&b.createElement(Ho,{onClose:p,onSave:u,view:t}))},Do=[{textKey:Kl.tablePropertiesAlignLeft,text:Wl[Kl.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:a.tableAlignMiddleLeftIcon},{textKey:Kl.tablePropertiesAlignCenter,text:Wl[Kl.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:a.tableAlignMiddleCenterIcon},{textKey:Kl.tablePropertiesAlignRight,text:Wl[Kl.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:a.tableAlignMiddleRightIcon},{textKey:Kl.tablePropertiesNoAlignment,text:Wl[Kl.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:a.tableAlignRemoveIcon}],Mo=[{textKey:Kl.tablePropertiesLeft,text:Wl[Kl.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:a.tablePositionStartIcon},{textKey:Kl.tablePropertiesCenter,text:Wl[Kl.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:a.tablePositionCenterIcon},{textKey:Kl.tablePropertiesRight,text:Wl[Kl.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:a.tablePositionEndIcon}].map(e=>({...e,style:ko[e.value]})),zo=[{textKey:Kl.tablePropertiesTop,text:Wl[Kl.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:a.positionTopIcon},{textKey:Kl.tablePropertiesBottom,text:Wl[Kl.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:a.positionBottomIcon}],Fo=[{textKey:Kl.tablePropertiesNone,text:Wl[Kl.tablePropertiesNone],value:"none"},{textKey:Kl.tablePropertiesUsingScopeAttribute,text:Wl[Kl.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:Kl.tablePropertiesUsingIdAttributes,text:Wl[Kl.tablePropertiesUsingIdAttributes],value:"id"}],Ho=e=>{const t=b.useMemo(()=>{const t=e.view&&e.view.state;return t?wo(t):vo},[e.view]),l=d.useLocalization(),[o,n]=b.useState(0),a=b.useCallback(e=>{n(e.selected)},[]),c=b.useRef(null),u=b.useRef(null),m=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),R=b.useRef(null),I=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,r,o,n,a,i,s,d,p,g,b,z,F,H,W,K,U,V,O;const q={rows:(null==(t=c.current)?void 0:t.value)||0,columns:(null==(l=u.current)?void 0:l.value)||0,width:m.current?m.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==(r=y.current)?void 0:r.value)||"",heightUnit:(null==(o=C.current)?void 0:o.value)||"",position:(null==(a=null==(n=w.current)?void 0:n.value)?void 0:a.value)||null,textAlign:null!=(i=S.current)&&i.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=R.current)?void 0:z.value)||""),className:String((null==(F=I.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!=(V=D.current)&&V.value?D.current.value.value:null,associateHeaders:null!=(O=M.current)&&O.value?M.current.value.value:"none"};e.onSave.call(void 0,q)},[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(Kl.tablePropertiesRows,Wl[Kl.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(Kl.tablePropertiesColumns,Wl[Kl.tablePropertiesColumns])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:u,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(Kl.tablePropertiesWidth,Wl[Kl.tablePropertiesWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:m,defaultValue:t.width,min:0,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.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:Ql,popupSettings:Xl}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesHeight,Wl[Kl.tablePropertiesHeight])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:h,defaultValue:t.height,min:0,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.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:Ql.filter(e=>"%"!==e),popupSettings:Xl}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesPosition,Wl[Kl.tablePropertiesPosition])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:w,defaultValue:Mo.find(e=>e.value===t.position),popupSettings:Xl,data:Mo.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),textField:"text",dataItemKey:"value",valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesAlignment,Wl[Kl.tablePropertiesAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:S,defaultValue:Do.find(e=>e.value===t.textAlign),data:Do.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),textField:"text",dataItemKey:"value",popupSettings:Xl,valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesCellSpacing,Wl[Kl.tablePropertiesCellSpacing])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:f,defaultValue:t.cellSpacing,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.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(Kl.tablePropertiesCellPadding,Wl[Kl.tablePropertiesCellPadding])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:v,defaultValue:t.cellPadding,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.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(Kl.tablePropertiesTableBackground,Wl[Kl.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(Kl.tablePropertiesBorderWidth,Wl[Kl.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(Kl.tablePropertiesBorderColor,Wl[Kl.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(Kl.tablePropertiesBorderStyle,Wl[Kl.tablePropertiesBorderStyle])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:x,defaultValue:Yl.find(e=>e.value===t.borderStyle),popupSettings:Xl,data:Yl.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(Kl.tablePropertiesCollapseBorders,Wl[Kl.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(Kl.tablePropertiesId,Wl[Kl.tablePropertiesId])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:R,defaultValue:t.id}))),b.createElement("div",{className:"k-form-field"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesCssClass,Wl[Kl.tablePropertiesCssClass])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:I,defaultValue:t.className}))),b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("legend",{className:"k-form-legend"},l.toLanguageString(Kl.tablePropertiesAccessibility,Wl[Kl.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(Kl.tablePropertiesCaption,Wl[Kl.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(Kl.tablePropertiesCaptionPosition,Wl[Kl.tablePropertiesCaptionPosition])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:D,defaultValue:zo.find(e=>e.value===t.captionPosition),data:zo.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),popupSettings:Xl,textField:"text",dataItemKey:"value",valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesCaptionAlignment,Wl[Kl.tablePropertiesCaptionAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:B,defaultValue:Do.find(e=>e.value===t.captionAlignment),data:Do.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),popupSettings:Xl,textField:"text",dataItemKey:"value",valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesHeaderRows,Wl[Kl.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(Kl.tablePropertiesHeaderCols,Wl[Kl.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(Kl.tablePropertiesAssociateHeaders,Wl[Kl.tablePropertiesAssociateHeaders])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:M,defaultValue:Fo.find(e=>e.value===t.associateHeaders),data:Fo.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),popupSettings:Xl,textField:"text",dataItemKey:"value"})))))))),W=b.createElement(p.TabStrip,{selected:o,onSelect:a,animation:!1,keepTabsMounted:!0},b.createElement(p.TabStripTab,{title:l.toLanguageString(Kl.tablePropertiesGeneral,Wl[Kl.tablePropertiesGeneral])},F),b.createElement(p.TabStripTab,{title:l.toLanguageString(Kl.tablePropertiesAdvanced,Wl[Kl.tablePropertiesAdvanced])},H)),K=[b.createElement(r.Button,{onClick:e.onClose,key:"cancel"},l.toLanguageString(Kl.tablePropertiesCancel,Wl[Kl.tablePropertiesCancel])),b.createElement(r.Button,{themeColor:"primary",key:"save",onClick:z},l.toLanguageString(Kl.tablePropertiesSave,Wl[Kl.tablePropertiesSave]))];return b.createElement(i.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(Kl.tableProperties,Wl[Kl.tableProperties]),onClose:e.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},W,b.createElement(i.WindowActionsBar,{layout:"end"},...K))};e.EditorTools=void 0,(t=>{function l(e){return br(e)}t.createAlignTool=l;class r extends(l(e.EditorToolsSettings.alignLeft)){}t.AlignLeft=r;class o extends(l(e.EditorToolsSettings.alignRight)){}t.AlignRight=o;class n extends(l(e.EditorToolsSettings.alignCenter)){}t.AlignCenter=n;class i extends(l(e.EditorToolsSettings.alignJustify)){}function s(e){return hr.createInsertTableTool(e)}t.AlignJustify=i,t.createInsertTableTool=s;class c extends(s(e.EditorToolsSettings.insertTable)){}t.InsertTable=c;class d extends gr.InsertTablePopup{}function p(e){return vr.createStyleDropDownList(e)}t.InsertTablePopup=d,t.createStyleDropDownList=p;class u extends(p(e.EditorToolsSettings.fontSize)){}t.FontSize=u;class m extends(p(e.EditorToolsSettings.fontName)){}function g(e){return yr.createFormatBlockDropDownList(e)}t.FontName=m,t.ForeColor=t=>b.createElement(kr,{...e.EditorToolsSettings.foreColor,...t}),t.BackColor=t=>b.createElement(kr,{...e.EditorToolsSettings.backColor,...t}),t.createFormatBlockDropDownList=g;class h extends(g(e.EditorToolsSettings.formatBlock)){}function f(e){return wr.createUndoTool(e)}function v(e){return wr.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 Sr.createIndentTool(e)}t.Redo=y,t.createIndentTool=C;class w extends(C(e.EditorToolsSettings.indent)){}function S(e){return xr.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 R extends(S(e.EditorToolsSettings.subscript)){}t.Subscript=R;class I extends(S(e.EditorToolsSettings.superscript)){}function N(e){return Er(e)}t.Superscript=I,t.createInsertImageTool=N;class L extends(N(e.EditorToolsSettings.image)){}function A(e){return Tr.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 Pr.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 Rr.createOutdentTool(e)}t.UnorderedList=F,t.BulletedList=t=>{const l=[{icon:"list-unordered",svgIcon:a.listUnorderedIcon,textKey:Kl.listStyleDisc,style:"disc"},{icon:"list-unordered",svgIcon:a.listUnorderedIcon,textKey:Kl.listStyleCircle,style:"circle"},{icon:"list-unordered-square",svgIcon:a.listUnorderedSquareIcon,textKey:Kl.listStyleSquare,style:"square"}];return b.createElement($r,{listType:e.EditorToolsSettings.bulletList.listType,items:l,icon:"list-unordered",svgIcon:a.listUnorderedIcon,titleKey:e.EditorToolsSettings.bulletList.messages.title,...t})},t.NumberedList=t=>{const l=[{icon:"list-ordered",svgIcon:a.listOrderedIcon,textKey:Kl.listStyleDecimal},{icon:"list-roman-upper",svgIcon:a.listRomanUpperIcon,textKey:Kl.listStyleUpperRoman,style:"upper-roman"},{icon:"list-roman-lower",svgIcon:a.listRomanLowerIcon,textKey:Kl.listStyleLowerRoman,style:"lower-roman"},{icon:"list-latin-big",svgIcon:a.listLatinBigIcon,textKey:Kl.listStyleUpperLatin,style:"upper-latin"},{icon:"list-latin-small",svgIcon:a.listLatinSmallIcon,textKey:Kl.listStyleLowerLatin,style:"lower-latin"}];return b.createElement($r,{listType:e.EditorToolsSettings.orderedList.listType,items:l,icon:"list-ordered",svgIcon:a.listOrderedIcon,titleKey:e.EditorToolsSettings.orderedList.messages.title,...t})},t.TableCellProperties=uo,t.TableProperties=Bo,t.createOutdentTool=H;class W extends(H(e.EditorToolsSettings.outdent)){}function K(e){return Lr.createAddRowBeforeTool(e)}function U(e){return Lr.createAddRowAfterTool(e)}function V(e){return Lr.createAddColumnBeforeTool(e)}function O(e){return Lr.createAddColumnAfterTool(e)}function q(e){return Lr.createDeleteRowTool(e)}function j(e){return Lr.createDeleteColumnTool(e)}function _(e){return Lr.createDeleteTableTool(e)}function $(e){return Lr.createMergeCellsTool(e)}function G(e){return Lr.createSplitCellTool(e)}t.Outdent=W,t.Print=e=>b.createElement(Mr,{...e}),t.Pdf=e=>b.createElement(Hr,{...e}),t.SelectAll=e=>b.createElement(Kr,{...e}),t.CleanFormatting=e=>b.createElement(Or,{...e}),t.createAddRowBeforeTool=K,t.createAddRowAfterTool=U,t.createAddColumnBeforeTool=V,t.createAddColumnAfterTool=O,t.createDeleteRowTool=q,t.createDeleteColumnTool=j,t.createDeleteTableTool=_,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(V(e.EditorToolsSettings.addColumnBefore)){}t.AddColumnBefore=X;class Y extends(O(e.EditorToolsSettings.addColumnAfter)){}t.AddColumnAfter=Y;class Z extends(q(e.EditorToolsSettings.deleteRow)){}t.DeleteRow=Z;class ee extends(j(e.EditorToolsSettings.deleteColumn)){}t.DeleteColumn=ee;class te extends(_(e.EditorToolsSettings.deleteTable)){}t.DeleteTable=te;class le extends($(e.EditorToolsSettings.mergeCells)){}t.MergeCells=le;class re extends(G(e.EditorToolsSettings.splitCell)){}function oe(e){return Ar.createUnlinkTool(e)}t.SplitCell=re,t.createUnlinkTool=oe;class ne extends(oe(e.EditorToolsSettings.unlink)){}function ae(e){return Br.createViewHtmlTool(e)}t.Unlink=ne,t.createViewHtmlTool=ae;class ie extends(ae(e.EditorToolsSettings.viewHtml)){}t.ViewHtml=ie;t.FindAndReplace=class extends jr{}})(e.EditorTools||(e.EditorTools={}));const Wo=e.EditorUtils.getHtml,Ko={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,"nodes",{enumerable:!0,get:function(){return n.nodes}}),e.Editor=ur,e.ProseMirror=Ko,e.editorPropsKey=ql,e.getHtml=Wo,e.marks=k,e.parseContent=x});
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,r,o,n,a,i,s,c,d,p,u,m,g,h){"use strict";function f(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(l){if("default"!==l){var r=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,r.get?r:{enumerable:!0,get:function(){return e[l]}})}}),t.default=e,Object.freeze(t)}var b=f(t);const v=e=>{const t=(e.parseDOM||[]).map(e=>({...e,getAttrs:t=>{const l="function"==typeof e.getAttrs?e.getAttrs(t):{};return l&&"object"==typeof l&&"href"in l&&(l.href=o.sanitizeUrl(l.href)||null),l}})),l=e.toDOM;return{...e,parseDOM:t,toDOM:"function"==typeof l?(e,t)=>{var r;return l({...e,attrs:{...e.attrs,href:o.sanitizeUrl(null==(r=e.attrs)?void 0:r.href)||null}},t)}:l}},k={...n.marks,link:v(n.marks.link)},y=new WeakMap,C=new WeakMap,w=e=>{const t=y.get(e);if(t)return t;const l=e.spec.marks.get("link");if(!l)return y.set(e,e),e;const r=new n.Schema({...e.spec,marks:e.spec.marks.update("link",v(l))});return y.set(e,r),y.set(r,r),r},S=e=>{const t=e.marks.map(e=>"link"===e.type.name?e.type.create({...e.attrs,href:o.sanitizeUrl(e.attrs.href)||null}):e);if(e.isText)return e.mark(t);const l=[];return e.forEach(e=>l.push(S(e))),e.copy(n.Fragment.fromArray(l)).mark(t)},x=(e,t,l)=>S(n.parseContent(e,t,l)),E=e=>{const t=C.get(e);if(t)return t;const l=w(e.type.schema),r=S(l===e.type.schema?e:l.nodeFromJSON(e.toJSON()));return C.set(e,r),C.set(r,r),r},T='\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',P='\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',R="editor.bold",I="editor.italic",N="editor.underline",L="editor.strikethrough",A="editor.subscript",B="editor.superscript",D="editor.hyperlink",M="editor.insertFile",z="editor.print",F="editor.selectAll",H="editor.cleanFormatting",W="editor.pdf",K="editor.foregroundColor",U="editor.backgroundColor",V="editor.createTable",O="editor.insertTableHint",q="editor.addRowBefore",j="editor.addRowAfter",_="editor.addColumnBefore",$="editor.addColumnAfter",G="editor.deleteRow",J="editor.deleteColumn",Q="editor.deleteTable",X="editor.mergeCells",Y="editor.splitCell",Z="editor.hyperlink-dialog-title",ee="editor.hyperlink-dialog-content-address",te="editor.hyperlink-dialog-content-title",le="editor.hyperlink-dialog-content-newwindow",re="editor.hyperlink-dialog-cancel",oe="editor.hyperlink-dialog-insert",ne="editor.insertfile-dialog-title",ae="editor.insertfile-dialog-content-address",ie="editor.insertfile-dialog-content-title",se="editor.insertfile-dialog-cancel",ce="editor.insertfile-dialog-insert",de="editor.image",pe="editor.image-dialog-title",ue="editor.image-address",me="editor.image-title",ge="editor.image-altText",he="editor.image-width",fe="editor.image-height",be="editor.image-cancel",ve="editor.image-insert",ke="editor.viewHtml",ye="editor.viewHtml-dialog-title",Ce="editor.viewHtml-cancel",we="editor.viewHtml-update",Se="editor.unlink",xe="editor.undo",Ee="editor.redo",Te="editor.fontSize",Pe="editor.fontName",Re="editor.format",Ie="editor.alignLeft",Ne="editor.alignRight",Le="editor.alignCenter",Ae="editor.alignJustify",Be="editor.indent",De="editor.outdent",Me="editor.orderedList",ze="editor.bulletList",Fe="editor.findReplace-tool-title",He="editor.findReplace-dialog-title",We="editor.findReplace-tab-find",Ke="editor.findReplace-tab-replace",Ue="editor.findReplace-findWhat",Ve="editor.findReplace-replaceWith",Oe="editor.findReplace-replace",qe="editor.findReplace-replaceAll",je="editor.findReplace-matchCase",_e="editor.findReplace-matchWord",$e="editor.findReplace-matchCyclic",Ge="editor.findReplace-useRegExp",Je="editor.findReplace-prevMatch",Qe="editor.findReplace-nextMatch",Xe="editor.findReplace-matches",Ye="editor.findReplace-invalidRegExp",Ze="editor.iframeTitle",et="editor.contentAreaLabel",tt="editorTools.foreColorLabel",lt="editorTools.backColorLabel",rt="editor.cellProperties",ot="editor.cellPropertiesLeftTop",nt="editor.cellPropertiesCenterTop",at="editor.cellPropertiesRightTop",it="editor.cellPropertiesLeftMiddle",st="editor.cellPropertiesCenterMiddle",ct="editor.cellPropertiesRightMiddle",dt="editor.cellPropertiesLeftBottom",pt="editor.cellPropertiesCenterBottom",ut="editor.cellPropertiesRightBottom",mt="editor.cellPropertiesNoAlignment",gt="editor.cellPropertiesWrap",ht="editor.cellPropertiesFitToCell",ft="editor.cellPropertiesApplyToAllCells",bt="editor.cellPropertiesWidth",vt="editor.cellPropertiesApplyToColumn",kt="editor.cellPropertiesHeight",yt="editor.cellPropertiesApplyToRow",Ct="editor.cellPropertiesAlignment",wt="editor.cellPropertiesTextControl",St="editor.cellPropertiesCellPadding",xt="editor.cellPropertiesBackground",Et="editor.cellPropertiesBorderWidth",Tt="editor.cellPropertiesBorderColor",Pt="editor.cellPropertiesBorderStyle",Rt="editor.cellPropertiesId",It="editor.cellPropertiesCssClass",Nt="editor.cellPropertiesSave",Lt="editor.cellPropertiesCancel",At="editor.tableProperties",Bt="editor.tablePropertiesAlignLeft",Dt="editor.tablePropertiesAlignCenter",Mt="editor.tablePropertiesAlignRight",zt="editor.tablePropertiesNoAlignment",Ft="editor.tablePropertiesLeft",Ht="editor.tablePropertiesCenter",Wt="editor.tablePropertiesRight",Kt="editor.tablePropertiesTop",Ut="editor.tablePropertiesBottom",Vt="editor.tablePropertiesNone",Ot="editor.tablePropertiesUsingScopeAttribute",qt="editor.tablePropertiesUsingIdAttributes",jt="editor.tablePropertiesRows",_t="editor.tablePropertiesColumns",$t="editor.tablePropertiesWidth",Gt="editor.tablePropertiesHeight",Jt="editor.tablePropertiesPosition",Qt="editor.tablePropertiesAlignment",Xt="editor.tablePropertiesCellSpacing",Yt="editor.tablePropertiesCellPadding",Zt="editor.tablePropertiesTableBackground",el="editor.tablePropertiesBorderWidth",tl="editor.tablePropertiesBorderColor",ll="editor.tablePropertiesBorderStyle",rl="editor.tablePropertiesCollapseBorders",ol="editor.tablePropertiesID",nl="editor.tablePropertiesCssClass",al="editor.tablePropertiesAccessibility",il="editor.tablePropertiesCaption",sl="editor.tablePropertiesCaptionPosition",cl="editor.tablePropertiesCaptionAlignment",dl="editor.tablePropertiesHeaderRows",pl="editor.tablePropertiesHeaderCols",ul="editor.tablePropertiesAssociateHeaders",ml="editor.tablePropertiesGeneral",gl="editor.tablePropertiesAdvanced",hl="editor.tablePropertiesSave",fl="editor.tablePropertiesCancel",bl="editor.borderStyleNone",vl="editor.borderStyleSolid",kl="editor.borderStyleDotted",yl="editor.borderStyleDashed",Cl="editor.borderStyleDouble",wl="editor.borderStyleGroove",Sl="editor.borderStyleRidge",xl="editor.borderStyleInset",El="editor.borderStyleOutset",Tl="editor.borderStyleInitial",Pl="editor.borderStyleInherit",Rl="editor.borderStyleHidden",Il="editor.sizeAuto",Nl="editor.listStyleDisc",Ll="editor.listStyleCircle",Al="editor.listStyleSquare",Bl="editor.listStyleDecimal",Dl="editor.listStyleUpperRoman",Ml="editor.listStyleLowerRoman",zl="editor.listStyleUpperLatin",Fl="editor.listStyleLowerLatin",Hl="editor.toolbarAriaLabel",Wl={[R]:"Bold",[I]:"Italic",[N]:"Underline",[L]:"Strikethrough",[A]:"Subscript",[B]:"Superscript",[Se]:"Remove hyperlink",[xe]:"Undo",[Ee]:"Redo",[Te]:"Font Size",[Pe]:"Font Name",[Re]:"Format",[Ie]:"Align text left",[Ne]:"Align text right",[Le]:"Center text",[Ae]:"Justify",[Be]:"Indent",[De]:"Outdent",[Me]:"Insert ordered list",[ze]:"Insert unordered list",[z]:"Print",[F]:"Select All",[H]:"Clean formatting",[W]:"Export as PDF",[K]:"Color",[U]:"Background color",[V]:"Create a table",[O]:"Create a {0} x {1} table",[q]:"Add row above",[j]:"Add row below",[_]:"Add column on the left",[$]:"Add column on the right",[G]:"Delete row",[J]:"Delete column",[Q]:"Delete table",[X]:"Merge cells",[Y]:"Split cell",[D]:"Insert hyperlink",[Z]:"Insert hyperlink",[ee]:"Web address",[te]:"Title",[le]:"Open link in new window",[re]:"Cancel",[oe]:"Insert",[M]:"Insert file",[ne]:"Insert file",[ae]:"Web address",[ie]:"Title",[se]:"Cancel",[ce]:"Insert",[de]:"Insert image",[pe]:"Insert image",[ue]:"Web address",[me]:"Title",[ge]:"Alternate text",[he]:"Width (px)",[fe]:"Height (px)",[be]:"Cancel",[ve]:"Insert",[ke]:"View HTML",[ye]:"View HTML",[Ce]:"Cancel",[we]:"Update",[Fe]:"Find and Replace",[He]:"Find and Replace",[We]:"Find",[Ke]:"Replace",[Ue]:"Find What:",[Ve]:"Replace With",[Oe]:"Replace",[qe]:"Replace All",[je]:"Match Case",[_e]:"Match whole word only",[$e]:"Match cyclic (Wrap around)",[Ge]:"Regular Expression",[Je]:"Prev",[Qe]:"Next",[Xe]:"{0} of {1} matches",[Ye]:"Invalid regular expression.",[Ze]:"Editable area. Press Alt + F10 for toolbar.",[et]:"Editor content",[tt]:"Fore Color",[lt]:"Back Color",[rt]:"Cell properties",[ot]:"Left Top",[nt]:"Center Top",[at]:"Right Top",[it]:"Left Middle",[st]:"Center Middle",[ct]:"Right Middle",[dt]:"Left Bottom",[pt]:"Center Bottom",[ut]:"Right Bottom",[mt]:"No Alignment",[gt]:"Wrap",[ht]:"Fit to cell",[ft]:"Apply to all cells",[bt]:"Width",[vt]:"apply to column",[kt]:"Height",[yt]:"apply to row",[Ct]:"Alignment",[wt]:"Text control",[St]:"Cell padding",[xt]:"Background",[Et]:"Border width",[Tt]:"Border color",[Pt]:"Border style",[Rt]:"ID",[It]:"CSS class",[Nt]:"Save",[Lt]:"Cancel",[At]:"Table properties",[Bt]:"Align Left",[Dt]:"Align Center",[Mt]:"Align Right",[zt]:"No Alignment",[Ft]:"Left",[Ht]:"Center",[Wt]:"Right",[Kt]:"Top",[Ut]:"Bottom",[Vt]:"None",[Ot]:"Using 'scope' attribute",[qt]:"Using 'id' attributes",[jt]:"Rows",[_t]:"Columns",[$t]:"Width",[Gt]:"Height",[Jt]:"Position",[Qt]:"Alignment",[Xt]:"Cell spacing",[Yt]:"Cell padding",[Zt]:"Table background",[el]:"Border width",[tl]:"Border color",[ll]:"Border style",[rl]:"Collapse borders",[ol]:"ID",[nl]:"CSS class",[al]:"Accessibility",[il]:"Caption",[sl]:"Position",[cl]:"Alignment",[dl]:"Header rows",[pl]:"Header cols",[ul]:"Associate headers",[ml]:"General",[gl]:"Advanced",[hl]:"Save",[fl]:"Cancel",[bl]:"None",[vl]:"Solid",[kl]:"Dotted",[yl]:"Dashed",[Cl]:"Double",[wl]:"Groove",[Sl]:"Ridge",[xl]:"Inset",[El]:"Outset",[Tl]:"Initial",[Pl]:"Inherit",[Rl]:"Hidden",[Il]:"Auto",[Nl]:"Disc",[Ll]:"Circle",[Al]:"Square",[Bl]:"Decimal",[Dl]:"Upper roman",[Ml]:"Lower roman",[zl]:"Upper latin",[Fl]:"Lower latin",[Hl]:"Toolbar"},Kl={bold:R,italic:I,underline:N,strikethrough:L,subscript:A,superscript:B,unlink:Se,undo:xe,redo:Ee,fontSize:Te,fontName:Pe,format:Re,alignLeft:Ie,alignRight:Ne,alignCenter:Le,alignJustify:Ae,indent:Be,outdent:De,orderedList:Me,bulletList:ze,print:z,selectAll:F,cleanFormatting:H,pdf:W,foregroundColor:K,backgroundColor:U,createTable:V,createTableHint:O,addRowBefore:q,addRowAfter:j,addColumnBefore:_,addColumnAfter:$,deleteRow:G,deleteColumn:J,deleteTable:Q,mergeCells:X,splitCell:Y,insertHyperlink:D,insertHyperlinkDialogTitle:Z,insertHyperlinkAddress:ee,insertHyperlinkTitle:te,insertHyperlinkNewWindow:le,insertHyperlinkCancel:re,insertHyperlinkInsert:oe,insertFile:M,insertFileDialogTitle:ne,insertFileAddress:ae,insertFileTitle:ie,insertFileCancel:se,insertFileInsert:ce,insertImage:de,insertImageDialogTitle:pe,insertImageAddress:ue,insertImageTitle:me,insertImageAltText:ge,insertImageWidth:he,insertImageHeight:fe,insertImageCancel:be,insertImageInsert:ve,viewHtml:ke,viewHtmlDialogTitle:ye,viewHtmlCancel:Ce,viewHtmlUpdate:we,findReplaceToolTitle:Fe,findReplaceDialogTitle:He,findReplaceTabFind:We,findReplaceTabReplace:Ke,findReplaceFindWhat:Ue,findReplaceReplaceWith:Ve,findReplaceReplace:Oe,findReplaceReplaceAll:qe,findReplaceMatchCase:je,findReplaceMatchWord:_e,findReplaceMatchCyclic:$e,findReplaceUseRegExp:Ge,findReplacePrevMatch:Je,findReplaceNextMatch:Qe,findReplaceMatches:Xe,findReplaceInvalidRegExp:Ye,iframeTitle:Ze,contentAreaLabel:et,foreColorLabel:tt,backColorLabel:lt,cellProperties:rt,cellPropertiesLeftTop:ot,cellPropertiesCenterTop:nt,cellPropertiesRightTop:at,cellPropertiesLeftMiddle:it,cellPropertiesCenterMiddle:st,cellPropertiesRightMiddle:ct,cellPropertiesLeftBottom:dt,cellPropertiesCenterBottom:pt,cellPropertiesRightBottom:ut,cellPropertiesNoAlignment:mt,cellPropertiesWrap:gt,cellPropertiesFitToCell:ht,cellPropertiesApplyToAllCells:ft,cellPropertiesWidth:bt,cellPropertiesApplyToColumn:vt,cellPropertiesHeight:kt,cellPropertiesApplyToRow:yt,cellPropertiesAlignment:Ct,cellPropertiesTextControl:wt,cellPropertiesCellPadding:St,cellPropertiesBackground:xt,cellPropertiesBorderWidth:Et,cellPropertiesBorderColor:Tt,cellPropertiesBorderStyle:Pt,cellPropertiesId:Rt,cellPropertiesCssClass:It,cellPropertiesSave:Nt,cellPropertiesCancel:Lt,tableProperties:At,tablePropertiesAlignLeft:Bt,tablePropertiesAlignCenter:Dt,tablePropertiesAlignRight:Mt,tablePropertiesNoAlignment:zt,tablePropertiesLeft:Ft,tablePropertiesCenter:Ht,tablePropertiesRight:Wt,tablePropertiesTop:Kt,tablePropertiesBottom:Ut,tablePropertiesNone:Vt,tablePropertiesUsingScopeAttribute:Ot,tablePropertiesUsingIdAttributes:qt,tablePropertiesRows:jt,tablePropertiesColumns:_t,tablePropertiesWidth:$t,tablePropertiesHeight:Gt,tablePropertiesPosition:Jt,tablePropertiesAlignment:Qt,tablePropertiesCellSpacing:Xt,tablePropertiesCellPadding:Yt,tablePropertiesTableBackground:Zt,tablePropertiesBorderWidth:el,tablePropertiesBorderColor:tl,tablePropertiesBorderStyle:ll,tablePropertiesCollapseBorders:rl,tablePropertiesId:ol,tablePropertiesCssClass:nl,tablePropertiesAccessibility:al,tablePropertiesCaption:il,tablePropertiesCaptionPosition:sl,tablePropertiesCaptionAlignment:cl,tablePropertiesHeaderRows:dl,tablePropertiesHeaderCols:pl,tablePropertiesAssociateHeaders:ul,tablePropertiesGeneral:ml,tablePropertiesAdvanced:gl,tablePropertiesSave:hl,tablePropertiesCancel:fl,borderStyleNone:bl,borderStyleSolid:vl,borderStyleDotted:kl,borderStyleDashed:yl,borderStyleDouble:Cl,borderStyleGroove:wl,borderStyleRidge:Sl,borderStyleInset:xl,borderStyleOutset:El,borderStyleInitial:Tl,borderStyleInherit:Pl,borderStyleHidden:Rl,sizeAuto:Il,listStyleDisc:Nl,listStyleCircle:Ll,listStyleSquare:Al,listStyleDecimal:Bl,listStyleUpperRoman:Dl,listStyleLowerRoman:Ml,listStyleUpperLatin:zl,listStyleLowerLatin:Fl,toolbarAriaLabel:Hl},Ul={...n.indentRules.listsTypes};e.EditorToolsSettings=void 0,(e=>{const t={type:"button"};e.bold={...n.bold,props:{icon:"bold",svgIcon:a.boldIcon,...t},messages:{title:Kl.bold},commandName:"Bold"},e.italic={...n.italic,props:{icon:"italic",svgIcon:a.italicIcon,...t},messages:{title:Kl.italic},commandName:"Italic"},e.underline={...n.underline,props:{icon:"underline",svgIcon:a.underlineIcon,...t},messages:{title:Kl.underline},commandName:"Underline"},e.strikethrough={...n.strikethrough,props:{icon:"strikethrough",svgIcon:a.strikethroughIcon,...t},messages:{title:Kl.strikethrough},commandName:"Strikethrough"},e.subscript={...n.subscript,props:{icon:"subscript",svgIcon:a.subscriptIcon,...t},messages:{title:Kl.subscript},commandName:"Subscript"},e.superscript={...n.superscript,props:{icon:"superscript",svgIcon:a.superscriptIcon,...t},messages:{title:Kl.superscript},commandName:"Superscript"},e.link={...n.link,props:{icon:"link",svgIcon:a.linkIcon,...t},messages:{insertHyperlink:Kl.insertHyperlink,insertHyperlinkDialogTitle:Kl.insertHyperlinkDialogTitle,insertHyperlinkAddress:Kl.insertHyperlinkAddress,insertHyperlinkTitle:Kl.insertHyperlinkTitle,insertHyperlinkNewWindow:Kl.insertHyperlinkNewWindow,insertHyperlinkCancel:Kl.insertHyperlinkCancel,insertHyperlinkInsert:Kl.insertHyperlinkInsert},commandName:"Link"},e.insertFile={...n.link,props:{icon:"file-add",svgIcon:a.fileAddIcon,...t},messages:{insertHyperlink:Kl.insertFile,insertHyperlinkDialogTitle:Kl.insertFileDialogTitle,insertHyperlinkAddress:Kl.insertFileAddress,insertHyperlinkTitle:Kl.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:Kl.insertFileCancel,insertHyperlinkInsert:Kl.insertFileInsert},commandName:"InsertFile",linkTarget:!1},e.insertTable={props:{icon:"table-add",svgIcon:a.tableAddIcon,...t},messages:{createTable:Kl.createTable,createTableHint:Kl.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:a.tableRowInsertAboveIcon,...t},messages:{title:Kl.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:a.tableRowInsertBelowIcon,...t},messages:{title:Kl.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:a.tableColumnInsertLeftIcon,...t},messages:{title:Kl.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:a.tableColumnInsertRightIcon,...t},messages:{title:Kl.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:{icon:"table-row-delete",svgIcon:a.tableRowDeleteIcon,...t},messages:{title:Kl.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:{icon:"table-column-delete",svgIcon:a.tableColumnDeleteIcon,...t},messages:{title:Kl.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:{icon:"table-delete",svgIcon:a.tableDeleteIcon,...t},messages:{title:Kl.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:{icon:"cells-merge",svgIcon:a.cellsMergeIcon,...t},messages:{title:Kl.mergeCells},commandName:"MergeCells"},e.splitCell={props:{icon:"cell-split-horizontally",svgIcon:a.cellSplitHorizontallyIcon,...t},messages:{title:Kl.splitCell},commandName:"SplitCell"},e.print={props:{icon:"print",svgIcon:a.printIcon,...t},messages:{title:Kl.print}},e.selectAll={props:{icon:"select-all",svgIcon:a.selectAllIcon,...t},messages:{title:Kl.selectAll}},e.pdf={props:{icon:"file-pdf",svgIcon:a.filePdfIcon,...t},messages:{title:Kl.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:{icon:"clear-css",svgIcon:a.clearCssIcon,...t},messages:{title:Kl.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:{icon:"image",svgIcon:a.imageIcon,...t},messages:{insertImage:Kl.insertImage,insertImageDialogTitle:Kl.insertImageDialogTitle,insertImageAddress:Kl.insertImageAddress,insertImageTitle:Kl.insertImageTitle,insertImageAltText:Kl.insertImageAltText,insertImageWidth:Kl.insertImageWidth,insertImageHeight:Kl.insertImageHeight,insertImageCancel:Kl.insertImageCancel,insertImageInsert:Kl.insertImageInsert},commandName:"InsertImage"},e.viewHtml={props:{icon:"code",svgIcon:a.codeIcon,...t},messages:{viewHtml:Kl.viewHtml,viewHtmlDialogTitle:Kl.viewHtmlDialogTitle,viewHtmlCancel:Kl.viewHtmlCancel,viewHtmlUpdate:Kl.viewHtmlUpdate},commandName:"SetContent"},e.findAndReplace={props:{icon:"find",svgIcon:a.binocularsIcon,...t},messages:{findReplaceToolTitle:Kl.findReplaceToolTitle,findReplaceDialogTitle:Kl.findReplaceDialogTitle,findReplaceTabFind:Kl.findReplaceTabFind,findReplaceTabReplace:Kl.findReplaceTabReplace,findReplaceFindWhat:Kl.findReplaceFindWhat,findReplaceReplaceWith:Kl.findReplaceReplaceWith,findReplaceReplace:Kl.findReplaceReplace,findReplaceReplaceAll:Kl.findReplaceReplaceAll,findReplaceMatchCase:Kl.findReplaceMatchCase,findReplaceMatchWord:Kl.findReplaceMatchWord,findReplaceMatchCyclic:Kl.findReplaceMatchCyclic,findReplaceUseRegExp:Kl.findReplaceUseRegExp,findReplacePrevMatch:Kl.findReplacePrevMatch,findReplaceNextMatch:Kl.findReplaceNextMatch,findReplaceMatches:Kl.findReplaceMatches,findReplaceInvalidRegExp:Kl.findReplaceInvalidRegExp}},e.unlink={...n.link,props:{icon:"unlink",svgIcon:a.unlinkIcon,...t},messages:{title:Kl.unlink},commandName:"Unlink"},e.undo={props:{icon:"undo",svgIcon:a.undoIcon,...t},messages:{title:Kl.undo},commandName:"Undo"},e.redo={props:{icon:"redo",svgIcon:a.redoIcon,...t},messages:{title:Kl.redo},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:Wl[Kl.fontSize],value:"",localizationKey:Kl.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:Wl[Kl.fontName],value:"",localizationKey:Kl.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:Wl[Kl.format],value:"",localizationKey:Kl.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:a.foregroundColorIcon,view:"palette",title:Kl.foregroundColor,ariaLabel:Kl.foreColorLabel},commandName:"ForeColor"},e.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:a.dropletIcon,view:"palette",title:Kl.backgroundColor,ariaLabel:Kl.backColorLabel},commandName:"BackColor"},e.alignLeft={actions:[...n.alignLeftRules],props:{icon:"align-left",svgIcon:a.alignLeftIcon,...t},messages:{title:Kl.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:[...n.alignRightRules],props:{icon:"align-right",svgIcon:a.alignRightIcon,...t},messages:{title:Kl.alignRight},commandName:"AlignRight"},e.alignCenter={actions:[...n.alignCenterRules],props:{icon:"align-center",svgIcon:a.alignCenterIcon,...t},messages:{title:Kl.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:[...n.alignJustifyRules],props:{icon:"align-justify",svgIcon:a.alignJustifyIcon,...t},messages:{title:Kl.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:[...n.alignRemoveRules],props:{icon:"align-remove",svgIcon:a.alignRemoveIcon,...t},messages:{},commandName:"AlignRemove"},e.indent={actions:n.indentRules.nodes,listsTypes:Ul,props:{icon:"indent",svgIcon:a.indentIcon,...t},messages:{title:Kl.indent},commandName:"Indent"},e.outdent={actions:n.outdentRules.nodes,listsTypes:Ul,props:{icon:"outdent",svgIcon:a.outdentIcon,...t},messages:{title:Kl.outdent},commandName:"Outdent"},e.orderedList={listType:Ul.orderedList,props:{icon:"list-ordered",svgIcon:a.listOrderedIcon,...t},messages:{title:Kl.orderedList},commandName:"OrderedList",types:{...Ul}},e.bulletList={listType:Ul.bulletList,props:{icon:"list-unordered",svgIcon:a.listUnorderedIcon,...t},messages:{title:Kl.bulletList},commandName:"UnorderedList",types:{...Ul}}})(e.EditorToolsSettings||(e.EditorToolsSettings={}));let Vl=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?o.sanitizeUrl(this.href.value):void 0)||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:o}=this.props,a=d.provideLocalizationService(this),{insertHyperlinkDialogTitle:p,insertHyperlinkAddress:u,insertHyperlinkTitle:m,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"},a.toLanguageString(u,Wl[u])),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"},a.toLanguageString(m,Wl[m])),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}),a.toLanguageString(g,Wl[g]))))}),y=[b.createElement(r.Button,{onClick:this.onClose,dir:l,key:"cancel"},a.toLanguageString(h,Wl[h])),b.createElement(r.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},a.toLanguageString(f,Wl[f]))],C=b.createElement(i.Window,{initialWidth:450,initialHeight:250,className:"k-editor-window",title:a.toLanguageString(p,Wl[p]),onClose:this.onClose,style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},k,b.createElement(i.WindowActionsBar,null,...y));return o?o(C,{content:k,actionButtons:y}):C}};d.registerForLocalization(Vl);let Ol=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],r={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},o=Object.keys(r).filter(e=>null!==r[e]&&""!==r[e]).reduce((e,t)=>Object.assign(e,{[t]:r[t]}),{}),a=l.createAndFill(o);a&&n.insertNode(a,!0)(e.state,l=>e.dispatch(l.setMeta("commandName",t.commandName).setMeta("args",o))),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:o}=this.props,{insertImageDialogTitle:a,insertImageAddress:p,insertImageTitle:u,insertImageAltText:m,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,Wl[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(m,Wl[m])),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(u,Wl[u])),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,Wl[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,Wl[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(r.Button,{onClick:this.onClose,dir:l,key:"cancel"},k.toLanguageString(f,Wl[f])),b.createElement(r.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},k.toLanguageString(v,Wl[v]))],x=b.createElement(i.Window,{initialWidth:500,initialHeight:350,className:"k-editor-window",title:k.toLanguageString(a,Wl[a]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},w,b.createElement(i.WindowActionsBar,null,...S));return o?o(x,{content:w,actionButtons:S}):x}};d.registerForLocalization(Ol);const ql=new n.PluginKey("editor-props");let jl=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:r}=ql.getState(e.state);n.setHtml(l,t.commandName,{preserveWhitespace:r})(e.state,e.dispatch),this.onClose()},this.onClose=()=>{this.props.view.focus(),this.props.onClose()}}render(){const{view:e,settings:t,dir:l,render:o}=this.props,a=d.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:u}=t.messages,m=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(r.Button,{onClick:this.onClose,dir:l,key:"cancel"},a.toLanguageString(p,Wl[p])),b.createElement(r.Button,{onClick:this.onUpdate,themeColor:"primary",dir:l,key:"update"},a.toLanguageString(u,Wl[u]))],h=b.createElement(i.Window,{className:"k-editor-window",title:a.toLanguageString(c,Wl[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},m,b.createElement(i.WindowActionsBar,null,...g));return o?o(h,{content:m,actionButtons:g}):h}};d.registerForLocalization(jl);const _l={onMouseDown:e=>e.preventDefault(),onPointerDown:e=>e.preventDefault()},$l={userSelect:"none"},Gl=function(e,...t){return t.forEach((t,l)=>{e=e.replace("{"+l+"}",String(t))}),e},Jl=(e,t)=>t.dataItem.style?b.cloneElement(e,e.props,b.createElement("span",{style:t.dataItem.style},e.props.children)):e,Ql=["px","em","%"],Xl={animate:{openDuration:150,closeDuration:150}},Yl=[{textKey:Kl.borderStyleNone,text:Wl[Kl.borderStyleNone],value:"none"},{textKey:Kl.borderStyleSolid,text:Wl[Kl.borderStyleSolid],value:"solid"},{textKey:Kl.borderStyleDotted,text:Wl[Kl.borderStyleDotted],value:"dotted"},{textKey:Kl.borderStyleDashed,text:Wl[Kl.borderStyleDashed],value:"dashed"},{textKey:Kl.borderStyleDouble,text:Wl[Kl.borderStyleDouble],value:"double"},{textKey:Kl.borderStyleGroove,text:Wl[Kl.borderStyleGroove],value:"groove"},{textKey:Kl.borderStyleRidge,text:Wl[Kl.borderStyleRidge],value:"ridge"},{textKey:Kl.borderStyleInset,text:Wl[Kl.borderStyleInset],value:"inset"},{textKey:Kl.borderStyleOutset,text:Wl[Kl.borderStyleOutset],value:"outset"},{textKey:Kl.borderStyleInitial,text:Wl[Kl.borderStyleInitial],value:"initial"},{textKey:Kl.borderStyleInherit,text:Wl[Kl.borderStyleInherit],value:"inherit"},{textKey:Kl.borderStyleHidden,text:Wl[Kl.borderStyleHidden],value:"hidden"}];function Zl(e,t){for(let l=e.depth;l>0;l--){const r=e.node(l);if(t(r))return{node:r,depth:l}}return null}const er=e.EditorToolsSettings.findAndReplace;let tr=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 r=0,o=0;if(t&&l){const e=t.findIndex(e=>e.eq(l));r=-1===e?t.length:e+1,o=t.length}return Gl(e,r,o)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(e=!1)=>{const t=this.props.view,{searchText:l,matchCase:r,matchCyclic:o,matchWord:a,useRegExp:i}=this.state,s={text:l,matchWord:a,matchCase:r,useRegExp:i,backward:e,matchCyclic:o},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 r=t.from,o=r+l.length,a=n.replace(t,l,e.state.tr);a.setSelection(n.TextSelection.create(a.doc,r,o)),a.scrollIntoView(),e.dispatch(a),this.setNextState({})}},this.onReplaceAll=()=>{const e=this.props.view,{searchText:t,replaceText:l,matchCase:r,matchWord:o,useRegExp:a}=this.state,i={text:t,matchWord:o,matchCase:r,useRegExp:a},s=n.replaceAll(e.state,l,i);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:r,matchCase:o,useRegExp:a,matchCyclic:i}=t,s={text:e,matchWord:r,matchCase:o,useRegExp:a},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)||i&&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||er}componentDidUpdate(e,t){const l=this.props.view,{matches:r=[],nextMatch:o}=this.state;if(t.nextMatch!==o){const e=l.state,t=e.tr,a=[];r.forEach(e=>{a.push({from:e.from,to:e.to,attrs:{class:o&&e.eq(o)?"k-text-selected":"k-text-highlighted"}})}),t.setMeta(n.textHighlightKey,a),t.setSelection(o||n.TextSelection.create(e.doc,e.selection.from)),l.dispatch(t)}}render(){const e=d.provideLocalizationService(this),{findReplaceDialogTitle:t,findReplaceTabFind:l,findReplaceTabReplace:n,findReplaceFindWhat:m,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:R,searchText:I,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,Wl[v])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-whole",checked:T,onChange:this.onMatchWordChecked,label:e.toLanguageString(k,Wl[k])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-cyclic",checked:P,onChange:this.onMatchCyclicChecked,label:e.toLanguageString(y,Wl[y])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"regular-expression",checked:R,onChange:this.onUseRegExpChecked,label:e.toLanguageString(C,Wl[C])}))),B=b.createElement("div",{className:"k-matches-container"},b.createElement(r.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},b.createElement(o.IconWrap,{name:"chevron-left",icon:a.chevronLeftIcon}),e.toLanguageString(w,Wl[w])),b.createElement("span",null,this.matchesMessage(e.toLanguageString(x,Wl[x]))),b.createElement(r.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(S,Wl[S]),b.createElement(o.IconWrap,{name:"chevron-right",icon:a.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(m,Wl[m])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"findWhat",type:"text",value:I,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}),this.state.error&&b.createElement(u.Error,null,e.toLanguageString(this.state.error,Wl[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,Wl[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(i.Window,{title:e.toLanguageString(t,Wl[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,Wl[l])},D,A,B),b.createElement(p.TabStripTab,{title:e.toLanguageString(n,Wl[n])},D,M,b.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},b.createElement(r.Button,{disabled:!L,onClick:this.onReplace},e.toLanguageString(h,Wl[h])),b.createElement(r.Button,{disabled:!L,onClick:this.onReplaceAll},e.toLanguageString(f,Wl[f]))),A,B)))}};d.registerForLocalization(tr),e.EditorDialogs=void 0,(e=>{e.InsertLinkDialog=class extends Vl{};e.InsertImageDialog=class extends Ol{};e.ViewHtmlDialog=class extends jl{};e.FindAndReplaceDialog=class extends tr{}})(e.EditorDialogs||(e.EditorDialogs={}));const{bold:lr,underline:rr,italic:or}=e.EditorToolsSettings,nr="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 x(n.trimWhitespace(t),w(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){const t=e.doc.type.schema,l=w(t),r=l===t?e.doc:l.nodeFromJSON(e.doc.toJSON());return n.getHtml({doc:r,schema:l})},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,r){return!!n.indentBlocks(t,l,r)(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,r){const o=n.trimWhitespace(t),a=x(o,e.state.schema,void 0===r?{preserveWhitespace:"full"}:r);e.dispatch(e.state.tr.setSelection(new n.AllSelection(e.state.doc)).replaceSelectionWith(a).setMeta("commandName",void 0===l?"setHTML":l))},e.toggleInlineFormat=function(e,t,l,r){return n.toggleInlineFormat(t,l,r)(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 r=e&&e.types&&e.types.hardBreak||"hard_break",o=t.schema.nodes[r];return l&&l(t.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0}),l=e&&e.types&&e.types.listItem||"list_item",r=e&&e.toolsSettings||{};return{"Mod-b":(e,t)=>n.toggleInlineFormat(r.bold||lr)(e,t),"Mod-i":(e,t)=>n.toggleInlineFormat(r.italic||or)(e,t),"Mod-u":(e,t)=>n.toggleInlineFormat(r.underline||rr)(e,t),"Mod-z":n.undo,"Shift-Mod-z":n.redo,...nr?{}:{"Mod-y":n.redo},Backspace:n.undoInputRule,"Mod-Enter":t,"Shift-Enter":t,...nr?{"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.placeholder=function(e){return n.placeholder(e)},e.propsKey=ql,e.imageResizeKey=n.imageResizeKey,e.marks={...k},e.nodes={...n.nodes}})(e.EditorUtils||(e.EditorUtils={}));const ar=(t,l)=>{const r=l.tr||t.state.tr.setSelection(new n.AllSelection(t.state.doc)).replaceSelectionWith(l.doc?E(l.doc):e.EditorUtils.createDocument(t.state.schema,l.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(r))},ir=Object.freeze({name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"16.2.1-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),{link:sr,bold:cr,italic:dr,underline:pr}=e.EditorToolsSettings,ur=b.forwardRef((t,l)=>{const{tools:a=[],defaultEditMode:i="iframe",preserveWhitespace:s="full",style:c,className:p}=t,[u,m]=b.useState({view:void 0,linkDialog:!1}),g=b.useRef(null),h=b.useRef(null),f=b.useRef(null),v=b.useRef(void 0),y=b.useRef(null),C=b.useRef(null),w=b.useRef(void 0),S=b.useRef(t);S.current=t;const x=b.useCallback(e=>{g.current=e},[]),R=b.useCallback(e=>{f.current=e},[]),I=b.useCallback(e=>{h.current=e},[]),[N]=b.useState(()=>!o.validatePackage(ir,{component:"Editor"})),[L]=b.useState(()=>o.getLicenseMessage(ir)),A=d.useLocalization(),B=b.useRef(null);b.useImperativeHandle(B,()=>({get element(){return g.current},get contentElement(){return h.current},get view(){return v.current},get value(){return null!==y.current?y.current.doc:void 0!==S.current.value?S.current.value:v.current?v.current.state.doc:S.current.defaultContent||""},get props(){return S.current},focus:()=>{v.current&&v.current.focus()}})),b.useImperativeHandle(l,()=>B.current),o.useWebMcpRegister("editor",B,t,t.webMcp);const D=()=>B.current,M=b.useRef((e,t)=>{var l,r;const o={target:D(),transaction:e,state:t};return!1!==(null==(r=(l=S.current).onExecute)?void 0:r.call(l,o))}).current,z=b.useRef(e=>{if(S.current.onPasteHtml&&w.current){const t={target:D(),pastedHtml:e,nativeEvent:w.current},l=S.current.onPasteHtml(t);if(w.current=void 0,"string"==typeof l)return l}return e}).current,F=b.useRef(t=>{const l=t.docChanged;if(S.current.onChange&&l){y.current=t;const l=t.doc,r=t.doc.type.schema,o={target:D(),value:l,html:"",transaction:t,schema:r};Object.defineProperty(o,"html",{get:()=>(C.current=e.EditorUtils.getHtml({doc:l,schema:r}),C.current)}),S.current.onChange(o)}const r=v.current;r&&(void 0===S.current.value||!l)&&r.updateState(r.state.apply(t))}).current,H=b.useRef((e,t)=>{if(S.current.onFocus){const e={target:D(),nativeEvent:t};S.current.onFocus(e)}return!1}).current,W=b.useRef((e,t)=>{if(S.current.onBlur){const e={target:D(),nativeEvent:t};S.current.onBlur(e)}return!1}).current,K=b.useRef((e,t)=>(S.current.onPasteHtml&&(w.current=t),!1)).current,U=b.useRef(e=>{if(S.current.onIFrameInit){const t={target:D(),iframe:e};S.current.onIFrameInit(t)}return!1}).current,V=b.useRef((e,t)=>{m(t=>({...t,view:e}))}).current;b.useEffect(()=>{var t;const l=f.current,o=null==l?void 0:l.contentWindow;if(o){const e=o.document;if(!e.head.querySelector("meta[charset]")){const t=e.createElement("meta");t.setAttribute("charset","utf-8"),e.head.appendChild(t)}const t=e.body.querySelector(".k-content");t?(t.textContent="",h.current=t):(h.current=e.createElement("div"),e.body.appendChild(h.current),h.current.classList.add("k-content")),h.current.setAttribute("role","textbox"),h.current.setAttribute("aria-label",S.current.ariaLabel||A.toLanguageString(Kl.contentAreaLabel,Wl[Kl.contentAreaLabel])),S.current.ariaLabelledBy&&h.current.setAttribute("aria-labelledby",S.current.ariaLabelledBy),S.current.ariaDescribedBy&&h.current.setAttribute("aria-describedby",S.current.ariaDescribedBy),l&&S.current.onIFrameInit?U(l):e.head.querySelector("style")||[T,P,"rtl"===S.current.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 a=h.current;if(!a)return;const i=null!=(t=S.current.preserveWhitespace)?t:"full",s=[new n.Plugin({view:()=>({update:V}),key:new n.PluginKey("toolbar-tools-update-plugin")}),new n.Plugin({filterTransaction:M,key:new n.PluginKey("onExecute-event-plugin")}),new n.Plugin({key:ql,state:{init:()=>({preserveWhitespace:i}),apply:(e,t)=>t}}),n.spacesFix(),n.caretColor(),n.history(),n.dropCursor(),n.gapCursor(),n.tableEditing(),n.cspFix()],c={...e.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:cr,italic:dr,underline:pr}}),"Mod-k":()=>{const e=v.current;if(e){const t=e.state,l=t.selection.empty,r=n.getMark(t,t.schema.marks[sr.mark]);l&&!r||m(e=>e.linkDialog?e:{...e,linkDialog:!0})}return!0},"Alt-F10":()=>{var e;const t=null==(e=g.current)?void 0:e.querySelector(".k-toolbar");if(t){const e=t.querySelector(r.toolbarButtons.join(","));if(e)return e.focus(),!0}return!1}},{defaultContent:d="",value:p,onMount:u}=S.current,b=p&&"string"!=typeof p?E(p):e.EditorUtils.createDocument(new n.Schema({nodes:n.nodes,marks:k}),p||d,{preserveWhitespace:i}),y={state:n.EditorState.create({plugins:[...s,n.keymap(c),n.keymap(n.baseKeymap)],doc:b}),transformPastedHTML:z,dispatchTransaction:F,handleDOMEvents:{focus:H,blur:W,paste:K},handleDrop:(e,t,l,r)=>{let o=!1;return l.content.nodesBetween(0,l.content.size,e=>{o=o||"table_caption_external"===e.type.name}),o}},C={plugins:s,shortcuts:c,target:D(),viewProps:y,dom:a},w=(null==u?void 0:u(C))||new n.EditorView({mount:a},y);return v.current=w,m(e=>({...e,view:w})),()=>{var e,t;v.current&&v.current.destroy(),v.current=void 0;const r=null==l?void 0:l.contentWindow;if(null!=r&&r.document){null==(t=null==(e=h.current)?void 0:e.parentNode)||t.removeChild(h.current);const l=r.document.head;for(;null!=l&&l.firstChild;)l.removeChild(l.firstChild)}}},[]);const O=b.useRef(t.value);if(b.useEffect(()=>{const{value:e}=S.current,t=v.current;void 0!==e&&t?(((e,t,l,r,o)=>{if("string"==typeof t)r&&t===o?ar(e,{tr:r}):t!==l&&ar(e,{html:t});else{const l=E(t);r&&l.eq(r.doc)?ar(e,{tr:r}):e.state.doc.eq(l)||ar(e,{doc:l})}})(t,e,O.current,y.current,C.current),y.current=null,C.current=null,O.current=e):O.current=e}),v.current){ql.getState(v.current.state).preserveWhitespace=s}let q=t.contentStyle;void 0===q&&void 0===(null==c?void 0:c.height)&&(q={height:"300px"});const j=(e,t,l)=>e.displayName||e.name||`tool-${t}-${l}`,_=(e,t)=>e.map((e,l)=>j(e,t,l)).join("-")||`group-${t}`,$=(e,l,o=!1)=>{const n=b.createElement(e,{view:v.current,dir:t.dir,key:l,className:o?"k-toolbar-button":void 0});return n.type===r.ToolbarSeparator?b.createElement(e,{key:l}):n},G=a.map((e,t)=>Array.isArray(e)?b.createElement(r.ButtonGroup,{key:_(e,t),className:"k-toolbar-button-group"},e.map((e,l)=>$(e,j(e,t,l)))):$(e,j(e,t,0),!0)),J=A.toLanguageString(Kl.toolbarAriaLabel,Wl[Kl.toolbarAriaLabel]),Q=A.toLanguageString(Kl.contentAreaLabel,Wl[Kl.contentAreaLabel]);return b.createElement("div",{ref:x,className:o.classNames("k-editor",p,{"k-editor-resizable":t.resizable}),dir:t.dir,style:c},G.length>0&&b.createElement(r.Toolbar,{className:"k-editor-toolbar",keyboardNavigation:t.keyboardNavigation,ariaLabel:J},G),"iframe"===i?b.createElement("div",{className:"k-editor-content"},b.createElement("iframe",{ref:R,frameBorder:"0",title:A.toLanguageString(Kl.iframeTitle,Wl[Kl.iframeTitle]),style:q,className:"k-iframe"})):b.createElement("div",{ref:I,style:q,className:"k-editor-content",role:"textbox","aria-label":Q,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy,suppressContentEditableWarning:!0}),((e,l,r)=>u[r]&&b.createElement(e,{view:v.current,settings:l,dir:t.dir,onClose:()=>m(e=>({...e,[r]:!1}))}))(e.EditorDialogs.InsertLinkDialog,sr,"linkDialog"),N&&b.createElement(o.WatermarkOverlay,{message:L}))});ur.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},ur.displayName="KendoReactEditor";let mr=class extends b.Component{constructor(){super(...arguments),this.state={row:-1,col:-1}}renderCell(e,t,l){const r=Math.floor(e/this.props.columns),o=e%this.props.columns,n=o<=l&&r<=t;return b.createElement("span",{className:"k-ct-cell k-disabled"+(n?" k-selected":""),onMouseEnter:()=>this.setState({row:r,col:o}),onClick:()=>this.props.onCellClick.call(void 0,r,o),key:e})}render(){const e=[],t=this.props.columns*this.props.rows,{row:l,col:r}=this.state,{onDown:o}=this.props;let n=this.props.createTableMessage;r>-1&&(n=Gl(this.props.createTableHintMessage,l+1,r+1));for(let o=0;o<t;o++)e.push(this.renderCell(o,l,r));return[b.createElement("div",{onMouseLeave:()=>this.setState({row:-1,col:-1}),key:"cells",style:{borderColor:"inherit"},onPointerDown:o,onMouseDown:o},e),b.createElement("div",{className:"k-status",key:"status",onPointerDown:o,onMouseDown:o},n)]}};var gr,hr;(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:r,rows:o=e.defaultProps.rows,columns:n=e.defaultProps.columns}=this.props,a="rtl"===r?"right":"left";return b.createElement(m.Popup,{anchor:l,anchorAlign:{horizontal:a,vertical:"bottom"},popupAlign:{horizontal:a,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:t,style:"rtl"===r?{direction:"rtl"}:void 0},b.createElement(mr,{rows:o,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 r=t;e.InsertTablePopup=r})(gr||(gr={})),(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:r,table_row:o,table_cell:a}=l.state.schema.nodes,i=n.createTable({table:r,table_row:o,table_cell:a},e,t);i&&n.insertNode(i,!0)(l.state,l.dispatch),l.focus(),this.closePopup()}}render(){const{view:t,render:l,...a}=this.props,i=t&&t.state,s=d.provideLocalizationService(this),{createTable:c,createTableHint:p}=e.messages,u=s.toLanguageString(c,Wl[c]),m=s.toLanguageString(p,Wl[p]),g=!(i&&n.canInsert(i,i.schema.nodes.table)&&!Zl(i.selection.$from,e=>"table_caption_external"===e.type.name)),h=[b.createElement(r.Button,{onClick:g?void 0:this.togglePopup,"aria-disabled":!!g||void 0,ref:e=>{this.button=e&&e.element},key:"InsertTable",..._l,title:u,...e.props,...a,className:o.classNames(a.className,e.props.className,{"k-disabled":g})}),t&&!g&&b.createElement(gr.InsertTablePopup,{key:"insertTablePopup",createTableMessage:u,createTableHintMessage:m,dir:a.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}})(hr||(hr={}));const{alignRemove:fr}=e.EditorToolsSettings,br=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...o}=this.props,a=t&&t.state,i=!!a&&n.isAligned(a,e.actions),s=i?fr.actions:e.actions,c=i?fr.commandName:e.commandName,p=d.provideLocalizationService(this),u=e.messages.title,m=b.createElement(r.Button,{onClick:()=>t&&n.alignBlocks(s,c)(t.state,t.dispatch),selected:i,togglable:!0,..._l,title:p.toLanguageString(u,Wl[u]),"aria-label":p.toLanguageString(u,Wl[u]),...e.props,...o});return l?l.call(void 0,m,{view:t}):m}};return d.registerForLocalization(t),t};var vr;(e=>{e.createStyleDropDownList=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:r}=this.props,{style:o}=e;if(r){n.applyInlineStyle({style:o,value:l.value},e.commandName)(r.state,r.dispatch);const{syntheticEvent:a}=t;a&&"click"===a.type&&r.focus()}}}render(){const{style:t}=e,{view:l,render:r,data:o,defaultItem:a,...i}=this.props,s=o||e.items;let c=a||e.defaultItem;const p=l?n.getInlineStyles(l.state,{name:t,value:/^.+$/}):[],u=d.provideLocalizationService(this);c&&c.localizationKey&&(c={...c},c.text=c.localizationKey?u.toLanguageString(c.localizationKey,Wl[c.localizationKey]):c.text);let m=1===new Set(p).size?p[0]:null;null===m&&i.defaultValue&&(m=i.defaultValue);const h=b.createElement(g.DropDownList,{value:m&&s.find(e=>e.value===m),data:s,defaultItem:c,itemRender:Jl,textField:"text",dataItemKey:"value",onChange:this.onChange,style:$l,leftRightKeysNavigation:!1,title:c&&c.text,...i});return r?r.call(void 0,h,{view:l}):h}};return d.registerForLocalization(t),t}})(vr||(vr={}));const kr=e=>{const{view:t,style:l,colorPickerProps:r,commandName:o}=e,a=r.title,i=r.ariaLabel,{view:c="palette"}=r,p=d.useLocalization(),u=b.useCallback(e=>{t&&(n.applyInlineStyle({style:l,value:e.value},o)(t.state,t.dispatch),"palette"===c&&t.focus())},[t,l,c,o]);return b.createElement(s.ColorPicker,{onChange:u,onActiveColorClick:u,...r,title:a&&p.toLanguageString(a,Wl[a]),ariaLabel:i&&p.toLanguageString(i,Wl[i])})};var yr;(e=>{e.createFormatBlockDropDownList=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:r}=this.props;if(r&&n.formatBlockElements(l.value,e.commandName)(r.state,r.dispatch)){const{syntheticEvent:e}=t;e&&"click"===e.type&&r.focus()}}}render(){const{view:t,render:l,data:r,defaultItem:o,...a}=this.props,i=r||e.items;let s=o||e.defaultItem;const c=t&&t.state,p=c?n.getBlockFormats(c):[],u=d.provideLocalizationService(this);s&&s.localizationKey&&(s={...s},s.text=s.localizationKey?u.toLanguageString(s.localizationKey,Wl[s.localizationKey]):s.text);const m=1===new Set(p).size?p[0]:null,h=b.createElement(g.DropDownList,{value:m&&i.find(e=>e.value===m),onChange:this.onChange,itemRender:Jl,data:i,defaultItem:s,textField:"text",dataItemKey:"value",style:$l,leftRightKeysNavigation:!1,title:s.text,...a});return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(yr||(yr={}));const Cr=(e,t)=>{const l=class extends b.Component{render(){const{view:l,render:n,...a}=this.props,i=d.provideLocalizationService(this),s=e.messages.title,c=l&&l.state,p=!!c&&!t(c),u=b.createElement(r.Button,{onClick:p?void 0:()=>l&&t(l.state,t=>l.dispatch(t.setMeta("commandName",e.commandName))),"aria-disabled":!!p||void 0,..._l,title:i.toLanguageString(s,Wl[s]),"aria-label":i.toLanguageString(s,Wl[s]),...e.props,...a,className:o.classNames(a.className,e.props.className,{"k-disabled":p})});return n?n.call(void 0,u,{view:l}):u}};return d.registerForLocalization(l),l};var wr,Sr,xr;(e=>{e.createUndoTool=e=>Cr(e,n.undo),e.createRedoTool=e=>Cr(e,n.redo)})(wr||(wr={})),(e=>{e.createIndentTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...a}=this.props,i=a.dir,s=t&&t.state,c=s&&s.schema.nodes,p=c&&c[e.listsTypes.listItem],u=e.actions,m=!!s&&!!p&&(n.isIndented(s,u,i)||u.some(e=>c&&c[e.node]&&n.hasNode(s,c[e.node])))&&!n.hasNode(s,p),g=!!s&&n.canIndentAsListItem(s,p),h=m||g,f=d.provideLocalizationService(this),v=e.messages.title,k=!h,y=b.createElement(r.Button,{onClick:k?void 0:()=>{t&&g&&p?n.sinkListItem(p)(t.state,t.dispatch):t&&m&&n.indentBlocks(u,e.commandName,i)(t.state,t.dispatch)},"aria-disabled":!!k||void 0,title:f.toLanguageString(v,Wl[v]),"aria-label":f.toLanguageString(v,Wl[v]),..._l,...e.props,...a,className:o.classNames(a.className,e.props.className,{"k-disabled":k})});return l?l.call(void 0,y,{view:t}):y}};return d.registerForLocalization(t),t}})(Sr||(Sr={})),(e=>{e.createInlineFormatTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...o}=this.props,a=t&&t.state,{mark:i,altMarks:s,altStyle:c}=e,p={mark:i,altMarks:s,altStyle:c},u=d.provideLocalizationService(this),m=e.messages.title,g=b.createElement(r.Button,{onClick:()=>t&&n.toggleInlineFormat(p,a&&a.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),selected:!!a&&n.hasMark(a,p),togglable:!0,..._l,title:u.toLanguageString(m,Wl[m]),"aria-label":u.toLanguageString(m,Wl[m]),...e.props,...o});return l?l.call(void 0,g,{view:t}):g}};return d.registerForLocalization(t),t}})(xr||(xr={}));const Er=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:a,...i}=this.props,s=l&&l.state,c=s?s.schema.nodes[t.node]:void 0,p=d.provideLocalizationService(this),{insertImage:u}=t.messages,m=!c||!s||!n.canInsert(s,c),g=[b.createElement(r.Button,{onClick:m?void 0:this.toggleDialog,"aria-disabled":!!m||void 0,key:"insertImage",..._l,title:p.toLanguageString(u,Wl[u]),...t.props,...i,className:o.classNames(i.className,t.props.className,{"k-disabled":m})}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:l,settings:t,dir:i.dir,onClose:this.toggleDialog})||null];return a?a.call(void 0,g,{view:l}):g}};return d.registerForLocalization(l),l};var Tr,Pr,Rr;(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:a,...i}=this.props,s=l&&l.state,c=!s||s.selection.empty,p=s&&n.getMark(s,s.schema.marks[t.mark]),u=d.provideLocalizationService(this),{insertHyperlink:m}=t.messages,g=c&&!p,h=[b.createElement(r.Button,{onClick:g?void 0:this.toggleDialog,"aria-disabled":!!g||void 0,key:"link",..._l,title:u.toLanguageString(m,Wl[m]),...t.props,...i,className:o.classNames(i.className,t.props.className,{"k-disabled":g})}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:t,dir:i.dir,view:l,onClose:this.toggleDialog})||null];return a?a.call(void 0,h,{view:l}):h}};return d.registerForLocalization(l),l}})(Tr||(Tr={})),(e=>{e.createListTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...o}=this.props;let a=!1;const i=d.provideLocalizationService(this),s=e.messages.title,c=e.types,p=e.listType;if(t){const e=t.state,l=e.schema.nodes,r=n.hasNode(e,l[c.orderedList]),o=n.hasNode(e,l[c.bulletList]);a=p===c.orderedList?r&&!o:!r&&o}const u=b.createElement(r.Button,{onClick:()=>t&&n.toggleList(t.state,t.dispatch,t,{listType:p,...c},e.commandName),togglable:!0,selected:a,title:i.toLanguageString(s,Wl[s]),..._l,...e.props,...o});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t}})(Pr||(Pr={})),(e=>{e.createOutdentTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...a}=this.props,i=t&&t.state,s=a.dir,c=!!i&&n.isIndented(i,e.actions,s),p=i&&i.schema.nodes[e.listsTypes.listItem],u=!!i&&n.canOutdentAsListItem(i,{nodes:e.actions,listsTypes:e.listsTypes}),m=c||u,g=d.provideLocalizationService(this),h=e.messages.title,f=!m,v=b.createElement(r.Button,{onClick:f?void 0:()=>{t&&u&&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,Wl[h]),"aria-label":g.toLanguageString(h,Wl[h]),..._l,...e.props,...a,className:o.classNames(a.className,e.props.className,{"k-disabled":f})});return l?l.call(void 0,v,{view:t}):v}};return d.registerForLocalization(t),t}})(Rr||(Rr={}));const Ir=(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},Nr=(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 Lr,Ar,Br;(e=>{e.createAddRowBeforeTool=e=>Cr(e,n.addRowBefore),e.createAddRowAfterTool=e=>Cr(e,n.addRowAfter),e.createAddColumnBeforeTool=e=>Cr(e,n.addColumnBefore),e.createAddColumnAfterTool=e=>Cr(e,n.addColumnAfter),e.createDeleteRowTool=e=>Cr(e,Nr),e.createDeleteColumnTool=e=>Cr(e,Ir),e.createDeleteTableTool=e=>Cr(e,n.deleteTable),e.createMergeCellsTool=e=>Cr(e,n.mergeCells),e.createSplitCellTool=e=>Cr(e,n.splitCell)})(Lr||(Lr={})),(e=>{e.createUnlinkTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...a}=this.props,i={mark:e.mark},s=!!t&&n.hasMark(t.state,i),c=d.provideLocalizationService(this),p=e.messages.title,u=!s,m=b.createElement(r.Button,{onClick:u?void 0:()=>t&&n.removeLink(i,t.state.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),"aria-disabled":!!u||void 0,..._l,title:c.toLanguageString(p,Wl[p]),...e.props,...a,className:o.classNames(a.className,e.props.className,{"k-disabled":u})});return l?l.call(void 0,m,{view:t}):m}};return d.registerForLocalization(t),t}})(Ar||(Ar={})),(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:o,...n}=this.props,a=d.provideLocalizationService(this),i=t.messages.viewHtml,s=[b.createElement(r.Button,{onClick:this.toggleDialog,key:"viewHtml",..._l,title:a.toLanguageString(i,Wl[i]),...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 o?o.call(void 0,s,{view:l}):s}};return d.registerForLocalization(l),l}})(Br||(Br={}));const{print:Dr}=e.EditorToolsSettings,Mr=e=>{const{view:t,render:l,settings:n=Dr,...a}=e,i=t&&t.dom,s=i&&i.ownerDocument,c=s&&s.defaultView,p=n.messages.title,u=!c||c===window,m=b.useCallback(()=>{c&&c.print()},[c]),g=b.createElement(r.Button,{onClick:u?void 0:m,"aria-disabled":!!u||void 0,title:d.useLocalization().toLanguageString(p,Wl[p]),..._l,...n.props,...a,className:o.classNames(a.className,n.props.className,{"k-disabled":u})});return l?l.call(void 0,g,{view:t}):g},{pdf:zr,savePdfOptions:Fr}=e.EditorToolsSettings,Hr=e=>{const{view:t,render:l,settings:o=zr,savePdfOptions:n,savePdfCallback:a,...i}=e,s=o.messages.title,c=b.useCallback(()=>{t&&h.savePDF(t.dom,{...Fr,...n||{}},a)},[t,n,a]),p=b.createElement(r.Button,{onClick:c,title:d.useLocalization().toLanguageString(s,Wl[s]),..._l,...o.props,...i});return l?l.call(void 0,p,{view:t}):p},{selectAll:Wr}=e.EditorToolsSettings,Kr=e=>{const{view:t,render:l,settings:o=Wr,...a}=e,i=o.messages.title,s=b.useCallback(()=>{t&&(n.selectAll(t.state,t.dispatch),t.focus())},[t]),c=b.createElement(r.Button,{onClick:s,title:d.useLocalization().toLanguageString(i,Wl[i]),..._l,...o.props,...a});return l?l.call(void 0,c,{view:t}):c},{cleanFormatting:Ur}=e.EditorToolsSettings,Vr=n.cleanFormatting(),Or=e=>{const{view:t,render:l,settings:n=Ur,...a}=e,i=n.messages.title,s=!t||!Vr(t.state),c=b.useCallback(()=>{t&&Vr(t.state,e=>{e.setMeta("commandName",n.commandName),t.dispatch(e)})},[t]),p=b.createElement(r.Button,{onClick:s?void 0:c,"aria-disabled":!!s||void 0,title:d.useLocalization().toLanguageString(i,Wl[i]),..._l,...n.props,...a,className:o.classNames(e.className,n.props.className,{"k-disabled":s})});return l?l.call(void 0,p,{view:t}):p},qr=e.EditorToolsSettings.findAndReplace;let jr=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}=qr,n=d.provideLocalizationService(this),a=qr.messages.findReplaceToolTitle,i=!e;return[b.createElement(r.Button,{onClick:i?void 0:this.onOpen,"aria-disabled":!!i||void 0,..._l,title:n.toLanguageString(a,Wl[a]),key:"tool",...l,...t,className:o.classNames(t.className,l.className,{"k-disabled":i})}),this.state.showDialog&&e&&b.createElement(tr,{view:e,onClose:this.onClose,dir:t.dir,key:"dialog"})]}};d.registerForLocalization(jr);const _r=(e,t)=>{const{from:l,to:r}=e.selection;let o=null;return e.doc.nodesBetween(l,r,e=>(o=o||(e.type===t?e:null),!o)),o},$r=e=>{let t=!1;const l=e.view,o=Ul,a=e.listType,i=d.useLocalization();let s,c,p=[...e.items||[]];if(l){const e=l.state,r=e&&e.schema.nodes;s=r&&_r(e,r[o.orderedList]),c=r&&_r(e,r[o.bulletList]),t=!!(a===o.orderedList?s&&!c:!s&&c)}if(p=p.map(e=>({...e,text:e.textKey?i.toLanguageString(e.textKey,Wl[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(r.SplitButton,{textField:"text",items:p,icon:e.icon,svgIcon:e.svgIcon,onButtonClick:e=>{l&&(n.toggleList(l.state,l.dispatch,l,{listType:a,...o,listAttrs:{}},"InsertList"),l.focus())},onItemClick:e=>{if(l){const t=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},r=s||c;if(r&&n.listStyle(r.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[a],t))}else n.toggleList(l.state,l.dispatch,l,{listType:a,...o,listAttrs:t},"InsertList");l.focus()}},buttonClass:t?"k-selected":void 0,title:void 0!==e.title?e.title:i.toLanguageString(e.titleKey,Wl[e.titleKey])}))},Gr=/[\D]+$/,Jr=e=>{const t=e.match(Gr);return t?t[0]:""},Qr=(e,t)=>{var l;const r=Xr((null==(l=e.attrs)?void 0:l.style)||"")[t]||"";return{[t]:parseFloat(r)||null,[t+"Unit"]:Jr(r)}},Xr=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}),{}),Yr=/^.+$/;function Zr(e,t,l){let r;if(new RegExp("[^-]?"+t+":").test(e.style||"")){const{style:o}=((e,t)=>{const l=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};const n=e.split(/\s*;\s*/).filter(e=>!!e),a=n.filter(e=>{const t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===l&&r.test(t[1]))});return o&&a.push(`${l}: ${o}`),{style:a.join("; ")+(a.length?";":""),changed:!!o||a.length!==n.length}})(e.style||"",{style:t,value:Yr,newValue:l});r={...e,style:o}}else if(e.style){const o=Xr(e.style);o[t]=l,r={...e,style:Object.keys(o).filter(e=>!!o[e]).reduce((e,t)=>e+t+": "+o[t]+"; ","").trim()}}else r=l?{...e,style:t+": "+l+";"}:{...e};return r}const eo=e=>{const t=Zl(e.selection.$from,e=>"table"===e.type.name),l=Zl(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,r=[];return l.ranges.forEach(e=>{const l=e.$from.pos,o=e.$to.pos;t.nodesBetween(l,o,(e,t,l,o)=>{("table_cell"===e.type.name||"table_header"===e.type.name)&&r.push({node:e,pos:t})})}),r})(e).filter(({pos:l})=>{const r=Zl(e.doc.resolve(l),e=>"table"===e.type.name);return r&&r.depth===t.depth&&t.node.eq(r.node)}):[]},to=e=>{const t=[];if(eo(e).length){const l=e.selection.$from,r=Zl(l,e=>"table"===e.type.spec.tableRole);if(null===r)return t;const o=l.start(r.depth),a=r.node,i=n.TableMap.get(a),s=e.doc;i.map.forEach(e=>{const l=e+o;t.push({pos:l,node:s.nodeAt(l)})})}return t},lo="k-colgroup-data",ro=(e,t,l)=>{const r={cellWidth:null,widthUnit:""},o=t.node,a=l.start(t.depth);if(!o.attrs[lo])return r;const i=new Set;let s="";const c=n.htmlToFragment(o.attrs[lo]).firstChild;return e.forEach(e=>{const t=o.resolve(e.pos-a),l=t.parent,r=t.index();let n=0;for(let e=0;e<=r;e++)n+=l.child(e).attrs.colspan;const d=c.children[n-1];d&&(s=d.style.width,i.add(s))}),1===i.size&&s&&(r.cellWidth=parseFloat(s)||null,r.widthUnit=Jr(s)),r},oo=(e,t,l)=>{const r={cellHeight:null,heightUnit:""},o=t.node,n=l.start(t.depth),a=new Set;let i="";return e.forEach(e=>{var t;const l=o.resolve(e.pos-n).parent;i=Xr((null==(t=l.attrs)?void 0:t.style)||"").height||"",a.add(i)}),1===a.size&&i&&(r.cellHeight=parseFloat(i)||null,r.heightUnit=Jr(i)),r},no=(e,t)=>{const l=new Set;let r="";return e.forEach(e=>{var o;r=Xr((null==(o=e.node.attrs)?void 0:o.style)||"")[t]||"",l.add(r)}),1===l.size&&r?r:""},ao=(e,t)=>{const l=new Set;let r="";return e.forEach(e=>{r=(e.node.attrs||{})[t]||"",l.add(r)}),1===l.size&&r?r:""},io={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:""},so=e=>{const t=eo(e),l=e.selection.$from,r=t.length?Zl(l,e=>"table"===e.type.spec.tableRole):null;return r?{...io,...ro(t,r,l),...oo(t,r,l),alignment:{x:no(t,"text-align"),y:no(t,"vertical-align")},textControl:no(t,"white-space"),backgroundColor:no(t,"background-color")||void 0,cellPadding:parseFloat(no(t,"padding"))||null,borderWidth:parseFloat(no(t,"border-width"))||null,borderColor:no(t,"border-color")||void 0,borderStyle:no(t,"border-style")||null,id:ao(t,"id"),className:ao(t,"class")}:io},co=(e,t,l)=>{l.forEach(({node:l,pos:r})=>{let o={...l.attrs};o=Zr(o,"border-color",t.borderColor||""),o=Zr(o,"border-style",t.borderStyle||""),o=Zr(o,"border-width","number"==typeof t.borderWidth?t.borderWidth+"px":""),o=Zr(o,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),o=Zr(o,"background-color",t.backgroundColor||""),o=Zr(o,"text-align",t.alignment.x||""),o=Zr(o,"vertical-align",t.alignment.y||""),o=Zr(o,"white-space",t.textControl||""),o.id=t.id||null,o.class=t.className||null,e.setNodeMarkup(r,null,o),"number"==typeof t.cellWidth&&((e,t,l)=>{const r=e.doc.resolve(t),o=r.parent,a=r.index();let i=0;for(let e=0;e<=a;e++)i+=o.child(e).attrs.colspan;const s=r.node(r.depth-1),c=r.posAtIndex(0,r.depth-1)-1;let d,p=s.attrs;if(p&&p[lo]){const t=n.htmlToFragment(p[lo]).firstChild;d=t.children[i-1],d.style.width=l,p={...p,[lo]:t.outerHTML},e.setNodeMarkup(c,null,p)}else{let t=0;for(let e=0;e<o.childCount;e++)t+=o.child(e).attrs.colspan;const r=document.createElement("colgroup"),n=new Array(t);for(let e=0;e<t;e++)n[e]=document.createElement("col"),r.appendChild(n[e]);d=n[a],d.style.width=l,p={...p,[lo]:"<colgroup>"+n.reduce((e,t)=>e+t.outerHTML,"")+"</colgroup>"},e.setNodeMarkup(c,null,p)}})(e,r,t.cellWidth+(t.widthUnit||"px")),"number"==typeof t.cellHeight&&((e,t,l)=>{const r=e.doc.resolve(t),o=r.parent,n=r.posAtIndex(0)-1;e.setNodeMarkup(n,null,Zr(o.attrs,"height",l))})(e,r,t.cellHeight+(t.heightUnit||"px"))})},po=(e,t)=>{const l=e.tr,r=t.applyToAll?to(e):eo(e);return co(l,t,r),l},uo=e=>{const{view:t,...l}=e,[o,n]=b.useState(!1),i=d.useLocalization(),s=!(!t||!Zl(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]),u=b.useCallback(e=>{if(t&&e){const l=po(t.state,e);l.docChanged&&t.dispatch(l)}p()},[t,p]);return b.createElement(b.Fragment,null,b.createElement(r.Button,{type:"button",title:i.toLanguageString(Kl.cellProperties,Wl[Kl.cellProperties]),icon:"table-cell-properties",svgIcon:a.tableCellPropertiesIcon,onClick:c,disabled:!s,..._l,...l}),o&&t&&b.createElement(bo,{view:t,onCancel:p,onSave:u}))},mo=[{textKey:Kl.cellPropertiesLeftTop,text:Wl[Kl.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:a.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:Kl.cellPropertiesCenterTop,text:Wl[Kl.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:a.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:Kl.cellPropertiesRightTop,text:Wl[Kl.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:a.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:Kl.cellPropertiesLeftMiddle,text:Wl[Kl.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:a.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:Kl.cellPropertiesCenterMiddle,text:Wl[Kl.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:a.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:Kl.cellPropertiesRightMiddle,text:Wl[Kl.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:a.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:Kl.cellPropertiesLeftBottom,text:Wl[Kl.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:a.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:Kl.cellPropertiesCenterBottom,text:Wl[Kl.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:a.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:Kl.cellPropertiesRightBottom,text:Wl[Kl.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:a.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:Kl.cellPropertiesNoAlignment,text:Wl[Kl.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:a.tableAlignRemoveIcon,value:{x:"",y:""}}],go=[{textKey:Kl.cellPropertiesWrap,text:Wl[Kl.cellPropertiesWrap],value:"",icon:"text-wrap-arrow",svgIcon:a.textWrapArrowIcon},{textKey:Kl.cellPropertiesFitToCell,text:Wl[Kl.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:a.parameterStringIcon}],ho=(e,t)=>t?b.createElement(b.Fragment,null,b.createElement(s.InputPrefix,null,b.createElement(o.IconWrap,{icon:t.svgIcon,name:t.icon})),e):e,fo=(e,t)=>{const l=b.createElement(b.Fragment,null,b.createElement(s.InputPrefix,null,b.createElement(o.IconWrap,{icon:t.dataItem.svgIcon,name:t.dataItem.icon})),e.props.children);return b.cloneElement(e,e.props,l)},bo=e=>{const t=b.useMemo(()=>so(e.view.state),[e.view]),l=d.useLocalization(),o=b.useRef(null),n=t.applyToAll,a=b.useRef(null),c=t.cellWidth,p=b.useRef(null);t.widthUnit&&!Ql.includes(t.widthUnit)&&Ql.push(t.widthUnit);const u=t.widthUnit||"",m=b.useRef(null),h=t.cellHeight,f=b.useRef(null);t.heightUnit&&!Ql.includes(t.heightUnit)&&Ql.push(t.heightUnit);const v=t.heightUnit||"",k=b.useRef(null),y=mo.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=go.find(e=>e.value===t.textControl),S=b.useRef(null),x=t.backgroundColor,E=b.useRef(null),T=t.cellPadding,P=b.useRef(null),R=t.borderWidth,I=b.useRef(null),N=t.borderColor,L=b.useRef(null),A=Yl.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,r,n,i,s,c,d,u,g,h,b,v,y,w,x,T,R,N,A;const D={applyToAll:!(null==(l=null==(t=o.current)?void 0:t.element)||!l.checked),cellWidth:(null==(r=a.current)?void 0:r.value)||null,widthUnit:(null==(n=p.current)?void 0:n.value)||"",cellHeight:(null==(i=m.current)?void 0:i.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==(u=C.current)?void 0:u.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=I.current)?void 0:x.value,borderStyle:(null==(R=null==(T=L.current)?void 0:T.value)?void 0:R.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:o,defaultChecked:n})),b.createElement("label",{className:"k-checkbox-label"},l.toLanguageString(Kl.cellPropertiesApplyToAllCells,Wl[Kl.cellPropertiesApplyToAllCells])))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesWidth,Wl[Kl.cellPropertiesWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:a,defaultValue:c,min:0,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.sizeAuto])}),b.createElement("div",{className:"k-form-hint"},l.toLanguageString(Kl.cellPropertiesApplyToColumn,Wl[Kl.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:u,data:Ql,popupSettings:Xl}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesHeight,Wl[Kl.cellPropertiesHeight])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:m,defaultValue:h,min:0,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.sizeAuto])}),b.createElement("div",{className:"k-form-hint"},l.toLanguageString(Kl.cellPropertiesApplyToRow,Wl[Kl.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:Ql,popupSettings:Xl}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesAlignment,Wl[Kl.cellPropertiesAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:k,defaultValue:y,data:mo.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),textField:"text",dataItemKey:"text",popupSettings:Xl,valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesTextControl,Wl[Kl.cellPropertiesTextControl])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:C,defaultValue:w,data:go.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),textField:"text",dataItemKey:"value",popupSettings:Xl,valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesCellPadding,Wl[Kl.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(Kl.cellPropertiesBackground,Wl[Kl.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(Kl.cellPropertiesBorderWidth,Wl[Kl.cellPropertiesBorderWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:P,defaultValue:R,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesBorderColor,Wl[Kl.cellPropertiesBorderColor])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:I,defaultValue:N}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.cellPropertiesBorderStyle,Wl[Kl.cellPropertiesBorderStyle])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:L,defaultValue:A,popupSettings:Xl,data:Yl,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(Kl.cellPropertiesId,Wl[Kl.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(Kl.cellPropertiesCssClass,Wl[Kl.cellPropertiesCssClass])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:M,defaultValue:z})))))),W=[b.createElement(r.Button,{onClick:e.onCancel,key:"cancel"},l.toLanguageString(Kl.cellPropertiesCancel,Wl[Kl.cellPropertiesCancel])),b.createElement(r.Button,{themeColor:"primary",key:"save",onClick:F},l.toLanguageString(Kl.cellPropertiesSave,Wl[Kl.cellPropertiesSave]))];return b.createElement(i.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(Kl.cellProperties,Wl[Kl.cellProperties]),onClose:e.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},H,b.createElement(i.WindowActionsBar,{layout:"end"},...W))},vo={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"},ko={left:{"margin-left":"","margin-right":"auto"},center:{"margin-left":"auto","margin-right":"auto"},right:{"margin-left":"auto","margin-right":""},"":{}},yo=e=>{const t=[];for(let l=0;l<e.height;l++){const r=l*e.width,o=r+e.width;t.push(e.map.slice(r,o))}return t},Co=e=>{let t=!0,l=!0;return e.content.forEach(e=>{e.content.forEach(e=>{const r="table_header"===e.type.name,o="table_cell"===e.type.name;r&&!e.attrs.scope&&(t=!1),(r&&!e.attrs.id||o&&!e.attrs.headers)&&(l=!1)})}),t?"scope":l?"id":"none"},wo=e=>{var t,l,r;const o=eo(e),a=e.selection.$from,i=o.length?Zl(a,e=>"table"===e.type.spec.tableRole):null;if(!i)return vo;const s=Zl(a,e=>"table_wrapper"===e.type.name);let c="",d={},p={};s&&(p=Xr(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=Xr(e.attrs.style)}}));const u=Xr((null==(t=i.node.attrs)?void 0:t.style)||""),m=n.TableMap.get(i.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,r=0;const o=yo(t);o.forEach(t=>{let r=!0;t.forEach(t=>{const l=e.nodeAt(t);l&&"table_header"!==l.type.name&&(r=!1)}),r&&l++});for(let l=0;l<t.width;l++){let n=!0;for(let r=0;r<t.height;r++){const t=o[r]&&o[r][l],a="number"==typeof t&&e.nodeAt(t);a&&"table_header"!==a.type.name&&(n=!1)}n&&r++}return{rows:l,columns:r}})(i.node,m),f=(e=>{const t=new Set;return e.content.forEach(e=>{e.content.forEach(e=>{t.add(Xr(e.attrs.style).padding||"")})}),1===t.size?Array.from(t)[0]:""})(i.node);return{...vo,columns:m.width,rows:m.height,...Qr(i.node,"width"),...s&&/%/.test(p.width||"")?Qr(s.node,"width"):{},...Qr(i.node,"height"),textAlign:u["text-align"]||"",position:g||null,cellPadding:f?parseFloat(f):null,cellSpacing:u["border-spacing"]?parseFloat(u["border-spacing"]):null,backgroundColor:u["background-color"],borderWidth:u["border-width"]?parseFloat(u["border-width"]):null,borderColor:u["border-color"],borderStyle:u["border-style"]||null,collapseBorders:"collapse"===u["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?Co(i.node):"none",id:(null==(l=i.node.attrs)?void 0:l.id)||"",className:(null==(r=i.node.attrs)?void 0:r.class)||""}},So=e=>{const t=e.lastChild.lastChild;return{node:t,pos:e.content.size-t.nodeSize}},xo=(e,t,l,r,o)=>{const a=t+So(l).pos;if(!e.doc.nodeAt(a))return e;const i=e.doc.resolve(a),s=new n.CellSelection(i,i),c=e.tr.setSelection(s);let d=e.apply(c);for(let e=0;e<r;e++)o(d,e=>{d=d.apply(e)});return d},Eo=(e,t,l,r)=>{let o=e;for(let e=0;e<l;e++){const e=o.doc.nodeAt(t);if(e){const l=t+So(e).pos,a=o.doc.resolve(l),i=new n.CellSelection(a,a),s=o.tr.setSelection(i);o=o.apply(s),r(o,e=>{o=o.apply(e)})}}return o},To=(e,t,l,r,o)=>{if(t.type.name!==r.name||Object.keys(o).length>0){const n=e.tr.setNodeMarkup(l,r,{...t.attrs,...o});return e.apply(n)}return e},Po=(e,t,l)=>{const r=e.doc.nodeAt(l),o=r&&n.TableMap.get(r);if(!r||!o)return e;const a=yo(o);let i=e;const{table_header:s,table_cell:c}=e.schema.nodes,d=String((new Date).getTime()),p=[],u=(e,t,l,r)=>{const o=[];if(r)for(let l=0;l<e;l++)p[l]&&p[l][t]&&o.push(p[l][t]);if(l)for(let l=0;l<t;l++)p[e]&&p[e][l]&&o.push(p[e][l]);return o.join(" ")};return a.forEach((e,o)=>{e.forEach((e,n)=>{const a=r.nodeAt(e);if(a){const r=n<t.headerColumns,m=o<t.headerRows,g={...a.attrs};((e,t)=>{/^cell-[0-9]+-[0-9]+$/.test(e.attrs.id||"")&&(t.id=null)})(a,g),g.headers=null,g.scope=null,m||r?("scope"===t.associateHeaders&&(g.scope=m?"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})(o,n),(n>0||o>0)&&(g.headers=u(o,n,r,m)||null)),i=To(i,a,l+e+1,s,g)):("id"===t.associateHeaders&&(g.headers=u(o,n,t.headerColumns>0,t.headerRows>0)||null),i=To(i,a,l+e+1,c,g))}})}),i},Ro=(e,t)=>n.parseContent("<p>"+e+"</p>",t).content.firstChild.content,Io=(e,t)=>{if(!e.caption)return;let l={caption:"",style:"display: table-caption"};e.captionAlignment&&(l=Zr(l,"text-align",e.captionAlignment)),e.captionPosition&&(l=Zr(l,"caption-side",e.captionPosition));const r=Ro(e.caption,t);return r&&t.nodes.table_caption_external.createAndFill(l,r)||void 0},No=e=>e.firstChild&&"table_caption_external"===e.firstChild.type.name,Lo=(e,t,l,r,o)=>{let n={state:e,pos:l};if(r||!t.position&&!t.caption)r&&(t.position||t.caption||!t.caption&&No(r.node))?(e=((e,t,l,r)=>{let o={...t.attrs};return o=Zr(o,"margin-left",""),o=Zr(o,"margin-right",""),Object.keys(r||{}).forEach(e=>{o=Zr(o,e,(r||{})[e]||"")}),e.apply(e.tr.setNodeMarkup(l,null,o))})(e,r.node,o,t.position&&ko[t.position]),e=((e,t,l,r)=>{let o,n=e;const a=l+2,i=l+1,s=n.schema;if(No(t))if(o=t.firstChild,r.caption){const e=Ro(r.caption,s);if(n=n.apply(n.tr.replaceWith(a,a+o.content.size,e)),o=n.doc.nodeAt(i),o){let e={...o.attrs};e=Zr(e,"text-align",r.captionAlignment||""),e=Zr(e,"caption-side",r.captionPosition||""),n=n.apply(n.tr.setNodeAttribute(i,"style",e.style))}}else n=n.apply(n.tr.deleteRange(a,a+o.content.size));else o=Io(r,s),o&&(n=n.apply(n.tr.replaceWith(i,i,o)));return n})(e,r.node,o,t),n={state:e,pos:o}):n=!r||t.position||t.caption?{state:e,pos:l}:{state:e,node:r.node,pos:e.selection.$from.start(r.depth)-1};else{let r={table:"",style:"display: table"};const o=[],a=t.position,i=a&&ko[a];i&&Object.keys(i).forEach(e=>{r=Zr(r,e,i[e]||"")}),"number"==typeof t.width&&"%"===t.widthUnit&&(r=Zr(r,"width",t.width+t.widthUnit));const s=Io(t,e.schema);s&&o.push(s);const c=e.doc.nodeAt(l);o.push(c);const d=e.schema.nodes.table_wrapper.createAndFill(r,o);if(d){const t=e.tr.replaceWith(l,l+c.content.size,d);n={state:e=e.apply(t),pos:l}}}const a=r&&n.state.doc.nodeAt(o);if(a){let e;"number"==typeof t.width&&"%"===t.widthUnit?e=Zr(a.attrs,"width",t.width+t.widthUnit):"%"!==t.widthUnit&&/%/.test(Xr(a.attrs.style||"").width||"")&&(e=Zr(a.attrs,"width","")),e&&(n.state=n.state.apply(n.state.tr.setNodeMarkup(o,null,e)))}return n},Ao=(e,t)=>{const l=e.selection.$from,r=Zl(l,e=>"table"===e.type.spec.tableRole);if(!r)return;const o=l.start(r.depth)-1;let a=((e,t,l,r)=>{let o=e,a=o.doc.nodeAt(t);if(!a)return o;let i=n.TableMap.get(a);return i.width===r&&i.height===l||(r>i.width?o=xo(o,t,a,r-i.width,n.addColumnAfter):r<i.width&&(o=Eo(o,t,i.width-r,Ir)),a=o.doc.nodeAt(t),!a)||(i=n.TableMap.get(a),l>i.height?o=xo(o,t,a,l-i.height,n.addRowAfter):l<i.height&&(o=Eo(o,t,i.height-l,Nr))),o})(e,o,t.rows,t.columns);if(!a)return;const i=a.tr;to(a).forEach(e=>{let l={...e.node.attrs};l=Zr(l,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),i.setNodeMarkup(e.pos,null,l)}),a=a.apply(i),a=((e,t,l)=>{const r=e.doc.nodeAt(l);if(!r)return e;let o={...r.attrs};const n=null!==t.width&&("%"!==t.widthUnit||!t.caption&&!t.position);o=Zr(o,"width",n?t.width+t.widthUnit:""),o=Zr(o,"height",null!==t.height?t.height+t.heightUnit:""),o=Zr(o,"text-align",t.textAlign||""),o=Zr(o,"background-color",t.backgroundColor||""),o=Zr(o,"border-width",t.borderWidth?t.borderWidth+"px":""),o=Zr(o,"border-style",t.borderStyle||""),o=Zr(o,"border-color",t.borderColor||""),o=Zr(o,"border-spacing",null!==t.cellSpacing?t.cellSpacing+"px":""),o=null!==t.cellSpacing?Zr(o,"border-collapse","unset"):Zr(o,"border-collapse",t.collapseBorders?"collapse":"");const a=ko[t.position||""]||{};Object.keys(a).forEach(e=>{o=Zr(o,e,a[e])}),o.id=t.id||null,o.class=t.className||null;const i=e.tr.setNodeMarkup(l,null,o);return e.apply(i)})(a,t,o),a=Po(a,t,o);const s=Zl(l,e=>"table_wrapper"===e.type.name),c=l.start((null==s?void 0:s.depth)||0)-1,d=Lo(a,t,o,s,c);a=d.state;const p=d.pos,u=a.doc.nodeAt(d.pos);if(!u)return;const m=p+(s||r).node.content.size,g=e.tr.replaceWith(p,m,u),h=n.Selection.atEnd(u),f=n.TextSelection.create(g.doc,p+h.to+1);return g.setSelection(f),g},Bo=e=>{const{view:t,...l}=e,o=d.useLocalization(),[n,i]=b.useState(!1),s=!(!t||!Zl(t.state.selection.$from,e=>"table"===e.type.spec.tableRole)),c=b.useCallback(()=>{i(!0)},[]),p=b.useCallback(()=>{i(!1),null==t||t.focus()},[t]),u=b.useCallback(e=>{if(t&&e){const l=Ao(t.state,e);l&&t.dispatch(l)}p()},[t,p]);return b.createElement(b.Fragment,null,b.createElement(r.Button,{type:"button",title:o.toLanguageString(Kl.tableProperties,Wl[Kl.tableProperties]),icon:"table-properties",svgIcon:a.tablePropertiesIcon,onClick:c,disabled:!s,..._l,...l}),n&&b.createElement(Ho,{onClose:p,onSave:u,view:t}))},Do=[{textKey:Kl.tablePropertiesAlignLeft,text:Wl[Kl.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:a.tableAlignMiddleLeftIcon},{textKey:Kl.tablePropertiesAlignCenter,text:Wl[Kl.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:a.tableAlignMiddleCenterIcon},{textKey:Kl.tablePropertiesAlignRight,text:Wl[Kl.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:a.tableAlignMiddleRightIcon},{textKey:Kl.tablePropertiesNoAlignment,text:Wl[Kl.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:a.tableAlignRemoveIcon}],Mo=[{textKey:Kl.tablePropertiesLeft,text:Wl[Kl.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:a.tablePositionStartIcon},{textKey:Kl.tablePropertiesCenter,text:Wl[Kl.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:a.tablePositionCenterIcon},{textKey:Kl.tablePropertiesRight,text:Wl[Kl.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:a.tablePositionEndIcon}].map(e=>({...e,style:ko[e.value]})),zo=[{textKey:Kl.tablePropertiesTop,text:Wl[Kl.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:a.positionTopIcon},{textKey:Kl.tablePropertiesBottom,text:Wl[Kl.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:a.positionBottomIcon}],Fo=[{textKey:Kl.tablePropertiesNone,text:Wl[Kl.tablePropertiesNone],value:"none"},{textKey:Kl.tablePropertiesUsingScopeAttribute,text:Wl[Kl.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:Kl.tablePropertiesUsingIdAttributes,text:Wl[Kl.tablePropertiesUsingIdAttributes],value:"id"}],Ho=e=>{const t=b.useMemo(()=>{const t=e.view&&e.view.state;return t?wo(t):vo},[e.view]),l=d.useLocalization(),[o,n]=b.useState(0),a=b.useCallback(e=>{n(e.selected)},[]),c=b.useRef(null),u=b.useRef(null),m=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),R=b.useRef(null),I=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,r,o,n,a,i,s,d,p,g,b,z,F,H,W,K,U,V,O;const q={rows:(null==(t=c.current)?void 0:t.value)||0,columns:(null==(l=u.current)?void 0:l.value)||0,width:m.current?m.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==(r=y.current)?void 0:r.value)||"",heightUnit:(null==(o=C.current)?void 0:o.value)||"",position:(null==(a=null==(n=w.current)?void 0:n.value)?void 0:a.value)||null,textAlign:null!=(i=S.current)&&i.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=R.current)?void 0:z.value)||""),className:String((null==(F=I.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!=(V=D.current)&&V.value?D.current.value.value:null,associateHeaders:null!=(O=M.current)&&O.value?M.current.value.value:"none"};e.onSave.call(void 0,q)},[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(Kl.tablePropertiesRows,Wl[Kl.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(Kl.tablePropertiesColumns,Wl[Kl.tablePropertiesColumns])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:u,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(Kl.tablePropertiesWidth,Wl[Kl.tablePropertiesWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:m,defaultValue:t.width,min:0,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.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:Ql,popupSettings:Xl}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesHeight,Wl[Kl.tablePropertiesHeight])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:h,defaultValue:t.height,min:0,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.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:Ql.filter(e=>"%"!==e),popupSettings:Xl}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesPosition,Wl[Kl.tablePropertiesPosition])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:w,defaultValue:Mo.find(e=>e.value===t.position),popupSettings:Xl,data:Mo.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),textField:"text",dataItemKey:"value",valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesAlignment,Wl[Kl.tablePropertiesAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:S,defaultValue:Do.find(e=>e.value===t.textAlign),data:Do.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),textField:"text",dataItemKey:"value",popupSettings:Xl,valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesCellSpacing,Wl[Kl.tablePropertiesCellSpacing])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:f,defaultValue:t.cellSpacing,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.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(Kl.tablePropertiesCellPadding,Wl[Kl.tablePropertiesCellPadding])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:v,defaultValue:t.cellPadding,placeholder:l.toLanguageString(Kl.sizeAuto,Wl[Kl.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(Kl.tablePropertiesTableBackground,Wl[Kl.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(Kl.tablePropertiesBorderWidth,Wl[Kl.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(Kl.tablePropertiesBorderColor,Wl[Kl.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(Kl.tablePropertiesBorderStyle,Wl[Kl.tablePropertiesBorderStyle])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:x,defaultValue:Yl.find(e=>e.value===t.borderStyle),popupSettings:Xl,data:Yl.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(Kl.tablePropertiesCollapseBorders,Wl[Kl.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(Kl.tablePropertiesId,Wl[Kl.tablePropertiesId])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:R,defaultValue:t.id}))),b.createElement("div",{className:"k-form-field"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesCssClass,Wl[Kl.tablePropertiesCssClass])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:I,defaultValue:t.className}))),b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("legend",{className:"k-form-legend"},l.toLanguageString(Kl.tablePropertiesAccessibility,Wl[Kl.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(Kl.tablePropertiesCaption,Wl[Kl.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(Kl.tablePropertiesCaptionPosition,Wl[Kl.tablePropertiesCaptionPosition])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:D,defaultValue:zo.find(e=>e.value===t.captionPosition),data:zo.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),popupSettings:Xl,textField:"text",dataItemKey:"value",valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesCaptionAlignment,Wl[Kl.tablePropertiesCaptionAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:B,defaultValue:Do.find(e=>e.value===t.captionAlignment),data:Do.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),popupSettings:Xl,textField:"text",dataItemKey:"value",valueRender:ho,itemRender:fo}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(Kl.tablePropertiesHeaderRows,Wl[Kl.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(Kl.tablePropertiesHeaderCols,Wl[Kl.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(Kl.tablePropertiesAssociateHeaders,Wl[Kl.tablePropertiesAssociateHeaders])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:M,defaultValue:Fo.find(e=>e.value===t.associateHeaders),data:Fo.map(e=>({...e,text:l.toLanguageString(e.textKey,e.text)})),popupSettings:Xl,textField:"text",dataItemKey:"value"})))))))),W=b.createElement(p.TabStrip,{selected:o,onSelect:a,animation:!1,keepTabsMounted:!0},b.createElement(p.TabStripTab,{title:l.toLanguageString(Kl.tablePropertiesGeneral,Wl[Kl.tablePropertiesGeneral])},F),b.createElement(p.TabStripTab,{title:l.toLanguageString(Kl.tablePropertiesAdvanced,Wl[Kl.tablePropertiesAdvanced])},H)),K=[b.createElement(r.Button,{onClick:e.onClose,key:"cancel"},l.toLanguageString(Kl.tablePropertiesCancel,Wl[Kl.tablePropertiesCancel])),b.createElement(r.Button,{themeColor:"primary",key:"save",onClick:z},l.toLanguageString(Kl.tablePropertiesSave,Wl[Kl.tablePropertiesSave]))];return b.createElement(i.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(Kl.tableProperties,Wl[Kl.tableProperties]),onClose:e.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},W,b.createElement(i.WindowActionsBar,{layout:"end"},...K))};e.EditorTools=void 0,(t=>{function l(e){return br(e)}t.createAlignTool=l;class r extends(l(e.EditorToolsSettings.alignLeft)){}t.AlignLeft=r;class o extends(l(e.EditorToolsSettings.alignRight)){}t.AlignRight=o;class n extends(l(e.EditorToolsSettings.alignCenter)){}t.AlignCenter=n;class i extends(l(e.EditorToolsSettings.alignJustify)){}function s(e){return hr.createInsertTableTool(e)}t.AlignJustify=i,t.createInsertTableTool=s;class c extends(s(e.EditorToolsSettings.insertTable)){}t.InsertTable=c;class d extends gr.InsertTablePopup{}function p(e){return vr.createStyleDropDownList(e)}t.InsertTablePopup=d,t.createStyleDropDownList=p;class u extends(p(e.EditorToolsSettings.fontSize)){}t.FontSize=u;class m extends(p(e.EditorToolsSettings.fontName)){}function g(e){return yr.createFormatBlockDropDownList(e)}t.FontName=m,t.ForeColor=t=>b.createElement(kr,{...e.EditorToolsSettings.foreColor,...t}),t.BackColor=t=>b.createElement(kr,{...e.EditorToolsSettings.backColor,...t}),t.createFormatBlockDropDownList=g;class h extends(g(e.EditorToolsSettings.formatBlock)){}function f(e){return wr.createUndoTool(e)}function v(e){return wr.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 Sr.createIndentTool(e)}t.Redo=y,t.createIndentTool=C;class w extends(C(e.EditorToolsSettings.indent)){}function S(e){return xr.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 R extends(S(e.EditorToolsSettings.subscript)){}t.Subscript=R;class I extends(S(e.EditorToolsSettings.superscript)){}function N(e){return Er(e)}t.Superscript=I,t.createInsertImageTool=N;class L extends(N(e.EditorToolsSettings.image)){}function A(e){return Tr.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 Pr.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 Rr.createOutdentTool(e)}t.UnorderedList=F,t.BulletedList=t=>{const l=[{icon:"list-unordered",svgIcon:a.listUnorderedIcon,textKey:Kl.listStyleDisc,style:"disc"},{icon:"list-unordered",svgIcon:a.listUnorderedIcon,textKey:Kl.listStyleCircle,style:"circle"},{icon:"list-unordered-square",svgIcon:a.listUnorderedSquareIcon,textKey:Kl.listStyleSquare,style:"square"}];return b.createElement($r,{listType:e.EditorToolsSettings.bulletList.listType,items:l,icon:"list-unordered",svgIcon:a.listUnorderedIcon,titleKey:e.EditorToolsSettings.bulletList.messages.title,...t})},t.NumberedList=t=>{const l=[{icon:"list-ordered",svgIcon:a.listOrderedIcon,textKey:Kl.listStyleDecimal},{icon:"list-roman-upper",svgIcon:a.listRomanUpperIcon,textKey:Kl.listStyleUpperRoman,style:"upper-roman"},{icon:"list-roman-lower",svgIcon:a.listRomanLowerIcon,textKey:Kl.listStyleLowerRoman,style:"lower-roman"},{icon:"list-latin-big",svgIcon:a.listLatinBigIcon,textKey:Kl.listStyleUpperLatin,style:"upper-latin"},{icon:"list-latin-small",svgIcon:a.listLatinSmallIcon,textKey:Kl.listStyleLowerLatin,style:"lower-latin"}];return b.createElement($r,{listType:e.EditorToolsSettings.orderedList.listType,items:l,icon:"list-ordered",svgIcon:a.listOrderedIcon,titleKey:e.EditorToolsSettings.orderedList.messages.title,...t})},t.TableCellProperties=uo,t.TableProperties=Bo,t.createOutdentTool=H;class W extends(H(e.EditorToolsSettings.outdent)){}function K(e){return Lr.createAddRowBeforeTool(e)}function U(e){return Lr.createAddRowAfterTool(e)}function V(e){return Lr.createAddColumnBeforeTool(e)}function O(e){return Lr.createAddColumnAfterTool(e)}function q(e){return Lr.createDeleteRowTool(e)}function j(e){return Lr.createDeleteColumnTool(e)}function _(e){return Lr.createDeleteTableTool(e)}function $(e){return Lr.createMergeCellsTool(e)}function G(e){return Lr.createSplitCellTool(e)}t.Outdent=W,t.Print=e=>b.createElement(Mr,{...e}),t.Pdf=e=>b.createElement(Hr,{...e}),t.SelectAll=e=>b.createElement(Kr,{...e}),t.CleanFormatting=e=>b.createElement(Or,{...e}),t.createAddRowBeforeTool=K,t.createAddRowAfterTool=U,t.createAddColumnBeforeTool=V,t.createAddColumnAfterTool=O,t.createDeleteRowTool=q,t.createDeleteColumnTool=j,t.createDeleteTableTool=_,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(V(e.EditorToolsSettings.addColumnBefore)){}t.AddColumnBefore=X;class Y extends(O(e.EditorToolsSettings.addColumnAfter)){}t.AddColumnAfter=Y;class Z extends(q(e.EditorToolsSettings.deleteRow)){}t.DeleteRow=Z;class ee extends(j(e.EditorToolsSettings.deleteColumn)){}t.DeleteColumn=ee;class te extends(_(e.EditorToolsSettings.deleteTable)){}t.DeleteTable=te;class le extends($(e.EditorToolsSettings.mergeCells)){}t.MergeCells=le;class re extends(G(e.EditorToolsSettings.splitCell)){}function oe(e){return Ar.createUnlinkTool(e)}t.SplitCell=re,t.createUnlinkTool=oe;class ne extends(oe(e.EditorToolsSettings.unlink)){}function ae(e){return Br.createViewHtmlTool(e)}t.Unlink=ne,t.createViewHtmlTool=ae;class ie extends(ae(e.EditorToolsSettings.viewHtml)){}t.ViewHtml=ie;t.FindAndReplace=class extends jr{}})(e.EditorTools||(e.EditorTools={}));const Wo=e.EditorUtils.getHtml,Ko={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,"nodes",{enumerable:!0,get:function(){return n.nodes}}),e.Editor=ur,e.ProseMirror=Ko,e.editorPropsKey=ql,e.getHtml=Wo,e.marks=k,e.parseContent=x});
@@ -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: 1791898079,version:"16.2.1-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: 1791956987,version:"16.2.1-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
7
7
  productName: 'KendoReact',
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
- publishDate: 1791898079,
11
- version: '16.2.1-develop.1',
10
+ publishDate: 1791956987,
11
+ version: '16.2.1-develop.2',
12
12
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
13
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-editor",
3
- "version": "16.2.1-develop.1",
3
+ "version": "16.2.1-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.25.5",
29
29
  "@progress/kendo-licensing": "^1.7.2",
30
- "@progress/kendo-react-buttons": "16.2.1-develop.1",
31
- "@progress/kendo-react-common": "16.2.1-develop.1",
32
- "@progress/kendo-react-dialogs": "16.2.1-develop.1",
33
- "@progress/kendo-react-dropdowns": "16.2.1-develop.1",
34
- "@progress/kendo-react-form": "16.2.1-develop.1",
35
- "@progress/kendo-react-inputs": "16.2.1-develop.1",
36
- "@progress/kendo-react-intl": "16.2.1-develop.1",
37
- "@progress/kendo-react-layout": "16.2.1-develop.1",
38
- "@progress/kendo-react-pdf": "16.2.1-develop.1",
39
- "@progress/kendo-react-popup": "16.2.1-develop.1",
30
+ "@progress/kendo-react-buttons": "16.2.1-develop.2",
31
+ "@progress/kendo-react-common": "16.2.1-develop.2",
32
+ "@progress/kendo-react-dialogs": "16.2.1-develop.2",
33
+ "@progress/kendo-react-dropdowns": "16.2.1-develop.2",
34
+ "@progress/kendo-react-form": "16.2.1-develop.2",
35
+ "@progress/kendo-react-inputs": "16.2.1-develop.2",
36
+ "@progress/kendo-react-intl": "16.2.1-develop.2",
37
+ "@progress/kendo-react-layout": "16.2.1-develop.2",
38
+ "@progress/kendo-react-pdf": "16.2.1-develop.2",
39
+ "@progress/kendo-react-popup": "16.2.1-develop.2",
40
40
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
41
41
  "react": "^18.0.0 || ^19.0.0",
42
42
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -78,7 +78,7 @@
78
78
  "package": {
79
79
  "productName": "KendoReact",
80
80
  "productCode": "KENDOUIREACT",
81
- "publishDate": 1791898079,
81
+ "publishDate": 1791956987,
82
82
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
83
83
  }
84
84
  },