UNPKG

@progress/kendo-vue-editor

Version:
15 lines 73.8 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ /** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-buttons"),require("@progress/kendo-vue-common"),require("@progress/kendo-editor-common"),require("@progress/kendo-vue-pdf"),require("@progress/kendo-svg-icons"),require("@progress/kendo-vue-dialogs"),require("@progress/kendo-vue-intl"),require("@progress/kendo-vue-form"),require("@progress/kendo-vue-inputs"),require("@progress/kendo-vue-dropdowns"),require("@progress/kendo-vue-popup"),require("@progress/kendo-vue-layout")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-buttons","@progress/kendo-vue-common","@progress/kendo-editor-common","@progress/kendo-vue-pdf","@progress/kendo-svg-icons","@progress/kendo-vue-dialogs","@progress/kendo-vue-intl","@progress/kendo-vue-form","@progress/kendo-vue-inputs","@progress/kendo-vue-dropdowns","@progress/kendo-vue-popup","@progress/kendo-vue-layout"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueEditor={},e.Vue,e.KendoVueButtons,e.KendoVueCommon,e.KendoEditorCommon,e.KendoVuePdf,e.KendoSVGIcons,e.KendoVueDialogs,e.KendoVueIntl,e.KendoVueForm,e.KendoVueInputs,e.KendoVueDropdowns,e.KendoVuePopup,e.KendoVueLayout)}(this,(function(e,t,n,o,i,s,a,r,l,d,c,p,u,h){"use strict";const m=e=>({[e]:{default:null,getFromDOM:t=>t.getAttribute(e),setDOMAttr:(t,n)=>{n[e]=t}}}),g=e=>{const t={};return Array.from(e.attributes).forEach((e=>{t[e.nodeName]=e.nodeValue})),t},f={...m("style"),...m("class"),...m("id")},v=i.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:f});v.table_row.attrs=v.table_row.attrs||{},v.table_row.attrs.style={default:null},v.table_row.attrs.class={default:null},v.table_row.attrs.id={default:null},v.table_row.toDOM=e=>["tr",e.attrs,0],v.table_row.parseDOM=[{tag:"tr",getAttrs:g}],v.table.attrs=v.table.attrs||{},v.table.attrs.style={default:null},v.table.attrs.class={default:null},v.table.attrs.id={default:null},v.table.toDOM=e=>["table",e.attrs,["tbody",0]],v.table.parseDOM=[{tag:"table",getAttrs:g}];const k={...i.nodes,...v},w='\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\n\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content table {\n white-space: pre-wrap;\n}\n\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\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\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\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\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n',b='\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\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\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\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\n .ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n }\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',y="editor.bold",C="editor.italic",S="editor.underline",I="editor.strikethrough",N="editor.subscript",T="editor.superscript",R="editor.hyperlink",x="editor.insertFile",L="editor.print",V="editor.selectAll",M="editor.cleanFormatting",D="editor.pdf",A="editor.foregroundColor",z="editor.backgroundColor",E="editor.foregroundColorAriaLabel",B="editor.backgroundColorAriaLabel",P="editor.createTable",F="editor.insertTableHint",H="editor.addRowBefore",$="editor.addRowAfter",O="editor.addColumnBefore",j="editor.addColumnAfter",W="editor.deleteRow",K="editor.deleteColumn",U="editor.deleteTable",_="editor.mergeCells",q="editor.splitCell",G="editor.hyperlink-dialog-title",J="editor.hyperlink-dialog-content-address",Q="editor.hyperlink-dialog-content-title",X="editor.hyperlink-dialog-content-newwindow",Y="editor.hyperlink-dialog-cancel",Z="editor.hyperlink-dialog-insert",ee="editor.insertfile-dialog-title",te="editor.insertfile-dialog-content-address",ne="editor.insertfile-dialog-content-title",oe="editor.insertfile-dialog-cancel",ie="editor.insertfile-dialog-insert",se="editor.image",ae="editor.image-dialog-title",re="editor.image-address",le="editor.image-title",de="editor.image-altText",ce="editor.image-width",pe="editor.image-height",ue="editor.image-cancel",he="editor.image-insert",me="editor.viewHtml",ge="editor.viewHtml-dialog-title",fe="editor.viewHtml-cancel",ve="editor.viewHtml-update",ke="editor.unlink",we="editor.undo",be="editor.redo",ye="editor.fontSize",Ce="editor.fontName",Se="editor.format",Ie="editor.alignLeft",Ne="editor.alignRight",Te="editor.alignCenter",Re="editor.alignJustify",xe="editor.indent",Le="editor.outdent",Ve="editor.orderedList",Me="editor.bulletList",De="editor.findReplace-tool-title",Ae="editor.findReplace-dialog-title",ze="editor.findReplace-tab-find",Ee="editor.findReplace-tab-replace",Be="editor.findReplace-findWhat",Pe="editor.findReplace-replaceWith",Fe="editor.findReplace-replace",He="editor.findReplace-replaceAll",$e="editor.findReplace-matchCase",Oe="editor.findReplace-matchWord",je="editor.findReplace-matchCyclic",We="editor.findReplace-useRegExp",Ke="editor.findReplace-prevMatch",Ue="editor.findReplace-nextMatch",_e="editor.findReplace-matches",qe="editor.iframeTitle",Ge={[y]:"Bold",[C]:"Italic",[S]:"Underline",[I]:"Strikethrough",[N]:"Subscript",[T]:"Superscript",[ke]:"Remove hyperlink",[we]:"Undo",[be]:"Redo",[ye]:"Font Size",[Ce]:"Font Name",[Se]:"Format",[Ie]:"Align text left",[Ne]:"Align text right",[Te]:"Center text",[Re]:"Justify",[xe]:"Indent",[Le]:"Outdent",[Ve]:"Insert ordered list",[Me]:"Insert unordered list",[L]:"Print",[V]:"Select All",[M]:"Clean formatting",[D]:"Export as PDF",[A]:"Color",[z]:"Background color",[E]:"Set ForeGround color",[B]:"Set Background color",[P]:"Create a table",[F]:"Create a {0} x {1} table",[H]:"Add row above",[$]:"Add row below",[O]:"Add column on the left",[j]:"Add column on the right",[W]:"Delete row",[K]:"Delete column",[U]:"Delete table",[_]:"Merge cells",[q]:"Split cell",[R]:"Insert hyperlink",[G]:"Insert hyperlink",[J]:"Web address",[Q]:"Title",[X]:"Open link in new window",[Y]:"Cancel",[Z]:"Insert",[x]:"Insert file",[ee]:"Insert file",[te]:"Web address",[ne]:"Title",[oe]:"Cancel",[ie]:"Insert",[se]:"Insert image",[ae]:"Insert image",[re]:"Web address",[le]:"Title",[de]:"Alternate text",[ce]:"Width (px)",[pe]:"Height (px)",[ue]:"Cancel",[he]:"Insert",[me]:"View HTML",[ge]:"View HTML",[fe]:"Cancel",[ve]:"Update",[De]:"Find and Replace",[Ae]:"Find and Replace",[ze]:"Find",[Ee]:"Replace",[Be]:"Find What:",[Pe]:"Replace With",[Fe]:"Replace",[He]:"Replace All",[$e]:"Match Case",[Oe]:"Match whole word only",[je]:"Match cyclic (Wrap around)",[We]:"Regular Expression",[Ke]:"Prev",[Ue]:"Next",[_e]:"{0} of {1} matches",[qe]:"Editable area. Press Alt + F10 for toolbar."},Je=y,Qe=C,Xe=S,Ye=I,Ze=N,et=T,tt=ke,nt=we,ot=be,it=ye,st=Ce,at=Se,rt=Ie,lt=Ne,dt=Te,ct=Re,pt=xe,ut=Le,ht=Ve,mt=Me,gt=L,ft=V,vt=M,kt=D,wt=A,bt=z,yt=E,Ct=P,St=F,It=H,Nt=$,Tt=O,Rt=j,xt=W,Lt=K,Vt=U,Mt=_,Dt=q,At=R,zt=G,Et=J,Bt=Q,Pt=X,Ft=Y,Ht=Z,$t=x,Ot=ee,jt=te,Wt=ne,Kt=oe,Ut=ie,_t=se,qt=ae,Gt=re,Jt=le,Qt=de,Xt=ce,Yt=pe,Zt=ue,en=he,tn=me,nn=ge,on=fe,sn=ve,an=De,rn=Ae,ln=ze,dn=Ee,cn=Be,pn=Pe,un=Fe,hn=He,mn=$e,gn=Oe,fn=je,vn=We,kn=Ke,wn=Ue,bn=_e,yn=qe,Cn={...i.indentRules.listsTypes};function Sn(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}e.EditorToolsSettings=void 0,(e=>{const t={type:"button"};e.bold={...i.bold,props:{icon:"bold",svgIcon:a.boldIcon,...t},messages:{title:Je},commandName:"Bold"},e.italic={...i.italic,props:{icon:"italic",svgIcon:a.italicIcon,...t},messages:{title:Qe},commandName:"Italic"},e.underline={...i.underline,props:{icon:"underline",svgIcon:a.underlineIcon,...t},messages:{title:Xe},commandName:"Underline"},e.strikethrough={...i.strikethrough,props:{icon:"strikethrough",svgIcon:a.strikethroughIcon,...t},messages:{title:Ye},commandName:"Strikethrough"},e.subscript={...i.subscript,props:{icon:"subscript",svgIcon:a.subscriptIcon,...t},messages:{title:Ze},commandName:"Subscript"},e.superscript={...i.superscript,props:{icon:"supscript",svgIcon:a.supscriptIcon,...t},messages:{title:et},commandName:"Superscript"},e.link={...i.link,props:{icon:"link",svgIcon:a.linkIcon,...t},messages:{insertHyperlink:At,insertHyperlinkDialogTitle:zt,insertHyperlinkAddress:Et,insertHyperlinkTitle:Bt,insertHyperlinkNewWindow:Pt,insertHyperlinkCancel:Ft,insertHyperlinkInsert:Ht},commandName:"Link"},e.insertFile={...i.link,props:{icon:"file-add",svgIcon:a.fileAddIcon,...t},messages:{insertHyperlink:$t,insertHyperlinkDialogTitle:Ot,insertHyperlinkAddress:jt,insertHyperlinkTitle:Wt,insertHyperlinkNewWindow:"",insertHyperlinkCancel:Kt,insertHyperlinkInsert:Ut},commandName:"InsertFile",linkTarget:!1},e.insertTable={props:{icon:"table-add",svgIcon:a.tableAddIcon,...t},messages:{createTable:Ct,createTableHint:St},commandName:"InsertTable"},e.addRowBefore={command:i.addRowBefore,props:{icon:"table-row-insert-above",svgIcon:a.tableRowInsertAboveIcon,...t},messages:{title:It},commandName:"AddRowBefore"},e.addRowAfter={command:i.addRowAfter,props:{icon:"table-row-insert-below",svgIcon:a.tableRowInsertBelowIcon,...t},messages:{title:Nt},commandName:"AddRowAfter"},e.addColumnBefore={command:i.addColumnBefore,props:{icon:"table-column-insert-left",svgIcon:a.tableColumnInsertLeftIcon,...t},messages:{title:Tt},commandName:"AddColumnBefore"},e.addColumnAfter={command:i.addColumnAfter,props:{icon:"table-column-insert-right",svgIcon:a.tableColumnInsertRightIcon,...t},messages:{title:Rt},commandName:"AddColumnAfter"},e.deleteRow={command:i.deleteRow,props:{icon:"table-row-delete",svgIcon:a.tableRowDeleteIcon,...t},messages:{title:xt},commandName:"DeleteRow"},e.deleteColumn={command:i.deleteColumn,props:{icon:"table-column-delete",svgIcon:a.tableColumnDeleteIcon,...t},messages:{title:Lt},commandName:"DeleteColumn"},e.deleteTable={command:i.deleteTable,props:{icon:"table-delete",svgIcon:a.tableDeleteIcon,...t},messages:{title:Vt},commandName:"DeleteTable"},e.mergeCells={command:i.mergeCells,props:{icon:"cells-merge",svgIcon:a.cellsMergeIcon,...t},messages:{title:Mt},commandName:"MergeCells"},e.splitCell={command:i.splitCell,props:{icon:"cell-split-horizontally",svgIcon:a.cellSplitHorizontallyIcon,...t},messages:{title:Dt},commandName:"SplitCell"},e.print={props:{icon:"print",svgIcon:a.printIcon,...t},messages:{title:gt}},e.selectAll={props:{icon:"select-all",svgIcon:a.selectAllIcon,...t},messages:{title:ft}},e.pdf={props:{icon:"file-pdf",svgIcon:a.filePdfIcon,...t},messages:{title:kt}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:{icon:"clear-css",svgIcon:a.clearCssIcon,...t},messages:{title:vt},commandName:"CleanFormatting"},e.image={node:"image",props:{icon:"image",svgIcon:a.imageIcon,...t},messages:{insertImage:_t,insertImageDialogTitle:qt,insertImageAddress:Gt,insertImageTitle:Jt,insertImageAltText:Qt,insertImageWidth:Xt,insertImageHeight:Yt,insertImageCancel:Zt,insertImageInsert:en},commandName:"InsertImage"},e.viewHtml={props:{icon:"code",svgIcon:a.codeIcon,...t},messages:{viewHtml:tn,viewHtmlDialogTitle:nn,viewHtmlCancel:on,viewHtmlUpdate:sn},commandName:"SetContent"},e.findAndReplace={props:{icon:"search",svgIcon:a.searchIcon,...t},messages:{findReplaceToolTitle:an,findReplaceDialogTitle:rn,findReplaceTabFind:ln,findReplaceTabReplace:dn,findReplaceFindWhat:cn,findReplaceReplaceWith:pn,findReplaceReplace:un,findReplaceReplaceAll:hn,findReplaceMatchCase:mn,findReplaceMatchWord:gn,findReplaceMatchCyclic:fn,findReplaceUseRegExp:vn,findReplacePrevMatch:kn,findReplaceNextMatch:wn,findReplaceMatches:bn}},e.unlink={...i.link,props:{icon:"unlink",svgIcon:a.unlinkIcon,...t},messages:{title:tt},commandName:"Unlink"},e.undo={command:i.undo,props:{icon:"undo",svgIcon:a.undoIcon,...t},messages:{title:nt},commandName:"Undo"},e.redo={command:i.redo,props:{icon:"redo",svgIcon:a.redoIcon,...t},messages:{title:ot},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:Ge[it],value:"",localizationKey:it},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:Ge[st],value:"",localizationKey:st},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:Ge[at],value:"",localizationKey:at},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={color:"color",colorPickerProps:{icon:"foreground-color",svgIcon:a.foregroundColorIcon,view:"palette",title:wt},commandName:"ForeColor"},e.backColor={color:"background-color",colorPickerProps:{icon:"droplet",svgIcon:a.dropletIcon,view:"palette",title:bt},commandName:"BackColor"},e.alignLeft={actions:[...i.alignLeftRules],props:{icon:"align-left",svgIcon:a.alignLeftIcon,...t},messages:{title:rt},commandName:"AlignLeft"},e.alignRight={actions:[...i.alignRightRules],props:{icon:"align-right",svgIcon:a.alignRightIcon,...t},messages:{title:lt},commandName:"AlignRight"},e.alignCenter={actions:[...i.alignCenterRules],props:{icon:"align-center",svgIcon:a.alignCenterIcon,...t},messages:{title:dt},commandName:"AlignCenter"},e.alignJustify={actions:[...i.alignJustifyRules],props:{icon:"align-justify",svgIcon:a.alignJustifyIcon,...t},messages:{title:ct},commandName:"AlignJustify"},e.alignRemove={actions:[...i.alignRemoveRules],props:{icon:"align-remove",svgIcon:a.alignRemoveIcon,...t},messages:{},commandName:"AlignRemove"},e.indent={actions:i.indentRules.nodes,listsTypes:Cn,props:{icon:"indent",svgIcon:a.indentIcon,...t},messages:{title:pt},commandName:"Indent"},e.outdent={actions:i.outdentRules.nodes,listsTypes:Cn,props:{icon:"outdent",svgIcon:a.outdentIcon,...t},messages:{title:ut},commandName:"Outdent"},e.orderedList={listType:Cn.orderedList,props:{icon:"list-ordered",svgIcon:a.listOrderedIcon,...t},messages:{title:ht},commandName:"OrderedList",types:{...Cn}},e.bulletList={listType:Cn.bulletList,props:{icon:"list-unordered",svgIcon:a.listUnorderedIcon,...t},messages:{title:mt},commandName:"UnorderedList",types:{...Cn}}})(e.EditorToolsSettings||(e.EditorToolsSettings={}));const In=t.defineComponent({name:"KendoInsertLinkDialog",emits:{close:null},props:{view:Object,settings:Object,dir:String},data(){const{view:e,settings:t}=this.$props,n=!!e&&i.getMark(e.state,e.state.schema.marks[t.mark]);return{hrefValue:n&&n.attrs.href||void 0,titleValue:n&&n.attrs.title||void 0,targetValue:n&&!!n.attrs.target||void 0}},inject:{kendoLocalizationService:{default:null}},mounted(){this.href=o.getRef(this,"href"),this.title=o.getRef(this,"title"),this.target=o.getRef(this,"target"),this.href&&this.href.focus()},render(){let e,i;const{settings:s,dir:a}=this.$props,p=l.provideLocalizationService(this),{insertHyperlinkDialogTitle:u,insertHyperlinkAddress:h,insertHyperlinkTitle:m,insertHyperlinkNewWindow:g,insertHyperlinkCancel:f,insertHyperlinkInsert:v}=s.messages,k=p.toLanguageString(g,Ge[g]),w=t.createVNode(d.Form,null,{default:()=>[t.createVNode(d.FormElement,{horizontal:!0},{default:()=>[t.createVNode(d.FieldWrapper,null,{default:()=>[t.createVNode("label",{for:"k-editor-link-url",class:"k-form-label"},[p.toLanguageString(h,Ge[h])]),t.createVNode("div",{class:"k-form-field-wrap"},[t.createVNode(c.Input,{id:"k-editor-link-url",ref:o.setRef(this,"href"),onInput:this.hrefChange,value:this.hrefValue},null)])]}),t.createVNode(d.FieldWrapper,null,{default:()=>[t.createVNode("label",{for:"k-editor-link-text",class:"k-form-label"},[p.toLanguageString(m,Ge[m])]),t.createVNode("div",{class:"k-form-field-wrap"},[t.createVNode(c.Input,{id:"k-editor-link-text",ref:o.setRef(this,"title"),onInput:this.titleChange,value:this.titleValue},null)])]}),!1!==s.linkTarget&&t.createVNode(d.FieldWrapper,null,{default:()=>[t.createVNode("div",{class:"k-form-label"},null),t.createVNode("div",{class:"k-form-field-wrap"},[t.createVNode(c.Checkbox,{id:"k-editor-link-target",ref:o.setRef(this,"target"),label:k,onChange:this.targetChange,checked:this.targetValue},null)])]})]})]});return t.createVNode(r.Window,{initialWidth:450,initialHeight:250,windowClass:"k-editor-window",title:p.toLanguageString(u,Ge[u]),onClose:this.onClose,dir:a,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},{default:()=>[w,t.createVNode(r.DialogActionsBar,null,{default:()=>[t.createVNode(n.Button,{type:"button",onClick:this.onClose,dir:a,key:"cancel"},Sn(e=p.toLanguageString(f,Ge[f]))?e:{default:()=>[e]}),t.createVNode(n.Button,{type:"button",onClick:this.onInsert,themeColor:"primary",dir:a,key:"insert"},Sn(i=p.toLanguageString(v,Ge[v]))?i:{default:()=>[i]})]})]})},methods:{hrefChange(e){this.hrefValue=e.value},titleChange(e){this.titleValue=e.value},targetChange(e){this.targetValue=e.value},onClose(){this.$props.view.focus(),this.$emit("close")},onInsert(){const e=this.$props.view,t=this.$props.settings.mark,n={href:this.href?this.hrefValue:void 0,title:this.title?this.titleValue:void 0,target:this.target&&this.targetValue?"_blank":void 0};i.applyLink({mark:t,attrs:n},this.$props.settings.commandName)(e.state,e.dispatch),this.onClose()}}}),{bold:Nn,underline:Tn,italic:Rn}=e.EditorToolsSettings,xn="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Ln=e=>{const t=i.chainCommands(i.exitCode,((t,n)=>{const o=e&&e.types&&e.types.hardBreak||"hard_break",i=t.schema.nodes[o];return n&&n(t.tr.replaceSelectionWith(i.create()).scrollIntoView()),!0})),n=e&&e.types&&e.types.listItem||"list_item",o=e&&e.toolsSettings||{};return{"Mod-b":(e,t)=>i.toggleInlineFormat(o.bold||Nn)(e,t),"Mod-i":(e,t)=>i.toggleInlineFormat(o.italic||Rn)(e,t),"Mod-u":(e,t)=>i.toggleInlineFormat(o.underline||Tn)(e,t),"Mod-z":i.undo,"Shift-Mod-z":i.redo,...xn?{}:{"Mod-y":i.redo},Backspace:i.undoInputRule,"Mod-Enter":t,"Shift-Enter":t,...xn?{"Ctrl-Enter":t}:{},Enter:(e,t)=>i.splitListItem(e.schema.nodes[n])(e,t),Tab:i.goToNextCell(1),"Shift-Tab":i.goToNextCell(-1)}},Vn=new i.PluginKey("editor-props");e.EditorUtils=void 0,(e=>{e.alignBlocks=function(e,t,n){return!!i.alignBlocks(t,n)(e.state,e.dispatch)},e.applyInlineStyle=function(e,t,n){return i.applyInlineStyle(t,n)(e.state,e.dispatch)},e.applyLink=function(e,t,n){return i.applyLink(t,n)(e.state,e.dispatch)},e.canIndentList=function(e,t){return i.canIndentAsListItem(e,t)},e.canInsert=function(e,t){return i.canInsert(e,t)},e.canOutdentList=function(e,t){return i.canOutdentAsListItem(e,{listsTypes:t,nodes:[]})},e.convertMsLists=function(e){return i.convertMsLists(e)},e.createDocument=function(e,t,n){return i.parseContent(i.trimWhitespace(t),e,void 0!==n?n:{preserveWhitespace:"full"})},e.createTable=function(e,t,n){return i.createTable(e,t,n)},e.formatBlockElements=function(e,t,n){return i.formatBlockElements(t,n)(e.state,e.dispatch)},e.getBlockFormats=function(e){return i.getBlockFormats(e)},e.getHtml=function(e){return i.getHtml(e)},e.getInlineStyles=function(e,t){return i.getInlineStyles(e,t)},e.getMark=function(e,t){return i.getMark(e,t)},e.hasMark=function(e,t){return i.hasMark(e,t)},e.hasNode=function(e,t){return i.hasNode(e,t)},e.indentBlocks=function(e,t,n,o){return!!i.indentBlocks(t,n,o)(e.state,e.dispatch)},e.indentHtml=function(e){return i.indentHtml(e)},e.insertNode=function(e,t,n){i.insertNode(t,n)(e.state,e.dispatch)},e.isAligned=function(e,t){return i.isAligned(e,t)},e.isIndented=function(e,t,n){return i.isIndented(e,t,n)},e.removeComments=function(e){return i.removeComments(e)},e.removeTag=function(e,t){return i.removeTag(e,t)},e.pasteCleanup=function(e,t){return i.pasteCleanup(e,t)},e.sanitizeClassAttr=function(e){i.sanitizeClassAttr(e)},e.sanitizeStyleAttr=function(e){i.sanitizeStyleAttr(e)},e.removeAttribute=function(e){i.removeAttribute(e)},e.sanitize=function(e){return i.sanitize(e)},e.replaceImageSourcesFromRtf=function(e,t){return i.replaceImageSourcesFromRtf(e,t)},e.textHighlight=function(e){return i.textHighlight(e)},e.imageResizing=function(e){return i.imageResizing(e)},e.setHtml=function(e,t,n,o){const s=i.trimWhitespace(t);i.setHtml(s,n,o)(e.state,e.dispatch)},e.toggleInlineFormat=function(e,t,n,o){return i.toggleInlineFormat(t,n,o)(e.state,e.dispatch)},e.toggleList=function(e,t,n){return i.toggleList(e.state,e.dispatch,e,t,n)},e.getShortcuts=function(e){return Ln(e)},e.propsKey=Vn,e.imageResizeKey=i.imageResizeKey,e.marks={...i.marks},e.nodes={...k}})(e.EditorUtils||(e.EditorUtils={}));const Mn=(t,n)=>{const o=n.tr||t.state.tr.setSelection(new i.AllSelection(t.state.doc)).replaceSelectionWith(n.doc||e.EditorUtils.createDocument(t.state.schema,n.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(o))},Dn="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),An={name:"@progress/kendo-vue-editor",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1640240773,version:"6.3.0",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},{alignRemove:zn}=e.EditorToolsSettings,En=t.defineComponent({name:"KendoAlign",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},...n.Button.props},inject:{kendoLocalizationService:{default:null}},render(){const{view:e,settings:o,...s}=this.$props,a=e&&e.state,r=!!a&&i.isAligned(a,o.actions),d=l.provideLocalizationService(this),c=o.messages.title,p={...s,selected:r,togglable:!0,title:d.toLanguageString(c,Ge[c]),...o.props};return t.h(n.Button,{onClick:this.handleClick,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...p})},methods:{handleClick(){const{view:e,settings:t}=this.$props,n=e&&e.state,o=!!n&&i.isAligned(n,t.actions),s=o?zn.actions:t.actions,a=o?zn.commandName:t.commandName;return e&&i.alignBlocks(s,a)(e.state,e.dispatch)},preventDefault(e){e.preventDefault()}}}),Bn=t.defineComponent({name:"KendoIndent",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},...n.Button.props},inject:{kendoLocalizationService:{default:null}},render(){const{view:e,render:o,settings:s,...a}=this.$props,r=e&&e.state,d=r&&r.schema.nodes,c=d&&d[s.listsTypes.listItem],p=s.actions,u=!!r&&(i.isIndented(r,p,a.dir)||p.some((e=>d[e.node]&&i.hasNode(r,d[e.node]))))&&!i.hasNode(r,c),h=!!r&&i.canIndentAsListItem(r,c),m=u||h,g=l.provideLocalizationService(this),f=s.messages.title,v={...a,disabled:!m,title:g.toLanguageString(f,Ge[f]),...s.props};return t.h(n.Button,{onClick:this.handleClick,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...v})},methods:{handleClick(){const e=this.view&&this.view.state,t=e&&e.schema.nodes,n=t&&t[this.settings.listsTypes.listItem],o=this.settings.actions,s=!!e&&(i.isIndented(e,o,this.dir)||o.some((n=>t[n.node]&&i.hasNode(e,t[n.node]))))&&!i.hasNode(e,n),a=!!e&&i.canIndentAsListItem(e,n);this.view&&a?i.sinkListItem(n)(this.view.state,this.view.dispatch):this.view&&s&&i.indentBlocks(o,this.settings.commandName,this.dir)(this.view.state,this.view.dispatch)},preventDefault(e){e.preventDefault()}}}),Pn=t.defineComponent({name:"KendoList",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},...n.Button.props},inject:{kendoLocalizationService:{default:null}},render(){const{view:e,render:o,settings:s,...a}=this.$props;let r=!1;const d=l.provideLocalizationService(this),c=s.messages.title,p=s.types,u=s.listType;if(e){const t=e.state,n=t.schema.nodes,o=i.hasNode(t,n[p.orderedList]),s=i.hasNode(t,n[p.bulletList]);r=u===p.orderedList?o&&!s:!o&&s}const h={...a,selected:r,togglable:!0,title:d.toLanguageString(c,Ge[c]),...s.props};return t.h(n.Button,{onClick:this.handleClick,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...h})},methods:{handleClick(){const{view:e,settings:t}=this.$props,n=t.types,o=t.listType;this.view&&i.toggleList(e.state,e.dispatch,e,{listType:o,...n},t.commandName)},preventDefault(e){e.preventDefault()}}}),Fn=t.defineComponent({name:"KendoOutdent",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},...n.Button.props},inject:{kendoLocalizationService:{default:null}},render(){const{view:e,render:o,settings:s,...a}=this.$props,r=e&&e.state,d=!!r&&i.isIndented(r,s.actions,a.dir);r&&r.schema.nodes[s.listsTypes.listItem];const c=!!r&&i.canOutdentAsListItem(r,{nodes:s.actions,listsTypes:s.listsTypes}),p=d||c,u=l.provideLocalizationService(this),h=s.messages.title,m={...a,disabled:!p,title:u.toLanguageString(h,Ge[h]),...s.props};return t.h(n.Button,{onClick:this.handleClick,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...m})},methods:{handleClick(){const{view:e,settings:t,dir:n}=this.$props,o=e&&e.state,s=!!o&&i.isIndented(o,t.actions,n),a=o&&o.schema.nodes[t.listsTypes.listItem],r=!!o&&i.canOutdentAsListItem(o,{nodes:t.actions,listsTypes:t.listsTypes});e&&r?i.liftListItem(a)(e.state,e.dispatch):e&&s&&i.indentBlocks(t.actions,t.commandName,n)(e.state,e.dispatch)},preventDefault(e){e.preventDefault()}}}),Hn=t.defineComponent({name:"KendoInlineFormat",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},...n.Button.props},inject:{kendoLocalizationService:{default:null}},render(){const{view:e,render:o,settings:s,...a}=this.$props,r=e&&e.state,{mark:d,altMarks:c,altStyle:p}=s,u={mark:d,altMarks:c,altStyle:p},h=l.provideLocalizationService(this),m=s.messages.title,g={...a,selected:!!r&&i.hasMark(r,u),togglable:!0,title:h.toLanguageString(m,Ge[m]),...s.props};return t.h(n.Button,{onClick:this.handleClick,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...g})},methods:{handleClick(){const e=this.view&&this.view.state,{mark:t,altMarks:n,altStyle:o}=this.settings,s={mark:t,altMarks:n,altStyle:o};return this.view&&i.toggleInlineFormat(s,e&&e.tr.setMeta("commandName",this.settings.commandName))(this.view.state,this.view.dispatch)},preventDefault(e){e.preventDefault()}}}),$n={userSelect:"none"},On=function(e,...t){return t.forEach(((t,n)=>{e=e.replace("{"+n+"}",String(t))})),e},jn=t.defineComponent({name:"KendoFontName",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},...p.DropDownList.props},inject:{kendoLocalizationService:{default:null}},render(){const{view:e,render:n,dataItems:o,settings:s,defaultItem:a,...r}=this.$props,{style:d}=s,c=e?i.getInlineStyles(e.state,{name:d,value:/^.+$/}):[],u=1===new Set(c).size?c[0]:null,h=o||s.items;let m=a||s.defaultItem;const g=l.provideLocalizationService(this);m&&m.localizationKey&&(m={...m},m.text=m.localizationKey?g.toLanguageString(m.localizationKey,Ge[m.localizationKey]):m.text);const f={...r,...s.props,value:u&&h.find((e=>e.value===u)),dataItems:h,defaultItem:m,itemRender:this.customItemRender,textField:"text",dataItemKey:"value",leftRightKeysNavigation:!1,title:m.text,onChange:this.onFontNameChange,style:$n};return t.h(p.DropDownList,f)},methods:{customItemRender:(e,t,n)=>n.dataItem.style?e("li",{class:n.itemClass,onClick:n.onClick},[e("span",{style:n.dataItem.style},[...t.children])]):t,onFontNameChange(e){const{view:t,settings:n}=this.$props,{style:o}=n,s=e.target.value;if(t){i.applyInlineStyle({style:o,value:s.value},n.commandName)(t.state,t.dispatch);const{event:a}=e;a&&"click"===a.type&&t.focus()}}}}),Wn=t.defineComponent({name:"KendoFormatBlock",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},...p.DropDownList.props},inject:{kendoLocalizationService:{default:null}},render(){const{view:e,render:n,dataItems:o,settings:s,defaultItem:a,...r}=this.$props,d=o||s.items,c=e&&e.state,u=c?i.getBlockFormats(c):[],h=1===new Set(u).size?u[0]:null;let m=a||s.defaultItem;const g=l.provideLocalizationService(this);m&&m.localizationKey&&(m={...m},m.text=m.localizationKey?g.toLanguageString(m.localizationKey,Ge[m.localizationKey]):m.text);const f={...r,...s.props,value:h&&d.find((e=>e.value===h)),dataItems:d,defaultItem:m,itemRender:this.customItemRender,textField:"text",dataItemKey:"value",leftRightKeysNavigation:!1,popupSettings:{width:"170px"},title:m.text,onChange:this.onFormatBlockChange,style:$n};return t.h(p.DropDownList,f)},methods:{customItemRender:(e,t,n)=>n.dataItem.style?e("li",{class:n.itemClass,onClick:n.onClick},[e("span",{style:n.dataItem.style},[...t.children])]):t,onFormatBlockChange(e){const{view:t,settings:n}=this.$props,o=e.target.value;if(t&&i.formatBlockElements(o.value,n.commandName)(t.state,t.dispatch)){const{event:n}=e;n&&"click"===n.type&&t.focus()}}}}),Kn=t.defineComponent({name:"KendoProseMirror",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},...n.Button.props},inject:{kendoLocalizationService:{default:null}},computed:{command(){return this.settings.command||o.noop}},render(){const{view:e,settings:o,...i}=this.$props,s=l.provideLocalizationService(this),a=o.messages.title,r=e&&e.state,d={...i,disabled:!!r&&!this.command(r),title:s.toLanguageString(a,Ge[a]),...o.props};return t.h(n.Button,{onClick:this.handleClick,...d})},methods:{handleClick(){this.view&&this.command(this.view.state,(e=>this.view.dispatch(e.setMeta("commandName",this.settings.commandName))))}}}),Un=t.defineComponent({name:"KendoLinkTool",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},...n.Button.props},inject:{kendoLocalizationService:{default:null}},data:()=>({openedDialog:!1}),render(){const{view:e,settings:o,...s}=this.$props,a=e&&e.state,r=!a||a.selection.empty,d=a&&i.getMark(a,a.schema.marks[o.mark]),c=l.provideLocalizationService(this),{insertHyperlink:p}=o.messages,u={...s,key:"link",disabled:r&&!d,title:c.toLanguageString(p,Ge[p]),...o.props},h=[t.h(n.Button,{onClick:this.toggleDialog,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...u}),this.openedDialog&&e&&t.createVNode(In,{key:"insertLinkDialog",settings:o,dir:this.dir,view:e,onClose:this.toggleDialog},null)||null];return t.createVNode("span",null,[h])},methods:{toggleDialog(){this.openedDialog=!this.openedDialog},preventDefault(e){e.preventDefault()}}}),_n=t.defineComponent({name:"KendoUnlink",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},...n.Button.props},inject:{kendoLocalizationService:{default:null}},render(){const{view:e,settings:o,...s}=this.$props,a={mark:o.mark},r=!!e&&i.hasMark(e.state,a),d=l.provideLocalizationService(this),c=o.messages.title,p={...s,disabled:!r,title:d.toLanguageString(c,Ge[c]),...o.props};return t.h(n.Button,{onClick:this.handleClick,...p})},methods:{handleClick(){const{view:e,settings:t}=this.$props,n={mark:t.mark};e&&i.removeLink(n,e.state.tr.setMeta("commandName",t.commandName))(e.state,e.dispatch)}}}),{cleanFormatting:qn}=e.EditorToolsSettings,Gn=i.cleanFormatting(),Jn=t.defineComponent({name:"KendoCleanFormatting",props:{view:Object,settings:{type:Object,default:function(){return qn}},...n.Button.props},inject:{kendoLocalizationService:{default:null}},render(){const{view:e,render:o,settings:i,...s}=this.$props,a=i.messages.title,r=l.provideLocalizationService(this),d={...s,disabled:!e||!Gn(e.state),title:r.toLanguageString(a,Ge[a]),...i.props};return t.h(n.Button,{onClick:this.handleClick,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...d})},methods:{handleClick(){this.view&&Gn(this.view.state,(e=>{e.setMeta("commandName",this.settings.commandName),this.view.dispatch(e)}))},preventDefault(e){e.preventDefault()}}}),{selectAll:Qn}=e.EditorToolsSettings,Xn=t.defineComponent({name:"KendoSelectAll",props:{view:Object,settings:Object,...n.Button.props},inject:{kendoLocalizationService:{default:null}},render(){const{view:e,settings:o=Qn,...i}=this.$props,s=o.messages.title,a={...i,title:l.provideLocalizationService(this).toLanguageString(s,Ge[s]),...o.props};return t.h(n.Button,{onClick:this.handleClick,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...a})},methods:{handleClick(){this.view&&(i.selectAll(this.view.state,this.view.dispatch),this.view.focus())},preventDefault(e){e.preventDefault()}}});function Yn(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const Zn=t.defineComponent({name:"KendoInsertImageDialog",emits:{close:null},props:{view:Object,settings:Object,dir:String},inject:{kendoLocalizationService:{default:null}},data(){const{view:e,settings:t}=this.$props,n=e&&e.state;let o={};return n&&n.selection instanceof i.NodeSelection&&n.selection.node.type===n.schema.nodes[t.node]&&(o=n.selection.node.attrs),{srcValue:o.src,altValue:o.alt,titleValue:o.title,widthValue:o.width,heightValue:o.height}},mounted(){this.src=o.getRef(this,"src"),this.altText=o.getRef(this,"altText"),this.title=o.getRef(this,"title"),this.width=o.getRef(this,"width"),this.height=o.getRef(this,"height"),this.src&&this.src.focus()},render(){let e,s;const{view:a,settings:p,dir:u}=this.$props,{insertImageDialogTitle:h,insertImageAddress:m,insertImageTitle:g,insertImageAltText:f,insertImageWidth:v,insertImageHeight:k,insertImageCancel:w,insertImageInsert:b}=p.messages,y=l.provideLocalizationService(this),C=a&&a.state;C&&C.selection instanceof i.NodeSelection&&C.selection.node.type===C.schema.nodes[p.node]&&C.selection.node.attrs;const S=t.createVNode(d.Form,null,{default:()=>[t.createVNode(d.FormElement,{horizontal:!0},{default:()=>[t.createVNode(d.FieldWrapper,null,{default:()=>[t.createVNode("label",{for:"k-editor-image-url",class:"k-form-label"},[y.toLanguageString(m,Ge[m])]),t.createVNode("div",{class:"k-form-field-wrap"},[t.createVNode(c.Input,{id:"k-editor-image-url",value:this.srcValue,onInput:this.handleSrcInput,ref:o.setRef(this,"src")},null)])]}),t.createVNode(d.FieldWrapper,null,{default:()=>[t.createVNode("label",{for:"k-editor-image-url",class:"k-form-label"},[y.toLanguageString(f,Ge[f])]),t.createVNode("div",{class:"k-form-field-wrap"},[t.createVNode(c.Input,{id:"k-editor-image-alt",value:this.altValue,onInput:this.handleAltInput,ref:o.setRef(this,"altText")},null)])]}),t.createVNode(d.FieldWrapper,null,{default:()=>[t.createVNode("label",{for:"k-editor-image-title",class:"k-form-label"},[y.toLanguageString(g,Ge[g])]),t.createVNode("div",{class:"k-form-field-wrap"},[t.createVNode(c.Input,{id:"k-editor-image-title",value:this.titleValue,onInput:this.handleTitleInput,ref:o.setRef(this,"title")},null)])]}),t.createVNode(d.FieldWrapper,null,{default:()=>[t.createVNode("label",{for:"k-editor-image-width",class:"k-form-label"},[y.toLanguageString(v,Ge[v])]),t.createVNode("div",{class:"k-form-field-wrap"},[t.createVNode(c.Input,{id:"k-editor-image-width",value:this.widthValue,onInput:this.handleWidthInput,ref:o.setRef(this,"width")},null)])]}),t.createVNode(d.FieldWrapper,null,{default:()=>[t.createVNode("label",{for:"k-editor-image-height",class:"k-form-label"},[y.toLanguageString(k,Ge[k])]),t.createVNode("div",{class:"k-form-field-wrap"},[t.createVNode(c.Input,{id:"k-editor-image-height",value:this.heightValue,onInput:this.handleHeightInput,ref:o.setRef(this,"height")},null)])]})]})]}),I=[t.createVNode(n.Button,{type:"button",onClick:this.onClose,dir:u,key:"cancel"},Yn(e=y.toLanguageString(w,Ge[w]))?e:{default:()=>[e]}),t.createVNode(n.Button,{type:"button",disabled:!this.srcValue,onClick:this.onInsert,themeColor:"primary",dir:u,key:"insert"},Yn(s=y.toLanguageString(b,Ge[b]))?s:{default:()=>[s]})];return t.createVNode(r.Window,{initialWidth:500,initialHeight:360,windowClass:"k-editor-window",title:y.toLanguageString(h,Ge[h]),onClose:this.onClose,key:"dialog",dir:u,style:"rtl"===u?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},{default:()=>[S,t.createVNode(r.DialogActionsBar,null,Yn(I)?I:{default:()=>[I]})]})},methods:{handleSrcInput(e){this.srcValue=e.value},handleAltInput(e){this.altValue=e.value},handleTitleInput(e){this.titleValue=e.value},handleWidthInput(e){this.widthValue=e.value},handleHeightInput(e){this.heightValue=e.value},onClose(){this.$props.view.focus(),this.$emit("close")},onInsert(){const{view:e,settings:t}=this.$props,n=e.state.schema.nodes[t.node],o={src:this.src?this.srcValue:null,title:this.title?this.titleValue:null,alt:this.altText?this.altValue:null,width:this.width?this.widthValue:null,height:this.height?this.heightValue:null},s=Object.keys(o).filter((e=>null!==o[e]&&""!==o[e])).reduce(((e,t)=>Object.assign(e,{[t]:o[t]})),{}),a=n.createAndFill(s);i.insertNode(a,!0)(e.state,(n=>e.dispatch(n.setMeta("commandName",t.commandName).setMeta("args",s)))),this.onClose()}}}),eo=t.defineComponent({name:"KendoInsertImage",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},dir:String,...n.Button.props},inject:{kendoLocalizationService:{default:null}},data:()=>({openedDialog:!1}),render(){const{view:e,settings:o,...s}=this.$props,a=e&&e.state,r=a?a.schema.nodes[o.node]:void 0,d=l.provideLocalizationService(this),{insertImage:c}=o.messages,p={...s,key:"insertImage",disabled:!r||!a||!i.canInsert(a,r),title:d.toLanguageString(c,Ge[c]),...o.props},u=[t.h(n.Button,{onClick:this.toggleDialog,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...p}),this.openedDialog&&e&&t.createVNode(Zn,{key:"insertImageDialog",view:e,settings:o,dir:p.dir,onClose:this.toggleDialog},null)||null];return t.createVNode("span",null,[u])},methods:{toggleDialog(){this.openedDialog=!this.openedDialog},preventDefault(e){e.preventDefault()}}}),to=t.defineComponent({name:"KendoPopupGrid",props:{rows:Number,columns:Number,createTableMessage:String,createTableHintMessage:String,onCellclick:Function,onDown:Function},data:()=>({row:-1,col:-1}),render(){const e=[],n=this.$props.columns*this.$props.rows,{row:o,col:i}=this.$data;let s=this.$props.createTableMessage;i>-1&&(s=On(this.$props.createTableHintMessage,o+1,i+1));const a=function(e,n,o){const i=Math.floor(e/this.$props.columns),s=e%this.$props.columns,a=s<=o&&i<=n;return t.createVNode("span",{class:"k-ct-cell k-disabled"+(a?" k-selected":""),onMouseenter:()=>this.cellMouseEnter({row:i,col:s}),onClick:()=>this.onCellClick(i,s),key:e},null)};for(let t=0;t<n;t++)e.push(a.call(this,t,o,i));const r=[t.createVNode("div",{onMouseleave:()=>this.handleMouseLeave(),key:"cells",style:{borderColor:"inherit"},onPointerdown:this.onMouseDown},[e]),t.createVNode("div",{class:"k-status",key:"status",onPointerdown:this.onMouseDown},[s])];return t.createVNode("span",null,[r])},methods:{cellMouseEnter({row:e,col:t}){this.row=e,this.col=t},handleMouseLeave(){this.row=-1,this.col=-1},onCellClick(e,t){this.$emit("cellclick",e,t)},onMouseDown(e){this.$emit("down",e)}}}),no=t.defineComponent({name:"KendoInsertTablePopup",emits:{close:null},props:{show:{type:Boolean,required:!0},createTableMessage:{type:String,required:!0},createTableHintMessage:{type:String,required:!0},anchor:String,rows:{type:Number,default:6},columns:{type:Number,default:8},dir:String,onTableinsert:Function},data:()=>({pointerdown:!1}),updated(){},mounted(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)},unmounted(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)},render(){const{show:e,anchor:n,dir:o,rows:i,columns:s}=this.$props,a="rtl"===o?"right":"left";return t.createVNode(u.Popup,{anchor:n,anchorAlign:{horizontal:a,vertical:"bottom"},popupAlign:{horizontal:a,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-border-up",show:e,style:"rtl"===o?{direction:"rtl"}:void 0},{default:()=>[t.createVNode(to,{rows:i,columns:s,createTableMessage:this.$props.createTableMessage,createTableHintMessage:this.$props.createTableHintMessage,onCellclick:this.onTableInsert,onDown:this.onPointerDown},null)]})},methods:{onTableInsert(e,t){this.$emit("tableinsert",e,t)},onWindowDown(e){const{anchor:t}=this.$props;t&&(t===e.target||t.firstElementChild===e.target)||(this.$props.show&&!this.pointerdown&&this.$emit("close"),this.pointerdown=!1)},onPointerDown(){this.pointerdown=!0}}}),oo=t.defineComponent({name:"KendoInsertTable",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},dir:String,...n.Button.props},inject:{kendoLocalizationService:{default:null}},created(){this.buttonRef=o.guid()},data:()=>({openedPopup:!1}),render(){const{view:e,settings:o,...s}=this.$props,a=e&&e.state,r=l.provideLocalizationService(this),{createTable:d,createTableHint:c}=o.messages,p=r.toLanguageString(d,Ge[d]),u=r.toLanguageString(c,Ge[c]),h={...s,disabled:!a||!i.canInsert(a,a.schema.nodes.table),key:"InsertTable",title:p,...o.props},m=[t.h(n.Button,{ref:this.buttonRef,onClick:this.togglePopup,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...h}),e&&t.createVNode(no,{key:"insertTablePopup",createTableMessage:p,createTableHintMessage:u,dir:this.dir,anchor:this.buttonRef,show:this.openedPopup,onClose:this.closePopup,onTableinsert:this.onTableInsert},null)||null];return t.createVNode("span",null,[m])},methods:{togglePopup(){this.openedPopup=!this.openedPopup},closePopup(){this.openedPopup&&this.togglePopup()},onTableInsert(e,t){const{view:n}=this.$props;if(!n)return;const o=i.createTable(n.state.schema.nodes,e,t);o&&i.insertNode(o,!0)(n.state,n.dispatch),n.focus(),this.closePopup()},preventDefault(e){e.preventDefault()}}});function io(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const so=t.defineComponent({name:"KendoViewHtmlDialog",emits:{close:null},props:{view:Object,settings:Object,dir:String},created(){this.textAreaId=o.guid()},inject:{kendoLocalizationService:{default:null}},data(){const{view:e}=this.$props;return{textAreaValue:i.indentHtml(i.getHtml(e.state))}},mounted(){this.htmlArea=o.getRef(this,"htmlArea"),this.htmlArea&&this.htmlArea.focus()},render(){let e,i;const{settings:s,dir:a}=this.$props,d=l.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:u}=s.messages,h=t.createVNode("span",{class:"k-input k-textarea k-input-md k-input-solid k-rounded-md k-editor-textarea"},[t.createVNode("textarea",{ref:o.setRef(this,"htmlArea"),onInput:this.textAreaChange,value:this.textAreaValue,id:this.textAreaId,role:"textbox",class:"k-input-inner !k-overflow-auto",tabindex:"0","aria-multiline":"true",style:"resize: none;"},null)]),m=[t.createVNode(n.Button,{type:"button",onClick:this.onClose,dir:a,key:"cancel"},io(e=d.toLanguageString(p,Ge[p]))?e:{default:()=>[e]}),t.createVNode(n.Button,{type:"button",onClick:this.onUpdate,themeColor:"primary",dir:a,key:"update"},io(i=d.toLanguageString(u,Ge[u]))?i:{default:()=>[i]})];return t.createVNode(r.Window,{initialHeight:400,initialWidth:500,windowClass:"k-editor-window",title:d.toLanguageString(c,Ge[c]),onClose:this.onClose,key:"dialog",dir:a,style:"rtl"===a?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},{default:()=>[h,t.createVNode(r.DialogActionsBar,null,io(m)?m:{default:()=>[m]})]})},methods:{textAreaChange(e){this.textAreaValue=e.target.value},onUpdate(){const{view:e,settings:t}=this.$props,n=i.trimWhitespace(this.htmlArea?this.textAreaValue:""),{preserveWhitespace:o}=Vn.getState(e.state);i.setHtml(n,t.commandName,{preserveWhitespace:o})(e.state,e.dispatch),this.onClose()},onClose(){this.$props.view.focus(),this.$emit("close")}}}),ao=t.defineComponent({name:"KendoViewHtml",props:{view:Object,settings:{type:Object,default:function(){return{messages:{}}}},...n.Button.props},inject:{kendoLocalizationService:{default:null}},data:()=>({openedDialog:!1}),render(){const{view:e,settings:o,...i}=this.$props,s=l.provideLocalizationService(this),a=o.messages.viewHtml,r={...i,key:"viewHtml",title:s.toLanguageString(a,Ge[a]),...o.props},d=[t.h(n.Button,{onClick:this.toggleDialog,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...r}),this.openedDialog&&e&&t.createVNode(so,{key:"viewHtmlDialog",view:e,settings:o,dir:r.dir,onClose:this.toggleDialog},null)||null];return t.createVNode("span",null,[d])},methods:{toggleDialog(){this.openedDialog=!this.openedDialog},preventDefault(e){e.preventDefault()}}}),{pdf:ro,savePdfOptions:lo}=e.EditorToolsSettings,co=t.defineComponent({name:"KendoPdf",props:{view:Object,settings:Object,...n.Button.props},inject:{kendoLocalizationService:{default:null}},render(){const{view:e,render:o,settings:i=ro,savePdfOptions:s,savePdfCallback:a,...r}=this.$props,d=i.messages.title,c={...r,title:l.provideLocalizationService(this).toLanguageString(d,Ge[d]),...i.props};return t.h(n.Button,{onClick:this.handleClick,onMousedown:this.preventDefault,onPointerdown:this.preventDefault,...c})},methods:{handleClick(){this.view&&s.savePDF(this.view.dom,{...lo,...this.savePdfOptions||{}},this.savePdfCallback)},preventDefault(e){e.preventDefault()}}}),