@progress/kendo-react-editor 5.6.0-dev.202208090813 → 5.6.0-dev.202208100947

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("react-dom"),require("@progress/kendo-react-intl"),require("react-transition-group"),require("@progress/kendo-drawing"),require("react-dom/server")):"function"==typeof define&&define.amd?define(["react","prop-types","@progress/kendo-licensing","react-dom","@progress/kendo-react-intl","react-transition-group","@progress/kendo-drawing","react-dom/server"],t):"object"==typeof exports?exports.KendoReactEditor=t(require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("react-dom"),require("@progress/kendo-react-intl"),require("react-transition-group"),require("@progress/kendo-drawing"),require("react-dom/server")):e.KendoReactEditor=t(e.React,e.PropTypes,e.KendoLicensing,e.ReactDOM,e.KendoReactIntl,e.ReactTransitionGroup,e.KendoDrawing,e.ReactDOMServer)}(self,(function(e,t,n,r,o,i,a,s){return(()=>{"use strict";var l={1801:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Editor=void 0;var s=n(3899),l=n(189),c=n(2888),u=n(3808),d=n(431),p=n(2346),f=n(3605),h=n(2804),m=n(3695),g=n(5538),v=n(580),y=n(1457),b=h.EditorToolsSettings.link,k=h.EditorToolsSettings.bold,w=h.EditorToolsSettings.italic,C=h.EditorToolsSettings.underline,x=n(3131),O=n(9302),S=n(7363),E=function(e){function t(t){var n=e.call(this,t)||this;if(n.state={view:void 0,linkDialog:!1},n._element=null,n._contentElement=null,n.iframe=null,n.trOnChange=null,n.htmlOnChange=null,n.focus=function(){n.view&&n.view.focus()},n.renderDialog=function(e,t,r){return n.state[r]&&s.createElement(e,{view:n.view,settings:t,dir:n.props.dir,onClose:function(){var e;return n.setState(((e={})[r]=!1,e))}})},n.renderTool=function(e,t){var r=s.createElement(e,{view:n.view,dir:n.props.dir,key:t});return r.type===c.ToolbarSeparator?s.createElement(e,{key:t}):r},n.updateTools=function(e,t){n.setState({view:e})},n.filterTransaction=function(e,t){var r={target:n,transaction:e,state:t};return!1!==(n.props.onExecute&&n.props.onExecute.call(void 0,r))},n.onPasteHtml=function(e){if(n.props.onPasteHtml&&n.pasteEvent){var t={target:n,pastedHtml:e,nativeEvent:n.pasteEvent},r=n.props.onPasteHtml.call(void 0,t);if(n.pasteEvent=void 0,"string"==typeof r)return r}return e},n.dispatchTransaction=function(e){var t=e.docChanged;if(n.props.onChange&&t){n.trOnChange=e;var r=e.doc,o=e.doc.type.schema,i=n,a={target:i,value:r,get html(){return i.htmlOnChange=g.EditorUtils.getHtml({doc:r,schema:o}),i.htmlOnChange},transaction:e,schema:o};n.props.onChange.call(void 0,a)}!n.view||void 0!==n.props.value&&t||n.view.updateState(n.view.state.apply(e))},n.onFocus=function(e,t){if(n.props.onFocus){var r={target:n,nativeEvent:t};n.props.onFocus.call(void 0,r)}return!1},n.onBlur=function(e,t){if(n.props.onBlur){var r={target:n,nativeEvent:t};n.props.onBlur.call(void 0,r)}return!1},n.onPaste=function(e,t){return n.props.onPasteHtml&&(n.pasteEvent=t),!1},void 0!==O)O.validatePackage(S.packageMetadata);else{var r="License activation failed for ".concat(S.packageMetadata.name,"\n");r+="The @progress/kendo-licensing script is not loaded.\n",r+="See ".concat(S.packageMetadata.licensingDocsUrl," for more information.\n"),console.warn(r)}return n}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return null!==this.trOnChange?this.trOnChange.doc:void 0!==this.props.value?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentElement",{get:function(){return this._contentElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return this._view},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.iframe&&x.firefox||this.initialize()},t.prototype.componentDidUpdate=function(e){var t=this.props.value,n=this.view;void 0!==t&&n&&((0,y.updateEditorValue)(n,t,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)},t.prototype.componentWillUnmount=function(){this.view&&this.view.destroy(),this._view=void 0;var e=this.iframe&&this.iframe.contentWindow;if(e){this._contentElement&&this._contentElement.parentNode&&this._contentElement.parentNode.removeChild(this._contentElement);for(var t=e.document.head;t&&t.firstChild;)t.removeChild(t.firstChild)}},t.prototype.render=function(){var e=this,t=this.props,n=t.tools,r=void 0===n?[]:n,o=t.defaultEditMode,i=void 0===o?"iframe":o,a=t.preserveWhitespace,l=void 0===a?"full":a,d=t.style,p=t.className;this.view&&(v.editorPropsKey.getState(this.view.state).preserveWhitespace=l);var f=this.props.contentStyle;void 0===f&&void 0===(d||{}).height&&(f={height:"300px"});var h=r.map((function(t,n){return Array.isArray(t)?s.createElement(c.ButtonGroup,{key:n},t.map(e.renderTool,n)):e.renderTool(t,n)}));return s.createElement("div",{ref:function(t){return e._element=t},className:(0,u.classNames)("k-widget k-editor",p,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:d},h.length>0&&s.createElement(c.Toolbar,{keyboardNavigation:this.props.keyboardNavigation},h),"iframe"===i?s.createElement("div",{className:"k-editor-content"},s.createElement("iframe",{onLoad:x.firefox?function(){e.initialize()}:void 0,ref:function(t){return e.iframe=t},frameBorder:"0",style:f,className:"k-iframe"})):s.createElement("div",{style:f,className:"k-editor-content"},s.createElement("div",{ref:function(t){return e._contentElement=t},suppressContentEditableWarning:!0})),this.renderDialog(m.EditorDialogs.InsertLinkDialog,b,"linkDialog"))},t.prototype.initialize=function(){var e=this,t=this.iframe&&this.iframe.contentWindow;if(t){var n=t.document;[f.defaultStyle,f.tablesStyles,"rtl"===this.props.dir?f.rtlStyles:void 0].forEach((function(e){if(e){var t=n.createElement("style");t.appendChild(n.createTextNode(e)),n.head.appendChild(t)}}));var r=n.createElement("meta");r.setAttribute("charset","utf-8"),n.head.appendChild(r),this._contentElement=n.createElement("div"),n.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content")}var o=this._contentElement;if(o){var s=this.props.preserveWhitespace,l=void 0===s?"full":s,c=[new d.Plugin({view:function(){return{update:e.updateTools}},key:new d.PluginKey("toolbar-tools-update-plugin")}),new d.Plugin({filterTransaction:this.filterTransaction,key:new d.PluginKey("onExecute-event-plugin")}),new d.Plugin({key:v.editorPropsKey,state:{init:function(){return{preserveWhitespace:l}},apply:function(e,t){return t}}}),(0,d.spacesFix)(),(0,d.caretColor)(),(0,d.history)(),(0,d.dropCursor)(),(0,d.gapCursor)(),(0,d.tableEditing)()],u=i(i({},g.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:k,italic:w,underline:C}})),{"Mod-k":function(){var t=e.state.linkDialog,n=e.view;if(n){var r=n.state,o=r.selection.empty,i=(0,d.getMark)(r,r.schema.marks[b.mark]);t||o&&!i||e.setState({linkDialog:!0})}return!t}}),h=this.props,m=h.defaultContent,y=void 0===m?"":m,x=h.value,O=h.onMount,S=x&&"string"!=typeof x?x:g.EditorUtils.createDocument(new d.Schema({nodes:p.nodes,marks:p.marks}),x||y,{preserveWhitespace:l}),E={state:d.EditorState.create({plugins:a(a([],c,!0),[(0,d.keymap)(u),(0,d.keymap)(d.baseKeymap)],!1),doc:S}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste}},I={plugins:c,shortcuts:u,target:this,viewProps:E,dom:o},N=this._view=O&&O.call(void 0,I)||new d.EditorView({mount:o},E);this.setState({view:N})}},t.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,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},t}(s.Component);t.Editor=E},3605:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.rtlStyles=t.tablesStyles=t.defaultStyle=void 0,t.defaultStyle='\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\n.k-editor-resize-wrap-element {\n display: inline-block;\n position: relative;\n}\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\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.ProseMirror.resize-cursor-vertical {\n cursor: sn-resize;\n cursor: row-resize;\n}\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',t.tablesStyles='\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 /* 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',t.rtlStyles="body { direction: rtl }"},2346:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.nodes=t.marks=void 0;var r=n(431);Object.defineProperty(t,"marks",{enumerable:!0,get:function(){return r.marks}}),Object.defineProperty(t,"nodes",{enumerable:!0,get:function(){return r.nodes}})},4394:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getShortcuts=void 0;var o=n(431),i=n(2804),a=i.EditorToolsSettings.bold,s=i.EditorToolsSettings.underline,l=i.EditorToolsSettings.italic,c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.getShortcuts=function(e){var t=(0,o.chainCommands)(o.exitCode,(function(t,n){var r=e&&e.types&&e.types.hardBreak||"hard_break",o=t.schema.nodes[r];return n&&n(t.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0})),n=e&&e.types&&e.types.listItem||"list_item",i=e&&e.toolsSettings||{};return r(r(r(r({"Mod-b":function(e,t){return(0,o.toggleInlineFormat)(i.bold||a)(e,t)},"Mod-i":function(e,t){return(0,o.toggleInlineFormat)(i.italic||l)(e,t)},"Mod-u":function(e,t){return(0,o.toggleInlineFormat)(i.underline||s)(e,t)},"Mod-z":o.undo,"Shift-Mod-z":o.redo},r({},c?{}:{"Mod-y":o.redo})),{Backspace:o.undoInputRule,"Mod-Enter":t,"Shift-Enter":t}),r({},c?{"Ctrl-Enter":t}:{})),{Enter:function(e,t){return(0,o.splitListItem)(e.schema.nodes[n])(e,t)},Tab:(0,o.goToNextCell)(1),"Shift-Tab":(0,o.goToNextCell)(-1)})}},2804:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.EditorToolsSettings=t.listsTypes=void 0;var i,a,s=n(3364),l=n(431);t.listsTypes=r({},l.indentRules.listsTypes),i=t.EditorToolsSettings||(t.EditorToolsSettings={}),a={type:"button"},i.bold=r(r({},l.bold),{props:r({icon:"bold"},a),messages:{title:s.keys.bold},commandName:"Bold"}),i.italic=r(r({},l.italic),{props:r({icon:"italic"},a),messages:{title:s.keys.italic},commandName:"Italic"}),i.underline=r(r({},l.underline),{props:r({icon:"underline"},a),messages:{title:s.keys.underline},commandName:"Underline"}),i.strikethrough=r(r({},l.strikethrough),{props:r({icon:"strikethrough"},a),messages:{title:s.keys.strikethrough},commandName:"Strikethrough"}),i.subscript=r(r({},l.subscript),{props:r({icon:"subscript"},a),messages:{title:s.keys.subscript},commandName:"Subscript"}),i.superscript=r(r({},l.superscript),{props:r({icon:"superscript"},a),messages:{title:s.keys.superscript},commandName:"Superscript"}),i.link=r(r({},l.link),{props:r({icon:"link-horizontal"},a),messages:{insertHyperlink:s.keys.insertHyperlink,insertHyperlinkDialogTitle:s.keys.insertHyperlinkDialogTitle,insertHyperlinkAddress:s.keys.insertHyperlinkAddress,insertHyperlinkTitle:s.keys.insertHyperlinkTitle,insertHyperlinkNewWindow:s.keys.insertHyperlinkNewWindow,insertHyperlinkCancel:s.keys.insertHyperlinkCancel,insertHyperlinkInsert:s.keys.insertHyperlinkInsert},commandName:"Link"}),i.insertFile=r(r({},l.link),{props:r({icon:"file-add"},a),messages:{insertHyperlink:s.keys.insertFile,insertHyperlinkDialogTitle:s.keys.insertFileDialogTitle,insertHyperlinkAddress:s.keys.insertFileAddress,insertHyperlinkTitle:s.keys.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:s.keys.insertFileCancel,insertHyperlinkInsert:s.keys.insertFileInsert},commandName:"InsertFile",linkTarget:!1}),i.insertTable={props:r({icon:"table-insert"},a),messages:{createTable:s.keys.createTable,createTableHint:s.keys.createTableHint},commandName:"InsertTable"},i.addRowBefore={props:r({icon:"table-row-insert-above"},a),messages:{title:s.keys.addRowBefore},commandName:"AddRowBefore"},i.addRowAfter={props:r({icon:"table-row-insert-below"},a),messages:{title:s.keys.addRowAfter},commandName:"AddRowAfter"},i.addColumnBefore={props:r({icon:"table-column-insert-left"},a),messages:{title:s.keys.addColumnBefore},commandName:"AddColumnBefore"},i.addColumnAfter={props:r({icon:"table-column-insert-right"},a),messages:{title:s.keys.addColumnAfter},commandName:"AddColumnAfter"},i.deleteRow={props:r({icon:"table-row-delete"},a),messages:{title:s.keys.deleteRow},commandName:"DeleteRow"},i.deleteColumn={props:r({icon:"table-column-delete"},a),messages:{title:s.keys.deleteColumn},commandName:"DeleteColumn"},i.deleteTable={props:r({icon:"table-delete"},a),messages:{title:s.keys.deleteTable},commandName:"DeleteTable"},i.mergeCells={props:r({icon:"cells-merge"},a),messages:{title:s.keys.mergeCells},commandName:"MergeCells"},i.splitCell={props:r({icon:"cell-split-horizontally"},a),messages:{title:s.keys.splitCell},commandName:"SplitCell"},i.print={props:r({icon:"print"},a),messages:{title:s.keys.print}},i.selectAll={props:r({icon:"select-all"},a),messages:{title:s.keys.selectAll}},i.pdf={props:r({icon:"pdf"},a),messages:{title:s.keys.pdf}},i.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},i.cleanFormatting={props:r({icon:"clear-css"},a),messages:{title:s.keys.cleanFormatting},commandName:"CleanFormatting"},i.image={node:"image",props:r({icon:"image"},a),messages:{insertImage:s.keys.insertImage,insertImageDialogTitle:s.keys.insertImageDialogTitle,insertImageAddress:s.keys.insertImageAddress,insertImageTitle:s.keys.insertImageTitle,insertImageAltText:s.keys.insertImageAltText,insertImageWidth:s.keys.insertImageWidth,insertImageHeight:s.keys.insertImageHeight,insertImageCancel:s.keys.insertImageCancel,insertImageInsert:s.keys.insertImageInsert},commandName:"InsertImage"},i.viewHtml={props:r({icon:"html"},a),messages:{viewHtml:s.keys.viewHtml,viewHtmlDialogTitle:s.keys.viewHtmlDialogTitle,viewHtmlCancel:s.keys.viewHtmlCancel,viewHtmlUpdate:s.keys.viewHtmlUpdate},commandName:"SetContent"},i.findAndReplace={props:r({icon:"find"},a),messages:{findReplaceToolTitle:s.keys.findReplaceToolTitle,findReplaceDialogTitle:s.keys.findReplaceDialogTitle,findReplaceTabFind:s.keys.findReplaceTabFind,findReplaceTabReplace:s.keys.findReplaceTabReplace,findReplaceFindWhat:s.keys.findReplaceFindWhat,findReplaceReplaceWith:s.keys.findReplaceReplaceWith,findReplaceReplace:s.keys.findReplaceReplace,findReplaceReplaceAll:s.keys.findReplaceReplaceAll,findReplaceMatchCase:s.keys.findReplaceMatchCase,findReplaceMatchWord:s.keys.findReplaceMatchWord,findReplaceMatchCyclic:s.keys.findReplaceMatchCyclic,findReplaceUseRegExp:s.keys.findReplaceUseRegExp,findReplacePrevMatch:s.keys.findReplacePrevMatch,findReplaceNextMatch:s.keys.findReplaceNextMatch,findReplaceMatches:s.keys.findReplaceMatches}},i.unlink=r(r({},l.link),{props:r({icon:"unlink-horizontal"},a),messages:{title:s.keys.unlink},commandName:"Unlink"}),i.undo={props:r({icon:"undo"},a),messages:{title:s.keys.undo},commandName:"Undo"},i.redo={props:r({icon:"redo"},a),messages:{title:s.keys.redo},commandName:"Redo"},i.fontSize={style:"font-size",defaultItem:{text:s.messages[s.keys.fontSize],value:"",localizationKey:s.keys.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"},i.fontName={style:"font-family",defaultItem:{text:s.messages[s.keys.fontName],value:"",localizationKey:s.keys.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"},i.formatBlock={defaultItem:{text:s.messages[s.keys.format],value:"",localizationKey:s.keys.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"},i.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",view:"palette",title:s.keys.foregroundColor},commandName:"ForeColor"},i.backColor={style:"background-color",colorPickerProps:{icon:"background",view:"palette",title:s.keys.backgroundColor},commandName:"BackColor"},i.alignLeft={actions:o([],l.alignLeftRules,!0),props:r({icon:"align-left"},a),messages:{title:s.keys.alignLeft},commandName:"AlignLeft"},i.alignRight={actions:o([],l.alignRightRules,!0),props:r({icon:"align-right"},a),messages:{title:s.keys.alignRight},commandName:"AlignRight"},i.alignCenter={actions:o([],l.alignCenterRules,!0),props:r({icon:"align-center"},a),messages:{title:s.keys.alignCenter},commandName:"AlignCenter"},i.alignJustify={actions:o([],l.alignJustifyRules,!0),props:r({icon:"align-justify"},a),messages:{title:s.keys.alignJustify},commandName:"AlignJustify"},i.alignRemove={actions:o([],l.alignRemoveRules,!0),props:r({icon:"align-remove"},a),messages:{},commandName:"AlignRemove"},i.indent={actions:l.indentRules.nodes,listsTypes:t.listsTypes,props:r({icon:"indent-increase"},a),messages:{title:s.keys.indent},commandName:"Indent"},i.outdent={actions:l.outdentRules.nodes,listsTypes:t.listsTypes,props:r({icon:"indent-decrease"},a),messages:{title:s.keys.outdent},commandName:"Outdent"},i.orderedList={listType:t.listsTypes.orderedList,props:r({icon:"list-ordered"},a),messages:{title:s.keys.orderedList},commandName:"OrderedList",types:r({},t.listsTypes)},i.bulletList={listType:t.listsTypes.bulletList,props:r({icon:"list-unordered"},a),messages:{title:s.keys.bulletList},commandName:"UnorderedList",types:r({},t.listsTypes)}},9953:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FindAndReplaceDialog=void 0;var a=n(3899),s=n(2888),l=n(6516),c=n(3457),u=n(499),d=n(3364),p=n(2804),f=n(2226),h=n(431),m={className:"k-checkbox k-checkbox-md k-rounded-md",type:"checkbox"},g=p.EditorToolsSettings.findAndReplace,v=function(e){function t(t){var n=e.call(this,t)||this;return n.onTabSelect=function(e){n.setState({selectedTab:e.selected})},n.onClose=function(){var e=n.props.view,t=e.state,r=t.tr.setSelection(h.TextSelection.create(t.doc,t.selection.from,t.selection.to));e.updateState(t.apply(r)),e.focus(),n.props.onClose.call(void 0)},n.matchesMessage=function(e){var t=n.state.matches,r=n.state.nextMatch,o=0,i=0;if(t&&r){var a=t.findIndex((function(e){return e.eq(r)}));o=-1===a?t.length:a+1,i=t.length}return(0,f.formatString)(e,o,i)},n.onFindNext=function(){n.onFind()},n.onFindPrev=function(){n.onFind(!0)},n.onFind=function(e){void 0===e&&(e=!1);var t=n.props.view,r=n.state,o=r.searchText,i=r.matchCase,a=r.matchCyclic,s={text:o,matchWord:r.matchWord,matchCase:i,useRegExp:r.useRegExp,backward:e,matchCyclic:a},l=(0,h.find)(t.state,s);if(l){var c=t.state.tr.setSelection(l);c.scrollIntoView(),t.updateState(t.state.apply(c)),n.setState({nextMatch:l})}},n.onReplace=function(){var e=n.props.view,t=e.state.selection,r=n.state.replaceText;if(!t.empty){var o=t.from,i=o+r.length,a=(0,h.replace)(t,r,e.state.tr);a.setSelection(h.TextSelection.create(a.doc,o,i)),a.scrollIntoView(),e.dispatch(a),n.setNextState({})}},n.onReplaceAll=function(){var e=n.props.view,t=n.state,r=t.searchText,o=t.replaceText,i=t.matchCase,a={text:r,matchWord:t.matchWord,matchCase:i,useRegExp:t.useRegExp},s=(0,h.replaceAll)(e.state,o,a);s&&e.dispatch(s),n.setNextState({})},n.onKeyDown=function(e){13===e.keyCode?n.onFindNext():27===e.keyCode&&n.onClose()},n.onMatchCaseChecked=function(e){return n.setNextState({matchCase:e.target.checked})},n.onMatchWordChecked=function(e){return n.setNextState({matchWord:e.target.checked})},n.onMatchCyclicChecked=function(e){return n.setNextState({matchCyclic:e.target.checked})},n.onUseRegExpChecked=function(e){return n.setNextState({useRegExp:e.target.checked})},n.onSearchChange=function(e){return n.setNextState({searchText:e.target.value})},n.onReplaceChange=function(e){return n.setNextState({replaceText:e.target.value})},n.setNextState=function(e){var t=i(i(i({},n.state),e),{matches:void 0,nextMatch:void 0}),r=n.props.view;if(t.searchText){var o=t.searchText,a=t.matchWord,s=t.matchCase,l=t.useRegExp,c=t.matchCyclic,u={text:o,matchWord:a,matchCase:s,useRegExp:l},d=r.state.selection,p=(0,h.findAll)(r.state.doc,u),f=!n.state.searchText&&p[0]||p.find((function(e){return e.from>=d.from}))||c&&p[0]||void 0;n.setState(i(i({},t),{matches:p,nextMatch:f}))}else n.setState(t)},n.state={selectedTab:0,searchText:(0,h.selectedLineTextOnly)(t.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1},n}return o(t,e),Object.defineProperty(t.prototype,"settings",{get:function(){return this.props.settings||g},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.view,r=this.state,o=r.matches,i=void 0===o?[]:o,a=r.nextMatch;if(t.nextMatch!==a){var s=n.state,l=s.tr,c=[];i.forEach((function(e){c.push({from:e.from,to:e.to,attrs:{class:a&&e.eq(a)?"k-text-selected":"k-text-highlighted"}})})),l.setMeta(h.textHighlightKey,c),l.setSelection(a||h.TextSelection.create(s.doc,s.selection.from)),n.dispatch(l)}},t.prototype.render=function(){var e=(0,u.provideLocalizationService)(this),t=this.settings.messages,n=t.findReplaceDialogTitle,r=t.findReplaceTabFind,o=t.findReplaceTabReplace,p=t.findReplaceFindWhat,f=t.findReplaceReplaceWith,h=t.findReplaceReplace,g=t.findReplaceReplaceAll,v=t.findReplaceMatchCase,y=t.findReplaceMatchWord,b=t.findReplaceMatchCyclic,k=t.findReplaceUseRegExp,w=t.findReplacePrevMatch,C=t.findReplaceNextMatch,x=t.findReplaceMatches,O=this.state,S=O.matchCase,E=O.matchWord,I=O.matchCyclic,N=O.useRegExp,T=O.searchText,M=O.replaceText,D=O.nextMatch,R=a.createElement("div",{className:"k-search-options"},a.createElement("span",null,a.createElement("input",i({},m,{id:"match-case",checked:S,onChange:this.onMatchCaseChecked})),a.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},e.toLanguageString(v,d.messages[v]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"match-whole",checked:E,onChange:this.onMatchWordChecked})),a.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},e.toLanguageString(y,d.messages[y]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"match-cyclic",checked:I,onChange:this.onMatchCyclicChecked})),a.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},e.toLanguageString(b,d.messages[b]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"regular-expression",checked:N,onChange:this.onUseRegExpChecked})),a.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},e.toLanguageString(k,d.messages[k])))),P=a.createElement("div",{className:"k-matches-container"},a.createElement(s.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},a.createElement("span",{className:"k-icon k-i-arrow-chevron-left"}),e.toLanguageString(w,d.messages[w])),a.createElement("span",null,this.matchesMessage(e.toLanguageString(x,d.messages[x]))),a.createElement(s.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(C,d.messages[C]),a.createElement("span",{className:"k-icon k-i-arrow-chevron-right"}))),_=a.createElement(a.Fragment,null,a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"findWhat"},e.toLanguageString(p,d.messages[p]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"findWhat",type:"text",className:"k-input",value:T,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}))),A=a.createElement(a.Fragment,null,a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"replaceWith"},e.toLanguageString(f,d.messages[f]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"replaceWith",className:"k-input",type:"text",value:M,onChange:this.onReplaceChange})));return a.createElement(l.Window,{title:e.toLanguageString(n,d.messages[n]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:function(){return null},maximizeButton:function(){return null},appendTo:document.body},a.createElement(c.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},a.createElement(c.TabStripTab,{title:e.toLanguageString(r,d.messages[r])},a.createElement("div",{className:"k-edit-form-container"},_),R,P),a.createElement(c.TabStripTab,{title:e.toLanguageString(o,d.messages[o])},a.createElement("div",{className:"k-edit-form-container"},_,A),a.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},a.createElement(s.Button,{disabled:!Boolean(D),onClick:this.onReplace},e.toLanguageString(h,d.messages[h])),a.createElement(s.Button,{disabled:!Boolean(D),onClick:this.onReplaceAll},e.toLanguageString(g,d.messages[g]))),R,P)))},t}(a.Component);t.FindAndReplaceDialog=v,(0,u.registerForLocalization)(v)},3856:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.InsertImageDialog=void 0;var a=n(3899),s=n(6516),l=n(2888),c=n(431),u=n(499),d=n(3364),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.src=null,t.altText=null,t.title=null,t.width=null,t.height=null,t.onClose=function(){t.props.view.focus(),t.props.onClose()},t.onInsert=function(){var e=t.props,n=e.view,r=e.settings,o=n.state.schema.nodes[r.node],i={src:t.src?t.src.value:null,title:t.title?t.title.value:null,alt:t.altText?t.altText.value:null,width:t.width?t.width.value:null,height:t.height?t.height.value:null},a=Object.keys(i).filter((function(e){return null!==i[e]&&""!==i[e]})).reduce((function(e,t){var n;return Object.assign(e,((n={})[t]=i[t],n))}),{}),s=o.createAndFill(a);s&&(0,c.insertNode)(s,!0)(n.state,(function(e){return n.dispatch(e.setMeta("commandName",r.commandName).setMeta("args",a))})),t.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,p=t.render,f=r.messages,h=f.insertImageDialogTitle,m=f.insertImageAddress,g=f.insertImageTitle,v=f.insertImageAltText,y=f.insertImageWidth,b=f.insertImageHeight,k=f.insertImageCancel,w=f.insertImageInsert,C=(0,u.provideLocalizationService)(this),x=n&&n.state,O={};x&&x.selection instanceof c.NodeSelection&&x.selection.node.type===x.schema.nodes[r.node]&&(O=x.selection.node.attrs);var S=a.createElement("div",{className:"k-edit-form-container"},a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-image-url"},C.toLanguageString(m,d.messages[m]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-url",defaultValue:O.src,ref:function(t){return e.src=t},autoFocus:!0})),a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-image-alt"},C.toLanguageString(v,d.messages[v]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-alt",defaultValue:O.alt,ref:function(t){return e.altText=t}})),a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-image-title"},C.toLanguageString(g,d.messages[g]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-title",defaultValue:O.title,ref:function(t){return e.title=t}})),a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-image-width"},C.toLanguageString(y,d.messages[y]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-width",defaultValue:O.width,ref:function(t){return e.width=t}})),a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-image-height"},C.toLanguageString(b,d.messages[b]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-height",defaultValue:O.height,ref:function(t){return e.height=t}}))),E=[a.createElement(l.Button,{onClick:this.onClose,dir:o,key:"cancel"},C.toLanguageString(k,d.messages[k])),a.createElement(l.Button,{onClick:this.onInsert,themeColor:"primary",dir:o,key:"insert"},C.toLanguageString(w,d.messages[w]))],I=a.createElement(s.Dialog,{title:C.toLanguageString(h,d.messages[h]),onClose:this.onClose,key:"dialog",closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},S,a.createElement.apply(a,i([s.DialogActionsBar,null],E,!1)));return p?p(I,{content:S,actionButtons:E}):I},t}(a.Component);t.InsertImageDialog=p,(0,u.registerForLocalization)(p)},4150:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.InsertLinkDialog=void 0;var a=n(3899),s=n(6516),l=n(2888),c=n(431),u=n(499),d=n(3364),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.href=null,t.title=null,t.target=null,t.onClose=function(){t.props.view.focus(),t.props.onClose()},t.onInsert=function(){var e=t.props.view,n=t.props.settings.mark,r={href:t.href?t.href.value:void 0,title:t.title?t.title.value:void 0,target:t.target&&t.target.checked?"_blank":void 0};(0,c.applyLink)({mark:n,attrs:r},t.props.settings.commandName)(e.state,e.dispatch),t.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,p=t.render,f=(0,u.provideLocalizationService)(this),h=r.messages,m=h.insertHyperlinkDialogTitle,g=h.insertHyperlinkAddress,v=h.insertHyperlinkTitle,y=h.insertHyperlinkNewWindow,b=h.insertHyperlinkCancel,k=h.insertHyperlinkInsert,w=!!n&&(0,c.getMark)(n.state,n.state.schema.marks[r.mark]),C=a.createElement("div",{className:"k-edit-form-container"},a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-link-url"},f.toLanguageString(g,d.messages[g]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-link-url",ref:function(t){return e.href=t},defaultValue:w&&w.attrs.href||void 0,autoFocus:!0})),a.createElement("div",{className:"k-edit-label k-editor-link-text-row"},a.createElement("label",{htmlFor:"k-editor-link-text"},f.toLanguageString(v,d.messages[v]))),a.createElement("div",{className:"k-edit-field k-editor-link-text-row"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-link-text",ref:function(t){return e.title=t},defaultValue:w&&w.attrs.title||void 0})),!1!==r.linkTarget&&a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md",id:"k-editor-link-target",ref:function(t){return e.target=t},defaultChecked:w&&!!w.attrs.target||void 0}),a.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},f.toLanguageString(y,d.messages[y])))),x=[a.createElement(l.Button,{onClick:this.onClose,dir:o,key:"cancel"},f.toLanguageString(b,d.messages[b])),a.createElement(l.Button,{onClick:this.onInsert,themeColor:"primary",dir:o,key:"insert"},f.toLanguageString(k,d.messages[k]))],O=a.createElement(s.Dialog,{title:f.toLanguageString(m,d.messages[m]),onClose:this.onClose,closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},C,a.createElement.apply(a,i([s.DialogActionsBar,null],x,!1)));return p?p(O,{content:C,actionButtons:x}):O},t}(a.Component);t.InsertLinkDialog=p,(0,u.registerForLocalization)(p)},3695:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDialogs=void 0;var i=n(4150),a=n(3856),s=n(5391),l=n(9953);!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(i.InsertLinkDialog);e.InsertLinkDialog=t;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(a.InsertImageDialog);e.InsertImageDialog=n;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(s.ViewHtmlDialog);e.ViewHtmlDialog=r;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l.FindAndReplaceDialog);e.FindAndReplaceDialog=c}(t.EditorDialogs||(t.EditorDialogs={}))},5391:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ViewHtmlDialog=void 0;var a=n(3899),s=n(6516),l=n(2888),c=n(431),u=n(499),d=n(3364),p=n(580),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.htmlArea=null,t.onUpdate=function(){var e=t.props,n=e.view,r=e.settings,o=(0,c.trimWhitespace)(t.htmlArea?t.htmlArea.value:""),i=p.editorPropsKey.getState(n.state).preserveWhitespace;(0,c.setHtml)(o,r.commandName,{preserveWhitespace:i})(n.state,n.dispatch),t.onClose()},t.onClose=function(){t.props.view.focus(),t.props.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,p=t.render,f=(0,u.provideLocalizationService)(this),h=r.messages,m=h.viewHtmlDialogTitle,g=h.viewHtmlCancel,v=h.viewHtmlUpdate,y=a.createElement("textarea",{className:"k-textarea k-editor-textarea",style:{height:"280px",width:"490px"},ref:function(t){return e.htmlArea=t},defaultValue:(0,c.indentHtml)((0,c.getHtml)(n.state)),autoFocus:!0}),b=[a.createElement(l.Button,{onClick:this.onClose,dir:o,key:"cancel"},f.toLanguageString(g,d.messages[g])),a.createElement(l.Button,{onClick:this.onUpdate,themeColor:"primary",dir:o,key:"update"},f.toLanguageString(v,d.messages[v]))],k=a.createElement(s.Dialog,{title:f.toLanguageString(m,d.messages[m]),onClose:this.onClose,key:"dialog",closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},y,a.createElement.apply(a,i([s.DialogActionsBar,null],b,!1)));return p?p(k,{content:y,actionButtons:b}):k},t}(a.Component);t.ViewHtmlDialog=f,(0,u.registerForLocalization)(f)},3364:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.keys=t.messages=void 0;var r="editor.bold",o="editor.italic",i="editor.underline",a="editor.strikethrough",s="editor.subscript",l="editor.superscript",c="editor.hyperlink",u="editor.insertFile",d="editor.print",p="editor.selectAll",f="editor.cleanFormatting",h="editor.pdf",m="editor.foregroundColor",g="editor.backgroundColor",v="editor.createTable",y="editor.insertTableHint",b="editor.addRowBefore",k="editor.addRowAfter",w="editor.addColumnBefore",C="editor.addColumnAfter",x="editor.deleteRow",O="editor.deleteColumn",S="editor.deleteTable",E="editor.mergeCells",I="editor.splitCell",N="editor.hyperlink-dialog-title",T="editor.hyperlink-dialog-content-address",M="editor.hyperlink-dialog-content-title",D="editor.hyperlink-dialog-content-newwindow",R="editor.hyperlink-dialog-cancel",P="editor.hyperlink-dialog-insert",_="editor.insertfile-dialog-title",A="editor.insertfile-dialog-content-address",j="editor.insertfile-dialog-content-title",F="editor.insertfile-dialog-cancel",z="editor.insertfile-dialog-insert",L="editor.image",B="editor.image-dialog-title",V="editor.image-address",H="editor.image-title",K="editor.image-altText",W="editor.image-width",$="editor.image-height",q="editor.image-cancel",U="editor.image-insert",G="editor.viewHtml",Y="editor.viewHtml-dialog-title",X="editor.viewHtml-cancel",J="editor.viewHtml-update",Z="editor.unlink",Q="editor.undo",ee="editor.redo",te="editor.fontSize",ne="editor.fontName",re="editor.format",oe="editor.alignLeft",ie="editor.alignRight",ae="editor.alignCenter",se="editor.alignJustify",le="editor.indent",ce="editor.outdent",ue="editor.orderedList",de="editor.bulletList",pe="editor.findReplace-tool-title",fe="editor.findReplace-dialog-title",he="editor.findReplace-tab-find",me="editor.findReplace-tab-replace",ge="editor.findReplace-findWhat",ve="editor.findReplace-replaceWith",ye="editor.findReplace-replace",be="editor.findReplace-replaceAll",ke="editor.findReplace-matchCase",we="editor.findReplace-matchWord",Ce="editor.findReplace-matchCyclic",xe="editor.findReplace-useRegExp",Oe="editor.findReplace-prevMatch",Se="editor.findReplace-nextMatch",Ee="editor.findReplace-matches";t.messages=((n={})[r]="Bold",n[o]="Italic",n[i]="Underline",n[a]="Strikethrough",n[s]="Subscript",n[l]="Superscript",n[Z]="Remove hyperlink",n[Q]="Undo",n[ee]="Redo",n[te]="Font Size",n[ne]="Font Name",n[re]="Format",n[oe]="Align text left",n[ie]="Align text right",n[ae]="Center text",n[se]="Justify",n[le]="Indent",n[ce]="Outdent",n[ue]="Insert ordered list",n[de]="Insert unordered list",n[d]="Print",n[p]="Select All",n[f]="Clean formatting",n[h]="Export as PDF",n[m]="Color",n[g]="Background color",n[v]="Create a table",n[y]="Create a {0} x {1} table",n[b]="Add row above",n[k]="Add row below",n[w]="Add column on the left",n[C]="Add column on the right",n[x]="Delete row",n[O]="Delete column",n[S]="Delete table",n[E]="Merge cells",n[I]="Split cell",n[c]="Insert hyperlink",n[N]="Insert hyperlink",n[T]="Web address",n[M]="Title",n[D]="Open link in new window",n[R]="Cancel",n[P]="Insert",n[u]="Insert file",n[_]="Insert file",n[A]="Web address",n[j]="Title",n[F]="Cancel",n[z]="Insert",n[L]="Insert image",n[B]="Insert image",n[V]="Web address",n[H]="Title",n[K]="Alternate text",n[W]="Width (px)",n[$]="Height (px)",n[q]="Cancel",n[U]="Insert",n[G]="View HTML",n[Y]="View HTML",n[X]="Cancel",n[J]="Update",n[pe]="Find and Replace",n[fe]="Find and Replace",n[he]="Find",n[me]="Replace",n[ge]="Find What:",n[ve]="Replace With",n[ye]="Replace",n[be]="Replace All",n[ke]="Match Case",n[we]="Match whole word only",n[Ce]="Match cyclic (Wrap around)",n[xe]="Regular Expression",n[Oe]="Prev",n[Se]="Next",n[Ee]="{0} of {1} matches",n),t.keys={bold:r,italic:o,underline:i,strikethrough:a,subscript:s,superscript:l,unlink:Z,undo:Q,redo:ee,fontSize:te,fontName:ne,format:re,alignLeft:oe,alignRight:ie,alignCenter:ae,alignJustify:se,indent:le,outdent:ce,orderedList:ue,bulletList:de,print:d,selectAll:p,cleanFormatting:f,pdf:h,foregroundColor:m,backgroundColor:g,createTable:v,createTableHint:y,addRowBefore:b,addRowAfter:k,addColumnBefore:w,addColumnAfter:C,deleteRow:x,deleteColumn:O,deleteTable:S,mergeCells:E,splitCell:I,insertHyperlink:c,insertHyperlinkDialogTitle:N,insertHyperlinkAddress:T,insertHyperlinkTitle:M,insertHyperlinkNewWindow:D,insertHyperlinkCancel:R,insertHyperlinkInsert:P,insertFile:u,insertFileDialogTitle:_,insertFileAddress:A,insertFileTitle:j,insertFileCancel:F,insertFileInsert:z,insertImage:L,insertImageDialogTitle:B,insertImageAddress:V,insertImageTitle:H,insertImageAltText:K,insertImageWidth:W,insertImageHeight:$,insertImageCancel:q,insertImageInsert:U,viewHtml:G,viewHtmlDialogTitle:Y,viewHtmlCancel:X,viewHtmlUpdate:J,findReplaceToolTitle:pe,findReplaceDialogTitle:fe,findReplaceTabFind:he,findReplaceTabReplace:me,findReplaceFindWhat:ge,findReplaceReplaceWith:ve,findReplaceReplace:ye,findReplaceReplaceAll:be,findReplaceMatchCase:ke,findReplaceMatchWord:we,findReplaceMatchCyclic:Ce,findReplaceUseRegExp:xe,findReplacePrevMatch:Oe,findReplaceNextMatch:Se,findReplaceMatches:Ee}},7363:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata=void 0,t.packageMetadata={name:"@progress/kendo-react-editor",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031856,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},7628:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.createAlignTool=void 0;var s=n(3899),l=n(2888),c=n(2804),u=n(431),d=n(2226),p=n(499),f=n(3364),h=c.EditorToolsSettings.alignRemove;t.createAlignTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),c=n&&n.state,m=!!c&&(0,u.isAligned)(c,e.actions),g=m?h.actions:e.actions,v=m?h.commandName:e.commandName,y=(0,p.provideLocalizationService)(this),b=e.messages.title,k=s.createElement(l.Button,i({onClick:function(){return n&&(0,u.alignBlocks)(g,v)(n.state,n.dispatch)},selected:m,togglable:!0},d.onDownPreventDefault,{title:y.toLanguageString(b,f.messages[b])},e.props,o));return r?r.call(void 0,k,{view:n}):k},n}(s.Component);return(0,p.registerForLocalization)(t),t}},8631:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ApplyColorTool=void 0;var o=n(3899),i=n(1574),a=n(431),s=n(499),l=n(3364);t.ApplyColorTool=function(e){var t=e.view,n=e.style,c=e.colorPickerProps,u=e.commandName,d=c.title,p=c.view,f=void 0===p?"palette":p,h=o.useCallback((function(e){t&&((0,a.applyInlineStyle)({style:n,value:e.value},u)(t.state,t.dispatch),"palette"===f&&t.focus())}),[t,n,f,u]);return o.createElement(i.ColorPicker,r({onChange:h,onActiveColorClick:h},c,{title:d?(0,s.useLocalization)().toLanguageString(d,l.messages[d]):d}))}},3280:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.CleanFormatting=void 0;var i=n(3899),a=n(2888),s=n(499),l=n(2226),c=n(3364),u=n(431),d=n(2804).EditorToolsSettings.cleanFormatting,p=(0,u.cleanFormatting)();t.CleanFormatting=function(e){var t=e.view,n=e.render,u=e.settings,f=void 0===u?d:u,h=o(e,["view","render","settings"]),m=f.messages.title,g=i.useCallback((function(){t&&p(t.state,(function(e){e.setMeta("commandName",f.commandName),t.dispatch(e)}))}),[t]),v=i.createElement(a.Button,r({onClick:g,disabled:!t||!p(t.state),title:(0,s.useLocalization)().toLanguageString(m,c.messages[m])},l.onDownPreventDefault,f.props,h));return n?n.call(void 0,v,{view:t}):v}},3037:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.FindAndReplace=void 0;var s=n(3899),l=n(2888),c=n(9953),u=n(2226),d=n(3364),p=n(2804),f=n(499),h=p.EditorToolsSettings.findAndReplace,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showDialog:!1},t.onClose=function(){return t.setState({showDialog:!1})},t.onOpen=function(){return t.setState({showDialog:!0})},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.view,n=a(e,["view"]),r=h.props,o=(0,f.provideLocalizationService)(this),p=h.messages.findReplaceToolTitle;return[s.createElement(l.Button,i({onClick:this.onOpen},u.onDownPreventDefault,{disabled:!t,title:o.toLanguageString(p,d.messages[p]),key:"tool"},r,n)),this.state.showDialog&&t&&s.createElement(c.FindAndReplaceDialog,{view:t,onClose:this.onClose,dir:n.dir,key:"dialog"})]},t}(s.Component);t.FindAndReplace=m,(0,f.registerForLocalization)(m)},1403:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.FontStyleToolNS=void 0;var s=n(3899),l=n(5375),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.FontStyleToolNS||(t.FontStyleToolNS={})).createStyleDropDownList=function(e){var t=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.onChange=function(t){var r=t.target.value,o=n.props.view,i=e.style;if(o){(0,c.applyInlineStyle)({style:i,value:r.value},e.commandName)(o.state,o.dispatch);var a=t.syntheticEvent;a&&"click"===a.type&&o.focus()}},n}return o(n,t),n.prototype.render=function(){var t=e.style,n=this.props,r=n.view,o=n.render,f=n.data,h=n.defaultItem,m=a(n,["view","render","data","defaultItem"]),g=f||e.items,v=h||e.defaultItem,y=r?(0,c.getInlineStyles)(r.state,{name:t,value:/^.+$/}):[],b=(0,d.provideLocalizationService)(this);v&&v.localizationKey&&((v=i({},v)).text=v.localizationKey?b.toLanguageString(v.localizationKey,p.messages[v.localizationKey]):v.text);var k=1===new Set(y).size?y[0]:null,w=s.createElement(l.DropDownList,i({value:k?g.find((function(e){return e.value===k})):k,data:g,defaultItem:v,itemRender:u.itemRender,textField:"text",dataItemKey:"value",onChange:this.onChange,style:u.userSelectNone,leftRightKeysNavigation:!1},m));return o?o.call(void 0,w,{view:r}):w},n}(s.Component);return(0,d.registerForLocalization)(t),t}},847:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.FormatBlockToolNS=void 0;var s=n(3899),l=n(5375),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.FormatBlockToolNS||(t.FormatBlockToolNS={})).createFormatBlockDropDownList=function(e){var t=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.onChange=function(t){var r=t.target.value,o=n.props.view;if(o&&(0,c.formatBlockElements)(r.value,e.commandName)(o.state,o.dispatch)){var i=t.syntheticEvent;i&&"click"===i.type&&o.focus()}},n}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=t.data,f=t.defaultItem,h=a(t,["view","render","data","defaultItem"]),m=o||e.items,g=f||e.defaultItem,v=n&&n.state,y=v?(0,c.getBlockFormats)(v):[],b=(0,d.provideLocalizationService)(this);g&&g.localizationKey&&((g=i({},g)).text=g.localizationKey?b.toLanguageString(g.localizationKey,p.messages[g.localizationKey]):g.text);var k=1===new Set(y).size?y[0]:null,w=s.createElement(l.DropDownList,i({value:k?m.find((function(e){return e.value===k})):k,onChange:this.onChange,itemRender:u.itemRender,data:m,defaultItem:g,textField:"text",dataItemKey:"value",style:u.userSelectNone,leftRightKeysNavigation:!1},h));return r?r.call(void 0,w,{view:n}):w},n}(s.Component);return(0,d.registerForLocalization)(t),t}},3270:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryToolNS=void 0;var r,o=n(431),i=n(8980);(r=t.HistoryToolNS||(t.HistoryToolNS={})).createUndoTool=function(e){return(0,i.createProseMirrorTool)(e,o.undo)},r.createRedoTool=function(e){return(0,i.createProseMirrorTool)(e,o.redo)}},9476:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.IndentToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.IndentToolNS||(t.IndentToolNS={})).createIndentTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=o.dir,h=n&&n.state,m=h&&h.schema.nodes,g=m&&m[e.listsTypes.listItem],v=e.actions,y=!!h&&!!g&&((0,c.isIndented)(h,v,f)||v.some((function(e){return m&&m[e.node]&&(0,c.hasNode)(h,m[e.node])})))&&!(0,c.hasNode)(h,g),b=!!h&&(0,c.canIndentAsListItem)(h,g),k=y||b,w=(0,d.provideLocalizationService)(this),C=e.messages.title,x=s.createElement(l.Button,i({onClick:function(){n&&b&&g?(0,c.sinkListItem)(g)(n.state,n.dispatch):n&&y&&(0,c.indentBlocks)(v,e.commandName,f)(n.state,n.dispatch)},title:w.toLanguageString(C,p.messages[C]),disabled:!k},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,x,{view:n}):x},n}(s.Component);return(0,d.registerForLocalization)(t),t}},5436:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.InlineFormatToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.InlineFormatToolNS||(t.InlineFormatToolNS={})).createInlineFormatTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=n&&n.state,h={mark:e.mark,altMarks:e.altMarks,altStyle:e.altStyle},m=(0,d.provideLocalizationService)(this),g=e.messages.title,v=s.createElement(l.Button,i({onClick:function(){return n&&(0,c.toggleInlineFormat)(h,f&&f.tr.setMeta("commandName",e.commandName))(n.state,n.dispatch)},selected:!!f&&(0,c.hasMark)(f,h),togglable:!0},u.onDownPreventDefault,{title:m.toLanguageString(g,p.messages[g])},e.props,o));return r?r.call(void 0,v,{view:n}):v},n}(s.Component);return(0,d.registerForLocalization)(t),t}},8210:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.createInsertImageTool=void 0;var s=n(3899),l=n(431),c=n(2888),u=n(2226),d=n(3695),p=n(499),f=n(3364);t.createInsertImageTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),h=n&&n.state,m=h?h.schema.nodes[e.node]:void 0,g=(0,p.provideLocalizationService)(this),v=e.messages.insertImage,y=[s.createElement(c.Button,i({onClick:this.toggleDialog,key:"insertImage",disabled:!m||!h||!(0,l.canInsert)(h,m)},u.onDownPreventDefault,{title:g.toLanguageString(v,f.messages[v])},e.props,o)),this.state.openedDialog&&n&&s.createElement(d.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:n,settings:e,dir:o.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,y,{view:n}):y},n}(s.Component);return(0,p.registerForLocalization)(t),t}},1493:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.LinkToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(3695),p=n(499),f=n(3364);(t.LinkToolNS||(t.LinkToolNS={})).createLinkTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),h=n&&n.state,m=!h||h.selection.empty,g=h&&(0,c.getMark)(h,h.schema.marks[e.mark]),v=(0,p.provideLocalizationService)(this),y=e.messages.insertHyperlink,b=[s.createElement(l.Button,i({onClick:this.toggleDialog,key:"link",disabled:m&&!g},u.onDownPreventDefault,{title:v.toLanguageString(y,f.messages[y])},e.props,o)),this.state.openedDialog&&n&&s.createElement(d.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:e,dir:o.dir,view:n,onClose:this.toggleDialog})||null];return r?r.call(void 0,b,{view:n}):b},n}(s.Component);return(0,p.registerForLocalization)(t),t}},5962:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InsertTablePopupNS=t.InsertTableToolNS=void 0;var r=n(3895);Object.defineProperty(t,"InsertTableToolNS",{enumerable:!0,get:function(){return r.InsertTableToolNS}});var o=n(5388);Object.defineProperty(t,"InsertTablePopupNS",{enumerable:!0,get:function(){return o.InsertTablePopupNS}})},5388:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.InsertTablePopupNS=void 0;var i,a,s=n(3899),l=n(189),c=n(5362),u=n(2011);i=t.InsertTablePopupNS||(t.InsertTablePopupNS={}),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.pointerdown=!1,t.onWindowDown=function(e){var n=t.props.anchor;(!n||n!==e.target&&n.firstElementChild!==e.target)&&(t.props.show&&!t.pointerdown&&t.props.onClose(),t.pointerdown=!1)},t.onPointerDown=function(){return t.pointerdown=!0},t}return o(t,e),t.prototype.componentDidUpdate=function(e){e.show&&this.props.show&&this.props.onClose()},t.prototype.componentDidMount=function(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)},t.prototype.componentWillUnmount=function(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)},t.prototype.render=function(){var e=this.props,n=e.show,r=e.anchor,o=e.dir,i=e.rows,a=void 0===i?t.defaultProps.rows:i,l=e.columns,d=void 0===l?t.defaultProps.columns:l,p="rtl"===o?"right":"left";return s.createElement(c.Popup,{anchor:r,anchorAlign:{horizontal:p,vertical:"bottom"},popupAlign:{horizontal:p,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:n,style:"rtl"===o?{direction:"rtl"}:void 0},s.createElement(u.default,{rows:a,columns:d,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},t}(s.Component),i.InsertTablePopup=a},2011:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(3899),a=n(2226),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={row:-1,col:-1},t}return o(t,e),t.prototype.renderCell=function(e,t,n){var r=this,o=Math.floor(e/this.props.columns),a=e%this.props.columns,s=a<=n&&o<=t;return i.createElement("span",{className:"k-ct-cell k-disabled"+(s?" ".concat("k-selected"):""),onMouseEnter:function(){return r.setState({row:o,col:a})},onClick:function(){return r.props.onCellClick.call(void 0,o,a)},key:e})},t.prototype.render=function(){var e=this,t=[],n=this.props.columns*this.props.rows,r=this.state,o=r.row,s=r.col,l=this.props.onDown,c=this.props.createTableMessage;s>-1&&(c=(0,a.formatString)(this.props.createTableHintMessage,o+1,s+1));for(var u=0;u<n;u++)t.push(this.renderCell(u,o,s));return[i.createElement("div",{onMouseLeave:function(){return e.setState({row:-1,col:-1})},key:"cells",style:{borderColor:"inherit"},onPointerDown:l,onMouseDown:l},t),i.createElement("div",{className:"k-status",key:"status",onPointerDown:l,onMouseDown:l},c)]},t}(i.Component);t.default=s},3895:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.InsertTableToolNS=void 0;var s=n(3899),l=n(2888),c=n(2226),u=n(499),d=n(3364),p=n(5388),f=n(431);(t.InsertTableToolNS||(t.InsertTableToolNS={})).createInsertTableTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedPopup:!1},e.button=null,e.togglePopup=function(){e.setState({openedPopup:!e.state.openedPopup})},e.closePopup=function(){e.state.openedPopup&&e.togglePopup()},e.onTableInsert=function(t,n){var r=e.props.view;if(r){var o=r.state.schema.nodes,i=o.table,a=o.table_row,s=o.table_cell,l=(0,f.createTable)({table:i,table_row:a,table_cell:s},t,n);l&&(0,f.insertNode)(l,!0)(r.state,r.dispatch),r.focus(),e.closePopup()}},e}return o(n,t),n.prototype.render=function(){var t=this,n=this.props,r=n.view,o=n.render,h=a(n,["view","render"]),m=r&&r.state,g=(0,u.provideLocalizationService)(this),v=e.messages,y=v.createTable,b=v.createTableHint,k=g.toLanguageString(y,d.messages[y]),w=g.toLanguageString(b,d.messages[b]),C=[s.createElement(l.Button,i({onClick:this.togglePopup,ref:function(e){return t.button=e&&e.element},key:"InsertTable",disabled:!m||!(0,f.canInsert)(m,m.schema.nodes.table)},c.onDownPreventDefault,{title:k},e.props,h)),r&&s.createElement(p.InsertTablePopupNS.InsertTablePopup,{key:"insertTablePopup",createTableMessage:k,createTableHintMessage:w,dir:h.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return o?o.call(void 0,C,{view:r}):C},n}(s.Component);return(0,u.registerForLocalization)(t),t}},3377:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ListTool=void 0;var i=n(3899),a=n(431),s=n(2888),l=n(2804),c=n(499),u=n(3364),d=function(e,t){var n=e.selection,r=n.from,o=n.to,i=null;return e.doc.nodesBetween(r,o,(function(e){return!(i=i||(e.type===t?e:null))})),i};t.ListTool=function(e){var t,n,p=!1,f=e.view,h=l.listsTypes,m=e.listType,g=(0,c.useLocalization)(),v=o([],e.items||[],!0);if(f){var y=f.state,b=y&&y.schema.nodes;t=b&&d(y,b[h.orderedList]),n=b&&d(y,b[h.bulletList]),p=Boolean(m===h.orderedList?t&&!n:!t&&n)}if(p&&(t||n)){var k=(0,a.listStyle)((t||n).attrs);v=v.map((function(e,t){return r(r({},e),{selected:k?e.style===k:0===t})}))}return i.createElement("span",{onMouseDown:function(e){e.preventDefault()}},i.createElement(s.SplitButton,{textField:"text",items:v,icon:e.icon,onButtonClick:function(e){f&&((0,a.toggleList)(f.state,f.dispatch,f,r(r({listType:m},h),{listAttrs:{}}),"InsertList"),f.focus())},onItemClick:function(e){if(f){var o=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},i=t||n;if(i&&(0,a.listStyle)(i.attrs)!==e.item.style){var s=f.state.selection.$head.posAtIndex(0,-2)-1;f.dispatch(f.state.tr.setNodeMarkup(s,f.state.schema.nodes[m],o))}else(0,a.toggleList)(f.state,f.dispatch,f,r(r({listType:m},h),{listAttrs:o}),"InsertList");f.focus()}},buttonClass:p?"k-selected":void 0,title:void 0!==e.title?e.title:g.toLanguageString(e.titleKey,u.messages[e.titleKey])}))}},7441:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.ListToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.ListToolNS||(t.ListToolNS={})).createListTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=!1,h=(0,d.provideLocalizationService)(this),m=e.messages.title,g=e.types,v=e.listType;if(n){var y=n.state,b=y.schema.nodes,k=(0,c.hasNode)(y,b[g.orderedList]),w=(0,c.hasNode)(y,b[g.bulletList]);f=v===g.orderedList?k&&!w:!k&&w}var C=s.createElement(l.Button,i({onClick:function(){return n&&(0,c.toggleList)(n.state,n.dispatch,n,i({listType:v},g),e.commandName)},togglable:!0,selected:f,title:h.toLanguageString(m,p.messages[m])},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,C,{view:n}):C},n}(s.Component);return(0,d.registerForLocalization)(t),t}},8671:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.EditorTools=void 0;var a=n(3899),s=n(2804),l=n(5962),c=n(7628),u=n(1403),d=n(8631),p=n(847),f=n(3270),h=n(9476),m=n(5436),g=n(8210),v=n(1493),y=n(7441),b=n(4997),k=n(3350),w=n(8389),C=n(7306),x=n(219),O=n(3061),S=n(9460),E=n(3280),I=n(3037),N=n(3377);!function(e){function t(e){return c.createAlignTool(e)}e.createAlignTool=t;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignLeft));e.AlignLeft=n;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignRight));e.AlignRight=r;var T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignCenter));e.AlignCenter=T;var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignJustify));function D(e){return l.InsertTableToolNS.createInsertTableTool(e)}e.AlignJustify=M,e.createInsertTableTool=D;var R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(D(s.EditorToolsSettings.insertTable));e.InsertTable=R;var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l.InsertTablePopupNS.InsertTablePopup);function _(e){return u.FontStyleToolNS.createStyleDropDownList(e)}e.InsertTablePopup=P,e.createStyleDropDownList=_;var A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(_(s.EditorToolsSettings.fontSize));e.FontSize=A;var j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(_(s.EditorToolsSettings.fontName));function F(e){return p.FormatBlockToolNS.createFormatBlockDropDownList(e)}e.FontName=j,e.ForeColor=function(e){return a.createElement(d.ApplyColorTool,i({},s.EditorToolsSettings.foreColor,e))},e.BackColor=function(e){return a.createElement(d.ApplyColorTool,i({},s.EditorToolsSettings.backColor,e))},e.createFormatBlockDropDownList=F;var z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(F(s.EditorToolsSettings.formatBlock));function L(e){return f.HistoryToolNS.createUndoTool(e)}function B(e){return f.HistoryToolNS.createRedoTool(e)}e.FormatBlock=z,e.createUndoTool=L,e.createRedoTool=B;var V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(L(s.EditorToolsSettings.undo));e.Undo=V;var H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(B(s.EditorToolsSettings.redo));function K(e){return h.IndentToolNS.createIndentTool(e)}e.Redo=H,e.createIndentTool=K;var W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(K(s.EditorToolsSettings.indent));function $(e){return m.InlineFormatToolNS.createInlineFormatTool(e)}e.Indent=W,e.createInlineFormatTool=$;var q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.bold));e.Bold=q;var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.italic));e.Italic=U;var G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.underline));e.Underline=G;var Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.strikethrough));e.Strikethrough=Y;var X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.subscript));e.Subscript=X;var J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.superscript));function Z(e){return g.createInsertImageTool(e)}e.Superscript=J,e.createInsertImageTool=Z;var Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Z(s.EditorToolsSettings.image));function ee(e){return v.LinkToolNS.createLinkTool(e)}e.InsertImage=Q,e.createLinkTool=ee;var te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ee(s.EditorToolsSettings.link));e.Link=te;var ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ee(s.EditorToolsSettings.insertFile));function re(e){return y.ListToolNS.createListTool(e)}e.InsertFile=ne,e.createListTool=re;var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(re(s.EditorToolsSettings.orderedList));e.OrderedList=oe;var ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(re(s.EditorToolsSettings.bulletList));function ae(e){return b.OutdentToolNS.createOutdentTool(e)}e.UnorderedList=ie,e.BulletedList=function(e){return a.createElement(N.ListTool,i({listType:s.EditorToolsSettings.bulletList.listType,items:[{icon:"list-unordered",text:"Disc",style:"disc"},{icon:"list-unordered-outline",text:"Circle",style:"circle"},{icon:"list-unordered-square",text:"Square",style:"square"}],icon:"list-unordered",titleKey:s.EditorToolsSettings.bulletList.messages.title},e))},e.NumberedList=function(e){return a.createElement(N.ListTool,i({listType:s.EditorToolsSettings.orderedList.listType,items:[{icon:"list-ordered",text:"Decimal"},{icon:"list-roman-upper",text:"Upper roman",style:"upper-roman"},{icon:"list-roman-lower",text:"Lower roman",style:"lower-roman"},{icon:"list-latin-big",text:"Upper latin",style:"upper-latin"},{icon:"list-latin-small",text:"Lower latin",style:"lower-latin"}],icon:"list-ordered",titleKey:s.EditorToolsSettings.orderedList.messages.title},e))},e.createOutdentTool=ae;var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ae(s.EditorToolsSettings.outdent));function le(e){return k.TableEditNS.createAddRowBeforeTool(e)}function ce(e){return k.TableEditNS.createAddRowAfterTool(e)}function ue(e){return k.TableEditNS.createAddColumnBeforeTool(e)}function de(e){return k.TableEditNS.createAddColumnAfterTool(e)}function pe(e){return k.TableEditNS.createDeleteRowTool(e)}function fe(e){return k.TableEditNS.createDeleteColumnTool(e)}function he(e){return k.TableEditNS.createDeleteTableTool(e)}function me(e){return k.TableEditNS.createMergeCellsTool(e)}function ge(e){return k.TableEditNS.createSplitCellTool(e)}e.Outdent=se,e.Print=function(e){return a.createElement(x.Print,i({},e))},e.Pdf=function(e){return a.createElement(O.Pdf,i({},e))},e.SelectAll=function(e){return a.createElement(S.SelectAll,i({},e))},e.CleanFormatting=function(e){return a.createElement(E.CleanFormatting,i({},e))},e.createAddRowBeforeTool=le,e.createAddRowAfterTool=ce,e.createAddColumnBeforeTool=ue,e.createAddColumnAfterTool=de,e.createDeleteRowTool=pe,e.createDeleteColumnTool=fe,e.createDeleteTableTool=he,e.createMergeCellsTool=me,e.createSplitCellTool=ge;var ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(le(s.EditorToolsSettings.addRowBefore));e.AddRowBefore=ve;var ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ce(s.EditorToolsSettings.addRowAfter));e.AddRowAfter=ye;var be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ue(s.EditorToolsSettings.addColumnBefore));e.AddColumnBefore=be;var ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(de(s.EditorToolsSettings.addColumnAfter));e.AddColumnAfter=ke;var we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(pe(s.EditorToolsSettings.deleteRow));e.DeleteRow=we;var Ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(fe(s.EditorToolsSettings.deleteColumn));e.DeleteColumn=Ce;var xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(he(s.EditorToolsSettings.deleteTable));e.DeleteTable=xe;var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(me(s.EditorToolsSettings.mergeCells));e.MergeCells=Oe;var Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ge(s.EditorToolsSettings.splitCell));function Ee(e){return w.UnlinkToolNS.createUnlinkTool(e)}e.SplitCell=Se,e.createUnlinkTool=Ee;var Ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Ee(s.EditorToolsSettings.unlink));function Ne(e){return C.ViewHtmlToolNS.createViewHtmlTool(e)}e.Unlink=Ie,e.createViewHtmlTool=Ne;var Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Ne(s.EditorToolsSettings.viewHtml));e.ViewHtml=Te;var Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(I.FindAndReplace);e.FindAndReplace=Me}(t.EditorTools||(t.EditorTools={}))},4997:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.OutdentToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.OutdentToolNS||(t.OutdentToolNS={})).createOutdentTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=n&&n.state,h=o.dir,m=!!f&&(0,c.isIndented)(f,e.actions,h),g=f&&f.schema.nodes[e.listsTypes.listItem],v=!!f&&(0,c.canOutdentAsListItem)(f,{nodes:e.actions,listsTypes:e.listsTypes}),y=m||v,b=(0,d.provideLocalizationService)(this),k=e.messages.title,w=s.createElement(l.Button,i({onClick:function(){n&&v&&g?(0,c.liftListItem)(g)(n.state,n.dispatch):n&&m&&(0,c.indentBlocks)(e.actions,e.commandName,h)(n.state,n.dispatch)},title:b.toLanguageString(k,p.messages[k]),disabled:!y},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,w,{view:n}):w},n}(s.Component);return(0,d.registerForLocalization)(t),t}},3061:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.Pdf=void 0;var i=n(3899),a=n(2888),s=n(499),l=n(5809),c=n(2226),u=n(3364),d=n(2804),p=d.EditorToolsSettings.pdf,f=d.EditorToolsSettings.savePdfOptions;t.Pdf=function(e){var t=e.view,n=e.render,d=e.settings,h=void 0===d?p:d,m=e.savePdfOptions,g=e.savePdfCallback,v=o(e,["view","render","settings","savePdfOptions","savePdfCallback"]),y=h.messages.title,b=i.useCallback((function(){t&&(0,l.savePDF)(t.dom,r(r({},f),m||{}),g)}),[t,m,g]),k=i.createElement(a.Button,r({onClick:b,title:(0,s.useLocalization)().toLanguageString(y,u.messages[y])},c.onDownPreventDefault,h.props,v));return n?n.call(void 0,k,{view:t}):k}},219:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.Print=void 0;var i=n(3899),a=n(2888),s=n(499),l=n(2226),c=n(3364),u=n(2804).EditorToolsSettings.print;t.Print=function(e){var t=e.view,n=e.render,d=e.settings,p=void 0===d?u:d,f=o(e,["view","render","settings"]),h=t&&t.dom,m=h&&h.ownerDocument,g=m&&m.defaultView,v=p.messages.title,y=i.useCallback((function(){g&&g.print()}),[g]),b=i.createElement(a.Button,r({onClick:y,disabled:!g||g===window,title:(0,s.useLocalization)().toLanguageString(v,c.messages[v])},l.onDownPreventDefault,p.props,f));return n?n.call(void 0,b,{view:t}):b}},8980:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.createProseMirrorTool=void 0;var s=n(3899),l=n(2888),c=n(2226),u=n(499),d=n(3364);t.createProseMirrorTool=function(e,t){var n=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return o(r,n),r.prototype.render=function(){var n=this.props,r=n.view,o=n.render,p=a(n,["view","render"]),f=(0,u.provideLocalizationService)(this),h=e.messages.title,m=r&&r.state,g=!!m&&!t(m),v=s.createElement(l.Button,i({onClick:function(){return r&&t(r.state,(function(t){return r.dispatch(t.setMeta("commandName",e.commandName))}))},disabled:g},c.onDownPreventDefault,{title:f.toLanguageString(h,d.messages[h])},e.props,p));return o?o.call(void 0,v,{view:r}):v},r}(s.Component);return(0,u.registerForLocalization)(n),n}},9460:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectAll=void 0;var i=n(3899),a=n(2888),s=n(499),l=n(2226),c=n(3364),u=n(431),d=n(2804).EditorToolsSettings.selectAll;t.SelectAll=function(e){var t=e.view,n=e.render,p=e.settings,f=void 0===p?d:p,h=o(e,["view","render","settings"]),m=f.messages.title,g=i.useCallback((function(){t&&((0,u.selectAll)(t.state,t.dispatch),t.focus())}),[t]),v=i.createElement(a.Button,r({onClick:g,title:(0,s.useLocalization)().toLanguageString(m,c.messages[m])},l.onDownPreventDefault,f.props,h));return n?n.call(void 0,v,{view:t}):v}},3350:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TableEditNS=void 0;var r,o=n(431),i=n(8980),a=function(e,t){var n=(0,o.deleteColumn)(e,t);if(n&&!t){var r=(0,o.selectionCell)(e),i=r&&r.node(r.depth);if(i&&1===i.content.childCount)return!1}return n},s=function(e,t){var n=(0,o.deleteRow)(e,t);if(n&&!t){var r=(0,o.selectionCell)(e),i=r&&r.node(r.depth-1);if(i&&1===i.content.childCount)return!1}return n};(r=t.TableEditNS||(t.TableEditNS={})).createAddRowBeforeTool=function(e){return(0,i.createProseMirrorTool)(e,o.addRowBefore)},r.createAddRowAfterTool=function(e){return(0,i.createProseMirrorTool)(e,o.addRowAfter)},r.createAddColumnBeforeTool=function(e){return(0,i.createProseMirrorTool)(e,o.addColumnBefore)},r.createAddColumnAfterTool=function(e){return(0,i.createProseMirrorTool)(e,o.addColumnAfter)},r.createDeleteRowTool=function(e){return(0,i.createProseMirrorTool)(e,s)},r.createDeleteColumnTool=function(e){return(0,i.createProseMirrorTool)(e,a)},r.createDeleteTableTool=function(e){return(0,i.createProseMirrorTool)(e,o.deleteTable)},r.createMergeCellsTool=function(e){return(0,i.createProseMirrorTool)(e,o.mergeCells)},r.createSplitCellTool=function(e){return(0,i.createProseMirrorTool)(e,o.splitCell)}},8389:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.UnlinkToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.UnlinkToolNS||(t.UnlinkToolNS={})).createUnlinkTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f={mark:e.mark},h=!!n&&(0,c.hasMark)(n.state,f),m=(0,d.provideLocalizationService)(this),g=e.messages.title,v=s.createElement(l.Button,i({onClick:function(){return n&&(0,c.removeLink)(f,n.state.tr.setMeta("commandName",e.commandName))(n.state,n.dispatch)},disabled:!h},u.onDownPreventDefault,{title:m.toLanguageString(g,p.messages[g])},e.props,o));return r?r.call(void 0,v,{view:n}):v},n}(s.Component);return(0,d.registerForLocalization)(t),t}},2226:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.userSelectNone=t.itemRender=t.formatString=t.onDownPreventDefault=void 0;var r=n(3899);t.onDownPreventDefault={onMouseDown:function(e){return e.preventDefault()},onPointerDown:function(e){return e.preventDefault()}},t.userSelectNone={userSelect:"none"},t.formatString=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t,n){e=e.replace("{"+n+"}",String(t))})),e},t.itemRender=function(e,t){return t.dataItem.style?r.cloneElement(e,e.props,r.createElement("span",{style:t.dataItem.style},e.props.children)):e}},7306:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.ViewHtmlToolNS=void 0;var s=n(3899),l=n(2888),c=n(2226),u=n(3695),d=n(499),p=n(3364);(t.ViewHtmlToolNS||(t.ViewHtmlToolNS={})).createViewHtmlTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=(0,d.provideLocalizationService)(this),h=e.messages.viewHtml,m=[s.createElement(l.Button,i({onClick:this.toggleDialog,key:"viewHtml"},c.onDownPreventDefault,{title:f.toLanguageString(h,p.messages[h])},e.props,o)),this.state.openedDialog&&n&&s.createElement(u.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:n,settings:e,dir:o.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,m,{view:n}):m},n}(s.Component);return(0,d.registerForLocalization)(t),t}},3131:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.firefox=void 0,t.firefox="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent)},1457:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateEditorValue=void 0;var r=n(431),o=n(5538),i=function(e,t){var n=t.tr||e.state.tr.setSelection(new r.AllSelection(e.state.doc)).replaceSelectionWith(t.doc||o.EditorUtils.createDocument(e.state.schema,t.html||"")).setMeta("commandName","setHTML");e.updateState(e.state.apply(n))};t.updateEditorValue=function(e,t,n,r,o){"string"==typeof t?r&&t===o?i(e,{tr:r}):t!==n&&i(e,{html:t}):r&&t.eq(r.doc)?i(e,{tr:r}):e.state.doc.eq(t)||i(e,{doc:t})}},5538:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.EditorUtils=void 0;var o,i=n(4394),a=n(2346),s=n(431),l=n(580);(o=t.EditorUtils||(t.EditorUtils={})).alignBlocks=function(e,t,n){return Boolean((0,s.alignBlocks)(t,n)(e.state,e.dispatch))},o.applyInlineStyle=function(e,t,n){return(0,s.applyInlineStyle)(t,n)(e.state,e.dispatch)},o.applyLink=function(e,t,n){return(0,s.applyLink)(t,n)(e.state,e.dispatch)},o.canIndentList=function(e,t){return(0,s.canIndentAsListItem)(e,t)},o.canInsert=function(e,t){return(0,s.canInsert)(e,t)},o.canOutdentList=function(e,t){return(0,s.canOutdentAsListItem)(e,{listsTypes:t,nodes:[]})},o.convertMsLists=function(e){return(0,s.convertMsLists)(e)},o.createDocument=function(e,t,n){return(0,s.parseContent)((0,s.trimWhitespace)(t),e,void 0!==n?n:{preserveWhitespace:"full"})},o.createTable=function(e,t,n){return(0,s.createTable)(e,t,n)},o.formatBlockElements=function(e,t,n){return(0,s.formatBlockElements)(t,n)(e.state,e.dispatch)},o.getBlockFormats=function(e){return(0,s.getBlockFormats)(e)},o.getHtml=function(e){return(0,s.getHtml)(e)},o.getInlineStyles=function(e,t){return(0,s.getInlineStyles)(e,t)},o.getMark=function(e,t){return(0,s.getMark)(e,t)},o.hasMark=function(e,t){return(0,s.hasMark)(e,t)},o.hasNode=function(e,t){return(0,s.hasNode)(e,t)},o.indentBlocks=function(e,t,n,r){return Boolean((0,s.indentBlocks)(t,n,r)(e.state,e.dispatch))},o.indentHtml=function(e){return(0,s.indentHtml)(e)},o.insertNode=function(e,t,n){(0,s.insertNode)(t,n)(e.state,e.dispatch)},o.isAligned=function(e,t){return(0,s.isAligned)(e,t)},o.isIndented=function(e,t,n){return(0,s.isIndented)(e,t,n)},o.removeComments=function(e){return(0,s.removeComments)(e)},o.removeTag=function(e,t){return(0,s.removeTag)(e,t)},o.pasteCleanup=function(e,t){return(0,s.pasteCleanup)(e,t)},o.sanitizeClassAttr=function(e){(0,s.sanitizeClassAttr)(e)},o.sanitizeStyleAttr=function(e){(0,s.sanitizeStyleAttr)(e)},o.removeAttribute=function(e){(0,s.removeAttribute)(e)},o.sanitize=function(e){return(0,s.sanitize)(e)},o.replaceImageSourcesFromRtf=function(e,t){return(0,s.replaceImageSourcesFromRtf)(e,t)},o.textHighlight=function(e){return(0,s.textHighlight)(e)},o.imageResizing=function(e){return(0,s.imageResizing)(e)},o.tableResizing=function(){return(0,s.tableResizing)()},o.setHtml=function(e,t,n,r){var o=(0,s.trimWhitespace)(t);(0,s.setHtml)(o,n,r)(e.state,e.dispatch)},o.toggleInlineFormat=function(e,t,n,r){return(0,s.toggleInlineFormat)(t,n,r)(e.state,e.dispatch)},o.toggleList=function(e,t,n){return(0,s.toggleList)(e.state,e.dispatch,e,t,n)},o.getShortcuts=function(e){return i.getShortcuts(e)},o.propsKey=l.editorPropsKey,o.imageResizeKey=s.imageResizeKey,o.marks=r({},a.marks),o.nodes=r({},a.nodes)},580:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.editorPropsKey=void 0;var r=n(431);t.editorPropsKey=new r.PluginKey("editor-props")},4343:(e,t,n)=>{n.d(t,{f:()=>b});var r,o=n(3899),i=n(189),a=n(8047),s=n(3228),l=n(6144),c=n(9013),u=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},p=c.Z.styles,f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elementRef=o.createRef(),t}return u(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.elementRef.current},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.children,r=t.style,i=t.appear,s=t.enter,c=t.exit,u=t.transitionName,f=t.transitionEnterDuration,h=t.transitionExitDuration,m=t.className,g=t.onEnter,v=t.onEntering,y=t.onEntered,b=t.onExit,k=t.onExiting,w=t.onExited,C=t.onAfterExited,x=t.mountOnEnter,O=t.unmountOnExit,S=t.animationEnteringStyle,E=t.animationEnteredStyle,I=t.animationExitingStyle,N=t.animationExitedStyle,T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["children","style","appear","enter","exit","transitionName","transitionEnterDuration","transitionExitDuration","className","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onAfterExited","mountOnEnter","unmountOnExit","animationEnteringStyle","animationEnteredStyle","animationExitingStyle","animationExitedStyle"]),M=(0,a.A)(m,p["child-animation-container"]),D=d({transitionDelay:"0ms"},r),R={entering:d({transitionDuration:"".concat(f,"ms")},S),entered:d({},E),exiting:d({transitionDuration:"".concat(h,"ms")},I),exited:d({},N)},P={in:this.props.in,appear:i,enter:s,exit:c,mountOnEnter:x,unmountOnExit:O,timeout:{enter:f,exit:h},onEnter:function(){g&&g.call(void 0,{animatedElement:e.element,target:e})},onEntering:function(){v&&v.call(void 0,{animatedElement:e.element,target:e})},onEntered:function(){y&&y.call(void 0,{animatedElement:e.element,target:e})},onExit:function(){b&&b.call(void 0,{animatedElement:e.element,target:e})},onExiting:function(){k&&k.call(void 0,{animatedElement:e.element,target:e})},onExited:function(){C&&C.call(void 0,{animatedElement:e.element,target:e}),w&&w.call(void 0,{animatedElement:e.element,target:e})},classNames:{appear:p["".concat(u,"-appear")]||"".concat(u,"-appear"),appearActive:p["".concat(u,"-appear-active")]||"".concat(u,"-appear-active"),enter:p["".concat(u,"-enter")]||"".concat(u,"-enter"),enterActive:p["".concat(u,"-enter-active")]||"".concat(u,"-enter-active"),exit:p["".concat(u,"-exit")]||"".concat(u,"-exit"),exitActive:p["".concat(u,"-exit-active")]||"".concat(u,"-exit-active")}};return o.createElement(l.CSSTransition,d({},P,T,{nodeRef:this.elementRef}),(function(t){return o.createElement("div",{style:d(d({},D),R[t]),className:M,ref:e.elementRef},n)}))},t.propTypes={in:i.bool,children:i.oneOfType([i.arrayOf(i.node),i.node]),transitionName:i.string.isRequired,className:i.string,appear:i.bool,enter:i.bool,exit:i.bool,transitionEnterDuration:i.number.isRequired,transitionExitDuration:i.number.isRequired,mountOnEnter:i.bool,unmountOnExit:i.bool,animationEnteringStyle:i.object,animationEnteredStyle:i.object,animationExitingStyle:i.object,animationExitedStyle:i.object},t.defaultProps={mountOnEnter:!0,unmountOnExit:!1,onEnter:s.Z,onEntering:s.Z,onEntered:s.Z,onExit:s.Z,onExiting:s.Z,onExited:s.Z,onAfterExited:s.Z,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}},t}(o.Component),h=n(4006),m={name:"@progress/kendo-react-animation",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031155,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},g=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},y=c.Z.styles,b=function(e){function t(t){var n=e.call(this,t)||this;return(0,h.s)(m),n}return g(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.style,r=e.children,i=e.component,s=e.className,c=e.childFactory,u=(e.stackChildren,e.componentChildStyle),d=e.componentChildClassName,p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["id","style","children","component","className","childFactory","stackChildren","componentChildStyle","componentChildClassName"]),h={id:t,style:n,component:i,childFactory:c,className:(0,a.A)(y["animation-container"],y["animation-container-relative"],s)},m=o.Children.map(r||null,(function(e){return o.createElement(f,v({},p,{style:u,className:d}),e)}));return o.createElement(l.TransitionGroup,v({},h),m)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,component:i.string,id:i.string,style:i.any,transitionName:i.string.isRequired,appear:i.bool.isRequired,enter:i.bool.isRequired,exit:i.bool.isRequired,transitionEnterDuration:i.number.isRequired,transitionExitDuration:i.number.isRequired},t.defaultProps={component:"div"},t}(o.Component)},8686:(e,t,n)=>{n.d(t,{U:()=>d});var r,o=n(3899),i=n(189),a=n(4343),s=n(3228),l=n(9013),c=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)},d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={maxHeight:void 0,maxWidth:void 0},t.componentWillEnter=function(e){var n=t.props,r=n.onEnter,o=n.onBeforeEnter;o&&o.call(void 0,e),t.updateContainerDimensions(e.animatedElement,(function(){r&&r.call(void 0,e)}))},t.componentIsEntering=function(e){var n=t.props.onEntering;t.updateContainerDimensions(e.animatedElement,(function(){n&&n.call(void 0,e)}))},t.componentWillExit=function(e){var n=t.props.onExit;t.updateContainerDimensions(e.animatedElement,(function(){n&&n.call(void 0,e)}))},t.updateContainerDimensions=function(e,n){void 0===n&&(n=s.Z);var r=e.firstChild;if(r){var o=l.Z.outerHeight(r),i=l.Z.outerWidth(r);t.setState({maxHeight:o,maxWidth:i},n)}},t}return c(t,e),t.prototype.render=function(){var e,t=this.props,n=t.direction,r=t.children,i=t.childFactory,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["direction","children","childFactory"]),l=this.state,c=l.maxHeight,d=l.maxWidth,p={maxHeight:(e="vertical"===n?{maxHeight:c?"".concat(c,"px"):""}:{maxWidth:d?"".concat(d,"px"):""}).maxHeight,maxWidth:e.maxWidth};return o.createElement(a.f,u({},s,{childFactory:function(t){var n=i?i(t):t;return n.props.in?n:o.cloneElement(n,u(u({},n.props),{style:u(u({},n.props.style),{maxHeight:e.maxHeight,maxWidth:e.maxWidth})}))},onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:p,transitionName:"reveal-".concat(n)}),r)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["horizontal","vertical"]),component:i.string,id:i.string,style:i.any},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"},t}(o.Component)},9013:(e,t,n)=>{n.d(t,{Z:()=>r});const r={outerHeight:function(e){if(!e||!e.ownerDocument.defaultView)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop),r=parseFloat(t.marginBottom);return e.offsetHeight+n+r},outerWidth:function(e){if(!e||!e.ownerDocument.defaultView)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginLeft),r=parseFloat(t.marginRight);return e.offsetWidth+n+r},styles:{"animation-container":"k-animation-container","animation-container-relative":"k-animation-container-relative","animation-container-fixed":"k-animation-container-fixed","push-right-enter":"k-push-right-enter","push-right-appear":"k-push-right-appear","push-right-enter-active":"k-push-right-enter-active","push-right-appear-active":"k-push-right-appear-active","push-right-exit":"k-push-right-exit","push-right-exit-active":"k-push-right-exit-active","push-left-enter":"k-push-left-enter","push-left-appear":"k-push-left-appear","push-left-enter-active":"k-push-left-enter-active","push-left-appear-active":"k-push-left-appear-active","push-left-exit":"k-push-left-exit","push-left-exit-active":"k-push-left-exit-active","push-down-enter":"k-push-down-enter","push-down-appear":"k-push-down-appear","push-down-enter-active":"k-push-down-enter-active","push-down-appear-active":"k-push-down-appear-active","push-down-exit":"k-push-down-exit","push-down-exit-active":"k-push-down-exit-active","push-up-enter":"k-push-up-enter","push-up-appear":"k-push-up-appear","push-up-enter-active":"k-push-up-enter-active","push-up-appear-active":"k-push-up-appear-active","push-up-exit":"k-push-up-exit","push-up-exit-active":"k-push-up-exit-active",expand:"k-expand","expand-vertical-enter":"k-expand-vertical-enter","expand-vertical-appear":"k-expand-vertical-appear","expand-vertical-enter-active":"k-expand-vertical-enter-active","expand-vertical-appear-active":"k-expand-vertical-appear-active","expand-vertical-exit":"k-expand-vertical-exit","expand-vertical-exit-active":"k-expand-vertical-exit-active","expand-horizontal-enter":"k-expand-horizontal-enter","expand-horizontal-appear":"k-expand-horizontal-appear","expand-horizontal-enter-active":"k-expand-horizontal-enter-active","expand-horizontal-appear-active":"k-expand-horizontal-appear-active","expand-horizontal-exit":"k-expand-horizontal-exit","expand-horizontal-exit-active":"k-expand-horizontal-exit-active","child-animation-container":"k-child-animation-container","fade-enter":"k-fade-enter","fade-appear":"k-fade-appear","fade-enter-active":"k-fade-enter-active","fade-appear-active":"k-fade-appear-active","fade-exit":"k-fade-exit","fade-exit-active":"k-fade-exit-active","zoom-in-enter":"k-zoom-in-enter","zoom-in-appear":"k-zoom-in-appear","zoom-in-enter-active":"k-zoom-in-enter-active","zoom-in-appear-active":"k-zoom-in-appear-active","zoom-in-exit":"k-zoom-in-exit","zoom-in-exit-active":"k-zoom-in-exit-active","zoom-out-enter":"k-zoom-out-enter","zoom-out-appear":"k-zoom-out-appear","zoom-out-enter-active":"k-zoom-out-enter-active","zoom-out-appear-active":"k-zoom-out-appear-active","zoom-out-exit":"k-zoom-out-exit","zoom-out-exit-active":"k-zoom-out-exit-active","slide-in-appear":"k-slide-in-appear",centered:"k-centered","slide-in-appear-active":"k-slide-in-appear-active","slide-down-enter":"k-slide-down-enter","slide-down-appear":"k-slide-down-appear","slide-down-enter-active":"k-slide-down-enter-active","slide-down-appear-active":"k-slide-down-appear-active","slide-down-exit":"k-slide-down-exit","slide-down-exit-active":"k-slide-down-exit-active","slide-up-enter":"k-slide-up-enter","slide-up-appear":"k-slide-up-appear","slide-up-enter-active":"k-slide-up-enter-active","slide-up-appear-active":"k-slide-up-appear-active","slide-up-exit":"k-slide-up-exit","slide-up-exit-active":"k-slide-up-exit-active","slide-right-enter":"k-slide-right-enter","slide-right-appear":"k-slide-right-appear","slide-right-enter-active":"k-slide-right-enter-active","slide-right-appear-active":"k-slide-right-appear-active","slide-right-exit":"k-slide-right-exit","slide-right-exit-active":"k-slide-right-exit-active","slide-left-enter":"k-slide-left-enter","slide-left-appear":"k-slide-left-appear","slide-left-enter-active":"k-slide-left-enter-active","slide-left-appear-active":"k-slide-left-appear-active","slide-left-exit":"k-slide-left-exit","slide-left-exit-active":"k-slide-left-exit-active","reveal-vertical-enter":"k-reveal-vertical-enter","reveal-vertical-appear":"k-reveal-vertical-appear","reveal-vertical-enter-active":"k-reveal-vertical-enter-active","reveal-vertical-appear-active":"k-reveal-vertical-appear-active","reveal-vertical-exit":"k-reveal-vertical-exit","reveal-vertical-exit-active":"k-reveal-vertical-exit-active","reveal-horizontal-enter":"k-reveal-horizontal-enter","reveal-horizontal-appear":"k-reveal-horizontal-appear","reveal-horizontal-enter-active":"k-reveal-horizontal-enter-active","reveal-horizontal-appear-active":"k-reveal-horizontal-appear-active","reveal-horizontal-exit":"k-reveal-horizontal-exit","reveal-horizontal-exit-active":"k-reveal-horizontal-exit-active"}}},7037:(e,t,n)=>{n.d(t,{z:()=>p});var r,o=n(3899),i=n(189),a=n(8047),s=n(2697),l=n(4006),c=n(2709),u=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},p=function(e){function t(t){var n=e.call(this,t)||this;return n._element=null,n.handleClick=function(e){n.toggleIfApplicable(),n.props.onClick&&n.props.onClick.call(void 0,e)},(0,l.s)(c.k),n.state={selected:!0===n.props.togglable&&!0===n.props.selected},n}return u(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return void 0!==this._selectedTemp?this._selectedTemp:this.state.selected},enumerable:!1,configurable:!0}),t.getDerivedStateFromProps=function(e,t){return e.togglable&&void 0!==e.selected&&e.selected!==t.selected?{selected:e.selected}:null},t.prototype.render=function(){var e,n=this,r=this.props,i=r.children,l=r.togglable,c=r.icon,u=r.iconClass,p=r.imageUrl,f=r.imageAlt,h=(r.className,r.onClick,r.size),m=void 0===h?t.defaultProps.size:h,g=r.shape,v=void 0===g?t.defaultProps.shape:g,y=r.rounded,b=void 0===y?t.defaultProps.rounded:y,k=r.fillMode,w=void 0===k?t.defaultProps.fillMode:k,C=r.themeColor,x=void 0===C?t.defaultProps.themeColor:C,O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(r,["children","togglable","icon","iconClass","imageUrl","imageAlt","className","onClick","size","shape","rounded","fillMode","themeColor"]),S=void 0!==c||void 0!==u||void 0!==p,E=void 0!==i,I=function(e){var t=e.imageUrl,n=e.icon,r=e.iconClass,i=e.imageAlt;if(t)return o.createElement("img",{role:"presentation",className:"k-button-icon",alt:i,src:t});if(n){var s=(0,a.A)("k-button-icon k-icon","k-i-"+n);return o.createElement("span",{role:"presentation",className:s})}return r?o.createElement("span",{role:"presentation",className:(0,a.A)("k-button-icon",r)}):null}({icon:c,iconClass:u,imageUrl:p,imageAlt:f});return o.createElement("button",d({ref:function(e){return n._element=e},"aria-pressed":l?this.state.selected:void 0},O,{onClick:this.handleClick,className:(0,a.A)("k-button",(e={},e["k-button-".concat(s.G.sizeMap[m]||m)]=m,e["k-button-".concat(v)]=v,e["k-button-".concat(w)]=w,e["k-button-".concat(w,"-").concat(x)]=Boolean(w&&x),e["k-rounded-".concat(s.G.roundedMap[b]||b)]=b,e["k-icon-button"]=!E&&S,e["k-disabled"]=this.props.disabled,e["k-selected"]=this.state.selected,e["k-rtl"]="rtl"===this.props.dir,e),this.props.className)}),I,i&&o.createElement("span",{className:"k-button-text"},i))},t.prototype.toggleIfApplicable=function(){var e=this;if(this.props.togglable&&void 0===this.props.selected){var t=!this.state.selected;this._selectedTemp=t,this.setState({selected:t},(function(){return e._selectedTemp=void 0}))}},t.propTypes={children:i.node,selected:i.bool,togglable:i.bool,icon:i.string,iconClass:i.string,imageUrl:i.string,imageAlt:i.string,size:i.oneOf([null,"small","medium","large"]),shape:i.oneOf([null,"rectangle","square"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"flat","link","outline","solid"]),themeColor:i.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},t.defaultProps={togglable:!1,size:"medium",shape:"rectangle",rounded:"medium",fillMode:"solid",themeColor:"base"},t}(o.Component)},7711:(e,t,n)=>{n.d(t,{h:()=>f});var r,o=n(3899),i=n(189),a=n(8047),s=n(4006),l=n(2709),c=n(1889),u=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},p=c.Z.styles,f=function(e){function t(t){var n=e.call(this,t)||this;return n._element=null,(0,s.s)(l.k),n}return u(t,e),t.prototype.render=function(){var e,t=this,n=this.mapButtons(this.props.children),r=(0,a.A)([p["button-group"]],((e={})["k-disabled"]=this.props.disabled,e[p["button-group-stretched"]]=!!this.props.width,e),this.props.className),i={className:r,style:{width:"".concat(this.props.width)},dir:this.props.dir,role:"group","aria-disabled":this.props.disabled};return o.createElement("div",d({ref:function(e){t._element=e}},i,{className:r}),n)},t.prototype.mapButtons=function(e){var t=this,n=o.Children.count(e),r=void 0!==this.props.dir?"rtl"===this.props.dir:this._element&&"rtl"===getComputedStyle(this._element).direction||!1;return o.Children.map(e,(function(e,i){return o.isValidElement(e)?t.renderButton(e,i,i===n-1,r):e}))},t.prototype.renderButton=function(e,t,n,r){var i,s=(0,a.A)(e.props.className,((i={})[p["group-start"]]=r?n:0===t,i[p["group-end"]]=r?0===t:n,i)),l=d(d({},this.props.width?{width:this.props.width}:{}),e.props.style||{}),c=this.props.disabled||e.props.disabled,u=d(d(d(d({},e.props),s?{className:s}:{}),Object.keys(l).length?{style:l}:{}),void 0!==c?{disabled:c}:{});return o.Children.count(e.props.children)>0?o.cloneElement(e,u,e.props.children):o.cloneElement(e,u)},t.propTypes={children:i.oneOfType([i.arrayOf(i.element),i.element]),className:i.string,disabled:i.bool,width:i.string,dir:i.string},t}(o.Component)},1711:(e,t,n)=>{n.d(t,{A:()=>y});var r=n(3899),o=n(189),i=n(228),a=n(8199),s=n(3493),l=n(4703),c=n(8047),u=n(2697),d=n(4163),p=n(5770),f=n(5209),h=n(4006),m=n(2709),g=n(3322),v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},y=r.forwardRef((function(e,t){var n;(0,h.s)(m.k);var o=r.useRef(null),y=r.useRef(null),b=(0,a.n)(y,e.dir);r.useImperativeHandle(o,(function(){return{element:y.current,props:e}})),r.useImperativeHandle(t,(function(){return o.current}));var k=r.useContext(i.Wn),w=k[0],C=k[1],x=r.useContext(i.OW),O=x[0],S=x[1],E=r.useContext(i.zD)[1],I=r.useMemo((function(){return e.selected||(Array.isArray(w)?w.some((function(t){return t===e.value})):w===e.value)}),[e.selected,e.value,w]),N=r.useMemo((function(){return O===e.value}),[e.value,O]);r.useEffect((function(){N&&y.current&&y.current.focus()}),[N]);var T=r.useCallback((function(t){C({type:f.ey.toggle,payload:e.value,event:t})}),[C,e.value]),M=r.useCallback((function(t){e.removable&&(E({type:p.S.remove,payload:e.value,event:t}),S({type:d.E.reset,payload:e.value,event:t}),C({type:f.ey.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:o.current,syntheticEvent:t}))}),[e.onRemove,e.value,e.removable,E,S,C]),D=r.useCallback((function(t){switch(t.keyCode){case s.R.left:S({type:d.E.prev,payload:e.value,event:t});break;case s.R.right:S({type:d.E.next,payload:e.value,event:t});break;case s.R.enter:C({type:f.ey.toggle,payload:e.value,event:t});break;case s.R.delete:M(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onKeyDown,e.value,S,C,M]),R=r.useCallback((function(t){S({payload:e.value,type:d.E.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onFocus,e.value,S]),P=r.useCallback((function(t){e.onBlur&&e.onBlur.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onBlur]),_=(0,g.i)(e,o,{onClick:T});return r.createElement("div",v({},_,{role:e.role,id:e.value,style:e.style,ref:y,dir:b,tabIndex:(0,l.p)(e.tabIndex,e.disabled,void 0),className:(0,c.A)("k-chip",(n={"k-rtl":"rtl"===b,"k-disabled":e.disabled,"k-selected":I,"k-focus":N},n["k-chip-".concat(u.G.sizeMap[e.size]||e.size)]=e.size,n["k-rounded-".concat(u.G.roundedMap[e.rounded]||e.rounded)]=e.rounded,n["k-chip-".concat(e.fillMode)]=e.fillMode,n["k-chip-".concat(e.fillMode,"-").concat(e.themeColor)]=Boolean(e.fillMode&&e.themeColor),n),e.className),"aria-checked":I,"aria-disabled":e.disabled,"aria-describedby":e.ariaDescribedBy,onFocus:R,onBlur:P,onKeyDown:D}),I&&e.selectedIcon&&r.createElement("span",{className:(0,c.A)("k-chip-icon","k-icon",e.selectedIcon)}),e.icon&&r.createElement("span",{className:(0,c.A)("k-chip-icon","k-icon",e.icon)}),r.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&r.createElement("span",{"aria-label":e.text,className:"k-chip-label"},e.text)),e.removable&&r.createElement("span",{className:"k-chip-actions"},r.createElement("span",{className:"k-chip-action"},r.createElement("span",{className:(0,c.A)("k-chip-remove-action","k-icon",e.removeIcon),onClick:M}))))})),b={id:o.string,text:o.string,value:o.any,dir:o.oneOf(["ltr","rtl"]),removable:o.bool,removeIcon:o.string,disabled:o.bool,icon:o.string,selectedIcon:o.string,onRemove:o.func,dataItem:o.any,selected:o.bool,ariaDescribedBy:o.string,size:o.oneOf([null,"small","medium","large"]),rounded:o.oneOf([null,"small","medium","large","full"]),fillMode:o.oneOf([null,"outline","solid"]),themeColor:o.oneOf([null,"base","info","success","warning","error"])};y.displayName="KendoReactChip",y.propTypes=b,y.defaultProps={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"}},228:(e,t,n)=>{n.d(t,{Wn:()=>y,OW:()=>b,zD:()=>k,jg:()=>w});var r=n(3899),o=n(189),i=n(8199),a=n(9659),s=n(3322),l=n(4703),c=n(8047),u=n(2697),d=n(5209),p=n(4163),f=n(5770),h=n(1711),m=n(4006),g=n(2709),v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},y=r.createContext([null,function(e){}]),b=r.createContext([null,function(e){}]),k=r.createContext([null,function(e){}]),w=r.forwardRef((function(e,t){var n;(0,m.s)(g.k);var o=r.useRef(null),w=r.useRef(null),C=(0,i.n)(w,e.dir),O=e.chip,S=e.id,E=e.style,I=e.tabIndex,N=e.disabled,T=e.size,M=e.className,D=e.ariaDescribedBy,R=e.ariaLabelledBy,P=e.selection,_=void 0===P?x.selection:P,A=e.value,j=void 0===A?x.defaultValue:A,F=e.defaultData,z=void 0===F?x.defaultData:F,L=e.valueField,B=void 0===L?x.valueField:L,V=e.textField,H=void 0===V?x.textField:V,K=e.onChange,W=e.onDataChange,$=r.useMemo((function(){return O||h.A}),[O,h.A]);r.useImperativeHandle(o,(function(){return{element:w.current,props:e}})),r.useImperativeHandle(t,(function(){return o.current}));var q=r.useCallback((function(e,t){K&&o.current&&K.call(void 0,{value:e,target:o.current,syntheticEvent:t})}),[K]),U=function(e,t,n){var o=r.useState(e),i=o[0],a=o[1];return[i,function(e){var r=(0,d.TX)(t.state||i,v(v({},e),t));n&&n(r,e.event),a(r)}]}(j,{selection:_,state:j},q),G=U[0],Y=U[1],X=r.useCallback((function(e,t){W&&o.current&&W.call(void 0,{value:e,target:o.current,syntheticEvent:t})}),[W]),J=function(e,t,n){var o=r.useState(e),i=o[0],a=o[1];return[i,function(e){var r=(0,f.I)(t.state||i,v(v({},e),t));n&&n(r,e.event),a(r)}]}(e.data||z,{state:e.data,valueField:B},X),Z=J[0],Q=J[1],ee=r.useCallback((function(e,t){return e.push(t[B]),e}),[B]),te=r.useMemo((function(){return e.data||Z}),[e.data,Z]),ne=r.useMemo((function(){return j||G}),[j,G]),re=r.useMemo((function(){return te.reduce(ee,[])}),[te,ee]),oe=r.useCallback((function(e){return(0,a.Y)(B)(e)}),[B]),ie=r.useCallback((function(e){return(0,a.Y)(H)(e)}),[H]),ae=function(e){var t=r.useState(null),n=t[0],o=t[1];return[n,function(t){var n=(0,p.L)(t.payload,v(v({},t),e));o(n)}]}({items:re}),se=ae[0],le=ae[1],ce=(0,s.i)(e,o);return r.createElement(y.Provider,{value:[ne,Y]},r.createElement(b.Provider,{value:[se,le]},r.createElement(k.Provider,{value:[te,Q]},r.createElement("div",v({ref:w},ce,{role:"listbox",id:S,dir:C,style:E,tabIndex:(0,l.p)(I,N,void 0),className:(0,c.A)("k-chip-list",(n={"k-rtl":"rtl"===C,"k-disabled":N},n["k-chip-list-".concat(u.G.sizeMap[T]||T)]=T,n),M),"aria-labelledby":R,"aria-describedby":D}),te.map((function(e,t){return r.createElement($,{role:"option",dataItem:e,size:T,key:[oe(e),t].join("-"),text:ie(e),value:oe(e)})}))))))})),C={id:o.string,className:o.string,tabIndex:o.number,data:o.any,defaultData:o.arrayOf(o.any),onDataChange:o.func,value:o.oneOfType([o.any,o.arrayOf(o.any)]),defaultValue:o.oneOfType([o.any,o.arrayOf(o.any)]),onChange:o.func,selection:o.oneOf(["single","none","multiple"]),textField:o.string,valueField:o.string,disabled:o.bool,dir:o.oneOf(["ltr","rtl"]),ariaLabelledBy:o.string,ariaDescribedBy:o.string,size:o.oneOf([null,"small","medium","large"])},x={chip:h.A,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};w.displayName="KendoReactChipList",w.propTypes=C,w.defaultProps=x},5770:(e,t,n)=>{var r;n.d(t,{S:()=>r,I:()=>o}),function(e){e.remove="remove",e.add="add",e.reorder="reorder"}(r||(r={}));var o=function(e,t){switch(t.type){case r.add:break;case r.remove:return e.filter((function(e){return e[t.valueField]!==t.payload}));case r.reorder:break;default:return e}}},4163:(e,t,n)=>{var r;n.d(t,{E:()=>r,L:()=>o}),function(e){e.next="next",e.prev="prev",e.current="current",e.reset="reset"}(r||(r={}));var o=function(e,t){var n=t.items.findIndex((function(t){return t===e}));switch(t.type){case r.next:return n===t.items.length-1?e:t.items[n+1];case r.prev:return 0===n?e:t.items[n-1];case r.current:return t.payload;case r.reset:return null;default:return e}}},5209:(e,t,n)=>{n.d(t,{ey:()=>o,TX:()=>a});var r,o,i=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};!function(e){e.single="single",e.multiple="multiple",e.none="none"}(r||(r={})),function(e){e.toggle="toggle",e.remove="remove"}(o||(o={}));var a=function(e,t){switch(t.selection){case r.single:switch(t.type){case o.toggle:if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case o.remove:return t.payload===e?null:e;default:return e}case r.multiple:switch(t.type){case o.toggle:if(Array.isArray(e))return e.some((function(e){return e===t.payload}))?e.filter((function(e){return e!==t.payload})):i(i([],e,!0),[t.payload],!1);if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case o.remove:return Array.isArray(e)?e.some((function(e){return e===t.payload}))?e.filter((function(e){return e!==t.payload})):i(i([],e,!0),[t.payload],!1):e;default:return e}case r.none:return null;default:return e}}},2888:(e,t,n)=>{n.r(t),n.d(t,{Button:()=>r.z,ButtonGroup:()=>o.h,Chip:()=>z.A,ChipList:()=>L.jg,DropDownButton:()=>N,DropDownButtonItem:()=>S,FloatingActionButton:()=>X,FloatingActionButtonItem:()=>W,SplitButton:()=>x,SplitButtonItem:()=>m,Toolbar:()=>R,ToolbarItem:()=>_,ToolbarSeparator:()=>j,ToolbarSpacer:()=>F,toolbarButtons:()=>T.w});var r=n(7037),o=n(7711),i=n(3899),a=n(189),s=n(3198),l=n(3493),c=n(8047),u=n(2697),d=n(5407),p=function(e){var t,n=i.useCallback((function(t){e.onClick(t,e.index)}),[e]),r=e.dataItem.render||e.item||(void 0===e.item?e.render:null),o=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,a=i.createElement("li",{id:e.id,className:(0,c.A)("k-item",e.className,{"k-focus":e.focused}),tabIndex:-1,onClick:n,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},i.createElement("span",{tabIndex:-1,className:(0,c.A)("k-link k-menu-link",{"k-selected":e.dataItem.selected,"k-disabled":e.dataItem.disabled}),key:"icon"},r?i.createElement(r,{item:e.dataItem,itemIndex:e.index}):i.createElement(i.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass)&&i.createElement("span",{className:(0,c.A)("k-icon",(t={},t["k-i-".concat(e.dataItem.icon)]=e.dataItem.icon,t["".concat(e.dataItem.iconClass)]=e.dataItem.iconClass,t))}),e.dataItem.imageUrl&&i.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),o&&i.createElement("span",{className:"k-menu-link-text"},o))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,a,e):a};p.displayName="KendoReactButtonItem";var f,h=(f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},f(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){return null},t.propTypes={text:a.string,icon:a.string,iconClass:a.string,imageUrl:a.string,disabled:a.bool,render:a.any},t}(i.Component),g=function(e,t,n,r){if(n)return e;var o=Math.min(r-1,Math.max(0,e));switch(t){case l.R.enter:case l.R.space:case l.R.esc:return-1;case l.R.up:case l.R.left:return o-1<0?r-1:o-1;case l.R.down:case l.R.right:return o+1>=r?0:o+1;case l.R.home:return 0;case l.R.end:return r-1;default:return e}},v=n(9222);function y(e){var t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function b(e){var t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}var k=n(4006),w=n(2709),C=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focused:!1,focusedIndex:-1,opened:!1},n.wrapper=null,n.mainButton=null,n.list=null,n.guid=(0,s.M)(),n.skipFocus=!1,n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==l.R.down?n.opened&&e.keyCode===l.R.up&&(n.dispatchPopupEvent(e,!1),n.setState({focusedIndex:-1,opened:!1})):(n.dispatchPopupEvent(e,!0),n.setState({focusedIndex:0,opened:!0}));else{var r=void 0;if(e.keyCode===l.R.enter||e.keyCode===l.R.space?(e.preventDefault(),n.dispatchClickEvent(e,t),t>=0&&(r={focusedIndex:n.opened?-1:0,opened:!n.opened},n.dispatchPopupEvent(e,r.opened))):n.opened&&e.keyCode===l.R.esc&&(r={focusedIndex:-1,opened:!1},n.dispatchPopupEvent(e,r.opened)),n.opened){var o=g(t,e.keyCode,e.altKey,n.buttonsData.length);o!==t&&((r=r||{}).focusedIndex=o);var i=e.keyCode===l.R.up||e.keyCode===l.R.down||e.keyCode===l.R.left||e.keyCode===l.R.right;e.altKey||!i&&e.keyCode!==l.R.home&&e.keyCode!==l.R.end||e.preventDefault()}r&&n.setState(r)}},n.switchFocus=function(e){n.skipFocus=!0,e(),window.setTimeout((function(){return n.skipFocus=!1}),0)},n.onFocus=function(e){n.skipFocus||((0,d.N)(n.props.onFocus,e,n,void 0),n.setState({focused:!0}))},n.onItemClick=function(e,t){var r=n.opened;r&&n.setState({focusedIndex:0,opened:!1}),n.dispatchClickEvent(e,t),r&&n.dispatchPopupEvent(e,!1)},n.onBlur=function(e){n.skipFocus||(n.setState({focused:!1,focusedIndex:-1,opened:!1}),(0,d.N)(n.props.onBlur,e,n,void 0),n.opened&&n.dispatchPopupEvent(e,!1))},n.onPopupClose=function(){n.state.focused&&n.switchFocus((function(){n.element&&(n.element.removeAttribute("tabindex"),n.element.focus({preventScroll:!0}))}))},n.listRef=function(e){n.list=e,e&&n.state.focused&&n.switchFocus((function(){e.focus({preventScroll:!0}),n.element&&(n.element.tabIndex=-1)}))},n.onSplitPartClick=function(e){if(n.buttonsData.length){var t=!n.opened;n.dispatchPopupEvent(e,t),n.setState({focusedIndex:t?0:-1,opened:t,focused:!0})}},n.onDownSplitPart=function(e){e.preventDefault(),n.element&&document.activeElement!==n.element&&document.activeElement!==n.list&&n.element.focus()},n.onItemDown=function(e){document.activeElement===n.list&&e.preventDefault()},n.dispatchPopupEvent=function(e,t){(0,d.N)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},(0,k.s)(w.k),n}return C(t,e),Object.defineProperty(t.prototype,"opened",{get:function(){return void 0===this.props.opened?this.state.opened:this.props.opened},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter((function(e){return e&&e.type===m})).map((function(e){return e.props}));var t=this.isRtl(),n=t?"rtl":void 0,o=this.props,a=o.id,s=o.style,l=o.tabIndex,d=o.disabled;return i.createElement("div",{id:a,style:s,className:(0,c.A)("k-split-button","k-button-group",{"k-focus":this.state.focused},"k-rounded-".concat(u.G.roundedMap[this.props.rounded||"medium"]),this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:n,ref:function(t){return e.wrapper=t}},i.createElement(r.z,{ref:function(t){return e.mainButton=t&&t.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:function(t){return e.onItemClick(t,-1)},disabled:d||void 0,tabIndex:l,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,iconClass:this.props.iconClass,imageUrl:this.props.imageUrl,dir:n,"aria-disabled":d,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),i.createElement(r.z,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"arrow-s",className:"k-split-button-arrow",disabled:d||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:n,"aria-label":"menu toggling button"}),this.renderPopup(t))},t.prototype.componentDidMount=function(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()},Object.defineProperty(t.prototype,"element",{get:function(){return this.mainButton},enumerable:!1,configurable:!0}),t.prototype.dispatchClickEvent=function(e,t){this.isItemDisabled(t)||(-1===t?(0,d.N)(this.props.onButtonClick,e,this,void 0):(0,d.N)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))},t.prototype.renderPopup=function(e){var t,n=this.props.popupSettings,r=void 0===n?{}:n,o=this.state.focusedIndex;return i.createElement(v.G,{anchor:this.wrapper,show:this.opened,animate:r.animate,popupClass:(0,c.A)("k-menu-popup",r.popupClass),anchorAlign:r.anchorAlign||y(e),popupAlign:r.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},i.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":o>=0?"".concat(this.guid,"-").concat(o):void 0,className:(0,c.A)("k-group k-menu-group k-reset",(t={},t["k-menu-group-".concat(u.G.sizeMap[this.props.size]||this.props.size)]=this.props.size,t))},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.item,r=t.itemRender,o=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,a){return i.createElement(p,{className:"k-menu-item",dataItem:t,textField:o,focused:e.state.focusedIndex===a,onClick:e.onItemClick,onDown:e.onItemDown,render:r,item:n,key:a,index:a,id:"".concat(e.guid,"-").concat(a)})})):null},t.prototype.isItemDisabled=function(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled},t.prototype.isRtl=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction},t.propTypes={accessKey:a.string,ariaLabel:a.string,title:a.string,onButtonClick:a.func,onFocus:a.func,onBlur:a.func,onItemClick:a.func,onOpen:a.func,onClose:a.func,text:a.string,items:a.arrayOf(a.any),textField:a.string,tabIndex:a.number,disabled:a.bool,icon:a.string,iconClass:a.string,imageUrl:a.string,popupSettings:a.object,itemRender:a.any,item:a.func,className:a.string,buttonClass:a.string,dir:a.string},t.defaultProps={size:"medium",rounded:"medium",shape:"rectangle",fillMode:"solid",themeColor:"base"},t}(i.Component),O=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.render=function(){return null},t.propTypes={text:a.string,icon:a.string,iconClass:a.string,imageUrl:a.string,selected:a.bool,disabled:a.bool,render:a.any},t}(i.Component),E=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=function(){return I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},I.apply(this,arguments)},N=function(e){function t(t){var n=e.call(this,t)||this;return n.state={opened:!1,focused:!1,focusedIndex:-1},n.wrapper=null,n.mainButton=null,n.list=null,n.skipFocus=!1,n.guid=(0,s.M)(),n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==l.R.down?n.opened&&e.keyCode===l.R.up&&(n.dispatchPopupEvent(e,!1),n.setState({focusedIndex:-1,opened:!1})):(n.dispatchPopupEvent(e,!0),n.setState({focusedIndex:0,opened:!0}));else{var r=I({},n.state);if(e.keyCode===l.R.enter||e.keyCode===l.R.space?(t>=0&&n.dispatchClickEvent(e,t),e.preventDefault(),r.focusedIndex=n.opened?-1:0,r.opened=!n.opened,n.dispatchPopupEvent(e,r.opened)):n.opened&&e.keyCode===l.R.esc&&(r.focusedIndex=-1,r.opened=!1,n.dispatchPopupEvent(e,r.opened)),n.opened){var o=g(t,e.keyCode,e.altKey,n.buttonsData.length);r.focusedIndex=o;var i=e.keyCode===l.R.up||e.keyCode===l.R.down||e.keyCode===l.R.left||e.keyCode===l.R.right;e.altKey||!i&&e.keyCode!==l.R.home&&e.keyCode!==l.R.end||e.preventDefault()}n.setState(r)}},n.switchFocus=function(e){n.skipFocus=!0,e(),window.setTimeout((function(){return n.skipFocus=!1}),0)},n.handleFocus=function(e){n.skipFocus||(n.setState({focused:!0,focusedIndex:n.opened?0:-1}),(0,d.N)(n.props.onFocus,e,n,void 0))},n.handleBlur=function(e){n.skipFocus||(n.setState({focused:!1,opened:!1,focusedIndex:-1}),(0,d.N)(n.props.onBlur,e,n,void 0),n.opened&&n.dispatchPopupEvent(e,!1))},n.onItemClick=function(e,t){n.setState({focusedIndex:-1,opened:!1}),n.dispatchClickEvent(e,t),n.dispatchPopupEvent(e,!1)},n.onItemDown=function(e){document.activeElement===n.list&&e.preventDefault()},n.mouseDown=function(e){e.preventDefault(),n.element&&document.activeElement!==n.element&&document.activeElement!==n.list&&n.element.focus()},n.onPopupClose=function(){n.state.focused&&n.switchFocus((function(){n.element&&(n.element.removeAttribute("tabindex"),n.element.focus({preventScroll:!0}))}))},n.listRef=function(e){n.list=e,e&&n.state.focused&&n.switchFocus((function(){e.focus({preventScroll:!0}),n.element&&(n.element.tabIndex=-1)}))},n.onClickMainButton=function(e){if(n.buttonsData.length){var t=!n.opened;n.setState({opened:t,focused:!0,focusedIndex:t?0:-1}),n.dispatchPopupEvent(e,t)}},n.dispatchPopupEvent=function(e,t){(0,d.N)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},(0,k.s)(w.k),n}return E(t,e),Object.defineProperty(t.prototype,"opened",{get:function(){return void 0===this.props.opened?this.state.opened:this.props.opened},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t=this.isRtl(),n=t?"rtl":void 0,o=this.props,a=o.id,s=o.style,l=o.tabIndex,u=o.disabled;return this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter((function(e){return e&&e.type===S})).map((function(e){return e.props})),i.createElement("div",{id:a,style:s,className:(0,c.A)("k-dropdown-button",{"k-focus":this.state.focused},this.props.className),onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,dir:n,ref:function(t){return e.wrapper=t}},i.createElement(r.z,{size:this.props.size,shape:this.props.shape,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,disabled:u||void 0,tabIndex:l,accessKey:this.props.accessKey,icon:this.props.icon,iconClass:this.props.iconClass,className:this.props.buttonClass,imageUrl:this.props.imageUrl,dir:n,ref:function(t){return e.mainButton=t&&t.element},type:"button","aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),this.renderPopup(t))},t.prototype.componentDidMount=function(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()},Object.defineProperty(t.prototype,"element",{get:function(){return this.mainButton},enumerable:!1,configurable:!0}),t.prototype.dispatchClickEvent=function(e,t){this.isItemDisabled(t)||(0,d.N)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})},t.prototype.renderPopup=function(e){var t,n=this.props.popupSettings,r=void 0===n?{}:n,o=this.state.focusedIndex;return i.createElement(v.G,{anchor:this.wrapper,show:this.opened,animate:r.animate,popupClass:(0,c.A)("k-menu-popup",r.popupClass),anchorAlign:r.anchorAlign||y(e),popupAlign:r.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},i.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,"aria-activedescendant":o>=0?"".concat(this.guid,"-").concat(o):void 0,ref:this.listRef,className:(0,c.A)("k-group k-menu-group k-reset",(t={},t["k-menu-group-".concat(u.G.sizeMap[this.props.size]||this.props.size)]=this.props.size,t))},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.item,r=t.itemRender,o=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,a){return i.createElement(p,{className:"k-menu-item",dataItem:t,textField:o,focused:e.state.focusedIndex===a,onClick:e.onItemClick,onDown:e.onItemDown,render:r,item:n,index:a,key:a,id:"".concat(e.guid,"-").concat(a)})})):null},t.prototype.isItemDisabled=function(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled},t.prototype.isRtl=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction},t.propTypes={accessKey:a.string,ariaLabel:a.string,title:a.string,onFocus:a.func,onBlur:a.func,onItemClick:a.func,onOpen:a.func,onClose:a.func,items:a.arrayOf(a.any),textField:a.string,tabIndex:a.number,disabled:a.bool,icon:a.string,iconClass:a.string,imageUrl:a.string,popupSettings:a.object,itemRender:a.func,item:a.func,className:a.string,buttonClass:a.string,dir:a.string},t.defaultProps={size:"medium",rounded:"medium",shape:"rectangle",fillMode:"solid",themeColor:"base"},t}(i.Component),T=n(1889),M=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(){return D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},D.apply(this,arguments)},R=function(e){function t(n){var r=e.call(this,n)||this;return r._element=null,r.offsetHeight=0,r.offsetWidth=0,r.buttons=[],r.focusedSelector=r.selectors.map((function(e){return e+":focus"})).join(","),r.setTabIndex=function(e){var n=r.props.tabIndex,o=void 0===n?t.defaultProps.tabIndex:n;r.buttons.forEach((function(t,n){t.tabIndex=n===e?o:-1}))},r.onKeyDown=function(e){var t=e.target;if((e.keyCode===l.R.left||e.keyCode===l.R.right)&&!e.defaultPrevented&&-1!==r.buttons.findIndex((function(e){return e===t}))){var n=r.focusedIndex;e.keyCode===l.R.left?r.focusButton(n,n-1):r.focusButton(n,n+1)}},r.onWindowResize=function(e){var t=r.element;if(t){var n=t.offsetWidth,o=t.offsetHeight;if(r.offsetWidth!==n||r.offsetHeight!==o){r.offsetWidth=n,r.offsetHeight=o;var i={offsetWidth:r.offsetWidth,offsetHeight:r.offsetHeight};r.props.onResize&&r.props.onResize.call(void 0,D(D({target:r},i),{nativeEvent:e}))}}},(0,k.s)(w.k),r}return M(t,e),Object.defineProperty(t.prototype,"selectors",{get:function(){return this.props.buttons||T.w},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"focusedIndex",{get:function(){var e=this.element&&this.element.querySelector(this.focusedSelector);return Math.max(0,this.buttons.findIndex((function(t){return t===e})))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.onWindowResize);var e=this.element;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,!1!==this.props.keyboardNavigation&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(0)))},t.prototype.componentDidUpdate=function(){var e=this.element;e&&!1!==this.props.keyboardNavigation&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(this.focusedIndex))},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.onWindowResize),this.buttons.length=0},t.prototype.render=function(){var e=this;return i.createElement("div",{id:this.props.id,className:(0,c.A)("k-widget k-toolbar",this.props.className),style:this.props.style,role:void 0!==this.props.role?this.props.role||void 0:"toolbar",dir:this.props.dir,ref:function(t){return e._element=t},onKeyDown:!1!==this.props.keyboardNavigation?this.onKeyDown:void 0},this.props.children)},t.prototype.focusButton=function(e,n){var r=this.props.tabIndex,o=void 0===r?t.defaultProps.tabIndex:r,i=this.buttons[n];if(i){i.tabIndex=o,i.focus();var a=this.buttons[e];a&&(a.tabIndex=-1)}},t.propTypes={tabIndex:a.number,dir:a.string,keyboardNavigation:a.bool,style:a.object,className:a.string,role:a.string,onResize:a.func,buttons:a.arrayOf(a.string)},t.defaultProps={tabIndex:0},t}(i.Component),P=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t}return P(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return i.createElement("span",{id:this.props.id,className:this.props.className,style:this.props.style,ref:function(t){return e._element=t}},this.props.children)},t.propTypes={className:a.string},t}(i.PureComponent),A=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(t,e),t.prototype.render=function(){return i.createElement(_,{className:"k-separator"})},t}(i.PureComponent),F=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useRef(null);i.useImperativeHandle(r,(function(){return{element:n.current}})),i.useImperativeHandle(t,(function(){return{element:n.current}}));var o=i.useMemo((function(){return(0,c.A)("k-spacer",e.className)}),[e.className]);return i.createElement("span",{ref:n,className:o})}));F.displayName="KendoReactToolbarSpacer",F.propTypes={className:a.string};var z=n(1711),L=n(228),B=n(8259),V=n(8199),H=n(4703),K=function(){return K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},K.apply(this,arguments)},W=i.forwardRef((function(e,t){var n=e.className,r=e.disabled,o=e.text,a=e.icon,s=e.style,l=e.id,u=e.focused,d=e.tabIndex,p=e.index,f=e.dataItem,h=e.item,m=e.onDown,g=e.onClick,v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["className","disabled","text","icon","style","id","focused","tabIndex","index","dataItem","item","onDown","onClick"]),y=i.useRef(null),b=i.useCallback((function(){y.current&&y.current.focus()}),[]),k=i.useCallback((function(){return{element:y.current,focus:b}}),[b]);i.useImperativeHandle(t,k);var w=i.useCallback((function(e){g&&void 0!==p&&!r&&g(e,p)}),[g,p]),C=i.useMemo((function(){return(0,c.A)("k-fab-item",{"k-focus":u,"k-disabled":r},n)}),[n,r,u]),x=h;return i.createElement("li",K({ref:y,id:l,className:C,style:s,role:"menuitem",tabIndex:(0,H.p)(d,r),"aria-disabled":r,"aria-label":"".concat(o||""," floatingactionbutton item"),onClick:w,onMouseDown:m,onPointerDown:m},v),x?i.createElement(x,{itemIndex:p,item:f}):i.createElement(i.Fragment,null,o&&i.createElement("span",{className:"k-fab-item-text"},o),a&&i.createElement("span",{className:(0,c.A)("k-fab-item-icon k-icon k-i-".concat(a))})))}));W.propTypes={className:a.string,style:a.object,children:a.any,disabled:a.bool,focused:a.bool,index:a.number,icon:a.string,text:a.string,tabIndex:a.number,customProp:a.any},W.displayName="KendoFloatingActionButtonItem";var $="16px",q=function(e){return"number"==typeof e?e+"px":e},U=function(e,t){var n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},G=function(e,t){var n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},Y=function(){return Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Y.apply(this,arguments)},X=i.forwardRef((function(e,t){(0,k.s)(w.k);var n=e.align,r=void 0===n?J.align:n,o=e.alignOffset,a=e.className,p=e.disabled,f=e.icon,h=e.iconClass,m=e.id,g=e.items,y=e.item,b=e.text,C=e.positionMode,x=void 0===C?J.positionMode:C,O=e.shape,S=void 0===O?J.shape:O,E=e.size,I=void 0===E?J.size:E,N=e.style,T=e.rounded,M=void 0===T?J.rounded:T,D=e.themeColor,R=void 0===D?J.themeColor:D,P=e.overlayStyle,_=e.tabIndex,A=e.accessKey,j=e.popupSettings,F=void 0===j?{}:j,z=e.modal,L=e.onClick,K=e.onItemClick,X=e.onFocus,Z=e.onBlur,Q=e.onKeyDown,ee=e.onOpen,te=e.onClose,ne=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["align","alignOffset","className","disabled","icon","iconClass","id","items","item","text","positionMode","shape","size","style","rounded","themeColor","overlayStyle","tabIndex","accessKey","popupSettings","modal","onClick","onItemClick","onFocus","onBlur","onKeyDown","onOpen","onClose"]),re=(0,B.u)(),oe=re?re+2:100,ie=i.useRef(null),ae=i.useRef(null),se=i.useRef(null),le=i.useRef(null),ce=i.useCallback((function(){ae.current&&ae.current.focus()}),[]),ue=i.useCallback((function(){return{element:ae.current,focus:ce}}),[ce]);i.useImperativeHandle(ie,ue),i.useImperativeHandle(t,(function(){return ie.current}));var de=i.useState(!1),pe=de[0],fe=de[1],he=i.useState(!1),me=he[0],ge=he[1],ve=i.useState(-1),ye=ve[0],be=ve[1],ke=i.useMemo((function(){return(0,s.M)()}),[]),we=(0,V.n)(ae,e.dir),Ce="rtl"===we,xe=i.useMemo((function(){return(0,s.M)()}),[]);i.useEffect((function(){!function(e,t,n,r){var o=t.horizontal,i=t.vertical;if(e.current){var a=n&&void 0!==n.x?q(n.x):$,s=n&&void 0!==n.x?"calc(50% + ".concat(q(n.x),")"):"50%",l=n&&void 0!==n.y?q(n.y):$,c=n&&void 0!==n.y?"calc(50% + ".concat(q(n.y),")"):"50%";e.current.style.setProperty(function(e,t){return{end:t?"left":"right",center:"left",start:t?"right":"left"}[e.horizontal||"end"]}(t,r),"center"===o?s:a),e.current.style.setProperty(function(e){return{top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]}(t),"middle"===i?c:l),r&&("top"!==i&&"bottom"!==i||"start"!==o||e.current.style.setProperty("left","unset"),"middle"===i&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===i&&"start"===o&&e.current.style.setProperty("left","unset"))}}(ae,r,o,Ce)}),[ae,r,o,Ce]),i.useEffect((function(){me&&ae&&ae.current&&ae.current.focus()}),[me,ae]);var Oe=i.useCallback((function(e,t){g&&(0,d.N)(t?ee:te,e,ue(),void 0)}),[ee,te,g]),Se=i.useCallback((function(e){e.target&&!p&&(!g&&L?(0,d.N)(L,e,ue(),void 0):(fe(!pe),ge(!0),be(pe?-1:0),Oe(e,!pe)))}),[fe,ge,be,L,Oe,pe,g,p]),Ee=i.useCallback((function(e){ge(!0),be(pe?0:-1),X&&(0,d.N)(X,e,ue(),void 0)}),[X,ge,be]),Ie=i.useCallback((function(e){ge(!1),fe(!1),be(-1),(0,d.N)(Z,e,ue(),void 0),pe&&Oe(e,!1)}),[Z,ge,fe,be,Oe]),Ne=i.useCallback((function(e){e.preventDefault()}),[]),Te=i.useCallback((function(e,t){g&&(g[t].disabled||(0,d.N)(K,e,ue(),{itemProps:g[t],itemIndex:t}))}),[K]),Me=i.useCallback((function(e,t){e.target&&g&&(be(t),fe(!1),Te(e,t),Oe(e,!1))}),[be,fe,Te,Oe]),De=i.useCallback((function(e){document.activeElement===ae.current&&e.preventDefault()}),[ae,document.activeElement]),Re=i.useCallback((function(e){var t=ye,n=g?g.length-1:-1,o="bottom"===r.vertical;switch(e.keyCode){case l.R.enter:case l.R.space:t>=0&&Te(e,t),e.preventDefault(),fe(!pe),be(pe?-1:0);break;case l.R.esc:e.preventDefault(),fe(!1),be(-1);break;case l.R.home:e.preventDefault(),be(0);break;case l.R.end:e.preventDefault(),be(n);break;case l.R.down:case l.R.right:e.preventDefault(),t<n&&!o&&be(t+1),t>0&&o&&be(t-1);break;case l.R.up:case l.R.left:e.preventDefault(),t>0&&!o&&be(t-1),t<n&&o&&be(t+1)}(0,d.N)(Q,e,ue(),void 0)}),[Q,ye,be,Ce,fe]),Pe=i.useMemo((function(){var e;return(0,c.A)("k-fab k-fab-solid",((e={})["k-fab-".concat(S)]=S,e["k-fab-sm"]="small"===I,e["k-fab-md"]="medium"===I,e["k-fab-lg"]="large"===I,e["k-disabled"]=p,e["k-pos-absolute"]="absolute"===x,e["k-pos-fixed"]="fixed"===x,e["k-focus"]=me,e["k-rounded-".concat(u.G.roundedMap[M]||M)]=M,e["k-fab-solid-".concat(R)]=R,e),"k-".concat(r.vertical,"-").concat(r.horizontal),a)}),[R,I,M,S,p,x,r,me,a]),_e=g&&g.map((function(e,t){return i.createElement(W,Y({},e,{key:t,index:t,id:"".concat(xe,"-").concat(t),disabled:p||e.disabled,focused:ye===t,dataItem:e,item:y,className:(0,c.A)(e.className,(n=we||"ltr",o=r.horizontal,{rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[n]["end"===o?"end":"start"])),onClick:Me,onDown:De}));var n,o})),Ae=f&&!b,je=(ae.current?ae.current.offsetWidth:0)/2-16;return i.createElement(B.$.Provider,{value:oe},i.createElement(i.Fragment,null,i.createElement("button",Y({ref:ae,id:m||ke,role:g?"menubutton":"button",type:"button","aria-disabled":p,"aria-expanded":g?pe:void 0,"aria-haspopup":!!g,"aria-label":"".concat(b||""," floatingactionbutton"),"aria-owns":g?xe:void 0,"aria-activedescendant":ye>=0&&g?"".concat(xe,"-").concat(ye):void 0,tabIndex:(0,H.p)(_,p),accessKey:A,dir:we,disabled:p,className:Pe,style:N,onClick:Se,onMouseDown:Ne,onFocus:Ee,onBlur:Ie,onKeyDown:Re},ne),f?i.createElement("span",{role:"presentation",className:(0,c.A)("k-fab-icon k-icon k-i-".concat(f))}):h?i.createElement("span",{role:"presentation",className:h}):null,b&&i.createElement("span",{className:"k-fab-text"},b)),z&&pe&&i.createElement("div",{className:"k-overlay",style:Y({zIndex:oe},P)}),i.createElement(v.G,{ref:le,anchor:ae.current,show:pe,animate:F.animate,popupClass:(0,c.A)("k-popup-transparent k-fab-popup",F.popupClass),anchorAlign:F.anchorAlign||U(r,Ce),popupAlign:F.popupAlign||G(r,Ce),style:{boxShadow:"none"}},i.createElement("ul",{ref:se,role:"menu","aria-labelledby":m,id:xe,className:(0,c.A)("k-fab-items",{"k-fab-items-bottom":"bottom"!==r.vertical,"k-fab-items-top":"bottom"===r.vertical}),style:{paddingLeft:Ae?je:void 0,paddingRight:Ae?je:void 0}},_e))))}));X.propTypes={className:a.string,style:a.object,id:a.string,dir:a.string,tabIndex:a.number,accessKey:a.string,disabled:a.bool,icon:a.string,iconClass:a.string,text:a.string,alignOffset:a.shape({x:a.oneOfType([a.number,a.string]),y:a.oneOfType([a.number,a.string])}),align:a.shape({vertical:a.oneOf(["top","middle","bottom"]),horizontal:a.oneOf(["start","center","end"])}),positionMode:a.oneOf(["absolute","fixed"]),shape:a.oneOf([null,"rectangle","square"]),size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),themeColor:a.oneOf([null,"primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:a.bool,overlayStyle:a.object};var J={align:{vertical:"bottom",horizontal:"end"},shape:"rectangle",size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};X.displayName="KendoFloatingActionButton"},2709:(e,t,n)=>{n.d(t,{k:()=>r});var r={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031260,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},1889:(e,t,n)=>{n.d(t,{w:()=>i,Z:()=>a});var r=':not(.k-disabled):not([disabled]):not([disabled="true"])',o=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",i=["button"+r+o,".k-button-group > button"+r+o,".k-dropdownlist"+r,".k-colorpicker"+r];const a={styles:{button:"k-button",flat:"k-flat",outline:"k-outline",clear:"k-button-clear",primary:"k-primary","state-selected":"k-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched",ltr:"k-ltr",rtl:"k-rtl"}}},6516:(e,t,n)=>{n.r(t),n.d(t,{Dialog:()=>I,DialogActionsBar:()=>c,DialogPropsContext:()=>E,Window:()=>X,WindowActionsBar:()=>W,WindowPropsContext:()=>Y});var r=n(3899),o=n(994),i=n(189),a=n(7037),s=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.id,i=e.closeIcon;return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",id:o},r.createElement("div",{className:"k-window-title k-dialog-title"},t),r.createElement("div",{className:"k-window-actions k-dialog-actions"},i&&r.createElement(a.z,{role:"button","aria-label":"Close",onClick:n,icon:"x",fillMode:"flat",className:"k-window-action k-dialog-action k-dialog-close"})))},l=n(8047),c=function(e){var t=e.layout,n=void 0===t?p.layout:t,o=e.children,i=(0,l.A)("k-dialog-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return r.createElement("div",{className:i},o)};c.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var u,d,p={layout:"stretched"},f=n(3198),h=n(5407),m=n(3493),g=n(8259),v=n(7827),y=n(848),b=n(4006),k={name:"@progress/kendo-react-dialogs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031704,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},w="data-windowid",C=function(e,t,n){var r=e;if(t&&t.defaultView){var o=t.querySelectorAll(".k-window:not(.k-dialog), .k-dialog-wrapper"),i=!1;return o.forEach((function(e){var o=t.defaultView.getComputedStyle(e,null);if(e.getAttribute(w)!==n&&null!==o.zIndex){var a=parseInt(o.zIndex,10);a>=r&&(r=a,i=!0)}})),i?r+2:r}return r},x=(u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},u(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),O=function(){return O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},O.apply(this,arguments)},S=function(e){function t(t){var n=e.call(this,t)||this;return n.context=0,n._id=(0,f.M)(),n.titleId=n.generateTitleId(),n.contentId=n.generateContentId(),n.onCloseDialog=function(e){e.preventDefault(),(0,h.N)(n.props.onClose,e,n,void 0)},n.onKeyDown=function(e){e.keyCode===m.R.esc&&n.props.onClose&&(e.preventDefault(),n.onCloseDialog(e));var t=n.element;if(t&&e.keyCode===m.R.tab){var r=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),o=r[0],i=r[r.length-1],a=n.getDocument();e.shiftKey?(a&&a.activeElement===o||a&&a.activeElement===n.element)&&(i.focus(),e.preventDefault()):a&&a.activeElement===i&&(o.focus(),e.preventDefault())}},n.getCurrentZIndex=function(){return n.state&&void 0!==n.context?n.state.zIndex>(n.context?n.context+2:0)?n.state.zIndex:n.context+2:n.context?n.context:10002},n.getDocument=function(){return n.props.appendTo?n.props.appendTo.ownerDocument:document},(0,b.s)(k),n.state={zIndex:C(n.getCurrentZIndex(),n.getDocument(),n._id)},n}return x(t,e),t.prototype.componentDidMount=function(){this.element&&this.props.autoFocus&&this.element.focus()},t.prototype.render=function(){var e,t=this,n=void 0!==this.props.id?this.props.id:this.titleId,i=this.props,a=i.title,l=i.width,c=i.height,u=i.children,d=i.minWidth,p=i.dir,f=i.style,h=i.contentStyle,m=r.Children.toArray(u),y=this.getContent(m),b=this.getActionBar(m),k=a?{"aria-labelledby":n}:null,C=void 0===this.props.closeIcon||this.props.closeIcon,x=this.getCurrentZIndex(),S=r.createElement(g.$.Provider,{value:x},r.createElement("div",O({},((e={})[w]=this._id,e),{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.onKeyDown,tabIndex:0,dir:p,style:O({zIndex:x},f),ref:function(e){return t.element=e}}),r.createElement("div",{className:"k-overlay"}),r.createElement("div",O({},k,{className:"k-widget k-window k-dialog",role:"dialog","aria-modal":!0,"aria-describedby":this.contentId,style:{width:l,height:c,minWidth:d}}),this.props.title&&r.createElement(s,{closeIcon:C,onCloseButtonClick:this.onCloseDialog,id:n},a),r.createElement("div",{className:"k-window-content k-dialog-content",style:h,id:this.contentId},y),b)));return v.N?null!==this.props.appendTo?o.createPortal(S,this.props.appendTo||document.body):S:null},t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===c}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==c}))},t.prototype.generateTitleId=function(){return"dialog-title"+this._id},t.prototype.generateContentId=function(){return"dialog-content"+this._id},t.displayName="Dialog",t.propTypes={title:i.any,id:i.string,dir:i.string,style:i.object,closeIcon:i.bool,width:i.oneOfType([i.number,i.string]),height:i.oneOfType([i.number,i.string]),minWidth:i.oneOfType([i.number,i.string]),autoFocus:i.bool},t.defaultProps={autoFocus:!1},t.contextType=g.$,t}(r.Component),E=(0,y.Y)(),I=(0,y.u)(E,S);I.displayName="KendoReactDialog",function(e){e.DEFAULT="DEFAULT",e.FULLSCREEN="FULLSCREEN",e.MINIMIZED="MINIMIZED"}(d||(d={}));var N,T=n(499),M="dialogs.windowMaximizeButton",D="dialogs.windowMinimizeButton",R="dialogs.windowRestoreButton",P="dialogs.windowCloseButton",_=((N={})[M]="maximize",N[D]="minimize",N[R]="restore",N[P]="close",N),A=function(){return A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},A.apply(this,arguments)},j=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.onMinimizeButtonClick,i=e.onFullScreenButtonClick,s=e.onRestoreButtonClick,l=e.onDoubleClick,c=e.stage,u=e.forwardedRef,p=e.id,f=(0,T.useLocalization)(),h=e.minimizeButton?r.createElement(e.minimizeButton,{onClick:o,stage:c}):r.createElement(a.z,{fillMode:"flat",icon:"window-minimize",onClick:o,"aria-label":f.toLanguageString(D,_[D])}),m=e.maximizeButton?r.createElement(e.maximizeButton,{onClick:i,stage:c}):r.createElement(a.z,{fillMode:"flat",icon:"window-maximize",onClick:i,"aria-label":f.toLanguageString(M,_[M])}),g=e.restoreButton?r.createElement(e.restoreButton,{onClick:s,stage:c}):r.createElement(a.z,{fillMode:"flat",icon:"window-restore",onClick:s,"aria-label":f.toLanguageString(R,_[R])}),v=e.closeButton?r.createElement(e.closeButton,{onClick:n,stage:c}):r.createElement(a.z,{fillMode:"flat",icon:"close",onClick:n,"aria-label":f.toLanguageString(P,_[P])});return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:u,onDoubleClick:l},r.createElement("div",{className:"k-window-title",id:p},t||""),r.createElement("div",{className:"k-window-actions"},c===d.DEFAULT&&h,c===d.DEFAULT&&m,c!==d.DEFAULT&&g,v))},F=r.forwardRef((function(e,t){return r.createElement(j,A({},e,{forwardedRef:t}))})),z=n(1779),L=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=["n","e","s","w","se","sw","ne","nw"],V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",null," ",B.map((function(t,n){return r.createElement(z._,{key:n,onDrag:function(n){var r=n.event;r.originalEvent.preventDefault(),e.props.onResize(r,{end:!1,direction:t})},onRelease:function(n){var r=n.event;r.originalEvent.preventDefault(),e.props.onResize(r,{end:!0,direction:t})}},r.createElement("div",{className:"k-resize-handle k-resize-"+t,style:{display:"block",touchAction:"none"}}))})))},t}(r.Component),H=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},t.prototype.render=function(){return this.props.children},t}(r.Component),W=function(e){var t=e.layout,n=void 0===t?$.layout:t,o=e.children,i=(0,l.A)("k-window-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return r.createElement("div",{className:i},o)};W.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var $={layout:"end"},q=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},U.apply(this,arguments)},G=function(e){function t(t){var n=e.call(this,t)||this;return n.context=0,n.draggable=null,n.offSetCoordinates={x:0,y:0},n._id=(0,f.M)(),n.titleId=n.generateTitleId(),n.onKeyDown=function(e){if(e.target===e.currentTarget){var t=n.props.minWidth||120,r=n.props.minHeight||100;if(e.ctrlKey&&n.props.resizable){switch(e.keyCode){case m.R.up:e.preventDefault(),r<=n.height-5&&n.setState({height:n.height-5});break;case m.R.down:e.preventDefault(),n.setState({height:n.height+5});break;case m.R.left:t<=n.width-5&&n.setState({width:n.width-5});break;case m.R.right:n.setState({width:n.width+5});break;default:return}n.dispatchMoveEvent(n.props.onResize,e,!1,void 0)}else if(e.altKey)switch(e.keyCode){case m.R.up:n.windowStage===d.MINIMIZED?(n.handleRestore(e),(0,h.N)(n.props.onStageChange,e,n,{state:d.DEFAULT})):n.windowStage===d.DEFAULT&&(n.handleFullscreen(e),(0,h.N)(n.props.onStageChange,e,n,{state:d.FULLSCREEN}));break;case m.R.down:n.windowStage===d.FULLSCREEN?(n.handleRestore(e),(0,h.N)(n.props.onStageChange,e,n,{state:d.DEFAULT})):n.windowStage===d.DEFAULT&&(n.handleMinimize(e),(0,h.N)(n.props.onStageChange,e,n,{state:d.MINIMIZED}))}else{if(!e.ctrlKey)switch(e.keyCode){case m.R.esc:return void(n.props.onClose&&n.handleCloseWindow(e));case m.R.up:n.setState({top:n.state.top-5});break;case m.R.down:n.setState({top:n.state.top+5});break;case m.R.left:n.setState({left:n.state.left-5});break;case m.R.right:n.setState({left:n.state.left+5});break;default:return}n.dispatchMoveEvent(n.props.onMove,e,!1,void 0)}}},n.onPress=function(e){var t=e.event;n.windowCoordinatesState.differenceLeft=t.pageX-n.left,n.windowCoordinatesState.differenceTop=t.pageY-n.top},n.onDrag=function(e){var t=e.event;t.originalEvent.preventDefault(),n.windowStage!==d.FULLSCREEN&&n.props.draggable&&(n.setState({top:Math.max(t.pageY-n.windowCoordinatesState.differenceTop,0),left:t.pageX-n.windowCoordinatesState.differenceLeft,isDragging:!0}),n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!1))},n.onRelease=function(e){var t=e.event;n.windowStage!==d.FULLSCREEN&&n.props.draggable&&n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!0),n.setState({isDragging:!1})},n.onFocus=function(){n._blurTimeout?(clearTimeout(n._blurTimeout),n._blurTimeout=void 0):n.setState({focused:!0,zIndex:C(n.getCurrentZIndex(),n.getDocument(),n._id)})},n.onBlur=function(){clearTimeout(n._blurTimeout);var e=n.getWindow();e&&(n._blurTimeout=e.setTimeout((function(){n.setState({focused:!1}),n._blurTimeout=void 0})))},n.getInitialTop=function(){if(void 0!==n.props.top)return n.props.top;if(void 0!==n.props.initialTop)return n.props.initialTop;var e=300;if(void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),n.props.appendTo)return n.props.appendTo.offsetHeight/2-e/2;var t=n.getWindow();return t?t.innerHeight/2-e/2:0},n.getInitialLeft=function(){if(void 0!==n.props.left)return n.props.left;if(void 0!==n.props.initialLeft)return n.props.initialLeft;var e=300;if(void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),n.props.appendTo)return n.props.appendTo.offsetWidth/2-e/2;var t=n.getWindow();return t?t.innerWidth/2-e/2:0},n.getInitialWidth=function(){var e=300;return void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),e},n.getInitialHeight=function(){var e=300;return void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),e},n.handleMinimize=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height,n.setState({stage:d.MINIMIZED,height:0}),(0,h.N)(n.props.onStageChange,e,n,{state:d.MINIMIZED})},n.handleFullscreen=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height;var t=n.getWindow(),r=t?t.innerWidth:0,o=t?t.innerHeight:0;n.setState({left:0,top:0,width:n.props.appendTo?n.props.appendTo.offsetWidth:r,height:n.props.appendTo?n.props.appendTo.offsetHeight:o,stage:d.FULLSCREEN}),(0,h.N)(n.props.onStageChange,e,n,{state:d.FULLSCREEN})},n.handleRestore=function(e){e.preventDefault(),n.windowStage===d.FULLSCREEN?n.setState({stage:d.DEFAULT,left:n.windowCoordinatesState.leftBeforeAction,top:n.windowCoordinatesState.topBeforeAction,width:n.windowCoordinatesState.widthBeforeAction,height:n.windowCoordinatesState.heightBeforeAction}):n.windowStage===d.MINIMIZED&&n.setState({stage:d.DEFAULT,height:n.windowCoordinatesState.heightBeforeAction}),(0,h.N)(n.props.onStageChange,e,n,{state:d.DEFAULT})},n.handleCloseWindow=function(e){e.preventDefault(),(0,h.N)(n.props.onClose,e,n,{state:void 0})},n.handleDoubleClick=function(e){n.windowStage===d.FULLSCREEN||n.windowStage===d.MINIMIZED?n.handleRestore(e):n.handleFullscreen(e)},n.handleResize=function(e,t){var r=n.props.appendTo?e.pageX-n.offSetCoordinates.x:e.pageX,o=n.props.appendTo?e.pageY-n.offSetCoordinates.y:e.pageY,i=n.width,a=n.height,s=n.props.minWidth||120,l=n.props.minHeight||100,c=n.top-o,u=n.left-r,d=r-n.left,p=o-n.top,f=Object.assign({},n.state,{isDragging:!t.end});t.direction.indexOf("n")>=0&&l-(a+c)<0&&(n.top>0&&(f.height=a+c),f.top=o),t.direction.indexOf("s")>=0&&l-p<0&&(f.height=p),t.direction.indexOf("w")>=0&&s-(i+u)<0&&(n.left>0&&(f.width=i+u),f.left=r),t.direction.indexOf("e")>=0&&s-d<0&&(f.width=d),n.setState(f),n.dispatchMoveEvent(n.props.onResize,e,!0,t.end)},n.dispatchMoveEvent=function(e,t,r,o){e&&e.call(void 0,{nativeEvent:t.nativeEvent?t.nativeEvent:t.originalEvent,drag:r,end:o,target:n,left:n.state.left,top:n.state.top,width:n.state.width,hight:n.state.height,height:n.state.height})},n.handleBrowserWindowResize=function(){if(n.windowStage===d.FULLSCREEN){var e=n.getWindow(),t=e?e.innerWidth:0,r=e?e.innerHeight:0;n.setState({width:n.props.appendTo?n.props.appendTo.offsetWidth:t,height:n.props.appendTo?n.props.appendTo.offsetHeight:r})}},n.getCurrentZIndex=function(){return n.state&&void 0!==n.context?n.state.zIndex>(n.context?n.context+2:0)?n.state.zIndex:n.context+2:n.context?n.context:10002},n.getDocument=function(){return n.props.appendTo?n.props.appendTo.ownerDocument:document},n.getWindow=function(){var e=n.getDocument();return e&&e.defaultView},(0,b.s)(k),n.state={stage:n.props.stage||d.DEFAULT,isDragging:!1,top:n.getInitialTop(),left:n.getInitialLeft(),width:n.getInitialWidth(),height:n.getInitialHeight(),focused:!0,zIndex:C(n.getCurrentZIndex(),n.getDocument(),n._id)},n.windowCoordinatesState={leftBeforeAction:n.getInitialLeft(),topBeforeAction:n.getInitialTop(),widthBeforeAction:n.getInitialWidth(),heightBeforeAction:n.getInitialHeight()},n}return q(t,e),t.prototype.componentDidMount=function(){var e=this.getWindow();e&&e.addEventListener("resize",this.handleBrowserWindowResize);var t=this.getDocument();if(this.props.appendTo&&t){var n=this.props.appendTo.getBoundingClientRect(),r=t.body.getBoundingClientRect();this.offSetCoordinates.x=n.left-r.left,this.offSetCoordinates.y=n.top-r.top}},t.prototype.componentWillUnmount=function(){var e=this.getWindow();e&&e.removeEventListener("resize",this.handleBrowserWindowResize)},t.prototype.componentDidUpdate=function(){var e=this.getDocument();if(this.props.appendTo&&e){var t=this.props.appendTo.getBoundingClientRect(),n=e.body.getBoundingClientRect();this.offSetCoordinates.x=t.left-n.left,this.offSetCoordinates.y=t.top-n.top}},t.prototype.render=function(){var e,t=this,n=r.Children.toArray(this.props.children),i=this.getContent(n),a=this.getActionBar(n),s=this.getCurrentZIndex(),c=(0,l.A)("k-widget","k-window",this.props.className,{"k-window-minimized":"MINIMIZED"===this.state.stage},{"k-window-focused":this.state.focused}),u=r.createElement(g.$.Provider,{value:s},r.createElement(r.Fragment,null,this.props.modal&&r.createElement("div",{className:"k-overlay",style:U({zIndex:s},this.props.overlayStyle)}),r.createElement("div",U({},((e={})[w]=this._id,e),{tabIndex:0,role:"dialog","aria-labelledby":this.titleId,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,ref:function(e){t.windowElement=e,t.element=e},className:c,style:U({top:this.top,left:this.left,width:this.width,height:this.height||"",zIndex:s},this.props.style)}),r.createElement(K,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},r.createElement(z._,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(e){return t.draggable=e}},r.createElement(F,{stage:this.windowStage,onDoubleClick:this.props.doubleClickStageChange?this.handleDoubleClick:void 0,onMinimizeButtonClick:this.handleMinimize,onFullScreenButtonClick:this.handleFullscreen,onRestoreButtonClick:this.handleRestore,onCloseButtonClick:this.handleCloseWindow,closeButton:this.props.closeButton,minimizeButton:this.props.minimizeButton,maximizeButton:this.props.maximizeButton,restoreButton:this.props.restoreButton,id:this.titleId},this.props.title)),this.windowStage!==d.MINIMIZED?r.createElement(r.Fragment,null,r.createElement("div",{className:"k-window-content"},i),a):null,this.windowStage===d.DEFAULT&&this.props.resizable?r.createElement(V,{onResize:this.handleResize}):null))));return v.N?null!==this.props.appendTo?o.createPortal(u,this.props.appendTo||document.body):u:null},Object.defineProperty(t.prototype,"top",{get:function(){return this.windowStage!==d.FULLSCREEN?Math.max(this.props.top||this.state.top,0):0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.windowStage!==d.FULLSCREEN?Math.max(this.props.left||this.state.left,0):0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){var e=this.props.width||this.state.width;if(this.windowStage===d.FULLSCREEN){if(this.props.appendTo)return this.props.appendTo.offsetWidth;var t=this.getWindow();e=t?t.innerWidth:0}return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var e=this.props.height||this.state.height;if(this.windowStage===d.FULLSCREEN){if(this.props.appendTo)return this.props.appendTo.offsetHeight;var t=this.getWindow();e=t?t.innerHeight:0}else this.windowStage===d.MINIMIZED&&(e=0);return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!1,configurable:!0}),t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===W}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==W}))},t.prototype.generateTitleId=function(){return"window-title-"+this._id},t.displayName="Window",t.propTypes={width:i.number,height:i.number,left:i.number,top:i.number,initialWidth:i.number,initialHeight:i.number,initialLeft:i.number,initialTop:i.number,minWidth:i.number,minHeight:i.number,resizable:i.bool,draggable:i.bool,title:i.any,shouldUpdateOnDrag:i.bool,stage:i.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"]),className:i.string,style:i.object,overlayStyle:i.object},t.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0,modal:!1,doubleClickStageChange:!0},t.contextType=g.$,t}(r.Component),Y=(0,y.Y)(),X=(0,y.u)(Y,G);X.displayName="KendoReactWindow"},5375:(e,t,n)=>{n.r(t),n.d(t,{AutoComplete:()=>Ie,AutoCompletePropsContext:()=>Ee,ComboBox:()=>ke,ComboBoxPropsContext:()=>be,DropDownList:()=>se,DropDownListPropsContext:()=>ae,DropDownTree:()=>Ut,DropDownTreePropsContext:()=>qt,MultiColumnComboBox:()=>Qe,MultiColumnComboBoxPropsContext:()=>Ze,MultiSelect:()=>$e,MultiSelectPropsContext:()=>We,MultiSelectTree:()=>tn,MultiSelectTreePropsContext:()=>en,getMultiSelectTreeValue:()=>an,getValueMap:()=>on});var r,o=n(3899),i=n(189),a=n(2697),s=n(8047),l=n(3493),c=n(4703),u=n(848),d=n(6097),p=n(9222),f=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)},m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.width,r=e.dir,i=e.itemsCount,a=e.popupSettings;return o.createElement(p.G,h({style:{width:n,direction:r},contentKey:i&&i.join()},a),t)},t}(o.Component);const g=m;var v=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=a.G.sizeMap,b=a.G.roundedMap,k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.input=null,t}return v(t,e),t.prototype.render=function(){var e,t=this,n=this.props,r=n.size,i=n.rounded,a=n.fillMode,l=n.inputRef;return o.createElement("div",{className:"k-list-filter"},o.createElement("span",{className:(0,s.A)("k-searchbox k-input",(e={},e["k-input-".concat(y[r]||r)]=r,e["k-rounded-".concat(b[i]||i)]=i,e["k-input-".concat(a)]=a,e))},o.createElement("span",{className:"k-input-icon k-icon k-i-search"}),o.createElement("input",{ref:l||function(e){return t.input=e},value:this.props.value||"",className:"k-input-inner",onChange:this.props.onChange,onKeyDown:this.props.onKeyDown,tabIndex:this.props.tabIndex,onClick:function(e){return e.stopPropagation()}})))},t}(o.Component);const w=k;var C=function(e){return null!=e},x=function(e,t,n){if(!C(e))return!1;var r=String(e);return n&&(r=r.toLowerCase()),0===r.indexOf(t)},O=function(e,t,n){var r=-1;if(t){t=t.toLowerCase();for(var o=0;o<e.length;o++){var i=(E(e[o],n)||"")+"";if(i&&i.toLowerCase().startsWith(t)){r=o;break}}}return r},S=function(e,t,n,r){void 0===r&&(r=!1);var o=function(e){return r?e:e.toLowerCase()};return e.findIndex((function(e){return n?o(E(e,n))===o(t):o(t)===o(e.toString())}))},E=function(e,t){if(t&&C(e)){var n=t.split("."),r=e;return n.forEach((function(e){r=r?r[e]:void 0})),r}return e},I=function(e,t,n){t.forEach((function(t){var r=e.findIndex((function(e){return N(e,t,n)}));-1!==r&&e.splice(r,1)}))},N=function(e,t,n){return e===t||C(e)===C(t)&&E(e,n)===E(t,n)},T=function(e,t,n){if(t){var r=S(e,t,n,!0);return-1!==r?e[r]:e[O(e,t,n)]}return e[0]},M=function(e){"INPUT"!==e.target.nodeName&&e.preventDefault()},D=function(e,t,n){return!!e==!!t&&e.text===t.text&&(e===t||function(e,t,n){if(void 0===e&&(e=[]),void 0===t&&(t=[]),e===t)return!0;if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!N(e[r],t[r],n))return!1;return!0}(e.data,t.data,n))},R=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(e){return e.preventDefault()},_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.defaultItem,r=e.textField;return o.createElement("div",{onClick:this.props.onClick,onMouseDown:P,style:{position:"unset"},className:(0,s.A)("k-list-optionlabel",{"k-selected":t})},E(n,r)||"")},t}(o.Component);const A=_;var j=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){return t.props.onClick(t.props.index,e)},t}return j(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.group,r=e.dataItem,i=e.virtual,a=e.render,l=o.createElement("li",{id:this.props.id,role:"option","aria-selected":t,className:(0,s.A)("k-list-item",{"k-selected":t,"k-focus":this.props.focused,"k-first":Boolean(n)}),onClick:this.handleClick,style:{position:i?"relative":"unset"}},o.createElement("span",{className:"k-list-item-text"},E(r,this.props.textField).toString()),void 0!==n?o.createElement("div",{className:"k-list-item-group-label"},n):null);return void 0!==a?a.call(void 0,l,this.props):l},t}(o.Component);const z=F;var L,B=n(499),V="dropdowns.nodata",H="dropdowns.clear",K=((L={})[H]="clear",L[V]="NO DATA FOUND.",L),W=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.renderItems=function(){var e=this,t=this.props,n=t.textField,r=t.valueField,i=t.groupField,a=t.optionsGuid,s=t.skip,l=void 0===s?0:s,c=t.virtual,u=t.focusedIndex,d=t.highlightSelected,p=void 0===d||d,f=t.value,h=t.data,m=t.itemRender,g=Array.isArray(f);return h.map((function(t,s){var d,v,y=l+s,b=p&&(!g&&N(t,f,r)||g&&-1!==f.findIndex((function(e){return N(e,t,r)}))),k=void 0;return s>0&&void 0!==i&&(d=E(t,i),v=E(h[s-1],i),d&&v&&d!==v&&(k=d)),o.createElement(z,{id:"option-".concat(a,"-").concat(y),virtual:c,dataItem:t,selected:b,focused:u===s,index:y,key:y,onClick:e.props.onClick,textField:n,group:k,render:m})}))},t.prototype.renderNoValueElement=function(e){var t=this.props.noDataRender,n=o.createElement("div",{className:"k-nodata"},o.createElement("div",null,e.toLanguageString(V,K[V])));return t?t.call(void 0,n):n},t.prototype.render=function(){var e=(0,B.provideLocalizationService)(this),t=this.props,n=t.id,r=t.show,i=t.wrapperCssClass,a=t.wrapperStyle,s=t.listStyle,l=t.listRef,c=t.wrapperRef,u=t.listClassName,d=void 0===u?"k-list-ul":u,p=this.renderItems();return p.length?o.createElement("div",{className:i,style:a,ref:c,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onScroll:this.props.onScroll,unselectable:"on"},o.createElement("ul",{id:n,role:"listbox","aria-hidden":!r||void 0,className:d,ref:l,style:s},p),this.props.scroller&&o.createElement("div",{className:"k-height-container"},this.props.scroller)):this.renderNoValueElement(e)},t}(o.Component);const q=$;(0,B.registerForLocalization)($);const U=function(){function e(){var e=this;this.container=null,this.scrollElement=null,this.list=null,this.containerHeight=0,this.skip=0,this.total=0,this.enabled=!1,this.pageSize=0,this.itemHeight=0,this.PageChange=null,this.prevScrollPos=0,this.listTranslate=0,this.scrollSyncing=!1,this.scrollerRef=function(t){var n=e;n.container=t,t&&(t.setAttribute("unselectable","on"),window.setTimeout(n.calcScrollElementHeight.bind(n),0))},this.calcScrollElementHeight=function(){e.scrollSyncing=!0;var t=!1;e.itemHeight=e.list?e.list.children[0].offsetHeight:e.itemHeight,e.containerHeight=Math.min(1533915,e.itemHeight*e.total);var n=e.containerHeight;return e.scrollElement&&(t=e.scrollElement.style.height!==n+"px")&&(e.scrollElement.style.height=n+"px"),e.scrollSyncing=!1,t},this.scrollHandler=this.scrollHandler.bind(this)}return Object.defineProperty(e.prototype,"translate",{get:function(){return this.listTranslate},enumerable:!1,configurable:!0}),e.prototype.changePage=function(e,t){var n=Math.min(Math.max(0,e),this.total-this.pageSize);n!==this.skip&&this.PageChange&&this.PageChange({skip:n,take:this.pageSize},t)},e.prototype.translateTo=function(e){this.listTranslate=e,this.list&&(this.list.style.transform="translateY("+e+"px)")},e.prototype.reset=function(){this.container&&(this.calcScrollElementHeight(),this.container.scrollTop=0,this.translateTo(0))},e.prototype.scrollToEnd=function(){this.container&&this.list&&(this.calcScrollElementHeight(),this.container.scrollTop=this.container.scrollHeight-this.container.offsetHeight,this.translateTo(this.container.scrollHeight))},e.prototype.localScrollUp=function(e){var t,n=this.itemHeight,r=this.container.scrollTop,o=this.listTranslate,i=r-o;if(!(i>n)){for(t=0;t<this.skip&&!(o+n+i<=r);t++)o-=n;if(o=this.validateTranslate(o),this.skip-t<=0&&o>=r)return this.translateTo(0),this.changePage(0,e),void(this.container.scrollTop=0);o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip-t,e))}},e.prototype.localScrollDown=function(e){var t,n=this.itemHeight,r=this.container.scrollTop,o=this.listTranslate,i=this.list.children.length;for(t=0;t<i&&!(o+n>=r);t++)o+=n;o=this.validateTranslate(o),t>=i&&this.skip+t>=this.total?(this.translateTo(o),this.changePage(this.total-1,e)):o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip+t,e))},e.prototype.scrollNonStrict=function(e){var t=this.total*this.prevScrollPos/this.containerHeight,n=Math.min(Math.floor(t),this.total-1),r=this.containerHeight*t/this.total;r=this.validateTranslate(r),this.translateTo(r),this.changePage(n,e)},e.prototype.scrollHandler=function(e){var t=this.container?this.container.scrollTop:0,n=this.prevScrollPos;this.prevScrollPos=t,this.enabled&&this.list&&this.container&&!this.scrollSyncing&&(t-n<=0&&t>this.listTranslate-this.list.scrollHeight/10?this.localScrollUp(e):t-n>0&&t<this.listTranslate+2*this.list.scrollHeight/3?this.localScrollDown(e):this.scrollNonStrict(e))},e.prototype.validateTranslate=function(e){return e=Math.max(0,e),Math.min(this.containerHeight,e)},e}();var G=function(){function e(){}return e.prototype.navigate=function(e){var t=e.keyCode;return t===l.R.up||t===l.R.left?this.next({current:e.current,min:e.min,max:e.max,step:-1}):t===l.R.down||t===l.R.right?this.next({current:e.current,min:e.min,max:e.max,step:1}):t===l.R.home?0:t===l.R.end?e.max:void 0},e.prototype.next=function(e){return C(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min},e}(),Y=n(3198),X=function(){return X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},X.apply(this,arguments)},J=function(){function e(e){var t=this;this.wrapper=null,this.list=null,this.vs=new U,this.navigation=new G,this.handleItemClick=function(e,n){var r=t.initState();r.syntheticEvent=n,n.stopPropagation(),t.component.handleItemSelect(e,r),t.togglePopup(r),t.applyState(r)},this.handleFocus=function(e){if(!t.component.state.focused){var n=t.initState();n.data.focused=!0,n.events.push({type:"onFocus"}),n.syntheticEvent=e,t.applyState(n)}},this.filterChanged=function(e,n){var r=t.component.props,o=r.textField;r.filterable&&n.events.push({type:"onFilterChange",filter:{field:o,operator:"contains",ignoreCase:!0,value:e}})},this.togglePopup=function(e){var n=t.component.props,r=void 0!==n.opened?n.opened:t.component.state.opened;void 0===n.opened&&(e.data.opened=!r),r?e.events.push({type:"onClose"}):(e.events.push({type:"onOpen"}),t.calculatePopupWidth())},this.pageChange=function(e,n){var r=t.initState();r.syntheticEvent=n,t.triggerOnPageChange(r,e.skip,e.take),t.applyState(r)},this.scrollToVirtualItem=function(e,n){var r=t.vs;if(r.enabled=!1,0===e.skip)r.reset();else if(e.skip+e.pageSize===e.total)r.scrollToEnd();else{var o=r.translate;0===o&&(r.calcScrollElementHeight(),o=r.itemHeight*e.skip,r.translateTo(o-r.itemHeight)),r.container&&(r.container.scrollTop=o),t.scrollToItem(n,!0)}window.setTimeout((function(){return r.enabled=!0}),10)},this.renderScrollElement=function(){var e=t.vs;return e.enabled&&o.createElement("div",{ref:function(t){return e.scrollElement=t},key:"scrollElementKey"})},this.listBoxId=(0,Y.M)(),this.guid=(0,Y.M)(),this.component=e,this.vs.PageChange=this.pageChange}return e.prototype.didMount=function(){var e=this.component.props,t=e.popupSettings||{},n=e.style||{},r=t.width,o=!0===e.opened;void 0===r&&this.calculatePopupWidth(),void 0===e.dir&&void 0===n.direction&&(this.calculateDir(),o=!0),o&&this.component.forceUpdate()},e.prototype.calculateDir=function(){var e=this.component.element;e&&e.ownerDocument&&e.ownerDocument.defaultView&&(this.dirCalculated=e.ownerDocument.defaultView.getComputedStyle(e).direction||void 0)},e.prototype.calculatePopupWidth=function(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")},e.prototype.scrollToItem=function(e,t){var n=this.list||this.vs.list;if(n&&e>=0){var r=this.vs,o=r.container||n.parentNode,i=void 0!==t?t:r.enabled;!function(e,t,n,r,o){var i=e.offsetHeight,a=t.children.item(n),s=a.offsetTop+(o?r-e.scrollTop:0),l=a.offsetHeight;if(o){var c=0;s+l>i?c=s+l-i:s<0&&(c=s),0!==c?e.scrollTop+=c:0===e.scrollTop&&0!==r&&(e.scrollTop=r)}else s+l>i+e.scrollTop?e.scrollTop=s+l-i:s<e.scrollTop&&(e.scrollTop-=e.scrollTop-s)}(o,n,e,r.translate,i)}},e.prototype.initState=function(){return{data:{},events:[],syntheticEvent:void 0}},e.prototype.applyState=function(e){var t=this;Object.keys(e.data).length>0&&this.component.setState(e.data);var n={syntheticEvent:e.syntheticEvent,nativeEvent:e.syntheticEvent?e.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};e.events.forEach((function(e){var r=e.type;delete e.type;var o=r&&t.component.props[r];o&&o.call(void 0,X(X({},n),e))}))},e.prototype.triggerOnPageChange=function(e,t,n){var r=this.component.props.virtual;if(r){var o=Math.min(Math.max(0,t),Math.max(0,r.total-n));o!==r.skip&&e.events.push({type:"onPageChange",page:{skip:o,take:n}})}},e.prototype.triggerPageChangeCornerItems=function(e,t){var n=this.component.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=void 0!==n.opened?n.opened:this.component.state.opened;e&&a&&this.vs.enabled&&(a.skip>0&&N(e,o[0],i)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!s&&a.skip+a.pageSize<a.total&&N(e,o[o.length-1],i)&&this.triggerOnPageChange(t,a.skip+1,a.pageSize))},e.prototype.getPopupSettings=function(){return Object.assign({},e.defaultProps.popupSettings,this.component.props.popupSettings)},e.basicPropTypes={opened:i.bool,disabled:i.bool,dir:i.string,tabIndex:i.number,accessKey:i.string,data:i.array,textField:i.string,className:i.string,label:i.string,loading:i.bool,popupSettings:i.shape({animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),popupClass:i.string,className:i.string,appendTo:i.any,width:i.oneOfType([i.string,i.number]),height:i.oneOfType([i.string,i.number])}),onOpen:i.func,onClose:i.func,onFocus:i.func,onBlur:i.func,onChange:i.func,itemRender:i.func,listNoDataRender:i.func,focusedItemIndex:i.func,header:i.node,footer:i.node},e.propTypes=X(X({},e.basicPropTypes),{value:i.any,defaultValue:i.any,filterable:i.bool,filter:i.string,virtual:i.shape({pageSize:i.number.isRequired,skip:i.number.isRequired,total:i.number.isRequired}),onFilterChange:i.func,onPageChange:i.func}),e.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0},e}();const Z=J;var Q=n(4006),ee={name:"@progress/kendo-react-dropdowns",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031516,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},te=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(){return ne=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ne.apply(this,arguments)},re=a.G.sizeMap,oe=a.G.roundedMap,ie=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n._element=null,n.base=new Z(n),n.searchState={word:"",last:""},n._select=null,n._skipFocusEvent=!1,n._filterInput=null,n._navigated=!1,n.focus=function(){n.base.wrapper&&n.base.wrapper.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.virtual,s=r.dataItemKey,l=r.defaultItem,c=a?a.skip:0,u=-1===e&&void 0!==l?l:i[e-c],d=!N(u,n.value,s);n.triggerOnChange(u,t),d&&n.base.triggerPageChangeCornerItems(u,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.dummySelect=function(e){return o.createElement("select",{name:n.props.name,ref:function(e){n._select=e},tabIndex:-1,"aria-hidden":!0,title:n.props.label,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},o.createElement("option",{value:n.props.valueMap?n.props.valueMap.call(void 0,e):e}))},n.renderListContainer=function(){var e,t=n.props,r=t.header,i=t.footer,a=t.dir,l=t.data,c=void 0===l?[]:l,u=t.size,d=n.base,p=d.getPopupSettings(),f=void 0!==n.props.opened?n.props.opened:n.state.opened,h=void 0!==p.width?p.width:d.popupWidth,m={dir:void 0!==a?a:d.dirCalculated,width:h,popupSettings:{popupClass:(0,s.A)(p.popupClass,"k-list-container"),className:p.className,animate:p.animate,anchor:n.element,show:f,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:p.appendTo},itemsCount:[c.length]};return o.createElement(g,ne({},m),n.renderListFilter(),r&&o.createElement("div",{className:"k-list-header"},r),o.createElement("div",{className:(0,s.A)("k-list",(e={},e["k-list-".concat(re[u]||u)]=u,e["k-virtual-list"]=n.base.vs.enabled,e))},n.renderDefaultItem(),n.renderList()),i&&o.createElement("div",{className:"k-list-footer"},i))},n.renderList=function(){var e=n.props,t=e.data,r=void 0===t?[]:t,i=e.textField,a=e.dataItemKey,s=e.virtual,l=void 0===s?{skip:0}:s,c=e.listNoDataRender,u=e.itemRender,d=n.base.vs,p=l.skip,f=void 0!==n.props.opened?n.props.opened:n.state.opened,h=n.base.getPopupSettings(),m="translateY(".concat(d.translate,"px)");return o.createElement(q,{id:n.base.listBoxId,show:f,data:r.slice(),focusedIndex:n.focusedIndex(),value:n.value,textField:i,valueField:a,optionsGuid:n.base.guid,listRef:function(e){return d.list=n.base.list=e},wrapperStyle:{maxHeight:h.height},wrapperCssClass:"k-list-content",listStyle:d.enabled?{transform:m}:void 0,key:"listkey",skip:p,onClick:n.handleItemClick,itemRender:u,noDataRender:c,onScroll:function(e){d.scrollHandler(e)},wrapperRef:d.scrollerRef,scroller:n.base.renderScrollElement()})},n.renderListFilter=function(){var e=void 0!==n.props.filter?n.props.filter:n.state.text;return n.props.filterable&&o.createElement(w,{value:e,ref:function(e){return n._filterInput=e&&e.input},onChange:n.handleListFilterChange,onKeyDown:n.handleKeyDown,size:n.props.size,rounded:n.props.rounded,fillMode:n.props.fillMode})},n.renderDefaultItem=function(){var e=n.props,t=e.textField,r=e.defaultItem,i=e.dataItemKey;return void 0!==r&&o.createElement(A,{defaultItem:r,textField:t,selected:N(n.value,r,i),key:"defaultitemkey",onClick:n.handleDefaultItemClick})},n.search=function(e){clearTimeout(n._typingTimeout),n.props.filterable||(n._typingTimeout=window.setTimeout((function(){return n.searchState.word=""}),n.props.delay),n.selectNext(e))},n.selectNext=function(e){var t,r=n.props,o=r.data,i=void 0===o?[]:o,a=r.dataItemKey,s=i.map((function(e,t){return{item:e,itemIndex:t}})),l=n.searchState.word,c=n.searchState.last,u=function(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==t)return!1;return!0}(l,c),d=s.length,p=Math.max(0,i.findIndex((function(e){return N(e,n.value,a)})));n.props.defaultItem&&(t={item:n.props.defaultItem,itemIndex:-1},d+=1,p+=1),s=function(e,t,n){var r=e;return n&&(r=[n].concat(r)),r.slice(t).concat(r.slice(0,t))}(s,p+=u?1:0,t);for(var f,h,m,g=0,v=n.props,y=v.textField,b=v.ignoreCase;g<d;g++)if(f=E(s[g].item,y),h=u&&x(f,c,b),m=x(f,l,b),h||m){g=s[g].itemIndex;break}if(g!==d){var k=n.base.initState();k.syntheticEvent=e,n.handleItemSelect(g,k),n.applyState(k),n._valueDuringOnChange=void 0}},n.handleKeyDown=function(e){var t=n.props,r=t.data,o=void 0===r?[]:r,i=t.filterable,a=t.disabled,s=t.leftRightKeysNavigation,c=void 0===s||s,u=t.virtual,d=void 0===u?{skip:0,total:0,pageSize:0}:u,p=void 0!==n.props.opened?n.props.opened:n.state.opened,f=e.keyCode,h=f===l.R.home||f===l.R.end,m=f===l.R.up||f===l.R.down,g=!p&&(e.altKey&&f===l.R.down||f===l.R.enter||f===l.R.space),v=p&&(e.altKey&&f===l.R.up||f===l.R.esc),y=c&&(f===l.R.left||f===l.R.right),b=m||!i&&(y||h),k=n.base.initState();if(k.syntheticEvent=e,!a){if(h&&n.base.vs.enabled)f===l.R.home?0!==d.skip?(n.base.triggerOnPageChange(k,0,d.pageSize),n._navigated=!0):n.triggerOnChange(o[0],k):d.skip<d.total-d.pageSize?(n.base.triggerOnPageChange(k,d.total-d.pageSize,d.pageSize),n._navigated=!0):n.triggerOnChange(o[o.length-1],k);else if(p&&f===l.R.enter){var w=n.focusedIndex();void 0!==w&&n.handleItemSelect(w,k),n.base.togglePopup(k),e.preventDefault()}else g||v?(n.base.togglePopup(k),e.preventDefault()):b&&(n.onNavigate(k,f),e.preventDefault());n.applyState(k)}},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.handleFocus=function(e){n._skipFocusEvent||n.base.handleFocus(e)},n.handleBlur=function(e){if(!n._skipFocusEvent&&n.state.focused){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState();r.syntheticEvent=e,r.data.focused=!1,r.events.push({type:"onBlur"}),t&&n.base.togglePopup(r),n.applyState(r)}},n.handleDefaultItemClick=function(e){var t=n.base.initState();t.syntheticEvent=e,n.base.togglePopup(t),n.triggerOnChange(n.props.defaultItem,t),n.applyState(t)},n.handleWrapperClick=function(e){if(!e.isPropagationStopped()){var t=n.base.initState();t.syntheticEvent=e,n.state.focused||(t.data.focused=!0),n.base.togglePopup(t),n.applyState(t)}},n.handleKeyPress=function(e){if(!n.props.filterable&&0!==e.which&&e.keyCode!==l.R.enter){var t=String.fromCharCode(e.charCode||e.keyCode);n.props.ignoreCase&&(t=t.toLowerCase())," "===t&&e.preventDefault(),n.searchState={word:n.searchState.word+t,last:n.searchState.last+t},n.search(e)}},n.handleListFilterChange=function(e){var t=n.base.initState();t.syntheticEvent=e,void 0===n.props.filter&&(t.data.text=e.target.value),n.base.filterChanged(e.target.value,t),n.applyState(t)},n.onPopupOpened=function(){n._filterInput&&n.focusElement(n._filterInput)},n.onPopupClosed=function(){n.state.focused&&window.setTimeout((function(){n.state.focused&&n.base.wrapper&&n.focusElement(n.base.wrapper)}))},n.setValidity=function(){n._select&&n._select.setCustomValidity&&n._select.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please select a value from the list!")},(0,Q.s)(ee),n}return te(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e;return void 0!==this._valueDuringOnChange?e=this._valueDuringOnChange:void 0!==this.props.value?e=this.props.value:void 0!==this.state.value?e=this.state.value:void 0!==this.props.defaultValue&&(e=this.props.defaultValue),C(e)||void 0===this.props.defaultItem||(e=this.props.defaultItem),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){var e=this.props,t=e.data,n=void 0===t?[]:t,r=e.dataItemKey,o=this.value;return n.findIndex((function(e){return N(e,o,r)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&""!==this.value&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=e.virtual?e.virtual.total:0,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=void 0!==e.opened?e.opened:t.opened,u=!c&&l;if(this.base.getPopupSettings().animate||u&&this.onPopupOpened(),a&&a.total!==s)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var d=this.value,p=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return N(e,d,i)})),h=!N(p,d,i);u&&a?this.base.scrollToVirtualItem(a,f):u&&!a||l&&c&&d&&h&&!this._navigated?this.base.scrollToItem(f):l&&c&&this._navigated&&(this._navigated&&a&&0===a.skip?this.base.vs.reset():this._navigated&&a&&a.skip===a.total-a.pageSize&&this.base.vs.scrollToEnd())}this._navigated=!1,this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,t,n=this.props,r=n.style,i=n.className,a=n.label,l=n.dir,u=n.virtual,p=n.size,f=n.rounded,h=n.fillMode,m=void 0!==this.props.opened?this.props.opened:this.state.opened,g=this.value,v=E(g,this.props.textField),y=!this.validityStyles||this.validity.valid,b=this.base;b.vs.enabled=void 0!==u,void 0!==u&&(b.vs.skip=u.skip,b.vs.total=u.total,b.vs.pageSize=u.pageSize);var k=this.props,w=k.dataItemKey,C=k.data,x=void 0===C?[]:C,O=k.disabled,S=k.tabIndex,I=k.loading,T=k.iconClassName,D=k.valueRender,R=this.state.focused,P=x.findIndex((function(e){return N(e,g,w)})),_=o.createElement("span",{className:"k-input-inner"},o.createElement("span",{className:"k-input-value-text"},v)),A=void 0!==D?D.call(void 0,_,g):_,j=o.createElement("span",{ref:this.componentRef,className:(0,s.A)("k-dropdownlist k-picker",i,(e={},e["k-picker-".concat(re[p]||p)]=p,e["k-rounded-".concat(oe[f]||f)]=f,e["k-picker-".concat(h)]=h,e["k-focus"]=R,e["k-disabled"]=O,e["k-invalid"]=!y,e["k-loading"]=I,e["k-required"]=this.required,e)),style:a?ne(ne({},r),{width:void 0}):r,dir:l,onMouseDown:m?M:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:(0,c.p)(S,O),accessKey:this.props.accessKey,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,onClick:O?void 0:this.handleWrapperClick,role:"combobox","aria-required":this.required,"aria-disabled":O||void 0,"aria-haspopup":"listbox","aria-expanded":m||!1,"aria-owns":this.base.listBoxId,"aria-activedescendant":m?"option-"+this.base.guid+"-"+(P+(u?u.skip:0)):void 0,"aria-label":this.props.ariaLabel||this.props.label,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,id:this.props.id,title:this.props.title},A,I&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon",key:"loading"}),o.createElement("button",{tabIndex:-1,type:"button","aria-hidden":!0,className:(0,s.A)("k-input-button k-button k-icon-button",(t={},t["k-button-".concat(re[p]||p)]=p,t["k-button-".concat(h)]=h,t["k-button-".concat(h,"-base")]=h,t))},o.createElement("span",{className:(0,s.A)("k-button-icon k-icon k-i-arrow-s",T)})),this.dummySelect(g),this.renderListContainer());return a?o.createElement(d._,{label:a,editorValue:v,editorValid:y,editorDisabled:this.props.disabled,style:{width:r?r.width:void 0},children:j}):j},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.defaultItem,a=n.dataItemKey,s=n.virtual,l=void 0===s?{skip:0,total:0,pageSize:0}:s,c=this.base.vs,u=this.value,d=o.findIndex((function(e){return N(e,u,a)})),p=this.base.navigation.navigate({current:l.skip+d,max:(c.enabled?l.total:o.length)-1,min:void 0!==i?-1:0,keyCode:t});void 0!==p&&this.handleItemSelect(p,e),this.applyState(e)},t.prototype.focusedIndex=function(){var e=C(this.props.filter)?this.props.filter:this.state.text,t=this.props,n=t.data,r=void 0===n?[]:n,o=t.virtual,i=void 0===o?{skip:0}:o,a=t.dataItemKey,s=t.textField,l=t.focusedItemIndex,c=this.value,u=!(r.findIndex((function(e){return N(e,c,a)}))<0&&!this.props.defaultItem);return!u&&e&&0===i.skip?l?l(r,e,s):r.indexOf(T(r,e,s)):u||0!==i.skip?void 0:0},t.prototype.focusElement=function(e){var t=this;this._skipFocusEvent=!0,e.focus(),window.setTimeout((function(){return t._skipFocusEvent=!1}),30)},t.prototype.triggerOnChange=function(e,t){N(this.value,e,this.props.dataItemKey)||(void 0===this.props.value&&(t.data.value=e),this._valueDuringOnChange=e,t.events.push({type:"onChange"}))},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.displayName="DropDownList",t.propTypes=ne({delay:i.number,ignoreCase:i.bool,iconClassName:i.string,defaultItem:i.any,valueRender:i.func,valueMap:i.func,validationMessage:i.string,required:i.bool,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,ariaLabel:i.string,leftRightKeysNavigation:i.bool,title:i.string},Z.propTypes),t.defaultProps=ne(ne({delay:500,tabIndex:0,ignoreCase:!0},Z.defaultProps),{required:!1,size:"medium",rounded:"medium",fillMode:"solid"}),t}(o.Component),ae=(0,u.Y)(),se=(0,u.u)(ae,ie);se.displayName="KendoReactDropDownList";var le=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._input=null,t}return le(t,e),Object.defineProperty(t.prototype,"input",{get:function(){return this._input},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e){var t=e.value,n=e.suggestedText,r=this.props,o=r.value,i=r.suggestedText,a=r.focused,s=this.input,l=t!==o||i!==n,c=l&&t.startsWith(o)&&!(n&&i&&n.endsWith(i));a&&s&&document.activeElement!==s&&s.focus(),i&&l&&!c&&s&&s.setSelectionRange(o.length-i.length,o.length)},t.prototype.render=function(){var e=this,t=this.props,n=t.expanded,r=void 0!==n&&n,i=t.disabled,a=t.role,s=void 0===a?"listbox":a,l=t.render,c=o.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:"k-input-inner",tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:function(t){return e._input=t},onKeyDown:this.props.onKeyDown,onFocus:this.props.onFocus,onBlur:this.props.onBlur,"aria-disabled":i||void 0,disabled:i||void 0,readOnly:this.props.readOnly||void 0,"aria-haspopup":"listbox","aria-expanded":r,"aria-owns":this.props.owns,"aria-activedescendant":r?this.props.activedescendant:void 0,"aria-describedby":this.props.ariaDescribedBy,"aria-labelledby":this.props.ariaLabelledBy});return l?l.call(void 0,c):c},t}(o.Component);const ue=ce;var de=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){return e.preventDefault()},t}return de(t,e),t.prototype.render=function(){var e=(0,B.provideLocalizationService)(this).toLanguageString(H,K[H]);return o.createElement("span",{className:"k-clear-value",role:"button",onClick:this.props.onClick,onMouseDown:this.onMouseDown,tabIndex:-1,title:e,key:"clearbutton"},o.createElement("span",{className:"k-icon k-i-x"}))},t}(o.Component);const fe=pe;(0,B.registerForLocalization)(pe);var he=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),me=function(){return me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},me.apply(this,arguments)},ge=a.G.sizeMap,ve=a.G.roundedMap,ye=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new Z(n),n._element=null,n._inputId=(0,Y.M)(),n._suggested="",n._input=null,n.itemHeight=0,n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.virtual,s=r.dataItemKey,l=i[e-(a?a.skip:0)],c=!N(l,n.value,s);n.triggerOnChange(l,t),void 0!==n.state.text&&(t.data.text=void 0),c&&n.base.triggerPageChangeCornerItems(l,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.toggleBtnClick=function(e){var t=n.base.initState();t.syntheticEvent=e,n.base.togglePopup(t),n.applyState(t)},n.onScroll=function(e){var t=n.base,r=t.vs,o=t.list;r.scrollHandler(e);var i=n.props,a=i.data,s=void 0===a?[]:a,l=i.groupField;if(l&&s.length){for(var c=n.itemHeight=n.itemHeight||(r.enabled?r.itemHeight:o?o.children[0].offsetHeight:0),u=e.target.scrollTop-r.skip*c,d=s[0][l],p=1;p<s.length&&!(c*p>u);p++)s[p]&&s[p][l]&&(d=s[p][l]);d!==n.state.group&&(n.setState({group:d}),n.props.onGroupScroll&&n.props.onGroupScroll.call(void 0,{group:d}))}},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.handleBlur=function(e){if(n.state.focused){var t=n.base.initState();t.data.focused=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,n.applyValueOnRejectSuggestions(e.currentTarget.value,t)}},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();if(o.syntheticEvent=e,!e.altKey&&(t===l.R.up||t===l.R.down))return e.preventDefault(),n.onNavigate(o,t),void n.applyState(o);var i=function(){e.preventDefault(),n.base.togglePopup(o),n.applyState(o)};r?e.altKey&&t===l.R.up?i():t===l.R.enter?(e.preventDefault(),n.applyValueOnEnter(e.currentTarget.value,o)):t===l.R.esc&&n.applyValueOnRejectSuggestions(e.currentTarget.value,o):e.altKey&&t===l.R.down&&i()},n.inputOnChange=function(e){var t=n.base.initState();t.syntheticEvent=e;var r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=e.currentTarget,i=o.value;if(n.props.suggest){var a=o.selectionEnd===i.length,s=void 0!==n.props.filter?n.props.filter:n.state.text;C(s)||(s=E(n.value,n.props.textField)||"");var l=s&&s===i,c=s&&s.length>i.length;l||c||!a?n._suggested="":n.suggestValue(i)}void 0===n.props.filter&&(t.data.text=i),void 0!==n.state.focusedItem&&(t.data.focusedItem=void 0),r||n.base.togglePopup(t),n.base.filterChanged(i,t),n.applyState(t)},n.clearButtonClick=function(e){var t=n.base.initState();t.syntheticEvent=e,e.stopPropagation(),n._suggested="",n.base.filterChanged("",t),void 0===n.props.filter&&void 0!==n.state.text&&(t.data.text=void 0),n.triggerOnChange(null,t),(void 0!==n.props.opened?n.props.opened:n.state.opened)&&n.base.togglePopup(t),n.applyState(t)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},(0,Q.s)(ee),n}return he(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){var e=this.props,t=e.data,n=void 0===t?[]:t,r=e.dataItemKey,o=this.value;return n.findIndex((function(e){return N(e,o,r)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&""!==this.value&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=e.virtual?e.virtual.total:0,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=void 0!==e.opened?e.opened:t.opened,u=!c&&l,d=this.value;if(this._valueOnDidUpdate=d,a&&a.total!==s)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var p=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return N(e,d,i)})),h=!N(p,d,i);u&&a?this.base.scrollToVirtualItem(a,f):(u&&!a||l&&c&&d&&h)&&this.base.scrollToItem(f)}u&&this._input&&this._input.focus(),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,n,r=this.props,i=r.dir,a=r.disabled,l=r.clearButton,c=void 0===l?t.defaultProps.clearButton:l,u=r.label,p=r.textField,f=r.className,h=r.style,m=r.loading,g=r.iconClassName,v=r.virtual,y=r.size,b=r.rounded,k=r.fillMode,w=!this.validityStyles||this.validity.valid,x=void 0!==this.props.filter?this.props.filter:this.state.text,O=E(this.value,p),S=C(x)?x:O,I=c&&(!!S||C(this.value)),N=this.base.vs,T=this.props.id||this._inputId;N.enabled=void 0!==v,void 0!==v&&(N.skip=v.skip,N.total=v.total,N.pageSize=v.pageSize);var M=o.createElement("span",{className:(0,s.A)("k-combobox k-input",(e={},e["k-input-".concat(ge[y]||y)]=y,e["k-rounded-".concat(ve[b]||b)]=b,e["k-input-".concat(k)]=k,e["k-invalid"]=!w,e["k-loading"]=m,e["k-required"]=this.required,e["k-disabled"]=a,e),f),ref:this.componentRef,style:u?me(me({},h),{width:void 0}):h,dir:i},this.renderSearchBar(S||"",T),I&&!m&&o.createElement(fe,{onClick:this.clearButtonClick,key:"clearbutton"}),m&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon",key:"loading"}),o.createElement("button",{tabIndex:-1,type:"button",className:(0,s.A)("k-input-button k-button k-icon-button",(n={},n["k-button-".concat(ge[y]||y)]=y,n["k-button-".concat(k)]=k,n["k-button-".concat(k,"-base")]=k,n)),onClick:this.toggleBtnClick,onMouseDown:function(e){return e.preventDefault()}},o.createElement("span",{className:(0,s.A)("k-button-icon k-icon k-i-arrow-s",g)})),this.renderListContainer());return u?o.createElement(d._,{label:u,editorId:T,editorValue:S,editorValid:w,editorDisabled:a,style:{width:h?h.width:void 0},children:M}):M},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.virtual,a=void 0===i?{skip:0}:i,s=this.props.filter?this.props.filter:this.state.text,l=this.getFocusedIndex(),c=this.base.vs,u=this.value;if(this._suggested="",-1===l||C(u))if(""===s)this.handleItemSelect(0,e);else{var d=a.skip+l,p=this.base.navigation.navigate({keyCode:t,current:d,max:(c.enabled?c.total:o.length)-1,min:0});void 0!==p&&this.handleItemSelect(p,e)}else this.handleItemSelect(l,e)},t.prototype.applyValueOnEnter=function(e,t){var n,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.allowCustom,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=E(this.value,a)===e?this.index:S(i,e,a),u=-1!==c,d=void 0;if(this._suggested="",u)d=i[c];else{if(!s)return this.selectFocusedItem(e,t);d=void 0!==a?((n={})[a]=e,n):e}this.triggerOnChange(d,t),l&&this.base.togglePopup(t),void 0===this.props.filter&&void 0!==this.state.text&&(t.data.text=void 0),this.applyState(t)},t.prototype.applyValueOnRejectSuggestions=function(e,t){var n,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.allowCustom,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=E(this.value,a);if(this._suggested="",e===c||""===e&&!C(c))return l&&this.base.togglePopup(t),this.applyState(t);var u=S(i,e,a,!0),d=null;-1!==u?d=i[u]:s&&(d=e?a?((n={})[a]=e,n):e:null),this.triggerOnChange(d,t),void 0!==this.state.text&&(t.data.text=void 0,this.base.filterChanged("",t)),l&&this.base.togglePopup(t),this.applyState(t)},t.prototype.selectFocusedItem=function(e,t){var n=void 0!==this.props.opened?this.props.opened:this.state.opened,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.virtual,l=void 0===s?{skip:0}:s,c=r.focusedItemIndex,u=void 0===c?O:c,d=l.skip,p=""===e&&0===d?0:u(i,e,a);return-1!==p?this.handleItemSelect(p+d,t):(this.triggerOnChange(null,t),void 0!==this.state.text&&(t.data.text=void 0)),n&&this.base.togglePopup(t),this.applyState(t)},t.prototype.renderListContainer=function(){var e,t=this.base,n=this.props,r=n.dir,i=n.header,a=n.footer,l=n.data,c=void 0===l?[]:l,u=n.groupField,d=n.size,p=n.list,f=n.virtual,h=void 0!==this.props.opened?this.props.opened:this.state.opened,m=t.getPopupSettings(),v=void 0!==m.width?m.width:t.popupWidth,y=this.state.group;return void 0===y&&void 0!==u&&(y=E(c[0],u)),o.createElement(g,{width:v,popupSettings:{animate:m.animate,anchor:this.element,show:h,popupClass:(0,s.A)(m.popupClass,"k-reset"),className:m.className,appendTo:m.appendTo},dir:void 0!==r?r:this.base.dirCalculated,itemsCount:[c.length]},o.createElement("div",{className:(0,s.A)((e={},e["k-list"]=!p,e["k-list-".concat(ge[d]||d)]=!p&&d,e["k-virtual-list"]=f,e["k-data-table"]=p,e["k-table-".concat(ge[d]||d)]=p&&d,e))},i&&o.createElement("div",{className:"k-table-header"},i),!p&&y&&o.createElement("div",{className:"k-list-group-sticky-header"},y),this.renderList(),a&&o.createElement("div",{className:"k-list-footer"},a)))},t.prototype.renderList=function(){var e,t=this,n=this.base,r=this.props,i=r.textField,a=r.dataItemKey,l=r.listNoDataRender,c=r.itemRender,u=r.data,d=void 0===u?[]:u,p=r.virtual,f=void 0===p?{skip:0}:p,h=n.getPopupSettings(),m=n.vs,g=f.skip,v=void 0!==this.props.opened?this.props.opened:this.state.opened,y="translateY(".concat(m.translate,"px)"),b=v?this.getFocusedIndex():void 0,k=void 0!==this.props.filter?this.props.filter:this.state.text,w=E(this.value,i),x=C(k)&&k!==w?null:this.value,O=this.props.list||q;return o.createElement(O,{id:n.listBoxId,virtual:Boolean(f),show:v,data:d,focusedIndex:b,value:x,textField:i,valueField:a,groupField:this.props.groupField,optionsGuid:n.guid,listRef:function(e){m.list=t.base.list=e,t.itemHeight=0},wrapperStyle:{maxHeight:h.height},wrapperCssClass:(0,s.A)("k-list-content",(e={},e["k-list-scroller"]=!f,e["k-virtual-content"]=f,e)),listStyle:m.enabled?{transform:y}:void 0,key:"listkey",skip:g,onClick:this.handleItemClick,itemRender:c,noDataRender:l,onMouseDown:function(e){return e.preventDefault()},onScroll:this.onScroll,wrapperRef:m.scrollerRef,scroller:this.base.renderScrollElement()})},t.prototype.renderSearchBar=function(e,t){var n=this,r=this.props,i=r.placeholder,a=r.tabIndex,s=r.disabled,l=r.data,c=void 0===l?[]:l,u=r.dataItemKey,d=r.virtual,p=void 0===d?{skip:0}:d,f=void 0!==this.props.opened?this.props.opened:this.state.opened,h=this.value,m=Math.max(0,c.findIndex((function(e){return N(e,h,u)})));return this._suggested&&!N(this._valueOnDidUpdate,h,u)&&(this._suggested=""),o.createElement(ue,{id:t,placeholder:i,tabIndex:a||void 0,accessKey:this.props.accessKey,value:e+this._suggested,suggestedText:this._suggested,ref:function(e){return n._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.inputOnChange,onFocus:this.base.handleFocus,onBlur:this.handleBlur,disabled:s,expanded:f,owns:this.base.listBoxId,activedescendant:"option-".concat(this.base.guid,"-").concat(m+p.skip),role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.triggerOnChange=function(e,t){var n=this.value;!C(n)&&!C(e)||N(n,e,this.props.dataItemKey)||(void 0===this.props.value&&(t.data.value=e),this._valueDuringOnChange=e,t.events.push({type:"onChange"}))},t.prototype.getFocusedIndex=function(){var e=this.value,t=this.props,n=t.data,r=void 0===n?[]:n,o=t.textField,i=t.dataItemKey,a=t.virtual,s=void 0===a?{skip:0}:a,l=t.focusedItemIndex,c=void 0===l?O:l,u=this.props.filter?this.props.filter:this.state.text;return C(e)&&void 0===u?r.findIndex((function(t){return N(t,e,i)})):u?c(r,u,o):0===s.skip?0:-1},t.prototype.suggestValue=function(e){var t=this.props,n=t.data,r=t.textField;this._suggested=function(e,t,n){void 0===t&&(t=[]);var r="";if(e){var o=t[O(t,e,n)];if(o){var i=E(o,n);e.toLowerCase()!==i.toLowerCase()&&(r=i.substring(e.length))}}return r}(e,n,r)},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.displayName="ComboBox",t.propTypes=me(me({},Z.propTypes),{size:i.oneOf([null,"small","medium","large"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"solid","flat","outline"]),dataItemKey:i.string,groupField:i.string,suggest:i.bool,placeholder:i.string,allowCustom:i.bool,clearButton:i.bool,iconClassName:i.string,validationMessage:i.string,required:i.bool,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,list:i.any,valueRender:i.func}),t.defaultProps=me(me({},Z.defaultProps),{size:"medium",rounded:"medium",fillMode:"solid",allowCustom:!1,clearButton:!0,required:!1}),t}(o.Component),be=(0,u.Y)(),ke=(0,u.u)(be,ye);ke.displayName="KendoReactComboBox";var we=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ce=function(){return Ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ce.apply(this,arguments)},xe=a.G.sizeMap,Oe=a.G.roundedMap,Se=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new Z(n),n._element=null,n._inputId=(0,Y.M)(),n._suggested="",n._input=null,n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props.data,o=E((void 0===r?[]:r)[e],n.props.textField);n.triggerOnChange(o,t)},n.itemFocus=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=i[e];N(n.state.focusedItem,s,a)||(t.data.focusedItem=s)},n.togglePopup=function(e){n.base.togglePopup(e)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.onChangeHandler=function(e){var t=n.base.initState(),r=e.currentTarget,o=r.value,i=r.selectionEnd===o.length;t.syntheticEvent=e;var a=n._suggested,s=n.value,l=s&&s.substring(0,s.length-a.length),c=l&&l===o,u=l&&l.length>o.length,d=n.props.suggest,p=void 0!==n.props.opened?n.props.opened:n.state.opened;if(void 0!==d&&!1!==d){c||u||!i?n._suggested="":n.suggestValue(o);var f=o+n._suggested,h={userInput:o,value:n._suggested};n.triggerOnChange(f,t,{suggestion:h})}else n._suggested="",n.triggerOnChange(o,t);(!p&&o||p&&!o)&&n.togglePopup(t),t.data.focusedItem=void 0,n.applyState(t)},n.clearButtonClick=function(e){var t=n.base.initState(),r=void 0!==n.props.opened?n.props.opened:n.state.opened;t.syntheticEvent=e,n._suggested="",n.triggerOnChange("",t),void 0!==n.state.focusedItem&&(t.data.focusedItem=void 0),r&&n.togglePopup(t),n.applyState(t)},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();o.syntheticEvent=e;var i=function(){r&&e.preventDefault()};t===l.R.enter||t===l.R.esc?(i(),n.applyInputValue(e.currentTarget.value,o,e.keyCode)):t!==l.R.up&&t!==l.R.down||(i(),n.onNavigate(o,t))},n.handleBlur=function(e){if(n.state.focused){var t=n.base.initState();t.data.focused=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,n.applyInputValue(e.currentTarget.value,t)}},(0,Q.s)(ee),n}return we(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||""!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.data,r=void 0===n?[]:n,o=e.data,i=void 0===o?[]:o,a=this.focusedIndex(),s=r[a],l=i!==r,c=void 0!==s&&t.focusedItem!==s,u=void 0!==this.props.opened?this.props.opened:this.state.opened,d=void 0!==e.opened?e.opened:t.opened;(u&&(c||l)||!d&&u)&&this.base.scrollToItem(a),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,t=this,n=this.props,r=n.dir,i=n.disabled,a=n.label,l=n.className,c=n.style,u=n.loading,p=n.suggest,f=n.size,h=n.rounded,m=n.fillMode,g=!this.validityStyles||this.validity.valid,v=this.base,y=this.value,b=!1!==this.props.clearButton&&!u&&!!y,k=this.props.id||this._inputId;"string"==typeof p&&(this._suggested=p);var w=o.createElement("span",{className:(0,s.A)("k-autocomplete k-input",l,(e={},e["k-input-".concat(xe[f]||f)]=f,e["k-rounded-".concat(Oe[h]||h)]=h,e["k-input-".concat(m)]=m,e["k-invalid"]=!g,e["k-loading"]=u,e["k-required"]=this.required,e["k-disabled"]=i,e)),ref:function(e){t._element=e,v.wrapper=e},style:a?Ce(Ce({},c),{width:void 0}):c,dir:r},this.renderSearchBar(y||"",k),u&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),b&&!u&&o.createElement(fe,{onClick:this.clearButtonClick,key:"clearbutton"}),this.renderListContainer());return a?o.createElement(d._,{label:a,editorId:k,editorValue:y,editorValid:g,editorDisabled:i,style:{width:c?c.width:void 0},children:w}):w},t.prototype.onNavigate=function(e,t){var n=this,r=this.value,o=this.props,i=o.data,a=void 0===i?[]:i,s=o.textField,l=o.focusedItemIndex,c=void 0!==this.state.focusedItem?a.findIndex((function(e){return N(e,n.state.focusedItem,s)})):l?l(a,r,s):a.indexOf(T(a,r,s)),u=this.base.navigation.navigate({keyCode:t,current:c,max:a.length-1,min:0});void 0!==u&&this.itemFocus(u,e),this.applyState(e)},t.prototype.applyInputValue=function(e,t,n){var r=void 0!==this.props.opened?this.props.opened:this.state.opened,o=this.props,i=o.data,a=void 0===i?[]:i,s=o.textField;if(this._suggested="",r&&n===l.R.enter){var c=E(a[this.focusedIndex(e)],s);this.triggerOnChange(c,t)}r&&this.togglePopup(t),this.applyState(t)},t.prototype.renderSearchBar=function(e,t){var n=this,r=this.base,i=this.props,a=i.placeholder,s=i.tabIndex,l=i.disabled,c=i.readonly,u=this.state.focused,d=void 0!==this.props.opened?this.props.opened:this.state.opened;return o.createElement(ue,{id:t,placeholder:a,tabIndex:s||void 0,accessKey:this.props.accessKey,value:e,suggestedText:this._suggested,focused:u,name:this.props.name,ref:function(e){return n._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.onChangeHandler,onFocus:r.handleFocus,onBlur:this.handleBlur,disabled:l,readOnly:c,expanded:d,owns:r.listBoxId,activedescendant:"option-"+r.guid+"-"+this.focusedIndex(),role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.renderListContainer=function(){var e,t=this.base,n=this.props,r=n.dir,i=n.header,a=n.footer,l=n.data,c=void 0===l?[]:l,u=n.size,d=t.getPopupSettings(),p=void 0!==this.props.opened?this.props.opened:this.state.opened,f=void 0!==d.width?d.width:t.popupWidth;return o.createElement(g,{width:f,popupSettings:{animate:d.animate,anchor:this.element,show:p,popupClass:(0,s.A)(d.popupClass),className:d.className,appendTo:d.appendTo},dir:void 0!==r?r:this.base.dirCalculated,itemsCount:[c.length]},i&&o.createElement("div",{className:"k-list-header"},i),o.createElement("div",{className:(0,s.A)("k-list",(e={},e["k-list-".concat(xe[u]||u)]=u,e))},this.renderList()),a&&o.createElement("div",{className:"k-list-footer"},a))},t.prototype.renderList=function(){var e=this.base,t=e.getPopupSettings(),n=this.props,r=n.textField,i=n.data,a=void 0===i?[]:i,s=n.listNoDataRender,l=n.itemRender,c=this.value,u=void 0!==this.props.opened?this.props.opened:this.state.opened;return o.createElement(q,{id:e.listBoxId,show:u,data:a.slice(),focusedIndex:this.focusedIndex(),value:c,textField:r,valueField:r,highlightSelected:!1,optionsGuid:e.guid,listRef:function(t){return e.list=t},wrapperStyle:{maxHeight:t.height},wrapperCssClass:"k-list-content",onClick:this.handleItemClick,itemRender:l,noDataRender:s,onMouseDown:function(e){return e.preventDefault()}})},t.prototype.triggerOnChange=function(e,t,n){(this.value!==e||n)&&(t.data.value=e,this._valueDuringOnChange=e,t.events.push(Ce({type:"onChange"},n||{})))},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.prototype.suggestValue=function(e){if(this._suggested="",e){var t=this.props,n=t.data,r=void 0===n?[]:n,o=t.textField,i=r[O(r,e,o)];if(i){var a=E(i,o);e.toLowerCase()!==a.toLowerCase()&&(this._suggested=a.substring(e.length))}}},t.prototype.focusedIndex=function(e){var t=this,n=this.props,r=n.data,o=void 0===r?[]:r,i=n.textField,a=n.focusedItemIndex,s=void 0!==e?e:this.value;return void 0!==this.state.focusedItem?o.findIndex((function(e){return N(e,t.state.focusedItem,i)})):a?a(o,s,i):Math.max(0,o.indexOf(T(o,s,i)))},t.displayName="AutoComplete",t.propTypes=Ce(Ce({},Z.basicPropTypes),{size:i.oneOf([null,"small","medium","large"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"solid","flat","outline"]),suggest:i.oneOfType([i.bool,i.string]),placeholder:i.string,value:i.string,defaultValue:i.string,validationMessage:i.string,required:i.bool,readonly:i.bool,clearButton:i.bool,valueRender:i.func,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string}),t.defaultProps=Ce(Ce({},Z.defaultProps),{size:"medium",rounded:"medium",fillMode:"solid"}),t}(o.Component),Ee=(0,u.Y)(),Ie=(0,u.u)(Ee,Se);Ie.displayName="KendoReactAutoComplete";var Ne=n(1711),Te=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Me=function(e){return e.syntheticEvent.preventDefault()},De=function(e){return e.syntheticEvent.stopPropagation()},Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Te(t,e),t.prototype.render=function(){var e=this.props,t=e.data,n=e.guid,r=e.focused,i=e.tagRender,a=e.tag,s=e.onTagDelete,l=e.size;return o.createElement(o.Fragment,null,t.map((function(e,c){var u=a?o.createElement(a,{key:e.text+c,tagData:e,guid:n,focusedTag:r,onTagDelete:s}):o.createElement(Ne.A,{id:"tag-".concat(n,"-").concat(e.text.replace(/\s+/g,"-")),"aria-selected":!0,role:"option","aria-setsize":t.length,key:e.text+c,text:e.text,removable:!0,removeIcon:"k-i-close",onRemove:function(t){return s.call(void 0,e.data,t.syntheticEvent)},onMouseDown:Me,onClick:De,className:e===r?"k-focus":void 0,size:l});return i?i(e,u):u})),this.props.children)},t}(o.Component);const Pe=Re;var _e;!function(e){e[e.PopupList=0]="PopupList",e[e.TagsList=1]="TagsList"}(_e||(_e={}));var Ae,je=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fe=function(){return Fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Fe.apply(this,arguments)},ze=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Le=a.G.sizeMap,Be=a.G.roundedMap,Ve=function(e){return e.preventDefault()},He=function(e){return e===Ae.CustomItem};!function(e){e[e.None=0]="None",e[e.ListItem=1]="ListItem",e[e.CustomItem=2]="CustomItem"}(Ae||(Ae={}));var Ke=function(e){function t(t){var n=e.call(this,t)||this;return n.state={activedescendant:_e.PopupList},n._element=null,n._valueItemsDuringOnChange=null,n._inputId=(0,Y.M)(),n.base=new Z(n),n._tags=[],n._input=null,n._skipFocusEvent=!1,n.scrollToFocused=!1,n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.dataItemKey,s=r.virtual,l=i[e-(s?s.skip:0)],c=n.value.findIndex((function(e){return N(e,l,a)})),u=[];-1!==c?(u=n.value).splice(c,1):u=ze(ze([],n.value,!0),[l],!1),(void 0!==n.props.filter?n.props.filter:n.state.text)&&(n.state.text&&(t.data.text=""),n.base.filterChanged("",t)),void 0!==n.state.focusedIndex&&(t.data.focusedIndex=void 0),n.triggerOnChange(u,t),n.base.triggerPageChangeCornerItems(l,t)},n.onTagDelete=function(e,t){var r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();o.syntheticEvent=t,r&&n.base.togglePopup(o),n.state.focused||(o.data.focused=!0,n.focus());var i=n.value;I(i,e,n.props.dataItemKey),n.triggerOnChange(i,o),n.applyState(o)},n.itemFocus=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.allowCustom,s=r.virtual,l=s?s.skip:0,c=void 0!==n.props.filter?n.props.filter:n.state.text,u=n.getFocusedState().focusedIndex,d=a&&c,p=i[e-l];p&&u!==e?n.state.focusedIndex!==e&&(t.data.focusedIndex=e,t.data.activedescendant=_e.PopupList):d&&-1===e&&void 0!==n.state.focusedIndex&&(t.data.focusedIndex=void 0),n.base.triggerPageChangeCornerItems(p,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.searchbarRef=function(e){var t=n._input=e&&e.input;t&&n.state.focused&&window.setTimeout((function(){return t.focus()}),0)},n.onChangeHandler=function(e){var t=n.base.initState(),r=e.currentTarget.value,o=void 0!==n.props.opened?n.props.opened:n.state.opened;t.syntheticEvent=e,void 0===n.props.filter&&(t.data.text=r),t.data.focusedIndex=void 0,o||n.base.togglePopup(t),n.base.filterChanged(r,t),n.applyState(t)},n.clearButtonClick=function(e){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState();r.syntheticEvent=e,e.stopPropagation(),n.value.length>0&&n.triggerOnChange([],r),void 0!==n.state.focusedIndex&&(r.data.focusedIndex=void 0),t&&n.base.togglePopup(r);var o=void 0!==n.props.filter?n.props.filter:n.state.text;C(o)&&""!==o&&n.base.filterChanged("",r),n.state.text&&(r.data.text=""),n.applyState(r)},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.filter?n.props.filter:n.state.text,o=void 0!==n.props.opened?n.props.opened:n.state.opened,i=n.getFocusedState().focusedItem,a=n.base.initState();if(a.syntheticEvent=e,!r&&n.value.length>0&&(t===l.R.left||t===l.R.right||t===l.R.home||t===l.R.end||t===l.R.delete||t===l.R.backspace))return n.onTagsNavigate(e,a);var s=function(){e.preventDefault(),n.base.togglePopup(a),n.applyState(a)};o?e.altKey&&t===l.R.up?s():t===l.R.up||t===l.R.down?(e.preventDefault(),n.onNavigate(a,t)):t===l.R.enter?(e.preventDefault(),n.props.allowCustom&&r&&null===i?n.customItemSelect(e):n.selectFocusedItem(e)):t===l.R.esc&&s():e.altKey&&t===l.R.down&&s()},n.renderListContainer=function(){var e,t,r=n.base,i=n.props,a=i.header,l=i.footer,c=i.allowCustom,u=i.dir,d=i.data,p=void 0===d?[]:d,f=i.size,h=n.base.getPopupSettings(),m=void 0!==n.props.opened?n.props.opened:n.state.opened,v=void 0!==n.props.filter?n.props.filter:n.state.text,y=void 0!==h.width?h.width:r.popupWidth,b={dir:void 0!==u?u:r.dirCalculated,width:y,popupSettings:{popupClass:(0,s.A)(h.popupClass),className:h.className,animate:h.animate,anchor:n.element,show:m,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:h.appendTo},itemsCount:[p.length,n.value.length]},k=n.getFocusedState().focusedType,w=c&&v&&o.createElement("div",{className:(0,s.A)("k-list",(e={},e["k-list-".concat(Le[f]||f)]=f,e)),key:"customitem",onClick:n.customItemSelect,onMouseDown:Ve},o.createElement("div",{className:(0,s.A)("k-list-item k-custom-item",{"k-focus":He(k)}),style:{fontStyle:"italic"}},v,o.createElement("span",{className:"k-icon k-i-plus",style:{position:"absolute",right:"0.5em"}})));return o.createElement(g,Fe({},b),a&&o.createElement("div",{className:"k-list-header"},a),w,o.createElement("div",{className:(0,s.A)("k-list",(t={},t["k-list-".concat(Le[f]||f)]=f,t["k-virtual-list"]=n.base.vs.enabled,t))},n.renderList()),l&&o.createElement("div",{className:"k-list-footer"},l))},n.renderList=function(){var e=n.props,t=e.data,r=void 0===t?[]:t,i=e.textField,a=e.listNoDataRender,s=e.itemRender,l=e.dataItemKey,c=e.virtual,u=n.base.vs,d=c?c.skip:0,p=void 0!==n.props.opened?n.props.opened:n.state.opened,f=n.getFocusedState().focusedIndex,h=n.base.getPopupSettings(),m="translateY(".concat(u.translate,"px)");return o.createElement(q,{id:n.base.listBoxId,show:p,data:r.slice(),focusedIndex:f-d,value:n.value,textField:i,valueField:l,optionsGuid:n.base.guid,listRef:function(e){u.list=n.base.list=e},wrapperStyle:{maxHeight:h.height},wrapperCssClass:"k-list-content",listStyle:u.enabled?{transform:m}:void 0,key:"listKey",skip:d,onClick:n.handleItemClick,itemRender:s,noDataRender:a,onMouseDown:Ve,onBlur:n.handleBlur,onScroll:function(e){u.scrollHandler(e)},wrapperRef:u.scrollerRef,scroller:n.base.renderScrollElement()})},n.customItemSelect=function(e){var t,r=void 0!==n.props.filter?n.props.filter:n.state.text,o=n.props.textField;if(r){var i=n.base.initState();i.syntheticEvent=e;var a=o?((t={})[o]=r,t):r;void 0!==n.state.text&&(i.data.text=""),i.data.focusedIndex=void 0,n.base.filterChanged("",i);var s=ze(ze([],n.value,!0),[a],!1);n.triggerOnChange(s,i),n.base.togglePopup(i),n.applyState(i)}},n.handleWrapperClick=function(e){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n._input;!t&&r&&n.focusElement(r);var o=n.base.initState();o.syntheticEvent=e,n.state.focused||(o.events.push({type:"onFocus"}),o.data.focused=!0),n.base.togglePopup(o),n.applyState(o)},n.handleItemClick=function(e,t){var r=n.base.initState();r.syntheticEvent=t,n.handleItemSelect(e,r),n.props.autoClose&&n.base.togglePopup(r),t.stopPropagation(),n.applyState(r)},n.handleBlur=function(e){if(n.state.focused&&!n._skipFocusEvent){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState(),o=n.props,i=o.allowCustom,a=o.filterable;r.syntheticEvent=e,r.data.focused=!1,r.events.push({type:"onBlur"}),t&&(n.state.opened&&(r.data.opened=!1),r.events.push({type:"onClose"})),i||a||!n.state.text||(r.data.text=""),n.applyState(r)}},n.handleFocus=function(e){n._skipFocusEvent||n.base.handleFocus(e)},n.onPopupOpened=function(){n._input&&n.state.focused&&n.focusElement(n._input)},n.onPopupClosed=function(){n.state.focused&&window.setTimeout((function(){n.state.focused&&n.focusElement(n._input)}),0)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},(0,Q.s)(ee),n}return je(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e=[];return this._valueItemsDuringOnChange?e.push.apply(e,this._valueItemsDuringOnChange):this.props.value?e.push.apply(e,this.props.value):this.state.value?e.push.apply(e,this.state.value):this.props.defaultValue&&e.push.apply(e,this.props.defaultValue),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&this.value.length>0&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.virtual,r=n?n.skip:0,o=e.virtual?e.virtual.total:0,i=void 0!==this.props.opened?this.props.opened:this.state.opened,a=void 0!==e.opened?e.opened:t.opened,s=!a&&i,l=a&&!i;if(!this.base.getPopupSettings().animate&&l&&this.onPopupClosed(),n&&n.total!==o)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var c=this.getFocusedState(),u=c.focusedItem,d=c.focusedIndex;s&&n?this.base.scrollToVirtualItem(n,d-r):s&&!n?this.base.scrollToItem(d):i&&a&&u&&this.scrollToFocused&&this.base.scrollToItem(d-r)}this.scrollToFocused=!1,this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.allowCustom,o=n.data,i=void 0===o?[]:o,a=void 0!==this.props.opened?this.props.opened:this.state.opened,s=void 0!==this.props.filter?this.props.filter:this.state.text,c=this.getFocusedState(),u=c.focusedType,d=c.focusedIndex,p=r&&s,f=He(u),h=this.base,m=h.vs;if(a&&t===l.R.up&&f)void 0!==this.state.focusedIndex&&(e.data.focusedIndex=void 0);else{var g=h.navigation.navigate({keyCode:t,current:d,max:(m.enabled?m.total:i.length)-1,min:p?-1:0});void 0!==g&&(this.itemFocus(g,e),this.scrollToFocused=!0)}this.applyState(e)},t.prototype.render=function(){var e,t,n=this.props,r=n.style,i=n.className,a=n.label,l=n.dir,c=n.disabled,u=n.tags,p=n.textField,f=n.dataItemKey,h=n.virtual,m=n.size,g=n.rounded,v=n.fillMode,y=n.loading,b=n.filter,k=this.state,w=k.text,C=k.focused,x=k.focusedTag,O=this.base.vs,S=this.props.id||this._inputId;O.enabled=void 0!==h,void 0!==h&&(O.skip=h.skip,O.total=h.total,O.pageSize=h.pageSize);var I=[];void 0===u?this.value.forEach((function(e){I.push({text:E(e,p),data:[e]})})):I.push.apply(I,u),this.setItems(I,this._tags);var N=!this.validityStyles||this.validity.valid,T=Boolean(void 0!==b?b:w)||this.value.length>0,R=o.createElement("div",{ref:this.componentRef,className:(0,s.A)("k-multiselect k-input",i,(e={},e["k-input-".concat(Le[m]||m)]=m,e["k-rounded-".concat(Be[g]||g)]=g,e["k-input-".concat(v)]=v,e["k-focus"]=C&&!c,e["k-invalid"]=!N,e["k-disabled"]=c,e["k-loading"]=y,e["k-required"]=this.required,e)),style:a?Fe(Fe({},r),{width:void 0}):r,dir:l,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleWrapperClick,onMouseDown:M},o.createElement("div",{className:(0,s.A)("k-input-values k-chip-list k-selection-multiple",(t={},t["k-chip-list-".concat(Le[m]||m)]=m,t)),role:"listbox",id:"tagslist-"+this.base.guid},I.length>0&&o.createElement(Pe,{tagRender:this.props.tagRender,onTagDelete:this.onTagDelete,data:I,guid:this.base.guid,focused:x?I.find((function(e){return D(e,x,f)})):void 0,size:m}),this.renderSearchbar(S)),y&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),T&&o.createElement(fe,{onClick:this.clearButtonClick}),this.renderListContainer());return a?o.createElement(d._,{label:a,editorId:S,editorValue:w||E(this.value[0],p),editorValid:N,editorDisabled:c,style:{width:r?r.width:void 0},children:R}):R},t.prototype.renderSearchbar=function(e){var t=this.state,n=t.activedescendant,r=t.focusedTag,i=this.props,a=i.disabled,s=i.placeholder,l=i.ariaDescribedBy,c=(void 0!==this.props.filter?this.props.filter:this.state.text)||"",u=void 0!==this.props.opened?this.props.opened:this.state.opened,d=this.getFocusedState().focusedIndex,p=0!==this.value.length||c?void 0:s,f=n===_e.TagsList&&void 0!==r?"tag-".concat(this.base.guid,"-").concat(r.text.replace(/\s+/g,"-")):"option-".concat(this.base.guid,"-").concat(d);return o.createElement(ue,{id:e,size:Math.max((p||"").length,c.length,1),tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,placeholder:p,value:c,onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,ref:this.searchbarRef,disabled:a,expanded:u,owns:this.base.listBoxId,role:"combobox",activedescendant:f,ariaDescribedBy:"tagslist-".concat(this.base.guid).concat(l?" "+l:""),ariaLabelledBy:this.props.ariaLabelledBy})},t.prototype.onTagsNavigate=function(e,t){var n=e.keyCode,r=this.state.focusedTag,o=this._tags,i=this.props.dataItemKey,a=r?o.findIndex((function(e){return D(e,r,i)})):-1,s=void 0,c=-1!==a;if(n===l.R.left)s=o[a=c?Math.max(0,a-1):o.length-1];else if(n===l.R.right)a===o.length-1?s=void 0:c&&(s=o[a=Math.min(o.length-1,a+1)]);else if(n===l.R.home)s=o[0];else if(n===l.R.end)s=o[o.length-1];else if(n===l.R.delete){if(c){var u=this.value;I(u,o[a].data,i),this.triggerOnChange(u,t)}}else if(n===l.R.backspace)if(u=this.value,c)I(u,o[a].data,i),this.triggerOnChange(u,t);else if(!c&&o.length){var d=o.pop();I(u,d.data,i),this.triggerOnChange(u,t)}s!==r&&(t.data.focusedTag=s,t.data.activedescendant=_e.TagsList),this.applyState(t)},t.prototype.triggerOnChange=function(e,t){void 0===this.props.value&&(t.data.value=ze([],e,!0)),this._valueItemsDuringOnChange=[],this.setItems(e,this._valueItemsDuringOnChange),t.events.push({type:"onChange"})},t.prototype.selectFocusedItem=function(e){var t=this.props,n=t.data,r=void 0===n?[]:n,o=t.virtual,i=this.getFocusedState().focusedIndex;void 0!==r[i-(o?o.skip:0)]&&this.handleItemClick(i,e)},t.prototype.setItems=function(e,t){t.length=0,t.push.apply(t,e)},t.prototype.getFocusedState=function(){var e,t=this.state.focusedIndex,n=void 0!==this.props.filter?this.props.filter:this.state.text,r=this.props,o=r.allowCustom,i=r.data,a=void 0===i?[]:i,s=r.dataItemKey,l=r.virtual,c=r.textField,u=r.focusedItemIndex,d=void 0===u?O:u,p=l&&l.skip||0;if(void 0!==t)return{focusedIndex:t,focusedItem:a[t-p],focusedType:Ae.ListItem};var f=this.value;if(o&&n)return{focusedItem:null,focusedIndex:-1,focusedType:Ae.CustomItem};if(n)return{focusedItem:a[e=d(a,n,c)],focusedIndex:e+p,focusedType:Ae.ListItem};if(f.length){var h=f[f.length-1];return e=a.findIndex((function(e){return N(e,h,s)})),void 0!==a[e]?{focusedIndex:e+p,focusedItem:a[e],focusedType:Ae.ListItem}:{focusedType:Ae.None,focusedIndex:-1}}return 0===p?{focusedItem:a[0],focusedIndex:0,focusedType:Ae.ListItem}:{focusedType:Ae.None,focusedIndex:-1}},t.prototype.focusElement=function(e){var t=this;this._skipFocusEvent=!0,e.focus(),window.setTimeout((function(){return t._skipFocusEvent=!1}),0)},t.prototype.applyState=function(e){this.base.applyState(e),this._valueItemsDuringOnChange=null},t.displayName="MultiSelect",t.propTypes=Fe(Fe({},Z.propTypes),{autoClose:i.bool,value:i.arrayOf(i.any),defaultValue:i.arrayOf(i.any),dataItemKey:i.string,placeholder:i.string,tags:i.arrayOf(i.shape({text:i.string,data:i.arrayOf(i.any)})),tagRender:i.func,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string}),t.defaultProps=Fe(Fe({},Z.defaultProps),{autoClose:!0,required:!1,size:"medium",rounded:"medium",fillMode:"solid"}),t}(o.Component),We=(0,u.Y)(),$e=(0,u.u)(We,Ke);$e.displayName="KendoReactMultiSelect";var qe=function(){return qe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},qe.apply(this,arguments)},Ue=function(e){return o.createElement(q,qe({},e,{wrapperCssClass:"k-table-body k-table-scroller",listClassName:"k-table k-table-list",listStyle:qe({},e.listStyle)}))},Ge=n(9656),Ye=n(2665),Xe=n(9659),Je=function(){return Je=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Je.apply(this,arguments)},Ze=(0,u.Y)(),Qe=o.forwardRef((function(e,t){var n=(0,Ge.Y)(Ze,e),r=o.useRef(null),i=o.useRef(null),a=(0,Ye.n)(),l=n.columns,c=void 0===l?tt.columns:l,u=n.popupSettings,d=void 0===u?tt.popupSettings:u,p=n.className,f=(n.size,n.onOpen),h=n.onClose,m=n.onFocus,g=n.onBlur,v=n.onChange,y=n.onFilterChange,b=n.onPageChange,k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(n,["columns","popupSettings","className","size","onOpen","onClose","onFocus","onBlur","onChange","onFilterChange","onPageChange"]);o.useImperativeHandle(r,(function(){return{element:i.current&&i.current.element,focus:function(){i.current&&i.current.focus()},get value(){return i.current&&i.current.value},get name(){return i.current&&i.current.name},props:n}})),o.useImperativeHandle(t,(function(){return r.current}));var w=o.useMemo((function(){if(void 0===w&&void 0!==n.groupField&&n.data)return E(n.data[0],n.groupField)}),[n.data,n.groupField]),C=o.useState(w),x=C[0],O=C[1],S=o.useMemo((function(){return o.createElement(o.Fragment,null,n.header,o.createElement("div",{className:"k-table-header-wrap"},o.createElement("table",{className:"k-table",role:"presentation"},o.createElement("colgroup",null,c.map((function(e,t){return o.createElement("col",{key:e.uniqueKey?e.uniqueKey:t,style:{width:e.width?e.width:tt.width}})}))),o.createElement("thead",{className:"k-table-thead"},o.createElement("tr",{className:"k-table-row"},c.map((function(e,t){return o.createElement("th",{className:"k-table-th",key:e.uniqueKey?e.uniqueKey:t},e.header||" ")}))),x&&o.createElement("tr",{className:"k-table-group-row"},o.createElement("th",{className:"k-table-th",colSpan:c.length},x))))))}),[n.header,c,x]),I=o.useMemo((function(){return"calc(".concat(c.map((function(e){return t=e.width,n=tt.width,t?"number"==typeof t?t+"px":t:n;var t,n})).filter(Boolean).join(" + ")," + ").concat(a,"px + 4px)")}),[c,a]),N=n.virtual?n.virtual.skip:0,T=o.useCallback((function(e,t){var r,i,a,l=c.map((function(e,n){return o.createElement("span",{className:"k-table-td",style:{width:e.width?e.width:tt.width},key:e.uniqueKey?e.uniqueKey:n},e.field?(0,Xe.Y)(e.field)(t.dataItem):"")})),u=void 0,d=n.data||[],p=t.index-N;void 0!==n.groupField&&(r=(a=(0,Xe.Y)(n.groupField))(d[p]),i=a(d[p-1]),r&&i&&r!==i&&(u=r)),u&&l.push(o.createElement("div",{key:"group",className:"k-table-td k-table-group-td"},o.createElement("span",null,u)));var f=o.cloneElement(e,Je(Je({},e.props),{className:(0,s.A)("k-table-row",{"k-table-alt-row":t.index%2!=0,"k-focus":t.focused,"k-selected":t.selected,"k-first":Boolean(u)})}),l);return n.itemRender?n.itemRender.call(void 0,f,t):f}),[c,n.groupField,n.itemRender,n.data,N]),M=o.useCallback((function(e,t){e&&e.call(void 0,Je(Je({},t),{target:r.current}))}),[]),D=o.useCallback((function(e){return M(f,e)}),[f]),R=o.useCallback((function(e){return M(h,e)}),[h]),P=o.useCallback((function(e){return M(m,e)}),[m]),_=o.useCallback((function(e){return M(g,e)}),[g]),A=o.useCallback((function(e){return M(v,e)}),[v]),j=o.useCallback((function(e){return M(y,e)}),[y]),F=o.useCallback((function(e){return M(b,e)}),[b]),z=o.useCallback((function(e){O(e.group)}),[]);o.useEffect((function(){(0,Ye.p)()}));var L=o.useCallback((function(e){return o.createElement(Ue,Je({},e))}),[]);return o.createElement(ke,Je({},k,{list:L,popupSettings:Je(Je({width:I},d),{popupClass:"k-dropdowngrid-popup k-reset",className:d.className}),ref:i,header:S,itemRender:T,size:n.size,rounded:n.rounded,fillMode:n.fillMode,onOpen:D,onClose:R,onFocus:P,onBlur:_,onChange:A,onFilterChange:j,onPageChange:F,onGroupScroll:z,className:(0,s.A)("k-dropdowngrid",p)}))})),et=Je(Je({},ye.propTypes),{columns:i.any.isRequired}),tt={columns:[],popupSettings:{},width:"200px",size:"medium",rounded:"medium",fillMode:"solid"};Qe.displayName="KendoMultiColumnComboBox",Qe.propTypes=et,Qe.defaultProps=tt;var nt=n(3228),rt=n(1573),ot=n(8006),it=n(5407),at="_";function st(e,t,n){if(pt(e))return t[Number(e)];var r=t[Number(function(e){return dt(e)?e:e.split(at)[0]}(e))],o=r&&r[n]||[];return o.length?st(function(e){if(dt(e))return e;var t=e.indexOf(at);return e.substring(t+1)}(e),o,n):void 0}function lt(e){return ct("0",e)}function ct(e,t){return e=e.toString(),t?t+at+e:e}function ut(e){var t=e.lastIndexOf(at);return t<0?"":e.substring(0,t)}function dt(e){return""===e||e.indexOf(at)<0}function pt(e){return""!==e&&e.indexOf(at)<0}function ft(e){var t=e.lastIndexOf(at);return t<0?e:e.substring(t+1)}const ht=function(){function e(){this.objects=[]}return e.prototype.init=function(e){for(var t,n=0;n<e.length;n++)n%5e4==0&&(t={},this.objects.push(t)),t[e[n]]=!0},e.prototype.hasId=function(e){return this.objects.some((function(t){return t[e]}))},e}();function mt(e,t){var n=(e||"").split("."),r=t;return n.forEach((function(e){r=r?r[e]:void 0})),r}function gt(e,t){var n=mt(t,e);return Boolean(n&&n.length)}function vt(e,t){return t.expanded(e)&&gt(e,t.getChildrenField())}function yt(e,t,n,r){var o=function(e,t,n,r){var o=[],i=new ht;return i.init(e),kt(i,t,n,"",o,r),o}([e],t,n,r);return o.length?o[0]:void 0}function bt(e,t,n){for(var r=function(e){return e.split(at)}(e),o=t,i=0;i<r.length;i++){var a=o[Number(r[i])];if(n.disabled(a))return!1;o=a[n.getChildrenField()]}return!0}function kt(e,t,n,r,o,i){for(var a=0;a<n.length;a++){var s=n[a],l=ct(a,r);e.hasId(mt(t,s))&&o.push(l),gt(s,i)&&kt(e,t,mt(i,s),l,o,i)}}function wt(e,t,n,r,o){switch(r){case l.R.left:return pt(t)||o.expanded(e)&&bt(t,n,o)?t:ut(t);case l.R.right:return vt(e,o)?lt(t):t;case l.R.up:return i=Number(ft(t)),a=ut(t),i?xt(ct(i-1,a),n,o):pt(t)?t:a;case l.R.down:return vt(e,o)?lt(t):Ct(t,n,o)||t;case l.R.home:return"0";case l.R.end:return function(){for(var e,t=(n.length-1).toString(),r=n[n.length-1];vt(r,o);)t=ct((e=r[o.getChildrenField()]).length-1,t),r=e[e.length-1];return t}();default:return t}var i,a}function Ct(e,t,n){var r=ut(e),o=r?st(r,t,n.getChildrenField()):void 0,i=o?o[n.getChildrenField()]:t,a=Number(ft(e));return a<i.length-1?ct(a+1,r):o?Ct(r,t,n):void 0}function xt(e,t,n){var r=st(e,t,n.getChildrenField());return vt(r,n)?xt(ct(r[n.getChildrenField()].length-1,e),t,n):e}var Ot=n(1779),St=n(8686),Et="items",It=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nt=function(){return Nt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Nt.apply(this,arguments)},Tt=a.G.sizeMap,Mt=o.createContext((function(e){return e})),Dt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.itemGuid=(0,Y.M)(),t.onCheckChange=function(e){t.props.onCheckChange(e,t.item,t.itemId)},t.onExpandChange=function(e){t.props.onExpandChange(e,t.item,t.itemId)},t.onItemClick=function(e){t.props.onItemClick(e,t.item,t.itemId)},t.onPress=function(e){t.props.onPress(e.event,t.item,t.itemId)},t.onDrag=function(e){t.props.onDrag(e.event,t.item,t.itemId)},t.onRelease=function(e){t.props.onRelease(e.event,t.item,t.itemId)},t.assignDraggableMeta=function(e){e&&(e._kendoItemId=t.props.itemId,e._kendoTreeViewGuid=t.props.treeGuid)},t}return It(t,e),t.prototype.render=function(){var e=this,t=this.renderSubitemsIfApplicable(),n=this.renderItemInPart();return o.createElement("li",{className:this.getRootClassName(),tabIndex:this.tabIndex,role:"treeitem","aria-expanded":this.ariaExpanded,"aria-selected":this.ariaSelected,"aria-checked":this.ariaChecked,"aria-disabled":!!this.fieldsSvc.disabled(this.item)||void 0,ref:function(t){return e.itemElement=t}},o.createElement("div",{className:"k-treeview-".concat(this.props.position),ref:this.assignDraggableMeta},this.renderExpandIcon(),this.renderCheckbox(),this.props.draggable?o.createElement(Ot._,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease},n):n),this.props.animate?o.createElement(St.U,{transitionEnterDuration:200,transitionExitDuration:200,style:{display:"block"},children:t}):t)},t.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.itemId;e&&e===t&&this.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement&&(this.checkboxElement.indeterminate=this.fieldsSvc.checkIndeterminate(this.item))},t.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId;if(t&&t!==e.focusedItemId&&t===this.itemId&&this.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement){var n=this.fieldsSvc.checkIndeterminate(this.item);n!==e.fieldsService.checkIndeterminate(e.item)&&(this.checkboxElement.indeterminate=n)}},t.prototype.renderCheckbox=function(){var e,t=this;if(this.props.checkboxes){var n=this.props.size;return o.createElement("div",{className:"k-checkbox-wrap"},o.createElement("input",{type:"checkbox",className:(0,s.A)("k-checkbox k-rounded-md",(e={},e["k-checkbox-".concat(Tt[n]||n)]=n,e)),checked:Boolean(this.fieldsSvc.checked(this.item)),id:this.itemGuid,tabIndex:-1,onChange:this.onCheckChange,ref:function(e){return t.checkboxElement=e}}),o.createElement("label",{className:"k-checkbox-label",htmlFor:this.itemGuid}))}},t.prototype.renderExpandIcon=function(){return this.props.expandIcons&&(this.fieldsSvc.hasChildren(this.item)||gt(this.item,this.fieldsSvc.getChildrenField()))&&o.createElement("span",{className:"k-treeview-toggle"},o.createElement("span",{className:this.getIconClassName(),onClick:this.onExpandChange}))},t.prototype.renderSubitemsIfApplicable=function(){var e=this,t=this.fieldsSvc.children(this.item);return vt(this.item,this.fieldsSvc)?o.createElement("ul",{className:"k-treeview-group",role:"group"},t.map((function(n,r){return o.createElement(Rt,{item:n,position:0===r?"top":r===t.length-1?"bot":"mid",itemId:ct(r,e.itemId),treeGuid:e.props.treeGuid,animate:e.props.animate,focusedItemId:e.props.focusedItemId,tabbableItemId:e.props.tabbableItemId,fieldsService:e.props.fieldsService,itemUI:e.props.itemUI,checkboxes:e.props.checkboxes,ariaMultiSelectable:e.props.ariaMultiSelectable,onItemClick:e.props.onItemClick,onFocusDomElNeeded:e.props.onFocusDomElNeeded,draggable:e.props.draggable,onPress:e.props.onPress,onDrag:e.props.onDrag,onRelease:e.props.onRelease,expandIcons:e.props.expandIcons,onExpandChange:e.props.onExpandChange,onCheckChange:e.props.onCheckChange,key:r,size:e.props.size})}))):void 0},t.prototype.renderItemInPart=function(){return o.createElement("span",{className:this.getContentClassName(),style:{touchAction:"none"},onClick:this.onItemClick},o.createElement("span",{className:"k-treeview-leaf-text"},this.props.itemUI?o.createElement(this.props.itemUI,{item:this.item,itemHierarchicalIndex:this.itemId}):this.fieldsSvc.text(this.item)))},Object.defineProperty(t.prototype,"fieldsSvc",{get:function(){return this.props.fieldsService},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemId",{get:function(){return this.props.itemId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return(this.props.focusedItemId||this.props.tabbableItemId)===this.itemId?0:-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaExpanded",{get:function(){return this.fieldsSvc.hasChildren(this.item)||gt(this.item,this.fieldsSvc.getChildrenField())?Boolean(this.fieldsSvc.expanded(this.item)):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaChecked",{get:function(){return this.props.checkboxes?this.fieldsSvc.checked(this.item)?"true":this.fieldsSvc.checkIndeterminate(this.item)?"mixed":"false":void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaSelected",{get:function(){return!!this.fieldsSvc.selected(this.item)||(this.props.ariaMultiSelectable?!!this.fieldsSvc.disabled(this.item)&&void 0:void 0)},enumerable:!1,configurable:!0}),t.prototype.getIconClassName=function(){var e=this.fieldsSvc.expanded(this.item);return(0,s.A)("k-icon",{"k-i-expand":!e,"k-i-collapse":e,"k-i-loading":e&&!gt(this.item,this.fieldsSvc.getChildrenField())})},t.prototype.getRootClassName=function(){return(0,s.A)("k-treeview-item",{"k-disabled":this.fieldsSvc.disabled(this.item)})},t.prototype.getContentClassName=function(){return(0,s.A)("k-treeview-leaf",{"k-focus":this.props.focusedItemId===this.itemId,"k-selected":this.fieldsSvc.selected(this.item)})},t.defaultProps={position:"top"},t}(o.Component),Rt=o.forwardRef((function(e,t){var n=o.useContext(Mt).call(void 0,e);return o.createElement(Dt,Nt({ref:t},n))}));Rt.displayName="TreeViewItem";const Pt=function(){function e(e){this.expandField=e.expandField,this.selectField=e.selectField,this.hasChildrenField=e.hasChildrenField,this.childrenField=e.childrenField,this.textField=e.textField,this.disableField=e.disableField,this.checkField=e.checkField,this.checkIndeterminateField=e.checkIndeterminateField,this.focusIdField=e.focusIdField}return e.prototype.expanded=function(e){return mt(this.expandField,e)},e.prototype.selected=function(e){return mt(this.selectField,e)},e.prototype.text=function(e){return mt(this.textField,e)},e.prototype.disabled=function(e){return mt(this.disableField,e)},e.prototype.hasChildren=function(e){return mt(this.hasChildrenField,e)},e.prototype.children=function(e){return mt(this.childrenField,e)||[]},e.prototype.checked=function(e){return mt(this.checkField,e)},e.prototype.checkIndeterminate=function(e){return mt(this.checkIndeterminateField,e)},e.prototype.focusId=function(e){return this.focusIdField&&mt(this.focusIdField,e)},e.prototype.getChildrenField=function(){return this.childrenField},e}();var _t={name:"@progress/kendo-react-treeview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031475,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},At=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jt=a.G.sizeMap,Ft=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:"0"},n.fieldsSvc=null,n.allowExplicitFocus=!1,n.treeGuid=(0,Y.M)(),n._element=null,n.onFocusDomElNeeded=function(e){n.allowExplicitFocus&&n.focusDomItem(e)},n.onCheckChange=function(e,t,r){n.setFocus(r),n.dispatchCheckChange(e,t,r)},n.onExpandChange=function(e,t,r){n.setFocus(r),n.dispatchExpandChange(e,t,r)},n.onPress=function(e,t,r){n.props.onItemDragStart&&n.props.onItemDragStart.call(void 0,{target:n,item:t,itemHierarchicalIndex:r})},n.onDrag=function(e,t,r){var o=e.pageX,i=e.pageY,a=e.clientX,s=e.clientY;n.props.onItemDragOver&&n.props.onItemDragOver.call(void 0,{target:n,item:t,itemHierarchicalIndex:r,pageX:o,pageY:i,clientX:a,clientY:s})},n.onRelease=function(e,t,r){var o=e.pageX,i=e.pageY,a=e.clientX,s=e.clientY;n.props.onItemDragEnd&&n.props.onItemDragEnd.call(void 0,{target:n,item:t,itemHierarchicalIndex:r,pageX:o,pageY:i,clientX:a,clientY:s})},n.onItemClick=function(e,t,r){n.setFocus(r),n.dispatchItemClick(e,t,r)},n.onFocus=function(){clearTimeout(n.blurRequest),void 0===n.state.focusedItemId&&n.data.length&&n.setFocus(n.state.tabbableItemId)},n.onBlur=function(){clearTimeout(n.blurRequest),n.blurRequest=window.setTimeout((function(){return n.setFocus(void 0)}),0)},n.onKeyDown=function(e){var t=n.getFocusedItem();if(t&&n.fieldsSvc){var r=wt(t,n.state.focusedItemId,n.data,e.keyCode,n.fieldsSvc);r!==n.state.focusedItemId&&(e.preventDefault(),n.allowExplicitFocus=!0,n.setFocus(r)),n.dispatchEventsOnKeyDown(e,t)}},(0,Q.s)(_t),n}return At(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e,t=this;this.fieldsSvc=new Pt(this.props);var n=this.props,r=n.size,i=n.className;return o.createElement("div",{className:(0,s.A)("k-treeview",(e={},e["k-treeview-".concat(jt[r]||r)]=r,e),i),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,role:"tree","aria-multiselectable":!!this.ariaMultiSelectable||void 0,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],ref:function(e){return t._element=e},tabIndex:this.props.tabIndex},o.createElement("ul",{className:"k-treeview-lines k-treeview-group",role:"group"},this.data.map((function(e,n){return o.createElement(Rt,{item:e,position:0===n?"top":n===t.data.length-1?"bot":"mid",itemId:n.toString(),treeGuid:t.treeGuid,animate:t.props.animate,focusedItemId:t.state.focusedItemId,tabbableItemId:t.state.tabbableItemId,fieldsService:t.fieldsSvc,itemUI:t.props.item,checkboxes:t.props.checkboxes,ariaMultiSelectable:t.ariaMultiSelectable,onItemClick:t.onItemClick,onFocusDomElNeeded:t.onFocusDomElNeeded,draggable:t.props.draggable,onPress:t.onPress,onDrag:t.onDrag,onRelease:t.onRelease,expandIcons:t.props.expandIcons,onExpandChange:t.onExpandChange,onCheckChange:t.onCheckChange,key:n,size:r})}))))},t.prototype.componentDidUpdate=function(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},t.prototype.dispatchEventsOnKeyDown=function(e,t){var n=this;if(null!==this.fieldsSvc){var r=function(){return n.fieldsSvc&&bt(n.state.focusedItemId,n.data,n.fieldsSvc)};e.keyCode===l.R.left&&this.fieldsSvc.expanded(t)&&r()||e.keyCode===l.R.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||gt(t,this.props.childrenField))&&r()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===l.R.enter&&r()?this.dispatchItemClick(e,t,this.state.focusedItemId):e.keyCode===l.R.space&&r()&&(e.preventDefault(),this.dispatchCheckChange(e,t,this.state.focusedItemId))}},t.prototype.setFocus=function(e){if(e&&this.fieldsSvc)if(this.fieldsSvc.focusIdField){var t=this.getItemById(e);this.setState({focusedItemId:e,focusedItemPublicId:this.fieldsSvc.focusId(t)})}else this.setState({focusedItemId:e});else this.setState((function(e){return{focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:e.focusedItemId}}))},t.prototype.getFocusedItem=function(){return this.state.focusedItemId?this.getItemById(this.state.focusedItemId):void 0},t.prototype.getItemById=function(e){return st(e,this.data,this.props.childrenField||Et)},t.prototype.dispatchCheckChange=function(e,t,n){(0,it.N)(this.props.onCheckChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchExpandChange=function(e,t,n){(0,it.N)(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchItemClick=function(e,t,n){(0,it.N)(this.props.onItemClick,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.refocusDueToFocusIdField=function(){if(this.fieldsSvc&&this.fieldsSvc.focusIdField){var e=this.state.focusedItemPublicId;if(e){var t=this.props.getFocusHierarchicalIndex?this.props.getFocusHierarchicalIndex(e):yt(e,this.fieldsSvc.focusIdField,this.data,this.props.childrenField);t!==this.state.focusedItemId&&(this.allowExplicitFocus=!0,this.setState({focusedItemId:t}))}}},Object.defineProperty(t.prototype,"ariaMultiSelectable",{get:function(){return!0===this.props["aria-multiselectable"]||"true"===this.props["aria-multiselectable"]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.data||[]},enumerable:!1,configurable:!0}),t.prototype.focusDomItem=function(e){e.focus()},Object.defineProperty(t.prototype,"guid",{get:function(){return this.treeGuid},enumerable:!1,configurable:!0}),t.propTypes={data:i.arrayOf(i.any),animate:i.bool,tabIndex:i.number,focusIdField:i.string,getHierarchicalIndexById:i.func,onExpandChange:i.func,onItemClick:i.func,expandField:i.string,selectField:i.string,childrenField:i.string,hasChildrenField:i.string,textField:i.string,disableField:i.string,item:i.any,"aria-multiselectable":function(e,t,n){return void 0!==e[t]&&!0!==e[t]&&!1!==e[t]&&"true"!==e[t]&&"false"!==e[t]?new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed."):null},"aria-label":i.string,"aria-labelledby":i.string,size:i.oneOf([null,"small","medium","large"])},t.defaultProps={animate:!0,expandField:"expanded",selectField:"selected",hasChildrenField:"hasChildren",childrenField:Et,textField:"text",disableField:"disabled",checkField:"checked",checkIndeterminateField:"checkIndeterminate",size:"medium"},t}(o.Component);function zt(e,t,n){var r=o.useState(t),i=r[0],a=r[1];return o.useEffect((function(){void 0!==i&&e.current&&a(e.current.offsetWidth)}),n),i}var Lt=function(e){return o.createElement("div",{className:"k-nodata"},o.createElement("div",null,e.children))},Bt=function(){return Bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Bt.apply(this,arguments)},Vt=a.G.sizeMap,Ht=a.G.roundedMap,Kt=function(e){return o.createElement("span",{className:"k-input-value-text"},e.children)},Wt=function(e){return e.split("_").map((function(e){return parseInt(e,10)}))},$t={selectField:"selected",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},required:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},qt=(0,u.Y)(),Ut=o.forwardRef((function(e,t){var n,r;(0,Q.s)(ee);var i=(0,Ge.Y)(qt,e),a=o.useMemo((function(){return(0,Y.M)()}),[]),u=i.id||a,f=i.data,h=void 0===f?[]:f,m=i.dataItemKey,g=i.popupSettings,v=void 0===g?{}:g,y=i.style,b=void 0===y?{}:y,k=i.opened,x=i.disabled,O=i.onOpen,S=void 0===O?nt.Z:O,I=i.onClose,T=void 0===I?nt.Z:I,M=i.placeholder,D=i.label,R=i.name,P=i.selectField,_=void 0===P?$t.selectField:P,A=i.subItemsField,j=void 0===A?$t.subItemsField:A,F=i.validationMessage,z=i.valid,L=i.required,W=i.validityStyles,$=(0,c.p)(i.tabIndex,x),q=o.useRef(null),U=o.useRef(null),G=o.useRef(null),X=o.useRef(null),J=o.useRef(null),Z=o.useRef(!1),te=o.useState(void 0),ne=te[0],re=te[1],oe=void 0!==i.value,ie=oe?i.value:void 0!==ne?ne:i.defaultValue,ae=C(ie),se=ae?E(ie,i.textField):"",le=function(e,t){var n=e.valid;return{customError:void 0!==e.validationMessage,valid:Boolean(void 0!==n?n:!e.required||t),valueMissing:!t}}({validationMessage:F,valid:z,required:L},ae),ce=o.useCallback((function(){return U.current&&U.current.focus()}),[]);o.useImperativeHandle(q,(function(){return{props:i,element:U.current,focus:ce}})),o.useImperativeHandle(t,(function(){return q.current}));var ue=(0,rt.V)(U,i.dir),de=void 0!==v.width?v.width:void 0!==b.width?b.width:$t.popupSettings.width,pe=zt(U,de),fe=Bt({width:pe},void 0!==ue?{direction:ue}:{}),he=o.useState(!1),me=he[0],ge=he[1],ve=void 0!==k?k:me,ye=o.useState(!1),be=ye[0],ke=ye[1],we=o.useState(""),Ce=we[0],xe=we[1],Oe=o.useCallback((function(){X.current&&X.current.setCustomValidity&&X.current.setCustomValidity(le.valid?"":void 0===F?"Please select a value from the list!":F)}),[F,le]);o.useEffect(Oe);var Se=o.useCallback((function(e){if(!ve){if(S){var t=Bt({},e);S.call(void 0,t)}void 0===k&&ge(!0)}}),[ve,k,S]),Ee=o.useCallback((function(e){if(ve){if(T){var t=Bt({},e);T.call(void 0,t)}void 0===k&&ge(!1)}}),[ve,k,T]),Ie=o.useCallback((function(e){if(!e.isDefaultPrevented()&&q.current){ke(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};(ve?Ee:Se)(t)}}),[ve,k,S,T]),Ne=o.useCallback((function(e){Z.current=!0,e(),window.setTimeout((function(){return Z.current=!1}),0)}),[]),Te=o.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=J.current&&J.current.element;if(q.current&&(!e.isDefaultPrevented()||G.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};if(ve)if(t===l.R.esc||n&&t===l.R.up)e.preventDefault(),Ee(o);else if(r&&r.querySelector(".k-focus")&&(t===l.R.up||t===l.R.down||t===l.R.left||t===l.R.right||t===l.R.home||t===l.R.end)){if(t===l.R.up&&G.current){var i=Array.from(r.querySelectorAll(".k-treeview-item")),a=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],i,!0).reverse().find((function(e){return Boolean(e&&e.querySelector(".k-focus"))}));if(a&&0===i.indexOf(a))return Ne((function(){De(G.current)}))}Ne(nt.Z)}else t===l.R.down&&Ne((function(){De(G.current||r)}));else n&&t===l.R.down&&(e.preventDefault(),Se(o))}}),[ve,k,S,T]),Me=o.useCallback((function(e){var t=e.keyCode;e.altKey||t!==l.R.up&&t!==l.R.down||(e.preventDefault(),Ne(t===l.R.up?function(){De(U.current)}:function(){De(J.current&&J.current.element)}))}),[]),De=o.useCallback((function(e){e&&Ne((function(){return e.focus()}))}),[]),Re=o.useCallback((function(){be||!ve||k?i.filterable?De(G.current):De(J.current&&J.current.element):Ee({target:q.current})}),[T,i.filterable,be,k,ve]),Pe=o.useCallback((function(){be&&De(U.current)}),[be]),_e=o.useCallback((function(e){if(!be&&!Z.current&&(ke(!0),i.onFocus&&q.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};i.onFocus.call(void 0,t)}}),[be,i.onFocus]),Ae=o.useCallback((function(e){if(be&&!Z.current&&q.current){ke(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};if(i.onBlur){var n=Bt({},t);i.onBlur.call(void 0,n)}Ee(t)}}),[be,i.onBlur,ve,k,T]),je=o.useCallback((function(){be&&Ne(nt.Z)}),[be]),Fe=o.useCallback((function(e,t,n){if(i.onChange){var r=Bt({value:t,level:n?Wt(n):[]},e);i.onChange.call(void 0,r)}oe||re(t)}),[i.onChange,oe]),ze=o.useCallback((function(e){if(!N(e.item,ie,m)&&q.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,o={syntheticEvent:e.syntheticEvent,nativeEvent:r,target:q.current};Fe(o,t,n),Ee(o)}}),[oe,ie,i.onChange,m,ve,k,T]),Le=o.useCallback((function(e){if(q.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};Fe(t,null),Ee(t),e.preventDefault()}}),[oe,i.onChange,ve,k,T]),Be=o.useCallback((function(e){if(e.syntheticEvent.stopPropagation(),i.onExpandChange&&q.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,o=e.syntheticEvent,a={level:Wt(n),item:t,nativeEvent:r,syntheticEvent:o,target:q.current};i.onExpandChange.call(void 0,a)}}),[i.onExpandChange]),Ve=o.useCallback((function(e){if(i.onFilterChange&&q.current){var t={filter:{field:i.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};i.onFilterChange.call(void 0,t),void 0===i.filter&&xe(e.target.value)}}),[i.onFilterChange,i.filter,i.textField]),He=o.useMemo((function(){return oe||!ae?h:(0,ot.Gy)(h,j,(function(e){var t;return(0,ot.u5)(e,j,((t={})[_]=N(e,ie,m),t))}))}),[h,ie,oe,ae,_,j]),Ke=i.listNoData||Lt,We=i.valueHolder||Kt,$e=(0,B.useLocalization)(),qe=!W||le.valid,Ue=i.size,Ye=i.rounded,Xe=i.fillMode,Je=o.createElement("span",{className:(0,s.A)("k-dropdowntree k-picker",i.className,(n={},n["k-picker-".concat(Vt[Ue]||Ue)]=Ue,n["k-rounded-".concat(Ht[Ye]||Ye)]=Ye,n["k-picker-".concat(Xe)]=Xe,n["k-focus"]=be,n["k-invalid"]=!qe,n["k-loading"]=i.loading,n["k-required"]=L,n["k-disabled"]=i.disabled,n)),tabIndex:$,accessKey:i.accessKey,id:u,style:D?Bt(Bt({},b),{width:void 0}):b,dir:ue,ref:U,onKeyDown:x?void 0:Te,onMouseDown:je,onClick:x?void 0:Ie,onFocus:_e,onBlur:Ae,role:"combobox","aria-haspopup":"true","aria-expanded":ve,"aria-disabled":x,"aria-label":D,"aria-labelledby":i.ariaLabelledBy,"aria-describedby":i.ariaDescribedBy},o.createElement("span",{className:"k-input-inner"},o.createElement(We,{item:ie},se||M)),i.loading&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),ae&&!x&&o.createElement("span",{onClick:Le,className:"k-clear-value",title:$e.toLanguageString(H,K[H]),role:"button",tabIndex:-1,onMouseDown:function(e){return e.preventDefault()}},o.createElement("span",{className:"k-icon k-i-x"})),o.createElement("button",{tabIndex:-1,type:"button","aria-label":"select",className:(0,s.A)("k-input-button k-button k-icon-button",(r={},r["k-button-".concat(Vt[Ue]||Ue)]=Ue,r["k-button-".concat(Xe)]=Xe,r["k-button-".concat(Xe,"-base")]=Xe,r))},o.createElement("span",{className:"k-button-icon k-icon k-i-arrow-s"})),o.createElement("select",{name:R,ref:X,tabIndex:-1,"aria-hidden":!0,title:D,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},o.createElement("option",{value:i.valueMap?i.valueMap.call(void 0,ie):ie})),o.createElement(p.G,{className:(0,s.A)(v.className,{"k-rtl":"rtl"===ue}),popupClass:v.popupClass,style:fe,animate:v.animate,anchor:U.current,show:ve,onOpen:Re,onClose:Pe,appendTo:v.appendTo},i.filterable&&o.createElement(w,{value:void 0===i.filter?Ce:i.filter,inputRef:G,onChange:Ve,onKeyDown:Me,size:Ue,rounded:Ye,fillMode:Xe}),h.length>0?o.createElement(Ft,{ref:J,tabIndex:$,data:He,focusIdField:m,textField:i.textField,selectField:_,expandField:i.expandField,childrenField:j,expandIcons:!0,onItemClick:ze,onExpandChange:Be,size:Ue,item:i.item}):o.createElement(Ke,null,$e.toLanguageString(V,K[V]))));return D?o.createElement(d._,{label:D,editorValue:se,editorPlaceholder:M,editorValid:qe,editorDisabled:x,editorId:u,style:{width:b?b.width:void 0},children:Je,dir:ue}):Je})),Gt={opened:i.bool,disabled:i.bool,dir:i.string,tabIndex:i.number,accessKey:i.string,data:i.array,value:i.any,valueMap:i.func,placeholder:i.string,dataItemKey:i.string.isRequired,textField:i.string.isRequired,selectField:i.string,expandField:i.string,subItemsField:i.string,className:i.string,style:i.object,label:i.string,validationMessage:i.string,validityStyles:i.bool,valid:i.bool,required:i.bool,name:i.string,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,filterable:i.bool,filter:i.string,loading:i.bool,popupSettings:i.shape({animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),popupClass:i.string,className:i.string,appendTo:i.any,width:i.oneOfType([i.string,i.number]),height:i.oneOfType([i.string,i.number])}),onOpen:i.func,onClose:i.func,onFocus:i.func,onBlur:i.func,onChange:i.func,onFilterChange:i.func,onExpandChange:i.func,item:i.func,valueHolder:i.func,listNoData:i.func};Ut.displayName="KendoReactDropDownTree",Ut.defaultProps=$t,Ut.propTypes=Gt;var Yt=function(){return Yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yt.apply(this,arguments)},Xt=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Jt=a.G.sizeMap,Zt=a.G.roundedMap,Qt={checkField:"checkField",checkIndeterminateField:"checkIndeterminateField",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},size:"medium",rounded:"medium",fillMode:"solid",required:!1,validityStyles:!0},en=(0,u.Y)(),tn=o.forwardRef((function(e,t){var n,r,i=(0,Ge.Y)(en,e);(0,Q.s)(ee);var a=o.useMemo((function(){return(0,Y.M)()}),[]),u=i.id||a,f=i.data,h=void 0===f?[]:f,m=i.dataItemKey,g=i.popupSettings,v=void 0===g?{}:g,y=i.style,b=void 0===y?{}:y,k=i.opened,C=i.disabled,x=i.onOpen,O=void 0===x?nt.Z:x,S=i.onClose,I=void 0===S?nt.Z:S,T=i.placeholder,M=i.label,R=i.name,P=i.checkField,_=void 0===P?Qt.checkField:P,A=i.checkIndeterminateField,j=void 0===A?Qt.checkIndeterminateField:A,F=i.subItemsField,z=void 0===F?Qt.subItemsField:F,L=i.validationMessage,H=i.valid,W=i.tags,$=i.value,q=i.required,U=void 0===q?Qt.required:q,G=i.validityStyles,X=void 0===G?Qt.validityStyles:G,J=(0,c.p)(i.tabIndex,C),Z=o.useRef(null),te=o.useRef(null),ne=o.useRef(null),re=o.useRef(null),oe=o.useRef(null),ie=o.useRef(!1),ae=o.useRef([]),se=o.useRef(null),le=o.useState(),ce=le[0],ue=le[1],de=o.useState(!1),pe=de[0],he=de[1],me=o.useState(!1),ge=me[0],ve=me[1],ye=o.useState(""),be=ye[0],ke=ye[1],we=void 0!==k?k:pe,Ce=Boolean(Array.isArray($)&&$.length),xe=function(e,t){var n=e.valid;return{customError:void 0!==e.validationMessage,valid:Boolean(void 0!==n?n:!e.required||t),valueMissing:!t}}({validationMessage:L,valid:H,required:U},Ce),Oe=(0,rt.V)(te,i.dir),Se=void 0!==v.width?v.width:void 0!==b.width?b.width:Qt.popupSettings.width,Ee=zt(te,Se),Ie=Yt({width:Ee},void 0!==Oe?{direction:Oe}:{}),Ne=o.useCallback((function(){return te.current&&te.current.focus()}),[]);ae.current=void 0===W?($||[]).map((function(e){return{text:E(e,i.textField),data:[e]}})):Xt([],W,!0),o.useImperativeHandle(Z,(function(){return{props:i,element:te.current,focus:Ne}})),o.useImperativeHandle(t,(function(){return Z.current}));var Te=o.useCallback((function(){re.current&&re.current.setCustomValidity&&re.current.setCustomValidity(xe.valid?"":void 0===L?"Please select a value from the list!":L)}),[L,xe]);o.useEffect(Te),o.useEffect((function(){se.current&&we&&se.current.setPosition(se.current._popup)}),[$,we]);var Me=o.useCallback((function(e,t,n){if(i.onChange){var r=Yt({items:t,operation:n},e);i.onChange.call(void 0,r)}}),[i.onChange]),De=o.useCallback((function(e){if(!N(e.item,$,m)&&Z.current){var t=e.item,n=e.nativeEvent,r={syntheticEvent:e.syntheticEvent,nativeEvent:n,target:Z.current};Me(r,[t],"toggle")}}),[$,m,Me]),Re=o.useCallback((function(e){if(!we){if(O){var t=Yt({},e);O.call(void 0,t)}void 0===k&&he(!0)}}),[we,k,O]),_e=o.useCallback((function(e){if(we){if(I){var t=Yt({},e);I.call(void 0,t)}void 0===k&&he(!1)}}),[we,k,I]),Ae=o.useCallback((function(e){ie.current=!0,e(),window.setTimeout((function(){return ie.current=!1}),0)}),[]),je=o.useCallback((function(e){e&&Ae((function(){return e.focus()}))}),[Ae]),Fe=o.useCallback((function(){!ge&&we?_e({target:Z.current}):i.filterable?je(ne.current):je(oe.current&&oe.current.element)}),[ge,we,je,_e,i.filterable]),ze=o.useCallback((function(){ge&&je(te.current)}),[ge,je]),Le=o.useCallback((function(e){if(!ge&&!ie.current&&(ve(!0),i.onFocus&&Z.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};i.onFocus.call(void 0,t)}}),[ge,i.onFocus]),Be=o.useCallback((function(e){if(ge&&!ie.current&&Z.current){ve(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};if(i.onBlur){var n=Yt({},t);i.onBlur.call(void 0,n)}_e(t)}}),[ge,i.onBlur,we,k,I]),Ve=o.useCallback((function(){ge&&Ae(nt.Z)}),[ge,Ae]),He=o.useCallback((function(e){if(!e.isDefaultPrevented()&&Z.current){ve(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};we||Re(t)}}),[we,Re]),Ke=o.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=oe.current&&oe.current.element;if(Z.current&&(!e.isDefaultPrevented()||ne.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};if($&&$.length>0&&(t===l.R.left||t===l.R.right||t===l.R.home||t===l.R.end||t===l.R.delete)){var i=ae.current,a=ce?i.findIndex((function(e){return D(e,ce,m)})):-1,s=void 0,c=-1!==a;t===l.R.left?s=i[a=c?Math.max(0,a-1):i.length-1]:t===l.R.right?a===i.length-1?s=void 0:c&&(s=i[a=Math.min(i.length-1,a+1)]):t===l.R.home?s=i[0]:t===l.R.end?s=i[i.length-1]:t===l.R.delete&&c&&Me(o,i[a].data,"delete"),s!==ce&&ue(s)}if(we)if(t===l.R.esc||n&&t===l.R.up)e.preventDefault(),_e(o);else if(r&&r.querySelector(".k-focus")&&(t===l.R.up||t===l.R.down||t===l.R.left||t===l.R.right||t===l.R.home||t===l.R.end)){if(t===l.R.up&&ne.current){var u=Array.from(r.querySelectorAll(".k-treeview-item")),d=Xt([],u,!0).reverse().find((function(e){return Boolean(e&&e.querySelector(".k-focus"))}));if(d&&0===u.indexOf(d))return Ae((function(){je(ne.current)}))}Ae(nt.Z)}else t===l.R.down&&Ae((function(){je(ne.current||r)}));else n&&t===l.R.down&&(e.preventDefault(),Re(o))}}),[we,_e,je,Ae,Re,ce,m,$,Me]),We=o.useCallback((function(e){var t=e.keyCode;e.altKey||t!==l.R.up&&t!==l.R.down||(e.preventDefault(),Ae(t===l.R.up?function(){je(te.current)}:function(){je(oe.current&&oe.current.element)}))}),[je,Ae]),$e=o.useCallback((function(e){if(Z.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};Me(t,[],"clear"),_e(t),e.preventDefault()}}),[Me,_e]),qe=o.useCallback((function(e,t){_e({target:Z.current}),ge||je(ne.current),Me({syntheticEvent:t,nativeEvent:t.nativeEvent,target:Z.current},e,"delete")}),[Me,_e,je,ge]),Ue=o.useCallback((function(e){if(i.onExpandChange&&Z.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,o=e.syntheticEvent,a={level:(s=n,s.split("_").map((function(e){return parseInt(e,10)}))),item:t,nativeEvent:r,syntheticEvent:o,target:Z.current};i.onExpandChange.call(void 0,a)}var s}),[i.onExpandChange]),Ye=o.useCallback((function(e){if(i.onFilterChange&&Z.current){var t={filter:{field:i.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};i.onFilterChange.call(void 0,t),void 0===i.filter&&ke(e.target.value)}}),[i.onFilterChange,i.filter,i.textField]),Xe=i.listNoData||Lt,Je=(0,B.useLocalization)(),Ze=!X||xe.valid,Qe=i.size,et=i.rounded,tt=i.fillMode,ot=o.createElement("span",{className:(0,s.A)("k-multiselect k-input",i.className,(n={},n["k-input-".concat(Jt[Qe]||Qe)]=Qe,n["k-rounded-".concat(Zt[et]||et)]=et,n["k-input-".concat(tt)]=tt,n["k-focus"]=ge&&!C,n["k-invalid"]=!Ze,n["k-disabled"]=C,n["k-loading"]=i.loading,n["k-required"]=U,n)),tabIndex:J,accessKey:i.accessKey,id:u,style:M?Yt(Yt({},b),{width:void 0}):b,dir:Oe,ref:te,onKeyDown:C?void 0:Ke,onMouseDown:Ve,onFocus:Le,onBlur:Be,role:"combobox","aria-haspopup":"true","aria-expanded":we,"aria-disabled":C,"aria-label":M,"aria-labelledby":i.ariaLabelledBy,"aria-describedby":i.ariaDescribedBy,onClick:C?void 0:He},ae.current.length>0&&o.createElement("div",{className:(0,s.A)("k-input-values k-chip-list k-selection-multiple",(r={},r["k-chip-list-".concat(Jt[Qe]||Qe)]=Qe,r)),role:"listbox",id:"tagslist-"+u},o.createElement(Pe,{tag:i.tag,onTagDelete:qe,data:ae.current,guid:u,focused:ce?ae.current.find((function(e){return D(e,ce,m)})):void 0,size:Qe})),!Ce&&o.createElement("span",{className:"k-input-inner"},o.createElement("span",{className:"k-input-value-text"}," ")),i.loading&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),Ce&&!C&&o.createElement(fe,{onClick:$e}),o.createElement("select",{name:R,ref:re,tabIndex:-1,"aria-hidden":!0,title:M,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},o.createElement("option",{value:i.valueMap?i.valueMap.call(void 0,$):$})),o.createElement(p.G,{popupClass:v.popupClass,className:(0,s.A)(v.className,{"k-rtl":"rtl"===Oe}),style:Ie,animate:v.animate,anchor:te.current,show:we,onOpen:Fe,onClose:ze,appendTo:v.appendTo,ref:se},i.filterable&&o.createElement(w,{value:void 0===i.filter?be:i.filter,inputRef:ne,onChange:Ye,onKeyDown:We,tabIndex:J,size:Qe,rounded:et,fillMode:tt}),h.length>0?o.createElement(Ft,{ref:oe,tabIndex:J,data:h,focusIdField:m,textField:i.textField,checkField:_,checkIndeterminateField:j,expandField:i.expandField,childrenField:z,expandIcons:!0,onItemClick:De,onCheckChange:De,onExpandChange:Ue,checkboxes:!0,size:Qe,item:i.item}):o.createElement(Xe,null,Je.toLanguageString(V,K[V]))));return M?o.createElement(d._,{label:M,editorValue:Ce,editorPlaceholder:T,editorValid:Ze,editorDisabled:C,editorId:u,style:{width:b?b.width:void 0},children:ot,dir:Oe}):ot})),nn={opened:i.bool,disabled:i.bool,dir:i.string,tabIndex:i.number,accessKey:i.string,data:i.array,value:i.any,valueMap:i.func,placeholder:i.string,dataItemKey:i.string.isRequired,textField:i.string.isRequired,checkField:i.string,checkIndeterminateField:i.string,expandField:i.string,subItemsField:i.string,className:i.string,style:i.object,label:i.string,validationMessage:i.string,validityStyles:i.bool,valid:i.bool,required:i.bool,name:i.string,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,filterable:i.bool,filter:i.string,loading:i.bool,tags:i.arrayOf(i.shape({text:i.string,data:i.arrayOf(i.any)})),popupSettings:i.shape({animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),popupClass:i.string,className:i.string,appendTo:i.any,width:i.oneOfType([i.string,i.number]),height:i.oneOfType([i.string,i.number])}),onOpen:i.func,onClose:i.func,onFocus:i.func,onBlur:i.func,onChange:i.func,onFilterChange:i.func,onExpandChange:i.func,item:i.func,listNoData:i.func};tn.displayName="KendoReactMultiSelectTree",tn.defaultProps=Qt,tn.propTypes=nn;var rn=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},on=function(e,t){var n={};return e&&e.length&&e.forEach((function(e){n[t(e)]=!0})),n},an=function(e,t){var n=t.items,r=t.dataItemKey,o=t.value,i=t.subItemsField,a=void 0===i?"items":i,s=t.operation,l=(0,Xe.Y)(r),c=on(o,l);if("clear"===s)return[];if("delete"===s){var u=on(n,l);return o.filter((function(e){return!u[l(e)]}))}for(var d,p=n[0],f=l(p),h=(0,Xe.Y)(a),m=rn([],e,!0),g=[],v=[];m.length;){var y=m.pop();if(f===l(y)){v=g.map((function(e){return e.item})),d=y;break}g&&g.length&&g[g.length-1].parentPosition===m.length&&g.pop(),(N=h(y))&&N.length&&(g.push({item:y,parentPosition:m.length}),m.push.apply(m,N))}for(var b=rn([],h(d)||[],!0),k=[];b.length;)y=b.pop(),k.push(y),(N=h(y))&&N.length&&b.push.apply(b,N);var w=[];if(c[f]){var C=l(d),x=on(k,l),O=on(v,l);w.push.apply(w,o.filter((function(e){var t=l(e);return!x[t]&&C!==t&&!O[t]})))}else{w.push.apply(w,o),w.push(d),w.push.apply(w,k.filter((function(e){return!c[l(e)]})));for(var S=v.filter((function(e){return!c[l(e)]})),E=on(w,l),I=S.length-1;I>-1;I--){var N,T=S[I];if((N=h(T)).filter((function(e){return E[l(e)]})).length<N.length)break;w.push(T),E[l(T)]=!0}}return w}},431:(e,t,n)=>{function r(e){this.content=e}n.r(t),n.d(t,{AddMarkStep:()=>be,AllSelection:()=>nt,CellSelection:()=>As,ContentMatch:()=>_,DOMParser:()=>J,DOMSerializer:()=>se,Decoration:()=>_a,DecorationSet:()=>Fa,EditorState:()=>dt,EditorView:()=>as,Fragment:()=>s,GapCursor:()=>wd,InputRule:()=>Sc,MapResult:()=>pe,Mapping:()=>he,Mark:()=>d,MarkType:()=>G,Node:()=>D,NodeRange:()=>T,NodeSelection:()=>et,NodeType:()=>q,Plugin:()=>ft,PluginKey:()=>gt,RemoveMarkStep:()=>ke,ReplaceAroundStep:()=>Ce,ReplaceError:()=>p,ReplaceStep:()=>we,ResolvedPos:()=>S,Schema:()=>Y,Selection:()=>Ge,SelectionRange:()=>Ye,Slice:()=>f,Step:()=>ge,StepMap:()=>fe,StepResult:()=>ve,TableMap:()=>ms,TextSelection:()=>Ze,Transaction:()=>at,Transform:()=>qe,TransformError:()=>$e,__endComposition:()=>is,__parseFromClipboard:()=>rs,__serializeForClipboard:()=>ns,activeNode:()=>xn,addColSpan:()=>Ps,addColumn:()=>rl,addColumnAfter:()=>il,addColumnBefore:()=>ol,addListNodes:()=>_n,addRow:()=>cl,addRowAfter:()=>Rd,addRowBefore:()=>Dd,alignBlocks:()=>On,alignCenterRules:()=>$r,alignJustifyRules:()=>qr,alignLeftRules:()=>Kr,alignRemoveRules:()=>Ur,alignRightRules:()=>Wr,applyInlineStyle:()=>un,applyLink:()=>pn,autoJoin:()=>yr,baseKeymap:()=>Or,blockNodes:()=>gn,blockquote:()=>Sr,bold:()=>zc,buildKeymap:()=>qc,buildListKeymap:()=>Uc,bulletList:()=>Dn,canBeIndented:()=>Dr,canIndentAsListItem:()=>Tr,canInsert:()=>jt,canJoin:()=>Te,canOutdentAsListItem:()=>Mr,canSplit:()=>Ne,caretColor:()=>Wu,caretColorKey:()=>Ku,cellAround:()=>Cs,chainCommands:()=>br,changeTextBlock:()=>mn,cleanFormatting:()=>En,cleanMarks:()=>Zt,cleanTextBlockFormatting:()=>yn,closeDoubleQuote:()=>Rc,closeHistory:()=>vc,closeSingleQuote:()=>_c,colCount:()=>Ts,columnIsHeader:()=>_s,columnResizing:()=>Tl,columnResizingPluginKey:()=>Nl,convertMsLists:()=>nu,createParagraphNear:()=>or,createTable:()=>Td,deleteColumn:()=>sl,deleteRow:()=>fl,deleteSelection:()=>Wn,deleteTable:()=>Sl,domToPmDoc:()=>Tt,dropCursor:()=>bd,dropPoint:()=>Pe,ellipsis:()=>Mc,emDash:()=>Tc,exitCode:()=>rr,expandSelection:()=>qt,expandToWordWrap:()=>Ut,find:()=>Cu,findAll:()=>xu,findAt:()=>wu,findCell:()=>Ns,findWrapping:()=>Ee,fixTables:()=>tl,fixTablesKey:()=>Qs,formatBlockElements:()=>vn,gapCursor:()=>xd,getActiveMarks:()=>rn,getBlockFormats:()=>bn,getHtml:()=>Dt,getInlineStyles:()=>sn,getMark:()=>nn,getNodeFromSelection:()=>Ht,getSelectionText:()=>Vt,goToNextCell:()=>Ol,hasMark:()=>Qt,hasNode:()=>wn,hasSameMarkup:()=>Bt,history:()=>kc,htmlToFragment:()=>It,imageResizeKey:()=>Fu,imageResizing:()=>Hu,inSameTable:()=>Is,indent:()=>Rr,indentBlocks:()=>Ir,indentHtml:()=>Wt,indentRules:()=>Hn,inputRules:()=>Ec,insertImage:()=>hn,insertNode:()=>Lt,insertPoint:()=>Re,insertText:()=>fn,isAligned:()=>Sn,isInTable:()=>xs,isIndented:()=>Nr,italic:()=>Lc,joinBackward:()=>$n,joinDown:()=>Qn,joinForward:()=>Yn,joinPoint:()=>De,joinUp:()=>Zn,keydownHandler:()=>ao,keymap:()=>io,lift:()=>er,liftBlockquote:()=>Er,liftEmptyBlock:()=>ir,liftListItem:()=>Fn,liftTarget:()=>Se,link:()=>Wc,listItem:()=>Rn,listStyle:()=>zr,macBaseKeymap:()=>xr,marks:()=>Gl,mergeCells:()=>ml,moveCellForward:()=>Es,newlineInCode:()=>tr,nextCell:()=>Ms,nodes:()=>tc,openDoubleQuote:()=>Dc,openSingleQuote:()=>Pc,orderedList:()=>Mn,outdent:()=>Pr,outdentRules:()=>Kn,parentBlockFormat:()=>Cn,parseContent:()=>Mt,pasteCleanup:()=>du,pcBaseKeymap:()=>Cr,placeholder:()=>Tu,pmAddRowAfter:()=>dl,pmAddRowBefore:()=>ul,pmDocToFragment:()=>Nt,redo:()=>Cc,redoDepth:()=>Oc,removeAllMarks:()=>Jt,removeAttribute:()=>au,removeColSpan:()=>Rs,removeComments:()=>ou,removeLink:()=>dn,removeTag:()=>iu,replace:()=>Ou,replaceAll:()=>Su,replaceImageSourcesFromRtf:()=>ku,replaceStep:()=>_e,rowIsHeader:()=>ll,sanitize:()=>ru,sanitizeClassAttr:()=>su,sanitizeStyleAttr:()=>uu,selectAll:()=>cr,selectNodeBackward:()=>Un,selectNodeForward:()=>Xn,selectParentNode:()=>lr,selectTextblockEnd:()=>fr,selectTextblockStart:()=>pr,selectedLineTextOnly:()=>Kt,selectedRect:()=>nl,selectionCell:()=>Os,selectionMarks:()=>tn,setBlockType:()=>mr,setCellAttr:()=>yl,setHtml:()=>Rt,sinkListItem:()=>zn,smartQuotes:()=>Ac,spacesFix:()=>Ru,splitBlock:()=>ar,splitBlockKeepMarks:()=>sr,splitCell:()=>gl,splitCellWithType:()=>vl,splitListItem:()=>jn,strikethrough:()=>Vc,subscript:()=>Hc,superscript:()=>Kc,tableColumnResizeKey:()=>Xu,tableEditing:()=>Al,tableEditingKey:()=>ws,tableNodeTypes:()=>ks,tableNodes:()=>bs,tableResizeKey:()=>Yu,tableResizing:()=>yd,tableRowResizeKey:()=>Ju,textHighlight:()=>_u,textHighlightKey:()=>Pu,textblockTypeInputRule:()=>Fc,toggleHeader:()=>kl,toggleHeaderCell:()=>xl,toggleHeaderColumn:()=>Cl,toggleHeaderRow:()=>wl,toggleInlineFormat:()=>cn,toggleList:()=>Lr,toggleMark:()=>gr,toggleOrderedList:()=>Vr,toggleUnorderedList:()=>Br,trimWhitespace:()=>Et,underline:()=>Bc,undo:()=>wc,undoDepth:()=>xc,undoInputRule:()=>Nc,updateColumnsOnResize:()=>Il,wrapIn:()=>hr,wrapInList:()=>An,wrappingInputRule:()=>jc}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var o=n&&n!=e?this.remove(n):this,i=o.find(e),a=o.content.slice();return-1==i?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new r(a)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var o=this.remove(t),i=o.content.slice(),a=o.find(e);return i.splice(-1==a?i.length:a,0,t,n),new r(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};const o=r;function i(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),a=t.child(r);if(o!=a){if(!o.sameMarkup(a))return n;if(o.isText&&o.text!=a.text){for(let e=0;o.text[e]==a.text[e];e++)n++;return n}if(o.content.size||a.content.size){let e=i(o.content,a.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function a(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let s=e.child(--o),l=t.child(--i),c=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let e=0,t=Math.min(s.text.length,l.text.length);for(;e<t&&s.text[s.text.length-e-1]==l.text[l.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let e=a(s.content,l.content,n-1,r-1);if(e)return e}n-=c,r-=c}else n-=c,r-=c}}class s{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,o){for(let i=0,a=0;a<t;i++){let s=this.content[i],l=a+s.nodeSize;if(l>e&&!1!==n(s,r+a,o||null,i)&&s.content.size){let o=a+1;s.nodesBetween(Math.max(0,e-o),Math.min(s.content.size,t-o),n,r+o)}a=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",i=!0;return this.nodesBetween(e,t,((a,s)=>{a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf?(r?o+="function"==typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new s(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let o=0,i=0;i<t;o++){let a=this.content[o],s=i+a.nodeSize;s>e&&((i<e||s>t)&&(a=a.isText?a.cut(Math.max(0,e-i),Math.min(a.text.length,t-i)):a.cut(Math.max(0,e-i-1),Math.min(a.content.size,t-i-1))),n.push(a),r+=a.nodeSize),i=s}return new s(n,r)}cutByIndex(e,t){return e==t?s.empty:0==e&&t==this.content.length?this:new s(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new s(r,o)}addToStart(e){return new s([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new s(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return i(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return a(this,e,t,n)}findIndex(e,t=-1){if(0==e)return c(0,e);if(e==this.size)return c(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e=>e.toJSON())):null}static fromJSON(e,t){if(!t)return s.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new s(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return s.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new s(t||e,n)}static from(e){if(!e)return s.empty;if(e instanceof s)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new s([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}s.empty=new s([],0);const l={index:0,offset:0};function c(e,t){return l.index=e,l.offset=t,l}function u(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!u(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!u(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class d{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&u(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return d.none;if(e instanceof d)return[e];let t=e.slice();return t.sort(((e,t)=>e.type.rank-t.type.rank)),t}}d.none=[];class p extends Error{}class f{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=m(this.content,e+this.openStart,t);return n&&new f(n,this.openStart,this.openEnd)}removeBetween(e,t){return new f(h(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return f.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new f(s.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new f(e,n,r)}}function h(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(o==t||i.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(h(i.content,t-o-1,n-o-1)))}function m(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),a=e.maybeChild(o);if(i==t||a.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=m(a.content,t-i-1,n);return s&&e.replaceChild(o,a.copy(s))}function g(e,t,n){if(n.openStart>e.depth)throw new p("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new p("Inconsistent open depths");return v(e,t,n,0)}function v(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let a=v(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:a}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(s.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return C(i,x(e,o,a,t,r))}{let r=e.parent,o=r.content;return C(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return C(i,O(e,t,r))}function y(e,t){if(!t.type.compatibleContent(e.type))throw new p("Cannot join "+t.type.name+" onto "+e.type.name)}function b(e,t,n){let r=e.node(n);return y(r,t.node(n)),r}function k(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function w(e,t,n,r){let o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(k(e.nodeAfter,r),i++));for(let e=i;e<a;e++)k(o.child(e),r);t&&t.depth==n&&t.textOffset&&k(t.nodeBefore,r)}function C(e,t){if(!e.type.validContent(t))throw new p("Invalid content for node "+e.type.name);return e.copy(t)}function x(e,t,n,r,o){let i=e.depth>o&&b(e,t,o+1),a=r.depth>o&&b(n,r,o+1),l=[];return w(null,e,o,l),i&&a&&t.index(o)==n.index(o)?(y(i,a),k(C(i,x(e,t,n,r,o+1)),l)):(i&&k(C(i,O(e,t,o+1)),l),w(t,n,o,l),a&&k(C(a,O(n,r,o+1)),l)),w(r,null,o,l),new s(l)}function O(e,t,n){let r=[];return w(null,e,n,r),e.depth>n&&k(C(b(e,t,n+1),O(e,t,n+1)),r),w(t,null,n,r),new s(r)}f.empty=new f(s.empty,0,0);class S{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return d.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new T(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,o=t;for(let t=e;;){let{index:e,offset:i}=t.content.findIndex(o),a=o-i;if(n.push(t,e,r+i),!a)break;if(t=t.child(e),t.isText)break;o=a-1,r+=i+1}return new S(t,n,o)}static resolveCached(e,t){for(let n=0;n<E.length;n++){let r=E[n];if(r.pos==t&&r.doc==e)return r}let n=E[I]=S.resolve(e,t);return I=(I+1)%N,n}}let E=[],I=0,N=12;class T{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const M=Object.create(null);class D{constructor(e,t,n,r=d.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||s.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&u(this.attrs,t||e.defaultAttrs||M)&&d.sameSet(this.marks,n||d.none)}copy(e=null){return e==this.content?this:new D(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new D(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return f.empty;let r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i).content.cut(r.pos-a,o.pos-a);return new f(s,r.depth-i,o.depth-i)}replace(e,t,n){return g(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return S.resolveCached(this,e)}resolveNoCache(e){return S.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,(e=>(n.isInSet(e.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),P(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=s.empty,r=0,o=n.childCount){let i=this.contentMatchAt(e).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let e=r;e<o;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){if(!this.type.validContent(this.content))throw new RangeError(`Invalid content for node ${this.type.name}: ${this.content.toString().slice(0,50)}`);let e=d.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!d.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e=>e.type.name))}`);this.content.forEach((e=>e.check()))}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((e=>e.toJSON()))),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=s.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}D.prototype.text=void 0;class R extends D{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):P(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new R(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new R(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function P(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class _{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new A(e,t);if(null==n.next)return _.empty;let r=j(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);H(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let i=t[r.join(",")]=new _(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort(V);i.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return i}(H(e,0))}(function(e){let t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce(((t,n)=>t.concat(e(n,i))),[]);if("seq"!=t.type){if("star"==t.type){let a=n();return r(i,a),o(e(t.expr,a),a),[r(a)]}if("plus"==t.type){let a=n();return o(e(t.expr,i),a),o(e(t.expr,a),a),[r(a)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){let a=i;for(let r=0;r<t.min;r++){let r=n();o(e(t.expr,a),r),a=r}if(-1==t.max)o(e(t.expr,a),a);else for(let i=t.min;i<t.max;i++){let i=n();r(a,i),o(e(t.expr,a),i),a=i}return[r(a)]}if("name"==t.type)return[r(i,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let a=e(t.exprs[r],i);if(r==t.exprs.length-1)return a;o(a,i=n())}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((e=>e.to=t))}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,i=[];for(let t=0;t<e.next.length;t++){let{type:n,next:a}=e.next[t];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(a)&&r.push(a)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(i,a){let l=i.matchFragment(e,n);if(l&&(!t||l.validEnd))return s.from(a.map((e=>e.createAndFill())));for(let e=0;e<i.next.length;e++){let{type:t,next:n}=i.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(n,a.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:i,next:a}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||r.type&&!a.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),t[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map(((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r})).join("\n")}}_.empty=new _(!0);class A{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function j(e){let t=[];do{t.push(F(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function F(e){let t=[];do{t.push(z(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function z(e){let t=function(e){if(e.eat("(")){let t=j(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let e in n){let r=n[e];r.groups.indexOf(t)>-1&&o.push(r)}return 0==o.length&&e.err("No node type or group '"+t+"' found"),o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=B(e,t)}return t}function L(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function B(e,t){let n=L(e),r=n;return e.eat(",")&&(r="}"!=e.next?L(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function V(e,t){return t-e}function H(e,t){let n=[];return function t(r){let o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:i}=o[e];r||-1!=n.indexOf(i)||t(i)}}(t),n.sort(V)}function K(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function W(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(!t.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function $(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new U(e[n]);return t}class q{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=$(n.attrs),this.defaultAttrs=K(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==_.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:W(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new D(this,this.computeAttrs(e),s.from(t),d.setFrom(n))}createChecked(e=null,t,n){if(t=s.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new D(this,this.computeAttrs(e),t,d.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=s.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(s.empty,!0);return o?new D(this,e,t.append(o),d.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(null==this.markSet)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:d.none:e}static compile(e,t){let n=Object.create(null);e.forEach(((e,r)=>n[e]=new q(e,t,r)));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class U{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class G{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=$(r.attrs),this.excluded=null;let o=K(this.attrs);this.instance=o?new d(this,o):null}create(e=null){return!e&&this.instance?this.instance:new d(this,W(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,o)=>n[e]=new G(e,r++,t,o))),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class Y{constructor(e){this.cached=Object.create(null),this.spec={nodes:o.from(e.nodes),marks:o.from(e.marks||{}),topNode:e.topNode},this.nodes=q.compile(this.spec.nodes,this),this.marks=G.compile(this.spec.marks,this);let t=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw new RangeError(e+" can not be both a node and a mark");let n=this.nodes[e],r=n.spec.content||"",o=n.spec.marks;n.contentMatch=t[r]||(t[r]=_.parse(r,this.nodes)),n.inlineContent=n.contentMatch.inlineContent,n.markSet="_"==o?null:o?X(this,o.split(" ")):""!=o&&n.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:X(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof q))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new R(n,n.defaultAttrs,e,d.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return D.fromJSON(this,e)}markFromJSON(e){return d.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function X(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=r)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class J{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)})),this.normalizeLists=!this.tags.some((t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)}))}parse(e,t={}){let n=new re(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new re(this,t,!0);return n.addAll(e,t.from,t.to),f.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(oe(e,n.tag)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(e)||r.context&&!n.matchesContext(r.context)||i.length>e.length&&(61!=i.charCodeAt(e.length)||i.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach((e=>{n(e=ie(e)),e.mark=t}))}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach((e=>{n(e=ie(e)),e.node=t}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new J(e,J.schemaRules(e)))}}const Z={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Q={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ee={ol:!0,ul:!0};function te(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class ne{constructor(e,t,n,r,o,i,a){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=d.none,this.stashMarks=[],this.match=i||(4&a?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(s.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=s.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(s.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):ae(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Z.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class re{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,o=t.topNode,i=te(null,t.preserveWhitespace,0)|(n?4:0);r=o?new ne(o.type,o.attrs,d.none,d.none,!0,t.topMatch||o.type.contentMatch,i):new ne(n?null:e.schema.topNodeType,null,d.none,d.none,!0,null,i),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style"),n=t?this.readStyles(function(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(let e=0;e<n.length;e++)this.addPendingMark(n[e]);if(this.addElement(e),null!=n)for(let e=0;e<n.length;e++)this.removePendingMark(n[e],r)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();ee.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&ee.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:Q.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let t,n=this.top,i=this.needsBlock;if(Z.hasOwnProperty(r))t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),t&&this.sync(n),this.needsBlock=i}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=d.none;e:for(let n=0;n<e.length;n+=2)for(let r;;){let o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t}addElementByRule(e,t,n){let r,o,i;t.node?(o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace)):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(a)&&this.open--,i&&this.removePendingMark(i,a)}addAll(e,t,n){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(let e=0;e<t.length;e++)this.enterInner(t[e],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let i=te(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ne(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(e,a)=>{for(;e>=0;e--){let s=t[e];if(""==s){if(e==t.length-1||0==e)continue;for(;a>=o;a--)if(i(e-1,a))return!0;return!1}{let e=a>0||0==a&&r?this.nodes[a].type:n&&a>=o?n.node(a-o).type:null;if(!e||e.name!=s&&-1==e.groups.indexOf(s))return!1;a--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function oe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ie(e){let t={};for(let n in e)t[n]=e[n];return t}function ae(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],a=e=>{i.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(i.indexOf(o)<0&&a(o))return!0}};if(a(o.contentMatch))return!0}}class se{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=ce(t).createDocumentFragment());let r=n,o=[];return e.forEach((e=>{if(o.length||e.marks.length){let n=0,i=0;for(;n<o.length&&i<e.marks.length;){let t=e.marks[i];if(this.marks[t.type.name]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<e.marks.length;){let n=e.marks[i++],a=this.serializeMark(n,e.isInline,t);a&&(o.push([n,r]),r.appendChild(a.dom),r=a.contentDOM||a.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=se.renderSpec(ce(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&se.renderSpec(ce(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r,o=t[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let a=n?e.createElementNS(n,o):e.createElement(o),s=t[1],l=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s)){l=2;for(let e in s)if(null!=s[e]){let t=e.indexOf(" ");t>0?a.setAttributeNS(e.slice(0,t),e.slice(t+1),s[e]):a.setAttribute(e,s[e])}}for(let o=l;o<t.length;o++){let i=t[o];if(0===i){if(o<t.length-1||o>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:t,contentDOM:o}=se.renderSpec(e,i,n);if(a.appendChild(t),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:a,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new se(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=le(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return le(e.marks)}}function le(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ce(e){return e.document||window.document}const ue=Math.pow(2,16);function de(e){return 65535&e}class pe{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class fe{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&fe.empty)return fe.empty}recover(e){let t=0,n=de(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/ue}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,o=this.inverted?2:1,i=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let s=this.ranges[a]-(this.inverted?r:0);if(s>e)break;let l=this.ranges[a+o],c=this.ranges[a+i],u=s+l;if(e<=u){let o=s+r+((l?e==s?-1:e==u?1:t:t)<0?0:c);if(n)return o;let i=e==s?2:e==u?1:4;return(t<0?e!=s:e!=u)&&(i|=8),new pe(o,i,e==(t<0?s:u)?null:a/3+(e-s)*ue)}r+=c-l}return n?e+r:new pe(e+r,0,null)}touches(e,t){let n=0,r=de(t),o=this.inverted?2:1,i=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let a=this.ranges[t]-(this.inverted?n:0);if(a>e)break;let s=this.ranges[t+o];if(e<=a+s&&t==3*r)return!0;n+=this.ranges[t+i]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(a,a+l,s,s+c),o+=c-l}}invert(){return new fe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?fe.empty:new fe(e<0?[0,-e,0]:[0,0,e])}}fe.empty=new fe([]);class he{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new he(this.maps,this.mirror,e,t)}copy(){return new he(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror)for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new he;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let o=this.maps[n].mapResult(e,t);if(null!=o.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this.maps[t].recover(o.recover);continue}}r|=o.delInfo,e=o.pos}return n?e:new pe(e,r,null)}}const me=Object.create(null);class ge{getMap(){return fe.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=me[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in me)throw new RangeError("Duplicate use of step JSON ID "+e);return me[e]=t,t.prototype.jsonID=e,t}}class ve{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new ve(e,null)}static fail(e){return new ve(null,e)}static fromReplace(e,t,n,r){try{return ve.ok(e.replace(t,n,r))}catch(e){if(e instanceof p)return ve.fail(e.message);throw e}}}function ye(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let i=e.child(o);i.content.size&&(i=i.copy(ye(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return s.fromArray(r)}class be extends ge{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),o=new f(ye(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),r),t.openStart,t.openEnd);return ve.fromReplace(e,this.from,this.to,o)}invert(){return new ke(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new be(t.pos,n.pos,this.mark)}merge(e){return e instanceof be&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new be(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new be(t.from,t.to,e.markFromJSON(t.mark))}}ge.jsonID("addMark",be);class ke extends ge{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new f(ye(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return ve.fromReplace(e,this.from,this.to,n)}invert(){return new be(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new ke(t.pos,n.pos,this.mark)}merge(e){return e instanceof ke&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ke(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ke(t.from,t.to,e.markFromJSON(t.mark))}}ge.jsonID("removeMark",ke);class we extends ge{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&xe(e,this.from,this.to)?ve.fail("Structure replace would overwrite content"):ve.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new fe([this.from,this.to-this.from,this.slice.size])}invert(e){return new we(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new we(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof we)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?f.empty:new f(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new we(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?f.empty:new f(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new we(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new we(t.from,t.to,f.fromJSON(e,t.slice),!!t.structure)}}ge.jsonID("replace",we);class Ce extends ge{constructor(e,t,n,r,o,i,a=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=a}apply(e){if(this.structure&&(xe(e,this.from,this.gapFrom)||xe(e,this.gapTo,this.to)))return ve.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return ve.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?ve.fromReplace(e,this.from,this.to,n):ve.fail("Content does not fit in gap")}getMap(){return new fe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Ce(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new Ce(t.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ce(t.from,t.to,t.gapFrom,t.gapTo,f.fromJSON(e,t.slice),t.insert,!!t.structure)}}function xe(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let e=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function Oe(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Se(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!Oe(r,o,i))break}return null}function Ee(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}(e,t),i=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;let s=(a.length?a[a.length-1]:t).contentMatch;for(let e=r;s&&e<o;e++)s=s.matchType(n.child(e).type);return s&&s.validEnd?a:null}(r,t);return i?o.map(Ie).concat({type:t,attrs:n}).concat(i.map(Ie)):null}function Ie(e){return{type:e,attrs:null}}function Ne(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let e=o.depth-1,t=n-2;e>i;e--,t--){let n=o.node(e),i=o.index(e);if(n.type.spec.isolating)return!1;let a=n.content.cutByIndex(i,n.childCount),s=r&&r[t]||n;if(s!=n&&(a=a.replaceChild(0,s.type.create(s.attrs))),!n.canReplace(i+1,n.childCount)||!s.type.validContent(a))return!1}let s=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(s,s,l?l.type:o.node(i+1).type)}function Te(e,t){let n=e.resolve(t),r=n.index();return Me(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Me(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function De(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let o,i,a=r.index(e);if(e==r.depth?(o=r.nodeBefore,i=r.nodeAfter):n>0?(o=r.node(e+1),a++,i=r.node(e).maybeChild(a)):(o=r.node(e).maybeChild(a-1),i=r.node(e+1)),o&&!o.isTextblock&&Me(o,i)&&r.node(e).canReplace(a,a+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function Re(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}function Pe(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let e=0;e<n.openStart;e++)o=o.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,i=r.index(t)+(n>0?1:0),a=r.node(t),s=!1;if(1==e)s=a.canReplace(i,i,o);else{let e=a.contentMatchAt(i).findWrapping(o.firstChild.type);s=e&&a.canReplaceWith(i,i,e[0])}if(s)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function _e(e,t,n=t,r=f.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return Ae(o,i,r)?new we(t,n,r):new je(o,i,r).fit()}function Ae(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}ge.jsonID("replaceAround",Ce);class je{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=s.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=s.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let o=this.placed,i=n.depth,a=r.depth;for(;i&&a&&1==o.childCount;)o=o.firstChild.content,i--,a--;let s=new f(o,i,a);return e>-1?new Ce(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new we(n.pos,r.pos,s):null}findFittable(){for(let e=1;e<=2;e++)for(let t=this.unplaced.openStart;t>=0;t--){let n,r=null;t?(r=Le(this.unplaced.content,t-1).firstChild,n=r.content):n=this.unplaced.content;let o=n.firstChild;for(let n=this.depth;n>=0;n--){let i,{type:a,match:l}=this.frontier[n],c=null;if(1==e&&(o?l.matchType(o.type)||(c=l.fillBefore(s.from(o),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:t,frontierDepth:n,parent:r,inject:c};if(2==e&&o&&(i=l.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:n,parent:r,wrap:i};if(r&&l.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Le(e,t);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new f(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),0))}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Le(e,t);if(r.childCount<=1&&t>0){let o=e.size-t<=t+r.size;this.unplaced=new f(Fe(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new f(Fe(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let i=this.unplaced,a=n?n.content:i.content,l=i.openStart-e,c=0,u=[],{match:d,type:p}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)u.push(r.child(e));d=d.matchFragment(r)}let h=a.size+e-(i.content.size-i.openEnd);for(;c<a.childCount;){let e=a.child(c),t=d.matchType(e.type);if(!t)break;c++,(c>1||0==l||e.content.size)&&(d=t,u.push(Be(e.mark(p.allowedMarks(e.marks)),1==c?l:0,c==a.childCount?h:-1)))}let m=c==a.childCount;m||(h=-1),this.placed=ze(this.placed,t,s.from(u)),this.frontier[t].match=d,m&&h<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=a;e<h;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=m?0==e?f.empty:new f(Fe(i.content,e-1,1),e-1,h<0?i.openEnd:e-1):new f(Fe(i.content,e,c),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!Ve(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=Ve(e,t,r,n,o);if(i){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=Ve(e,n,r,t,!0);if(!o||o.childCount)continue e}return{depth:t,fit:i,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=ze(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=ze(this.placed,this.depth,s.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(s.empty,!0);e.childCount&&(this.placed=ze(this.placed,this.frontier.length,e))}}function Fe(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Fe(e.firstChild.content,t-1,n)))}function ze(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ze(e.lastChild.content,t-1,n)))}function Le(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Be(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Be(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(s.empty,!0)))),e.copy(r)}function Ve(e,t,n,r,o){let i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;let s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function He(e){return e.spec.defining||e.spec.definingForContent}function Ke(e,t,n,r,o){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(Ke(o.content,t+1,n,r,o)))}if(t>r){let t=o.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(s.empty,!0))}return e}function We(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}let $e=class extends Error{};$e=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},$e.prototype=Object.create(Error.prototype),$e.prototype.constructor=$e,$e.prototype.name="TransformError";class qe{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new he}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new $e(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=f.empty){let r=_e(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new f(s.from(n),0,0))}delete(e,t){return this.replace(e,t,f.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),i=e.doc.resolve(n);if(Ae(o,i,r))return e.step(new we(t,n,r));let a=We(o,e.doc.resolve(n));0==a[a.length-1]&&a.pop();let s=-(o.depth+1);a.unshift(s);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let n=o.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(e)>-1?s=e:o.before(e)==t&&a.splice(1,0,-e)}let l=a.indexOf(s),c=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=c[e].type,n=He(t);if(n&&o.node(l).type!=t)u=e;else if(n||!t.isTextblock)break}for(let t=r.openStart;t>=0;t--){let s=(t+u+1)%(r.openStart+1),d=c[s];if(d)for(let t=0;t<a.length;t++){let c=a[(t+l)%a.length],u=!0;c<0&&(u=!1,c=-c);let p=o.node(c-1),h=o.index(c-1);if(p.canReplaceWith(h,h,d.type,d.marks))return e.replace(o.before(c),u?i.after(c):n,new f(Ke(r.content,0,r.openStart,s),s,r.openEnd))}}let d=e.steps.length;for(let s=a.length-1;s>=0&&(e.replace(t,n,r),!(e.steps.length>d));s--){let e=a[s];e<0||(t=o.before(e),n=i.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=Re(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new f(s.from(r),0,0))}(this,e,t,n),this}deleteRange(e,t){return function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=We(r,o);for(let t=0;t<i.length;t++){let n=i[t],a=t==i.length-1;if(a&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),o.end(n));if(n>0&&(a||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return e.delete(r.before(n),o.after(n))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return e.delete(r.before(i),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:r,$to:o,depth:i}=t,a=r.before(i+1),l=o.after(i+1),c=a,u=l,d=s.empty,p=0;for(let e=i,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,d=s.from(r.node(e).copy(d)),p++):c--;let h=s.empty,m=0;for(let e=i,t=!1;e>n;e--)t||o.after(e+1)<o.end(e)?(t=!0,h=s.from(o.node(e).copy(h)),m++):u++;e.step(new Ce(c,u,a,l,new f(d.append(h),p,m),d.size-p,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let r=new we(t-n,t+n,f.empty,!0);e.step(r)}(this,e,t),this}wrap(e,t){return function(e,t,n){let r=s.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=s.from(n[e].type.create(n[e].attrs,r))}let o=t.start,i=t.end;e.step(new Ce(o,i,o,i,new f(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){return function(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);let a=e.mapping.slice(i),l=a.map(n,1),c=a.map(n+t.nodeSize,1);return e.step(new Ce(l,c,l+1,c-1,new f(s.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r=[]){return function(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let a=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Ce(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new f(s.from(a),0,0),1,!0))}(this,e,t,n,r),this}split(e,t=1,n){return function(e,t,n=1,r){let o=e.doc.resolve(t),i=s.empty,a=s.empty;for(let e=o.depth,t=o.depth-n,l=n-1;e>t;e--,l--){i=s.from(o.node(e).copy(i));let t=r&&r[l];a=s.from(t?t.type.create(t.attrs,a):o.node(e).copy(a))}e.step(new we(t,t,new f(i.append(a),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let o,i,a=[],s=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),d=Math.min(l+e.nodeSize,n),p=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(p)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=d:a.push(o=new ke(c,d,u[e])));i&&i.to==c?i.to=d:s.push(i=new be(c,d,r))}})),a.forEach((t=>e.step(t))),s.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,((e,a)=>{if(!e.isInline)return;i++;let s=null;if(r instanceof G){let t,n=e.marks;for(;t=r.isInSet(n);)(s||(s=[])).push(t),n=t.removeFromSet(n)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(a+e.nodeSize,n);for(let e=0;e<s.length;e++){let n,l=s[e];for(let e=0;e<o.length;e++){let t=o[e];t.step==i-1&&l.eq(o[e].style)&&(n=t)}n?(n.to=r,n.step=i):o.push({style:l,from:Math.max(a,t),to:r,step:i})}}})),o.forEach((t=>e.step(new ke(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],a=t+1;for(let t=0;t<o.childCount;t++){let s=o.child(t),l=a+s.nodeSize,c=r.matchType(s.type);if(c){r=c;for(let t=0;t<s.marks.length;t++)n.allowsMarkType(s.marks[t].type)||e.step(new ke(a,l,s.marks[t]))}else i.push(new we(a,l,f.empty));a=l}if(!r.validEnd){let t=r.fillBefore(s.empty,!0);e.replace(a,a,new f(t,0,0))}for(let t=i.length-1;t>=0;t--)e.step(i[t])}(this,e,t,n),this}}const Ue=Object.create(null);class Ge{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Ye(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=f.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let o=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){let{$from:s,$to:l}=i[a],c=e.mapping.slice(o);e.replaceRange(c.map(s.pos),c.map(l.pos),a?f.empty:t),0==a&&it(e,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:a}=r[o],s=e.mapping.slice(n),l=s.map(i.pos),c=s.map(a.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),it(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new Ze(e):ot(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let o=t<0?ot(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):ot(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new nt(e.node(0))}static atStart(e){return ot(e,e,0,0,1)||new nt(e)}static atEnd(e){return ot(e,e,e.content.size,e.childCount,-1)||new nt(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Ue[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Ue)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ue[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Ze.between(this.$anchor,this.$head).getBookmark()}}Ge.prototype.visible=!0;class Ye{constructor(e,t){this.$from=e,this.$to=t}}let Xe=!1;function Je(e){Xe||e.parent.inlineContent||(Xe=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ze extends Ge{constructor(e,t=e){Je(e),Je(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return Ge.near(n);let r=e.resolve(t.map(this.anchor));return new Ze(r.parent.inlineContent?r:n,n)}replace(e,t=f.empty){if(super.replace(e,t),t==f.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof Ze&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Qe(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ze(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=Ge.findFrom(t,n,!0)||Ge.findFrom(t,-n,!0);if(!e)return Ge.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(Ge.findFrom(e,-n,!0)||Ge.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new Ze(e,t)}}Ge.jsonID("text",Ze);class Qe{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Qe(e.map(this.anchor),e.map(this.head))}resolve(e){return Ze.between(e.resolve(this.anchor),e.resolve(this.head))}}class et extends Ge{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?Ge.near(o):new et(o)}content(){return new f(s.from(this.node),0,0)}eq(e){return e instanceof et&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new tt(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new et(e.resolve(t.anchor))}static create(e,t){return new et(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}et.prototype.visible=!1,Ge.jsonID("node",et);class tt{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new Qe(n,n):new tt(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&et.isSelectable(n)?new et(t):Ge.near(t)}}class nt extends Ge{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=f.empty){if(t==f.empty){e.delete(0,e.doc.content.size);let t=Ge.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new nt(e)}map(e){return new nt(e)}eq(e){return e instanceof nt}getBookmark(){return rt}}Ge.jsonID("all",nt);const rt={map(){return this},resolve:e=>new nt(e)};function ot(e,t,n,r,o,i=!1){if(t.inlineContent)return Ze.create(e,n);for(let a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){let r=t.child(a);if(r.isAtom){if(!i&&et.isSelectable(r))return et.create(e,n-(o<0?r.nodeSize:0))}else{let t=ot(e,r,n+o,o<0?r.childCount:0,o,i);if(t)return t}n+=r.nodeSize*o}return null}function it(e,t,n){let r=e.steps.length-1;if(r<t)return;let o,i=e.steps[r];(i instanceof we||i instanceof Ce)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==o&&(o=r)})),e.setSelection(Ge.near(e.doc.resolve(o),n)))}class at extends qe{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return d.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||d.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let o=this.storedMarks;if(!o){let e=this.doc.resolve(t);o=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(Ge.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function st(e,t){return t&&e?e.bind(t):e}class lt{constructor(e,t,n){this.name=e,this.init=st(t.init,n),this.apply=st(t.apply,n)}}const ct=[new lt("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new lt("selection",{init:(e,t)=>e.selection||Ge.atStart(t.doc),apply:e=>e.selection}),new lt("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new lt("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class ut{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=ct.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new lt(e.key,e.spec.state,e))}))}}class dt{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let o=!1;for(let i=0;i<this.config.plugins.length;i++){let a=this.config.plugins[i];if(a.spec.appendTransaction){let s=r?r[i].n:0,l=r?r[i].state:this,c=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,l,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new dt(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new at(this)}static create(e){let t=new ut(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new dt(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new ut(this.schema,e.plugins),n=t.fields,r=new dt(t);for(let t=0;t<n.length;t++){let o=n[t].name;r[o]=this.hasOwnProperty(o)?this[o]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((e=>e.toJSON()))),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new ut(e.schema,e.plugins),o=new dt(r);return r.fields.forEach((r=>{if("doc"==r.name)o.doc=D.fromJSON(e.schema,t.doc);else if("selection"==r.name)o.selection=Ge.fromJSON(o.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let i in n){let a=n[i],s=a.spec.state;if(a.key==r.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(t,i))return void(o[r.name]=s.fromJSON.call(a,e,t[i],o))}o[r.name]=r.init(e,o)}})),o}}function pt(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=pt(o,t,{})),n[r]=o}return n}class ft{constructor(e){this.spec=e,this.props={},e.props&&pt(e.props,this,this.props),this.key=e.key?e.key.key:mt("plugin")}getState(e){return e[this.key]}}const ht=Object.create(null);function mt(e){return e in ht?e+"$"+ ++ht[e]:(ht[e]=0,e+"$")}class gt{constructor(e="key"){this.key=mt(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}var vt="k-parent-node",yt="k-colgroup-data",bt="k-resizable-node",kt="k-editor-resize-handle",wt="data-dir-table-resize",Ct="data-dir-image-resize",xt=["div","ol","ul","li","table","tbody","thead","tfoot","td","th","p","tr","col","colgroup","article","main","nav","header","footer","aside","section"],Ot=function(e,t){var n=(e.ownerDocument||document).createElement(t);Array.from(e.rows).filter((function(e){return e.getAttribute(vt)===t})).forEach((function(e){e.removeAttribute(vt),n.appendChild(e)})),n.children.length&&e.appendChild(n)},St=function(e,t){var n=t.toUpperCase();e.filter((function(e){return e.nodeName===n})).forEach((function(e){Array.from(e.children).forEach((function(n){n.setAttribute(vt,t),e.parentNode&&e.parentNode.insertBefore(n,e)})),e.remove()}))},Et=function(e,t){void 0===t&&(t=xt);var n=t.join("|");return e.replace(new RegExp("\\s*(<(?:"+n+")(?:\\s[^>]*?)?>)","g"),"$1").replace(new RegExp("(<\\/(?:"+n+")(?:\\s[^>]*?)?>)\\s*","g"),"$1")},It=function(e){var t,n=document.createElement("template");if("content"in n)n.innerHTML=e,t=n.content;else{var r=(new DOMParser).parseFromString(e,"text/html");t=document.createDocumentFragment();for(var o=r.body;o&&o.firstChild;)t.appendChild(o.firstChild)}return t},Nt=function(e){var t=se.fromSchema(e.type.schema).serializeFragment(e.content);return function(e){Array.from(e.querySelectorAll("table")).forEach((function(e){Ot(e,"thead"),Ot(e,"tbody"),Ot(e,"tfoot");var t=Array.from(e.children).find((function(e){return 0===e.children.length}));t&&t.remove()}))}(t),t},Tt=function(e,t,n){return J.fromSchema(t).parse(e,n)},Mt=function(e,t,n){var r,o=It(e);return r=o,Array.from(r.querySelectorAll("table")).forEach((function(e){var t=Array.from(e.children);t.some((function(e){return"THEAD"===e.nodeName||"TFOOT"===e.nodeName}))&&(St(t,"thead"),St(t,"tbody"),St(t,"tfoot"));var n=t.find((function(e){return"COLGROUP"===e.nodeName}));n&&(e.setAttribute(yt,n.outerHTML),n.remove())})),Tt(o,t,n)},Dt=function(e){var t=Nt(e.doc),n=document.createElement("div");return n.appendChild(t),n.innerHTML},Rt=function(e,t,n){return void 0===t&&(t="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(r,o){return o(r.tr.setSelection(new nt(r.doc)).replaceSelectionWith(Mt(e,r.schema,n)).setMeta("commandName",t))}},Pt=function(){return Pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Pt.apply(this,arguments)};function _t(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create,Object.create;var At=function(e,t){var n=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};var i=e.split(/\s*;\s*/).filter((function(e){return Boolean(e)})),a=i.filter((function(e){var t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===n&&r.test(t[1]))}));return o&&a.push(n+": "+o),{style:a.join("; ")+(a.length?";":""),changed:Boolean(o)||a.length!==i.length}},jt=function(e,t){for(var n=e.selection.$from,r=n.depth;r>=0;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1},Ft=function(e){return e instanceof D?e.type.name:e.name},zt=function(e,t){return void 0===t&&(t=1),function(n){return function(e,t){return void 0===t&&(t=1),function(n){for(var r=n.$from,o=r.depth;o>0;o--){var i=r.node(o);if(e(i)&&0==(t-=1))return{depth:o,node:i}}}}((function(t){return Ft(t)===Ft(e)}),t)(n)}},Lt=function(e,t){return function(n,r){var o=n.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),r(o)}},Bt=function(e,t,n,r){var o=s.from(Mt(e,n,r)),i=s.from(Mt(t,n,r));return o.eq(i)},Vt=function(e){var t=e.selection;if(t instanceof Ze||t instanceof nt){var n=t.content().content;return n.textBetween(0,n.size)}return""},Ht=function(e){if(e.selection instanceof et)return e.selection.node},Kt=function(e){var t="",n=!1,r=e.selection,o=e.doc,i=r.$from,a=r.$to,s=r.from,l=r.to;return i.sameParent(a)&&(o.nodesBetween(s,l,(function(e){n=n||e.isLeaf&&!e.isText})),n||(t=Vt(e))),t},Wt=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},$t={before:/[^ !,?.\[\]{}()]+$/i,after:/^[^ !,?.\[\]{}()]+/i},qt=function(e,t,n){if(!n.applyToWord||!e.selection.empty)return{state:e,dispatch:t};var r=!0===n.applyToWord?$t:n.applyToWord,o=null,i=e.tr,a=e.selection,s=a.$head.nodeBefore,l=a.$head.nodeAfter;if(s&&"text"===s.type.name&&s.text&&l&&"text"===l.type.name&&l.text){var c=[];a.$head.parent.descendants((function(e,t){return c.push({node:e,pos:t}),!1}));for(var u=a.$head.parentOffset,d=c.findIndex((function(e){var t=e.node,n=e.pos;return n<=u&&n+t.nodeSize>=u})),p=c[d].node.text,f=!1,h=d-1;h>=0;h--){var m=c[h];!f&&m&&"text"===m.node.type.name?p=m.node.text+p:(f=!0,u-=m.node.nodeSize)}for(h=d+1;h<c.length&&((m=c[h])&&"text"===m.node.type.name);h++)p+=m.node.text;var g=p.substring(0,u),v=p.substring(u),y=r.before.exec(g),b=r.after.exec(v);if(y&&b){var k=y[0].length,w=b[0].length,C=o=a.from;return i.setSelection(Ze.create(e.doc,C-k,C+w)),{state:{tr:i,selection:i.selection,doc:i.doc,storedMarks:null,schema:i.doc.type.schema},dispatch:function(e){e.setSelection(Ze.create(e.doc,o)),t(e)}}}}return{state:e,dispatch:t}},Ut=function(e,t){return function(n,r,o){var i=qt(n,r,t),a=i.state,s=i.dispatch;return e(t)(a,s)}},Gt=function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,a=o.$to,s=0===i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o<t.length;o++){var i=r(o);if(i)return i.v}return!1},Yt=function(e,t,n){return function(r,o){var i=r.selection,a=i.empty,s=i.$cursor,l=i.ranges;if(a&&!s||!Gt(r.doc,l,e))return!1;if(o)if(s)e.isInSet(r.storedMarks||s.marks())?o(n.removeStoredMark(e)):o(n.addStoredMark(e.create(t)));else{for(var c=!1,u=0;!c&&u<l.length;u++){var d=l[u],p=d.$from,f=d.$to;c=r.doc.rangeHasMark(p.pos,f.pos,e)}for(u=0;u<l.length;u++){var h=l[u];p=h.$from,f=h.$to,c?n.removeMark(p.pos,f.pos,e):n.addMark(p.pos,f.pos,e.create(t))}o(n.scrollIntoView())}return!0}},Xt=function(e,t,n,r){void 0===r&&(r=null);var o=[],i=0;return e.doc.nodesBetween(t,n,(function(e,a){if(e.isInline){i++;var s=null;if(r instanceof G){var l=r.isInSet(e.marks);l&&(s=[l])}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length)for(var c=Math.min(a+e.nodeSize,n),u=0;u<s.length;u++){for(var d=s[u],p=void 0,f=0;f<o.length;f++){var h=o[f];h.step===i-1&&d.eq(h.style)&&(p=h)}p?(p.to=c,p.step=i):o.push({style:d,from:Math.max(a,t),to:c,step:i})}}})),o.forEach((function(t){return e.step(new ke(t.from,t.to,t.style))})),e},Jt=function(e){var t=(void 0===e?{}:e).except,n=void 0===t?[]:t;return function(e,t){var r,o=e.tr;Zt(o,{except:(r=n,r instanceof Array?r:[r])}),o.docChanged&&t(o)}},Zt=function(e,t){var n=t.except,r=e.doc,o=e.selection,i=r.type.schema,a=o.empty,s=o.ranges,l=(n||[]).map((function(e){return e.name}));if(!a){var c=Object.keys(i.marks).map((function(e){return i.marks[e]})).filter((function(e){return-1===l.indexOf(e.name)}));s.forEach((function(t){var n=t.$from,r=t.$to;c.forEach((function(t){return e.removeMark(n.pos,r.pos,t)}))}))}},Qt=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return r[e]})),i=t.altStyle,a=e.selection,s=a.from,l=a.$from,c=a.to,u=a.empty,d=r[t.mark],p=e.doc,f=!1;return u?(n=e.storedMarks||l.marks(),f=d&&d.isInSet(n)||o.some((function(e){return r[e].isInSet(n)}))):f=d&&p.rangeHasMark(s,c,d)||o.some((function(e){return p.rangeHasMark(s,c,r[e])})),!f&&i&&r.style?tn(e,r.style).some((function(e){return null!==en(e,i)})):Boolean(f)},en=function(e,t){for(var n=(e&&e.attrs.style||"").split(/\s*;\s*/).filter((function(e){return Boolean(e)})),r=0;r<n.length;r++){var o=n[r].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},tn=function(e,t){var n=e.selection,r=n.from,o=n.$from,i=n.to,a=n.empty,s=[];return a?s.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(r,i,(function(e){e.isInline&&s.push(t.isInSet(e.marks))})),s},nn=function(e,t){var n=tn(e,t),r=n.filter((function(e){return Boolean(e)}));return n.length===r.length?n[0]:void 0},rn=function(e,t){var n=tn(e,t),r=n.filter((function(e){return Boolean(e)}));return{hasNodesWithoutMarks:n.length!==r.length,marks:r}},on=function(e,t){var n=e.find((function(e){return"style"===e.type.name})),r=n&&n.attrs.style;return At(r,t)},an=function(e,t,n,r,o){var i=o.create({style:r.style}),a=[],s=[],l=null,c=null;return e.doc.nodesBetween(t,n,(function(e,u,d){if(e.isInline){var p=e.marks;if(!i.isInSet(p)&&d.type.allowsMarkType(i.type)){var f=Math.max(u,t),h=Math.min(u+e.nodeSize,n),m=on(p,r);if(m.changed||r.newValue){for(var g=m.changed?{style:m.style||null}:{style:[r.style]+": "+r.newValue+";"},v=o.isInSet(p)?p.find((function(e){return"style"===e.type.name})):null,y=v?Pt(Pt({},v.attrs),g):g,b=o.create(y),k=b.addToSet(p),w=0;w<p.length;w++)p[w].isInSet(k)||(l&&l.to===f&&l.mark.eq(p[w])?l.to=h:(l=new ke(f,h,p[w]),a.push(l)));var C=c&&c.to===f,x=C&&b.attrs.style===c.mark.attrs.style;C&&x?c.to=h:Object.keys(y).some((function(e){return null!==y[e]}))&&(c=new be(f,h,b),s.push(c))}}}})),a.forEach((function(t){return e.step(t)})),s.forEach((function(t){return e.step(t)})),a.length+s.length>0},sn=function(e,t){var n=e.schema.marks.style;return(n?tn(e,n):[]).map((function(e){return en(e,t)})).filter((function(e){return null!==e}))},ln=function(e,t){return function(n,r,o){var i=n.selection,a=i.empty,s=i.$cursor,l=i.ranges;if(a&&!s||!Gt(n.doc,l,e))return!1;var c,u,d,p,f=!1;if(r){var h=o||n.tr;if(s){var m=n.storedMarks||s.marks();if(e.isInSet(m)){var g=on(m,t),v=m.find((function(e){return"style"===e.type.name})),y=Pt(Pt({},v?v.attrs:{}),{style:g.style||null});if(c=v.attrs,u=y,d=Object.keys(c),p=Object.keys(u),d.length===p.length&&d.every((function(e){return c[e]===u[e]})))return!1;r(h.removeStoredMark(e)),Object.keys(y).some((function(e){return null!==y[e]}))&&r(h.addStoredMark(e.create(y))),f=!0}}else{for(var b=0;b<l.length;b++){var k=l[b],w=k.$from,C=k.$to;f=an(h,w.pos,C.pos,t,e)}f&&(h.scrollIntoView(),r(h))}}return f}},cn=function(e,t,n){return function(r,o){var i=r.schema.marks,a=e.altStyle,s=e.altMarks,l=void 0===s?[]:s,c=e.mark,u=t||r.tr,d=!1,p=!1,f=function(){return p=!0};a&&i.style&&(d=ln(i.style,{style:a.name,value:a.value})(r,f,u));var h=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([c],l).filter((function(e){return i[e]})),m=h.map((function(e){return Qt(r,{mark:e})&&i[e]})).filter((function(e){return e}));return m.length?function(e,t,n,r){var o=t.selection,i=o.$cursor,a=o.ranges;if(r=r||t.tr,i)e.forEach((function(e){e.isInSet(t.storedMarks||i.marks())&&n(r.removeStoredMark(e))}));else{for(var s=function(t){var n=a[t],o=n.$from,i=n.$to;e.forEach((function(e){Xt(r,o.pos,i.pos,e)}))},l=0;l<a.length;l++)s(l);n(r.scrollIntoView())}}(m,r,f,u):d||Yt(i[c],n,u)(r,f),p&&o(u),p}},un=function(e,t){return function(n,r){var o=n.schema.marks.style,i={style:e.style,value:/^.+$/,newValue:e.value},a=n.tr;t&&a.setMeta("commandName",t),a.setMeta("args",e);var s=n.selection,l=s.empty,c=s.$cursor,u=s.ranges;if(l&&!c||!o||!Gt(n.doc,u,o))return!1;if(c){var d=n.storedMarks||c.marks(),p=o.isInSet(d)?d.find((function(e){return"style"===e.type.name})):null,f={style:null};if(p&&p.attrs.style){var h=At(p.attrs.style,i);h.changed&&h.style&&(f.style=h.style)}else i.newValue&&(f.style=[i.style]+": "+i.newValue+";");var m=p?Pt(Pt({},p.attrs),f):f;return Object.keys(m).some((function(e){return null!==m[e]}))?r(a.addStoredMark(o.create(m))):r(a.removeStoredMark(o)),!0}return ln(o,i)(n,r,a)}},dn=function(e,t){return function(n,r){var o=n.selection.$cursor;if(o){var i=o.parent,a=o.index(),s=n.schema.marks[e.mark],l=i.child(a).marks.find((function(e){return e.type===s})),c=i.childCount,u=o.pos-o.textOffset,d=i.child(a).nodeSize,p=void 0,f=void 0;for(p=a-1;p>=0&&l.isInSet(i.child(p).marks);)d+=f=i.child(p).nodeSize,u-=f,p-=1;for(p=a+1;p<c&&l.isInSet(i.child(p).marks);)d+=i.child(p).nodeSize,p+=1;r(Xt(t||n.tr,u,u+d,l))}else cn(e,t)(n,r)}},pn=function(e,t){var n=e.mark,r=e.attrs;return void 0===t&&(t="link"),function(e,o){var i=e.schema.marks,a=e.tr;t&&(a.setMeta("commandName",t),a.setMeta("args",r));var s=!1,l=function(){return s=!0};if(function(e,t){var n=tn(e,t);return 1===n.length&&n[0]?n[0]:null}(e,i[n]))!function(e,t){return function(n,r){var o=n.selection,i=o.$cursor,a=o.from,s=o.to,l=n.schema.marks[e.mark];if(i){var c=i.parent,u=i.index(),d=c.child(u).marks.find((function(e){return e.type===l})),p=c.childCount,f=i.pos-i.textOffset,h=c.child(u).nodeSize,m=void 0,g=void 0;for(m=u-1;m>=0&&d.isInSet(c.child(m).marks);)h+=g=c.child(m).nodeSize,f-=g,m-=1;for(m=u+1;m<p&&d.isInSet(c.child(m).marks);)h+=c.child(m).nodeSize,m+=1;t.removeMark(f,f+h,l),t.addMark(f,f+h,l.create(e.attrs)),r(t)}else t.doc.nodesBetween(a,s,(function(n,o){n.isInline&&l.isInSet(n.marks)&&(t.removeMark(o,o+n.nodeSize,l),t.addMark(o,o+n.nodeSize,l.create(e.attrs)),r(t))}))}}({mark:n,attrs:r},a)(e,l);else{var c=e;Qt(e,{mark:n})&&(dn({mark:n,attrs:r},a)(e,l),c=dt.create({doc:a.doc,selection:a.selection})),s?Yt(i[n],r,a)(c,l):cn({mark:n},a,r)(c,l)}return s&&o(a),s}},fn=function(e){return function(t,n){n(t.tr.insertText(e.text,e.from,e.to))}},hn=function(e){return function(t,n){var r=t.schema.nodes.image.createAndFill(e);Lt(r)(t,(function(t){return n(t.setMeta("commandName","insertImage").setMeta("args",e))}))}},mn=function(e,t,n,r){if(!n.isTextblock)return!1;e.selection.ranges.forEach((function(o){var i=e.steps.length,a=o.$from.pos,l=o.$to.pos;e.doc.nodesBetween(a,l,(function(o,a){if(o.eq(t)&&o.isTextblock&&!o.hasMarkup(n,r)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(a),n)){e.clearIncompatible(e.mapping.slice(i).map(a,1),n);var l=e.mapping.slice(i),c=l.map(a,1),u=l.map(a+o.nodeSize,1),d=new f(s.from(n.create(r,null,o.marks)),0,0);return e.step(new Ce(c,u,c+1,u-1,d,1,!0)),!1}}))}))},gn=function(e,t){void 0===t&&(t={blocksInSelection:!1});var n=e.doc,r=e.selection,o=r.$from,i=r.ranges,a=t.blocksInSelection,s=[],l=r instanceof et?r.node:void 0;return l?l.isBlock?(s.push(l),l.nodesBetween(0,l.content.size,(function(e){e.isBlock&&s.push(e)}))):!a&&o.parent&&o.parent.isBlock&&s.push(o.parent):i.forEach((function(e){var t=e.$from.pos,r=e.$to.pos;n.nodesBetween(t,r,(function(e,n,o,i){e.isBlock&&(!a||n>=t&&n+e.content.size+2<=r)&&s.push(e)}))})),s},vn=function(e,t){return function(n,r){var o=gn(n),i=n.schema.nodes,a=n.tr;a.setMeta("commandName",t),a.setMeta("args",{value:e}),o.forEach((function(t){if(t.type.isTextblock)if("p"===e){var n=t.attrs,r=n.level,o=_t(n,["level"]);mn(a,t,i.paragraph,o)}else if(/^h[1-6]$/i.test(e))r=parseInt(e.substr(1),10),mn(a,t,i.heading,Pt(Pt({},t.attrs),{level:r}));else if("blockquote"===e){var s=t.attrs;r=s.level,o=_t(s,["level"]),mn(a,t,i.blockquote,o)}}));var s=a.docChanged;return s&&r(a.scrollIntoView()),s}},yn=function(e,t){void 0===t&&(t={blocksInSelection:!0});var n=e.doc,r=e.selection,o=t.blocksInSelection,i=t.blockNodeType;gn({doc:n,selection:r},{blocksInSelection:o}).filter((function(e){return e.isTextblock})).forEach((function(t){var n=t.attrs||{},r=n.style,o=void 0===r?"":r,a=n.class,s=void 0===a?"":a,l=_t(n,["style","class"]),c=i||t.type;(o||s||c!==t.type)&&mn(e,t,c,l)}))},bn=function(e){var t=gn(e),n=e.schema.nodes,r=[];return t.forEach((function(e){e.type===n.paragraph?r.push("p"):e.type===n.heading?r.push("h"+e.attrs.level):e.type===n.blockquote&&n.blockquote.isTextblock&&r.push("blockquote")})),r},kn=function(e,t){var n,r,o=e.attrs.style;return o&&t.forEach((function(e){r={style:e.name,value:/^.+$/,newValue:e.value},n=At(o,r),o=n.changed?n.style:o})),o=o||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:o||null})},wn=function(e,t){var n=e.selection,r=n.from,o=n.to,i=!1;return e.doc.nodesBetween(r,o,(function(e){return!(i=i||e.type===t)})),i},Cn=function(e){var t=bn(e);return 1===new Set(t).size?t[0]:null},xn=function(e){return{tag:Cn(e)||""}},On=function(e,t){return function(n,r){var o=gn(n),i=n.tr;i.setMeta("commandName",t),o.forEach((function(t){if(t.type.isTextblock){var n={},r=e.find((function(e){return e.node===t.type.name}));r&&(n=kn(t,r.style)),mn(i,t,t.type,n)}}));var a=i.docChanged;return a&&r(i.scrollIntoView()),a}},Sn=function(e,t){var n=gn(e),r=!1;return n.forEach((function(e){if(!r&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));n&&(r=n.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),r},En=function(e){return void 0===e&&(e={blocksInSelection:!0}),function(t,n){var r=t.tr,o=e.blocksInSelection,i=e.blockNodeType,a=(e.exceptMarks||[t.schema.marks.link]).filter(Boolean);Zt(r,{except:a}),yn(r,{blocksInSelection:o,blockNodeType:i});var s=r.docChanged;return s&&n&&n(r),s}};const In=["ol",0],Nn=["ul",0],Tn=["li",0],Mn={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1})}],toDOM:e=>1==e.attrs.order?In:["ol",{start:e.attrs.order},0]},Dn={parseDOM:[{tag:"ul"}],toDOM:()=>Nn},Rn={parseDOM:[{tag:"li"}],toDOM:()=>Tn,defining:!0};function Pn(e,t){let n={};for(let t in e)n[t]=e[t];for(let e in t)n[e]=t[e];return n}function _n(e,t,n){return e.append({ordered_list:Pn(Mn,{content:"list_item+",group:n}),bullet_list:Pn(Dn,{content:"list_item+",group:n}),list_item:Pn(Rn,{content:t})})}function An(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i),l=!1,c=a;if(!a)return!1;if(a.depth>=2&&o.node(a.depth-1).type.compatibleContent(e)&&0==a.startIndex){if(0==o.index(a.depth-1))return!1;let e=n.doc.resolve(a.start-2);c=new T(e,e,a.depth),a.endIndex<a.parent.childCount&&(a=new T(o,n.doc.resolve(i.end(a.depth)),a.depth)),l=!0}let u=Ee(c,e,t,a);return!!u&&(r&&r(function(e,t,n,r,o){let i=s.empty;for(let e=n.length-1;e>=0;e--)i=s.from(n[e].type.create(n[e].attrs,i));e.step(new Ce(t.start-(r?2:0),t.end,t.start,t.end,new f(i,0,0),n.length,!0));let a=0;for(let e=0;e<n.length;e++)n[e].type==o&&(a=e+1);let l=n.length-a,c=t.start+n.length-(r?2:0),u=t.parent;for(let n=t.startIndex,r=t.endIndex,o=!0;n<r;n++,o=!1)!o&&Ne(e.doc,c,l)&&(e.split(c,l),c+=2*l),c+=u.child(n).nodeSize;return e}(n.tr,a,u,l,e).scrollIntoView()),!0)}}function jn(e){return function(t,n){let{$from:r,$to:o,node:i}=t.selection;if(i&&i.isBlock||r.depth<2||!r.sameParent(o))return!1;let a=r.node(-1);if(a.type!=e)return!1;if(0==r.parent.content.size&&r.node(-1).childCount==r.indexAfter(-1)){if(3==r.depth||r.node(-3).type!=e||r.index(-2)!=r.node(-2).childCount-1)return!1;if(n){let o=s.empty,i=r.index(-1)?1:r.index(-2)?2:3;for(let e=r.depth-i;e>=r.depth-3;e--)o=s.from(r.node(e).copy(o));let a=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;o=o.append(s.from(e.createAndFill()));let l=r.before(r.depth-(i-1)),c=t.tr.replace(l,r.after(-a),new f(o,4-i,0)),u=-1;c.doc.nodesBetween(l,c.doc.content.size,((e,t)=>{if(u>-1)return!1;e.isTextblock&&0==e.content.size&&(u=t+1)})),u>-1&&c.setSelection(Ge.near(c.doc.resolve(u))),n(c.scrollIntoView())}return!0}let l=o.pos==r.end()?a.contentMatchAt(0).defaultType:null,c=t.tr.delete(r.pos,o.pos),u=l?[null,{type:l}]:void 0;return!!Ne(c.doc,r.pos,2,u)&&(n&&n(c.split(r.pos,2,u).scrollIntoView()),!0)}}function Fn(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!i&&(!n||(r.node(i.depth-1).type==e?function(e,t,n,r){let o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new Ce(i-1,a,i,a,new f(s.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new T(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const l=Se(r);return null!=l&&(t(o.lift(r,l).scrollIntoView()),!0)}(t,n,e,i):function(e,t,n){let r=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,i=n.startIndex;t>i;t--)e-=o.child(t).nodeSize,r.delete(e-1,e+1);let i=r.doc.resolve(n.start),a=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,c=n.endIndex==o.childCount,u=i.node(-1),d=i.index(-1);if(!u.canReplace(d+(l?0:1),d+1,a.content.append(c?s.empty:s.from(o))))return!1;let p=i.pos,h=p+a.nodeSize;return r.step(new Ce(p-(l?1:0),h+(c?1:0),p+1,h-1,new f((l?s.empty:s.from(o.copy(s.empty))).append(c?s.empty:s.from(o.copy(s.empty))),l?0:1,c?0:1),l?0:1)),t(r.scrollIntoView()),!0}(t,n,i)))}}function zn(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));if(!i)return!1;let a=i.startIndex;if(0==a)return!1;let l=i.parent,c=l.child(a-1);if(c.type!=e)return!1;if(n){let r=c.lastChild&&c.lastChild.type==l.type,o=s.from(r?e.create():null),a=new f(s.from(e.create(null,s.from(l.type.create(null,o)))),r?3:1,0),u=i.start,d=i.end;n(t.tr.step(new Ce(u-(r?3:1),d,u,d,a,1,!0)).scrollIntoView())}return!0}}var Ln={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},Bn={listType:Ln.orderedList,types:Pt({},Ln)},Vn={listType:Ln.bulletList,types:Pt({},Ln)},Hn={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:Pt({},Ln)},Kn={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:Pt({},Ln)};const Wn=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0),$n=(e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let o=Gn(r);if(!o){let n=r.blockRange(),o=n&&Se(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&ur(e,o,t))return!0;if(0==r.parent.content.size&&(qn(i,"end")||et.isSelectable(i))){let n=_e(e.doc,r.before(),r.after(),f.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(qn(i,"end")?Ge.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):et.create(r.doc,o.pos-i.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),0))};function qn(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}const Un=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=Gn(r)}let a=i&&i.nodeBefore;return!(!a||!et.isSelectable(a)||(t&&t(e.tr.setSelection(et.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),0))};function Gn(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}const Yn=(e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;let o=Jn(r);if(!o)return!1;let i=o.nodeAfter;if(ur(e,o,t))return!0;if(0==r.parent.content.size&&(qn(i,"start")||et.isSelectable(i))){let n=_e(e.doc,r.before(),r.after(),f.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(qn(i,"start")?Ge.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):et.create(r.doc,r.mapping.map(o.pos))),t(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),0))},Xn=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;i=Jn(r)}let a=i&&i.nodeAfter;return!(!a||!et.isSelectable(a)||(t&&t(e.tr.setSelection(et.create(e.doc,i.pos)).scrollIntoView()),0))};function Jn(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const Zn=(e,t)=>{let n,r=e.selection,o=r instanceof et;if(o){if(r.node.isTextblock||!Te(e.doc,r.from))return!1;n=r.from}else if(n=De(e.doc,r.from,-1),null==n)return!1;if(t){let r=e.tr.join(n);o&&r.setSelection(et.create(r.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(r.scrollIntoView())}return!0},Qn=(e,t)=>{let n,r=e.selection;if(r instanceof et){if(r.node.isTextblock||!Te(e.doc,r.to))return!1;n=r.to}else if(n=De(e.doc,r.to,1),null==n)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0},er=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Se(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},tr=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(t&&t(e.tr.insertText("\n").scrollIntoView()),0))};function nr(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const rr=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),a=nr(o.contentMatchAt(i));if(!a||!o.canReplaceWith(i,i,a))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,a.createAndFill());o.setSelection(Ge.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0},or=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof nt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=nr(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,a=e.tr.insert(n,i.createAndFill());a.setSelection(Ze.create(a.doc,n+1)),t(a.scrollIntoView())}return!0},ir=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(Ne(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Se(r);return null!=o&&(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},ar=(e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof et&&e.selection.node.isBlock)return!(!n.parentOffset||!Ne(e.doc,n.pos)||(t&&t(e.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(t){let o=r.parentOffset==r.parent.content.size,i=e.tr;(e.selection instanceof Ze||e.selection instanceof nt)&&i.deleteSelection();let a=0==n.depth?null:nr(n.node(-1).contentMatchAt(n.indexAfter(-1))),s=o&&a?[{type:a}]:void 0,l=Ne(i.doc,i.mapping.map(n.pos),1,s);if(s||l||!Ne(i.doc,i.mapping.map(n.pos),1,a?[{type:a}]:void 0)||(a&&(s=[{type:a}]),l=!0),l&&(i.split(i.mapping.map(n.pos),1,s),!o&&!n.parentOffset&&n.parent.type!=a)){let e=i.mapping.map(n.before()),t=i.doc.resolve(e);a&&n.node(-1).canReplaceWith(t.index(),t.index()+1,a)&&i.setNodeMarkup(i.mapping.map(n.before()),a)}t(i.scrollIntoView())}return!0},sr=(e,t)=>ar(e,t&&(n=>{let r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})),lr=(e,t)=>{let n,{$from:r,to:o}=e.selection,i=r.sharedDepth(o);return 0!=i&&(n=r.before(i),t&&t(e.tr.setSelection(et.create(e.doc,n))),!0)},cr=(e,t)=>(t&&t(e.tr.setSelection(new nt(e.doc))),!0);function ur(e,t,n){let r,o,i=t.nodeBefore,a=t.nodeAfter;if(i.type.spec.isolating||a.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(i,i+1)||!o.isTextblock&&!Te(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let l=t.parent.canReplace(t.index(),t.index()+1);if(l&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&o.matchType(r[0]||a.type).validEnd){if(n){let o=t.pos+a.nodeSize,l=s.empty;for(let e=r.length-1;e>=0;e--)l=s.from(r[e].create(null,l));l=s.from(i.copy(l));let c=e.tr.step(new Ce(t.pos-1,o,t.pos,o,new f(l,1,0),r.length,!0)),u=o+2*r.length;Te(c.doc,u)&&c.join(u),n(c.scrollIntoView())}return!0}let c=Ge.findFrom(t,1),u=c&&c.$from.blockRange(c.$to),d=u&&Se(u);if(null!=d&&d>=t.depth)return n&&n(e.tr.lift(u,d).scrollIntoView()),!0;if(l&&qn(a,"start",!0)&&qn(i,"end")){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let l=a,c=1;for(;!l.isTextblock;l=l.firstChild)c++;if(r.canReplace(r.childCount,r.childCount,l.content)){if(n){let r=s.empty;for(let e=o.length-1;e>=0;e--)r=s.from(o[e].copy(r));n(e.tr.step(new Ce(t.pos-o.length,t.pos+a.nodeSize,t.pos+c,t.pos+a.nodeSize-c,new f(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function dr(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(Ze.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}const pr=dr(-1),fr=dr(1);function hr(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i),s=a&&Ee(a,e,t);return!!s&&(r&&r(n.tr.wrap(a,s).scrollIntoView()),!0)}}function mr(e,t=null){return function(n,r){let{from:o,to:i}=n.selection,a=!1;return n.doc.nodesBetween(o,i,((r,o)=>{if(a)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)a=!0;else{let t=n.doc.resolve(o),r=t.index();a=t.parent.canReplaceWith(r,r+1,e)}})),!!a&&(r&&r(n.tr.setBlockType(o,i,e,t).scrollIntoView()),!0)}}function gr(e,t=null){return function(n,r){let{empty:o,$cursor:i,ranges:a}=n.selection;if(o&&!i||!function(e,t,n){for(let r=0;r<t.length;r++){let{$from:o,$to:i}=t[r],a=0==o.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(o.pos,i.pos,(e=>{if(a)return!1;a=e.inlineContent&&e.type.allowsMarkType(n)})),a)return!0}return!1}(n.doc,a,e))return!1;if(r)if(i)e.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let o=!1,i=n.tr;for(let t=0;!o&&t<a.length;t++){let{$from:r,$to:i}=a[t];o=n.doc.rangeHasMark(r.pos,i.pos,e)}for(let n=0;n<a.length;n++){let{$from:r,$to:s}=a[n];if(o)i.removeMark(r.pos,s.pos,e);else{let n=r.pos,o=s.pos,a=r.nodeAfter,l=s.nodeBefore,c=a&&a.isText?/^\s*/.exec(a.text)[0].length:0,u=l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+c<o&&(n+=c,o-=u),i.addMark(n,o,e.create(t))}}r(i.scrollIntoView())}return!0}}function vr(e,t){return n=>{if(!n.isGeneric)return e(n);let r=[];for(let e=0;e<n.mapping.maps.length;e++){let t=n.mapping.maps[e];for(let e=0;e<r.length;e++)r[e]=t.map(r[e]);t.forEach(((e,t,n,o)=>r.push(n,o)))}let o=[];for(let e=0;e<r.length;e+=2){let i=r[e],a=r[e+1],s=n.doc.resolve(i),l=s.sharedDepth(a),c=s.node(l);for(let e=s.indexAfter(l),n=s.after(l+1);n<=a;++e){let r=c.maybeChild(e);if(!r)break;if(e&&-1==o.indexOf(n)){let i=c.child(e-1);i.type==r.type&&t(i,r)&&o.push(n)}n+=r.nodeSize}}o.sort(((e,t)=>e-t));for(let e=o.length-1;e>=0;e--)Te(n.doc,o[e])&&n.join(o[e]);e(n)}}function yr(e,t){let n=Array.isArray(t)?e=>t.indexOf(e.type.name)>-1:t;return(t,r,o)=>e(t,r&&vr(r,n),o)}function br(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}let kr=br(Wn,$n,Un),wr=br(Wn,Yn,Xn);const Cr={Enter:br(tr,or,ir,ar),"Mod-Enter":rr,Backspace:kr,"Mod-Backspace":kr,"Shift-Backspace":kr,Delete:wr,"Mod-Delete":wr,"Mod-a":cr},xr={"Ctrl-h":Cr.Backspace,"Alt-Backspace":Cr["Mod-Backspace"],"Ctrl-d":Cr.Delete,"Ctrl-Alt-Backspace":Cr["Mod-Delete"],"Alt-Delete":Cr["Mod-Delete"],"Alt-d":Cr["Mod-Delete"],"Ctrl-a":pr,"Ctrl-e":fr};for(let e in Cr)xr[e]=Cr[e];const Or=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&"darwin"==os.platform())?xr:Cr;var Sr=function(e,t){return hr(e.schema.nodes.blockquote)(e,t)},Er=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=e.schema.nodes.blockquote,a=e.doc,s=-1,l=r.blockRange(o);l&&a.nodesBetween(l.start,l.end,(function(e,t,n,r){e.type===i&&(s=t)}));var c=-1!==s;return t&&c&&t(e.tr.lift(l,a.resolve(s).depth)),c},Ir=function(e,t,n){return function(r,o){var i=gn(r),a=r.tr;a.setMeta("commandName",t),i.forEach((function(t){if(t.type.isTextblock){var r=void 0,o=e.find((function(e){return e.node===t.type.name}));if(o){var i="rtl"===n?o.rtlStyle:o.style,s={name:i,value:o.step>0?""+o.step+o.unit:""};if(t.attrs.style){var l=new RegExp(i+":\\s?(\\d+)"+o.unit,"i"),c=t.attrs.style.match(l);if(c){var u=parseFloat(c[1])+o.step;u=u<=0?"":u,s.value=""+u+(u?o.unit:"")}}r=kn(t,[s])}r&&mn(a,t,t.type,r)}}));var s=a.docChanged;return s&&o(a.scrollIntoView()),s}},Nr=function(e,t,n){var r=gn(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));if(r){var i="rtl"===n?r.rtlStyle:r.style,a=new RegExp(i+":\\s?\\d+"+r.unit,"i");o=a.test(e.attrs.style)}}})),o},Tr=function(e,t){return zn(t)(e)},Mr=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],o=e.schema.nodes[t.listsTypes.bulletList],i=!!zt(r,2)(e.selection),a=!!zt(o,2)(e.selection);return(i||a)&&Fn(n)(e)},Dr=function(e,t){var n=e.schema.nodes,r=n[Hn.listsTypes.listItem];return(Nr(e,t.nodes)||Hn.nodes.some((function(t){return n[t.node]&&wn(e,n[t.node])})))&&!wn(e,r)},Rr=function(e,t){var n=e.schema.nodes[Hn.listsTypes.listItem],r=Dr(e,Hn);Tr(e,n)?zn(n)(e,t):r&&Ir(Hn.nodes)(e,t)},Pr=function(e,t){var n=e.schema.nodes,r=n[Kn.listsTypes.listItem],o=Dr(e,Kn);wn(e,n.blockquote)?Er(e,t):Mr(e,Kn)?Fn(r)(e,t):o&&Ir(Kn.nodes)(e,t)},_r=function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],i=e.nodes[n.orderedList],a=e.nodes[n.listItem],s=t.depth;s>0;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(r=s),l.type!==o&&l.type!==i&&l.type!==a)break}return r-1};function Ar(e,t,n,r){var o=r||e.schema.nodes.listItem,i=t.$from,a=t.$to,l=i.blockRange(a,(function(e){return e.childCount&&e.firstChild.type===o}));if(!l||l.depth<2||i.node(l.depth-1).type!==o)return n;var c=l.end,u=a.end(l.depth);return c<u&&(n.step(new Ce(c-1,u,c,u,new f(s.from(o.create(void 0,l.parent.copy())),1,0),1,!0)),l=new T(n.doc.resolve(i.pos),n.doc.resolve(u),l.depth)),n.lift(l,Se(l)).scrollIntoView()}function jr(e){return function(t,n){var r=t.tr,o=t.selection,i=o.$from,a=o.$to;return r.doc.nodesBetween(i.pos,a.pos,(function(n,o){if(n.isTextblock||"blockquote"===n.type.name||"div"===n.type.name){var i=new et(r.doc.resolve(r.mapping.map(o))),a=i.$from.blockRange(i.$to);if(!a||i.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var s=a&&Se(a);if(null==s)return!1;r.lift(a,s)}})),n&&n(r),!0}}var Fr=/list\-style\-type:\s?([\w-]+)/,zr=function(e){var t=e.style||"",n=Fr.exec(t);return n&&n[1]||""},Lr=function(e,t,n,r,o){var i=r.listType,a=r.listAttrs,s=void 0===a?{style:null}:a,l=e.selection,c=l.$from.node(l.$from.depth-2),u=l.$to.node(l.$to.depth-2);if(c&&c.type.name===i&&zr(c.attrs)===zr(s)&&u&&u.type.name===i&&zr(u.attrs)===zr(s)){var d=n.state.schema.nodes,p={bulletList:d[r.bulletList],orderedList:d[r.orderedList],listItem:d[r.listItem]},f=function(e,t){for(var n,r=t.bulletList,o=t.orderedList,i=t.listItem,a=e.depth-1;a>0;a--){var s=e.node(a);if(s.type!==r&&s.type!==o||(n=a),s.type!==r&&s.type!==o&&s.type!==i)break}return n}(l.$to,p),h=function(e,t,n,r,o,i){i||(i=e.schema.nodes.listItem);var a=!1;return o.doc.nodesBetween(t,n,(function(n,s){if(!a&&n.type===i&&s>t){a=!0;for(var l=r+3;l>r+2;){var c=o.doc.resolve(o.mapping.map(s));l=c.depth;var u=o.doc.resolve(o.mapping.map(s+n.textContent.length)),d=new Ze(c,u);o=Ar(e,d,o,i)}}})),o}(e,l.$to.pos,l.$to.end(f),f,n.state.tr,p.listItem);return h=function(e,t,n){var r=e.selection,o=r.from,i=r.to,a=e.schema.nodes,s=a.paragraph,l=a.heading,c=[];t.doc.nodesBetween(o,i,(function(e,t){e.type!==s&&e.type!==l||c.push({node:e,pos:t})}));for(var u=c.length-1;u>=0;u--){var d=c[u],p=t.doc.resolve(t.mapping.map(d.pos));if(p.depth>0){var f;f=d.node.textContent&&d.node.textContent.length>0?t.doc.resolve(t.mapping.map(d.pos+d.node.textContent.length)):t.doc.resolve(t.mapping.map(d.pos+1));var h=p.blockRange(f);h&&t.lift(h,_r(e.schema,p,n))}}return t}(e,h,r),h.setMeta("commandName",o),t(h),!0}return function(e){return function(t,n,r){if(!r)return!1;var o,i,a=(t=r.state).schema.nodes[e.listType],s=t.selection,l=s.$from,c=s.$to,u=l.node(-2),d=l.node(-3),p=function(e,t,n,r){return 0===function(e,t,n){for(var r=Array(),o=function(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var r=t.node(t.depth),o=t;t.depth>=1;)(r=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==n.indexOf(r.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));i.pos<=n.start(n.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&r.push(s),0===a)break;var l=e.resolve(i.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return r}(e,t,n).filter((function(e){return e.type!==r})).length}(t.doc,l,c,a);return(u&&u.type===a||d&&d.type===a)&&p?jr(e)(t,n):(p||(jr(e)(t,n),t=r.state),(o=a,void 0===(i=e.listAttrs)&&(i={}),yr(An(o,i),(function(e,t){return e.type===t.type&&e.type===o})))(t,n))}}(r)(e,t,n)};function Br(e,t,n){return Lr(e,t,n,Pt({listType:Vn.listType},Vn.types))}function Vr(e,t,n){return Lr(e,t,n,Pt({listType:Bn.listType},Bn.types))}for(var Hr=function(e,t){return{name:e,value:t}},Kr=[{node:"paragraph",style:[Hr("text-align","left")]},{node:"heading",style:[Hr("text-align","left")]}],Wr=[{node:"paragraph",style:[Hr("text-align","right")]},{node:"heading",style:[Hr("text-align","right")]}],$r=[{node:"paragraph",style:[Hr("text-align","center")]},{node:"heading",style:[Hr("text-align","center")]}],qr=[{node:"paragraph",style:[Hr("text-align","justify")]},{node:"heading",style:[Hr("text-align","justify")]}],Ur=[{node:"paragraph",style:[Hr("text-align","")]},{node:"heading",style:[Hr("text-align","")]}],Gr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Yr={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Xr="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Jr=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),Zr="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Qr=Jr||Xr&&+Xr[1]<57,eo=0;eo<10;eo++)Gr[48+eo]=Gr[96+eo]=String(eo);for(eo=1;eo<=24;eo++)Gr[eo+111]="F"+eo;for(eo=65;eo<=90;eo++)Gr[eo]=String.fromCharCode(eo+32),Yr[eo]=String.fromCharCode(eo);for(var to in Gr)Yr.hasOwnProperty(to)||(Yr[to]=Gr[to]);const no="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function ro(e){let t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(let e=0;e<i.length-1;e++){let a=i[e];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else if(/^s(hift)?$/i.test(a))r=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);no?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function oo(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function io(e){return new ft({props:{handleKeyDown:ao(e)}})}function ao(e){let t=function(e){let t=Object.create(null);for(let n in e)t[ro(n)]=e[n];return t}(e);return function(e,n){let r,o=function(e){var t=!(Qr&&(e.ctrlKey||e.altKey||e.metaKey)||Zr&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?Yr:Gr)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,a=t[oo(o,n,!i)];if(a&&a(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=Gr[n.keyCode])&&r!=o){let o=t[oo(r,n,!0)];if(o&&o(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){let r=t[oo(o,n,!0)];if(r&&r(e.state,e.dispatch,e))return!0}return!1}}const so="undefined"!=typeof navigator?navigator:null,lo="undefined"!=typeof document?document:null,co=so&&so.userAgent||"",uo=/Edge\/(\d+)/.exec(co),po=/MSIE \d/.exec(co),fo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(co),ho=!!(po||fo||uo),mo=po?document.documentMode:fo?+fo[1]:uo?+uo[1]:0,go=!ho&&/gecko\/(\d+)/i.test(co);go&&(/Firefox\/(\d+)/.exec(co)||[0,0])[1];const vo=!ho&&/Chrome\/(\d+)/.exec(co),yo=!!vo,bo=vo?+vo[1]:0,ko=!ho&&!!so&&/Apple Computer/.test(so.vendor),wo=ko&&(/Mobile\/\w+/.test(co)||!!so&&so.maxTouchPoints>2),Co=wo||!!so&&/Mac/.test(so.platform),xo=/Android \d/.test(co),Oo=!!lo&&"webkitFontSmoothing"in lo.documentElement.style,So=Oo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,Eo=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Io=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let No=null;const To=function(e,t,n){let r=No||(No=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},Mo=function(e,t,n,r){return n&&(Ro(e,t,n,r,-1)||Ro(e,t,n,r,1))},Do=/^(img|br|input|textarea|hr)$/i;function Ro(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Po(e))){let n=e.parentNode;if(!n||1!=n.nodeType||_o(e)||Do.test(e.nodeName)||"false"==e.contentEditable)return!1;t=Eo(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?Po(e):0}}}function Po(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function _o(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Ao=function(e){let t=e.isCollapsed;return t&&yo&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function jo(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Fo(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function zo(e,t){return"number"==typeof e?e:e[t]}function Lo(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Bo(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let a=n||e.dom;a;a=Io(a)){if(1!=a.nodeType)continue;let e=a,n=e==i.body,s=n?Fo(i):Lo(e),l=0,c=0;if(t.top<s.top+zo(r,"top")?c=-(s.top-t.top+zo(o,"top")):t.bottom>s.bottom-zo(r,"bottom")&&(c=t.bottom-s.bottom+zo(o,"bottom")),t.left<s.left+zo(r,"left")?l=-(s.left-t.left+zo(o,"left")):t.right>s.right-zo(r,"right")&&(l=t.right-s.right+zo(o,"right")),l||c)if(n)i.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let o=e.scrollLeft-n,i=e.scrollTop-r;t={left:t.left-o,top:t.top-i,right:t.right-o,bottom:t.bottom-i}}if(n)break}}function Vo(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Io(r));return t}function Ho(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:i}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Ko=null;function Wo(e,t){let n,r,o=2e8,i=0,a=t.top,s=t.top;for(let l=e.firstChild,c=0;l;l=l.nextSibling,c++){let e;if(1==l.nodeType)e=l.getClientRects();else{if(3!=l.nodeType)continue;e=To(l).getClientRects()}for(let u=0;u<e.length;u++){let d=e[u];if(d.top<=a&&d.bottom>=s){a=Math.max(d.bottom,a),s=Math.min(d.top,s);let e=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(e<o){n=l,o=e,r=e&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==l.nodeType&&e&&(i=c+(t.left>=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=Go(r,1);if(n.top!=n.bottom&&$o(t,n))return{node:e,offset:o+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:Wo(n,r)}function $o(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function qo(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let n=e.childNodes[i];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let o=e[r];if($o(t,o))return qo(n,t,o)}}if((i=(i+1)%r)==o)break}return e}function Uo(e,t){let n,r=e.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{let e=r.caretPositionFromPoint(t.left,t.top);e&&({offsetNode:n,offset:o}=e)}catch(e){}if(!n&&r.caretRangeFromPoint){let e=r.caretRangeFromPoint(t.left,t.top);e&&({startContainer:n,startOffset:o}=e)}let i,a=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!a||!e.dom.contains(1!=a.nodeType?a.parentNode:a)){let n=e.dom.getBoundingClientRect();if(!$o(t,n))return null;if(a=qo(e.dom,t,n),!a)return null}if(ko)for(let e=a;n&&e;e=Io(e))e.draggable&&(n=void 0);if(a=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(a,t),n){if(go&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let e,r=n.childNodes[o];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?i=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(i=function(e,t,n,r){let o=-1;for(let n=t;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(t.node.isBlock&&t.parent){let e=t.dom.getBoundingClientRect();if(e.left>r.left||e.top>r.top)o=t.posBefore;else{if(!(e.right<r.left||e.bottom<r.top))break;o=t.posAfter}}n=t.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,1)}(e,n,o,t))}null==i&&(i=function(e,t,n){let{node:r,offset:o}=Wo(t,n),i=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();i=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}(e,a,t));let s=e.docView.nearestDesc(a,!0);return{pos:i,inside:s?s.posAtStart-s.border:-1}}function Go(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const Yo=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Xo(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),a=Oo||go;if(3==r.nodeType){if(!a||!Yo.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let e=o,t=o,i=n<0?1:-1;return n<0&&!o?(t++,i=-1):n>=0&&o==r.nodeValue.length?(e--,i=1):n<0?e--:t++,Jo(Go(To(r,e,t),i),i<0)}{let e=Go(To(r,o,o),n);if(go&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let t=Go(To(r,o-1,o-1),-1);if(t.top==e.top){let n=Go(To(r,o,o+1),-1);if(n.top!=e.top)return Jo(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(null==i&&o&&(n<0||o==Po(r))){let e=r.childNodes[o-1];if(1==e.nodeType)return Zo(e.getBoundingClientRect(),!1)}if(null==i&&o<Po(r)){let e=r.childNodes[o];if(1==e.nodeType)return Zo(e.getBoundingClientRect(),!0)}return Zo(r.getBoundingClientRect(),n>=0)}if(null==i&&o&&(n<0||o==Po(r))){let e=r.childNodes[o-1],t=3==e.nodeType?To(e,Po(e)-(a?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return Jo(Go(t,1),!1)}if(null==i&&o<Po(r)){let e=r.childNodes[o];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?To(e,0,a?0:1):1==e.nodeType?e:null:null;if(t)return Jo(Go(t,-1),!0)}return Jo(Go(3==r.nodeType?To(r):r,-n),n>=0)}function Jo(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Zo(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Qo(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}const ei=/[\u0590-\u08ac]/;let ti=null,ni=null,ri=!1;class oi{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>Eo(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let o,i=this.getDesc(r);if(i&&(!t||i.node)){if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return i;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n,r=0,o=0;for(let t=0;r<this.children.length;r++){let n=this.children[r],i=t+n.size;if(i>e||n instanceof di){o=e-t;break}t=i}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof ii&&n.side>=0;r--);if(t<=0){let e,n=!0;for(;e=r?this.children[r-1]:null,e&&e.dom.parentNode!=this.contentDOM;r--,n=!1);return e&&t&&n&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?Eo(e.dom)+1:0}}{let e,n=!0;for(;e=r<this.children.length?this.children[r]:null,e&&e.dom.parentNode!=this.contentDOM;r++,n=!1);return e&&n&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?Eo(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let i=n,a=0;;a++){let n=this.children[a],s=i+n.size;if(-1==r&&e<=s){let o=i+n.border;if(e>=o&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,o);e=i;for(let t=a;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=Eo(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(s>t||a==this.children.length-1)){t=s;for(let e=a+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=Eo(n.dom);break}t+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=s}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let o=Math.min(e,t),i=Math.max(e,t);for(let a=0,s=0;a<this.children.length;a++){let l=this.children[a],c=s+l.size;if(o>s&&i<c)return l.setSelection(e-s-l.border,t-s-l.border,n,r);s=c}let a=this.domFromPos(e,e?-1:1),s=t==e?a:this.domFromPos(t,t?-1:1),l=n.getSelection(),c=!1;if((go||ko)&&e==t){let{node:e,offset:t}=a;if(3==e.nodeType){if(c=!(!t||"\n"!=e.nodeValue[t-1]),c&&t==e.nodeValue.length)for(let t,n=e;n;n=n.parentNode){if(t=n.nextSibling){"BR"==t.nodeName&&(a=s={node:t.parentNode,offset:Eo(t)+1});break}let e=n.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(go&&l.focusNode&&l.focusNode!=s.node&&1==l.focusNode.nodeType){let e=l.focusNode.childNodes[l.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||c&&ko)&&Mo(a.node,a.offset,l.anchorNode,l.anchorOffset)&&Mo(s.node,s.offset,l.focusNode,l.focusOffset))return;let u=!1;if((l.extend||e==t)&&!c){l.collapse(a.node,a.offset);try{e!=t&&l.extend(s.node,s.offset),u=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!u){if(e>t){let e=a;a=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(a.node,a.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){let r=n+o.border,a=i-o.border;if(e>=r&&t<=a)return this.dirty=e==n||t==i?2:1,void(e!=r||t!=a||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-r,t-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class ii extends oi{constructor(e,t,n,r){let o,i=t.type.toDOM;if("function"==typeof i&&(i=i(n,(()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r))),!t.type.spec.raw){if(1!=i.nodeType){let e=document.createElement("span");e.appendChild(i),i=e}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class ai extends oi{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class si extends oi{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let o=r.nodeViews[t.type.name],i=o&&o(t,r,n);return i&&i.dom||(i=se.renderSpec(document,t.type.spec.toDOM(t,n))),new si(e,t,i.dom,i.contentDOM||i.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=si.create(this.parent,this.mark,!0,n),o=this.children,i=this.size;t<i&&(o=Oi(o,t,i,n)),e>0&&(o=Oi(o,0,e,n));for(let e=0;e<o.length;e++)o[e].parent=r;return r.children=o,r}}class li extends oi{constructor(e,t,n,r,o,i,a,s,l){super(e,[],o,i),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=a,i&&this.updateChildren(s,l)}static create(e,t,n,r,o,i){let a,s=o.nodeViews[t.type.name],l=s&&s(t,o,(()=>a?a.parent?a.parent.posBeforeChild(a):void 0:i),n,r),c=l&&l.dom,u=l&&l.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else c||({dom:c,contentDOM:u}=se.renderSpec(document,t.type.spec.toDOM(t)));u||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let d=c;return c=bi(c,n,t),l?a=new pi(e,t,n,r,c,u||null,d,l,o,i+1):t.isText?new ui(e,t,n,r,c,d,o):new li(e,t,n,r,c,u||null,d,o,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>s.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&ki(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,o=e.composing?this.localCompositionInfo(e,t):null,i=o&&o.pos>-1?o:null,a=o&&o.pos<0,s=new Ci(this,i&&i.node);!function(e,t,n,r){let o=t.locals(e),i=0;if(0==o.length){for(let n=0;n<e.childCount;n++){let a=e.child(n);r(a,o,t.forChild(i,a),n),i+=a.nodeSize}return}let a=0,s=[],l=null;for(let c=0;;){if(a<o.length&&o[a].to==i){let e,t=o[a++];for(;a<o.length&&o[a].to==i;)(e||(e=[t])).push(o[a++]);if(e){e.sort(xi);for(let t=0;t<e.length;t++)n(e[t],c,!!l)}else n(t,c,!!l)}let u,d;if(l)d=-1,u=l,l=null;else{if(!(c<e.childCount))break;d=c,u=e.child(c++)}for(let e=0;e<s.length;e++)s[e].to<=i&&s.splice(e--,1);for(;a<o.length&&o[a].from<=i&&o[a].to>i;)s.push(o[a++]);let p=i+u.nodeSize;if(u.isText){let e=p;a<o.length&&o[a].from<e&&(e=o[a].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<p&&(l=u.cut(e-i),u=u.cut(0,e-i),p=e,d=-1)}r(u,u.isInline&&!u.isLeaf?s.filter((e=>!e.inline)):s.slice(),t.forChild(i,u),d),i=p}}(this.node,this.innerDeco,((t,o,i)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!i&&s.syncToMarks(o==this.node.childCount?d.none:this.node.child(o).marks,n,e),s.placeWidget(t,e,r)}),((t,i,l,c)=>{let u;s.syncToMarks(t.marks,n,e),s.findNodeMatch(t,i,l,c)||a&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=s.findIndexWithChild(o.node))>-1&&s.updateNodeAt(t,i,l,u,e)||s.updateNextNode(t,i,l,e,c)||s.addNode(t,i,l,e,r),r+=t.nodeSize})),s.syncToMarks([],n,e),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||2==this.dirty)&&(i&&this.protectLocalComposition(e,i),fi(this.contentDOM,this.children,e),wo&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof Ze)||n<t||r>t+this.node.content.size)return null;let o=e.domSelection(),i=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=Po(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(o.focusNode,o.focusOffset);if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,o=function(e,t,n,r){for(let o=0,i=0;o<e.childCount&&i<=r;){let a=e.child(o++),s=i;if(i+=a.nodeSize,!a.isText)continue;let l=a.text;for(;o<e.childCount;){let t=e.child(o++);if(i+=t.nodeSize,!t.isText)break;l+=t.text}if(i>=n){let e=s<r?l.lastIndexOf(t,r-s-1):-1;if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}return-1}(this.node.content,e,n-t,r-t);return o<0?null:{node:i,pos:o,text:e}}return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new ai(this,o,t,r);e.input.compositionNodes.push(i),this.children=Oi(this.children,n,n+r.length,e,i)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node)||(this.updateInner(e,t,n,r),0))}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(ki(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=vi(this.dom,this.nodeDOM,gi(this.outerDeco,this.node,t),gi(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function ci(e,t,n,r,o){return bi(r,t,e),new li(void 0,e,t,n,r,r,r,o,0)}class ui extends li{constructor(e,t,n,r,o,i,a){super(e,t,n,r,o,null,i,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node)||(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,0))}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new ui(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class di extends oi{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class pi extends li{constructor(e,t,n,r,o,i,a,s,l,c){super(e,t,n,r,o,i,a,l,c),this.spec=s}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(e,t,n);return o&&this.updateInner(e,t,n,r),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function fi(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i<t.length;i++){let a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=wi(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof si){let t=r?r.previousSibling:e.lastChild;fi(a.contentDOM,a.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=wi(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const hi=function(e){e&&(this.nodeName=e)};hi.prototype=Object.create(null);const mi=[new hi];function gi(e,t,n){if(0==e.length)return mi;let r=n?mi[0]:new hi,o=[r];for(let i=0;i<e.length;i++){let a=e[i].type.attrs;if(a){a.nodeName&&o.push(r=new hi(a.nodeName));for(let e in a){let i=a[e];null!=i&&(n&&1==o.length&&o.push(r=new hi(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+i:"style"==e?r.style=(r.style?r.style+";":"")+i:"nodeName"!=e&&(r[e]=i))}}}return o}function vi(e,t,n,r){if(n==mi&&r==mi)return t;let o=t;for(let t=0;t<r.length;t++){let i=r[t],a=n[t];if(t){let t;a&&a.nodeName==i.nodeName&&o!=e&&(t=o.parentNode)&&t.nodeName.toLowerCase()==i.nodeName||(t=document.createElement(i.nodeName),t.pmIsDeco=!0,t.appendChild(o),a=mi[0]),o=t}yi(o,a||mi[0],i)}return o}function yi(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==o.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<o.length;t++)-1==r.indexOf(o[t])&&e.classList.add(o[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function bi(e,t,n){return vi(e,e,mi,gi(t,n,1!=e.nodeType))}function ki(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function wi(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Ci{constructor(e,t){this.lock=t,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){let s;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof si)){s=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=s.node;if(l){if(l!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,o=this.stack.length>>1,i=Math.min(o,e.length);for(;r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++)if(this.top.children[t].matchesMark(e[o])){r=t;break}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=si.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(let r=this.index,o=Math.min(this.top.children.length,r+5);r<o;r++){let o=this.top.children[r];if(o.matchesNode(e,t,n)&&!this.preMatch.matched.has(o)){i=r;break}}return!(i<0||(this.destroyBetween(this.index,i),this.index++,0))}updateNodeAt(e,t,n,r,o){let i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,o){for(let i=this.index;i<this.top.children.length;i++){let a=this.top.children[i];if(a instanceof li){let s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;let l=a.dom;if((!this.lock||!(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))||e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&ki(t,a.outerDeco))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}addNode(e,t,n,r,o){this.top.children.splice(this.index++,0,li.create(this.top,e,t,n,r,o)),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new ii(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof si;)t=e,e=t.children[t.children.length-1];e&&e instanceof ui&&!/\n$/.test(e.node.text)||((ko||yo)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new di(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}function xi(e,t){return e.type.side-t.type.side}function Oi(e,t,n,r,o){let i=[];for(let a=0,s=0;a<e.length;a++){let l=e[a],c=s,u=s+=l.size;c>=n||u<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function Si(e,t=null){let n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let s,l,c=r.resolve(a);if(Ao(n)){for(s=c;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&et.isSelectable(e)&&o.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,o=t==Po(e);r||o;){if(e==n)return!0;let t=Eo(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==Po(e)}}(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;l=new et(a==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;s=r.resolve(t)}return l||(l=_i(e,s,c,"pointer"==t||e.state.selection.head<c.pos&&!i?1:-1)),l}function Ei(e){return e.editable?e.hasFocus():ji(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Ii(e,t=!1){let n=e.state.selection;if(Ri(e,n),Ei(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&yo){let t=e.domSelection(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&Mo(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,Eo(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&ho&&mo<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,o,{anchor:i,head:a}=n;!Ni||n instanceof Ze||(n.$from.parent.inlineContent||(r=Ti(e,n.from)),n.empty||n.$from.parent.inlineContent||(o=Ti(e,n.to))),e.docView.setSelection(i,a,e.root,t),Ni&&(r&&Di(r),o&&Di(o)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{Ei(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Ni=ko||yo&&bo<63;function Ti(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(ko&&o&&"false"==o.contentEditable)return Mi(o);if(!(o&&"false"!=o.contentEditable||i&&"false"!=i.contentEditable)){if(o)return Mi(o);if(i)return Mi(i)}}function Mi(e){return e.contentEditable="true",ko&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Di(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Ri(e,t){if(t instanceof et){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Pi(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Pi(e)}function Pi(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function _i(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||Ze.between(t,n,r)}function Ai(e){return(!e.editable||e.root.activeElement==e.dom)&&ji(e)}function ji(e){let t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function Fi(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&Ge.findFrom(i,t)}function zi(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Li(e,t,n){let r=e.state.selection;if(!(r instanceof Ze)){if(r instanceof et&&r.node.isInline)return zi(e,new Ze(t>0?r.$to:r.$from));{let n=Fi(e.state,t);return!!n&&zi(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=Fi(e.state,t);return!!(n&&n instanceof et)&&zi(e,n)}if(!(Co&&n.indexOf("m")>-1)){let n,o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText)return!1;let a=t<0?o.pos-i.nodeSize:o.pos;return!!(i.isAtom||(n=e.docView.descAt(a))&&!n.contentDOM)&&(et.isSelectable(i)?zi(e,new et(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):!!Oo&&zi(e,new Ze(e.state.doc.resolve(t<0?a:a+i.nodeSize))))}}function Bi(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Vi(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Hi(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=!1;for(go&&1==n.nodeType&&r<Bi(n)&&Vi(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(Vi(e))o=n,i=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(Wi(n))break;{let t=n.previousSibling;for(;t&&Vi(t);)o=n.parentNode,i=Eo(t),t=t.previousSibling;if(t)n=t,r=Bi(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?$i(e,t,n,r):o&&$i(e,t,o,i)}function Ki(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=Bi(n);for(;;)if(r<a){if(1!=n.nodeType)break;if(!Vi(n.childNodes[r]))break;o=n,i=++r}else{if(Wi(n))break;{let t=n.nextSibling;for(;t&&Vi(t);)o=t.parentNode,i=Eo(t)+1,t=t.nextSibling;if(t)n=t,r=0,a=Bi(n);else{if(n=n.parentNode,n==e.dom)break;r=a=0}}}o&&$i(e,t,o,i)}function Wi(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function $i(e,t,n,r){if(Ao(t)){let e=document.createRange();e.setEnd(n,r),e.setStart(n,r),t.removeAllRanges(),t.addRange(e)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();let{state:o}=e;setTimeout((()=>{e.state==o&&Ii(e)}),50)}function qi(e,t,n){let r=e.state.selection;if(r instanceof Ze&&!r.empty||n.indexOf("s")>-1)return!1;if(Co&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=Fi(e.state,t);if(n&&n instanceof et)return zi(e,n)}if(!o.parent.inlineContent){let n=t<0?o:i,a=r instanceof nt?Ge.near(n,t):Ge.findFrom(n,t);return!!a&&zi(e,a)}return!1}function Ui(e,t){if(!(e.state.selection instanceof Ze))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let r=e.state.tr;return t<0?r.delete(n.pos-i.nodeSize,n.pos):r.delete(n.pos,n.pos+i.nodeSize),e.dispatch(r),!0}return!1}function Gi(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Yi(e,t){let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let a=e.someProp("clipboardSerializer")||se.fromSchema(e.state.schema),s=ia(),l=s.createElement("div");l.appendChild(a.serializeFragment(r,{document:s}));let c,u=l.firstChild,d=0;for(;u&&1==u.nodeType&&(c=ra[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=s.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),d++}u=l.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:l,text:e.someProp("clipboardTextSerializer",(e=>e(t)))||t.content.textBetween(0,t.content.size,"\n\n")}}function Xi(e,t,n,r,o){let i,a,l=o.parent.type.spec.code;if(!n&&!t)return null;let c=t&&(r||l||!n);if(c){if(e.someProp("transformPastedText",(e=>{t=e(t,l||r)})),l)return t?new f(s.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):f.empty;let n=e.someProp("clipboardTextParser",(e=>e(t,o,r)));if(n)a=n;else{let n=o.marks(),{schema:r}=e.state,a=se.fromSchema(r);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=i.appendChild(document.createElement("p"));e&&t.appendChild(a.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(e=>{n=e(n)})),i=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=ia().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);if((n=o&&ra[o[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join("")),r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),Oo&&function(e){let t=e.querySelectorAll(yo?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);let u=i&&i.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let e=+d[3];e>0&&i.firstChild;e--)i=i.firstChild;if(!a){let t=e.someProp("clipboardParser")||e.someProp("domParser")||J.fromSchema(e.state.schema);a=t.parseSlice(i,{preserveWhitespace:!(!c&&!d),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Ji.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(d)a=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:o,openStart:i,openEnd:a}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;o=s.from(t.create(n[e+1],o)),i++,a++}return new f(o,i,a)}(na(a,+d[1],+d[2]),d[4]);else if(a=f.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,o=t.node(n).contentMatchAt(t.index(n)),i=[];if(e.forEach((e=>{if(!i)return;let t,n=o.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&r.length&&Qi(n,r,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=ea(i[i.length-1],r.length));let t=Zi(e,n);i.push(t),o=o.matchType(t.type),r=n}})),i)return s.from(i)}return e}(a.content,o),!0),a.openStart||a.openEnd){let e=0,t=0;for(let t=a.content.firstChild;e<a.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=a.content.lastChild;t<a.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);a=na(a,e,t)}return e.someProp("transformPasted",(e=>{a=e(a)})),a}const Ji=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Zi(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,s.from(e));return e}function Qi(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let i=Qi(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(s.from(Zi(n,e,o+1))))}}function ea(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,ea(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(s.empty,!0);return e.copy(n.append(r))}function ta(e,t,n,r,o,i){let a=t<0?e.firstChild:e.lastChild,l=a.content;return o<r-1&&(l=ta(l,t,n,r,o+1,i)),o>=n&&(l=t<0?a.contentMatchAt(0).fillBefore(l,e.childCount>1||i<=o).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(s.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(l))}function na(e,t,n){return t<e.openStart&&(e=new f(ta(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new f(ta(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const ra={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let oa=null;function ia(){return oa||(oa=document.implementation.createHTMLDocument("title"))}const aa={};let sa={};class la{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function ca(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function ua(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>da(e,t))}))}function da(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function pa(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function fa(e){return{left:e.clientX,top:e.clientY}}function ha(e,t,n,r,o){if(-1==r)return!1;let i=e.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(e.someProp(t,(t=>r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1))))return!0;return!1}function ma(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function ga(e,t,n,r){return ha(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function va(e,t,n,r){return ha(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(ma(e,Ze.create(r,0,r.content.size),"pointer"),!0);let o=r.resolve(t);for(let t=o.depth+1;t>0;t--){let n=t>o.depth?o.nodeAfter:o.node(t),i=o.before(t);if(n.inlineContent)ma(e,Ze.create(r,i+1,i+1+n.content.size),"pointer");else{if(!et.isSelectable(n))continue;ma(e,et.create(r,i),"pointer")}return!0}}(e,n,r)}function ya(e){return Sa(e)}sa.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!wa(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!xo||!yo||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!wo||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||function(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||Co&&72==n&&"c"==r?Ui(e,-1)||Hi(e):46==n||Co&&68==n&&"c"==r?Ui(e,1)||Ki(e):13==n||27==n||(37==n||Co&&66==n&&"c"==r?Li(e,-1,r)||Hi(e):39==n||Co&&70==n&&"c"==r?Li(e,1,r)||Ki(e):38==n||Co&&80==n&&"c"==r?qi(e,-1,r)||Hi(e):40==n||Co&&78==n&&"c"==r?function(e){if(!ko||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelection();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Gi(e,n,"true"),setTimeout((()=>Gi(e,n,"false")),20)}return!1}(e)||qi(e,1,r)||Ki(e):r==(Co?"m":"c")&&(66==n||73==n||89==n||90==n))}(e,n)?n.preventDefault():ca(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,jo(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},sa.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},sa.keypress=(e,t)=>{let n=t;if(wa(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Co&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof Ze&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const ba=Co?"metaKey":"ctrlKey";aa.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=ya(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[ba]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let a=e.posAtCoords(fa(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new ka(e,a,n,!!r)):("doubleClick"==i?ga:va)(e,a.pos,a.inside,n)?n.preventDefault():ca(e,"pointer"))};class ka{constructor(e,t,n,r){let o,i;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[ba],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),i=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,i=n.depth?n.before():0}const a=r?null:n.target,s=a?e.docView.nearestDesc(a,!0):null;this.target=s?s.dom:null;let{selection:l}=e.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||l instanceof et&&l.from<=i&&l.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!go||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ca(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Ii(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(fa(e))),this.allowDefault||!t?ca(this.view,"pointer"):function(e,t,n,r,o){return ha(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(o?function(e,t){if(-1==t)return!1;let n,r,o=e.state.selection;o instanceof et&&(n=o.node);let i=e.state.doc.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e);if(et.isSelectable(t)){r=n&&o.$from.depth>0&&e>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(e);break}}return null!=r&&(ma(e,et.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&et.isSelectable(r))&&(ma(e,new et(n),"pointer"),!0)}(e,n))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||ko&&this.mightDrag&&!this.mightDrag.node.isAtom||yo&&!(this.view.state.selection instanceof Ze)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(ma(this.view,Ge.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):ca(this.view,"pointer")}move(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),ca(this.view,"pointer"),0==e.buttons&&this.done()}}function wa(e,t){return!!e.composing||!!(ko&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}aa.touchdown=e=>{ya(e),ca(e,"pointer")},aa.contextmenu=e=>ya(e);const Ca=xo?5e3:-1;function xa(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>Sa(e)),t))}function Oa(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Sa(e,t=!1){if(!(xo&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Oa(e),t||e.docView&&e.docView.dirty){let t=Si(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}sa.compositionstart=sa.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),Sa(e,!0),e.markCursor=null;else if(Sa(e),go&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelection();for(let e=t.focusNode,n=t.focusOffset;e&&1==e.nodeType&&0!=n;){let r=n<0?e.lastChild:e.childNodes[n-1];if(!r)break;if(3==r.nodeType){t.collapse(r,r.nodeValue.length);break}e=r,n=-1}}e.input.composing=!0}xa(e,Ca)},sa.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,xa(e,20))};const Ea=ho&&mo<15||wo&&So<604;function Ia(e,t,n,r){let o=Xi(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,o||f.empty))))return!0;if(!o)return!1;let i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}aa.copy=sa.cut=(e,t)=>{let n=t,r=e.state.selection,o="cut"==n.type;if(r.empty)return;let i=Ea?null:n.clipboardData,a=r.content(),{dom:s,text:l}=Yi(e,a);i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},sa.paste=(e,t)=>{let n=t;if(e.composing&&!xo)return;let r=Ea?null:n.clipboardData;r&&Ia(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Ia(e,r.value,null,t):Ia(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class Na{constructor(e,t){this.slice=e,this.move=t}}const Ta=Co?"altKey":"ctrlKey";aa.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(fa(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof et?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(et.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(et.create(e.state.doc,t.posBefore)))}let a=e.state.selection.content(),{dom:s,text:l}=Yi(e,a);n.dataTransfer.clearData(),n.dataTransfer.setData(Ea?"Text":"text/html",s.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ea||n.dataTransfer.setData("text/plain",l),e.dragging=new Na(a,!n[Ta])},aa.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},sa.dragover=sa.dragenter=(e,t)=>t.preventDefault(),sa.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(fa(n));if(!o)return;let i=e.state.doc.resolve(o.pos);if(!i)return;let a=r&&r.slice;a?e.someProp("transformPasted",(e=>{a=e(a)})):a=Xi(e,n.dataTransfer.getData(Ea?"Text":"text/plain"),Ea?null:n.dataTransfer.getData("text/html"),!1,i);let s=!(!r||n[Ta]);if(e.someProp("handleDrop",(t=>t(e,n,a||f.empty,s))))return void n.preventDefault();if(!a)return;n.preventDefault();let l=a?Pe(e.state.doc,i.pos,a):i.pos;null==l&&(l=i.pos);let c=e.state.tr;s&&c.deleteSelection();let u=c.mapping.map(l),d=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,p=c.doc;if(d?c.replaceRangeWith(u,u,a.content.firstChild):c.replaceRange(u,u,a),c.doc.eq(p))return;let h=c.doc.resolve(u);if(d&&et.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new et(h));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,o)=>t=o)),c.setSelection(_i(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},aa.focus=e=>{e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&Ii(e)}),20))},aa.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},aa.beforeinput=(e,t)=>{if(yo&&xo&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,jo(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in sa)aa[e]=sa[e];function Ma(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Da{constructor(e,t){this.toDOM=e,this.spec=t||ja,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:i}=e.mapResult(t.from+r,this.side<0?-1:1);return i?null:new _a(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Da&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ma(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Ra{constructor(e,t){this.attrs=e,this.spec=t||ja}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new _a(o,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Ra&&Ma(this.attrs,e.attrs)&&Ma(this.spec,e.spec)}static is(e){return e.type instanceof Ra}destroy(){}}class Pa{constructor(e,t){this.attrs=e,this.spec=t||ja}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new _a(o.pos-n,i.pos-n,this)}valid(e,t){let n,{index:r,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(n=e.child(r)).isText&&o+n.nodeSize==t.to}eq(e){return this==e||e instanceof Pa&&Ma(this.attrs,e.attrs)&&Ma(this.spec,e.spec)}destroy(){}}class _a{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new _a(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new _a(e,e,new Da(t,n))}static inline(e,t,n,r){return new _a(e,t,new Ra(n,r))}static node(e,t,n,r){return new _a(e,t,new Pa(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Ra}}const Aa=[],ja={};class Fa{constructor(e,t){this.local=e.length?e:Aa,this.children=t.length?t:Aa}static create(e,t){return t.length?Ka(t,e,0,ja):za}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,o){for(let i=0;i<this.local.length;i++){let a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let a=this.children[i]+1;this.children[i+2].findInner(e-a,t-a,n,r+a,o)}}map(e,t,n){return this==za||0==e.maps.length?this:this.mapInner(e,t,0,0,n||ja)}mapInner(e,t,n,r,o){let i;for(let a=0;a<this.local.length;a++){let s=this.local[a].map(e,n,r);s&&s.type.valid(t,s)?(i||(i=[])).push(s):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(e,t,n,r,o,i,a){let s=e.slice(),l=(e,t,n,r)=>{for(let a=0;a<s.length;a+=3){let l,c=s[a+1];if(c<0||e>c+i)continue;let u=s[a]+i;t>=u?s[a+1]=e<=u?-2:-1:n>=o&&(l=r-n-(t-e))&&(s[a]+=l,s[a+1]+=l)}};for(let e=0;e<n.maps.length;e++)n.maps[e].forEach(l);let c=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(-2==s[t+1]){c=!0,s[t+1]=-1;continue}let l=n.map(e[t]+i),u=l-o;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+i,-1)-o,{index:p,offset:f}=r.content.findIndex(u),h=r.maybeChild(p);if(h&&f==u&&f+h.nodeSize==d){let r=s[t+2].mapInner(n,h,l+1,e[t]+i+1,a);r!=za?(s[t]=u,s[t+1]=d,s[t+2]=r):(s[t+1]=-2,c=!0)}else c=!0}if(c){let l=function(e,t,n,r,o,i,a){function s(e,t){for(let i=0;i<e.local.length;i++){let s=e.local[i].map(r,o,t);s?n.push(s):a.onRemove&&a.onRemove(e.local[i].spec)}for(let n=0;n<e.children.length;n+=3)s(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&s(e[n+2],t[n]+i+1);return n}(s,e,t,n,o,i,a),c=Ka(l,r,0,a);t=c.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new Fa(t.sort(Wa),s)}(this.children,i||[],e,t,n,r,o):i?new Fa(i.sort(Wa),Aa):za}add(e,t){return t.length?this==za?Fa.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,o=0;e.forEach(((e,i)=>{let a,s=i+n;if(a=Va(t,e,s)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(e,a,s+1):r.splice(o,0,i,i+e.nodeSize,Ka(a,e,s+1,ja)),o+=3}}));let i=Ba(o?Ha(t):t,-n);for(let t=0;t<i.length;t++)i[t].type.valid(e,i[t])||i.splice(t--,1);return new Fa(i.length?this.local.concat(i).sort(Wa):this.local,r||this.children)}remove(e){return 0==e.length||this==za?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let o,i=n[r]+t,a=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>i&&t.to<a&&(e[n]=null,(o||(o=[])).push(t));if(!o)continue;n==this.children&&(n=this.children.slice());let s=n[r+2].removeInner(o,i+1);s!=za?n[r+2]=s:(n.splice(r,3),r-=3)}if(r.length)for(let n,o=0;o<e.length;o++)if(n=e[o])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Fa(r,n):za}forChild(e,t){if(this==za)return this;if(t.isLeaf)return Fa.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let o=e+1,i=o+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<i&&t.to>o&&t.type instanceof Ra){let e=Math.max(o,t.from)-o,n=Math.min(i,t.to)-o;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new Fa(r.sort(Wa),Aa);return n?new La([e,n]):e}return n||za}eq(e){if(this==e)return!0;if(!(e instanceof Fa)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return $a(this.localsInner(e))}localsInner(e){if(this==za)return Aa;if(e.inlineContent||!this.local.some(Ra.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Ra||t.push(this.local[e]);return t}}Fa.empty=new Fa([],[]),Fa.removeOverlap=$a;const za=Fa.empty;class La{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,ja)));return La.from(n)}forChild(e,t){if(t.isLeaf)return Fa.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,t);o!=za&&(o instanceof La?n=n.concat(o.members):n.push(o))}return La.from(n)}eq(e){if(!(e instanceof La)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?$a(n?t:t.sort(Wa)):Aa}static from(e){switch(e.length){case 0:return za;case 1:return e[0];default:return new La(e)}}}function Ba(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new _a(o.from+t,o.to+t,o.type))}return n}function Va(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let t,i=0;i<e.length;i++)(t=e[i])&&t.from>n&&t.to<r&&((o||(o=[])).push(t),e[i]=null);return o}function Ha(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Ka(e,t,n,r){let o=[],i=!1;t.forEach(((t,a)=>{let s=Va(e,t,a+n);if(s){i=!0;let e=Ka(s,t,n+a+1,r);e!=za&&o.push(a,a+t.nodeSize,e)}}));let a=Ba(i?Ha(e):e,-n).sort(Wa);for(let e=0;e<a.length;e++)a[e].type.valid(t,a[e])||(r.onRemove&&r.onRemove(a[e].spec),a.splice(e--,1));return a.length||o.length?new Fa(a,o):za}function Wa(e,t){return e.from-t.from||e.to-t.to}function $a(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),qa(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),qa(t,o+1,i.copy(r.to,i.to)))}}return t}function qa(e,t,n){for(;t<e.length&&Wa(n,e[t])>0;)t++;e.splice(t,0,n)}function Ua(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=za&&t.push(r)})),e.cursorWrapper&&t.push(Fa.create(e.state.doc,[e.cursorWrapper.deco])),La.from(t)}const Ga={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ya=ho&&mo<=11;class Xa{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Ja{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Xa,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);ho&&mo<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Ya&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Ga)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Ai(this.view)){if(this.suppressingSelectionUpdates)return Ii(this.view);if(ho&&mo<=11&&!this.view.state.selection.empty){let e=this.view.domSelection();if(e.focusNode&&Mo(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelection())}ignoreSelectionChange(e){if(0==e.rangeCount)return!0;let t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){if(!this.view.docView||this.flushingSoon>-1)return;let e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);let t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Ai(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(let t=0;t<e.length;t++){let n=this.registerMutation(e[t],a);n&&(r=r<0?n.from:Math.min(n.from,r),o=o<0?n.to:Math.max(n.to,o),n.typeOver&&(i=!0))}if(go&&a.length>1){let e=a.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}var s;(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),s=this.view,Za||(Za=!0,"normal"==getComputedStyle(s.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."))),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Ii(this.view),this.currentSelection.set(t))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++)t.push(e.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,o=e.nextSibling;if(ho&&mo<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:i}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!i||Array.prototype.indexOf.call(e.addedNodes,i)<0)&&(o=i)}let i=r&&r.parentNode==e.target?Eo(r)+1:0,a=n.localPosFromDOM(e.target,i,-1),s=o&&o.parentNode==e.target?Eo(o):e.target.childNodes.length;return{from:a,to:n.localPosFromDOM(e.target,s,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let Za=!1;function Qa(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(ko&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||ko&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function es(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:_i(e,t.resolve(n.anchor),t.resolve(n.head))}function ts(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,o++}return o}const ns=Yi,rs=Xi,is=Sa;class as{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new la,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(ds),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=cs(this),ls(this),this.nodeViews=us(this),this.docView=ci(this.state.doc,ss(this),Ua(this),this.dom,this),this.domObserver=new Ja(this,((e,t,n,r)=>function(e,t,n,r,o){if(t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Si(e,t);if(n&&!e.state.selection.eq(n)){let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.dispatch(r)}return}let i=e.state.doc.resolve(t),a=i.sharedDepth(n);t=i.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l=e.state.selection,c=function(e,t,n){let r,{node:o,fromOffset:i,toOffset:a,from:s,to:l}=e.docView.parseRange(t,n),c=e.domSelection(),u=c.anchorNode;if(u&&e.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:c.anchorOffset}],Ao(c)||r.push({node:c.focusNode,offset:c.focusOffset})),yo&&8===e.input.lastKeyCode)for(let e=a;e>i;e--){let t=o.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){a=e;break}if(!n||n.size)break}let d=e.state.doc,p=e.someProp("domParser")||J.fromSchema(e.state.schema),f=d.resolve(s),h=null,m=p.parse(o,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:i,to:a,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:r,ruleFromNode:Qa,context:f});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),h={anchor:e+s,head:t+s}}return{doc:m,sel:h,from:s,to:l}}(e,t,n);if(yo&&e.cursorWrapper&&c.sel&&c.sel.anchor==e.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let t=e.cursorWrapper.deco.type.toDOM.nextSibling,n=t&&t.nodeValue?t.nodeValue.length:1;c.sel={anchor:c.sel.anchor+n,head:c.sel.anchor+n}}let u,d,p=e.state.doc,f=p.slice(c.from,c.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(u=e.state.selection.to,d="end"):(u=e.state.selection.from,d="start"),e.input.lastKeyCode=null;let h=function(e,t,n,r,o){let i=e.findDiffStart(t,n);if(null==i)return null;let{a,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);return"end"==o&&(r-=a+Math.max(0,i-Math.min(a,s))-i),a<i&&e.size<t.size?(i-=r<=i&&r>=a?i-r:0,s=i+(s-a),a=i):s<i&&(i-=r<=i&&r>=s?i-r:0,a=i+(a-s),s=i),{start:i,endA:a,endB:s}}(f.content,c.doc.content,c.from,u,d);if((wo&&e.input.lastIOSEnter>Date.now()-225||xo)&&o.some((e=>"DIV"==e.nodeName||"P"==e.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",(t=>t(e,jo(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!h){if(!(r&&l instanceof Ze&&!l.empty&&l.$head.sameParent(l.$anchor))||e.composing||c.sel&&c.sel.anchor!=c.sel.head){if(c.sel){let t=es(e,e.state.doc,c.sel);t&&!t.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(t))}return}h={start:l.from,endA:l.to,endB:l.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof Ze&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=c.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),ho&&mo<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>c.from&&"  "==c.doc.textBetween(h.start-c.from-1,h.start-c.from+1)&&(h.start--,h.endA--,h.endB--);let m,g=c.doc.resolveNoCache(h.start-c.from),v=c.doc.resolveNoCache(h.endB-c.from),y=p.resolve(h.start),b=g.sameParent(v)&&g.parent.inlineContent&&y.end()>=h.endA;if((wo&&e.input.lastIOSEnter>Date.now()-225&&(!b||o.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!b&&g.pos<c.doc.content.size&&(m=Ge.findFrom(c.doc.resolve(g.pos+1),1,!0))&&m.head==v.pos)&&e.someProp("handleKeyDown",(t=>t(e,jo(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>h.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||ts(r,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=e.resolve(ts(i,!0,!0));return!(!a.parent.isTextblock||a.pos>n||ts(a,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(p,h.start,h.endA,g,v)&&e.someProp("handleKeyDown",(t=>t(e,jo(8,"Backspace")))))return void(xo&&yo&&e.domObserver.suppressSelectionUpdates());yo&&xo&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),xo&&!b&&g.start()!=v.start()&&0==v.parentOffset&&g.depth==v.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==h.endA&&(h.endB-=2,v=c.doc.resolveNoCache(h.endB-c.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,jo(13,"Enter"))}))}),20));let k,w,C,x=h.start,O=h.endA;if(b)if(g.pos==v.pos)ho&&mo<=11&&0==g.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Ii(e)),20)),k=e.state.tr.delete(x,O),w=p.resolve(h.start).marksAcross(p.resolve(h.endA));else if(h.endA==h.endB&&(C=function(e,t){let n,r,o,i=e.firstChild.marks,a=t.firstChild.marks,l=i,c=a;for(let e=0;e<a.length;e++)l=a[e].removeFromSet(l);for(let e=0;e<i.length;e++)c=i[e].removeFromSet(c);if(1==l.length&&0==c.length)r=l[0],n="add",o=e=>e.mark(r.addToSet(e.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",o=e=>e.mark(r.removeFromSet(e.marks))}let u=[];for(let e=0;e<t.childCount;e++)u.push(o(t.child(e)));if(s.from(u).eq(e))return{mark:r,type:n}}(g.parent.content.cut(g.parentOffset,v.parentOffset),y.parent.content.cut(y.parentOffset,h.endA-y.start()))))k=e.state.tr,"add"==C.type?k.addMark(x,O,C.mark):k.removeMark(x,O,C.mark);else if(g.parent.child(g.index()).isText&&g.index()==v.index()-(v.textOffset?0:1)){let t=g.parent.textBetween(g.parentOffset,v.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,x,O,t))))return;k=e.state.tr.insertText(t,x,O)}if(k||(k=e.state.tr.replace(x,O,c.doc.slice(h.start-c.from,h.endB-c.from))),c.sel){let t=es(e,k.doc,c.sel);t&&!(yo&&xo&&e.composing&&t.empty&&(h.start!=h.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==x||t.head==k.mapping.map(O)-1)||ho&&t.empty&&t.head==x)&&k.setSelection(t)}w&&k.ensureMarks(w),e.dispatch(k.scrollIntoView())}(this,e,t,n,r))),this.domObserver.start(),function(e){for(let t in aa){let n=aa[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!pa(e,t)||da(e,t)||!e.editable&&t.type in sa||n(e,t)})}ko&&e.dom.addEventListener("input",(()=>null)),ua(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&ua(this),this._props=e,e.plugins&&(e.plugins.forEach(ds),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}updateStateInner(e,t){let n=this.state,r=!1,o=!1;if(e.storedMarks&&this.composing&&(Oa(this),o=!0),this.state=e,t){let e=us(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,r=!0),ua(this)}this.editable=cs(this),ls(this);let i=Ua(this),a=ss(this),s=t?"reset":e.scrollToSelection>n.scrollToSelection?"to selection":"preserve",l=r||!this.docView.matchesNode(e.doc,a,i);!l&&e.selection.eq(n.selection)||(o=!0);let c="preserve"==s&&o&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){let r=e.root.elementFromPoint(i,a);if(!r||r==e.dom||!e.dom.contains(r))continue;let s=r.getBoundingClientRect();if(s.top>=o-20){t=r,n=s.top;break}}return{refDOM:t,refTop:n,stack:Vo(e.dom)}}(this);if(o){this.domObserver.stop();let t=l&&(ho||yo)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(n.selection,e.selection);if(l){let n=yo?this.trackWrites=this.domSelection().focusNode:null;!r&&this.docView.update(e.doc,a,i,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ci(e.doc,a,i,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return Mo(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Ii(this,t):(Ri(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(n),"reset"==s)this.dom.scrollTop=0;else if("to selection"==s){let t=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(e.selection instanceof et){let n=this.docView.domAfterPos(e.selection.from);1==n.nodeType&&Bo(this,n.getBoundingClientRect(),t)}else Bo(this,this.coordsAtPos(e.selection.head,1),t)}else c&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;Ho(n,0==r?0:r-t)}(c)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let o=this.directPlugins[r].props[e];if(null!=o&&(n=t?t(o):o))return n}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let i=o[r].props[e];if(null!=i&&(n=t?t(i):i))return n}}hasFocus(){return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(Ko)return e.focus(Ko);let t=Vo(e);e.focus(null==Ko?{get preventScroll(){return Ko={preventScroll:!0},!0}}:void 0),Ko||(Ko=!1,Ho(t,0))}(this.dom),Ii(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return e||document}posAtCoords(e){return Uo(this,e)}coordsAtPos(e,t=1){return Xo(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function(e,t,n){return ti==t&&ni==n?ri:(ti=t,ni=n,ri="up"==n||"down"==n?function(e,t,n){let r=t.selection,o="up"==n?r.$from:r.$to;return Qo(e,t,(()=>{let{node:t}=e.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.dom;break}t=n.dom.parentNode}let r=Xo(e,o.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=To(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let o=t[e];if(o.bottom>o.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return ei.test(r.parent.textContent)&&s.modify?Qo(e,t,(()=>{let t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");let l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),l})):"left"==n||"backward"==n?i:a}(e,t,n))}(this,t||this.state,e)}destroy(){this.docView&&(function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ua(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){da(e,t)||!aa[t.type]||!e.editable&&t.type in sa||aa[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelection(){return this.root.getSelection()}}function ss(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e&&(t.class+=" "+n[e]),"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),[_a.node(0,e.state.doc.content.size,t)]}function ls(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:_a.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function cs(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function us(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function ds(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}let ps,fs;if("undefined"!=typeof WeakMap){let e=new WeakMap;ps=t=>e.get(t),fs=(t,n)=>(e.set(t,n),n)}else{let e=[],t=10,n=0;ps=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},fs=(r,o)=>(n==t&&(n=0),e[n++]=r,e[n++]=o)}class hs{constructor(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r}}class ms{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,o=t/this.width|0,i=r+1,a=o+1;for(let e=1;i<this.width&&this.map[t+e]==n;e++)i++;for(let e=1;a<this.height&&this.map[t+this.width*e]==n;e++)a++;return new hs(r,o,i,a)}throw new RangeError("No cell with offset "+e+" found")}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError("No cell with offset "+e+" found")}nextCell(e,t,n){let{left:r,right:o,top:i,bottom:a}=this.findCell(e);return"horiz"==t?(n<0?0==r:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?0==i:a==this.height)?null:this.map[r+this.width*(n<0?i-1:a)]}rectBetween(e,t){let{left:n,right:r,top:o,bottom:i}=this.findCell(e),{left:a,right:s,top:l,bottom:c}=this.findCell(t);return new hs(Math.min(n,a),Math.min(o,l),Math.max(r,s),Math.max(i,c))}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){let i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,o==e.left&&o&&this.map[i-1]==a||r==e.top&&r&&this.map[i-this.width]==a||t.push(a))}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){let i=o+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<o;)n++;return n==r?i-1:this.map[n]}o=i}}static get(e){return ps(e)||fs(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);let t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let o=e.child(r),i=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let o=n.child(e);t+o.attrs.rowspan>r&&(i+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){let t=o.child(e);i+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,a=[];for(let e=0,o=t*n;e<o;e++)r[e]=0;for(let s=0,l=0;s<n;s++){let c=e.child(s);l++;for(let e=0;;e++){for(;o<r.length&&0!=r[o];)o++;if(e==c.childCount)break;let u=c.child(e),{colspan:d,rowspan:p,colwidth:f}=u.attrs;for(let e=0;e<p;e++){if(e+s>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:l,n:p-e});break}let c=o+e*t;for(let e=0;e<d;e++){0==r[c+e]?r[c+e]=l:(i||(i=[])).push({type:"collision",row:s,pos:l,n:d-e});let n=f&&f[e];if(n){let r=(c+e)%t*2,o=a[r];null==o||o!=n&&1==a[r+1]?(a[r]=n,a[r+1]=1):o==n&&a[r+1]++}}}o+=d,l+=u.nodeSize}let u=(s+1)*t,d=0;for(;o<u;)0==r[o++]&&d++;d&&(i||(i=[])).push({type:"missing",row:s,n:d}),l++}let s=new ms(t,n,r,i),l=!1;for(let e=0;!l&&e<a.length;e+=2)null!=a[e]&&a[e+1]<n&&(l=!0);return l&&function(e,t,n){e.problems||(e.problems=[]);for(let r=0,o={};r<e.map.length;r++){let i=e.map[r];if(o[i])continue;o[i]=!0;let a=n.nodeAt(i),s=null;for(let n=0;n<a.attrs.colspan;n++){let o=t[(r+n)%e.width*2];null==o||a.attrs.colwidth&&a.attrs.colwidth[n]==o||((s||(s=gs(a.attrs)))[n]=o)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}(s,a,e),s}(e))}}function gs(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function vs(e,t){let n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((e=>Number(e))):null,o=Number(e.getAttribute("colspan")||1),i={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==o?r:null};for(let n in t){let r=t[n].getFromDOM,o=r&&r(e);null!=o&&(i[n]=o)}return i}function ys(e,t){let n={};1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(let r in t){let o=t[r].setDOMAttr;o&&o(e.attrs[r],n)}return n}function bs(e){let t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(let e in t)n[e]={default:t[e].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:()=>["table",["tbody",0]]},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:()=>["tr",0]},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:e=>vs(e,t)}],toDOM:e=>["td",ys(e,t),0]},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:e=>vs(e,t)}],toDOM:e=>["th",ys(e,t),0]}}}function ks(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}}return t}const ws=new gt("selectingCells");function Cs(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function xs(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function Os(e){let t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:Cs(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}(t.$head)}function Ss(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function Es(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Is(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Ns(e){return ms.get(e.node(-1)).findCell(e.pos-e.start(-1))}function Ts(e){return ms.get(e.node(-1)).colCount(e.pos-e.start(-1))}function Ms(e,t,n){let r=e.start(-1),o=ms.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function Ds(e,t,n){let r={};for(let t in e)r[t]=e[t];return r[t]=n,r}function Rs(e,t,n=1){let r=Ds(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((e=>e>0))||(r.colwidth=null)),r}function Ps(e,t,n=1){let r=Ds(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}function _s(e,t,n){let r=ks(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0}class As extends Ge{constructor(e,t=e){let n=e.node(-1),r=ms.get(n),o=e.start(-1),i=r.rectBetween(e.pos-o,t.pos-o),a=e.node(0),s=r.cellsInRect(i).filter((e=>e!=t.pos-o));s.unshift(t.pos-o);let l=s.map((e=>{let t=n.nodeAt(e),r=e+o+1;return new Ye(a.resolve(r),a.resolve(r+t.content.size))}));super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(e,t){let n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(Ss(n)&&Ss(r)&&Is(n,r)){let e=this.$anchorCell.node(-1)!=n.node(-1);return e&&this.isRowSelection()?As.rowSelection(n,r):e&&this.isColSelection()?As.colSelection(n,r):new As(n,r)}return Ze.between(n,r)}content(){let e=this.$anchorCell.node(-1),t=ms.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[];for(let n=r.top;n<r.bottom;n++){let a=[];for(let i=n*t.width+r.left,s=r.left;s<r.right;s++,i++){let n=t.map[i];if(!o[n]){o[n]=!0;let i=t.findCell(n),s=e.nodeAt(n),l=r.left-i.left,c=i.right-r.right;if(l>0||c>0){let e=s.attrs;l>0&&(e=Rs(e,0,l)),c>0&&(e=Rs(e,e.colspan-c,c)),s=i.left<r.left?s.type.createAndFill(e):s.type.create(e,s.content)}if(i.top<r.top||i.bottom>r.bottom){let e=Ds(s.attrs,"rowspan",Math.min(i.bottom,r.bottom)-Math.max(i.top,r.top));s=i.top<r.top?s.type.createAndFill(e):s.type.create(e,s.content)}a.push(s)}}i.push(e.child(n).copy(s.from(a)))}const a=this.isColSelection()&&this.isRowSelection()?e:i;return new f(s.from(a),1,1)}replace(e,t=f.empty){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:a}=r[o],s=e.mapping.slice(n);e.replace(s.map(i.pos),s.map(a.pos),o?f.empty:t)}let o=Ge.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new f(s.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=ms.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<o.length;n++)e(t.nodeAt(o[n]),r+o[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){let n=ms.get(e.node(-1)),r=e.start(-1),o=n.findCell(e.pos-r),i=n.findCell(t.pos-r),a=e.node(0);return o.top<=i.top?(o.top>0&&(e=a.resolve(r+n.map[o.left])),i.bottom<n.height&&(t=a.resolve(r+n.map[n.width*(n.height-1)+i.right-1]))):(i.top>0&&(t=a.resolve(r+n.map[i.left])),o.bottom<n.height&&(e=a.resolve(r+n.map[n.width*(n.height-1)+o.right-1]))),new As(e,t)}isRowSelection(){let e=ms.get(this.$anchorCell.node(-1)),t=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-t),r=e.colCount(this.$headCell.pos-t);if(Math.min(n,r)>0)return!1;let o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width}eq(e){return e instanceof As&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){let n=ms.get(e.node(-1)),r=e.start(-1),o=n.findCell(e.pos-r),i=n.findCell(t.pos-r),a=e.node(0);return o.left<=i.left?(o.left>0&&(e=a.resolve(r+n.map[o.top*n.width])),i.right<n.width&&(t=a.resolve(r+n.map[n.width*(i.top+1)-1]))):(i.left>0&&(t=a.resolve(r+n.map[i.top*n.width])),o.right<n.width&&(e=a.resolve(r+n.map[n.width*(o.top+1)-1]))),new As(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new As(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){return new As(e.resolve(t),e.resolve(n))}getBookmark(){return new js(this.$anchorCell.pos,this.$headCell.pos)}}As.prototype.visible=!1,Ge.jsonID("cell",As);class js{constructor(e,t){this.anchor=e,this.head=t}map(e){return new js(e.map(this.anchor),e.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&Is(t,n)?new As(t,n):Ge.near(n,1)}}function Fs(e){if(!(e.selection instanceof As))return null;let t=[];return e.selection.forEachCell(((e,n)=>{t.push(_a.node(n,n+e.nodeSize,{class:"selectedCell"}))})),Fa.create(e.doc,t)}function zs(e,t){let n=e.createAndFill();return new qe(n).replace(0,n.content.size,t).doc}function Ls(e,t,n,r,o,i,a,s){if(0==a||a==t.height)return!1;let l=!1;for(let c=o;c<i;c++){let o=a*t.width+c,i=t.map[o];if(t.map[o-t.width]==i){l=!0;let o=n.nodeAt(i),{top:u,left:d}=t.findCell(i);e.setNodeMarkup(e.mapping.slice(s).map(i+r),null,Ds(o.attrs,"rowspan",a-u)),e.insert(e.mapping.slice(s).map(t.positionAt(a,d,n)),o.type.createAndFill(Ds(o.attrs,"rowspan",u+o.attrs.rowspan-a))),c+=o.attrs.colspan-1}}return l}function Bs(e,t,n,r,o,i,a,s){if(0==a||a==t.width)return!1;let l=!1;for(let c=o;c<i;c++){let o=c*t.width+a,i=t.map[o];if(t.map[o-1]==i){l=!0;let o=n.nodeAt(i),u=t.colCount(i),d=e.mapping.slice(s).map(i+r);e.setNodeMarkup(d,null,Rs(o.attrs,a-u,o.attrs.colspan-(a-u))),e.insert(d+o.nodeSize,o.type.createAndFill(Rs(o.attrs,0,a-u))),c+=o.attrs.rowspan-1}}return l}function Vs(e,t,n,r,o){let i=n?e.doc.nodeAt(n-1):e.doc,a=ms.get(i),{top:l,left:c}=r,u=c+o.width,d=l+o.height,p=e.tr,h=0;function m(){i=n?p.doc.nodeAt(n-1):p.doc,a=ms.get(i),h=p.mapping.maps.length}(function(e,t,n,r,o,i,a){let l,c,u=ks(e.doc.type.schema);if(o>t.width)for(let i=0,s=0;i<t.height;i++){let d=n.child(i);s+=d.nodeSize;let p,f=[];p=null==d.lastChild||d.lastChild.type==u.cell?l||(l=u.cell.createAndFill()):c||(c=u.header_cell.createAndFill());for(let e=t.width;e<o;e++)f.push(p);e.insert(e.mapping.slice(a).map(s-1+r),f)}if(i>t.height){let d=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,o);e++){let o=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==u.header_cell;d.push(o?c||(c=u.header_cell.createAndFill()):l||(l=u.cell.createAndFill()))}let p=u.row.create(null,s.from(d)),f=[];for(let e=t.height;e<i;e++)f.push(p);e.insert(e.mapping.slice(a).map(r+n.nodeSize-2),f)}return!(!l&&!c)})(p,a,i,n,u,d,h)&&m(),Ls(p,a,i,n,c,u,l,h)&&m(),Ls(p,a,i,n,c,u,d,h)&&m(),Bs(p,a,i,n,l,d,c,h)&&m(),Bs(p,a,i,n,l,d,u,h)&&m();for(let e=l;e<d;e++){let t=a.positionAt(e,c,i),r=a.positionAt(e,u,i);p.replace(p.mapping.slice(h).map(t+n),p.mapping.slice(h).map(r+n),new f(o.rows[e-l],0,0))}m(),p.setSelection(new As(p.doc.resolve(n+a.positionAt(l,c,i)),p.doc.resolve(n+a.positionAt(d-1,u-1,i)))),t(p)}const Hs=ao({ArrowLeft:Ws("horiz",-1),ArrowRight:Ws("horiz",1),ArrowUp:Ws("vert",-1),ArrowDown:Ws("vert",1),"Shift-ArrowLeft":$s("horiz",-1),"Shift-ArrowRight":$s("horiz",1),"Shift-ArrowUp":$s("vert",-1),"Shift-ArrowDown":$s("vert",1),Backspace:qs,"Mod-Backspace":qs,Delete:qs,"Mod-Delete":qs});function Ks(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Ws(e,t){return(n,r,o)=>{let i=n.selection;if(i instanceof As)return Ks(n,r,Ge.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;let a=Xs(o,e,t);if(null==a)return!1;if("horiz"==e)return Ks(n,r,Ge.near(n.doc.resolve(i.head+t),t));{let o,i=n.doc.resolve(a),s=Ms(i,e,t);return o=s?Ge.near(s,1):t<0?Ge.near(n.doc.resolve(i.before(-1)),-1):Ge.near(n.doc.resolve(i.after(-1)),1),Ks(n,r,o)}}}function $s(e,t){return(n,r,o)=>{let i=n.selection;if(!(i instanceof As)){let r=Xs(o,e,t);if(null==r)return!1;i=new As(n.doc.resolve(r))}let a=Ms(i.$headCell,e,t);return!!a&&Ks(n,r,new As(i.$anchorCell,a))}}function qs(e,t){let n=e.selection;if(!(n instanceof As))return!1;if(t){let r=e.tr,o=ks(e.schema).cell.createAndFill().content;n.forEachCell(((e,t)=>{e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new f(o,0,0))})),r.docChanged&&t(r)}return!0}function Us(e,t){let n=Cs(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new As(n))),!0)}function Gs(e,t,n){if(!xs(e.state))return!1;let r=function(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;let o=t.firstChild,i=o.type.spec.tableRole,a=o.type.schema,l=[];if("row"==i)for(let e=0;e<t.childCount;e++){let o=t.child(e).content,i=e?0:Math.max(0,n-1),s=e<t.childCount-1?0:Math.max(0,r-1);(i||s)&&(o=zs(ks(a).row,new f(o,i,s)).content),l.push(o)}else{if("cell"!=i&&"header_cell"!=i)return null;l.push(n||r?zs(ks(a).row,new f(t,n,r)).content:t)}return function(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:o,colspan:i}=r.child(t).attrs;for(let t=e;t<e+o;t++)n[t]=(n[t]||0)+i}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let o=0;o<n.length;o++)if(o>=t.length&&t.push(s.empty),n[o]<r){let i=ks(e).cell.createAndFill(),a=[];for(let e=n[o];e<r;e++)a.push(i);t[o]=t[o].append(s.from(a))}return{height:t.length,width:r,rows:t}}(a,l)}(n),o=e.state.selection;if(o instanceof As){r||(r={width:1,height:1,rows:[s.from(zs(ks(e.state.schema).cell,n))]});let t=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),a=ms.get(t).rectBetween(o.$anchorCell.pos-i,o.$headCell.pos-i);return r=function({width:e,height:t,rows:n},r,o){if(e!=r){let t=[],o=[];for(let e=0;e<n.length;e++){let i=n[e],a=[];for(let n=t[e]||0,o=0;n<r;o++){let s=i.child(o%i.childCount);n+s.attrs.colspan>r&&(s=s.type.create(Rs(s.attrs,s.attrs.colspan,n+s.attrs.colspan-r),s.content)),a.push(s),n+=s.attrs.colspan;for(let n=1;n<s.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+s.attrs.colspan}o.push(s.from(a))}n=o,e=r}if(t!=o){let e=[];for(let r=0,i=0;r<o;r++,i++){let a=[],l=n[i%t];for(let e=0;e<l.childCount;e++){let t=l.child(e);r+t.attrs.rowspan>o&&(t=t.type.create(Ds(t.attrs,"rowspan",Math.max(1,o-t.attrs.rowspan)),t.content)),a.push(t)}e.push(s.from(a))}n=e,t=o}return{width:e,height:t,rows:n}}(r,a.right-a.left,a.bottom-a.top),Vs(e.state,e.dispatch,i,a,r),!0}if(r){let t=Os(e.state),n=t.start(-1);return Vs(e.state,e.dispatch,n,ms.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function Ys(e,t){if(t.ctrlKey||t.metaKey)return;let n,r=Js(e,t.target);if(t.shiftKey&&e.state.selection instanceof As)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=Cs(e.state.selection.$anchor))&&Zs(e,t).pos!=n.pos)o(n,t),t.preventDefault();else if(!r)return;function o(t,n){let r=Zs(e,n),o=null==ws.getState(e.state);if(!r||!Is(t,r)){if(!o)return;r=t}let i=new As(t,r);if(o||!e.state.selection.eq(i)){let n=e.state.tr.setSelection(i);o&&n.setMeta(ws,t.pos),e.dispatch(n)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",a),null!=ws.getState(e.state)&&e.dispatch(e.state.tr.setMeta(ws,-1))}function a(n){let a,s=ws.getState(e.state);if(null!=s)a=e.state.doc.resolve(s);else if(Js(e,n.target)!=r&&(a=Zs(e,t),!a))return i();a&&o(a,n)}e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",a)}function Xs(e,t,n){if(!(e.state.selection instanceof Ze))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){let i=r.before(o),a="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?i:null}}return null}function Js(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function Zs(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Cs(e.state.doc.resolve(n.pos)):null}const Qs=new gt("fix-tables");function el(e,t,n,r){let o=e.childCount,i=t.childCount;e:for(let a=0,s=0;a<i;a++){let i=t.child(a);for(let t=s,r=Math.min(o,a+3);t<r;t++)if(e.child(t)==i){s=t+1,n+=i.nodeSize;continue e}r(i,n),s<o&&e.child(s).sameMarkup(i)?el(e.child(s),i,n+1,r):i.nodesBetween(0,i.content.size,r,n+1),n+=i.nodeSize}}function tl(e,t){let n,r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){let o=ms.get(t);if(!o.problems)return r;r||(r=e.tr);let i,a,s=[];for(let e=0;e<o.height;e++)s.push(0);for(let e=0;e<o.problems.length;e++){let i=o.problems[e];if("collision"==i.type){let e=t.nodeAt(i.pos);for(let t=0;t<e.attrs.rowspan;t++)s[i.row+t]+=i.n;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,Rs(e.attrs,e.attrs.colspan-i.n,i.n))}else if("missing"==i.type)s[i.row]+=i.n;else if("overlong_rowspan"==i.type){let e=t.nodeAt(i.pos);r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,Ds(e.attrs,"rowspan",e.attrs.rowspan-i.n))}else if("colwidth mismatch"==i.type){let e=t.nodeAt(i.pos);r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,Ds(e.attrs,"colwidth",i.colwidth))}}for(let e=0;e<s.length;e++)s[e]&&(null==i&&(i=e),a=e);for(let l=0,c=n+1;l<o.height;l++){let n=t.child(l),o=c+n.nodeSize,u=s[l];if(u>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let s=[];for(let n=0;n<u;n++)s.push(ks(e.schema)[t].createAndFill());let d=0!=l&&i!=l-1||a!=l?o-1:c+1;r.insert(r.mapping.map(d),s)}c=o}return r.setMeta(Qs,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&el(t.doc,e.doc,0,r):e.doc.descendants(r),n}function nl(e){let t,n=e.selection,r=Os(e),o=r.node(-1),i=r.start(-1),a=ms.get(o);return t=n instanceof As?a.rectBetween(n.$anchorCell.pos-i,n.$headCell.pos-i):a.findCell(r.pos-i),t.tableStart=i,t.map=a,t.table=o,t}function rl(e,{map:t,tableStart:n,table:r},o){let i=o>0?-1:0;_s(t,r,o+i)&&(i=0==o||o==t.width?null:0);for(let a=0;a<t.height;a++){let s=a*t.width+o;if(o>0&&o<t.width&&t.map[s-1]==t.map[s]){let i=t.map[s],l=r.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,Ps(l.attrs,o-t.colCount(i))),a+=l.attrs.rowspan-1}else{let l=null==i?ks(r.type.schema).cell:r.nodeAt(t.map[s+i]).type,c=t.positionAt(a,o,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function ol(e,t){if(!xs(e))return!1;if(t){let n=nl(e);t(rl(e.tr,n,n.left))}return!0}function il(e,t){if(!xs(e))return!1;if(t){let n=nl(e);t(rl(e.tr,n,n.right))}return!0}function al(e,{map:t,table:n,tableStart:r},o){let i=e.mapping.maps.length;for(let a=0;a<t.height;){let s=a*t.width+o,l=t.map[s],c=n.nodeAt(l);if(o>0&&t.map[s-1]==l||o<t.width-1&&t.map[s+1]==l)e.setNodeMarkup(e.mapping.slice(i).map(r+l),null,Rs(c.attrs,o-t.colCount(l)));else{let t=e.mapping.slice(i).map(r+l);e.delete(t,t+c.nodeSize)}a+=c.attrs.rowspan}}function sl(e,t){if(!xs(e))return!1;if(t){let n=nl(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;al(r,n,e),e!=n.left;e--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=ms.get(n.table);t(r)}return!0}function ll(e,t,n){let r=ks(t.type.schema).header_cell;for(let o=0;o<e.width;o++)if(t.nodeAt(e.map[o+n*e.width]).type!=r)return!1;return!0}function cl(e,{map:t,tableStart:n,table:r},o){let i=n;for(let e=0;e<o;e++)i+=r.child(e).nodeSize;let a=[],s=o>0?-1:0;ll(t,r,o+s)&&(s=0==o||o==t.height?null:0);for(let i=0,l=t.width*o;i<t.width;i++,l++)if(o>0&&o<t.height&&t.map[l]==t.map[l-t.width]){let o=t.map[l],a=r.nodeAt(o).attrs;e.setNodeMarkup(n+o,null,Ds(a,"rowspan",a.rowspan+1)),i+=a.colspan-1}else{let e=null==s?ks(r.type.schema).cell:r.nodeAt(t.map[l+s*t.width]).type;a.push(e.createAndFill())}return e.insert(i,ks(r.type.schema).row.create(null,a)),e}function ul(e,t){if(!xs(e))return!1;if(t){let n=nl(e);t(cl(e.tr,n,n.top))}return!0}function dl(e,t){if(!xs(e))return!1;if(t){let n=nl(e);t(cl(e.tr,n,n.bottom))}return!0}function pl(e,{map:t,table:n,tableStart:r},o){let i=0;for(let e=0;e<o;e++)i+=n.child(e).nodeSize;let a=i+n.child(o).nodeSize,s=e.mapping.maps.length;e.delete(i+r,a+r);for(let i=0,a=o*t.width;i<t.width;i++,a++){let l=t.map[a];if(o>0&&l==t.map[a-t.width]){let t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(s).map(l+r),null,Ds(t,"rowspan",t.rowspan-1)),i+=t.colspan-1}else if(o<t.width&&l==t.map[a+t.width]){let a=n.nodeAt(l),c=a.type.create(Ds(a.attrs,"rowspan",a.attrs.rowspan-1),a.content),u=t.positionAt(o+1,i,n);e.insert(e.mapping.slice(s).map(r+u),c),i+=a.attrs.colspan-1}}}function fl(e,t){if(!xs(e))return!1;if(t){let n=nl(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;pl(r,n,e),e!=n.top;e--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=ms.get(n.table);t(r)}return!0}function hl(e){let t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function ml(e,t){let n=e.selection;if(!(n instanceof As)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=nl(e),{map:o}=r;if(function({width:e,height:t,map:n},r){let o=r.top*e+r.left,i=o,a=(r.bottom-1)*e+r.left,s=o+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[i]==n[i-1]||r.right<e&&n[s]==n[s+1])return!0;i+=e,s+=e}for(let i=r.left;i<r.right;i++){if(r.top>0&&n[o]==n[o-e]||r.bottom<t&&n[a]==n[a+e])return!0;o++,a++}return!1}(o,r))return!1;if(t){let n,i,a=e.tr,l={},c=s.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let s=o.map[e*o.width+t],u=r.table.nodeAt(s);if(!l[s])if(l[s]=!0,null==n)n=s,i=u;else{hl(u)||(c=c.append(u.content));let e=a.mapping.map(s+r.tableStart);a.delete(e,e+u.nodeSize)}}if(a.setNodeMarkup(n+r.tableStart,null,Ds(Ps(i.attrs,i.attrs.colspan,r.right-r.left-i.attrs.colspan),"rowspan",r.bottom-r.top)),c.size){let e=n+1+i.content.size,t=hl(i)?n+1:e;a.replaceWith(t+r.tableStart,e+r.tableStart,c)}a.setSelection(new As(a.doc.resolve(n+r.tableStart))),t(a)}return!0}function gl(e,t){const n=ks(e.schema);return vl((({node:e})=>n[e.type.spec.tableRole]))(e,t)}function vl(e){return(t,n)=>{let r,o,i=t.selection;if(i instanceof As){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(r=function(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from),!r)return!1;o=Cs(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){let a=r.attrs,s=[],l=a.colwidth;a.rowspan>1&&(a=Ds(a,"rowspan",1)),a.colspan>1&&(a=Ds(a,"colspan",1));let c,u=nl(t),d=t.tr;for(let e=0;e<u.right-u.left;e++)s.push(l?Ds(a,"colwidth",l&&l[e]?[l[e]]:null):a);for(let t=u.top;t<u.bottom;t++){let n=u.map.positionAt(t,u.left,u.table);t==u.top&&(n+=r.nodeSize);for(let o=u.left,i=0;o<u.right;o++,i++)o==u.left&&t==u.top||d.insert(c=d.mapping.map(n+u.tableStart,1),e({node:r,row:t,col:o}).createAndFill(s[i]))}d.setNodeMarkup(o,e({node:r,row:u.top,col:u.left}),s[0]),i instanceof As&&d.setSelection(new As(d.doc.resolve(i.$anchorCell.pos),c&&d.doc.resolve(c))),n(d)}return!0}}function yl(e,t){return function(n,r){if(!xs(n))return!1;let o=Os(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){let i=n.tr;n.selection instanceof As?n.selection.forEachCell(((n,r)=>{n.attrs[e]!==t&&i.setNodeMarkup(r,null,Ds(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,Ds(o.nodeAfter.attrs,e,t)),r(i)}return!0}}function bl(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<r.length;e++){const o=t.table.nodeAt(r[e]);if(o&&o.type!==n.header_cell)return!1}return!0}function kl(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!xs(t))return!1;if(n){let r=ks(t.schema),o=nl(t),i=t.tr,a=o.map.cellsInRect("column"==e?new hs(o.left,0,o.right,o.map.height):"row"==e?new hs(0,o.top,o.map.width,o.bottom):o),s=a.map((e=>o.table.nodeAt(e)));for(let e=0;e<a.length;e++)s[e].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[e],r.cell,s[e].attrs);if(0==i.steps.length)for(let e=0;e<a.length;e++)i.setNodeMarkup(o.tableStart+a[e],r.header_cell,s[e].attrs);n(i)}return!0}}(e):function(t,n){if(!xs(t))return!1;if(n){let r=ks(t.schema),o=nl(t),i=t.tr,a=bl("row",o,r),s=bl("column",o,r),l=("column"===e?a:"row"===e&&s)?1:0,c="column"==e?new hs(0,l,1,o.map.height):"row"==e?new hs(l,0,o.map.width,1):o,u="column"==e?s?r.cell:r.header_cell:"row"==e?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((e=>{const t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,u,n.attrs)})),n(i)}return!0}}let wl=kl("row",{useDeprecatedLogic:!0}),Cl=kl("column",{useDeprecatedLogic:!0}),xl=kl("cell",{useDeprecatedLogic:!0});function Ol(e){return function(t,n){if(!xs(t))return!1;let r=function(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t);if(r.childCount)return n-1-r.lastChild.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}}(Os(t),e);if(null!=r){if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(Ze.between(e,Es(e))).scrollIntoView())}return!0}}}function Sl(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}class El{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Il(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,Il(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}}function Il(e,t,n,r,o,i){let a=0,s=!0,l=t.firstChild,c=e.firstChild;for(let e=0,n=0;e<c.childCount;e++){let{colspan:u,colwidth:d}=c.child(e).attrs;for(let e=0;e<u;e++,n++){let c=o==n?i:d&&d[e],u=c?c+"px":"";a+=c||r,c||(s=!1),l?(l.style.width!=u&&(l.style.width=u),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=u}}for(;l;){let e=l.nextSibling;l.parentNode.removeChild(l),l=e}s?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}const Nl=new gt("tableColumnResizing");function Tl({handleWidth:e=5,cellMinWidth:t=25,View:n=El,lastColumnResizable:r=!0}={}){let o=new ft({key:Nl,state:{init(e,r){return this.spec.props.nodeViews[ks(r.schema).table.name]=(e,r)=>new n(e,t,r),new Ml(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>Nl.getState(e).activeHandle>-1?{class:"resize-cursor"}:null,handleDOMEvents:{mousemove(t,n){!function(e,t,n,r,o){let i=Nl.getState(e.state);if(!i.dragging){let r=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),a=-1;if(r){let{left:o,right:i}=r.getBoundingClientRect();t.clientX-o<=n?a=Dl(e,t,"left"):i-t.clientX<=n&&(a=Dl(e,t,"right"))}if(a!=i.activeHandle){if(!o&&-1!==a){let t=e.state.doc.resolve(a),n=t.node(-1),r=ms.get(n),o=t.start(-1);if(r.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==r.width-1)return}Pl(e,a)}}}(t,n,e,0,r)},mouseleave(e){!function(e){let t=Nl.getState(e.state);t.activeHandle>-1&&!t.dragging&&Pl(e,-1)}(e)},mousedown(e,n){!function(e,t,n){let r=Nl.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;let o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let i=e.domAtPos(t),a=i.node.childNodes[i.offset].offsetWidth,s=n;if(r)for(let e=0;e<n;e++)r[e]&&(a-=r[e],s--);return a/s}(e,r.activeHandle,o.attrs);function a(t){window.removeEventListener("mouseup",a),window.removeEventListener("mousemove",s);let r=Nl.getState(e.state);r.dragging&&(function(e,t,n){let r=e.state.doc.resolve(t),o=r.node(-1),i=ms.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<i.height;e++){let t=e*i.width+s;if(e&&i.map[t]==i.map[t-i.width])continue;let r=i.map[t],{attrs:c}=o.nodeAt(r),u=1==c.colspan?0:s-i.colCount(r);if(c.colwidth&&c.colwidth[u]==n)continue;let d=c.colwidth?c.colwidth.slice():_l(c.colspan);d[u]=n,l.setNodeMarkup(a+r,null,Ds(c,"colwidth",d))}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,Rl(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(Nl,{setDragging:null})))}function s(t){if(!t.which)return a(t);let r=Nl.getState(e.state),o=Rl(r.dragging,t,n);!function(e,t,n,r){let o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=ms.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;Il(i,l.firstChild,l,r,s,n)}(e,r.activeHandle,o,n)}e.dispatch(e.state.tr.setMeta(Nl,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",a),window.addEventListener("mousemove",s),t.preventDefault()}(e,n,t)}},decorations(e){let t=Nl.getState(e);if(t.activeHandle>-1)return function(e,t){let n=[],r=e.doc.resolve(t),o=r.node(-1);if(!o)return Fa.empty;let i=ms.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan;for(let e=0;e<i.height;e++){let t=s+e*i.width-1;if(!(s!=i.width&&i.map[t]==i.map[t+1]||0!=e&&i.map[t-1]==i.map[t-1-i.width])){let e=i.map[t],r=a+e+o.nodeAt(e).nodeSize-1,s=document.createElement("div");s.className="column-resize-handle",n.push(_a.widget(r,s))}}return Fa.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return o}class Ml{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){let t=this,n=e.getMeta(Nl);if(n&&null!=n.setHandle)return new Ml(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Ml(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let n=e.mapping.map(t.activeHandle,-1);Ss(e.doc.resolve(n))||(n=null),t=new Ml(n,t.dragging)}return t}}function Dl(e,t,n){let r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;let{pos:o}=r,i=Cs(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;let a=ms.get(i.node(-1)),s=i.start(-1),l=a.map.indexOf(i.pos-s);return l%a.width==0?-1:s+a.map[l-1]}function Rl(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Pl(e,t){e.dispatch(e.state.tr.setMeta(Nl,{setHandle:t}))}function _l(e){let t=[];for(let n=0;n<e;n++)t.push(0);return t}function Al({allowTableNodeSelection:e=!1}={}){return new ft({key:ws,state:{init:()=>null,apply(e,t){let n=e.getMeta(ws);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;let{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:Fs,handleDOMEvents:{mousedown:Ys},createSelectionBetween(e){if(null!=ws.getState(e.state))return e.state.selection},handleTripleClick:Us,handleKeyDown:Hs,handlePaste:Gs},appendTransaction:(t,n,r)=>function(e,t,n){let r,o,i=(t||e).selection,a=(t||e).doc;if(i instanceof et&&(o=i.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=As.create(a,i.from);else if("row"==o){let e=a.resolve(i.from+1);r=As.rowSelection(e,e)}else if(!n){let e=ms.get(i.node),t=i.from+1,n=t+e.map[e.width*e.height-1];r=As.create(a,t+1,n)}}else i instanceof Ze&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.pos-6)return!1;let n=e.pos,r=t.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}(i)?r=Ze.create(a,i.from):i instanceof Ze&&function({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===t.parentOffset}(i)&&(r=Ze.create(a,i.$from.start(),i.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,tl(r,n),e)})}var jl=["blockquote",0],Fl=["hr"],zl=["pre",["code",0]],Ll=["ol",0],Bl=["ul",0],Vl=["li",0],Hl=function(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n},Kl=function(e){var t={};return e.forEach((function(e){t[e]={default:null}})),t},Wl=function(){return Kl(["style","class","id"])},$l=function(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return!0;return!1},ql=function(e,t){void 0===t&&(t=[]);var n={},r=function(r){r&&null!==e[r]&&!t.find((function(e){return e===r}))&&(n[r]=e[r])};for(var o in e)r(o);return n},Ul=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},Gl=Pt(Pt(Pt(Pt(Pt(Pt(Pt(Pt(Pt(Pt({link:{attrs:Pt(Pt({},Wl()),{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:Hl}],toDOM:function(e){return["a",ql(e.attrs),0]}}},Ul("strong")),Ul("b")),Ul("em")),Ul("i")),Ul("u")),Ul("del")),Ul("sub")),Ul("sup")),Ul("code")),{style:{attrs:Pt({},Wl()),parseDOM:[{tag:"span",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["span",ql(e.attrs),0]:["span",0]}}}),Yl=function(e){var t;return(t={})[e]={default:null,getFromDOM:function(t){return t.getAttribute(e)},setDOMAttr:function(t,n){n[e]=t}},t},Xl=Pt(Pt(Pt(Pt({},Yl("style")),Yl("class")),Yl("id")),Yl("headers")),Jl={doc:{content:"colgroup*"},col:{attrs:Kl(["id","class","style","span"]),parseDOM:[{getAttrs:Hl,tag:"col"}],toDOM:function(e){return["col",e.attrs]}},colgroup:{attrs:Kl(["id","class","style","span"]),content:"col*",parseDOM:[{getAttrs:Hl,tag:"colgroup"}],toDOM:function(e){return["colgroup",e.attrs,0]}},text:{inline:!0,group:"inline"}},Zl=new Y({nodes:Jl,marks:{}}),Ql=function(e){var t=Tt(It(e),Zl,{preserveWhitespace:!1});return Nt(t).firstChild},ec=bs({tableGroup:"block",cellContent:"block+",cellAttributes:Xl});ec.table_row.attrs=Pt(Pt({},ec.table_row.attrs),Kl([vt,"style","class","id"])),ec.table_row.toDOM=function(e){return["tr",ql(e.attrs),0]},ec.table_row.parseDOM=[{tag:"tr",getAttrs:Hl}],ec.table.attrs=Pt(Pt({},ec.table.attrs),Kl(["style","class","id",yt,bt])),ec.table.toDOM=function(e){var t=$l(e.attrs)?ql(e.attrs,[yt,bt]):{},n=null;if(e.attrs[yt]&&!function(e){for(var t=!1,n=e.child(0),r=0;r<n.childCount;r++)if(n.child(r).attrs.colwidth){t=!0;break}return t}(e)){var r=Ql(e.attrs[yt]);if(r){var o=Array.from(r.children).map((function(e){return["col",Hl(e)]}));n=["colgroup",Hl(r)].concat(o)}}return n?["table",t,n,["tbody",0]]:["table",t,["tbody",0]]},ec.table.parseDOM=[{tag:"table",getAttrs:function(e){var t=Hl(e),n=Array.from(e.childNodes).find((function(e){return"COLGROUP"===e.nodeName}));return n&&(t[yt]=n.outerHTML),t}}];var tc=Pt({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:Pt({},Wl()),parseDOM:[{tag:"p",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["p",ql(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:Pt({},Wl()),parseDOM:[{tag:"div",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["div",ql(e.attrs),0]:["div",0]}},blockquote:{attrs:Pt({},Wl()),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["blockquote",ql(e.attrs),0]:jl}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return Fl}},heading:{attrs:Pt(Pt({},Wl()),{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:1})}},{tag:"h2",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:2})}},{tag:"h3",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:3})}},{tag:"h4",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:4})}},{tag:"h5",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:5})}},{tag:"h6",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:6})}}],toDOM:function(e){return $l(e.attrs,"level")?["h"+e.attrs.level,ql(e.attrs,["level"]),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return zl}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:Pt({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},Wl()),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["img",ql(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:Pt({},Wl()),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["br",ql(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:Pt(Pt({},Wl()),{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return Pt(Pt({},Hl(e)),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?$l(e.attrs,"order")?["ol",ql(e.attrs,["order"]),0]:Ll:["ol",Pt(Pt({},ql(e.attrs,["order"])),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:Pt({},Wl()),parseDOM:[{tag:"ul",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["ul",ql(e.attrs),0]:Bl}},list_item:{content:"(paragraph | heading) block*",attrs:Pt({},Wl()),parseDOM:[{tag:"li",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["li",ql(e.attrs),0]:Vl},defining:!0}},ec),nc=200,rc=function(){};rc.prototype.append=function(e){return e.length?(e=rc.from(e),!this.length&&e||e.length<nc&&this.leafAppend(e)||this.length<nc&&e.leafPrepend(this)||this.appendInner(e)):this},rc.prototype.prepend=function(e){return e.length?rc.from(e).append(this):this},rc.prototype.appendInner=function(e){return new ic(this,e)},rc.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?rc.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},rc.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},rc.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},rc.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},rc.from=function(e){return e instanceof rc?e:e&&e.length?new oc(e):rc.empty};var oc=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=nc)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=nc)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(rc);rc.empty=new oc([]);var ic=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(rc);const ac=rc;class sc{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}t&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,a,s=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new lc(e.map));let t,o=e.step.map(n.slice(r));o&&s.maybeStep(o).doc&&(t=s.mapping.maps[s.mapping.maps.length-1],l.push(new lc(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else s.maybeStep(e.step);return e.selection?(i=n?e.selection.map(n.slice(r)):e.selection,a=new sc(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:a,transform:s,selection:i}}addTransform(e,t,n,r){let o=[],i=this.eventCount,a=this.items,s=!r&&a.length?a.get(a.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),u=new lc(e.mapping.maps[n],c,t);(l=s&&s.merge(u))&&(u=l,n?o.pop():a=a.slice(0,a.length-1)),o.push(u),t&&(i++,t=void 0),r||(s=u)}let l=i-n.depth;return l>uc&&(a=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(a,l),i-=l),new sc(a.append(o),i)}remapping(e,t){let n=new he;return this.items.forEach(((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new sc(this.items.append(e.map((e=>new lc(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,a=this.eventCount;this.items.forEach((e=>{e.selection&&a--}),r);let s=t;this.items.forEach((t=>{let r=o.getMirror(--s);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(t.step){let i=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(s+1,r));c&&a++,n.push(new lc(l,i,c))}else n.push(new lc(l))}),r);let l=[];for(let e=t;e<i;e++)l.push(new lc(o.maps[e]));let c=this.items.slice(0,r).append(l).append(n),u=new sc(c,a);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach(((i,a)=>{if(a>=e)r.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(n)),a=e&&e.getMap();if(n--,a&&t.appendMap(a,n),e){let s=i.selection&&i.selection.map(t.slice(n));s&&o++;let l,c=new lc(a.invert(),e,s),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new sc(ac.from(r.reverse()),o)}}sc.empty=new sc(ac.empty,0);class lc{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new lc(t.getMap().invert(),t,this.selection)}}}class cc{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const uc=20;function dc(e){let t=[];return e.forEach(((e,n,r,o)=>t.push(r,o))),t}function pc(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function fc(e,t,n,r){let o=gc(t),i=yc.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,o);if(!a)return;let s=a.selection.resolve(a.transform.doc),l=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,o),c=new cc(r?l:a.remaining,r?a.remaining:l,null,0);n(a.transform.setSelection(s).setMeta(yc,{redo:r,historyState:c}).scrollIntoView())}let hc=!1,mc=null;function gc(e){let t=e.plugins;if(mc!=t){hc=!1,mc=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){hc=!0;break}}return hc}function vc(e){return e.setMeta(bc,!0)}const yc=new gt("history"),bc=new gt("closeHistory");function kc(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new ft({key:yc,state:{init:()=>new cc(sc.empty,sc.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let o,i=n.getMeta(yc);if(i)return i.historyState;n.getMeta(bc)&&(e=new cc(e.done,e.undone,null,0));let a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(yc))return a.getMeta(yc).redo?new cc(e.done.addTransform(n,void 0,r,gc(t)),e.undone,dc(n.mapping.maps[n.steps.length-1]),e.prevTime):new cc(e.done,e.undone.addTransform(n,void 0,r,gc(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new cc(e.done.rebased(n,o),e.undone.rebased(n,o),pc(e.prevRanges,n.mapping),e.prevTime):new cc(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),pc(e.prevRanges,n.mapping),e.prevTime);{let o=0==e.prevTime||!a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),i=a?pc(e.prevRanges,n.mapping):dc(n.mapping.maps[n.steps.length-1]);return new cc(e.done.addTransform(n,o?t.selection.getBookmark():void 0,r,gc(t)),sc.empty,i,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?wc:"historyRedo"==n?Cc:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const wc=(e,t)=>{let n=yc.getState(e);return!(!n||0==n.done.eventCount||(t&&fc(n,e,t,!1),0))},Cc=(e,t)=>{let n=yc.getState(e);return!(!n||0==n.undone.eventCount||(t&&fc(n,e,t,!0),0))};function xc(e){let t=yc.getState(e);return t?t.done.eventCount:0}function Oc(e){let t=yc.getState(e);return t?t.undone.eventCount:0}class Sc{constructor(e,t){var n;this.match=e,this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){let i=n;if(t[1]){let e=t[0].lastIndexOf(t[1]);i+=t[0].slice(e+t[1].length);let n=(r+=e)-o;n>0&&(i=t[0].slice(e-n,e)+i,r=o)}return e.tr.insertText(i,r,o)}):t}}function Ec({rules:e}){let t=new ft({state:{init:()=>null,apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(n,r,o,i)=>Ic(n,r,o,i,e,t),handleDOMEvents:{compositionend:n=>{setTimeout((()=>{let{$cursor:r}=n.state.selection;r&&Ic(n,r.pos,r.pos,"",e,t)}))}}},isInputRules:!0});return t}function Ic(e,t,n,r,o,i){if(e.composing)return!1;let a=e.state,s=a.doc.resolve(t);if(s.parent.type.spec.code)return!1;let l=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"")+r;for(let s=0;s<o.length;s++){let c=o[s].match.exec(l),u=c&&o[s].handler(a,c,t-(c[0].length-r.length),n);if(u)return e.dispatch(u.setMeta(i,{transform:u,from:t,to:n,text:r})),!0}return!1}const Nc=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let o,i=n[r];if(i.spec.isInputRules&&(o=i.getState(e))){if(t){let n=e.tr,r=o.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(o.text){let t=n.doc.resolve(o.from).marks();n.replaceWith(o.from,o.to,e.schema.text(o.text,t))}else n.delete(o.from,o.to);t(n)}return!0}}return!1},Tc=new Sc(/--$/,"—"),Mc=new Sc(/\.\.\.$/,"…"),Dc=new Sc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),Rc=new Sc(/"$/,"”"),Pc=new Sc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),_c=new Sc(/'$/,"’"),Ac=[Dc,Rc,Pc,_c];function jc(e,t,n=null,r){return new Sc(e,((e,o,i,a)=>{let s=n instanceof Function?n(o):n,l=e.tr.delete(i,a),c=l.doc.resolve(i).blockRange(),u=c&&Ee(c,t,s);if(!u)return null;l.wrap(c,u);let d=l.doc.resolve(i-1).nodeBefore;return d&&d.type==t&&Te(l.doc,i-1)&&(!r||r(o,d))&&l.join(i-1),l}))}function Fc(e,t,n=null){return new Sc(e,((e,r,o,i)=>{let a=e.doc.resolve(o),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,s):null}))}var zc={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},Lc={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},Bc={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},Vc={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},Hc={mark:"sub"},Kc={mark:"sup"},Wc={mark:"link"},$c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),qc=function(e,t){var n={},r=t&&t.applyToWord||!1;if(n["Mod-z"]=wc,n["Shift-Mod-z"]=Cc,n.Backspace=br(Nc,Wn,$n,Un),n.Enter=br(tr,or,ir,sr),$c||(n["Mod-y"]=Cc),e.marks.strong&&(n["Mod-b"]=Ut(cn,Pt(Pt({},zc),{applyToWord:r}))),e.marks.em&&(n["Mod-i"]=Ut(cn,Pt(Pt({},Lc),{applyToWord:r}))),e.marks.u&&(n["Mod-u"]=Ut(cn,Pt(Pt({},Bc),{applyToWord:r}))),e.nodes.hard_break){var o=e.nodes.hard_break,i=br(rr,(function(e,t){return t(e.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0}));n["Shift-Enter"]=i}return n},Uc=function(e){var t,n={};return e.nodes.list_item&&(n.Enter=(t=e.nodes.list_item,function(e,n){return jn(t)(e,(function(t){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&t.ensureMarks(r),n(t)}))})),n},Gc=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,Yc=function(e){return/^MsoListParagraph/.test(e.className)},Xc=function(e){var t=e.innerHTML;return(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},Jc=function(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n},Zc=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},Qc=function(e,t){var n=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var r=e;r.getAttribute("datalist")?(n.push(e),t.add(n)):Yc(r)&&n.length?n.push(e):(n=[],"DIV"===r.nodeName?Qc(r.children,t):"TABLE"===r.nodeName&&Array.from(r.querySelectorAll("td,th")).forEach((function(e){Qc(e.children,t)})))}}))},eu=function(e){var t,n=e.innerHTML,r=function(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")};return n=n.replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(n)?{tag:"ul",style:(t=r(Xc(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(n)?{tag:"ol",style:Zc(r(Xc(e)))}:void 0},tu=function(e){var t,n=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?Xc(e):e.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^(&nbsp;|\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==n?"<"+n+">"+e.innerHTML+"</"+n+">":e.innerHTML),e.parentNode.removeChild(e);var r=document.createElement("li");return r.innerHTML=t,r},nu=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e.replace(Gc,(function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e}))}(e);var n=new Set;return Qc(t.children,n),n.forEach((function(e){return function(e){var t,n,r,o,i,a,s,l,c,u,d,p,f,h=-1,m={};for(l=0;l<e.length;l++){var g=(f={datalist:(c=e[l]).getAttribute("datalist"),datalevel:c.getAttribute("datalevel")}).datalist,v=eu(c);if(u=v&&v.tag){if(d=f.datalevel||parseFloat(c.style.marginLeft||0),f.datalevel||c.style.marginLeft){var y=u+g;m[d]||(m[d]={}),(!n||n<0)&&(n=d,r=g,o=(s=e.filter((function(e){return e.getAttribute("datalist")===String(r)})))[s.length-1],a=Jc(u,v&&v.style),c.parentNode.insertBefore(a,c),h=d,m[d][y]=a),i=o===c,p=m[d][y],(d>h||!p)&&(p=Jc(u,v&&v.style),m[d][y]=p,t.appendChild(p)),t=tu(c),p.appendChild(t),i?n=h=-1:h=d}}else!t||i&&!Yc(c)||(c.style.marginLeft&&(c.style.marginLeft=""),c.style.marginLeft&&(c.style.margin=""),t.appendChild(c))}}(e)})),t.innerHTML},ru=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},ou=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},iu=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},au=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},su=function(e){/^Mso/.test(e.value)&&au(e)},lu=/\s*;\s*/,cu=/\s*:\s*/,uu=function(e){var t,n,r=e.value.split(lu).filter((function(e){return Boolean(e)})),o=e.ownerElement.style,i="";r.forEach((function(e){var r;r=e.split(cu),t=r[0],n=r[1],void 0!==o[t]&&(i+=t+": "+n+"; ")})),(i=i.trim())?e.value=i:au(e)},du=function(e,t){var n=e;if(t.convertMsLists&&(n=nu(n)),t.stripTags&&(n=iu(n,t.stripTags)),t.attributes){var r=document.createElement("div");r.innerHTML=n,Array.from(r.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e.attributes.length-1;n>=0;n--){var r=e.attributes[n];t[r.name]?t[r.name](r):t["*"]&&t["*"](r)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,t.attributes)})),n=r.innerHTML}return n};function pu(e){for(var t=e.length,n=new Array(t/2),r=0;r<t;r+=2)n[r]=String.fromCharCode(parseInt(e.substring(r,r+2),16));return btoa(n.join(""))}var fu=/<img\s[^>]*?src=(?:'|")file:\/[^'"]+(?:'|")[^>]*>/gi,hu=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,mu=new RegExp("(?:("+hu.source+"))([\\da-fA-F\\s]+)\\}","g"),gu=/[^\da-fA-F]/g,vu=/file:\/[^'"]+\.(jpg|png|gif)/i,yu=/\\(png|jpeg)blip\\/,bu="text/rtf",ku=function(e,t){var n=e.match(fu);if(!n||-1===t.types.indexOf(bu))return e;var r=t.getData(bu),o=[],i=r.match(mu);if(!r||!i)return e;for(var a=0,s=i;a<s.length;a++){var l=s[a],c=yu.exec(l);if(c){var u=l.replace(hu,"").replace(gu,"");o.push("data:image/"+c[1]+";base64,"+pu(u))}}return n.length!==o.length?e:e.replace(fu,(function(e){var t=o.shift()||"";return e.replace(vu,t)}))},wu=function(e,t,n,r,o){var i,a,s,l,c,u,d=[],p=[],f=t.matchCase,h=t.matchWord,m=t.useRegExp,g=t.text;if(m&&(/^\\$/.test(g)||/[^\\]\\$/.test(g))&&(g=g.substring(0,g.length-1)),!g)return d;var v=f?"g":"gi",y=m?new RegExp(g,v):Nu(g,v);return e.nodesBetween(n,r,(function(t,f,m){if(o(d))return!1;t.inlineContent&&f+t.content.size>=n&&(p.length=0,t.nodesBetween(0,t.content.size,(function(t,m,g,v){if(o(d))return!1;var b=1+f+m;if(t.isText&&b+t.nodeSize>=n){if(c=t.text||"",u=g.childCount-1>=v+1&&g.child(v+1),p.push(n<=b?{text:c,start:b}:{text:c.slice(n-b),start:n}),u&&u.isText)return;for(a=p.map((function(e){return e.text})).join(""),i=y.exec(a);null!==i&&(s=p[0].start+i.index,l=s+i[0].length,n<=s&&r>=l&&Iu(i,h)&&d.push(Ze.create(e,s,l)),!o(d));)i=y.exec(a)}else p.length=0})))})),d},Cu=function(e,t){var n=t.backward,r=t.matchCyclic,o=_t(t,["backward","matchCyclic"]),i=n?function(){return!1}:function(e){return e.length>0},a=e.doc,s=e.selection,l=[];return n?!(l=wu(a,o,0,s.from,i)).length&&r&&(l=wu(a,o,s.from,a.content.size,i)):!(l=wu(a,o,s.to,a.content.size,i)).length&&r&&(l=wu(a,o,0,s.to,i)),l.length?l[l.length-1]:null},xu=function(e,t){return wu(e,t,0,e.content.size,(function(){return!1}))},Ou=function(e,t,n){var r=e.from,o=e.to;return n.insertText(t,r,o).setSelection(Ze.create(n.doc,r,r+t.length)),n},Su=function(e,t,n){var r=xu(e.doc,n);if(0===r.length)return null;for(var o=e.tr,i=r.length-1;i>=0;i--)o.insertText(t,r[i].from,r[i].to);return o},Eu=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,Iu=function(e,t){if(t){if(!0===t){var n=e.input,r=n.charAt(e.index-1),o=n.charAt(e.index+e[0].length);return Eu.test(r)&&Eu.test(o)}return t(e)}return!0},Nu=function(e,t){var n=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(n,t)};function Tu(e){var t={class:"k-placeholder","data-placeholder":e};return new ft({key:new gt("placeholder"),props:{decorations:function(e){var n=e.doc,r=n.content.firstChild;if(!(0===n.childCount||1===n.childCount&&r.inlineContent&&0===r.childCount))return Fa.empty;var o=[];return n.descendants((function(e,n){o.push(_a.node(n,n+e.nodeSize,t))})),Fa.create(n,o)}}})}var Mu=/\s+/g,Du=/text-align/,Ru=function(){return new ft({key:new gt("spaces-fix"),props:{decorations:function(e){var t,n,r,o,i=[],a=e.doc;return a.nodesBetween(0,a.content.size,(function(e,a,s){if(e.type.isText&&function(e){return Du.test(e&&e.attrs&&e.attrs.style||"")}(s))for(n=Mu.exec(e.text||"");null!==n;){if(t=a+n.index,r=n[0].length,n.index+r<n.input.length)for(o=0;o<=r-1;o+=2)i.push(_a.inline(t+o,t+o+1,{style:"white-space: normal"}));n=Mu.exec(e.text||"")}})),Fa.create(a,i)}}})},Pu=new gt("highlight");function _u(e){return void 0===e&&(e=Pu),new ft({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map((function(e){return _a.inline(e.from,e.to,e.attrs)}));return Fa.create(e.doc,t)}}})}var Au={southeast:{x:1,y:1},east:{x:1,y:0},south:{x:0,y:1},north:{x:0,y:-1},west:{x:-1,y:0},southwest:{x:-1,y:1},northwest:{x:-1,y:-1},northeast:{x:1,y:-1}},ju=Object.keys(Au),Fu=new gt("image-resize"),zu=function(e,t,n){e.style[t]=n+"px"},Lu=/[^\-]width:|[^\-]height:/,Bu=/^.+$/,Vu=function(){function e(e,t,n,r){this.activeHandle=e,this.dragging=t,this.rect=n,this.nodePosition=r}return e.prototype.apply=function(t){var n=t.getMeta(Fu);return n?new e(n.activeHandle,n.setDragging,n.rect,n.nodePosition):this},e}(),Hu=function(e){return void 0===e&&(e={node:"image",lockRatio:!0}),new ft({key:Fu,view:function(t){return{resize:function(){Fu.getState(t.state).rect&&t.dispatch(t.state.tr.setMeta("resize",!0))},get window(){return t.dom.ownerDocument&&t.dom.ownerDocument.defaultView},attachResize:function(){var e=this.window;e&&(e.removeEventListener("resize",this.resize),e.addEventListener("resize",this.resize))},removeResize:function(){var e=this.window;e&&e.removeEventListener("resize",this.resize)},update:function(t,n){var r=t.state,o=r.selection,i=r.schema.nodes[e.node],a=Fu.getState(r),s=a.rect;if(o instanceof et&&i===o.node.type){var l=t.nodeDOM(o.from),c={top:l.offsetTop,left:l.offsetLeft,width:l.offsetWidth,height:l.offsetHeight};if(!n.selection.eq(o)||s&&(s.width!==c.width||s.height!==c.height||s.top!==c.top||s.left!==c.left)){var u=r.tr;u.setMeta(Fu,{rect:c,nodePosition:o.from}),t.dispatch(u),this.attachResize()}}else s&&(a.rect=null,a.nodePosition=-1)},destroy:function(){this.removeResize()}}},state:{init:function(){return new Vu("",null,null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(t,n){return function(e,t,n){var r=t.target.getAttribute(Ct);if(!r)return!1;var o=Fu.getState(e.state);t.preventDefault();var i=e.state.tr;function a(t){!function(e,t,n){var r=Fu.getState(e.state),o=r.rect,i=r.dragging,a=r.nodePosition,s=r.activeHandle;if(i&&o){var l=e.nodeDOM(a),c=Au[s],u=(t.clientX-i.startX)*c.x,d=(t.clientY-i.startY)*c.y,p=c.x?u+l.width:o.width,f=c.y?d+l.height:o.height;if(n.lockRatio&&c.x&&c.y){var h=Math.min(p/l.width,f/l.height),m=l.width*h,g=l.height*h;i.startX=t.clientX-(p-m)*c.x,i.startY=t.clientY-(f-g)*c.y,p=m,f=g}else i.startX=c.x?t.clientX:i.startX,i.startY=c.y?t.clientY:i.startY;zu(l,"width",p),zu(l,"height",f),o.top=l.offsetTop,o.left=l.offsetLeft,o.width=l.offsetWidth,o.height=l.offsetHeight;var v=l.nextElementSibling;v.style.width=o.width+"px",v.style.height=o.height+"px",v.style.top=o.top+"px",v.style.left=o.left+"px"}}(e,t,n)}return i.setMeta(Fu,{setDragging:{startX:t.clientX,startY:t.clientY},activeHandle:r,rect:o.rect,nodePosition:o.nodePosition}),i.setMeta("addToHistory",!1),e.dispatch(i),t.view.addEventListener("mouseup",(function t(n){n.view.removeEventListener("mouseup",t),n.view.removeEventListener("mousemove",a),function(e){var t=Fu.getState(e.state),n=t.rect,r=t.dragging,o=t.nodePosition;if(r&&n){var i=e.state.selection;if(i instanceof et){var a=i.node.attrs,s=n.width,l=n.height,c=void 0;if(Lu.test(a.style||"")){var u=At(a.style,{style:"width",value:Bu,newValue:s+"px"}),d=At(u.style||"",{style:"height",value:Bu,newValue:l+"px"}).style;c=Pt(Pt({},a),{style:d})}else c=Pt(Pt({},a),{width:s,height:l});var p=i.node.type.createAndFill(c);if(p){var f=e.state.tr;f.replaceWith(o,o+1,p),f.setSelection(et.create(f.doc,o)),f.setMeta("commandName","image-resize"),f.setMeta("args",c),f.setMeta(Fu,{setDragging:null,activeHandle:null,rect:n,nodePosition:o}),e.dispatch(f)}}}}(e)})),t.view.addEventListener("mousemove",a),!0}(t,n,e)}},decorations:function(t){var n=t.selection,r=t.schema.nodes[e.node],o=Fu.getState(t).rect;if(o&&n instanceof et&&r===n.node.type){var i=document.createElement("div");i.className="k-editor-resize-handles-wrapper",i.style.width=o.width+"px",i.style.height=o.height+"px",i.style.top=o.top+"px",i.style.left=o.left+"px";for(var a=0;a<ju.length;a++){var s=document.createElement("div");s.className=kt+" "+ju[a],s.setAttribute(Ct,ju[a]),i.appendChild(s)}return Fa.create(t.doc,[_a.widget(t.selection.from+1,i)])}return Fa.empty}}})},Ku=new gt("caret-color");function Wu(){return new ft({key:Ku,props:{decorations:function(e){var t=e.doc,n=e.selection,r=e.storedMarks;if(!n.empty||!r)return Fa.empty;var o=en((r||[]).find((function(e){return"style"===e.type.name})),{name:"color",value:/^.+$/});if(!o)return Fa.empty;var i=n.$anchor.parent,a=[];return t.descendants((function(e,t){e.eq(i)&&a.push(_a.node(t,t+e.nodeSize,{style:"caret-color: "+o}))})),Fa.create(t,a)}}})}var $u=function(){function e(e,t){this.node=e,this.view=t,this.dom=document.createElement("div"),this.dom.className="k-editor-resize-wrap-element",this.table=this.dom.appendChild(document.createElement("table")),e.attrs[yt]&&this.renderColgroup(e.attrs[yt]);var n=this.table.appendChild(document.createElement("tbody"));this.setAttributes(this.table,e.attrs),this.resizeHandles=ju.map((function(e){var t=document.createElement("span");return t.className=kt+" "+e,t.setAttribute(wt,e),t})),this.contentDOM=n}return e.prototype.update=function(e){var t=this;if(e.type!==this.node.type)return!1;var n=this.node;return this.node=e,e.attrs[bt]?this.resizeHandles.forEach((function(e){t.dom.appendChild(e)})):Array.from(this.dom.children).filter((function(e){return e.classList.contains(kt)})).forEach((function(e){return e.remove()})),this.setAttributes(this.table,e.attrs),n.attrs[yt]!==e.attrs[yt]&&this.renderColgroup(e.attrs[yt]),!0},e.prototype.ignoreMutation=function(e){return"attributes"===e.type&&(e.target===this.table||e.target.firstChild===this.table||this.colgroup&&this.colgroup.contains(e.target))},e.prototype.destroy=function(){this.node=void 0,this.view=void 0,this.table=void 0,this.colgroup=void 0,this.resizeHandles=void 0},e.prototype.renderColgroup=function(e){this.table&&this.table.firstChild&&"COLGROUP"===this.table.firstChild.nodeName&&this.table.removeChild(this.table.firstChild),e&&(this.colgroup=Ql(e),this.table.insertBefore(this.colgroup,this.table.firstChild))},e.prototype.setAttributes=function(e,t){var n=[yt,bt];for(var r in t)if(r&&-1===n.indexOf(r)){var o=e.getAttribute(r),i=t[r];i&&i!==o?e.setAttribute(r,i):i||e.removeAttribute(r)}},e}(),qu=/^.+$/,Uu=function(e){return(e||"").split(/\s*;\s*/).filter(Boolean).map((function(e){var t,n=e.split(/\s*:\s*/);return(t={})[n[0]]=n[1],t})).reduce((function(e,t){return Pt(Pt({},e),t)}),{})};function Gu(e,t,n){var r;if(new RegExp("[^-]?"+t+":").test(e.style||"")){var o=At(e.style||"",{style:t,value:qu,newValue:n}).style;r=Pt(Pt({},e),{style:o})}else r=e.style?Pt(Pt({},e),{style:e.style.replace(/;$/,"")+"; "+t+": "+n+";"}):Pt(Pt({},e),{style:t+": "+n+";"});return r}var Yu=new gt("table-resize"),Xu=new gt("table-column-resizing"),Ju=new gt("table-row-resizing");function Zu(e,t){var n=!1;return(n=(n=n||e!==Yu&&Boolean(Yu.get(t))&&Yu.getState(t).dragging)||e!==Xu&&Boolean(Xu.get(t))&&Xu.getState(t).dragging)||e!==Ju&&Boolean(Ju.get(t))&&Ju.getState(t).dragging}function Qu(e,t){var n=!1;return(n=n||e!==Xu&&Boolean(Xu.get(t))&&Xu.getState(t).activeHandle>-1)||e!==Ju&&Boolean(Ju.get(t))&&Ju.getState(t).activeHandle>-1}function ed(e){return e&&e.firstChild&&"TABLE"===e.firstChild.nodeName?e.firstChild:e}function td(e){for(;e&&"TD"!==e.nodeName&&"TH"!==e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}function nd(e,t){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{node:r,depth:n}}return null}var rd=function(){function e(e,t){this.activeHandle=e,this.dragging=t}return e.prototype.apply=function(t){var n,r=this,o=t.getMeta(Xu);if(o&&null!=o.setHandle)return new e(o.setHandle,null);if(o&&void 0!==o.setDragging)return new e(r.activeHandle,o.setDragging);if(r.activeHandle>-1&&t.docChanged){var i=t.mapping.map(r.activeHandle,-1);n=t.doc.resolve(i),Boolean("row"===n.parent.type.spec.tableRole&&n.nodeAfter)||(i=-1),r=new e(i,r.dragging)}return r},e}();function od(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=e.state.doc.resolve(r.pos),i=nd(o,(function(e){return"table"===e.type.spec.tableRole}));if(null===i)return-1;var a=o.start(i.depth),s=i.node,l=ms.get(s);return a+l.map[l.width*n.rowIndex+n.cellIndex]}function id(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function ad(e,t){var n=e.state.tr;n.setMeta("addToHistory",!1),n.setMeta(Xu,{setHandle:t}),e.dispatch(n)}var sd={southeast:!0,southwest:!0,northwest:!0,northeast:!0},ld=Pt({east:!0,west:!0},sd),cd=Pt({south:!0,north:!0},sd),ud=function(){function e(e,t,n){this.activeHandle=e,this.dragging=t,this.nodePosition=n}return e.prototype.apply=function(t){var n=t.getMeta(Yu);return n?new e(n.activeHandle,n.setDragging,n.nodePosition):this},e}(),dd=function(e){var t=Array.from(e.firstChild.children).map((function(e){return e.offsetWidth})),n=Array.from(e.rows).map((function(e){return e.offsetHeight})),r=t.reduce((function(e,t){return e+t}),0),o=n.reduce((function(e,t){return e+t}),0),i=e.offsetHeight;return{width:r,height:o,colsWidth:t,rowsHeight:n,offsetWidth:e.offsetWidth,offsetHeight:i}},pd=function(e,t){var n=t.target.getAttribute(wt);if(!n)return!1;var r=Yu.getState(e.state);t.preventDefault();var o=e.state.tr;o.setMeta(Yu,{setDragging:{startX:t.clientX,startY:t.clientY},activeHandle:n,nodePosition:r.nodePosition}),o.setMeta("addToHistory",!1),function(e,t,n){var r=e.state.doc.nodeAt(n),o=ed(e.nodeDOM(n)),i=dd(o),a=i.width,s=i.height,l=i.colsWidth,c=i.rowsHeight,u=i.offsetWidth,d=i.offsetHeight,p=o.firstChild,f=Array.from(p&&p.children||[]),h=!1;f.forEach((function(e,t){e.style.width&&!/%$/.test(e.style.width)&&(e.style.width=100*l[t]/a+"%",h=!0)}));var m=!1;r.forEach((function(e,r,o){var i=Uu(e.attrs.style).height;i&&!/%$/.test(i)&&(t.setNodeMarkup(n+r+1,null,Gu(e.attrs,"height",100*c[o]/s+"%")),m=!0)}));var g=r.attrs;Uu(g.style).width!==u+"px"&&(g=Gu(g,"width",u+"px")),h&&(g[yt]=p.outerHTML),m&&(g=Gu(g,"height",d+"px")),(h||m)&&t.setNodeMarkup(n,null,g)}(e,o,r.nodePosition),e.dispatch(o);var i=t.view||window;function a(t){!function(e,t){var n=Yu.getState(e.state),r=n.dragging,o=n.nodePosition,i=n.activeHandle;if(!(o<0)&&r){var a=ed(e.nodeDOM(o)),s=a.getBoundingClientRect(),l=Au[i],c=(t.clientX-r.startX)*l.x,u=(t.clientY-r.startY)*l.y,d=(a.ownerDocument&&a.ownerDocument.defaultView||window).getComputedStyle(a),p=/px/.test(d.width)?parseFloat(d.width):a.offsetWidth,f=/px/.test(d.height)?parseFloat(d.height):a.offsetHeight,h=l.x?c+p:s.width,m=l.y?u+f:s.height;r.startX=l.x?t.clientX:r.startX,r.startY=l.y?t.clientY:r.startY,ld[i]&&(a.style.width=h+"px"),cd[i]&&(a.style.height=m+"px")}}(e,t)}return i.addEventListener("mouseup",(function t(n){i.removeEventListener("mouseup",t),i.removeEventListener("mousemove",a),function(e){var t=Yu.getState(e.state),n=t.dragging,r=t.nodePosition,o=t.activeHandle;if(n){var i=e.state.doc.nodeAt(r),a=ed(e.nodeDOM(r)),s=dd(a);if(i){var l=s.offsetWidth+"px",c=s.offsetHeight+"px",u=e.state.tr,d=i.attrs,p=Uu(d.style);ld[o]&&a.style.width&&p.width!==l&&(d=Gu(d,"width",l)),cd[o]&&a.style.height&&p.height!==c&&(d=Gu(d,"height",c)),d=function(e,t,n,r){var o=e.state.doc.nodeAt(n),i=ed(e.nodeDOM(n)),a=(i.ownerDocument&&i.ownerDocument.defaultView||window).getComputedStyle,s=Array.from(i.rows);o.forEach((function(e,r,o){var i=Uu(e.attrs.style).height;i&&!/px$/.test(i)&&t.setNodeMarkup(n+r+1,null,Gu(e.attrs,"height",a(s[o]).height))}));var l=i.firstChild,c=Array.from(l&&l.children||[]),u=!1;c.forEach((function(e,t){e.style.width&&!/px$/.test(e.style.width)&&(e.style.width=a(c[t]).width,u=!0)}));var d=Pt({},r);return u&&(d[yt]=l.outerHTML),d}(e,u,r,d),u.setNodeMarkup(r,null,d),u.setMeta("commandName","node-resize"),u.setMeta("args",d),u.setMeta(Yu,{setDragging:null,activeHandle:null,nodePosition:r}),e.dispatch(u)}}}(e)})),i.addEventListener("mousemove",a),!0},fd=function(){function e(){}return e.prototype.ignoreMutation=function(e){return"attributes"===e.type&&"style"===e.attributeName&&"TR"===e.target.nodeName},e}();function hd(){var e=new ft({key:Ju,state:{init:function(e,t){return this.spec.props.nodeViews[ks(t.schema).row.name]=function(e,t){return new fd},new md(-1,null)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return Qu(Ju,e)?null:Ju.getState(e).activeHandle>-1?{class:"resize-cursor-vertical"}:null},handleDOMEvents:{mousemove:function(e,t){return Zu(Ju,e.state)||function(e,t,n){var r=Ju.getState(e.state);if(!r.dragging){var o=td(t.target),i=-1;if(o){var a=o.parentNode,s=a.getBoundingClientRect();Math.abs(t.clientY-s.top)<=5&&a.rowIndex>0?i=gd(e,t,a.rowIndex-1):s.bottom-t.clientY>0&&s.bottom-t.clientY<=5&&(i=gd(e,t,a.rowIndex))}i!==r.activeHandle&&vd(e,i)}}(e,t),!1},mouseleave:function(e){return function(e){var t=Ju.getState(e.state);t.activeHandle>-1&&!t.dragging&&vd(e,-1)}(e),!1},mousedown:function(e,t){return function(e,t){var n=Ju.getState(e.state);if(-1===n.activeHandle||n.dragging)return!1;var r=e.state.doc,o=r.resolve(n.activeHandle),i=r.nodeAt(n.activeHandle),a=o.parent,s=Uu(i.attrs.style).height,l=Uu(a.attrs.style).height,c=s?parseFloat(s):0;function u(t){t.view.removeEventListener("mouseup",u),t.view.removeEventListener("mousemove",d);var n=Ju.getState(e.state);if(n.dragging){var r=e.state.tr.setMeta(Ju,{setDragging:null});!function(e,t,n){var r=e.state.doc,o=r.nodeAt(n),i=e.nodeDOM(n),a=i.ownerDocument&&i.ownerDocument.defaultView||window;i.style.height=a.getComputedStyle(i).height,t.setNodeMarkup(n,null,Gu(o.attrs,"height",i.style.height));var s=i&&i.closest("table"),l=s&&s.style.height;if(l){var c=r.resolve(n),u=c.start(c.depth)-1;t.setNodeMarkup(u,null,Gu(c.parent.attrs,"height",l))}}(e,r,n.activeHandle),e.dispatch(r)}}function d(t){if(!t.which)return u(t);var n=Ju.getState(e.state),r=function(e,t){var n=t.clientY-e.startY;return e.startHeight.rowHeight+n}(n.dragging,t),o=t.clientY-n.dragging.startY;!function(e,t,n,r,o){var i=e.nodeDOM(t);if(i){i.style.height=n+"px";var a=i.ownerDocument&&i.ownerDocument.defaultView||window;i.style.height=a.getComputedStyle(i).height;var s=i.closest("table"),l=parseFloat(o)+r+"px",c=s&&s.style.height;c&&c!==l&&(s.style.height=parseFloat(o)+r+"px",s.style.height=a.getComputedStyle(s).height)}}(e,n.activeHandle,r,o,l)}return s||(c=e.nodeDOM(n.activeHandle).offsetHeight),e.dispatch(e.state.tr.setMeta(Ju,{setDragging:{startY:t.clientY,startHeight:{rowHeight:c,tableHeight:l}}})),t.view.addEventListener("mouseup",u),t.view.addEventListener("mousemove",d),t.preventDefault(),!0}(e,t)}},decorations:function(e){if(Zu(Ju,e))return Fa.empty;var t=Ju.getState(e);return t.activeHandle>-1?function(e,t){var n=[];if("number"!=typeof t)return Fa.empty;for(var r=e.doc.resolve(t),o=r.parent,i=ms.get(o),a=r.index(r.depth),s=r.start(r.depth),l=0;l<i.width;l++){var c=l+a*i.width,u=i.map[c],d=o.nodeAt(u),p=s+u+(d?d.nodeSize:0)-1,f=document.createElement("div");f.className="row-resize-handle",n.push(_a.widget(p,f))}return Fa.create(e.doc,n)}(e,t.activeHandle):void 0},nodeViews:{}}});return e}var md=function(){function e(e,t){this.activeHandle=e,this.dragging=t}return e.prototype.apply=function(t){var n,r=this,o=t.getMeta(Ju);if(o&&null!=o.setHandle)return new e(o.setHandle,null);if(o&&void 0!==o.setDragging)return new e(r.activeHandle,o.setDragging);if(r.activeHandle>-1){var i=t.mapping.map(r.activeHandle,-1);"row"===(n=t.doc.resolve(i)).parent.type.spec.tableRole&&n.nodeAfter||(i=null),r=new e(i,r.dragging)}return r},e}();function gd(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=e.state.doc.resolve(r.pos),i=nd(o,(function(e){return"table"===e.type.spec.tableRole}));if(null===i)return-1;var a=o.start(i.depth),s=i.node,l=ms.get(s);return a+l.map[l.width*n]-1}function vd(e,t){var n=e.state.tr;n.setMeta("addToHistory",!1),n.setMeta(Ju,{setHandle:t}),e.dispatch(n)}var yd=function(){return[(void 0===n&&(n={node:"table"}),new ft({key:Yu,view:function(e){return{selectedNode:function(e,t){var n=e.selection;if(n instanceof et&&t===n.node.type&&n instanceof et)return{node:n.node,pos:n.from};var r=nd(n.$from,(function(e){return e.type===t})),o=r&&r.node;if(o){var i=new Array(n.$from.depth+1).fill(0).findIndex((function(e,t){return"table"===n.$from.node(t).type.spec.tableRole}));return{node:o,pos:n.$from.start(i)-1}}return null},update:function(e,t){var r,o,i,a,s,l=e.state,c=l.schema.nodes[n.node],u=this.selectedNode(l,c),d=this.selectedNode(t,c);if((u||!d||t.doc.eq(e.state.doc))&&(u||d)){var p=l.tr;p.setMeta("addToHistory",!1),u&&d&&u.pos!==d.pos?(p.setMeta(Yu,{nodePosition:u.pos}),p.setNodeMarkup(d.pos,c,Pt(Pt({},d.node.attrs),((r={})[bt]=!1,r))),p.setNodeMarkup(u.pos,c,Pt(Pt({},u.node.attrs),((o={})[bt]=!0,o))),e.dispatch(p)):u&&d&&u.pos===d.pos&&!u.node.attrs[bt]&&!l.selection.eq(t.selection)?(p.setMeta(Yu,{nodePosition:u.pos}),e.dispatch(p.setNodeMarkup(u.pos,c,Pt(Pt({},u.node.attrs),((i={})[bt]=!0,i))))):u&&!d?(p.setMeta(Yu,{nodePosition:u.pos}),e.dispatch(p.setNodeMarkup(u.pos,c,Pt(Pt({},u.node.attrs),((a={})[bt]=!0,a))))):!u&&d&&(p.setMeta(Yu,{nodePosition:-1}),e.dispatch(p.setNodeMarkup(d.pos,c,Pt(Pt({},d.node.attrs),((s={})[bt]=!1,s)))))}}}},state:{init:function(){return new ud("",null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(e,t){return pd(e,t)}}}})),(e=$u,t=new ft({key:Xu,state:{init:function(t,n){return this.spec.props.nodeViews[ks(n.schema).table.name]=function(t,n){return new e(t,n)},new rd(-1,null)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return Qu(Xu,e)?null:Xu.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,t){return Zu(Xu,e.state)||function(e,t,n){var r=Xu.getState(e.state);if(!r.dragging){var o=td(t.target),i=-1;if(o){var a=function(e){var t=e.parentNode;return{cellIndex:e.cellIndex,rowIndex:t.rowIndex}}(o),s=o.getBoundingClientRect(),l=s.left,c=s.right;Math.abs(t.clientX-l)<=5&&a.cellIndex>0?(a.cellIndex--,i=od(e,t,a)):c-t.clientX>0&&c-t.clientX<=5&&(i=od(e,t,a))}i!==r.activeHandle&&ad(e,i)}}(e,t),!1},mouseleave:function(e){return function(e){var t=Xu.getState(e.state);t.activeHandle>-1&&!t.dragging&&ad(e,-1)}(e),!1},mousedown:function(e,t){return function(e,t,n){var r,o=Xu.getState(e.state);if(-1===o.activeHandle||o.dragging)return!1;for(var i=e.state.doc.resolve(o.activeHandle),a=i.parent,s=i.index(),l=0,c=0;c<=s;c++)l+=a.child(c).attrs.colspan;var u,d,p=i.node(i.depth-1),f=e.domAtPos(o.activeHandle),h=f.node.childNodes[f.offset].closest("table");if(p.attrs[yt])(u=(g=h.firstChild).children[l-1]).style.width||(u.style.width=u.offsetWidth+"px");else{var m=0;for(c=0;c<a.childCount;c++)m+=a.child(c).attrs.colspan;var g=document.createElement("colgroup"),v=new Array(m);for(c=0;c<m;c++)v[c]=document.createElement("col"),g.appendChild(v[c]);h.insertBefore(g,h.firstChild),(u=v[s]).style.width=u.offsetWidth+"px",d=Pt(Pt({},p.attrs),((r={})[yt]="<colgroup>"+v.reduce((function(e,t){return e+t.outerHTML}),"")+"</colgroup>",r))}var y=parseFloat(u.style.width),b=e.state.tr.setMeta(Xu,{setDragging:{startX:t.clientX,startWidth:y}});if(!h.style.width){var k=Array.from(u.parentNode.children).map((function(e){return e.style.width}));if(k.every(Boolean)){var w=k.reduce((function(e,t){return e+parseFloat(t)}),0);d=Gu(d||p.attrs,"width",w+"px")}}if(d){var C=i.posAtIndex(0,i.depth-1)-1;b.setNodeMarkup(C,null,d)}function x(t){t.view.removeEventListener("mouseup",x),t.view.removeEventListener("mousemove",O);var n=Xu.getState(e.state);if(n.dragging){var r=e.state.tr;!function(e,t,n,r){var o,i=e.state.doc.resolve(n),a=i.node(-1),s=i.start(-1),l=i.posAtIndex(0,i.depth-1)-1,c=e.nodeDOM(s).closest("table"),u=a.attrs;if(a&&u[yt]){var d=c.firstChild;u=Pt(Pt({},u),((o={})[yt]=d.outerHTML,o))}var p=c.style.width;c&&p&&Uu(u.style).width!==p&&(u=Gu(u,"width",p),t.setNodeMarkup(l,null,u))}(e,r,n.activeHandle,id(n.dragging,t,25)),e.dispatch(r.setMeta(Xu,{setDragging:null}))}}function O(t){if(!t.which)return x(t);var n=Xu.getState(e.state),r=id(n.dragging,t,25);!function(e,t,n,r){var o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=ms.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;"TABLE"!==l.nodeName&&(l=l.closest("table"));var c=l,u=c.firstChild,d=Array.from(u.children);if(d[s].style.width=n+"px",c.style.width){var p=d.map((function(e){return e.style.width}));if(p.every(Boolean)){var f=p.reduce((function(e,t){return e+parseFloat(t)}),0);c.style.width=f+"px"}}}(e,n.activeHandle,r)}return e.dispatch(b),t.view.addEventListener("mouseup",x),t.view.addEventListener("mousemove",O),t.preventDefault(),!0}(e,t)}},decorations:function(e){if(!Zu(Xu,e)){var t=Xu.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=ms.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,l=0;l<i.height;l++){var c=s+l*i.width-1;if(!(s!==i.width&&i.map[c]===i.map[c+1]||0!==l&&i.map[c-1]===i.map[c-1-i.width])){var u=i.map[c],d=a+u+o.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",n.push(_a.widget(d,p))}}return Fa.create(e.doc,n)}(e,t.activeHandle)}return Fa.empty},nodeViews:{}}}),t),hd()];var e,t,n};function bd(e={}){return new ft({view:t=>new kd(t,e)})}class kd{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),o=n?t.bottom:t.top;n&&r&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:t.left,right:t.right,top:o-this.width/2,bottom:o+this.width/2}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let n,r,o=this.editorView.dom.offsetParent;if(this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!o||o==document.body&&"static"==getComputedStyle(o).position)n=-pageXOffset,r=-pageYOffset;else{let e=o.getBoundingClientRect();n=e.left-o.scrollLeft,r=e.top-o.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-r+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t):r;if(t&&!o){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&(e=Pe(this.editorView.state.doc,e,this.editorView.dragging.slice),null==e))return this.setCursor(null);this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class wd extends Ge{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return wd.valid(n)?new wd(n):Ge.near(n)}content(){return f.empty}eq(e){return e instanceof wd&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new wd(e.resolve(t.pos))}getBookmark(){return new Cd(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&wd.valid(e))return e;let r=e.pos,o=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){o=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let a=e.doc.resolve(r);if(wd.valid(a))return a}for(;;){let i=t>0?o.firstChild:o.lastChild;if(!i){if(o.isAtom&&!o.isText&&!et.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),n=!1;continue e}break}o=i,r+=t;let a=e.doc.resolve(r);if(wd.valid(a))return a}return null}}}wd.prototype.visible=!1,wd.findFrom=wd.findGapCursorFrom,Ge.jsonID("gapcursor",wd);class Cd{constructor(e){this.pos=e}map(e){return new Cd(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return wd.valid(t)?new wd(t):Ge.near(t)}}function xd(){return new ft({props:{decorations:Nd,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&wd.valid(n)?new wd(n):null,handleClick:Ed,handleKeyDown:Od,handleDOMEvents:{beforeinput:Id}}})}const Od=ao({ArrowLeft:Sd("horiz",-1),ArrowRight:Sd("horiz",1),ArrowUp:Sd("vert",-1),ArrowDown:Sd("vert",1)});function Sd(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){let i=e.selection,a=t>0?i.$to:i.$from,s=i.empty;if(i instanceof Ze){if(!o.endOfTextblock(n)||0==a.depth)return!1;s=!1,a=e.doc.resolve(t>0?a.after():a.before())}let l=wd.findGapCursorFrom(a,t,s);return!!l&&(r&&r(e.tr.setSelection(new wd(l))),!0)}}function Ed(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!wd.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&et.isSelectable(e.state.doc.nodeAt(o.inside))||(e.dispatch(e.state.tr.setSelection(new wd(r))),0))}function Id(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof wd))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=s.empty;for(let e=r.length-1;e>=0;e--)o=s.from(r[e].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new f(o,0,0));return i.setSelection(Ze.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function Nd(e){if(!(e.selection instanceof wd))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Fa.create(e.doc,[_a.widget(e.selection.head,t,{key:"gapcursor"})])}var Td=function(e,t,n){for(var r,o=e.table,i=e.table_row,a=e.table_cell,s=[],l=0;l<t+1;l++){r=[];for(var c=0;c<n+1;c++)r.push(a.createAndFill());s.push(i.createAndFill(void 0,r))}return o.createAndFill(void 0,s)},Md=function(e,t){for(var n=e.$head,r=n.depth;r>0;r--){var o=n.node(r);if(o.type.name===t)return{pos:n.before(r),node:o}}return null},Dd=function(e,t){var n=t&&function(e){var n,r=Md(e.selection,"table_row"),o=Md(e.selection,"table");if(r&&o&&r.node.attrs[vt]){for(var i=0,a=0;a<o.node.nodeSize;a++)if(o.node.child(a).eq(r.node)){i=a;break}var s=o.node.child(i-1),l=r.pos-s.nodeSize;e.setNodeMarkup(l,void 0,((n={})[vt]=r.node.attrs[vt],n))}return t(e)};return ul(e,n)},Rd=function(e,t){return dl(e,t&&function(e){var n,r=Md(e.selection,"table_row");if(r&&r.node.attrs[vt]){var o=r.pos+r.node.nodeSize;e.setNodeMarkup(o,void 0,((n={})[vt]=r.node.attrs[vt],n))}return t(e)})}},1574:(e,t,n)=>{n.r(t),n.d(t,{Checkbox:()=>dn,CheckboxPropsContext:()=>un,ColorGradient:()=>ct,ColorGradientPropsContext:()=>lt,ColorPalette:()=>gt,ColorPalettePropsContext:()=>mt,ColorPicker:()=>Ot,ColorPickerPropsContext:()=>xt,FlatColorPicker:()=>Nt,Input:()=>He,InputPropsContext:()=>Ve,MaskedTextBox:()=>Ut,MaskedTextBoxPropsContext:()=>qt,NumericTextBox:()=>Fe,NumericTextBoxPropsContext:()=>je,RadioButton:()=>hn,RadioButtonPropsContext:()=>fn,RadioGroup:()=>yn,RadioGroupPropsContext:()=>vn,RangeSlider:()=>Qt,RangeSliderPropsContext:()=>Zt,Rating:()=>_n,RatingItem:()=>xn,RatingPropsContext:()=>Pn,SLIDER_LABEL_ATTRIBUTE:()=>W,Slider:()=>J,SliderLabel:()=>$,SliderPropsContext:()=>X,Switch:()=>ln,SwitchPropsContext:()=>sn,TextArea:()=>Cn,TextAreaPropsContext:()=>wn});var r,o,i=n(3899),a=n(189),s=n(9124),l=n(3198),c=n(8047),u=n(4703),d=n(1779),p=n(848),f=n(4006),h={name:"@progress/kendo-react-inputs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031562,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},m=n(3493),g=n(5407),v=n(499),y="numerictextbox.increment",b="numerictextbox.decrement",k="slider.dragTitle",w="colorGradient.r",C="colorGradient.g",x="colorGradient.b",O="colorGradient.a",S="colorGradient.hex",E="colorGradient.contrastRatio",I="colorGradient.colorGradientAALevel",N="colorGradient.colorGradientAAALevel",T="colorGradient.colorGradientPass",M="colorGradient.colorGradientFail",D="colorGradient.hueSliderLabel",R="colorGradient.alphaSliderLabel",P="colorGradient.toggleInputsButton",_="flatColorPicker.cancelBtn",A="flatColorPicker.applyBtn",j="checkbox.validation",F="checkbox.optionalText",z="switch.validation",L="colorPicker.dropdownButtonAriaLabel",B="rating.ariaLabel",V=((r={})[y]="Increase value",r[b]="Decrease value",r["slider.increment"]="Increase",r["slider.decrement"]="Decrease",r[k]="Drag",r[w]="r",r[C]="g",r[x]="b",r[O]="a",r[S]="hex",r[E]="Contrast ratio",r[I]="AA",r[N]="AAA",r[T]="Pass",r[M]="Fail",r[D]="Hue slider",r[R]="Alpha slider",r[P]="Toggle colorgradient inputs",r[_]="Cancel",r[A]="Apply",r[j]="Please check this box if you want to proceed!",r[F]="(Optional)",r["radioButton.validation"]="Please select option if you want to proceed!",r[z]="Please turn on if you want to proceed!",r[L]="Select",r[B]="Rating",r),H=n(8199),K=function(){return K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},K.apply(this,arguments)},W="data-slider-label",$=function(e){var t,n,r=i.useRef(null),o=(0,H.n)(r),a=e.vertical?{bottom:"".concat(e.position,"%")}:((t={})["rtl"===o?"right":"left"]="".concat(e.position,"%"),t),s=e.vertical?"k-tick-vertical":"k-tick-horizontal";return i.createElement("li",{ref:r,className:"k-tick k-tick-large ".concat(s),title:e.title,style:K({zIndex:1,position:"absolute"},a)},i.createElement("span",K({},((n={})[W]=!0,n),{className:"k-label",onClick:e.onClick}),e.children))},q=n(7037),U=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),G=function(){return G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},G.apply(this,arguments)},Y=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:void 0===n.props.defaultValue?n.props.min:n.props.defaultValue,focused:!1,dir:n.props.dir},n._sliderTrack=null,n._element=null,n.buttons=function(e){return e.enabled?i.createElement(i.Fragment,null,i.createElement(q.z,{className:"k-button-decrease k-rounded-full",icon:n.props.vertical?"arrow-s":"arrow-w",title:e.decrementTitle,onClick:e.decrement}),e.children,i.createElement(q.z,{className:"k-button-increase k-rounded-full",icon:n.props.vertical?"arrow-n":"arrow-e",title:e.incrementTitle,onClick:e.increment})):e.children},n.focus=function(){n._element&&n._element.focus()},n.isLabel=function(e){for(var t=e;t;){if(Boolean(t.getAttribute(W)))return!0;t=t.parentElement}return!1},n.onFocus=function(){n.setState({focused:!0})},n.onBlur=function(){n.setState({focused:!1})},n.onKeyDown=function(e){var t=void 0;e.keyCode===m.R.left||e.keyCode===m.R.down?t=n.state.value-(n.props.step||0):e.keyCode===m.R.right||e.keyCode===m.R.up?t=n.state.value+(n.props.step||0):e.keyCode===m.R.home?t=n.props.min:e.keyCode===m.R.end&&(t=n.props.max),void 0!==t&&(e.preventDefault(),n.change(e,t))},n.decrement=function(e){e.preventDefault(),n.change(e,n.state.value-(n.props.step||0))},n.increment=function(e){e.preventDefault(),n.change(e,n.state.value+(n.props.step||0))},n.dragStart=function(e){n.isLabel(e.event.originalEvent.target)||(e.event.isTouch&&e.event.originalEvent.preventDefault(),n.drag(e))},n.dragOver=function(e){e.event.originalEvent.preventDefault(),n.drag(e)},n.drag=function(e){var t=e.element.getBoundingClientRect(),r=(n.props.vertical?t.bottom-e.event.clientY:"rtl"===n.state.dir?t.right-e.event.clientX:e.event.clientX-t.left)/(n.props.vertical?t.height:t.width);n.change(e,n.props.min+r*(n.props.max-n.props.min))},(0,f.s)(h),n}return U(t,e),t.getDerivedStateFromProps=function(e,t){var n=void 0!==e.value?e.value:t.value,r=e.min,o=e.max;return void 0===n?null:{value:Math.min(Math.max(n,r),o)}},t.prototype.componentDidMount=function(){if(!this.state.dir&&window&&this._element){var e=window.getComputedStyle(this._element).direction;e&&this.setState({dir:e})}},t.prototype.render=function(){var e,t=this,n=(0,v.provideLocalizationService)(this),r=(this.state.value-this.props.min)/(this.props.max-this.props.min)*100,o=this.props.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},a=this.props.vertical?{paddingTop:0,height:"100%"}:{};return i.createElement("div",{ref:function(e){return t._element=e},dir:this.state.dir,id:this.props.id,style:G({gap:0},this.props.style),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,className:(0,c.A)("k-slider k-widget",{"k-focus":this.state.focused,"k-disabled":this.props.disabled,"k-slider-horizontal":!this.props.vertical,"k-slider-vertical":this.props.vertical},this.props.className)},i.createElement(this.buttons,{enabled:this.props.buttons,decrement:this.decrement,increment:this.increment,incrementTitle:n.toLanguageString("slider.increment",V["slider.increment"]),decrementTitle:n.toLanguageString("slider.decrement",V["slider.decrement"])},i.createElement(d._,{onDrag:this.dragOver,onPress:this.dragStart},i.createElement("div",{className:"k-slider-track-wrap",style:G({flexGrow:1,position:"relative",touchAction:"none"},o)},this.props.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:G({margin:0},a)},i.Children.map(this.props.children,(function(e){return e&&i.cloneElement(e,{position:100*(e.props.position-t.props.min)/(t.props.max-t.props.min),vertical:t.props.vertical},e.props.children)}))),i.createElement("div",{className:"k-slider-track",style:this.props.vertical?{bottom:0,height:"100%"}:(e={},e["rtl"===this.state.dir?"right":"left"]=0,e.width="100%",e),ref:function(e){return t._sliderTrack=e}},i.createElement("div",{className:"k-slider-selection",style:this.props.vertical?{height:r+"%"}:{width:r+"%"}}),i.createElement("span",{role:"slider","aria-valuemin":this.props.min,"aria-valuemax":this.props.max,"aria-valuenow":this.state.value,"aria-valuetext":String(this.state.value),"aria-orientation":this.props.vertical?"vertical":void 0,"aria-disabled":this.props.disabled?"true":void 0,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel,tabIndex:(0,u.p)(this.props.tabIndex,this.props.disabled,void 0),className:"k-draghandle",title:n.toLanguageString(k,V[k]),style:this.props.vertical?{bottom:"calc("+r+"%)",zIndex:1}:"rtl"===this.state.dir?{right:"calc("+r+"% - 13px)",zIndex:1}:{left:"calc("+r+"%)",zIndex:1}}))))))},Object.defineProperty(t.prototype,"sliderTrack",{get:function(){return this._sliderTrack},enumerable:!1,configurable:!0}),t.prototype.change=function(e,t){t=Math.min(Math.max(t,this.props.min),this.props.max),this.setState({value:t}),(0,g.N)(this.props.onChange,e,this,{value:t})},t.displayName="Slider",t.propTypes={min:a.number.isRequired,max:a.number.isRequired,value:a.number,vertical:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,ariaLabel:a.string},t}(i.Component),X=(0,p.Y)(),J=(0,p.u)(X,Y);J.displayName="KendoReactSlider",(0,v.registerForLocalization)(Y);var Z=function(e){return null!=e},Q=function(e,t,n){return!Z(e)||isNaN(e)||e<=t?t:e>=n?n:e},ee=n(4407),te=function(e,t,n){if(void 0===n&&(n=!0),-1===["hex","rgba"].indexOf(t))throw new Error("Unsupported color output format '".concat(t,"'. The available options are 'hex' or 'rgba'."));if(Z(e)){var r=(0,ee.parseColor)(e.trim(),n);if(Z(r))return"hex"===t?r.toCss():r.toCssRgba()}},ne=function(e,t){void 0===t&&(t=!0);var n=(0,ee.parseColor)(e,t);return Z(n)?n.toHSV():{}},re=function(e,t){void 0===t&&(t=!0);var n=(0,ee.parseColor)(e,t);return Z(n)?n.toBytes():{}},oe=function(e){var t=Q(e.h,0,359.9),n=Q(e.s,0,1),r=Q(e.v,0,1),o=Q(e.a,0,1);return ee.Color.fromHSV(t,n,r,o).toCssRgba()},ie=function(e){return oe({h:e,s:1,v:1,a:1})},ae=function(e,t){var n=Q(e.r,0,255),r=Q(e.g,0,255),o=Q(e.b,0,255),i=Q(e.a,0,1),a=Q(t.r,0,255),s=Q(t.g,0,255),l=Q(t.b,0,255);return{r:Math.round((1-i)*a+i*n),g:Math.round((1-i)*s+i*r),b:Math.round((1-i)*l+i*o)}},se=function(e){var t=[e.r||0,e.g||0,e.b||0].map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*t[0]+.7152*t[1]+.0722*t[2]},le=function(e,t){return n=se(ae(e,t)),r=se(ae(t,{r:0,g:0,b:0,a:1})),(Math.max(n,r)+.05)/(Math.min(n,r)+.05);var n,r},ce={},ue=n(9656),de=n(2697),pe=n(6097),fe=function(){return fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fe.apply(this,arguments)},he=1111111.1111111,me=/\d/,ge=function(e,t){return void 0!==e?e:t},ve=function(e,t,n){return null===e&&void 0===e?"":"string"==typeof e?e:n.formatNumber(e,t)},ye=function(e){return(String(e).split(".")[1]||"").length},be=function(e,t){return Math.max(ye(e),ye(t))},ke=function(e,t){var n=function(e){return Math.min(e,15)}(t);return parseFloat(e.toFixed(n))},we=function(e,t,n,r,o,i,a){var s=be(e||0,n||0),l=xe(ke((e||0)+(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=ve(l,i,a),t.selectionStart=t.selectionEnd=Ne(t.currentLooseValue,me)},Ce=function(e,t,n,r,o,i,a){var s=be(e||0,n||0),l=xe(ke((e||0)-(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=ve(l,i,a),t.selectionStart=t.selectionEnd=Ne(t.currentLooseValue,me)},xe=function(e,t,n){return null==e?e:e>1||e<1||1===e?void 0!==n&&void 0!==t&&n<t?null:(void 0!==n&&e>n&&(e=n),void 0!==t&&e<t&&(e=t),e):null},Oe=function(e,t,n,r){e.selectionStart=e.selectionEnd=t,function(e,t,n){var r=function(e,t){var n=t.findIndex((function(t){t[0];var n=t[1];return Boolean(n)&&e.indexOf(n)===e.length-n.length}));if(-1===n)return-1;var r=t[n][1];return e.length-r.length}(e,t);if(-1!==r&&n.selectionStart>r)n.selectionStart=n.selectionEnd=r;else{n.selectionStart>e.length&&(n.selectionStart=n.selectionEnd=e.length);var o=function(e,t){var n=t.findIndex((function(t){var n=t[0];return t[1],Boolean(n)&&0===e.indexOf(n)}));return-1===n?-1:t[n][0].length}(e,t);-1!==o&&n.selectionStart<o&&(n.selectionStart=n.selectionEnd=o),-1===n.selectionStart&&(n.selectionStart=n.selectionEnd=0)}}(n,r,e)},Se=function(e,t,n,r){e.eventValue=r.parseNumber(e.prevLooseValue,t),e.currentLooseValue=e.prevLooseValue,e.valueIsCorrected=!0,Oe(e,e.selectionStart,e.currentLooseValue,n)},Ee=function(e,t){var n=e.indexOf(t.decimal);return n>-1?n:Ne(e,me)},Ie=function(e){return e.split("").reverse().join("")},Ne=function(e,t){return e.length-Ie(e).search(t)},Te=function(e){return e.split(e[e.search(me)])[0]},Me=function(e){var t=Ie(e);return Ie(t.split(t[t.search(me)])[0])},De=function(e,t){return e.search(t)},Re=function(e,t){var n=e.indexOf(t);return n>-1?e.length-n-1:0},Pe=function(e,t,n,r,o){var i="0"===e.replace(o,"")[0],a="0"===t.replace(o,"")[0];if(i&&!a)return n-1;if(a&&r)return n+1;for(var s=0,l=0;l<n;l++)me.test(e.charAt(l))&&s++;for(var c=0;s>0&&t.length>c;)me.test(t.charAt(c))&&s--,c++;return c},_e=function(e,t,n){var r=fe({},e),o=r.prevLooseValue,i=n.numberSymbols(),a=function(e,t){var n=t.formatNumber(he,e),r=t.formatNumber(-he,e),o=t.formatNumber(0,e),i=t.formatNumber(1,e),a=t.numberSymbols(),s=new RegExp("[\\d\\".concat(a.decimal).concat(a.group,"]"),"g");return[n,r,o,i].map((function(e){return e.replace(s,"")})).join("").split("").filter((function(e,t,n){return n.indexOf(e)===t})).join("")}(t,n),s=String(r.currentLooseValue),l=String(o),c=new RegExp("[^\\d\\".concat(i.decimal,"]"),"g"),u=new RegExp("[^\\d\\".concat(i.decimal,"\\").concat(i.group,"]"),"g"),d=new RegExp("[\\d\\".concat(i.decimal,"\\").concat(i.group,"]")),p=s.replace(c,""),f=De(s,me),h=-1===f?-1:Ne(s,me),m=s.indexOf(i.decimal),g=(s.substring(0,f)+s.substring(f,h).replace(u,"")+s.substring(h,s.length)).split("").filter((function(e){return-1!==a.indexOf(e)||-1!==e.search(d)})).join(""),v=n.formatNumber(.31111111111111117,t).replace(c,""),y=v.indexOf(i.decimal),b=y>-1?v.length-y-1:0,k=n.formatNumber(1,t).replace(c,""),w=k.indexOf(i.decimal),C=w>-1?k.length-w-1:0,x=function(e,t){var n=t.formatNumber(he,e),r=t.formatNumber(-he,e),o=t.formatNumber(0,e),i=t.formatNumber(1,e),a=Te(n),s=Te(r),l=Te(o),c=Te(i);return{positiveInfo:[a,Me(n)],negativeInfo:[s,Me(r)],zeroInfo:[l,Me(o)],oneInfo:[c,Me(i)]}}(t,n),O=[x.positiveInfo,x.negativeInfo,x.zeroInfo,x.oneInfo],S=1!==O.findIndex((function(e){return-1!==e.findIndex((function(e){return Boolean(e)}))})),E=s.length>0&&s.length<l.length,I="string"==typeof t&&"p"===t[0]&&s&&-1===s.indexOf(i.percentSign);if(!r.isPaste){if(""===s)return r.eventValue=null,r.currentLooseValue="",r;if(r.currentLooseValue===i.minusSign&&n.formatNumber(-0,t)!==l)return r.eventValue=-0,r.currentLooseValue=ve(r.eventValue,t,n),Oe(r,Ee(r.currentLooseValue,i),r.currentLooseValue,O),r;if(function(e,t){var n=String(e.currentLooseValue),r=String(e.prevLooseValue);return n.split(t.minusSign).length!==r.split(t.minusSign).length&&n.length===r.length+t.minusSign.length}(r,i)){var N=n.parseNumber(o,t);r.eventValue=-(null!==N?N:0),r.currentLooseValue=ve(r.eventValue,t,n);var T=De(r.currentLooseValue,me),M=De(l,me);return Oe(r,r.selectionEnd-1+(T-M),r.currentLooseValue,O),r}if(function(e,t){var n=String(e.currentLooseValue),r=String(e.prevLooseValue);return-1===n.indexOf(t.minusSign)&&-1!==r.indexOf(t.minusSign)}(r,i))return r.eventValue=n.parseNumber(r.currentLooseValue,t),Oe(r,r.selectionStart,r.currentLooseValue,O),r;if(r.currentLooseValue===i.decimal){r.eventValue=0;var D=ve(r.eventValue,t,n);if(0===C&&b>0){var R=Ne(D,me);r.currentLooseValue=D.substring(0,R)+i.decimal+D.substring(R)}else r.currentLooseValue=D;return Oe(r,Ee(r.currentLooseValue,i)+1,r.currentLooseValue,O),r}if(function(e,t){return String(e.currentLooseValue).split(t.decimal).length>2}(r,i))return Se(r,t,O,n),r;if(I)return r.eventValue=n.parseNumber(s,t)/100,r.currentLooseValue=ve(r.eventValue,t,n),r;if(String(r.currentLooseValue).replace(/[^\d]/g,"").length>15)return Se(r,t,O,n),r;if(p!==s&&s&&S){var P=O.findIndex((function(e){var t=e[0],n=e[1],r=s.indexOf(t),o=s.indexOf(n),a=0===r,l=o===s.length-n.length,c=r+t.length!==f&&-1!==f&&s[r+t.length]!==i.decimal,u=o!==h&&-1!==h&&s[o-1]!==i.decimal;return t&&n?!c&&!u&&a&&l:t?!c&&a:!!n&&!u&&l}));if(-1===P)return Se(r,t,O,n),r}if(p[p.length-1]===i.decimal&&b>0)return r.eventValue=n.parseNumber(s,t),r.currentLooseValue=g,r;if(r.currentLooseValue&&o&&(a+i.decimal+i.group).split("").findIndex((function(e){return s.split("").filter((function(t){return t===e})).length<l.split("").filter((function(t){return t===e})).length&&s.length+1===l.length&&(e!==i.decimal||0!==Re(l.replace(c,""),i.decimal))}))>-1)return r.eventValue=n.parseNumber(e.prevLooseValue,t),r.currentLooseValue=e.prevLooseValue,r;var _=Re(p,i.decimal),A="0"===p[p.length-1];if(E&&A&&_<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=ve(r.eventValue,t,n),r;if(_>0){var j=s.substring(0,m);if(A&&(!j||0!==l.indexOf(j))){r.eventValue=n.parseNumber(r.currentLooseValue,t);var F=ve(r.eventValue,t,n);return Oe(r,Pe(s,F,r.selectionEnd,E,c),F,O),r.currentLooseValue=F,r}if(_>b){var z=s.indexOf(i.decimal),L=s.substring(0,z)+s.substring(z,z+1+b)+s.substring(h,String(r.currentLooseValue).length);return r.eventValue=n.parseNumber(L,t),r.currentLooseValue=L,Oe(r,r.selectionStart,L,O),r}if(C!==b&&_<=b&&A)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=g,r;if(_<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=ve(r.eventValue,t,n),r}}return r.eventValue=n.parseNumber(r.currentLooseValue,t),I&&(r.eventValue=r.eventValue/100),"number"==typeof r.eventValue?(F=ve(r.eventValue,t,n),1===s.length?Oe(r,Ee(F,i),F,O):Oe(r,Pe(s,F,r.selectionEnd,E,c),F,O),r.currentLooseValue=F):r.currentLooseValue=ve(n.parseNumber(p),t,n),r},Ae=function(){return Ae=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ae.apply(this,arguments)},je=(0,p.Y)(),Fe=i.forwardRef((function(e,t){var n;(0,f.s)(h);var r=(0,ue.Y)(je,e),o=i.useMemo((function(){return(0,l.M)()}),[]),a=r.id||o,s=(0,v.useInternationalization)(),d=(0,v.useLocalization)(),p=i.useRef(null),m=i.useRef(),k=i.useState(!1),w=k[0],C=k[1],x=i.useRef({eventValue:null,prevLooseValue:"",currentLooseValue:"",focused:!1,selectionStart:void 0,selectionEnd:void 0,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1}),O=i.useRef(!1),S=i.useRef(),E=i.useRef(r.defaultValue),I=ve(x.current.focused&&!r.disabled?x.current.currentLooseValue:ge(r.value,E.current),r.format,s);S.current=I,i.useEffect((function(){p.current&&p.current.setCustomValidity&&p.current.setCustomValidity(R().valid?"":r.validationMessage||"Please enter a valid value!")}));var N=i.useCallback((function(){p.current&&p.current.focus()}),[]),T=i.useCallback((function(){return void 0!==m.current?m.current:ge(r.value,E.current)}),[r.value]),M=i.useCallback((function(){return r.name}),[r.name]),D=i.useCallback((function(){return r.required}),[r.required]),R=i.useCallback((function(){var e=void 0!==r.validationMessage,t=T();return{customError:e,valid:void 0!==r.valid?r.valid:!(x.current.valueIsOutOfRange||D()&&null==t),valueMissing:null==t}}),[r.validationMessage,r.valid,T,D]),P=i.useCallback((function(){return r.validityStyles}),[r.validityStyles]),_=i.useCallback((function(){return r}),[r]),A=i.useCallback((function(){var e={element:p.current,focus:N};return Object.defineProperty(e,"name",{get:M}),Object.defineProperty(e,"value",{get:T}),Object.defineProperty(e,"validity",{get:R}),Object.defineProperty(e,"validityStyles",{get:P}),Object.defineProperty(e,"required",{get:D}),Object.defineProperty(e,"props",{get:_}),e}),[M,T,R,P,D,N,_]);i.useImperativeHandle(t,A);var j=i.useCallback((function(){return{eventValue:ge(r.value,E.current),prevLooseValue:S.current,currentLooseValue:p.current.value,selectionStart:p.current.selectionStart,selectionEnd:p.current.selectionEnd,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1,isPaste:O.current,focused:x.current.focused}}),[r.value]),F=i.useCallback((function(e,t){if(!r.disabled){m.current=t.eventValue,E.current=t.eventValue;var n=ve(xe(t.eventValue,r.min,r.max),r.format,s),o=xe(s.parseNumber(n,r.format),r.min,r.max);o!==t.eventValue&&(t.valueIsOutOfRange=!0,t.eventValue=o,E.current=o),r.value!==t.eventValue&&(0,g.N)(r.onChange,e,A(),{value:t.eventValue}),m.current=void 0,x.current=t,C((function(e){return!e}))}}),[r.value,r.onChange,r.disabled,C,A]),z=i.useCallback((function(e){var t=j();O.current=!1,F(e,_e(t,r.format,s))}),[r.format,r.onChange,s,F,j]),L=i.useCallback((function(e){var t=j(),n=s.parseNumber(String(t.currentLooseValue),r.format);if(t.selectionEnd>t.selectionStart&&t.selectionEnd-t.selectionStart===String(t.currentLooseValue).length)O.current=!0;else{switch(e.keyCode){case 38:we(n,t,r.step,r.min,r.max,r.format,s);break;case 40:Ce(n,t,r.step,r.min,r.max,r.format,s);break;case 13:if(!1===r.rangeOnEnter)return;var o=ve(xe(n,r.min,r.max),r.format,s),i=xe(s.parseNumber(o,r.format),r.min,r.max);t.eventValue=i,t.currentLooseValue=ve(i,r.format,s),t.selectionStart=t.selectionEnd=t.currentLooseValue.length;break;case 110:var a=p.current,l=s.numberSymbols();a&&(t.currentLooseValue=t.currentLooseValue.slice(0,t.selectionStart)+l.decimal+t.currentLooseValue.slice(t.selectionEnd),t.selectionStart=t.selectionEnd=t.selectionStart+1,t=_e(t,r.format,s));break;default:return}e.preventDefault(),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.rangeOnEnter,F,j]),B=i.useCallback((function(){O.current=!0}),[]),H=i.useCallback((function(e){if(!r.readOnly&&!r.disabled){var t=j();we(s.parseNumber(String(t.currentLooseValue),r.format),t,r.step,r.min,r.max,r.format,s),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.readOnly,r.disabled,F,j]),K=i.useCallback((function(e){if(!r.readOnly&&!r.disabled){var t=j();Ce(s.parseNumber(String(t.currentLooseValue),r.format),t,r.step,r.min,r.max,r.format,s),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.readOnly,r.disabled,F,j]),W=i.useCallback((function(e){document&&document.activeElement===p.current&&p.current&&!r.readOnly&&!r.disabled&&(e.nativeEvent.deltaY<0&&H(e),e.nativeEvent.deltaY>0&&K(e))}),[H,K,r.disabled,r.readOnly]),$=i.useCallback((function(e){x.current.currentLooseValue=S.current,x.current.focused=!0,(0,g.N)(r.onFocus,e,A(),{}),C((function(e){return!e}))}),[r.onFocus,C,A]),U=i.useCallback((function(e){x.current={eventValue:null,prevLooseValue:"",currentLooseValue:"",focused:!1,selectionStart:void 0,selectionEnd:void 0,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1},(0,g.N)(r.onBlur,e,A(),{}),C((function(e){return!e}))}),[r.onBlur,C,A]),G=i.useCallback((function(e){document&&p.current&&(e.preventDefault(),document.activeElement!==p.current&&p.current.focus())}),[]);i.useLayoutEffect((function(){p.current&&void 0!==x.current.selectionStart&&void 0!==x.current.selectionEnd&&(p.current.selectionStart=x.current.selectionStart,p.current.selectionEnd=x.current.selectionEnd,x.current.selectionStart=void 0,x.current.selectionEnd=void 0)}),[w]);var Y=!P()||R().valid,X=i.createElement("span",{dir:r.dir,style:r.label?r.style:Ae({width:r.width},r.style),className:(0,c.A)("k-input","k-numerictextbox",(n={},n["k-input-".concat(de.G.sizeMap[r.size]||r.size)]=r.size,n["k-input-".concat(r.fillMode)]=r.fillMode,n["k-rounded-".concat(de.G.roundedMap[r.rounded]||r.rounded)]=r.rounded,n["k-invalid"]=!Y,n["k-required"]=r.required,n["k-disabled"]=r.disabled,n),r.className),"aria-disabled":r.disabled?"true":void 0},i.createElement("input",{value:null===I?"":I,tabIndex:(0,u.p)(r.tabIndex,r.disabled),accessKey:r.accessKey,disabled:r.disabled,title:r.title,"aria-valuemin":r.min,"aria-valuemax":r.max,"aria-label":r.ariaLabel,"aria-labelledby":r.ariaLabelledBy,"aria-describedby":r.ariaDescribedBy,placeholder:r.placeholder,spellCheck:!1,autoComplete:"off",autoCorrect:"off",type:r.inputType||"tel",className:"k-input-inner",id:a,name:r.name,readOnly:r.readOnly,style:r.inputStyle,onChange:z,onFocus:$,onBlur:U,onKeyDown:L,onPaste:B,onWheel:W,ref:p}),r.children,r.spinners&&i.createElement("span",{className:"k-input-spinner k-spin-button",onMouseDown:G},i.createElement(q.z,{tabIndex:-1,type:"button",icon:"arrow-n",rounded:null,className:"k-spinner-increase","aria-label":d.toLanguageString(y,V[y]),title:d.toLanguageString(y,V[y]),onClick:H}),i.createElement(q.z,{tabIndex:-1,type:"button",icon:"arrow-s",rounded:null,className:"k-spinner-decrease","aria-label":d.toLanguageString(b,V[b]),title:d.toLanguageString(b,V[b]),onClick:K})));return r.label?i.createElement(pe._,{label:r.label,editorId:a,editorValue:null===I?"":I,editorValid:Y,editorDisabled:r.disabled,editorPlaceholder:r.placeholder,children:X,style:{width:r.width},dir:r.dir}):X}));Fe.propTypes={value:a.number,defaultValue:a.number,step:a.number,format:a.oneOfType([a.string,a.shape({style:a.oneOf(["decimal","currency","percent","scientific","accounting"]),currency:a.string,currencyDisplay:a.oneOf(["symbol","code","name"]),useGrouping:a.bool,minimumIntegerDigits:a.number,minimumFractionDigits:a.number,maximumFractionDigits:a.number})]),width:a.oneOfType([a.string,a.number]),tabIndex:a.number,accessKey:a.string,title:a.string,placeholder:a.string,min:a.number,max:a.number,spinners:a.bool,disabled:a.bool,readOnly:a.bool,dir:a.string,name:a.string,label:a.string,validationMessage:a.string,required:a.bool,id:a.string,rangeOnEnter:a.bool,ariaLabelledBy:a.string,ariaDescribedBy:a.string,ariaLabel:a.string,onChange:a.func,onFocus:a.func,onBlur:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])},Fe.displayName="KendoNumericTextBox",Fe.defaultProps={step:1,spinners:!0,disabled:!1,required:!1,validityStyles:!0,rangeOnEnter:!0,onChange:function(e){},onFocus:function(e){},onBlur:function(e){},size:"medium",rounded:"medium",fillMode:"solid"};var ze=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Le=function(){return Le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Le.apply(this,arguments)},Be=function(e){function t(n){var r=e.call(this,n)||this;return r._input=null,r._inputId=(0,l.M)(),r.focus=function(){r._input&&r._input.focus()},r.isInvalid=function(e){var t=!1;for(var n in e)e.hasOwnProperty(n)&&(t=t||Boolean(e[n]));return t},r.setValidity=function(){r._input&&r._input.setCustomValidity&&(r.validity.valid||!r.validityStyles?r._input.classList.remove("k-invalid"):r._input.classList.add("k-invalid"),r._input.setCustomValidity(r.validity.valid?"":r.props.validationMessage||""))},r.handleChange=function(e){r.setState({value:e.target.value}),r.valueDuringOnChange=e.target.value,r.props.onChange&&r.props.onChange.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:e.target.value,target:r}),r.valueDuringOnChange=void 0},r.handleAutoFill=function(e){if("autoFillStart"===e.animationName){var t=e.target.parentNode;t&&t.classList.contains("k-empty")&&t.classList.remove("k-empty")}},(0,f.s)(h),r.state={value:r.props.defaultValue||t.defaultProps.defaultValue},r}return ze(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e={badInput:!!this._input&&this._input.validity.badInput,patternMismatch:!!this._input&&this._input.validity.patternMismatch,rangeOverflow:!!this._input&&this._input.validity.rangeOverflow,rangeUnderflow:!!this._input&&this._input.validity.rangeUnderflow,stepMismatch:!!this._input&&this._input.validity.stepMismatch,tooLong:!!this._input&&this._input.validity.tooLong,typeMismatch:!!this._input&&this._input.validity.typeMismatch,valueMissing:!!this._input&&this._input.validity.valueMissing};return Le(Le({},e),{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!this._input||!this.isInvalid(e)})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.setValidity()},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.label,o=t.id,a=(t.validationMessage,t.defaultValue,t.valid,t.visited,t.touched,t.modified,t.ariaLabelledBy),s=t.ariaDescribedBy,l=(t.validityStyles,t.style),u=t.ariaLabel,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["className","label","id","validationMessage","defaultValue","valid","visited","touched","modified","ariaLabelledBy","ariaDescribedBy","validityStyles","style","ariaLabel"]),p=o||this._inputId,f=!this.validityStyles||this.validity.valid,h=(0,c.A)(n,"k-input k-input-md k-rounded-md k-input-solid"),m=i.createElement("input",Le({"aria-labelledby":a,"aria-describedby":s,"aria-disabled":this.props.disabled||void 0,"aria-invalid":!f||void 0,"aria-label":u||void 0},d,{style:r?void 0:l,value:this.value,id:p,className:h,onChange:this.handleChange,onAnimationStart:this.handleAutoFill,ref:function(t){e._input=t}}));return r?i.createElement(pe._,{label:r,editorId:p,editorValue:String(this.value),editorValid:f,editorDisabled:d.disabled,editorPlaceholder:d.placeholder,children:m,style:l,dir:d.dir}):m},t.displayName="Input",t.propTypes={label:a.string,validationMessage:a.string,required:a.bool,validate:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,ariaLabel:a.string},t.defaultProps={defaultValue:"",required:!1,validityStyles:!0},t}(i.Component),Ve=(0,p.Y)(),He=(0,p.u)(Ve,Be);He.displayName="KendoReactInput";var Ke=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const We=function(e){function t(t){var n=e.call(this,t)||this;return n.onChange=function(e){var t=e.target.value,r=te(t,"rgba");n.setState({hex:t}),Z(r)&&n.props.onHexChange(t,r,e)},n.onBlur=function(){Z(te(n.state.hex,"rgba"))||n.setState({hex:n.state.originalHex})},n.state={hex:n.props.hex,originalHex:n.props.hex},n}return Ke(t,e),t.prototype.render=function(){return i.createElement(He,{value:this.state.hex,onChange:this.onChange,onBlur:this.onBlur,disabled:this.props.disabled})},t.getDerivedStateFromProps=function(e,t){return e.hex!==t.originalHex?{hex:e.hex,originalHex:e.hex}:null},t}(i.Component);var $e=n(2609),qe=n(8011),Ue=function(e){(0,f.s)(qe.k);var t=e.id,n=e.editorId,r=e.editorRef,o=e.editorDisabled,a=e.children,s=e.editorValid,l=e.style,u=e.className,d=e.optional,p=(0,v.useLocalization)(),h=d?p.toLanguageString($e.y,$e.s[$e.y]):"",m=h&&i.createElement("span",{className:"k-label-optional"},h),g=i.useCallback((function(e){if(r&&r.current&&!o){r.current.focus&&(e.preventDefault(),r.current.focus());var t=r.current.actionElement;t&&(e.preventDefault(),t.click())}}),[r]),y=(0,c.A)({"k-label":!0,"k-label-empty":!a,"k-text-error":!1===s,"k-text-disabled":!0===o},u);return i.createElement("label",{id:t,htmlFor:n,onClick:g,style:l,className:y},a,m)};Ue.propTypes={id:a.string,editorId:a.string,editorRef:a.oneOfType([a.func,a.shape({current:a.any})]),editorValid:a.bool,editorDisabled:a.bool,style:a.object,className:a.string,optional:a.bool},Ue.displayName="KendoReactLabel";var Ge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ye=function(){return Ye=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ye.apply(this,arguments)},Xe=["rgba","rgb","hex"],Je=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={inputMode:Xe[1]},t.onRgbaRChange=function(e){t.dispatchRgbaChange({r:e.value},e)},t.onRgbaGChange=function(e){t.dispatchRgbaChange({g:e.value},e)},t.onRgbaBChange=function(e){t.dispatchRgbaChange({b:e.value},e)},t.onRgbaAChange=function(e){t.dispatchRgbaChange({a:e.value},e)},t}return Ge(t,e),t.prototype.render=function(){var e=(0,v.provideLocalizationService)(this),t=e.toLanguageString(w,V[S]),n=e.toLanguageString(w,V[w]),r=e.toLanguageString(w,V[C]),o=e.toLanguageString(w,V[x]),a=e.toLanguageString(w,V[O]),s=e.toLanguageString(P,V[P]);return i.createElement("div",{className:"k-colorgradient-inputs k-hstack"},i.createElement("div",{className:"k-vstack"},i.createElement(q.z,{"aria-label":s,fillMode:"flat",icon:"arrows-kpi",className:"k-colorgradient-toggle-mode k-icon-button",onClick:this.onToggleModeChange.bind(this)})),"hex"===this.state.inputMode&&i.createElement("div",{className:"k-vstack k-flex-1"},i.createElement("span",{className:"k-hex-value k-textbox k-input"},i.createElement(We,{hex:this.props.hex,onHexChange:this.props.onHexChange,disabled:this.props.disabled})),i.createElement(Ue,{className:"k-colorgradient-input-label"},t)),("rgb"===this.state.inputMode||"rgba"===this.state.inputMode)&&i.createElement(i.Fragment,null,i.createElement("div",{className:"k-vstack"},i.createElement(Fe,{inputType:"number",value:this.props.rgba.r,ariaLabel:String(this.props.rgba.r),min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaRChange,disabled:this.props.disabled}),i.createElement(Ue,{className:"k-colorgradient-input-label"},n)),i.createElement("div",{className:"k-vstack"},i.createElement(Fe,{inputType:"number",value:this.props.rgba.g,ariaLabel:String(this.props.rgba.g),min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaGChange,disabled:this.props.disabled}),i.createElement(Ue,{className:"k-colorgradient-input-label"},r)),i.createElement("div",{className:"k-vstack"},i.createElement(Fe,{inputType:"number",value:this.props.rgba.b,ariaLabel:String(this.props.rgba.b),min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaBChange,disabled:this.props.disabled}),i.createElement(Ue,{className:"k-colorgradient-input-label"},o))),"rgba"===this.state.inputMode&&i.createElement("div",{className:"k-vstack"},this.props.opacity&&i.createElement(Fe,{inputType:"number",value:this.props.rgba.a,ariaLabel:String(this.props.rgba.a),min:0,max:1,step:.01,spinners:!1,format:"n2",onChange:this.onRgbaAChange,disabled:this.props.disabled}),this.props.opacity&&i.createElement(Ue,{className:"k-colorgradient-input-label"},a)))},t.prototype.dispatchRgbaChange=function(e,t){var n=Ye({},this.props.rgba);void 0!==e.r&&(n.r=e.r),void 0!==e.g&&(n.g=e.g),void 0!==e.b&&(n.b=e.b),void 0!==e.a&&(n.a=e.a),this.props.onRgbaChange(n,t)},t.prototype.onToggleModeChange=function(){var e=Xe.length-1===Xe.indexOf(this.state.inputMode)?0:Xe.indexOf(this.state.inputMode)+1;if(this.props.opacity)this.setState({inputMode:Xe[e]});else{var t="rgba"===Xe[e]?e+1:e;this.setState({inputMode:Xe[t]})}},t}(i.Component);const Ze=Je;(0,v.registerForIntl)(Je),(0,v.registerForLocalization)(Je);var Qe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qe(t,e),t.prototype.render=function(){var e=(0,v.provideLocalizationService)(this),t=e.toLanguageString(E,V[E]),n=e.toLanguageString(I,V[I]),r=e.toLanguageString(N,V[N]),o=e.toLanguageString(T,V[T]),a=e.toLanguageString(M,V[M]),s=le(this.props.rgba,this.props.bgColor),l=4.5.toFixed(1),c=7..toFixed(1),u="".concat(t,": ").concat(s.toFixed(2)),d="".concat(n,": ").concat(l),p="".concat(r,": ").concat(c),f=i.createElement("span",{className:"k-contrast-validation k-text-success"},o," ",i.createElement("span",{className:"k-icon k-i-check"})),h=i.createElement("span",{className:"k-contrast-validation k-text-error"},a," ",i.createElement("span",{className:"k-icon k-i-close"}));return i.createElement("div",{className:"k-vbox k-colorgradient-color-contrast"},i.createElement("div",{className:"k-contrast-ratio"},i.createElement("span",{className:"k-contrast-ratio-text"},u),s>=4.5?i.createElement("span",{className:"k-contrast-validation k-text-success"},i.createElement("span",{className:"k-icon k-i-check"}),s>=7&&i.createElement("span",{className:"k-icon k-i-check"})):i.createElement("span",{className:"k-contrast-validation k-text-error"},i.createElement("span",{className:"k-icon k-i-close"}))),i.createElement("div",null,i.createElement("span",null,d),s>=4.5?f:h),i.createElement("div",null,i.createElement("span",null,p),s>=7?f:h))},t}(i.Component);(0,v.registerForLocalization)(et);var tt=function(e,t){if(0===e.length)return"";var n=e.reduce((function(e,n,r,o){return 0===r?"M ".concat(n[0],",").concat(n[1]):"".concat(e," ").concat(t(n,r,o))}),"");return'<path d="'.concat(n,'" fill="none" stroke="white" stroke-width="1"/>')},nt=function(e,t){var n=t[0]-e[0],r=t[1]-e[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(r,2)),angle:Math.atan2(r,n)}},rt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.renderSvgCurveLine=function(){var e,t,n=this,r=this.props.metrics,o=function(e,t,i,a,s){var l=(i+a)/2,c=Object.assign({},n.props.hsva,{s:t/r.width,v:1-l/r.height}),u=le(re(oe(c)),re(n.props.backgroundColor||""));return i+.5>a?u<e+1&&u>e-1?l:null:s(u,e)?o(e,t,i,a-(a-i)/2,s):o(e,t,i+(a-i)/2,a,s)},i=function(e,t,n){void 0===n&&(n=!1);for(var i=[],a=0;a<=r.width;a+=r.width/t){var s=o(e,a,0,r.height,n?function(e,t){return e<t}:function(e,t){return e>t});null!==s&&i.push([a,s])}return i},a=(t=nt,e=function(e,n,r,o){var i=t(n||e,r||e),a=i.angle+(o?Math.PI:0),s=.1*i.length;return[e[0]+Math.cos(a)*s,e[1]+Math.sin(a)*s]},function(t,n,r){var o=e(r[n-1],r[n-2],t),i=o[0],a=o[1],s=e(t,r[n-1],r[n+1],!0),l=s[0],c=s[1];return"C ".concat(i,",").concat(a," ").concat(l,",").concat(c," ").concat(t[0],",").concat(t[1])});return tt(i(4.5,16),a)+tt(i(4.5,16,!0),a)+tt(i(7,16),a)+tt(i(7,16,!0),a)},t.prototype.shouldComponentUpdate=function(e){return e.hsva.h!==this.props.hsva.h||e.hsva.a!==this.props.hsva.a||this.props.backgroundColor!==e.backgroundColor},t.prototype.render=function(){return i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"k-color-contrast-svg",dangerouslySetInnerHTML:{__html:this.renderSvgCurveLine()},style:{position:"absolute",overflow:"visible",pointerEvents:"none",left:0,top:0,zIndex:3}})},t}(i.Component),it=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),at="rgba(255, 255, 255, 1)",st=function(e){function t(n){var r=e.call(this,n)||this;r.wrapper=null,r.onHexChange=function(e,t,n){if(r.isUncontrolled){var o=ne(t);r.setState({hsva:o,backgroundColor:ie(o.h),rgba:re(t),hex:e})}else!function(e,t,n){ce[e]={value:t,hex:n}}(r.state.guid,t,e);r.dispatchChangeEvent(t,n,n.nativeEvent)},r.onRgbaChange=function(e,t){var n=function(e){var t=Q(e.r,0,255),n=Q(e.g,0,255),r=Q(e.b,0,255),o=Q(e.a,0,1);return ee.Color.fromBytes(t,n,r,o).toCssRgba()}(e);if(r.isUncontrolled){var o=ne(n),i=te(n,"hex");r.setState({hsva:o,backgroundColor:ie(o.h),rgba:e,hex:i})}else!function(e,t,n){ce[e]={value:t,rgba:n}}(r.state.guid,n,e);r.dispatchChangeEvent(n,t.syntheticEvent,t.nativeEvent)},r.onAlphaSliderChange=function(e){r.handleHsvaChange(Object.assign({},r.state.hsva,{a:e.value/100}),e.syntheticEvent,e.nativeEvent)},r.onHueSliderChange=function(e){r.handleHsvaChange(Object.assign({},r.state.hsva,{h:e.value}),e.syntheticEvent,e.nativeEvent)},r.onDrag=function(e){r.gradientWrapper.classList.add("k-dragging"),r.changePosition(e.event)},r.onRelease=function(){r.gradientWrapper.classList.remove("k-dragging")},r.onGradientWrapperClick=function(e){r.changePosition(e)},r.changePosition=function(e){var t=r.getGradientRectMetrics(),n=e.clientX-t.left,o=e.clientY-t.top,i=Q(n,0,t.width),a=Q(o,0,t.height),s=Object.assign({},r.state.hsva,{s:i/t.width,v:1-a/t.height});r.handleHsvaChange(s,e,e.nativeEvent)},r.onFocus=function(e){r.props.onFocus&&r.props.onFocus.call(void 0,{nativeEvent:e,target:r})},r.focus=function(){(0,s.n)(r.wrapper)},(0,f.s)(h);var o=n.value||n.defaultValue||te(at,"rgba");return r.state=Object.assign({},t.getStateFromValue(o),{isFirstRender:!0,guid:(0,l.M)()}),r}return it(t,e),t.getDerivedStateFromProps=function(e,n){return e.value&&!n.isFirstRender?t.getStateFromValue(e.value,n.guid):null},t.prototype.componentDidMount=function(){this.setAlphaSliderBackground(this.state.backgroundColor),this.state.isFirstRender&&this.setState({isFirstRender:!1})},t.prototype.componentWillUnmount=function(){var e;e=this.state.guid,delete ce[e]},t.prototype.componentDidUpdate=function(e,t){t.backgroundColor!==this.state.backgroundColor&&this.setAlphaSliderBackground(this.state.backgroundColor)},t.prototype.renderRectangleDragHandle=function(){var e={};if(!this.state.isFirstRender){var t=this.getGradientRectMetrics(),n=(1-this.state.hsva.v)*t.height,r=this.state.hsva.s*t.width;e.top="".concat(n,"px"),e.left="".concat(r,"px")}return i.createElement("div",{className:"k-hsv-draghandle k-draghandle",style:e})},t.prototype.handleHsvaChange=function(e,t,n){var r=oe(e);if(this.isUncontrolled){var o=te(r,"hex");this.setState({hsva:e,backgroundColor:ie(e.h),rgba:re(r),hex:o})}else!function(e,t,n){ce[e]={value:t,hsva:n}}(this.state.guid,r,e);this.dispatchChangeEvent(r,t,n)},t.prototype.dispatchChangeEvent=function(e,t,n){this.props.onChange&&this.props.onChange.call(void 0,{syntheticEvent:t,nativeEvent:n,target:this,value:e})},t.getStateFromValue=function(e,t){Z(te(e,"hex"))||(e=at);var n=function(e,t){if(e){var n=ce[e];return n&&n.value===t?n.hsva:void 0}}(t,e)||ne(e),r=function(e,t){if(e){var n=ce[e];return n&&n.value===t?n.rgba:void 0}}(t,e)||re(e),o=function(e,t){if(e){var n=ce[e];return n&&n.value===t?n.hex:void 0}}(t,e)||te(e,"hex");return{hsva:n,backgroundColor:ie(n.h),rgba:r,hex:o}},t.prototype.setAlphaSliderBackground=function(e){this.props.opacity&&this.alphaSlider&&this.alphaSlider.sliderTrack&&(this.alphaSlider.sliderTrack.style.background="linear-gradient(to top, transparent, ".concat(e,")"))},Object.defineProperty(t.prototype,"isUncontrolled",{get:function(){return void 0===this.props.value},enumerable:!1,configurable:!0}),t.prototype.getGradientRectMetrics=function(){return this.gradientWrapper.getBoundingClientRect()},t.prototype.render=function(){var e=this,t=(0,v.provideLocalizationService)(this),n=(0,c.A)("k-colorgradient",{"k-disabled":this.props.disabled});return i.createElement("div",{id:this.props.id,className:n,"aria-disabled":this.props.disabled?"true":void 0,style:this.props.style,ref:function(t){return e.wrapper=t},tabIndex:(0,u.p)(this.props.tabIndex,this.props.disabled),"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,onFocus:this.onFocus},i.createElement("div",{className:"k-colorgradient-canvas k-hstack"},i.createElement("div",{className:"k-hsv-rectangle",style:{background:this.state.backgroundColor}},i.createElement(d._,{onDrag:this.onDrag,onRelease:this.onRelease,ref:function(t){return e.gradientWrapper=t?t.element:void 0}},i.createElement("div",{className:"k-hsv-gradient",style:{touchAction:"none"},onClick:this.onGradientWrapperClick},this.renderRectangleDragHandle())),this.props.backgroundColor&&!this.state.isFirstRender&&i.createElement(ot,{metrics:this.gradientWrapper?this.getGradientRectMetrics():void 0,hsva:this.state.hsva,backgroundColor:this.props.backgroundColor})),i.createElement("div",{className:"k-hsv-controls k-hstack"},i.createElement(J,{value:this.state.hsva.h,buttons:!1,vertical:!0,min:0,max:360,step:5,onChange:this.onHueSliderChange,className:"k-hue-slider k-colorgradient-slider",disabled:this.props.disabled,ariaLabel:t.toLanguageString(D,V[D])}),this.props.opacity&&i.createElement(J,{value:Z(this.state.hsva.a)?100*this.state.hsva.a:100,buttons:!1,vertical:!0,min:0,max:100,step:1,ariaLabel:t.toLanguageString(R,V[R]),onChange:this.onAlphaSliderChange,className:"k-alpha-slider k-colorgradient-slider",disabled:this.props.disabled,ref:function(t){return e.alphaSlider=t}}))),i.createElement(Ze,{rgba:this.state.rgba,onRgbaChange:this.onRgbaChange,hex:this.state.hex,onHexChange:this.onHexChange,opacity:this.props.opacity,disabled:this.props.disabled}),this.props.backgroundColor&&i.createElement(et,{bgColor:re(this.props.backgroundColor),rgba:this.state.rgba}))},t.displayName="ColorGradient",t.propTypes={defaultValue:a.string,value:a.string,onChange:a.func,onFocus:a.func,opacity:a.bool,backgroundColor:a.string,disabled:a.bool,style:a.any,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t.defaultProps={opacity:!0},t}(i.Component),lt=(0,p.Y)(),ct=(0,p.u)(lt,st);ct.displayName="KendoReactColorGradient";var ut=function(){function e(){this.colorRows=[]}return e.prototype.setColorMatrix=function(e,t){if(this.colorRows=[],Z(e)&&e.length){t=t||e.length;for(var n=0;n<e.length;n+=t){var r=e.slice(n,t+n);this.colorRows.push(r)}}},e.prototype.getCellCoordsFor=function(e){var t=this;if(Z(e)){var n=e?(0,ee.parseColor)(e,!0):e,r=[e];Z(n)&&r.push(n.toCss(),n.toCssRgba());for(var o=function(e){for(var n=function(n){if(r.some((function(r){return r===t.colorRows[e][n]})))return{value:{row:e,col:n}}},o=0;o<i.colorRows[e].length;o++){var a=n(o);if("object"==typeof a)return a}},i=this,a=0;a<this.colorRows.length;a++){var s=o(a);if("object"==typeof s)return s.value}}},e.prototype.getColorAt=function(e){if(Z(e)&&Z(this.colorRows[e.row]))return this.colorRows[e.row][e.col]},e.prototype.getNextCell=function(e,t,n){if(!(Z(e)&&Z(e.row)&&Z(e.col)))return{row:0,col:0};var r=this.clampIndex(e.row+n,this.colorRows.length-1);return{row:r,col:this.clampIndex(e.col+t,this.colorRows[r].length-1)}},e.prototype.clampIndex=function(e,t){return e<0?0:e>t?t:e},e}(),dt={basic:{colors:["#000000","#7f7f7f","#880015","#ed1c24","#ff7f27","#fff200","#22b14c","#00a2e8","#3f48cc","#a349a4"," ffffff","#c3c3c3","#b97a57","#ffaec9","#ffc90e","#efe4b0","#b5e61d","#99d9ea","#7092be","#c8bfe7"],columns:10},office:{colors:["#ffffff","#000000","#e6e6e6","#435569","#4371c4","#ed7e32","#a5a4a5","#febf04","#5a9bd5","#71ae48","#f2f2f3","#7f7f7f","#d1cece","#d5dde3","#dae1f4","#fce5d4","#deeded","#fff2cc","#deeaf6","#e1efd9","#d7d8d8","#585959","#aeabab","#adbaca","#b4c5e7","#f6caac","#dbdbdb","#ffe498","#bcd6ee","#c5e0b2","#bfbfc0","#3f3f3f","#767070","#8595b1","#8fabdb","#f5b183","#c9c8c9","#fed965","#9bc4e5","#a8d08d","#a5a5a6","#262625","#393939","#334050","#2e5496","#c45a11","#7b7b7a","#bf9000","#2f75b5","#548235","#7f7f7f","#0b0c0c","#161616","#222a34","#203764","#843d0b","#525252","#7f6000","#1d4d79","#375623"],columns:10},apex:{colors:["#ffffff","#000000","#c9c2d1","#69676d","#ceb966","#9cb084","#6bb1c9","#6585cf","#7e6bc9","#a379bb","#f2f2f2","#7f7f7f","#f4f2f5","#e0e0e2","#f5f1e0","#ebefe6","#e1eff4","#e0e6f5","#e5e1f4","#ece4f1","#d8d8d8","#595959","#e9e6ec","#c2c1c5","#ebe3c1","#d7dfcd","#c3dfe9","#c1ceeb","#cbc3e9","#dac9e3","#bfbfbf","#3f3f3f","#dedae3","#a4a3a8","#e1d5a3","#c3cfb5","#a6d0de","#a2b5e2","#b1a6de","#c7aed6","#a5a5a5","#262626","#9688a5","#4e4d51","#ae9638","#758c5a","#3d8da9","#365bb0","#533da9","#7d4d99","#7f7f7f","#0c0c0c","#635672","#343336","#746425","#4e5d3c","#295e70","#243c75","#372970","#533366"],columns:10},austin:{colors:["#ffffff","#000000","#caf278","#3e3d2d","#94c600","#71685a","#ff6700","#909465","#956b43","#fea022","#f2f2f2","#7f7f7f","#f4fce4","#dddcd0","#efffc0","#e3e1dc","#ffe0cb","#e8e9df","#ece1d6","#feecd2","#d8d8d8","#595959","#e9f9c9","#bbb9a1","#dfff82","#c8c3ba","#ffc299","#d2d4c0","#dac3ad","#fed9a6","#bfbfbf","#3f3f3f","#dff7ae","#ada598","#cfff43","#ada598","#ffa365","#bcbfa1","#c8a585","#fec67a","#a5a5a5","#262626","#a9ea25","#2e2d21","#6f9400","#544e43","#bf4d00","#6c6f4b","#6f5032","#d77b00","#7f7f7f","#0c0c0c","#74a50f","#1f1e16","#4a6300","#38342d","#7f3300","#484a32","#4a3521","#8f5200"],columns:10},clarity:{colors:["#ffffff","#292934","#f3f2dc","#d2533c","#93a299","#ad8f67","#726056","#4c5a6a","#808da0","#79463d","#f2f2f2","#e7e7ec","#e7e5b9","#f6dcd8","#e9ecea","#eee8e0","#e4dedb","#d8dde3","#e5e8ec","#e9d6d3","#d8d8d8","#c4c4d1","#d5d185","#edbab1","#d3d9d6","#ded2c2","#c9beb8","#b2bcc8","#ccd1d9","#d3aea7","#bfbfbf","#8a8aa3","#aca73b","#e4978a","#bec7c1","#cdbba3","#af9e94","#8c9bac","#b2bac6","#bd857c","#a5a5a5","#56566e","#56531d","#a43925","#6b7c72","#866b48","#554840","#39434f","#5c697b","#5a342d","#7f7f7f","#3b3b4b","#22210b","#6d2619","#47534c","#594730","#39302b","#262d35","#3d4652","#3c231e"],columns:10},slipstream:{colors:["#ffffff","#000000","#b4dcfa","#212745","#4e67c8","#5eccf3","#a7ea52","#5dceaf","#ff8021","#f14124","#f2f2f2","#7f7f7f","#8bc9f7","#c7cce4","#dbe0f4","#def4fc","#edfadc","#def5ef","#ffe5d2","#fcd9d3","#d8d8d8","#595959","#4facf3","#909aca","#b8c2e9","#beeafa","#dbf6b9","#beebdf","#ffcca6","#f9b3a7","#bfbfbf","#3f3f3f","#0d78c9","#5967af","#94a3de","#9ee0f7","#caf297","#9de1cf","#ffb279","#f68d7b","#a5a5a5","#262626","#063c64","#181d33","#31479f","#11b2eb","#81d319","#34ac8b","#d85c00","#c3260c","#7f7f7f","#0c0c0c","#021828","#101322","#202f6a","#0b769c","#568c11","#22725c","#903d00","#821908"],columns:10},metro:{colors:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],columns:10},flow:{colors:["#ffffff","#000000","#dbf5f9","#04617b","#0f6fc6","#009dd9","#0bd0d9","#10cf9b","#7cca62","#a5c249","#f2f2f2","#7f7f7f","#b2e9f2","#b4ecfc","#c7e2fa","#c4eeff","#c9fafc","#c9faed","#e4f4df","#edf2da","#d8d8d8","#595959","#76d9e8","#6adafa","#90c6f6","#89deff","#93f5f9","#94f6db","#cae9c0","#dbe6b6","#bfbfbf","#3f3f3f","#21b2c8","#20c8f7","#59a9f2","#4fceff","#5df0f6","#5ff2ca","#b0dfa0","#c9da91","#a5a5a5","#262626","#105964","#02485c","#0b5394","#0075a2","#089ca2","#0b9b74","#54a838","#7e9532","#7f7f7f","#0c0c0c","#062328","#01303d","#073763","#004e6c","#05686c","#07674d","#387025","#546321"],columns:10},hardcover:{colors:["#ffffff","#000000","#ece9c6","#895d1d","#873624","#d6862d","#d0be40","#877f6c","#972109","#aeb795","#f2f2f2","#7f7f7f","#e1dca5","#f2e0c6","#f0d0c9","#f6e6d5","#f5f2d8","#e7e5e1","#fbc7bc","#eef0e9","#d8d8d8","#595959","#d0c974","#e6c28d","#e2a293","#eeceaa","#ece5b2","#cfccc3","#f78f7a","#dee2d4","#bfbfbf","#3f3f3f","#a29a36","#daa454","#d4735e","#e6b681","#e2d88c","#b7b2a5","#f35838","#ced3bf","#a5a5a5","#262626","#514d1b","#664515","#65281a","#a2641f","#a39428","#655f50","#711806","#879464","#7f7f7f","#0c0c0c","#201e0a","#442e0e","#431b11","#6c4315","#6d621a","#433f35","#4b1004","#5a6243"],columns:10},trek:{colors:["#ffffff","#000000","#fbeec9","#4e3b30","#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529","#f2f2f2","#7f7f7f","#f7e09e","#e1d6cf","#fcecd5","#eddfda","#f0e7e5","#f3eae1","#ece9e3","#f5e3d1","#d8d8d8","#595959","#f3cc5f","#c4ad9f","#f9d9ab","#dcc0b6","#e1d0cc","#e7d5c4","#d9d4c7","#ebc7a3","#bfbfbf","#3f3f3f","#d29f0f","#a78470","#f6c781","#cba092","#d2b9b2","#dbc1a7","#c6bfab","#e1ac76","#a5a5a5","#262626","#694f07","#3a2c24","#c87d0e","#7b4b3a","#926255","#a17242","#7b7153","#90571e","#7f7f7f","#0c0c0c","#2a1f03","#271d18","#855309","#523226","#614138","#6b4c2c","#524b37","#603a14"],columns:10},verve:{colors:["#ffffff","#000000","#d2d2d2","#666666","#ff388c","#e40059","#9c007f","#68007f","#005bd3","#00349e","#f2f2f2","#7f7f7f","#bdbdbd","#e0e0e0","#ffd7e8","#ffc6dc","#ffb8f1","#f1b2ff","#c3dcff","#b8cfff","#d8d8d8","#595959","#9d9d9d","#c1c1c1","#ffafd1","#ff8eba","#ff71e4","#e365ff","#87baff","#72a0ff","#bfbfbf","#3f3f3f","#696969","#a3a3a3","#ff87ba","#ff5597","#ff2ad7","#d519ff","#4b98ff","#2b71ff","#a5a5a5","#262626","#343434","#4c4c4c","#e90062","#ab0042","#75005f","#4e005f","#00449e","#002676","#7f7f7f","#0c0c0c","#151515","#333333","#9b0041","#72002c","#4e003f","#34003f","#002d69","#00194f"],columns:10},monochrome:{colors:["#000000","#1a1a1a","#333333","#4d4d4d","#666666","#808080","#999999","#b3b3b3","#cccccc","#e6e6e6","#f2f2f2","#ffffff"],columns:12}},pt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ft="office",ht=function(e){function t(t){var n=e.call(this,t)||this;return n.wrapper=null,n.paletteService=null,n.guid=(0,l.M)(),n.focus=function(){n.wrapper&&n.wrapper.focus()},n.onKeyDown=function(e){switch(e.keyCode){case m.R.down:n.handleCellNavigation(0,1);break;case m.R.up:n.handleCellNavigation(0,-1);break;case m.R.right:n.handleCellNavigation(1,0);break;case m.R.left:n.handleCellNavigation(-1,0);break;case m.R.enter:n.handleEnter(e);break;default:return}e.preventDefault()},n.onColorClick=function(e,t){n.isUncontrolled?n.setState({selectedColor:e,focusedColor:e}):n.setState({focusedColor:e}),n.dispatchChangeEvent(e,t)},n.onFocus=function(e){n.paletteService&&(n.setState({focusedColor:n.state.selectedColor||n.paletteService.colorRows[0][0]}),n.props.onFocus&&n.props.onFocus.call(void 0,e))},n.onBlur=function(){n.setState({focusedColor:void 0})},(0,f.s)(h),n.state={selectedColor:void 0!==n.props.value?n.props.value:n.props.defaultValue,isFirstRender:!0},n}return pt(t,e),t.prototype.render=function(){var e=this,t=this.getPaletteInfo(),n=this.paletteService=new ut;n.setColorMatrix(t.colors,t.columns);var r=n.getCellCoordsFor(this.state.selectedColor),o=n.getCellCoordsFor(this.state.focusedColor),a=(0,c.A)("k-colorpalette",{"k-disabled":this.props.disabled});return t.colors.length?i.createElement("div",{id:this.props.id,className:a,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,"aria-disabled":this.props.disabled?"true":void 0,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:(0,u.p)(this.props.tabIndex,this.props.disabled),ref:function(t){return e.wrapper=t}},i.createElement("div",{className:"k-colorpalette-table-wrap",role:"grid"},i.createElement("table",{className:"k-colorpalette-table k-palette",role:"presentation"},i.createElement("tbody",{role:"rowgroup"},this.renderRows(n.colorRows,r,o))))):""},t.getDerivedStateFromProps=function(e,t){if(t.isFirstRender||void 0===e.value){if(t.isFirstRender)return{isFirstRender:!1}}else{if(""===e.value&&void 0!==t.selectedColor)return{selectedColor:void 0};if(""!==e.value&&e.value!==t.selectedColor)return{selectedColor:e.value}}return null},t.prototype.handleCellNavigation=function(e,t){if(this.paletteService)if(this.focusedColorCooridanates){var n=this.paletteService.getNextCell(this.focusedColorCooridanates,e,t);this.setState({focusedColor:this.paletteService.getColorAt(n)})}else this.setState({focusedColor:this.paletteService.colorRows[0][0]})},t.prototype.handleEnter=function(e){this.isUncontrolled&&this.setState({selectedColor:this.state.focusedColor}),this.dispatchChangeEvent(this.state.focusedColor,e)},t.prototype.dispatchChangeEvent=function(e,t){(0,g.N)(this.props.onChange,t,this,{value:e,rgbaValue:te(e,"rgba")})},Object.defineProperty(t.prototype,"focusedColorCooridanates",{get:function(){return this.state.focusedColor&&this.paletteService?this.paletteService.getCellCoordsFor(this.state.focusedColor):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUncontrolled",{get:function(){return void 0===this.props.value},enumerable:!1,configurable:!0}),t.prototype.getPaletteInfo=function(){if("string"==typeof this.props.palette){var e=dt[this.props.palette];return Z(e)?{colors:e.colors,columns:this.props.columns||e.columns||10}:{colors:[],columns:0}}return{colors:this.props.palette||[],columns:this.props.columns||10}},t.prototype.renderRows=function(e,t,n){var r=this;return e.map((function(e,o){return i.createElement("tr",{role:"row",key:o},r.renderColumns(e,o,t,n))}))},t.prototype.renderColumns=function(e,t,n,r){var o=this,a=void 0!==n&&n.row===t,s=n&&n.col,l=void 0!==r&&r.row===t,u=r&&r.col,d="number"!=typeof this.props.tileSize?this.props.tileSize:{width:this.props.tileSize,height:this.props.tileSize},p=d.width+"px",f=d.height+"px";return e.map((function(e,n){var r=a&&s===n,d=(0,c.A)("k-colorpalette-tile",{"k-selected":r,"k-focus":l&&u===n});return i.createElement("td",{role:"gridcell",className:d,"aria-label":e,"aria-selected":!!r||!!o.props.disabled&&void 0,style:{backgroundColor:e,width:p,height:f,minWidth:p},onClick:function(t){return o.onColorClick(e,t)},id:o.createCellId({row:t,col:n}),key:n})}))},t.prototype.createCellId=function(e){return"".concat(this.guid,"_").concat(e.row,"_").concat(e.col)},t.displayName="ColorPalette",t.propTypes={palette:a.oneOfType([a.arrayOf(a.string.isRequired),a.string]),columns:a.number,tileSize:a.any,defaultValue:a.string,value:a.string,disabled:a.bool,tabIndex:a.number,onChange:a.func,onFocus:a.func,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t.defaultProps={palette:ft,tileSize:24},t}(i.Component),mt=(0,p.Y)(),gt=(0,p.u)(mt,ht);gt.displayName="KendoReactColorPalette";var vt=n(9222),yt=function(){return yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},yt.apply(this,arguments)},bt=function(e){var t=e.popupSettings||{},n="rtl"===e.dir?"right":"left",r=i.useMemo((function(){return{horizontal:n,vertical:"bottom"}}),[n]),o=i.useMemo((function(){return{horizontal:n,vertical:"top"}}),[n]);return i.createElement(i.Fragment,null,e.input,e.button,i.createElement(vt.G,yt({style:yt(yt({},(t||{}).style),{direction:e.dir})},t,{anchor:e.popupAnchor,anchorAlign:r,popupAlign:o,show:e.open,onOpen:e.onOpen,onClose:e.onClose,className:(0,c.A)("k-reset",t.className)}),e.content))};bt.displayName="KendoPickerComponent";var kt=function(){return kt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},kt.apply(this,arguments)},wt={palette:ft,tileSize:24},Ct=function(e){return void 0!==e},xt=(0,p.Y)(),Ot=i.forwardRef((function(e,t){var n,r;(0,f.s)(h);var o=(0,ue.Y)(xt,e),a=(0,v.useLocalization)(),s=o.size,l=void 0===s?St.size:s,d=o.rounded,p=void 0===d?St.rounded:d,g=o.fillMode,y=void 0===g?St.fillMode:g,b=o.popupSettings,k=o.gradientSettings,w=o.paletteSettings,C=o.valid,x=o.disabled,O=o.tabIndex,S=o.view,E=o.icon,I=o.iconClassName,N=o.onChange,T=o.onFocus,M=o.onBlur,D=o.onActiveColorClick,R=i.useRef(null),P=i.useRef(null),_=i.useRef(null),A=i.useRef(),j=i.useRef(null),F=i.useCallback((function(){R.current&&R.current.focus()}),[]);i.useImperativeHandle(t,(function(){return{element:R.current,actionElement:j.current,focus:F}}));var z=i.useState(!1),B=z[0],K=z[1],W=i.useState(o.defaultValue),$=W[0],U=W[1],G=i.useState(!1),Y=G[0],X=G[1],J=Ct(o.value),Z=Ct(o.open),Q=J?o.value:$,ee=Z?o.open:Y,te=i.useCallback((function(e,t){Z||(!e&&!t&&R&&R.current&&R.current.focus(),X(e))}),[Z]),ne=i.useCallback((function(e){var t=e.altKey,n=e.keyCode;if(n!==m.R.esc)return n!==m.R.enter||Z?void(!t||n!==m.R.up&&n!==m.R.down||(e.preventDefault(),e.stopPropagation(),n===m.R.up&&R&&R.current&&(R.current.focus(),te(!1)),n===m.R.down&&te(!0))):(e.preventDefault(),e.stopPropagation(),void te(!ee));te(!1)}),[ee,Z]),re=i.useCallback((function(){Z||(P.current?P.current.focus():_.current&&_.current.focus())}),[Z]),oe=i.useCallback((function(){te(!ee,!0)}),[ee]),ie=i.useCallback((function(e){D&&D.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:Q})}),[D,Q]),ae=i.useCallback((function(e){A.current?(clearTimeout(A.current),A.current=void 0):K(!0),T&&T.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[T]),se=i.useCallback((function(){te(!1,!0),K(!1),A.current=void 0}),[]),le=i.useCallback((function(e){clearTimeout(A.current),A.current=window.setTimeout(se),M&&M.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[M]),ce=i.useCallback((function(e,t){var n=t?e.rgbaValue:e.value;J||U(n),t&&te(!1),N&&N.call(void 0,{value:n,nativeEvent:e.nativeEvent,syntheticEvent:e.syntheticEvent})}),[J,N]),pe=i.useCallback((function(e){return ce(e,!0)}),[Ct,ce]),fe=(0,H.n)(R,o.dir),he=!1!==C;return i.createElement("span",{id:o.id,"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy,className:(0,c.A)("k-colorpicker","k-picker","k-icon-picker",(n={},n["k-picker-".concat(de.G.sizeMap[l]||l)]=l,n["k-picker-".concat(y)]=y,n["k-rounded-".concat(de.G.roundedMap[p]||p)]=p,n["k-invalid"]=!he,n["k-disabled"]=x,n["k-focus"]=B,n)),ref:R,tabIndex:(0,u.p)(O,x),title:o.title,onKeyDown:ne,onFocus:ae,onBlur:le,dir:fe},i.createElement(bt,{dir:fe,open:ee,onOpen:re,popupAnchor:R.current||void 0,popupSettings:kt({},b),input:i.createElement("span",{onClick:ie,className:"k-input-inner"},i.createElement("span",{className:(0,c.A)("k-value-icon","k-color-preview",{"k-no-color":!Q,"k-icon-color-preview":E||I})},(I||E)&&i.createElement("span",{className:(0,c.A)("k-color-preview-icon",I,(r={},r["k-icon k-i-".concat(E)]=E&&!I,r))}),i.createElement("span",{className:"k-color-preview-mask",style:{backgroundColor:Q}}))),button:i.createElement(q.z,{tabIndex:-1,type:"button",onClick:oe,className:"k-input-button",rounded:null,icon:"arrow-s","aria-label":a.toLanguageString(L,V[L])}),content:i.createElement(i.Fragment,null,("combo"===S||"gradient"===S)&&i.createElement(ct,kt({},k,{tabIndex:0,ref:P,value:Q,onChange:ce})),("combo"===S||"palette"===S)&&i.createElement(gt,kt({},w,{ref:_,value:Q,onChange:pe})))}))}));Ot.propTypes={value:a.string,defaultValue:a.string,disabled:a.bool,view:a.oneOf(["gradient","palette","combo"]),dir:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])};var St={size:"medium",rounded:"medium",fillMode:"solid",view:"palette",gradientSettings:{opacity:!0},paletteSettings:wt};Ot.defaultProps=St,Ot.displayName="KendoColorPicker";var Et,It=n(7711),Nt=i.forwardRef((function(e,t){(0,f.s)(h);var n=i.useRef(null),r=i.useRef(null),o=i.useRef(null),a=i.useState("ColorGradient"===(e.view||"ColorGradient")),s=a[0],l=a[1],d=i.useState("rgba(255, 255, 255, 1)"),p=d[0],m=d[1],g=i.useState("rgba(255, 255, 255, 1)"),v=g[0],y=g[1],b=i.useCallback((function(){n.current&&n.current.focus()}),[n]);i.useImperativeHandle(n,(function(){return{element:r.current,focus:b,props:e}})),i.useImperativeHandle(t,(function(){return n.current}));var k=i.useCallback((function(e){("ColorGradient"===e&&!s||"ColorPalette"===e&&s)&&l(!s)}),[s]),w=i.useCallback((function(){m("rgba(255, 255, 255, 1)")}),[]),C=i.useCallback((function(e){m(e.value)}),[]),x=i.useCallback((function(){y(p)}),[p]),O=i.useCallback((function(){y("rgba(255, 255, 255, 1)")}),[]),S=i.useCallback((function(){m(v)}),[v]),E=i.useCallback((function(){r.current&&r.current.focus()}),[r]),I=i.useCallback((function(){y(p)}),[p]);return i.createElement("div",{id:e.id,style:e.style,ref:r,tabIndex:(0,u.p)(e.tabIndex,e.disabled),className:(0,c.A)("k-flatcolorpicker k-coloreditor",{"k-disabled":e.disabled},e.className),onBlur:I},i.createElement(i.Fragment,null,e.header||i.createElement("div",{className:"k-coloreditor-header k-hstack"},i.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},i.createElement(It.h,null,i.createElement(q.z,{type:"button",togglable:!0,fillMode:"flat",selected:s,onClick:function(){return k("ColorGradient")}},i.createElement("span",{className:"k-icon k-i-color-canvas"})),i.createElement(q.z,{type:"button",togglable:!0,fillMode:"flat",selected:!s,onClick:function(){return k("ColorPalette")}},i.createElement("span",{className:"k-icon k-i-palette"})))),i.createElement("div",{className:"k-spacer"}),i.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},e.showClearButton&&Mt.showClearButton&&i.createElement(q.z,{type:"button",fillMode:"flat",onClick:w},i.createElement("span",{className:"k-icon k-i-reset-color"})),e.showPreview&&Mt.showPreview&&i.createElement("div",{className:"k-coloreditor-preview k-vstack"},i.createElement("span",{className:"k-coloreditor-preview-color k-color-preview",style:{background:p}}),i.createElement("span",{className:"k-coloreditor-current-color k-color-preview",style:{background:v},onClick:S})))),i.createElement("div",{className:"k-coloreditor-views k-vstack"},s?i.createElement(ct,{ref:o,value:p,onChange:C,onFocus:E}):i.createElement(gt,{value:p,onChange:C,onFocus:E})),e.showButtons&&Mt.showButtons&&i.createElement("div",{className:"k-coloreditor-footer k-actions k-actions-end"},i.createElement(q.z,{type:"button",className:"k-coloreditor-cancel",onClick:O},V[_]),i.createElement(q.z,{type:"button",className:"k-coloreditor-apply k-primary",onClick:x},V[A]))))})),Tt={id:a.string,value:a.string,view:a.string,header:a.elementType,showClearButton:a.bool,showPreview:a.bool,showButtons:a.bool},Mt={showClearButton:!0,showPreview:!0,showButtons:!0};Nt.displayName="KendoFlatColorPicker",Nt.propTypes=Tt,Nt.defaultProps=Mt,function(e){e[e.Literal=0]="Literal",e[e.Mask=1]="Mask",e[e.Undefined=2]="Undefined"}(Et||(Et={}));var Dt=function(){function e(e,t,n){void 0===n&&(n=Et.Undefined),this.value=e,this.rest=t,this.type=n}return e.prototype.map=function(t){return new e(t(this.value),this.rest)},e.prototype.chain=function(e){return e(this.value,this.rest)},e.prototype.fold=function(e,t){return e(this.value,this.rest)},e.prototype.concat=function(e){return this.map((function(t,n){return e.chain((function(e,n){return t.concat([e])}))}))},e.prototype.toString=function(){return"Result({ value: '".concat(this.value,"', rest: ").concat(this.rest," })")},e}(),Rt=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.input=e,this.control=t,this.inputCursor=0,this.controlCursor=0}return e.prototype.eof=function(){return this.inputCursor>=this.input.length},e.prototype.next=function(){return{char:this.input[this.inputCursor++],control:this.control[this.controlCursor++]}},e.prototype.peek=function(){return{char:this.input[this.inputCursor],control:this.control[this.controlCursor]}},e.prototype.eat_input=function(){this.inputCursor++},e.prototype.eat_control=function(){this.controlCursor++},e.prototype.eat=function(){this.inputCursor++,this.controlCursor++},e}(),Pt=function(e){return(e||"").split("")},_t=function(){function e(e){this.parse=e}return e.prototype.run=function(e,t){return void 0===t&&(t=""),e instanceof Rt?this.parse(e):this.parse(new Rt(Pt(e),Pt(t)))},e.prototype.map=function(t){var n=this;return new e((function(e){return n.parse(e).map(t)}))},e.prototype.chain=function(t){var n=this;return new e((function(e){return n.parse(e).chain((function(e,n){return t(e).run(n)}))}))},e.prototype.isLiteral=function(e){return this.run(e).type===Et.Literal},e}(),At=function(e,t){return new _t((function(n){var r=n.next().char,o=e[r];return"\\"===r?(r=n.next().char,new Dt(t.literal(r),n)):new Dt(o?t.mask(o):t.literal(r),n)}))},jt=function(e){return new _t((function(t){var n=e.prompt,r=e.promptPlaceholder,o=t.next().char;return new Dt(o===n?r:o,t)}))},Ft=function(e){return new _t((function(t){var n=t.next().char;return new Dt(e?n:"",t)}))},zt=function(e){return e.reduce((function(e,t){return n=t,e.chain((function(e){return n.map((function(t){return e.concat([t])}))}));var n}),(t=[],new _t((function(e){return new Dt(t,e)}))));var t},Lt=function(e){return new _t((function(t){for(var n=new Dt([],t);!t.eof();)n=n.concat(e.run(t));return n}))},Bt=function(){function e(){this.rules={},this.prompt="_",this.mask="",this.promptPlaceholder=" ",this.includeLiterals=!1,this.maskTokens=[],this.unmaskTokens=[],this.rawTokens=[],this.validationTokens=[]}return e.prototype.update=function(e){var t=e.mask,n=void 0===t?"":t,r=e.prompt,o=void 0===r?"":r,i=e.promptPlaceholder,a=void 0===i?" ":i,s=e.rules,l=void 0===s?{}:s,c=e.includeLiterals,u=void 0!==c&&c;this.mask=n,this.prompt=o,this.promptPlaceholder=a,this.rules=l,this.includeLiterals=u,this.tokenize()},e.prototype.validationValue=function(e){void 0===e&&(e="");var t=e;return zt(this.validationTokens).run(e).fold((function(e){t=e.join("")})),t},e.prototype.rawValue=function(e){void 0===e&&(e="");var t=e;return this.rawTokens.length?(zt(this.rawTokens).run(e).fold((function(e){t=e.join("")})),t):t},e.prototype.maskRaw=function(e){void 0===e&&(e="");var t=e;return this.maskTokens.length?(zt(this.maskTokens).run(e).fold((function(e){t=e.join("")})),t):t},e.prototype.maskInput=function(e,t,n){return e.length<t.length?this.maskRemoved(e,t,n):this.maskInserted(e,t,n)},e.prototype.maskInRange=function(e,t,n,r){var o="",i=r,a=t.split("").slice(0,n),s=t.split("").slice(r);return zt(this.maskTokens.slice(n,r)).run(e).fold((function(e){o=a.concat(e).concat(s).join("")})),{selection:i,value:o}},e.prototype.maskRemoved=function(e,t,n){var r=this,o="",i=n,a=e.split("").slice(n),s=e.split("").slice(0,n).join(""),l=this.maskTokens.length-(e.length-n);return zt(this.maskTokens.slice(0,l)).run(s,t).fold((function(e){i=r.adjustPosition(e,i),o=e.concat(a).join("")})),{selection:i,value:o}},e.prototype.adjustPosition=function(e,t){var n=e[t];return this.maskTokens[t].isLiteral(n)||n===this.prompt?t:t+1},e.prototype.maskInserted=function(e,t,n){var r=this,o="",i=n,a=e.slice(0,n);return zt(this.unmaskTokens).run(a,t).chain((function(e){i=e.join("").length;var n=t.slice(i);return zt(r.maskTokens).run(e.join("")+n,t)})).fold((function(e){o=e.join("")})),{selection:i,value:o}},Object.defineProperty(e.prototype,"maskTokenCreator",{get:function(){var e=this.prompt,t=this.promptPlaceholder;return{literal:function(e){return t=e,new _t((function(e){return e.peek().char===t?(e.eat(),new Dt(t,e,Et.Literal)):new Dt(t,e,Et.Literal)}));var t},mask:function(n){return(r={prompt:e,promptPlaceholder:t},function(e){return new _t((function(t){for(var n=r.prompt,o=r.promptPlaceholder;!t.eof();){var i=t.peek(),a=i.char,s=i.control;if(a===s&&s===n)return t.eat(),new Dt(n,t,Et.Mask);if(e.test(a))return t.eat(),new Dt(a,t,Et.Mask);if(a===o)return t.eat(),new Dt(n,t,Et.Mask);t.eat_input()}return t.eat(),new Dt(n,t,Et.Mask)}))})(n);var r}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unmaskTokenCreator",{get:function(){var e=this;return{literal:function(e){return t=e,new _t((function(e){return e.eof()?new Dt("",e):(e.peek().char===t&&e.eat(),new Dt(t,e))}));var t},mask:function(t){return(n=e.prompt,function(e){return new _t((function(t){for(;!t.eof();){var r=t.peek(),o=r.char,i=r.control;if(o===n&&i===n)return t.eat(),new Dt(o,t);if(e.test(o))return t.eat(),new Dt(o,t);t.eat_input()}return t.eat(),new Dt("",t)}))})(t);var n}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawTokenCreator",{get:function(){var e=this,t=e.prompt,n=e.promptPlaceholder,r=e.includeLiterals;return{literal:function(e){return Ft(r)},mask:function(e){return jt({prompt:t,promptPlaceholder:n})}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"validationTokenCreator",{get:function(){var e=this.prompt;return{literal:function(e){return Ft(!1)},mask:function(t){return jt({prompt:e,promptPlaceholder:""})}}},enumerable:!1,configurable:!0}),e.prototype.tokenize=function(){var e=this;Lt(At(this.rules,this.maskTokenCreator)).run(this.mask).fold((function(t,n){e.maskTokens=t})),Lt(At(this.rules,this.unmaskTokenCreator)).run(this.mask).fold((function(t,n){e.unmaskTokens=t})),Lt(At(this.rules,this.rawTokenCreator)).run(this.mask).fold((function(t,n){e.rawTokens=t})),Lt(At(this.rules,this.validationTokenCreator)).run(this.mask).fold((function(t,n){e.validationTokens=t}))},e}(),Vt={"#":/[\d\s\+\-]/,"&":/[\S]/,0:/[\d]/,9:/[\d\s]/,"?":/[a-zA-Z\s]/,A:/[a-zA-Z0-9]/,C:/./,L:/[a-zA-Z]/,a:/[a-zA-Z0-9\s]/},Ht=function(){return!1},Kt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=function(){return Wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Wt.apply(this,arguments)},$t=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n._inputId="k-".concat((0,l.M)()),n._service=new Bt,n._isPasted=!1,n._selection=[null,null],n._input=null,n.focus=function(){n._input&&n._input.focus()},n.pasteHandler=function(e){var t=e.target,r=t.selectionStart,o=t.selectionEnd;o!==r&&(n._isPasted=!0,n._selection=[r||0,o||0])},n.onChangeHandler=function(e){var t=e.currentTarget,r=t.value,o=n._selection[0]||0,i=n._selection[1]||0;if(!n.props.mask)return n._isPasted=!1,n._selection=[null,null],void n.triggerOnChange(r,e);var a,s=n.value;if(n._isPasted){n._isPasted=!1;var l=s.length-i,c=r.length-l;a=n._service.maskInRange(r.slice(o,c),s,o,i)}else a=n._service.maskInput(r,s,t.selectionStart||0);n._selection=[a.selection,a.selection],n.triggerOnChange(a.value,e)},n.focusHandler=function(e){n.state.focused||(n.setState({focused:!0}),n.props.onFocus&&n.props.onFocus.call(void 0,{target:n,syntheticEvent:e,nativeEvent:e.nativeEvent}))},n.blurHandler=function(e){n.state.focused&&(n.setState({focused:!1}),n.props.onBlur&&n.props.onBlur.call(void 0,{target:n,syntheticEvent:e,nativeEvent:e.nativeEvent}))},n.setValidity=function(){n.element&&n.element.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"")},(0,f.s)(h),n}return Kt(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rawValue",{get:function(){return this._service.rawValue(this.value)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=this.value,t=this._service.validationValue(e);return{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!(this.required&&!t||this.props.maskValidation&&this.props.prompt&&-1!==e.indexOf(this.props.prompt)),valueMissing:!t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){if(this.element&&this.state.focused&&t.focused){var n=this._selection,r=n[0],o=n[1],i=e.selection,a=this.props.selection;(!i&&a||i&&a&&(i.start!==a.start||i.end!==a.end))&&(r=a.start,o=a.end),null!==r&&null!==o&&this.element.setSelectionRange(r,o)}var s,l;s=e,l=this.props,s.includeLiterals===l.includeLiterals&&s.mask===l.mask&&s.prompt===l.prompt&&s.promptPlaceholder===l.promptPlaceholder&&function(e,t){if(!!e!=!!t)return!1;if(e===t||!e||!t)return!0;var n=!0;for(var r in e)if(e[r]!==t[r]){n=!1;break}if(n)for(var r in t)if(!e.hasOwnProperty(r)){n=!1;break}return n}(s.rules,l.rules)||this.updateService(),this.setValidity()},t.prototype.componentDidMount=function(){this.updateService(),this.setValidity()},t.prototype.render=function(){var e,n=this,r=this.props,o=r.size,a=void 0===o?t.defaultProps.size:o,s=r.fillMode,l=void 0===s?t.defaultProps.fillMode:s,d=r.rounded,p=void 0===d?t.defaultProps.rounded:d,f=this.props.id||this._inputId,h=!this.validityStyles||this.validity.valid,m=this.props.style||{},g=i.createElement("span",{dir:this.props.dir,className:(0,c.A)("k-maskedtextbox k-input",(e={},e["k-input-".concat(de.G.sizeMap[a]||a)]=a,e["k-input-".concat(l)]=l,e["k-rounded-".concat(de.G.roundedMap[p]||p)]=p,e["k-invalid"]=!h,e["k-required"]=this.required,e["k-disabled"]=this.props.disabled,e),this.props.className),style:this.props.label?m:Wt({width:this.props.width},m)},i.createElement("input",{type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,className:"k-input-inner",value:this.value,id:f,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,name:this.props.name,tabIndex:(0,u.p)(this.props.tabIndex,this.props.disabled,!0),accessKey:this.props.accessKey,title:this.props.title,disabled:this.props.disabled||void 0,readOnly:this.props.readonly||void 0,placeholder:this.props.placeholder,ref:function(e){return n._input=e},onChange:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragStart:Ht,onDrop:Ht}));return this.props.label?i.createElement(pe._,{label:this.props.label,editorId:f,editorValue:this.value,editorValid:h,editorDisabled:this.props.disabled,editorPlaceholder:this.props.placeholder,children:g,style:{width:this.props.width},dir:this.props.dir}):g},t.prototype.triggerOnChange=function(e,t){if(this.setState({value:e}),this.props.onChange){this._valueDuringOnChange=e;var n={syntheticEvent:t,nativeEvent:t.nativeEvent,selectionStart:this._selection[0],selectionEnd:this._selection[1],target:this,value:this.value};this.props.onChange.call(void 0,n),this._valueDuringOnChange=void 0}},t.prototype.updateService=function(e){var t=Object.assign({includeLiterals:this.props.includeLiterals,mask:this.props.mask,prompt:this.props.prompt,promptPlaceholder:this.props.promptPlaceholder,rules:this.rules},e);this._service.update(t)},Object.defineProperty(t.prototype,"rules",{get:function(){return Object.assign({},Vt,this.props.rules)},enumerable:!1,configurable:!0}),t.displayName="MaskedTextBox",t.propTypes={value:a.string,defaultValue:a.string,placeholder:a.string,title:a.string,dir:a.string,id:a.string,style:a.object,className:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,width:a.oneOfType([a.string,a.number]),tabIndex:a.number,accessKey:a.string,disabled:a.bool,readonly:a.bool,prompt:a.string,promptPlaceholder:a.string,includeLiterals:a.bool,maskValidation:a.bool,mask:a.string,rules:function(e,t,n){var r=e.rules;return void 0===r||Object.entries(r).some((function(e){return"string"!=typeof e||!(r[e]instanceof RegExp)}))?null:new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed.")},selection:a.shape({start:a.number.isRequired,end:a.number.isRequired}),name:a.string,label:a.string,validationMessage:a.string,required:a.bool,valid:a.bool,validityStyles:a.bool,onChange:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])},t.defaultProps={prompt:"_",promptPlaceholder:" ",includeLiterals:!1,maskValidation:!0,rules:Vt,required:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},t}(i.Component),qt=(0,p.Y)(),Ut=(0,p.u)(qt,$t);Ut.displayName="KendoReactMaskedTextBox";var Gt,Yt=n(9844),Xt=function(){return Xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Xt.apply(this,arguments)};!function(e){e.start="start",e.end="end",e.min="min",e.max="max",e.increase="increase",e.decrease="decrease"}(Gt||(Gt={}));var Jt=function(){return Jt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Jt.apply(this,arguments)},Zt=(0,p.Y)(),Qt=i.forwardRef((function(e,t){var n,r;(0,f.s)(h);var o=(0,ue.Y)(Zt,e),a=i.useRef(null),s=i.useRef(null),l=i.useRef(null),d=i.useRef(null),p=i.useRef(null),g=i.useCallback((function(){d.current&&d.current.focus()}),[d]);i.useImperativeHandle(a,(function(){return{element:s.current,focus:g,props:o}})),i.useImperativeHandle(t,(function(){return a.current}));var y=i.useMemo((function(){return o.min}),[o.min]),b=i.useMemo((function(){return o.max}),[o.max]),w=i.useMemo((function(){return void 0!==o.step?o.step:tn.step}),[o.step,tn.step]),C=(0,H.n)(s,o.dir),x=i.useState(""),O=x[0],S=x[1],E=function(e,t,n){var r=i.useState(e),o=r[0],a=r[1],s=i.useCallback((function(e){var r=function(e,t){var n,r;switch(t.type){case Gt.start:if(void 0===t.payload)return e;n={start:t.payload>e.end?e.end:Math.max(t.payload,t.min),end:e.end};break;case Gt.end:if(void 0===t.payload)return e;n={start:e.start,end:t.payload<e.start?e.start:Math.min(t.payload,t.max)};break;case Gt.min:n="start"===t.key?Xt(Xt({},e),{start:t.min}):Xt(Xt({},e),{end:Math.max(t.min,e.start)});break;case Gt.max:n="start"===t.key?Xt(Xt({},e),{start:Math.min(t.max,e.end)}):Xt(Xt({},e),{end:t.max});break;case Gt.increase:if(void 0===t.step||void 0===t.key)return e;r=e[t.key]+t.step,n="start"===t.key?r<t.min?Xt(Xt({},e),{start:t.min}):Xt(Xt({},e),{start:Math.min(r,e.end)}):r>t.max?Xt(Xt({},e),{end:t.max}):Xt(Xt({},e),{end:Math.max(r,e.start)});break;case Gt.decrease:if(void 0===t.step||void 0===t.key)return e;r=e[t.key]-t.step,n="start"===t.key?r<t.min?Xt(Xt({},e),{start:t.min}):Xt(Xt({},e),{start:Math.min(r,e.end)}):r>t.max?Xt(Xt({},e),{end:t.max}):Xt(Xt({},e),{end:Math.max(r,e.start)});break;default:n=e}return n}(t.state||o,Jt(Jt({},e),t));n&&n(r,e.event),a(r)}),[t,n]);return[o,s]}(o.defaultValue||tn.defaultValue,{min:y,max:b,step:w,state:o.value},(function(e,t){o.onChange&&a.current&&o.onChange.call(void 0,{value:e,target:a.current,syntheticEvent:t})})),I=E[0],N=E[1],T=i.useMemo((function(){return o.value||I}),[o.value,I]),M=i.useRef(null),D=i.useRef(null),R=i.useMemo((function(){return(T.start-y)/(b-y)*100}),[T.start,y,b]),P=i.useMemo((function(){return(T.end-y)/(b-y)*100}),[T.end,y,b]),_=i.useMemo((function(){return o.vertical?{paddingTop:0,height:"100%"}:{}}),[o.vertical]),A=i.useMemo((function(){return o.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"}}),[o.vertical]),j=(0,v.useLocalization)(),F=i.useCallback((function(e){if(D.current){var t=D.current.getBoundingClientRect(),n=o.vertical?t.bottom-e.clientY:"rtl"===C?t.right-e.clientX:e.clientX-t.left,r=o.vertical?t.height:t.width;return y+n/r*(b-y)}}),[D,o.vertical,C,y,b,I.start,I.end,o.value&&o.value.start,o.value&&o.value.end]),z=i.useCallback((function(e){return e<=T.start?"start":e>=T.end?"end":2*e<T.end+T.start?"start":"end"}),[I.start,I.end,o.value&&o.value.start,o.value&&o.value.end]),L=i.useCallback((function(e){switch(e.keyCode){case m.R.right:e.preventDefault(),N({type:"rtl"===C?Gt.decrease:Gt.increase,key:"start",event:e});break;case m.R.up:e.preventDefault(),N({type:Gt.increase,key:"start",event:e});break;case m.R.left:e.preventDefault(),N({type:"rtl"===C?Gt.increase:Gt.decrease,key:"start",event:e});break;case m.R.down:e.preventDefault(),N({type:Gt.decrease,key:"start",event:e});break;case m.R.home:e.preventDefault(),N({type:Gt.min,key:"start",event:e});break;case m.R.end:e.preventDefault(),N({type:Gt.max,key:"start",event:e})}}),[N]),B=i.useCallback((function(e){switch(e.keyCode){case m.R.right:e.preventDefault(),N({type:"rtl"===C?Gt.decrease:Gt.increase,key:"end",event:e});break;case m.R.up:e.preventDefault(),N({type:Gt.increase,key:"end",event:e});break;case m.R.left:e.preventDefault(),N({type:"rtl"===C?Gt.increase:Gt.decrease,key:"end",event:e});break;case m.R.down:e.preventDefault(),N({type:Gt.decrease,key:"end",event:e});break;case m.R.home:e.preventDefault(),N({type:Gt.min,key:"end",event:e});break;case m.R.end:e.preventDefault(),N({type:Gt.max,key:"end",event:e})}}),[N,C]),K=i.useCallback((function(e){var t=F(e),n=z(t);S(n),"end"===n?p.current.focus():d.current.focus();var r="end"===n?Gt.end:Gt.start;N({type:r,payload:t,event:e})}),[o.vertical,y,b,N]);return(0,Yt.O)(D,{onPress:K,onDrag:function(e){var t=F(e),n="end"===O?Gt.end:Gt.start;N({type:n,payload:t,event:e})},onRelease:function(e){var t=F(e),n="end"===O?Gt.end:Gt.start;N({type:n,payload:t,event:e}),S("")}}),i.createElement("div",{id:o.id,style:o.style,ref:s,dir:C,className:(0,c.A)("k-widget k-slider",{"k-rtl":"rtl"===C,"k-disabled":o.disabled,"k-slider-vertical":o.vertical,"k-slider-horizontal":!o.vertical},o.className)},i.createElement("div",{ref:D,className:"k-slider-track-wrap",style:Jt({flexGrow:1,position:"relative",touchAction:"none"},A)},o.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:Jt({},_)},i.Children.map(o.children,(function(e){return e&&i.cloneElement(e,{position:100*(e.props.position-o.min)/(o.max-o.min),vertical:o.vertical},e.props.children)}))),i.createElement("div",{ref:M,className:"k-slider-track",style:o.vertical?{bottom:0,height:"100%"}:(n={},n["rtl"===C?"right":"left"]=0,n.width="100%",n)},null!==R&&null!==P&&i.createElement("div",{"data-selection":!0,ref:l,title:"".concat(T.start," - ").concat(T.end),className:"k-slider-selection",style:o.vertical?{height:P-R+"%",bottom:R+"%"}:(r={},r["rtl"===C?"right":"left"]=R+"%",r.width=P-R+"%",r)}),i.createElement("span",{ref:d,role:"slider",tabIndex:(0,u.p)(o.startTabIndex,o.disabled,void 0),"aria-valuemin":y,"aria-valuemax":Math.max(b,T.end),"aria-valuenow":T.start,"aria-disabled":o.disabled?"true":void 0,"aria-valuetext":"".concat(T.start," - ").concat(T.end),className:"k-draghandle",title:j.toLanguageString(k,V[k]),style:o.vertical?{bottom:"calc("+R+"%)",zIndex:1}:"rtl"===C?{right:"calc("+R+"% - 13px)",zIndex:1}:{left:"calc("+R+"%)",zIndex:1},onKeyDown:L}),i.createElement("span",{ref:p,role:"slider",tabIndex:(0,u.p)(o.endTabIndex,o.disabled,void 0),"aria-valuemin":Math.min(y,T.start),"aria-valuemax":b,"aria-valuenow":T.end,"aria-disabled":o.disabled?"true":void 0,"aria-valuetext":"".concat(T.start," - ").concat(T.end),className:"k-draghandle",title:j.toLanguageString(k,V[k]),style:o.vertical?{bottom:"calc("+P+"%)",zIndex:1}:"rtl"===C?{right:"calc("+P+"% - 13px)",zIndex:1}:{left:"calc("+P+"%)",zIndex:1},onKeyDown:B}))))})),en={value:function(e,t,n){if(e.value){var r=e.value.start,o=e.value.end,i=e.min,a=e.max;if(r>o||r>a||r<i||o>a||o<i||o<r)return new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n "))}return null},defaultValue:function(e,t,n){if(e.defaultValue){var r=e.defaultValue.start,o=e.defaultValue.end,i=e.min,a=e.max;if(r>o||r>a||r<i||o>a||o<i||o<r)return new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n "))}return null},onChange:a.func,step:a.number,min:function(e,t,n){var r=e[t],o=e.min,i=e.max;return void 0===o?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n ").concat(t," value can not be undefined.\n ")):r&&o>=i?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n ").concat(t," value can not be equal to or bigger than the max value.\n ")):null},max:function(e,t,n){var r=e[t],o=e.min,i=e.max;return void 0===i?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n ").concat(t," value can not be undefined.\n ")):r&&i<=o?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n ").concat(t," value can not be equal to or smaller than the min value.\n ")):null},vertical:a.bool,disabled:a.bool,dir:a.oneOf(["ltr","rtl"])},tn={step:1,defaultValue:{start:0,end:0},vertical:!1,disabled:!1};Qt.displayName="KendoReactRangeSlider",Qt.propTypes=en,Qt.defaultProps=tn;var nn=n(3228),rn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),on=function(){return on=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},on.apply(this,arguments)},an=function(e){function t(n){var r=e.call(this,n)||this;return r.setValidity=function(){r._input&&r._input.setCustomValidity&&r._input.setCustomValidity(r.validity.valid?"":r.props.validationMessage||r.defaultValidationMessage.toLanguageString(z,V[z]))},r.limit=function(e,t,n){var r=n.offsetWidth,o=t.offsetWidth;return e<0?0:e>r-o?r-o:e},r.toggle=function(e,t){r.setState({checked:e}),r.valueDuringOnChange=e,(0,g.N)(r.props.onChange,t,r,{value:e}),r.valueDuringOnChange=void 0},r._element=null,r._wrapper=null,r._input=null,r._id=(0,l.M)(),r.defaultValidationMessage=(0,v.provideLocalizationService)(r),r.focus=function(){r._element&&r._element.focus()},r.dummyInput=function(e){return i.createElement("input",{type:"checkbox",checked:r.props.checked,ref:function(e){r._input=e},tabIndex:-1,"aria-hidden":!0,value:e,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"},onChange:nn.Z})},r.handleClick=function(e){r.eventTimeStamp!==e.timeStamp&&(r.eventTimeStamp=e.timeStamp,r.toggle(!r.value,e))},r.handleKeyDown=function(e){if(!r.props.disabled){var t=e.keyCode;t!==m.R.space&&t!==m.R.enter||(r.toggle(!r.value,e),e.preventDefault())}},r.handleWrapperFocus=function(e){if(!r.props.disabled){r.setState({focused:!0});var t=r.props.onFocus;t&&t.call(void 0,e)}},r.handleWrapperBlur=function(e){if(!r.props.disabled){r.setState({focused:!1});var t=r.props.onBlur;t&&t.call(void 0,e)}},(0,f.s)(h),r.state={checked:n.defaultChecked||t.defaultProps.defaultChecked,focused:!1},r}return rn(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.checked?this.props.checked:this.state.checked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"actionElement",{get:function(){return this._wrapper},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=void 0!==this.props.valid?this.props.valid:!this.props.required||!!this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.setValidity(),this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.setValidity()},t.prototype.render=function(){var e,t,n,r=this,o=this.state.focused,a=this.props,s=a.dir,l=a.disabled,d=a.trackRounded,p=a.thumbRounded,f=a.size,h=a.id,m=a.offLabel,g=a.onLabel,v=a.tabIndex;this.dir=s||this._wrapper&&getComputedStyle(this._wrapper).direction||void 0;var y=!this.validityStyles||this.validity.valid,b=(0,c.A)("k-switch",((e={})["k-switch-".concat(de.G.sizeMap[f]||f)]=f,e["k-rounded-".concat(de.G.roundedMap[d]||d)]=d,e["k-switch-on"]=this.value,e["k-switch-off"]=!this.value,e["k-focus"]=o,e["k-disabled"]=l,e["k-invalid"]=!y,e),this.props.className),k={"aria-checked":this.value,"aria-disabled":l||void 0};return i.createElement("span",{ref:function(e){r._wrapper=e},className:b,dir:this.dir,onKeyDown:this.handleKeyDown,onClick:this.handleClick,onBlur:this.handleWrapperBlur,onFocus:this.handleWrapperFocus},i.createElement("span",on({className:(0,c.A)("k-switch-track",(t={},t["k-rounded-".concat(de.G.roundedMap[d]||d)]=d,t)),id:h||this._id,role:"switch"},k,{"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,ref:function(e){r._element=e},tabIndex:(0,u.p)(v,l,void 0),accessKey:this.props.accessKey}),this.dummyInput(this.value),i.createElement("span",{className:"k-switch-label-on"},g),i.createElement("span",{className:"k-switch-label-off"},m),i.createElement("span",{className:"k-switch-thumb-wrap"},i.createElement("span",{className:(0,c.A)("k-switch-thumb",(n={},n["k-rounded-".concat(p)]=p,n))}))))},t.displayName="Switch",t.propTypes={accessKey:a.string,checked:a.bool,className:a.string,disabled:a.bool,defaultChecked:a.bool,size:a.oneOf([null,"small","medium","large"]),trackRounded:a.oneOf([null,"small","medium","large","full"]),thumbRounded:a.oneOf([null,"small","medium","large","full"]),dir:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,offLabel:a.string,required:a.bool,tabIndex:a.number,valid:a.bool,validate:a.bool,validationMessage:a.string,onBlur:a.any,onChange:a.any,onFocus:a.any,onLabel:a.string},t.defaultProps={disabled:!1,defaultChecked:!1,size:"medium",trackRounded:"full",thumbRounded:"full",offLabel:"OFF",onBlur:nn.Z,onFocus:nn.Z,onLabel:"ON",required:!1,validityStyles:!0},t}(i.Component),sn=(0,p.Y)(),ln=(0,p.u)(sn,an);ln.displayName="KendoReactSwitch";var cn=function(){return cn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cn.apply(this,arguments)},un=(0,p.Y)(),dn=i.forwardRef((function(e,t){var n;(0,f.s)(h);var r=(0,ue.Y)(un,e),o=r,a=o.ariaDescribedBy,s=o.ariaLabelledBy,d=o.checked,p=o.className,y=o.children,b=o.defaultChecked,k=o.disabled,w=o.defaultValue,C=o.id,x=o.size,O=o.rounded,S=o.label,E=o.labelPlacement,I=o.name,N=o.labelOptional,T=o.onChange,M=o.onFocus,D=o.onBlur,R=o.tabIndex,P=o.value,_=o.required,A=o.valid,z=o.validationMessage,L=o.validityStyles,B=(o.visited,o.touched,o.modified,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(o,["ariaDescribedBy","ariaLabelledBy","checked","className","children","defaultChecked","disabled","defaultValue","id","size","rounded","label","labelPlacement","name","labelOptional","onChange","onFocus","onBlur","tabIndex","value","required","valid","validationMessage","validityStyles","visited","touched","modified"])),K=i.useRef(null),W=i.useCallback((function(){K.current&&K.current.focus()}),[]),$=i.useCallback((function(){return{element:K.current,focus:W,get name(){return K.current&&K.current.name}}}),[W]);i.useImperativeHandle(t,$);var q=i.useState(b),U=q[0],G=q[1],Y=i.useState(w),X=Y[0],J=Y[1],Z="boolean"==typeof P||null===P,Q=void 0!==d,ee=Z,te=ee?P:X,ne=Q?d:ee?void 0:U,re=void 0===ne&&te,oe=re?te:ne,ie=re||ee?null===P?P:void 0:P||te,ae=null===oe||null===ie,se=i.useMemo((function(){return(0,l.M)()}),[]),le=(0,v.useLocalization)(),ce=function(e){return le.toLanguageString(e,V[e])},pe=ce(j),fe=ce(F),he=void 0!==A?A:!_||!!ne;i.useEffect((function(){K.current&&K.current.setCustomValidity&&K.current.setCustomValidity(he?"":z||pe)}),[he,z,pe]);var me=i.useCallback((function(e,t){ee||k||(J(t),Q||k||G(t)),T&&!k&&(0,g.N)(T,e,cn(cn({},$()),{value:t}),{value:t})}),[Q,k,T,ee,$]),ge=i.useCallback((function(e){var t=e.target.checked;me(e,t)}),[me,P]),ve=i.useCallback((function(e){if(!k){var t=e.keyCode,n=e.currentTarget.checked;t===m.R.space&&(e.preventDefault(),e.stopPropagation(),me(e,!n))}}),[k,me]),ye=i.useCallback((function(e){k||e.keyCode===m.R.space&&e.preventDefault()}),[k]),be=i.useCallback((function(e){M&&!k&&(0,g.N)(M,e,$(),void 0)}),[M,k,$]),ke=i.useCallback((function(e){D&&!k&&(0,g.N)(D,e,$(),void 0)}),[D,k,$]),we=(0,H.n)(K,r.dir),Ce=(0,c.A)({"k-disabled":k},p),xe=cn(cn({type:"checkbox",className:(0,c.A)("k-checkbox",(n={},n["k-checkbox-".concat(de.G.sizeMap[x]||x)]=x,n["k-rounded-".concat(de.G.roundedMap[O]||O)]=O,n["k-indeterminate"]=ae,n["k-invalid k-invalid"]=!(he||void 0!==L||!0===L),n)),ref:K,name:I,id:C||se,"aria-labelledby":s,"aria-describedby":a,checked:Boolean(oe),disabled:k,tabIndex:(0,u.p)(R,k),role:"checkbox",required:void 0!==_&&_,"aria-checked":!(!ne&&!oe)||!!ae&&"mixed","aria-disabled":k||void 0},B),{onChange:ge,onKeyDown:ve,onKeyUp:ye,onFocus:be,onBlur:ke}),Oe=i.createElement(i.Fragment,null,void 0===ie?i.createElement("input",cn({},xe)):i.createElement("input",cn({},xe,{value:Z?void 0:null===ie?"":ie}))),Se=i.createElement(i.Fragment,null,void 0!==S?i.createElement("label",{className:"k-checkbox-label",htmlFor:C||se,style:{userSelect:"none"}},S,N&&i.createElement("span",{className:"k-label-optional"},fe)):null);return i.createElement(i.Fragment,null,"before"===E?i.createElement("span",{className:Ce,dir:"rtl"},Oe,Se,y):i.createElement("span",{className:Ce,dir:we},Oe,Se,y))}));dn.propTypes={checked:a.bool,className:a.string,defaultChecked:a.bool,defaultValue:a.any,dir:a.string,disabled:a.bool,id:a.string,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large"]),ariaLabelledBy:a.string,ariaDescribedBy:a.string,label:a.any,labelPlacement:a.string,labelOptional:a.bool,name:a.string,tabIndex:a.number,value:a.any,validationMessage:a.string,required:a.bool,validate:a.bool,valid:a.bool,onChange:a.func,onFocus:a.func,onBlur:a.func},dn.defaultProps={size:"medium",rounded:"medium"},dn.displayName="KendoCheckbox";var pn=function(){return pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pn.apply(this,arguments)},fn=(0,p.Y)(),hn=i.forwardRef((function(e,t){var n;(0,f.s)(h);var r=(0,ue.Y)(fn,e),o=r.ariaDescribedBy,a=r.checked,s=r.children,d=r.className,p=r.disabled,m=r.id,v=r.size,y=r.label,b=r.labelPlacement,k=r.name,w=r.style,C=r.tabIndex,x=r.value,O=r.valid,S=r.onChange,E=r.onFocus,I=r.onBlur,N=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(r,["ariaDescribedBy","checked","children","className","disabled","id","size","label","labelPlacement","name","style","tabIndex","value","valid","onChange","onFocus","onBlur"]),T=i.useRef(null),M=i.useCallback((function(){T.current&&T.current.focus()}),[]),D=i.useCallback((function(){return{element:T.current,focus:M}}),[M]);i.useImperativeHandle(t,D);var R=i.useMemo((function(){return(0,l.M)()}),[]),P=i.useCallback((function(e){(0,g.N)(S,e,D(),{value:x})}),[S,x,p]),_=i.useCallback((function(e){E&&!p&&(0,g.N)(E,e,D(),void 0)}),[E,p]),A=i.useCallback((function(e){I&&!p&&(0,g.N)(I,e,D(),void 0)}),[I,p]),j=pn({type:"radio",id:m||R,name:k,className:(0,c.A)("k-radio",(n={},n["k-radio-".concat(de.G.sizeMap[v]||v)]=v,n["k-invalid"]=!1===O,n),d),ref:T,disabled:p,tabIndex:(0,u.p)(C,p),checked:a,style:w,"aria-describedby":o,value:x,onChange:P,onFocus:_,onBlur:A},N),F=i.createElement(i.Fragment,null,void 0!==y?i.createElement("label",{className:"k-radio-label",htmlFor:m||R,style:{userSelect:"none"},"aria-label":y},y):null),z=i.createElement("input",pn({},j));return"before"===b?i.createElement(i.Fragment,null,F,z,s):i.createElement(i.Fragment,null,z,F,s)}));hn.propTypes={ariaDescribedBy:a.string,checked:a.bool,className:a.string,disabled:a.bool,id:a.string,size:a.oneOf([null,"small","medium","large"]),label:a.string,labelPlacement:a.string,name:a.string,style:a.object,tabIndex:a.number,value:a.any,valid:a.bool,onChange:a.func,onFocus:a.func,onBlur:a.func},hn.displayName="KendoRadioButton",hn.defaultProps={size:"medium"};var mn=n(1573),gn=function(){return gn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gn.apply(this,arguments)},vn=(0,p.Y)(),yn=i.forwardRef((function(e,t){(0,f.s)(h);var n=(0,ue.Y)(vn,e),r=n.ariaLabelledBy,o=n.ariaDescribedBy,a=n.className,u=n.data,d=n.defaultValue,p=n.disabled,m=n.name,v=n.labelPlacement,y=n.layout,b=n.style,k=n.value,w=n.valid,C=n.item,x=void 0===C?bn.item:C,O=n.onChange,S=n.onFocus,E=i.useRef(null),I=i.useCallback((function(){E.current&&(0,s.n)(E.current)}),[]),N=i.useCallback((function(){return{element:E.current,focus:I}}),[I]);i.useImperativeHandle(t,N);var T=i.useState(d),M=T[0],D=T[1],R=void 0!==k,P=R?k:M,_=i.useCallback((function(e){var t=e.value;R||p||D(t),O&&!p&&(0,g.N)(O,e.syntheticEvent,N(),{value:t})}),[D,O,p]),A=i.useCallback((function(e){S&&!p&&(0,g.N)(S,e.syntheticEvent,N(),void 0)}),[S,p]),j=i.useMemo((function(){return(0,l.M)()}),[]),F=(0,c.A)("k-radio-list",{"k-list-horizontal":"horizontal"===y,"k-list-vertical":"vertical"===y||void 0===y},a),z=(0,mn.V)(E,n.dir),L=u&&u.map((function(e,t){var n=P===e.value,r=null==P,o=gn(gn({},e),{valid:w,checked:n,disabled:!(!e.disabled&&!p),labelPlacement:e.labelPlacement?e.labelPlacement:v,tabIndex:e.tabIndex?e.tabIndex:r&&0===t||n?0:-1,index:t,name:m||j,onChange:_,onFocus:A});return i.createElement(x,{className:(0,c.A)("k-radio-item",{"k-disabled":o.disabled||p}),key:t,role:"radio"},i.createElement(hn,gn({},o)))}));return i.createElement("ul",{role:"radiogroup",className:F,ref:E,dir:z,style:b,"aria-labelledby":r,"aria-describedby":o},L)})),bn={item:function(e){return i.createElement("li",gn({},e))}};yn.propTypes={ariaLabelledBy:a.string,ariaDescribedBy:a.string,className:a.string,data:a.arrayOf(a.object),defaultValue:a.any,dir:a.string,disabled:a.bool,labelPlacement:a.string,layout:a.string,name:a.string,style:a.object,value:a.any,onChange:a.func,onFocus:a.func},yn.defaultProps=bn,yn.displayName="KendoRadioGroup";var kn=function(){return kn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},kn.apply(this,arguments)},wn=(0,p.Y)(),Cn=i.forwardRef((function(e,t){var n,r=(0,ue.Y)(wn,e),o=r,a=o.size,s=o.rounded,d=o.fillMode,p=o.ariaDescribedBy,f=o.ariaLabelledBy,h=o.autoSize,m=o.className,v=o.defaultValue,y=o.disabled,b=o.readOnly,k=o.required,w=o.rows,C=o.id,x=o.name,O=o.placeholder,S=o.style,E=o.tabIndex,I=o.value,N=o.valid,T=o.validationMessage,M=o.validityStyles,D=o.onChange,R=o.onFocus,P=o.onBlur,_=(o.visited,o.touched,o.modified,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(o,["size","rounded","fillMode","ariaDescribedBy","ariaLabelledBy","autoSize","className","defaultValue","disabled","readOnly","required","rows","id","name","placeholder","style","tabIndex","value","valid","validationMessage","validityStyles","onChange","onFocus","onBlur","visited","touched","modified"])),A=i.useRef(null),j=i.useCallback((function(){A.current&&A.current.focus()}),[]),F=i.useState(v),z=F[0],L=F[1],B=void 0!==I,V=B?I:z,K=i.useCallback((function(){return{element:A,focus:j,get value(){return V},get name(){return A.current&&A.current.name}}}),[j,V]);i.useImperativeHandle(t,K);var W=i.useState("auto"),$=W[0],q=W[1],U=i.useMemo((function(){return(0,l.M)()}),[]),G=(0,H.n)(A,r.dir),Y=void 0!==N?N:!k||!!V;i.useEffect((function(){A.current&&A.current.setCustomValidity&&A.current.setCustomValidity(Y?"":T||"")}),[Y,T]),i.useLayoutEffect((function(){A.current&&q("".concat(A.current.scrollHeight,"px"))}),[V]);var X=i.useCallback((function(e){var t=e.target.value;B||y||(q("auto"),L(t)),D&&!y&&(0,g.N)(D,e,kn(kn({},K()),{value:t}),{value:t})}),[L,D,y,B]),J=i.useCallback((function(e){R&&!y&&(0,g.N)(R,e,K(),void 0)}),[R,y]),Z=i.useCallback((function(e){P&&!y&&(0,g.N)(P,e,K(),void 0)}),[P,y]),Q=kn(kn({id:C||U,name:x,className:"k-input-inner !k-overflow-auto",ref:A,disabled:y,rows:w,placeholder:O,readOnly:b,required:k,tabIndex:(0,u.p)(E,y),style:h?{resize:"none",overflow:"hidden",height:$}:{},"aria-labelledby":f,"aria-describedby":p,"aria-multiline":!0,"aria-disabled":y||void 0,value:B?I:z},_),{onChange:X,onFocus:J,onBlur:Z});return i.createElement("span",{className:(0,c.A)("k-input","k-textarea",(n={},n["k-input-".concat(de.G.sizeMap[a]||a)]=a,n["k-input-".concat(d)]=d,n["k-rounded-".concat(de.G.roundedMap[s]||s)]=s,n["k-invalid"]=!(Y||void 0!==M||!0===M),n["k-required"]=k,n["k-disabled"]=y,n),m),style:S,dir:G},i.createElement("textarea",kn({},Q)))}));Cn.propTypes={ariaDescribedBy:a.string,ariaLabelledBy:a.string,autoSize:a.bool,className:a.string,defaultValue:a.string,dir:a.string,disabled:a.bool,readOnly:a.bool,rows:a.number,id:a.string,name:a.string,placeholder:a.string,style:a.object,tabIndex:a.number,value:a.oneOfType([a.string,a.arrayOf(a.string),a.number]),onChange:a.func,onFocus:a.func,onBlur:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])},Cn.displayName="KendoTextArea",Cn.defaultProps={size:"medium",rounded:"medium",fillMode:"solid"};var xn=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useRef(null),o=(0,H.n)(r,e.dir);i.useImperativeHandle(n,(function(){return{element:r.current,props:e,value:e.value}})),i.useImperativeHandle(t,(function(){return n.current}));var a=i.useCallback((function(t){e.onClick&&e.onClick.call(void 0,{value:e.value,target:n.current,syntheticEvent:t})}),[e.onClick,e.value]),s=i.useCallback((function(t){e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onKeyDown]),l=i.useCallback((function(t){e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onFocus]),u=i.useCallback((function(t){e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onBlur]),d=i.useCallback((function(t){e.onMouseMove&&e.onMouseMove.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseMove]),p=i.useCallback((function(t){e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseEnter]),f=i.useCallback((function(t){e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseLeave]);return i.createElement("span",{id:e.id,ref:r,dir:o,"data-half":e.half,tabIndex:e.tabIndex,title:e.title,style:e.style,className:(0,c.A)("k-rating-item",{"k-rtl":"rtl"===o,"k-selected":e.selected,"k-hover":e.hovered},e.className),onClick:a,onKeyDown:s,onFocus:l,onBlur:u,onMouseEnter:p,onMouseLeave:f,onMouseMove:d},e.children)})),On={id:a.string,icon:a.any,dir:a.oneOf(["ltr","rtl"]),title:a.string,value:a.number,half:a.bool,selected:a.bool,hovered:a.bool};xn.displayName="KendoReactRatingItem",xn.propTypes=On,xn.defaultProps={dir:"ltr"};var Sn,En=function(e,t){if(e%1){var n=Math.pow(10,(t.toString().split(".")[1]||t.toString().split(".")[0]).length);return Math.round(e*n)/n}return e},In=function(e,t,n){return En(e-n,n)<t&&t<e},Nn=function(e,t,n,r){return null!==t&&("continues"===r?In(e,t,n)?En(e-n/2,n/2)<=t:e<=t:"single"===r&&(In(e,t,n)?En(e-n/2,n/2)===t:e===t))},Tn=function(e,t,n){return"ltr"===e?n<t.x+t.width/2:n>t.x+t.width/2},Mn=function(e,t,n,r){for(var o=e;o<=t;o+=n)if(r===o)return!0;return!1};!function(e){e.select="select",e.deselect="deselect",e.increase="increase",e.decrease="decrease",e.min="min",e.max="max",e.reset="reset"}(Sn||(Sn={}));var Dn=function(){return Dn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Dn.apply(this,arguments)},Rn=function(e,t,n){var r=i.useState(e),o=r[0],a=r[1];return[o,function(e){var r=function(e,t){switch(t.type){case Sn.select:return void 0===t.payload||void 0===t.step?e:t.payload===e?null:t.payload>=t.min?t.payload<t.max?En(t.payload,t.step):t.max:t.min;case Sn.deselect:return null;case Sn.increase:return void 0===t.step?e:e<t.min?t.min:e+t.step<t.max?En(e+t.step,t.step):t.max;case Sn.decrease:return void 0===t.step?e:En(e-t.step,t.step)>=t.min?En(e-t.step,t.step):t.min;case Sn.min:return void 0===t.step?e:t.min;case Sn.max:return t.max;case Sn.reset:return null;default:return e}}(t.state||o,Dn(Dn({},e),t));n&&n(r,e.event),a(r)}]},Pn=(0,p.Y)(),_n=i.forwardRef((function(e,t){var n,r,o,a,s=(0,ue.Y)(Pn,e),l=(0,v.useLocalization)(),d=i.useRef(null),p=i.useRef(null),f=(0,H.n)(p,s.dir);i.useImperativeHandle(d,(function(){return{element:p.current,props:s}})),i.useImperativeHandle(t,(function(){return d.current}));for(var h,g,y=i.useCallback((function(e,t){s.onChange&&d.current&&s.onChange.call(void 0,{value:e,target:d.current,syntheticEvent:t})}),[s.onChange]),b=i.useMemo((function(){return void 0!==s.min?s.min:jn.min}),[s.min]),k=i.useMemo((function(){return void 0!==s.max?s.max:jn.max}),[s.max]),w=i.useMemo((function(){return s.precision||jn.precision}),[s.precision]),C=i.useMemo((function(){return void 0!==s.step?s.step:jn.step}),[s.step]),x=i.useMemo((function(){return s.readonly||jn.readonly}),[s.readonly]),O=i.useMemo((function(){return s.disabled||jn.disabled}),[s.disabled]),S=i.useMemo((function(){return s.item||jn.item}),[s.item]),E=Rn(s.defaultValue||jn.defaultValue,{state:s.value,min:b,max:k,step:"half"===w?C/2:C},y),I=E[0],N=E[1],T=Rn(null,{state:s.value,min:b,max:k,step:"half"===w?C/2:C,precision:w}),M=T[0],D=T[1],R=i.useMemo((function(){return s.value||I}),[s.value,I]),P=i.useMemo((function(){return M}),[M]),_=i.useMemo((function(){return s.selection||jn.selection}),[s.selection]),A=i.useMemo((function(){return C/("half"===w?2:1)}),[C,w]),j=i.useCallback((function(e){if(e.target&&e.target.element&&!x&&!O){if("half"===w){var t=e.target.element.getBoundingClientRect(),n=Tn(f||"ltr",t,e.syntheticEvent.clientX)?En(e.target.value-C/2,A):e.target.value;N({type:Sn.select,payload:n,event:e.syntheticEvent})}else N({type:Sn.select,payload:e.target.value,event:e.syntheticEvent});if(s.onClick){var r={value:R,target:d.current,syntheticEvent:e.syntheticEvent};s.onClick.call(void 0,r)}}}),[s.onClick,N,R]),F=i.useCallback((function(e){if(!x&&!O){switch(e.keyCode){case m.R.right:e.preventDefault(),N({type:"rtl"===f?Sn.decrease:Sn.increase,event:e});break;case m.R.left:e.preventDefault(),N({type:"rtl"===f?Sn.increase:Sn.decrease,event:e});break;case m.R.home:e.preventDefault(),N({type:"rtl"===f?Sn.min:Sn.max,event:e});break;case m.R.end:e.preventDefault(),N({type:"rtl"===f?Sn.max:Sn.min,event:e});break;case m.R.esc:e.preventDefault(),N({type:Sn.deselect,event:e})}s.onKeyDown&&s.onKeyDown.call(void 0,{value:R,target:d.current,syntheticEvent:e})}}),[s.onKeyDown,N,R]),z=i.useCallback((function(e){if(s.onFocus){var t={target:d.current,syntheticEvent:e};s.onFocus.call(void 0,t)}}),[s.onFocus]),L=i.useCallback((function(e){if(s.onBlur){var t={target:d.current,syntheticEvent:e};s.onBlur.call(void 0,t)}}),[s.onBlur]),K=i.useCallback((function(e){if(e.target&&e.target.element)if("half"===w){var t=e.target.element.getBoundingClientRect(),n=Tn(f||"ltr",t,e.syntheticEvent.clientX)?e.target.value-C/2:e.target.value;D({type:Sn.select,payload:n,event:e.syntheticEvent})}else D({type:Sn.select,payload:e.target.value,event:e.syntheticEvent})}),[w,C,f]),W=i.useCallback((function(e){D({type:Sn.reset,event:e.syntheticEvent})}),[]),$=[],q=(h=En(k-b,A))-(g=C)*Math.floor(h/g),U=b;U<=k;U=En(U+C,A)){var G=En(U+q,A),Y="half"===w&&In(G,null!==P?P:null!==R?R:0,C),X=Nn(G,R,C,_),J=Nn(G,null!==P?P:R,C,_),Z=Nn(G,P,C,_);$.push(i.createElement(S,{key:G,value:G,dir:f,title:String(Y?En(G-C/2,A):G),icon:s.icon,half:Y,selected:X||J,hovered:Z,onClick:j,onMouseMove:K,onMouseLeave:W},Y&&i.createElement("span",{className:"k-rating-precision-complement",style:(n={width:"12px"},n["rtl"===f?"right":"left"]="50%",n)},i.createElement("span",{className:(0,c.A)("k-icon",(r={"k-i-star-outline":!s.icon},r["".concat(s.icon,"-outline")]=s.icon,r))})),Y&&i.createElement("span",{className:"k-rating-precision-part",style:{width:"12px"}},i.createElement("span",{className:(0,c.A)("k-icon",(o={"k-i-star":!s.icon},o["".concat(s.icon)]=s.icon,o))})),Y&&i.createElement("span",{style:{width:"24px",height:"24px",display:"block"}}),!Y&&i.createElement("span",{className:(0,c.A)("k-icon",(a={"k-i-star":!s.icon&&(Z||J&&!Z),"k-i-star-outline":!s.icon&&!Z},a["".concat(s.icon)]=s.icon&&(Z||J&&!Z),a["".concat(s.icon,"-outline")]=s.icon&&!Z,a))})))}return i.createElement("span",{id:s.id,style:s.style,ref:p,role:"slider",dir:f,tabIndex:(0,u.p)(s.tabIndex,s.disabled,void 0),className:(0,c.A)("k-rating k-widget",{"k-rtl":"rtl"===f,"k-state-readonly":x,"k-disabled":O},s.className),onKeyDown:F,onFocus:z,onBlur:L,"aria-valuemin":b,"aria-valuemax":k,"aria-valuenow":null!==R?R:void 0,"aria-disabled":O?"true":void 0,"aria-label":l.toLanguageString(B,V[B]),"aria-labelledby":s.ariaLabelledBy,"aria-describedby":s.ariaDescribedBy},i.createElement("input",{id:"rating",className:"k-hidden",readOnly:x,disabled:O}),i.createElement("span",{className:"k-rating-container"},$),s.label&&i.createElement("span",{className:"k-rating-label"},s.label))})),An={id:a.string,dir:a.oneOf(["ltr","rtl"]),selection:a.oneOf(["continues","single"]),precision:a.oneOf(["item","half"]),value:function(e,t,n){return e.value&&e.min&&e.max&&e.step&&!("half"===e.precision?Mn(e.min,e.max,e.step/2,e.value):Mn(e.min,e.max,e.step,e.value))&&"half"===e.precision?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n The value of the { value } property is not correct, please check your values.\n ")):null},defaultValue:a.number,min:a.number,max:a.number,step:function(e,t,n){return void 0!==e.step&&e.step<=0?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,'.\n The value of the { step } property is cannot be equal or less than "0", please check your values.\n ')):null},hovered:a.number,label:a.string,readonly:a.bool,disabled:a.bool,half:a.bool,icon:a.string,ariaDescribedBy:a.string},jn={dir:"ltr",min:1,max:5,step:1,item:xn,defaultValue:null,readonly:!1,disabled:!1,selection:"continues",precision:"item"};_n.displayName="KendoReactRating",_n.propTypes=An,_n.defaultProps=jn},6097:(e,t,n)=>{n.d(t,{_:()=>p});var r,o=n(3899),i=n(189),a=n(8047),s=n(499),l=n(2609),c=n(4006),u=n(8011),d=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focused:!1},n.handleFocus=function(e){n.setState({focused:!0})},n.handleBlur=function(e){n.setState({focused:!1})},(0,c.s)(u.k),n}return d(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.editorId,r=e.className,i=e.editorValue,c=e.editorPlaceholder,u=e.editorValid,d=e.editorDisabled,p=e.style,f=e.id,h=e.optional,m=(0,s.provideLocalizationService)(this),g=h?m.toLanguageString(l.y,l.s[l.y]):"",v=g&&o.createElement("span",{className:"k-label-optional"},g),y=(0,a.A)({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!c&&!i&&0!==i,"k-text-disabled":d,"k-rtl":"rtl"===this.props.dir},r),b=(0,a.A)({"k-label":!0,"k-text-error":!1===u,"k-text-disabled":d});return o.createElement("span",{id:this.props.id,className:y,onFocus:this.handleFocus,onBlur:this.handleBlur,style:p,dir:this.props.dir},this.props.children,t?n?o.createElement("label",{id:f,htmlFor:n,className:b},t,v):o.createElement("span",{id:f,className:b},t,v):null)},t.propTypes={label:i.string,editorId:i.string,editorValue:i.oneOfType([i.string,i.bool,i.number]),editorPlaceholder:i.string,editorValid:i.bool,editorDisabled:i.bool,id:i.string,style:i.object,className:i.string,optional:i.bool},t}(o.Component);(0,s.registerForLocalization)(p)},2609:(e,t,n)=>{var r;n.d(t,{y:()=>o,s:()=>i});var o="labels.optional",i=((r={})[o]="(Optional)",r)},8011:(e,t,n)=>{n.d(t,{k:()=>r});var r={name:"@progress/kendo-react-labels",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031375,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},3457:(e,t,n)=>{n.r(t),n.d(t,{AppBar:()=>Wt,AppBarSection:()=>qt,AppBarSpacer:()=>Ut,Avatar:()=>ht,BottomNavigation:()=>fn,BottomNavigationItem:()=>dn,Breadcrumb:()=>Pn,BreadcrumbDelimiter:()=>En,BreadcrumbLink:()=>Nn,BreadcrumbListItem:()=>On,BreadcrumbOrderedList:()=>Mn,Card:()=>it,CardActions:()=>ct,CardBody:()=>lt,CardFooter:()=>pt,CardHeader:()=>at,CardImage:()=>ut,CardSubtitle:()=>dt,CardTitle:()=>st,Drawer:()=>Ot,DrawerContent:()=>St,DrawerItem:()=>yt,DrawerNavigation:()=>Ct,ExpansionPanel:()=>Fn,ExpansionPanelContent:()=>Ln,GridLayout:()=>kn,GridLayoutItem:()=>xn,Menu:()=>Ge,MenuItem:()=>ue,MenuItemArrow:()=>Le,MenuItemLink:()=>_e,PanelBar:()=>Y,PanelBarItem:()=>R,PanelBarUtils:()=>H,Splitter:()=>rt,SplitterPane:()=>Xe,StackLayout:()=>vn,Step:()=>_t,Stepper:()=>Ht,TabStrip:()=>E,TabStripContent:()=>k,TabStripNavigation:()=>p,TabStripNavigationItem:()=>c,TabStripTab:()=>N,TileLayout:()=>an,downArrowClass:()=>je,flatChildren:()=>B,flatVisibleChildren:()=>V,flatVisibleItems:()=>L,getFirstId:()=>j,getInitialState:()=>F,isArrayEqual:()=>$,isPresent:()=>K,leftArrowClass:()=>ze,renderChildren:()=>A,rightArrowClass:()=>Fe});var r,o=n(3899),i=n(189),a=n(8047),s=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)},c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(){t.props.onSelect&&t.props.onSelect(t.props.index)},t}return s(t,e),t.prototype.render=function(){var e,t=this.props,n=t.id,r=t.active,i=t.disabled,s=t.title,c=void 0===s?"Untitled":s,u=t.first,d=t.last,p={id:n,"aria-selected":r,"aria-controls":n,"aria-disabled":i,"aria-hidden":i,role:"tab",onClick:i?void 0:this.onClick},f=(0,a.A)("k-item",((e={})["k-first"]=u,e["k-last"]=d,e["k-disabled"]=i,e["k-active"]=r,e));return o.createElement("li",l({},p,{className:f}),o.createElement("span",{className:"k-link"},c))},t.propTypes={active:i.bool,disabled:i.bool,index:i.number,onSelect:i.func,title:i.oneOfType([i.string,i.element]),first:i.bool,last:i.bool},t}(o.Component),u=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.selected,i=n.tabPosition,s=n.children,l=n.onSelect,u=n.onKeyDown,p=o.Children.count(s),f=o.Children.toArray(s);s&&(e=(t=p,Array.apply(null,Array(t))).map((function(e,t,n){var i={active:r===t,disabled:f[t].props.disabled,index:t,title:f[t].props.title,first:0===t,last:t===n.length-1,onSelect:l};return o.createElement(c,d({key:t},i))})));var h=(0,a.A)("k-tabstrip-items-wrapper",{"k-hstack":"top"===i||"bottom"===i,"k-vstack":"left"===i||"right"===i}),m=(0,a.A)("k-tabstrip-items","k-reset");return o.createElement("div",{className:h},o.createElement("ul",{className:m,role:"tablist",tabIndex:this.props.tabIndex,onKeyDown:u},e))},t.propTypes={children:i.oneOfType([i.element,i.arrayOf(i.element)]),onSelect:i.func,onKeyDown:i.func,selected:i.number,tabIndex:i.number},t}(o.Component),f=n(4343),h=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(){return m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},m.apply(this,arguments)},g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children"]);return o.createElement(f.f,m({},{transitionName:"fade"},n),t)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,component:i.string,id:i.string,style:i.any},t.defaultProps={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500},t}(o.Component),v=n(3198),y=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=function(){return b=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},b.apply(this,arguments)},k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.contentId=(0,v.M)(),t.childFactory=function(e){return o.cloneElement(e,b(b({},e.props),{in:e.props.children.props.id===String(t.contentId+t.props.selected)}))},t}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.selected,r=t&&"number"==typeof n&&o.Children.toArray(t)[n],i=(0,a.A)("k-content","k-active",r&&r.props.contentClassName);return o.createElement("div",{className:i,style:this.props.style},this.renderContent(t))},t.prototype.renderContent=function(e){var t=this;return this.props.keepTabsMounted?o.Children.map(this.props.children,(function(e,n){return t.renderChild(e,n)})):this.renderChild(o.Children.toArray(e)[this.props.selected],this.props.selected)},t.prototype.renderChild=function(e,t){var n=t===this.props.selected,r={role:"tabpanel","aria-expanded":!0,"aria-labelledby":t.toString(),style:{display:n?void 0:"none"}},i={position:"initial",display:n?void 0:"none"};return e.props.disabled?null:this.props.animation?o.createElement(g,{appear:!0,exit:this.props.keepTabsMounted,style:i,childFactory:this.props.keepTabsMounted?this.childFactory:void 0},o.createElement("div",b({},r,{id:String(this.contentId+t),key:t}),e.props.children)):o.createElement("div",b({},r,{key:t}),e.props.children)},t.propTypes={animation:i.bool,children:i.oneOfType([i.element,i.arrayOf(i.element)]),selected:i.number,style:i.object},t}(o.Component),w=n(3493),C=n(4006),x={name:"@progress/kendo-react-layout",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031776,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},O=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(){return S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},S.apply(this,arguments)},E=function(e){function t(t){var n,r=e.call(this,t)||this;return r._element=null,r.keyBinding=((n={})[w.R.left]=function(){return r.prevNavigatableTab()},n[w.R.right]=function(){return r.nextNavigatableTab()},n[w.R.down]=function(){return r.nextNavigatableTab()},n[w.R.up]=function(){return r.prevNavigatableTab()},n[w.R.home]=function(){return 0},n[w.R.end]=function(){return o.Children.count(r.props.children)-1},n),r.onSelect=function(e){r.props.selected!==e&&r.props.onSelect&&r.props.onSelect({selected:e})},r.onKeyDown=function(e){var t;switch(e.keyCode){case w.R.left:t=r.keyBinding[r.invertKeys(w.R.left,w.R.right)];break;case w.R.right:t=r.keyBinding[r.invertKeys(w.R.right,w.R.left)];break;case w.R.up:t=r.keyBinding[w.R.up];break;case w.R.down:t=r.keyBinding[w.R.down];break;case w.R.home:t=r.keyBinding[w.R.home];break;case w.R.end:t=r.keyBinding[w.R.end]}t&&(e.preventDefault(),r.onSelect(t()))},r.renderContent=function(e){var t=e.selected,n=e.children,r=e.tabContentStyle;return t<o.Children.count(n)&&t>-1?o.createElement(k,S({index:t},e,{style:r})):null},r.firstNavigatableTab=function(){var e=r.children(),t=o.Children.count(e);if(e)for(var n=0;n<t;n++)if(!e[n].props.disabled)return n},r.lastNavigatableTab=function(){var e=r.children(),t=o.Children.count(e);if(e)for(var n=t-1;n>0;n--)if(!e[n].props.disabled)return n},r.prevNavigatableTab=function(){var e=r.children(),t=r.props.selected,n=t?t-1:-1;if(n<0)return r.lastNavigatableTab();if(e)for(var o=n;o>-1;o--){if(!e[o].props.disabled)return o;if(0===o)return r.lastNavigatableTab()}},r.nextNavigatableTab=function(){var e=r.children(),t=r.props.selected,n=t?t+1:1,i=o.Children.count(e);if(n>=i)return r.firstNavigatableTab();if(e)for(var a=n;a<i;a++){if(!e[a].props.disabled)return a;if(a+1===i)return r.firstNavigatableTab()}},(0,C.s)(x),r}return O(t,e),t.prototype.render=function(){var e=this,t=S(S({},this.props),{children:this.children(),onKeyDown:this.onKeyDown,onSelect:this.onSelect}),n=t.tabPosition,r=t.tabIndex,i=void 0===r?0:r,s="bottom"===n,l=(0,a.A)("k-tabstrip","k-floatwrap",{"k-tabstrip-left":"left"===n,"k-tabstrip-right":"right"===n,"k-tabstrip-bottom":"bottom"===n,"k-tabstrip-top":"top"===n},this.props.className);return o.createElement("div",{id:this.props.id,ref:function(t){return e._element=t},dir:this.props.dir,className:l,style:this.props.style},!s&&o.createElement(p,S({},t,{tabIndex:i})),this.renderContent(t),s&&o.createElement(p,S({},t,{tabIndex:i})))},t.prototype.invertKeys=function(e,t){return this._element&&"rtl"===getComputedStyle(this._element).direction?t:e},t.prototype.children=function(){return o.Children.toArray(this.props.children).filter((function(e){return e}))},t.propTypes={animation:i.bool,children:i.node,onSelect:i.func,selected:i.number,style:i.object,tabContentStyle:i.object,tabPosition:i.string,tabIndex:i.number,className:i.string,dir:i.string},t.defaultProps={animation:!0,tabPosition:"top",keepTabsMounted:!1},t}(o.Component),I=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t.prototype.render=function(){return null},t.propTypes={disabled:i.bool,contentClassName:i.string,children:i.oneOfType([i.element,i.node]),title:i.oneOfType([i.string,i.element,i.node])},t}(o.Component),T=n(8686),M=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(){return D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},D.apply(this,arguments)},R=function(e){function t(t){var n=e.call(this,t)||this;return n.handleItemClick=function(){var e=n.props,t=e.onSelect,r=e.disabled,o=e.id;t&&!r&&t.call(void 0,{uniquePrivateKey:n.props.uniquePrivateKey,id:o,target:n})},n.childFactory=function(e){return n.props.keepItemsMounted?o.cloneElement(e,D(D({},e.props),{in:n.props.expanded})):e},n.state={show:t.expanded||!1},n}return M(t,e),t.prototype.render=function(){var e,t=this,n=this.props,r=n.id,i=n.children,s=n.title,l=n.uniquePrivateKey,c=n.disabled,u=n.selected,d=n.focused,p=n.expanded,f=n.className,h=n.level,m=n.headerClassName,g=n.animation,v=n.keepItemsMounted,y={role:"treeitem","aria-disabled":c,"aria-hidden":!c&&!p,"aria-selected":!c&&u,"aria-expanded":!c&&p&&!!i},b=(0,a.A)("k-item",{"k-panelbar-header":0===h,"k-panelbar-item":0!==h,"k-state-expanded":p&&!!i},"k-level-".concat(h),f),k=(0,a.A)("k-link",{"k-selected":!c&&u,"k-focus":!c&&d,"k-disabled":c},m),w=(0,a.A)("k-panelbar-toggle","k-icon",((e={})["k-i-arrow-chevron-up"]=p&&!!i,e["k-panelbar-collapse"]=p&&!!i,e["k-i-arrow-chevron-down"]=!p&&!!i,e["k-panelbar-expand"]=!p&&!!i,e)),C=function(e){var t=e.imageUrl,n=e.icon,r=e.iconClass;if(t)return o.createElement("img",{role:"presentation",className:"k-panelbar-item-icon k-image",src:t});if(n){var i=(0,a.A)("k-panelbar-item-icon","k-icon","k-i-"+n);return o.createElement("span",{role:"presentation",className:i})}return r?o.createElement("span",{role:"presentation",className:"k-panelbar-item-icon "+r}):null}(this.props),x=!c&&i?o.createElement("span",{className:w}):null,O=!c&&p||v?o.createElement("ul",{role:"group",className:"k-panelbar-group k-panel k-group",style:{display:v?this.state.show?"block":"none":"block"}},i):null,S=void 0!==g&&!g||c||!i?O:o.createElement(T.U,{transitionEnterDuration:200,transitionExitDuration:200,key:l+"_animation",style:{display:"block"},children:O,childFactory:v&&this.childFactory,unmountOnExit:!v,onBeforeEnter:function(){return v&&t.setState({show:!0})},onAfterExited:function(){return v&&t.setState({show:!1})}});return o.createElement("li",D({id:r,className:b},y),o.createElement("span",{className:k,onClick:this.handleItemClick},C,o.createElement("span",{className:"k-panelbar-item-text"},s),x),S)},t.propTypes={animation:i.bool,children:i.any,className:i.string,expanded:i.bool,disabled:i.bool,onSelect:i.func,selected:i.bool,level:i.number,title:i.oneOfType([i.string,i.element]),id:i.oneOfType([i.string,i.number]),focused:i.bool,keepItemsMounted:i.bool},t.defaultProps={title:"Untitled"},t}(o.PureComponent),P=function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},P.apply(this,arguments)},_=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},A=function(e){var t=e.animation,n=void 0===t||t,r=e.keepItemsMounted,i=void 0!==r&&r,a=e.state,s=e.expanded,l=e.handleSelect,c=e.children,u=e.parentExpanded,d=void 0===u||u,p=e.level,f=void 0===p?0:p,h=e.parentPrivateKey,m=void 0===h?[]:h;return o.Children.map(c,(function(e,t){if(e&&e.type===R){var r=void 0,c=z(e,m,t);if(e.props.children){var u={animation:n,keepItemsMounted:i,state:a,expanded:s,handleSelect:l,children:e.props.children,parentExpanded:(s||[]).indexOf(c)>-1,level:f+1,parentPrivateKey:_(_([],m,!0),[c],!1)};r=A(u)}return o.cloneElement(e,P(P({},e.props),{animation:void 0!==e.props.animation?e.props.animation:n,keepItemsMounted:i,id:e.props.id||"k-panelbar-item-default-".concat(c),uniquePrivateKey:c,parentUniquePrivateKey:m,parentExpanded:d,level:f,expanded:(s||[]).indexOf(c)>-1,focused:a.focused===c&&a.wrapperFocused,selected:a.selected===c,children:r,onSelect:l}))}return o.createElement("div",{className:"k-panelbar-content k-content"},e)}))},j=function(e){var t=o.Children.toArray(e.children)[0];return t?z(t,[],0):""},F=function(e,t,n,r,i){return void 0===n&&(n={expanded:e.expanded||[],selected:e.selected||"",focused:e.focused||"",wrapperFocused:!1}),void 0===r&&(r=!0),void 0===i&&(i=[]),o.Children.map(e.children,(function(e,o){if(e&&e.type===R){var a=z(e,i,o);!e.props.disabled&&r&&(e.props.selected&&(n.selected=a),e.props.focused&&(n.focused=a),e.props.expanded&&("multiple"===t?n.expanded.push(a):"single"===t&&(n.expanded=[a])),e.props.children&&(n=F(e.props,t,n,!!e.props.expanded,_(_([],i,!0),[a],!1))))}})),n},z=function(e,t,n){return e&&e.props&&e.props.id?e.props.id:t.length?t[t.length-1]+".".concat(n):".".concat(n)};function L(e,t){return void 0===t&&(t=[]),(e||[]).forEach((function(e){e.disabled||(t.push(e),e.expanded&&e.children&&L(e.children,t))})),t}function B(e,t){return void 0===t&&(t=[]),o.Children.forEach(e,(function(e){e&&e.props&&!e.props.disabled&&(t.push(e),e.props.children&&B(e.props.children,t))})),t}function V(e,t){return void 0===t&&(t=[]),o.Children.forEach(e,(function(e){e&&e.props&&!e.props.disabled&&(e.props.expanded||e.props.parentExpanded)&&(t.push(e),e.props.children&&V(e.props.children,t))})),t}var H,K=function(e){return null!=e};!function(e){e.mapItemsToComponents=function e(t){return t.map((function(t,n){var r;return t.content&&(r=t.content),t.children&&(r=e(t.children)),o.createElement(R,P({},t,{children:r,key:t.id||n}))}))}}(H||(H={}));var W,$=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))};!function(e){e[e.Toggle=0]="Toggle",e[e.Next=1]="Next",e[e.Previous=2]="Previous"}(W||(W={}));var q=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},U.apply(this,arguments)},G=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Y=function(e){function t(t){var n=e.call(this,t)||this;n._element=null,n.handleSelect=function(e){n.onSelect(e),n.onFocus(e)},n.onSelect=function(e){var t,r;switch(B(o.Children.toArray(n.children)).forEach((function(r){r.props.uniquePrivateKey===(e.uniquePrivateKey||n.state.focused)&&(t=r)})),n.expandMode){case"single":r=G(G([],t.props.parentUniquePrivateKey,!0),[t.props.uniquePrivateKey],!1),$(n.expandedItems,r)&&(r=t.props.parentUniquePrivateKey?G([],t.props.parentUniquePrivateKey,!0):[]);break;case"multiple":var i=(r=n.expandedItems.slice()).indexOf(t.props.uniquePrivateKey);-1===i?r.push(t.props.uniquePrivateKey):r.splice(i,1);break;default:r=n.expandedItems.slice()}n.setState({selected:t.props.uniquePrivateKey,expanded:r}),n.props.onSelect&&n.props.onSelect.call(void 0,{target:t,expandedItems:r})},n.onFocus=function(e,t){void 0===t&&(t=0);var r,i=V(o.Children.toArray(n.children));i.forEach((function(o,a){if(o.props.uniquePrivateKey===(e.uniquePrivateKey||n.state.focused)){var s=a+t<0?0:a+t>i.length?i.length-1:a+t;r=i[s]}})),r&&(n.activeDescendant=r.props.id,n.setState({focused:r.props.uniquePrivateKey}))},n.onNavigate=function(e,t){var r;switch(t){case W.Previous:r=-1,n.onFocus(e,r);break;case W.Next:r=1,n.onFocus(e,r);break;case W.Toggle:n.onSelect(e)}},n.handleWrapperFocus=function(){clearTimeout(n.nextTickId),n.state.wrapperFocused||n.setState({wrapperFocused:!0})},n.handleWrapperBlur=function(){n.nextTick((function(){n.setState({wrapperFocused:!1})}))},n.handleKeyDown=function(e){var t=n._element&&"rtl"===getComputedStyle(n._element).direction||!1;if(e.target===e.currentTarget){var r=void 0;switch(e.keyCode){case w.R.left:r=t?W.Next:W.Previous;break;case w.R.up:r=W.Previous;break;case w.R.right:r=t?W.Previous:W.Next;break;case w.R.down:r=W.Next;break;case w.R.space:case w.R.enter:r=W.Toggle;break;default:r=null}null!==r&&(e.preventDefault(),n.onNavigate(e,r))}},(0,C.s)(x);var r=F(t,n.expandMode);return r.focused||(r.focused=j(t)),n.state=r,n}return q(t,e),Object.defineProperty(t.prototype,"expandMode",{get:function(){return this.props.expandMode||"multiple"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedItem",{get:function(){var e=this.props.selected;return void 0===e?this.state.selected:e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expandedItems",{get:function(){return this.props.isControlled?this.props.expanded||[]:this.state.expanded},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){var e=U(U({},this.state),{selected:this.selectedItem}),t={animation:this.props.animation,keepItemsMounted:this.props.keepItemsMounted,state:e,expanded:this.expandedItems,handleSelect:this.handleSelect,children:this.props.children};return A(t)},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t={"aria-activedescendant":this.activeDescendant},n=(0,a.A)("k-panelbar",this.props.className);return o.createElement("ul",U({ref:function(t){e._element=t},dir:this.props.dir,role:"tree",tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,className:n,style:this.props.style},t),this.children)},t.prototype.nextTick=function(e){this.nextTickId=window.setTimeout((function(){return e()}))},t.propTypes={animation:i.bool,children:function(e,t){var n=e[t];if(n){if(Array.isArray(n))for(var r=0,o=n;r<o.length;r++){var i=o[r];if(!i.type||i.type!==R)return new Error("PanelBar children should be either PanelBarItem or Array of PanelBarItem.")}else if(n.type!==R)return new Error("PanelBar child should be either PanelBarItem or Array of PanelBarItem.");return null}},dir:i.string,selected:i.string,expanded:i.arrayOf(i.string),focused:i.string,expandMode:i.oneOf(["single","multiple"]),className:i.string,keepItemsMounted:i.bool,onSelect:i.func,style:i.object},t.defaultProps={expandMode:"multiple",animation:!0,keepItemsMounted:!1},t}(o.Component),X=n(5407),J="",Z="0",Q="_";function ee(e,t){if(ae(e))return t[Number(e)];var n=t[Number(te(e))];return n.items?ee(function(e){if(ie(e))return e;var t=e.indexOf(Q);return e.substring(t+1)}(e),n.items):void 0}function te(e){return ie(e)?e:e.split(Q)[0]}function ne(e){return re("0",e)}function re(e,t){return t?t+Q+e:e}function oe(e){var t=e.lastIndexOf(Q);return t<0?J:e.substring(0,t)}function ie(e){return e===J||e.indexOf(Q)<0}function ae(e){return e!==J&&e.indexOf(Q)<0}function se(e){var t=e.lastIndexOf(Q);return t<0?e:e.substring(t+1)}function le(e,t,n){return ae(t)?e?Number(t)<n-1?(Number(t)+1).toString():"0":Number(t)>0?(Number(t)-1).toString():(n-1).toString():t}var ce=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ce(t,e),t.prototype.render=function(){return null},t.propTypes={text:i.string,url:i.string,icon:i.string,disabled:i.bool,cssClass:i.string,cssStyle:i.object,render:i.any,linkRender:i.any,contentRender:i.any,data:i.any},t}(o.Component);function de(e,t){if(e&&e.length>0)return{items:me(e),inputItems:e};if(fe(t).length>0){var n=he(fe(t));return{items:me(n),inputItems:n}}return{items:[],inputItems:[]}}function pe(e,t){var n={},r=e||t.props,o=r.text,i=r.url,a=r.icon,s=r.disabled,l=r.cssClass,c=r.cssStyle,u=r.render,d=r.linkRender,p=r.contentRender,f=r.data;return void 0!==o&&(n.text=o),void 0!==i&&(n.url=i),void 0!==a&&(n.icon=a),void 0!==s&&(n.disabled=s),void 0!==l&&(n.cssClass=l),void 0!==c&&(n.cssStyle=c),void 0!==u&&(n.render=u),void 0!==d&&(n.linkRender=d),void 0!==p&&(n.contentRender=p),void 0!==f&&(n.data=f),n}function fe(e){return o.Children.toArray(e).filter((function(e){return e&&e.type===ue}))}function he(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],o=pe(void 0,r),i=he(fe(r.props.children));i.length>0&&(o.items=i),t.push(o)}return t}function me(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=pe(o);i.id=re(r.toString(),t),i.isLastFromSiblings=r===e.length-1,i.items=ge(o,i),n.push(i)}return n}function ge(e,t){return e.contentRender?[{contentParentItemId:t.id,id:re(Z,t.id),isLastFromSiblings:!0,contentRender:e.contentRender,items:[]}]:e.items?me(e.items,t.id):[]}var ve=/\S/;function ye(e,t,n,r,o,i){var a,s=h();switch(n){case w.R.left:return o?i?d():c():i?u():l();case w.R.right:return o?i?c():d():i?l():u();case w.R.up:return o?g():ae(t)?f():g();case w.R.down:return o?v():ae(t)?p():v();case w.R.enter:case w.R.space:return s.disabled?t:m()?ne(t):te(t);case w.R.home:return y()[0].id;case w.R.end:return(a=y())[a.length-1].id;case w.R.esc:return ae(t)?t:oe(t);default:return 1===r.length&&ve.test(r)?function(){var e=r.toLowerCase(),n=y(),o=Number(se(t)),i=n.slice(o+1).concat(n.slice(0,o+1)).find((function(t){return(t.text||"").toLowerCase().startsWith(e)}));return i?i.id:t}():t}function l(){return ae(t)?g():1===function(e){return e.split(Q).length-1}(t)?p(g(te(t))):oe(t)}function c(){return ae(t)?f():oe(t)}function u(){return ae(t)?v():p(m()?t:v(te(t)))}function d(){return p(ae(t)||m()?t:v(te(t)))}function p(e){return b(!0,e)}function f(e){return b(!1,e)}function h(n,r){return void 0===n&&(n=t),void 0===r&&(r=e),ee(n,r)}function m(e){return h(e).items.length>0}function g(e){return k(!1,e)}function v(e){return k(!0,e)}function y(){return ae(t)?e:h(oe(t),e).items}function b(e,n){void 0===n&&(n=t);var r=h(n);return m(n)&&!r.disabled?e?ne(n):function(e){var t=h(e).items;return t[t.length-1].id}(n):n}function k(n,r){if(void 0===r&&(r=t),ae(r))return le(n,r,e.length);var o=oe(r);return re(le(n,se(r),h(o).items.length),o)}}var be=n(9222),ke={vertical:"top",horizontal:"left"},we={vertical:"top",horizontal:"right"},Ce={vertical:"flip",horizontal:"fit"},xe={vertical:"fit",horizontal:"flip"},Oe={downward:{anchorAlign:{vertical:"bottom",horizontal:"right"},popupAlign:we,collision:Ce},leftward:{anchorAlign:{vertical:"top",horizontal:"left"},popupAlign:we,collision:xe}},Se={downward:{anchorAlign:{vertical:"bottom",horizontal:"left"},popupAlign:ke,collision:Ce},rightward:{anchorAlign:{vertical:"top",horizontal:"right"},popupAlign:ke,collision:xe}};function Ee(e,t,n){return ae(e)?t?n?"leftward":"rightward":"downward":n?"leftward":"rightward"}function Ie(e){return e?"rtl":"ltr"}function Ne(e,t){return"".concat(e,"_").concat(t)}var Te,Me,De,Re,Pe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pe(t,e),t.prototype.render=function(){return this.props.url?o.createElement("a",{className:this.getMenuItemClassName(),role:"presentation",href:this.props.url,tabIndex:-1},this.props.children):o.createElement("span",{id:this.props.id,className:(0,a.A)(this.getMenuItemClassName(),this.props.className),style:this.props.style,role:"presentation"},this.props.children)},t.prototype.getMenuItemClassName=function(){return(0,a.A)("k-link","k-menu-link",{"k-active":this.props.opened})},t.propTypes={opened:i.bool,url:i.string},t}(o.Component),Ae=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),je="k-i-arrow-60-down",Fe="k-i-arrow-60-right",ze="k-i-arrow-60-left",Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ae(t,e),t.prototype.render=function(){return o.createElement("span",{className:"k-menu-expand-arrow",role:"presentation"},o.createElement("span",{className:this.getArrowClassName()}))},t.prototype.getArrowClassName=function(){var e,t=Ee(this.props.itemId,!0===this.props.verticalMenu,"rtl"===this.props.dir);return(0,a.A)("k-icon",((e={})[je]="downward"===t,e[Fe]="rightward"===t,e[ze]="leftward"===t,e))},t.propTypes={itemId:i.string,dir:i.string,verticalMenu:i.bool},t}(o.Component),Be=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ve=function(e){function t(t){var n=e.call(this,t)||this;return n.isFirstRender=!0,n.onMouseOver=function(e){n.props.onMouseOver(n.props.item.id),e.stopPropagation()},n.onMouseLeave=function(e){n.props.onMouseLeave(n.props.item.id),e.stopPropagation()},n.state={opened:!1},n}return Be(t,e),t.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.props.item.id;e&&e===t&&this.itemElement.focus(),this.isFirstRender=!1},t.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId,n=this.props.item.id;t?e.focusedItemId===t||t!==n||this.itemElement.contains(document.activeElement)||this.itemElement.focus():document.activeElement===this.itemElement&&this.itemElement.blur()},t.prototype.render=function(){var e=this,t=this.props.item,n=t.id;return o.createElement(o.Fragment,null,o.createElement("li",{className:this.getMenuItemClassName(t),style:t.cssStyle,tabIndex:n===this.props.tabbableItemId?0:-1,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,onMouseDown:function(t){return e.props.onMouseDown(t)},onBlur:function(){return e.props.onBlur(n)},onFocus:function(){return e.props.onFocus(n)},onClick:function(t){return e.props.onClick(t,n)},role:"menuitem","aria-disabled":!!t.disabled||void 0,"aria-haspopup":t.items.length>0||void 0,"aria-expanded":t.items.length>0?this.Opened:void 0,"aria-label":t.text,"aria-owns":this.Opened?Ne(this.props.menuGuid,n):void 0,ref:function(t){return e.itemElement=t},key:"0"},this.contentRender?this.renderContent():this.renderMenuItemLink()),this.renderPopupIfOpened())},t.prototype.renderContent=function(){var e=this.props.item.contentParentItemId;return o.createElement("div",{className:"k-content",role:"presentation"},o.createElement(this.contentRender,{item:this.props.onOriginalItemNeeded(e),itemId:e}))},t.prototype.renderMenuItemLink=function(){var e=this.props.item;if(this.linkRender)return o.createElement(this.linkRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,opened:this.Opened,dir:Ie(this.props.isDirectionRightToLeft)});var t=this.itemRender?o.createElement(this.itemRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,key:"1"}):o.createElement("span",{className:"k-menu-link-text"},e.text);return o.createElement(_e,{url:e.url,opened:this.Opened},this.renderMenuIconIfApplicable(),t,this.renderArrowIfApplicable())},t.prototype.renderPopupIfOpened=function(){if(this.Opened){var e=this.props.item.id,t=function(e,t,n){var r=Ee(e,t,n);return n?"downward"===r?Oe.downward:Oe.leftward:"downward"===r?Se.downward:Se.rightward}(e,this.props.isMenuVertical,this.props.isDirectionRightToLeft),n=t.anchorAlign,r=t.popupAlign,i=t.collision;return o.createElement(be.G,{anchor:this.itemElement,show:!0,popupClass:this.getPopupClassName(),anchorAlign:n,popupAlign:r,collision:i,animate:!1,key:"1"},o.createElement(Ke,{parentItemId:e,items:this.props.item.items,menuGuid:this.props.menuGuid,focusedItemId:this.props.focusedItemId,lastItemIdToBeOpened:this.props.lastItemIdToBeOpened,tabbableItemId:this.props.tabbableItemId,itemRender:this.props.itemRender,linkRender:this.props.linkRender,isMenuVertical:this.props.isMenuVertical,isDirectionRightToLeft:this.props.isDirectionRightToLeft,className:"k-group k-menu-group k-reset",onMouseOver:this.props.onMouseOver,onMouseLeave:this.props.onMouseLeave,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:this.props.onClick,onOriginalItemNeeded:this.props.onOriginalItemNeeded}))}return null},t.prototype.renderMenuIconIfApplicable=function(){return this.props.item.icon?o.createElement("span",{className:"k-icon k-i-".concat(this.props.item.icon),role:"presentation",key:"0"}):null},t.prototype.renderArrowIfApplicable=function(){return this.props.item.items.length>0?o.createElement(Le,{itemId:this.props.item.id,verticalMenu:this.props.isMenuVertical,dir:Ie(this.props.isDirectionRightToLeft),key:"2"}):null},Object.defineProperty(t.prototype,"itemRender",{get:function(){return this.props.item.render||this.props.itemRender},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"linkRender",{get:function(){return this.props.item.linkRender||this.props.linkRender},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentRender",{get:function(){return this.props.item.contentParentItemId?this.props.item.contentRender:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Opened",{get:function(){var e,t,n=this.props;return n.item.items.length>0&&(e=n.item.id,0===(t=n.lastItemIdToBeOpened).indexOf(e)&&(t.length===e.length||t.charAt(e.length)===Q))&&!this.isFirstRender},enumerable:!1,configurable:!0}),t.prototype.getPopupClassName=function(){return(0,a.A)("k-menu-popup",{"k-rtl":this.props.isDirectionRightToLeft})},t.prototype.getMenuItemClassName=function(e){return(0,a.A)("k-item","k-menu-item",{"k-first":(t=e.id,se(t)===Z),"k-last":e.isLastFromSiblings,"k-disabled":e.disabled},e.cssClass);var t},t}(o.Component),He=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ke=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseOver=function(e){t.props.onMouseOver(t.props.parentItemId),e.stopPropagation()},t.onMouseLeave=function(e){t.props.onMouseLeave(t.props.parentItemId),e.stopPropagation()},t}return He(t,e),t.prototype.render=function(){var e=this.props.parentItemId;return o.createElement("ul",{className:this.props.className,role:void 0!==e?"menu":"menubar",id:void 0!==e?Ne(this.props.menuGuid,e):void 0,onMouseOver:void 0!==e?this.onMouseOver:void 0,onMouseLeave:void 0!==e?this.onMouseLeave:void 0,"aria-orientation":this.props["aria-orientation"]},this.renderChildItems())},t.prototype.renderChildItems=function(){var e=this;return this.props.items.length>0?this.props.items.map((function(t,n){return o.createElement(Ve,{item:t,isMenuVertical:e.props.isMenuVertical,isDirectionRightToLeft:e.props.isDirectionRightToLeft,focusedItemId:e.props.focusedItemId,lastItemIdToBeOpened:e.props.lastItemIdToBeOpened,tabbableItemId:e.props.tabbableItemId,itemRender:e.props.itemRender,linkRender:e.props.linkRender,menuGuid:e.props.menuGuid,onMouseOver:e.props.onMouseOver,onMouseLeave:e.props.onMouseLeave,onMouseDown:e.props.onMouseDown,onBlur:e.props.onBlur,onFocus:e.props.onFocus,onClick:e.props.onClick,onOriginalItemNeeded:e.props.onOriginalItemNeeded,key:n})})):null},t}(o.Component),We=function(){function e(){this.phase="Initialized"}return e.prototype.getIsDirectionRightToLeft=function(){return this.isDirectionRightToLeft},e.prototype.setIsDirectionRightToLeft=function(e){this.phase="NotInitialized"===this.phase?"Initialized":"NewValueReceived",this.previousIsDirectionRightToLeft=this.isDirectionRightToLeft,this.isDirectionRightToLeft=e},e.prototype.hasDirectionChanged=function(){return"NewValueReceived"===this.phase&&this.previousIsDirectionRightToLeft!==this.isDirectionRightToLeft},e}(),$e=function(){function e(e,t,n){this.openOnClick=e,this.resetMenu=t,this.openItem=n,this.mouseDown=!1,this.openOnClick=e,this.isMouseOverEnabled=!e}return Object.defineProperty(e.prototype,"OpenOnClick",{set:function(e){Boolean(e)!==Boolean(this.openOnClick)&&(this.mouseDown=!1,this.isMouseOverEnabled=!e),this.openOnClick=e},enumerable:!1,configurable:!0}),e.prototype.handleItemSelectedViaKeyboard=function(){this.openOnClick&&(this.isMouseOverEnabled=!1,this.resetMenu())},Object.defineProperty(e.prototype,"IsMouseOverEnabled",{get:function(){return this.isMouseOverEnabled},enumerable:!1,configurable:!0}),e.prototype.handleItemMouseDown=function(){this.mouseDown=!0},e.prototype.handleItemFocus=function(){this.openOnClick&&!this.mouseDown&&(this.isMouseOverEnabled=!0),this.mouseDown=!1},e.prototype.handleItemClick=function(e,t){this.openOnClick&&(this.isMouseOverEnabled?t&&(this.isMouseOverEnabled=!1,this.resetMenu()):(this.isMouseOverEnabled=!0,this.openItem(e)))},e}(),qe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ue={focusedItemId:J,hoveredItemId:J,tabbableItemId:Z},Ge=function(e){function t(t){var n=e.call(this,t)||this;return n.guid=(0,v.M)(),n.directionHolder=new We,n.inputItems=[],n.items=[],n.reset=function(){n.clearItemHoverAndLeaveRequestsIfApplicable(),n.setState(Ue)},n.onKeyDown=function(e){if(n.state.focusedItemId!==J){var t=ee(n.state.focusedItemId,n.items),r=ye(n.items,t.id,e.keyCode,e.key,n.props.vertical,n.directionHolder.getIsDirectionRightToLeft());t.id!==r&&(e.preventDefault(),n.setFocusedItemId(r)),e.keyCode!==w.R.enter&&e.keyCode!==w.R.space||t.disabled||(n.mouseOverHandler.handleItemSelectedViaKeyboard(),n.dispatchSelectEventIfWired(e,t.id),!e.isDefaultPrevented()&&0===t.items.length&&t.url&&window.location.assign(t.url))}},n.onItemMouseOver=function(e){n.mouseOverHandler.IsMouseOverEnabled&&(n.clearItemHoverAndLeaveRequestsIfApplicable(),n.itemHoverRequest=window.setTimeout((function(){n.setHoveredItemId(e),n.itemHoverRequest=null}),function(e){return void 0!==e.hoverOpenDelay?e.hoverOpenDelay:e.openOnClick?0:100}(n.props)))},n.onItemMouseLeave=function(e){n.mouseOverHandler.IsMouseOverEnabled&&n.isItemWithDefaultClose(e)&&(n.clearItemHoverAndLeaveRequestsIfApplicable(),n.itemLeaveRequest=window.setTimeout((function(){n.setHoveredItemId(J),n.itemLeaveRequest=null}),function(e){return void 0!==e.hoverCloseDelay?e.hoverCloseDelay:100}(n.props)))},n.onItemMouseDown=function(){n.mouseOverHandler.handleItemMouseDown()},n.onItemFocus=function(e){n.setFocusedItemId(e),n.mouseOverHandler.handleItemFocus()},n.onItemClick=function(e,t){var r=ee(t,n.items);r.disabled||(n.setFocusedItemId(t),n.mouseOverHandler.handleItemClick(t,n.isItemWithDefaultClose(t)),n.dispatchSelectEventIfWired(e,t),!e.isDefaultPrevented()&&r.url&&window.location.assign(r.url))},n.onItemBlur=function(e){n.isItemWithDefaultClose(e)&&n.setFocusedItemId(J)},n.getInputItem=function(e){return ee(e,n.inputItems)},(0,C.s)(x),n.mouseOverHandler=new $e(n.props.openOnClick,n.reset,n.onItemMouseOver),n.state=Object.assign({},Ue,{isFirstRender:!0}),n}return qe(t,e),t.prototype.render=function(){var e=this;this.prepareItems(),this.state.isFirstRender||this.directionHolder.setIsDirectionRightToLeft(this.checkIsDirectionRightToLeft());var t=this.state.hoveredItemId?this.state.hoveredItemId:this.state.focusedItemId?oe(this.state.focusedItemId):J;return o.createElement("div",{onKeyDown:this.onKeyDown,style:this.props.style,className:this.getMenuWrapperClassName(),ref:function(t){return e.menuWrapperEl=t}},o.createElement(Ke,{className:this.getMenuClassName(),"aria-orientation":this.props.vertical?"vertical":void 0,items:this.items,isMenuVertical:this.props.vertical,isDirectionRightToLeft:this.directionHolder.getIsDirectionRightToLeft(),focusedItemId:this.state.focusedItemId,lastItemIdToBeOpened:t,tabbableItemId:this.state.tabbableItemId,itemRender:this.props.itemRender,linkRender:this.props.linkRender,menuGuid:this.guid,onMouseLeave:this.onItemMouseLeave,onMouseOver:this.onItemMouseOver,onMouseDown:this.onItemMouseDown,onFocus:this.onItemFocus,onClick:this.onItemClick,onBlur:this.onItemBlur,onOriginalItemNeeded:this.getInputItem}))},t.prototype.componentDidMount=function(){this.setState({isFirstRender:!1})},t.prototype.componentDidUpdate=function(e){(Boolean(e.vertical)!==Boolean(this.props.vertical)||this.directionHolder.hasDirectionChanged())&&this.reset(),this.mouseOverHandler.OpenOnClick=this.props.openOnClick},t.prototype.componentWillUnmount=function(){this.clearItemHoverAndLeaveRequestsIfApplicable()},t.prototype.setFocusedItemId=function(e){this.setState((function(t){var n=e===J?t.tabbableItemId:te(e);return{hoveredItemId:e===J||ie(t.hoveredItemId)&&ie(e)?t.hoveredItemId:J,focusedItemId:e,tabbableItemId:n}}))},t.prototype.setHoveredItemId=function(e){this.setState((function(t){return ie(e)&&ie(t.focusedItemId)?{hoveredItemId:e,focusedItemId:t.focusedItemId,tabbableItemId:t.tabbableItemId}:{hoveredItemId:e,focusedItemId:J,tabbableItemId:Z}}))},t.prototype.getMenuWrapperClassName=function(){return(0,a.A)({"k-rtl":this.directionHolder.getIsDirectionRightToLeft()},this.props.className)},t.prototype.getMenuClassName=function(){return(0,a.A)("k-widget","k-reset","k-header","k-menu",{"k-menu-horizontal":!this.props.vertical},{"k-menu-vertical":this.props.vertical})},t.prototype.clearItemHoverAndLeaveRequestsIfApplicable=function(){this.itemHoverRequest&&(clearTimeout(this.itemHoverRequest),this.itemHoverRequest=null),this.itemLeaveRequest&&(clearTimeout(this.itemLeaveRequest),this.itemLeaveRequest=null)},t.prototype.isItemWithDefaultClose=function(e){return!this.props.customCloseItemIds||-1===this.props.customCloseItemIds.indexOf(e)},t.prototype.checkIsDirectionRightToLeft=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:this.menuWrapperEl&&"rtl"===getComputedStyle(this.menuWrapperEl).direction},t.prototype.prepareItems=function(){var e=de(this.props.items,this.props.children),t=e.items,n=e.inputItems;this.items=t,this.inputItems=n},t.prototype.dispatchSelectEventIfWired=function(e,t){(0,X.N)(this.props.onSelect,e,this,{item:this.getInputItem(t),itemId:t})},t.propTypes={vertical:i.bool,items:i.arrayOf(i.object),style:i.object,dir:i.string,hoverOpenDelay:i.number,hoverCloseDelay:i.number,openOnClick:i.bool,itemRender:i.any,linkRender:i.any,customCloseItemIds:i.arrayOf(i.string),onSelect:i.func},t.defaultProps={vertical:!1},t}(o.Component),Ye=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ye(t,e),t.prototype.render=function(){var e,t=this.props,n=t.id,r=t.size,i=t.collapsed,s=t.overlay,l=t.containsSplitter,c=t.collapsible,u=t.resizable,d=t.scrollable,p=t.keepMounted,f=r&&r.length>0,h={flexBasis:r},m=(0,a.A)("k-pane",((e={})["k-state-hidden"]=i,e.hidden=i,e["k-pane-flex"]=l,e["k-pane-static"]=!u&&!c||f,e["k-scrollable"]=d,e));return o.createElement("div",{id:n,style:h,className:m},!i||p?this.props.children:void 0,s?o.createElement("div",{className:"k-splitter-overlay k-overlay"}):void 0)},t}(o.Component),Je=n(1779),Ze=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qe=function(e){function t(t){var n=e.call(this,t)||this;return n.draggable=null,n.onDrag=function(e,t,r){var o=e.event,i=n.props,a=i.onDrag,s=i.index,l=n.draggable&&n.draggable.element;!r&&o&&o.originalEvent.preventDefault(),l&&!n.isStatic&&n.isDraggable&&a(o,l,s,t,r)},n.onFocus=function(){n.setState({focused:!0})},n.onBlur=function(){n.setState({focused:!1})},n.onToggle=function(e){var t=n.props,r=t.onToggle,o=t.index,i=t.prev,a=t.next;(i.collapsible||a.collapsible)&&r(i.collapsible?o:o+1,e)},n.onPrevToggle=function(e){var t=n.props,r=t.onToggle,o=t.index;t.prev.collapsible&&r(o,e)},n.onNextToggle=function(e){var t=n.props,r=t.onToggle,o=t.index;t.next.collapsible&&r(o+1,e)},n.onKeyDown=function(e){var t=e&&e.keyCode,r=n.isHorizontal,o=n.props.index,i=n.draggable&&n.draggable.element,a=function(t,r,o){e.preventDefault(),n.props.onKeyboardResize(t,r,o,e)};i&&(t===w.R.enter?(e.preventDefault(),n.onToggle(e)):n.isDraggable&&(r&&t===w.R.left?a(i,o,-10):r&&t===w.R.right?a(i,o,10):r||t!==w.R.up?r||t!==w.R.down||a(i,o,10):a(i,o,-10)))},n.previousArrowClass=function(e){var t,r=n.props.prev,o=r.collapsible,i=r.collapsed;return(0,a.A)("k-icon",((t={})["k-hidden"]=!o,t["k-collapse-prev"]=o,t["k-i-arrow-60-left"]=o&&e&&!i,t["k-i-arrow-60-right"]=o&&e&&i,t["k-i-arrow-60-up"]=o&&!e&&!i,t["k-i-arrow-60-down"]=o&&!e&&i,t))},n.nextArrowClass=function(e){var t,r=n.props.next,o=r.collapsible,i=r.collapsed;return(0,a.A)("k-icon",((t={})["k-hidden"]=!o,t["k-collapse-next"]=o,t["k-i-arrow-60-right"]=o&&e&&!i,t["k-i-arrow-60-left"]=o&&e&&i,t["k-i-arrow-60-down"]=o&&!e&&!i,t["k-i-arrow-60-up"]=o&&!e&&i,t))},n.state={focused:!1},n}return Ze(t,e),Object.defineProperty(t.prototype,"isStatic",{get:function(){var e=this.props,t=e.prev,n=e.next,r=t.resizable&&n.resizable,o=t.collapsible||n.collapsible;return!r&&!o},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDraggable",{get:function(){var e=this.props,t=e.prev,n=e.next,r=t.resizable&&n.resizable,o=t.collapsed||n.collapsed;return!!r&&!o},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isHorizontal",{get:function(){return"horizontal"===this.props.orientation},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e,t=this,n=this.isDraggable,r=this.isStatic,i=this.isHorizontal,s=(0,a.A)("k-splitbar",((e={})["k-focus"]=this.state.focused,e["k-splitbar-horizontal"]=i,e["k-splitbar-vertical"]=!i,e["k-splitbar-draggable-horizontal"]=i&&n,e["k-splitbar-draggable-vertical"]=!i&&n,e["k-splitbar-static-horizontal"]=i&&r,e["k-splitbar-static-vertical"]=!i&&r,e)),l=this.previousArrowClass(i),c=this.nextArrowClass(i);return o.createElement(Je._,{onPress:function(e){return t.onDrag(e,!0,!1)},onDrag:function(e){return t.onDrag(e,!1,!1)},onRelease:function(e){return t.onDrag(e,!1,!0)},ref:function(e){t.draggable=e}},o.createElement("div",{tabIndex:r?-1:0,role:"separator",className:s,style:{touchAction:"none"},onFocus:this.onFocus,onBlur:this.onBlur,onDoubleClick:this.onToggle,onKeyDown:this.onKeyDown},o.createElement("div",{className:l,onClick:this.onPrevToggle}),o.createElement("div",{className:"k-resize-handle"}),o.createElement("div",{className:c,onClick:this.onNextToggle})))},t}(o.Component),et=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tt=function(){return tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tt.apply(this,arguments)},nt={collapsible:!1,collapsed:!1,resizable:!0,scrollable:!0},rt=function(e){function t(t){var n=e.call(this,t)||this;return n._container=null,n.validatePanes=function(e){if(!e.filter((function(e){return void 0===e.size})).length)throw new Error("The Splitter should have at least one pane without a set size.")},n.mapPaneOptions=function(e,t){for(var r=n.orientation,i=n.state,a=i.dragIndex,s=i.isDragging,l=[],c=0;c<t.length;c++){var u=!1,d=t[c];o.isValidElement(d)&&(u="Splitter"===d.type.displayName);var p=!1;s&&void 0!==a&&(p=a===c||a+1===c),l.push(tt(tt(tt({},nt),{orientation:r,containsSplitter:u,overlay:p}),(e||[])[c]))}return l},n.mapSplitterPanes=function(e,t){return e.map((function(r,i){var a,s=2*i,l=s+1;if(i+1<e.length){var c=e[i+1];a=o.createElement(Qe,{key:l,index:i,orientation:r.orientation,prev:r,next:c,onDrag:n.onBarDragResize,onToggle:n.onBarToggle,onKeyboardResize:n.onBarKeyboardResize})}return[o.createElement(Xe,tt({key:s},r),t[i]),a]}))},n.onBarToggle=function(e,t){var r=n.panesOptions(n.panesContent).map((function(t,r){var o=n.getPaneProps(t);return r===e?tt(tt({},o),{collapsed:!t.collapsed}):tt({},o)}));n.props.onChange&&n.props.onChange({newState:r,isLast:!0,nativeEvent:t})},n.onBarDragResize=function(e,t,r,o,i){var a=(new Date).getTime(),s=e.pageX,l=e.pageY,c=n.surroudingPanes(t),u=c.prevElement,d=c.nextElement;if(u&&d)if(o)n.setState({isDragging:!0,dragIndex:r,startTime:a,originalX:s,originalY:l,originalPrevSize:n.elementSize(u),originalNextSize:n.elementSize(d)});else{var p,f=n.state,h=f.originalPrevSize,m=f.originalNextSize,g=f.startTime,v=f.originalX,y=f.originalY;!o&&a-g<150||(p="vertical"===n.orientation?l-y:n.isRtl?v-s:s-v,n.resize(r,r+1,h,m,p,i,e)),i&&n.resetDragState()}},n.onBarKeyboardResize=function(e,t,r,o){var i=n.surroudingPanes(e),a=i.prevElement,s=i.nextElement,l=n.elementSize(a),c=n.elementSize(s);n.resize(t,t+1,l,c,r,!0,o)},n.containerSize=function(){return n._container?n.elementSize(n._container,!0):0},n.panesOptions=function(e){return n.mapPaneOptions(n.panes,e)},n.elementSize=function(e,t){var r=t?"client":"offset";return"vertical"===n.orientation?e["".concat(r,"Height")]:e["".concat(r,"Width")]},n.clamp=function(e,t,n){return Math.min(t,Math.max(e,n))},n.fixedSize=function(e){return e&&e.length>0},(0,C.s)(x),n.state={isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0,panes:t.defaultPanes||[]},n}return et(t,e),Object.defineProperty(t.prototype,"isControlledState",{get:function(){return void 0!==this.props.panes},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panes",{get:function(){return void 0!==this.panesDuringOnChange?this.panesDuringOnChange:this.isControlledState?this.props.panes:this.state.panes},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this.props.orientation||"horizontal"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRtl",{get:function(){return this._container&&"rtl"===getComputedStyle(this._container).direction||!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panesContent",{get:function(){return o.Children.toArray(this.props.children).filter((function(e){return e}))},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t=this.panesContent,n=this.panesOptions(t),r=(0,a.A)("k-widget","k-splitter","k-splitter-flex","k-splitter-".concat(this.orientation),this.props.className);return this.validatePanes(n),o.createElement("div",{style:this.props.style,ref:function(t){return e._container=t},className:r},this.mapSplitterPanes(n,t))},t.prototype.surroudingPanes=function(e){return{prevElement:e.previousElementSibling,nextElement:e.nextElementSibling}},t.prototype.isPercent=function(e){return/%$/.test(e)},t.prototype.toPixels=function(e,t){var n=parseInt(e,10);return this.isPercent(e)&&(n=t*n/100),n},t.prototype.resetDragState=function(){this.setState({isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0})},t.prototype.resize=function(e,t,n,r,o,i,a){var s,l,c=this,u=this.panesOptions(this.panesContent),d=u[e],p=u[t],f=n+r,h=this.containerSize(),m=function(e){return c.toPixels(e,h)},g={index:e,initialSize:n,min:m(d.min)||f-m(p.max)||0,max:m(d.max)||f-m(p.min)||f},v={index:t,initialSize:r,min:m(p.min)||f-m(d.max)||0,max:m(p.max)||f-m(d.min)||f},y=function(e,t){var n=u[e.index],r=c.clamp(e.min,e.max,e.initialSize+t);return c.isPercent(n.size||"")?100*r/h+"%":r+"px"};this.fixedSize(d.size)&&this.fixedSize(p.size)?(s=y(g,o),l=y(v,-o)):p.collapsible||this.fixedSize(p.size)?l=y(v,-o):s=y(g,o);var b=u.map((function(n,r){var o=c.getPaneProps(n);return r===e?tt(tt({},o),{size:s}):r===t?tt(tt({},o),{size:l}):tt({},o)}));this.panesDuringOnChange=b,this.isControlledState||this.setState({panes:b}),this.props.onChange&&this.props.onChange({newState:b,isLast:i,nativeEvent:a}),this.panesDuringOnChange=void 0},t.prototype.getPaneProps=function(e){return e.orientation,e.overlay,e.containsSplitter,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["orientation","overlay","containsSplitter"])},t.displayName="Splitter",t}(o.Component);!function(e){e.TEXT="text",e.IMAGE="image",e.ICON="icon"}(Te||(Te={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(Me||(Me={})),function(e){e.DEFAULT="default",e.primary="primary",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error"}(De||(De={})),function(e){e.START="start",e.CENTER="center",e.END="end",e.STRETCHED="stretched"}(Re||(Re={}));var ot=function(){return ot=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ot.apply(this,arguments)},it=o.forwardRef((function(e,t){var n;(0,C.s)(x);var r=e.children,i=e.dir,s=e.style,l=e.className,c=e.type,u=e.orientation,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children","dir","style","className","type","orientation"]),p=o.useRef(null),f=o.useRef(null);return o.useImperativeHandle(p,(function(){return{element:f.current,props:e}})),o.useImperativeHandle(t,(function(){return p.current})),o.createElement("div",ot({dir:i,style:s,ref:f,className:(0,a.A)("k-card",l,(n={},n["k-card-".concat(c)]=c!==De.DEFAULT,n),u!==Me.HORIZONTAL?"k-card-vertical":"k-card-horizontal")},d),r)}));it.displayName="KendoReactCard",it.propTypes={children:i.node,className:i.string,dir:i.string,orientation:i.oneOf(["horizontal","vertical"]),style:i.object,type:i.oneOf(["default","primary","info","success","warning","error"])},it.defaultProps={type:De.DEFAULT,orientation:Me.VERTICAL};var at=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-header",e.className)},e.children)};at.propTypes={className:i.string};var st=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-title",e.className)},e.children)};st.propTypes={className:i.string};var lt=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-body",e.className)},e.children)};lt.propTypes={className:i.string};var ct=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-actions",e.className,"k-card-actions-".concat(e.layout),e.orientation!==Me.VERTICAL?"k-card-actions-horizontal":"k-card-actions-vertical")},e.children)};ct.propTypes={layout:i.oneOf(["stretched","start","center","end"]),orientation:i.oneOf(["horizontal","vertical"])},ct.defaultProps={layout:Re.START,orientation:Me.HORIZONTAL};var ut=function(e){return o.createElement("img",{style:e.style,className:(0,a.A)("k-card-image",e.className),src:e.src})};ut.propTypes={className:i.string,src:i.string},ut.defaultProps={src:""};var dt=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-subtitle",e.className)},e.children)};dt.propTypes={className:i.string};var pt=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-footer",e.className)},e.children)};pt.propTypes={className:i.string};var ft=n(2697),ht=function(e){var t;return(0,C.s)(x),o.createElement("div",{style:e.style,className:(0,a.A)("k-avatar",(t={},t["k-avatar-bordered"]=e.border,t["k-rounded-".concat(ft.G.roundedMap[e.rounded]||e.rounded)]=e.rounded,t["k-avatar-".concat(ft.G.sizeMap[e.size]||e.size)]=e.size,t["k-avatar-".concat(e.fillMode)]=e.fillMode,t["k-avatar-".concat(e.fillMode,"-").concat(e.themeColor)]=Boolean(e.fillMode&&e.themeColor),t),e.className)},o.createElement("span",{className:"k-avatar-".concat(e.type)},e.children))};ht.propTypes={className:i.string,type:i.oneOf(["text","image","icon"]),size:i.oneOf([null,"small","medium","large"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"solid","outline"]),themeColor:i.oneOf([null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"])},ht.defaultProps={type:Te.TEXT,size:"medium",rounded:"full",fillMode:"solid",themeColor:"primary"};var mt=o.createContext({animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50}),gt=n(4703),vt=function(){return vt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},vt.apply(this,arguments)},yt=o.forwardRef((function(e,t){var n=e.className,r=e.style,i=e.text,s=e.icon,l=e.separator,c=e.disabled,u=e.selected,d=e.onSelect,p=e.index,f=e.tabIndex,h=e.children,m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["className","style","text","icon","separator","disabled","selected","onSelect","index","tabIndex","children"]),g=o.useContext(mt),v=g.expanded,y=g.mini,b=g.item,k=o.useRef(null),w=o.useCallback((function(){k.current&&k.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:k.current,focus:w,props:e}}));var C=(0,a.A)("k-drawer-item",{"k-selected":u,"k-disabled":c},n),x=o.useCallback((function(t){if(d&&!c){var n={element:k.current,focus:w,props:e};d(n,p,t)}}),[d,p,c]),O=o.createElement(o.Fragment,null,s&&o.createElement("span",{className:"k-icon "+s}),!v&&y?null:o.createElement("span",{className:"k-item-text"},i));return l?o.createElement("li",{className:"k-drawer-item k-drawer-separator",role:"presentation"}):o.createElement("li",vt({ref:k,className:C,style:r,role:"option","aria-selected":u,"aria-disabled":c,onClick:x,tabIndex:(0,gt.p)(f,c)},m),b?h:O)}));yt.propTypes={className:i.string,style:i.object,text:i.string,icon:i.string,separator:i.bool,selected:i.bool,disabled:i.bool,targetItem:i.any},yt.displayName="KendoDrawerItem";var bt=function(){return bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bt.apply(this,arguments)},kt={type:"slide",duration:200},wt={type:"slide",duration:0},Ct=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useContext(mt),l=s.animation,c=s.expanded,u=s.mode,d=s.position,p=s.onOverlayClick,f=s.mini,h=s.dir,m=s.width,g=s.miniWidth,v=s.items,y=s.item,b=s.onSelect,k=o.useRef(null),w=o.useCallback((function(){k.current&&k.current.focus()}),[]),C="boolean"!=typeof l?l:!1===l?wt:kt,x=m||240,O=g||50;o.useImperativeHandle(t,(function(){return{element:k.current,focus:w}}));var S=o.useMemo((function(){return"k-widget k-drawer "+(0,a.A)({"k-drawer-start":"start"===d,"k-drawer-end":"end"===d},r)}),[d]),E={opacity:1,flexBasis:x,WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},I={opacity:1,transform:"translateX(0px)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},N={opacity:f?1:0,flexBasis:f?O:0,WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},T={opacity:0,transform:"translateX(-100%)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},M={opacity:0,transform:"translateX(100%)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},D={transform:"translateX(0%)",WebkitTransitionDuration:(C&&C.duration)+"ms",transitionDuration:(C&&C.duration)+"ms"},R=c?"push"===u?E:I:"push"===u?N:"ltr"===h&&"start"===d||"rtl"===h&&"end"===d?f?D:T:f?D:M,P=v&&o.createElement("ul",{className:"k-drawer-items",role:"listbox","aria-label":"drawer-list","aria-expanded":c},v.map((function(e,t){var n=bt(bt({index:t},e),{onSelect:b}),r=y||yt;return o.createElement(r,bt({key:t},n))}))),_=o.createElement("div",{style:C?bt(bt({},R),i):i,className:S,ref:k},o.createElement("div",{className:"k-drawer-wrapper",style:!c&&f&&"overlay"===u?{width:O}:{width:x}},P||n));return"overlay"===u?o.createElement(o.Fragment,null,c&&o.createElement("div",{className:"k-overlay",onClick:p}),_):_}));Ct.propTypes={children:i.any,className:i.string,style:i.object,item:i.any,tabIndex:i.number},Ct.displayName="KendoDrawerNavigation";var xt=n(8199),Ot=o.forwardRef((function(e,t){(0,C.s)(x);var n=e.expanded,r=e.mode,i=e.position,s=e.className,l=e.children,c=e.style,u=e.animation,d=e.mini,p=e.width,f=e.miniWidth,h=e.items,m=e.item,g=e.tabIndex,v=e.onOverlayClick,y=e.onSelect,b=o.useRef(null),k=o.useCallback((function(){b.current&&b.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:b.current,focus:k}}));var w=o.useCallback((function(e,t,n){if(h&&y){var r={itemTarget:e,itemIndex:t,syntheticEvent:n,nativeEvent:n&&n.nativeEvent,target:void 0};y.call(void 0,r)}}),[h,y]),O=(0,xt.n)(b,e.dir),S=(0,a.A)({"k-drawer-container":!0,"k-drawer-expanded":n,"k-drawer-overlay":"overlay"===r,"k-drawer-push":"push"===r,"k-drawer-mini":d},s);return o.createElement(mt.Provider,{value:{animation:u,expanded:n,mode:r,position:i,mini:d,dir:O,items:h,item:m,width:p,miniWidth:f,onOverlayClick:v,onSelect:w}},o.createElement("div",{className:S,ref:b,dir:O,style:c,tabIndex:g},h&&o.createElement(Ct,null),l))}));Ot.propTypes={animation:i.any,expanded:i.bool,children:i.any,className:i.string,dir:i.string,mode:i.string,position:i.string,mini:i.bool,style:i.object,tabIndex:i.number,width:i.number,miniWidth:i.number,selected:i.number,onSelect:i.func,onOverlayClick:i.func},Ot.defaultProps={animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50},Ot.displayName="KendoDrawer";var St=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null);o.useImperativeHandle(t,(function(){return{element:s.current}}));var l=(0,a.A)({"k-drawer-content":!0},r);return o.createElement("div",{className:l,style:i,ref:s},n)}));St.propTypes={children:i.any,className:i.string,style:i.object},St.displayName="KendoDrawerContent";var Et,It=o.createContext({linear:!1,mode:"steps",value:0}),Nt=n(9124),Tt=n(1573),Mt=n(499),Dt="stepper.optionalText",Rt=((Et={})[Dt]="(Optional)",Et),Pt=function(){return Pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Pt.apply(this,arguments)},_t=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.current,s=e.disabled,l=e.focused,c=e.icon,u=e.index,d=e.isValid,p=e.label,f=e.optional,h=e.style,m=e.tabIndex,g=e.text,v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children","className","current","disabled","focused","icon","index","isValid","label","optional","style","tabIndex","text"]),y=o.useContext(It),b=y.animationDuration,k=y.isVertical,w=y.item,C=y.linear,x=y.mode,O=y.numOfSteps,S=y.value,E=y.successIcon,I=y.errorIcon,N=y.onChange,T=y.onFocus,M=o.useRef(null),D=o.useCallback((function(){M.current&&(0,Nt.n)(M.current)}),[]),R=o.useCallback((function(){return{element:M.current,focus:D}}),[D]);o.useImperativeHandle(t,R);var P,_=!C||u===S-1||u===S||u===S+1,A="labels"===x||Boolean(c)&&Boolean(p),j=(0,Mt.useLocalization)(),F=(P=Dt,j.toLanguageString(P,Rt[P])),z="number"==typeof b?b:!1!==b?400:0,L=o.useCallback((function(e){N&&!s&&(0,X.N)(N,e,R(),{value:u})}),[N,S,s]),B=o.useCallback((function(e){T&&!s&&(0,X.N)(T,e,R(),void 0)}),[T,s]),V=o.useMemo((function(){return(0,a.A)("k-step",{"k-step-first":0===u,"k-step-last":O&&u===O-1,"k-step-done":u<S,"k-step-current":i,"k-step-optional":f,"k-step-disabled":s,"k-step-focus":l,"k-step-error":void 0!==d&&!d,"k-step-success":d},r)}),[u,O,S,i,f,s,l,d,r]),H=o.useMemo((function(){return Pt({maxWidth:k?void 0:"calc(100% / ".concat(O,")"),maxHeight:k?"calc(100% / ".concat(O,")"):void 0,pointerEvents:_?void 0:"none"},h)}),[k,O,h,_]),K=d?E?"".concat(E):"k-icon k-i-check":I?"".concat(I):"k-icon k-i-warning",W=o.createElement("span",{className:"k-step-indicator-icon "+K,"aria-hidden":"true"}),$=o.createElement(o.Fragment,null,"labels"!==x?o.createElement("span",{className:"k-step-indicator","aria-hidden":!0,style:{transitionDuration:z+"ms"}},c?A||void 0===d?o.createElement("span",{className:"k-step-indicator-icon k-icon ".concat(c)}):W:void 0!==d?W:o.createElement("span",{className:"k-step-indicator-text"},g||u+1)):null),q=o.createElement("span",{className:"k-step-label"},p&&o.createElement("span",{className:"k-step-text"},p),A&&void 0!==d&&W,f&&o.createElement("span",{className:"k-step-label-optional"},F)),U=o.createElement(o.Fragment,null,$,q);return o.createElement("li",Pt({ref:M,className:V,style:H},v),o.createElement("a",{className:"k-step-link",title:p||void 0,onClick:L,onFocus:B,tabIndex:m||(l?0:-1),"aria-current":i?"step":void 0,"aria-disabled":s||!_||void 0,"aria-invalid":void 0!==d&&!d||void 0},w?n:U))}));_t.propTypes={children:i.any,className:i.string,current:i.bool,disabled:i.bool,icon:i.string,index:i.number,isValid:i.bool,label:i.string,optional:i.bool,style:i.object,tabIndex:i.number,text:i.string},_t.defaultProps={tabIndex:0},_t.displayName="KendoStep";var At=function(e,t,n){var r=Math.abs((t-e)/100);return Math.abs((n-e)/r)},jt=function(e,t,n,r){var o=Math.max(n,.01),i=100/o*100;e.current&&t.current&&(e.current.style.width=r?"100%":"".concat(o,"%"),t.current.style.width=r?"100%":"".concat(i,"%"),e.current.style.height=r?"".concat(o,"%"):"100%",t.current.style.height=r?"".concat(i,"%"):"100%")},Ft={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031747,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},zt=function(){return zt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zt.apply(this,arguments)},Lt=o.forwardRef((function(e,t){(0,C.s)(Ft);var n=e.animation,r=e.disabled,i=e.reverse,s=void 0===i?Bt.reverse:i,l=e.orientation,c=e.labelVisible,u=e.labelPlacement,d=e.max,p=void 0===d?Bt.max:d,f=e.min,h=void 0===f?Bt.min:f,m=e.tabIndex,g=e.className,v=e.style,y=e.emptyStyle,b=e.emptyClassName,k=e.progressStyle,w=e.progressClassName,x=o.useRef(null),O=o.useRef(null),S=o.useRef(null),E=o.useCallback((function(){x.current&&x.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:x.current,progressStatusElement:O.current,progressStatusWrapElement:S.current,focus:E}}));var I,N,T,M,D,R=e.value||Bt.value,P=function(e){var t=o.useRef();return o.useEffect((function(){t.current=e})),t.current}(R),_=null===e.value,A=(0,Tt.V)(x,e.dir),j="vertical"===l,F=function(e){var t=e.toString().split(".");return 1===t.length?"".concat(t[0]):"".concat(t[0],".").concat(t[1].substr(0,3))}(R),z={value:R},L=c?e.label?o.createElement("span",{className:"k-progress-status"},o.createElement(e.label,zt({},z))):o.createElement("span",{className:"k-progress-status"},F):void 0,B={className:(0,a.A)("k-widget k-progressbar",{"k-progressbar-horizontal":!j,"k-progressbar-vertical":j,"k-progressbar-reverse":s,"k-progressbar-indeterminate":_,"k-disabled":r},g),ref:x,dir:A,tabIndex:(0,gt.p)(m,r),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":h,"aria-valuemax":p,"aria-valuenow":_?void 0:R,"aria-disabled":r,style:v},V=(0,a.A)("k-progress-status-wrap",{"k-progress-start":"start"===u,"k-progress-center":"center"===u,"k-progress-end":"end"===u||void 0===u}),H="boolean"!=typeof n&&void 0!==n?n.duration:n?400:0,K=o.useCallback((function(){var e=At(h,p,P);jt(O,S,e,j)}),[j,p,h,P]),W=o.useCallback((function(e){var t=At(h,p,P+(R-P)*e);jt(O,S,t,j)}),[h,p,P,R,j]),$=o.useCallback((function(){var e=At(h,p,R);jt(O,S,e,j)}),[j,p,h,R]);return I={duration:H,onStart:K,onUpdate:W,onEnd:$},N=[R,H],T=o.useRef(0),M=o.useRef(!1),D=o.useRef(),o.useEffect((function(){return function(e){var t,n=e.duration,r=T.current&&1-T.current;e.onStart&&e.onStart();var o=function(i){t||(t=i);var a=(i-t+1)/n+r;a<=1?(e.onUpdate&&e.onUpdate(a),D.current=window.requestAnimationFrame(o),T.current=a):(e.onEnd&&e.onEnd(1),T.current=0)};D.current=window.requestAnimationFrame(o)}(I),function(){D.current&&window.cancelAnimationFrame(D.current)}}),N),o.useEffect((function(){M.current=!0}),[]),o.createElement("div",zt({},B),o.createElement("span",{className:V+(b?" "+b:""),style:y},L),o.createElement("div",{className:"k-selected",style:k,ref:O},o.createElement("span",{className:V+(w?" "+w:""),ref:S},L)))}));Lt.propTypes={animation:i.any,ariaLabel:i.string,disabled:i.bool,reverse:i.bool,label:i.any,labelVisible:i.bool,labelPlacement:i.oneOf(["start","center","end"]),max:i.number,min:i.number,value:i.number,tabIndex:i.number,emptyStyle:i.object,emptyClassName:i.string,progressStyle:i.object,progressClassName:i.string};var Bt={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};Lt.defaultProps=Bt,Lt.displayName="KendoProgressBar";var Vt=function(){return Vt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Vt.apply(this,arguments)},Ht=o.forwardRef((function(e,t){(0,C.s)(x);var n=e.animationDuration,r=e.children,i=e.className,s=e.disabled,l=e.errorIcon,c=e.item,u=e.items,d=e.linear,p=e.mode,f=e.orientation,h=e.style,m=e.successIcon,g=e.onChange,v=e.onFocus,y=o.useRef(null),b=o.useCallback((function(){y.current&&(0,Nt.n)(y.current)}),[]),k=o.useCallback((function(){return{element:y.current,focus:b}}),[b]);o.useImperativeHandle(t,k);var O=e.value||Kt.value,S=o.useState(O),E=S[0],I=S[1],N=u?u.length:0,T="vertical"===f,M=(0,Tt.V)(y,e.dir),D="number"==typeof n?n:!1!==n?400:0,R=o.useCallback((function(e,t){O!==t&&g&&!s&&(!d||t===O-1||t===O||t===O+1)&&((0,X.N)(g,e,k(),{value:t}),I(t))}),[O,d,g,s,I]),P=o.useCallback((function(e){var t=e.value,n=e.syntheticEvent;R(n,t)}),[R]),_=o.useCallback((function(e){v&&!s&&(0,X.N)(v,e.syntheticEvent,k(),void 0)}),[v,s]),A=o.useCallback((function(e){R(e,E)}),[R,E]),j=o.useCallback((function(e){var t="rtl"===M,n=E,r=u.length-1;switch(e.keyCode){case w.R.left:e.preventDefault(),!t&&n>0&&I(n-1),t&&n<r&&I(n+1);break;case w.R.right:e.preventDefault(),!t&&n<r&&I(n+1),t&&n>0&&I(n-1);break;case w.R.up:e.preventDefault(),!t&&n>0&&I(n-1),t&&n>0&&I(n-1);break;case w.R.down:e.preventDefault(),!t&&n<r&&I(n+1),t&&n<r&&I(n+1);break;case w.R.home:e.preventDefault(),I(0);break;case w.R.end:e.preventDefault(),I(r);break;case w.R.space:e.preventDefault();break;case w.R.enter:e.preventDefault(),u[n].disabled||A(e)}}),[u,I,E,M,A]),F=o.useMemo((function(){return(0,a.A)("k-stepper",{"k-stepper-linear":d},i)}),[d,i]),z=o.useMemo((function(){return Vt({display:"grid",gridTemplateColumns:T?void 0:"repeat("+2*N+", 1fr)",gridTemplateRows:T?"repeat("+N+", 1fr)":void 0},h)}),[T,N,h]),L=o.useMemo((function(){return(0,a.A)("k-step-list",{"k-step-list-horizontal":!T,"k-step-list-vertical":T})}),[T]),B=o.useMemo((function(){return{gridColumnStart:T?void 0:1,gridColumnEnd:T?void 0:-1,gridRowStart:T?1:void 0,gridRowEnd:T?-1:void 0}}),[T]),V=o.useMemo((function(){return{gridColumnStart:T?void 0:2,gridColumnEnd:T?void 0:2*N,gridRowStart:T?1:void 0,gridRowEnd:T?N:void 0,top:T?17:void 0}}),[T,N]),H=u&&u.map((function(e,t){var n=Vt({index:t,disabled:s||e.disabled,focused:t===E,current:t===O},e),r=c||_t;return o.createElement(r,Vt({key:t},n))}));return o.createElement(It.Provider,{value:{animationDuration:n,isVertical:T,item:c,linear:d,mode:p,numOfSteps:N,value:O,successIcon:m,errorIcon:l,onChange:P,onFocus:_}},o.createElement("nav",{className:F,style:z,dir:M,onKeyDown:j},o.createElement("ol",{className:L,style:B},H||r),o.createElement(Lt,{style:V,animation:{duration:D},"aria-hidden":!0,max:N-1,labelVisible:!1,orientation:f,reverse:"vertical"===f,value:O,disabled:s,tabIndex:-1})))}));Ht.propTypes={animationDuration:i.oneOfType([i.bool,i.number]),children:i.any,className:i.string,dir:i.string,disabled:i.bool,errorIcon:i.string,item:i.any,items:i.any,linear:i.bool,mode:i.oneOf(["steps","labels"]),orientation:i.oneOf(["horizontal","vertical"]),style:i.object,successIcon:i.string,value:i.number.isRequired,onChange:i.func,onFocus:i.func};var Kt={value:0};Ht.defaultProps=Kt,Ht.displayName="KendoStepper";var Wt=o.forwardRef((function(e,t){(0,C.s)(x);var n=e.children,r=e.className,i=e.style,s=e.id,l=o.useRef(null),c=o.useCallback((function(){l.current&&(0,Nt.n)(l.current)}),[]),u=o.useCallback((function(){return{element:l.current,focus:c}}),[c]);o.useImperativeHandle(t,u);var d=o.useMemo((function(){return(0,v.M)()}),[]),p=o.useMemo((function(){return e.themeColor||$t.themeColor}),[e.themeColor]),f=o.useMemo((function(){return e.position||$t.position}),[e.position]),h=o.useMemo((function(){return e.positionMode||$t.positionMode}),[e.positionMode]),m=o.useMemo((function(){return(0,a.A)("k-appbar",{"k-appbar-top":"top"===f,"k-appbar-bottom":"bottom"===f,"k-appbar-static":"static"===h,"k-appbar-sticky":"sticky"===h,"k-appbar-fixed":"fixed"===h,"k-appbar-light":"light"===p,"k-appbar-dark":"dark"===p,"k-appbar-inherit":"inherit"===p},r)}),[f,h,p,r]);return o.createElement("div",{className:m,style:i,id:s||d},n)}));Wt.propTypes={children:i.any,className:i.string,style:i.object,id:i.string,themeColor:i.string,position:i.oneOf(["top","bottom"]),positionMode:i.oneOf(["static","sticky","fixed"])};var $t={themeColor:"light",position:"top",positionMode:"static"};Wt.displayName="KendoAppBar";var qt=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null),l=o.useCallback((function(){s.current&&(0,Nt.n)(s.current)}),[]),c=o.useCallback((function(){return{element:s.current,focus:l}}),[l]);o.useImperativeHandle(t,c);var u=o.useMemo((function(){return(0,a.A)("k-appbar-section",r)}),[r]);return o.createElement("div",{className:u,style:i},n)}));qt.propTypes={children:i.any,className:i.string,style:i.object},qt.displayName="KendoAppBarSection";var Ut=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null),l=o.useCallback((function(){s.current&&(0,Nt.n)(s.current)}),[]),c=o.useCallback((function(){return{element:s.current,focus:l}}),[l]);o.useImperativeHandle(t,c);var u=o.useMemo((function(){return(0,a.A)("k-appbar-spacer",{"k-appbar-spacer-sized":i&&i.width&&null!==i.width},r)}),[r,i]),d=o.useMemo((function(){return{flexBasis:i&&i.width?i.width:void 0}}),[i]);return o.createElement("span",{className:u,style:d},n)}));Ut.propTypes={children:i.any,className:i.string,style:i.object},Ut.displayName="KendoAppBarSpacer";var Gt=n(9659),Yt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xt=function(){return Xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Xt.apply(this,arguments)},Jt=function(e){return o.createElement(Je._,{onPress:e.onPress,onDrag:function(t){e.onResize(t.event,!1,e.d)},onRelease:function(t){e.onResize(t.event,!0,e.d)}},o.createElement("div",{className:"k-resize-handle k-cursor-"+e.d+"-resize",style:Xt({bottom:0,right:0},e.style)}))},Zt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleResize=function(e,n,r){e.originalEvent.preventDefault(),t.props.onResize(e,{end:n,direction:r})},t}return Yt(t,e),t.prototype.render=function(){var e=this.props,t=e.resizable,n=e.onPress,r=e.rtl;return t?o.createElement(o.Fragment,null,"vertical"!==t&&o.createElement(Jt,{onPress:n,onResize:this.handleResize,d:"ew",style:r?{top:0,width:9,left:0,right:""}:{top:0,width:9,right:0,left:""}}),"horizontal"!==t&&o.createElement(Jt,{onPress:n,onResize:this.handleResize,d:"ns",style:{left:0,height:9}}),!0===t&&o.createElement(Jt,{onPress:n,onResize:this.handleResize,d:r?"nesw":"nwse",style:r?{width:9,height:9,right:"",left:0}:{width:9,height:9,right:0,left:""}})):null},t}(o.Component),Qt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),en=function(){return en=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},en.apply(this,arguments)},tn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={rtl:!1},t.oldSize={},t.draggable=null,t.dragging=!1,t.resizing=!1,t.element=null,t.ignoreDrag=!1,t.pressOffset={x:0,y:0},t.pressXY={x:0,y:0},t.currentTranslate={x:0,y:0},t.preventDataOps=void 0,t.handleResize=function(e,n){if(n.end)t.handleRelease();else if(t.element){var r=e.clientX,o=e.clientY;t.resizing=!0;var i=("ns"!==n.direction?r-t.pressXY.x:0)*(t.state.rtl?-1:1),a="ew"!==n.direction?o-t.pressXY.y:0;if(t.dragElement&&(t.state.rtl?t.dragElement.style.marginLeft=-i+"px":t.dragElement.style.marginRight=-i+"px",t.dragElement.style.height="calc(100% + ".concat(a,"px)")),t.element.classList.add("k-layout-item-hint","k-layout-item-hint-resize"),!t.preventDataOps){var s=0,l=0,c=t.element.getBoundingClientRect();i>c.width/t.props.defaultPosition.colSpan/3&&(s=1),i<-c.width/t.props.defaultPosition.colSpan/1.25&&(s=-1),a>c.height/t.props.defaultPosition.rowSpan/3&&(l=1),a<-c.height/t.props.defaultPosition.rowSpan/1.25&&(l=-1),0===s&&0===l||t.props.update(t.props.index,0,0,l,s)}}},t.handlePress=function(e){if(t.dragElement)if(t.ignoreDrag=!1,t.props.ignoreDrag&&t.props.ignoreDrag(e.event.originalEvent))t.ignoreDrag=!0;else{t.element&&(t.element.style.zIndex="10",t.element.classList.add("k-layout-item-hint")),t.dragElement.classList.remove("k-cursor-grab"),t.dragElement.classList.add("k-cursor-grabbing");var n=t.dragElement.getBoundingClientRect();t.pressXY={x:e.event.clientX,y:e.event.clientY},t.pressOffset={x:e.event.clientX-n.x,y:e.event.clientY-n.y}}},t.handleDrag=function(e){if(!t.ignoreDrag){var n=t.dragElement;if(!e.event.originalEvent.defaultPrevented&&n){t.dragging=!0,e.event.originalEvent.preventDefault();var r=n.getBoundingClientRect();if(t.currentTranslate={x:e.event.clientX-r.x-t.pressOffset.x+t.currentTranslate.x,y:e.event.clientY-r.y-t.pressOffset.y+t.currentTranslate.y},n.style.transform="translate(".concat(t.currentTranslate.x,"px, ").concat(t.currentTranslate.y,"px)"),n.style.transition="transform 0s",!t.preventDataOps){var o=0,i=0;t.currentTranslate.y>.7*r.height/t.props.defaultPosition.rowSpan&&(i=1),t.currentTranslate.y<.7*-r.height/t.props.defaultPosition.rowSpan&&(i=-1),t.currentTranslate.x>.7*r.width/t.props.defaultPosition.colSpan&&(o=1),t.currentTranslate.x<.7*-r.width/t.props.defaultPosition.colSpan&&(o=-1),t.props.update(t.props.index,i,t.state.rtl?-o:o,0,0)}}}},t.handleRelease=function(){t.dragging=t.resizing=!1,t.currentTranslate={x:0,y:0},t.element&&(t.element.style.zIndex="1",t.element.classList.remove("k-layout-item-hint","k-layout-item-hint-resize"));var e=t.dragElement;e&&(e.style.transform="translate(0px, 0px)",e.style.transition="transform ".concat(200,"ms cubic-bezier(0.2, 0, 0, 1) 0s"),e.style.marginRight="0px",e.style.marginLeft="0px",e.style.height="100%",e.classList.remove("k-cursor-grabbing"),e.classList.add("k-cursor-grab"))},t}return Qt(t,e),Object.defineProperty(t.prototype,"reorderable",{get:function(){return void 0!==this.props.reorderable?this.props.reorderable:t.defaultProps.reorderable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragElement",{get:function(){return this.draggable?this.draggable.element:void 0},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.element&&"rtl"===getComputedStyle(this.element).direction&&this.setState({rtl:!0})},t.prototype.render=function(){var e=this;clearTimeout&&"function"==typeof clearTimeout&&(clearTimeout(this.preventDataOps),this.preventDataOps=window.setTimeout((function(){e.preventDataOps=void 0}),200));var n=this.props.defaultPosition,r=void 0!==this.props.resizable?this.props.resizable:t.defaultProps.resizable,i=en({gridColumnStart:n.col,gridColumnEnd:"span ".concat(n.colSpan),gridRowStart:n.row,gridRowEnd:"span ".concat(n.rowSpan),outline:"none",order:n.order},this.props.hintStyle),s=o.createElement("div",{ref:function(t){e.draggable=t?{element:t}:null},className:(0,a.A)("k-tilelayout-item k-card",{"k-cursor-grab":this.reorderable},this.props.className),style:en({height:"100%"},this.props.style)},this.props.children,o.createElement(Zt,{onPress:this.handlePress,onResize:this.handleResize,resizable:r,rtl:this.state.rtl}));return o.createElement("div",{ref:function(t){e.element=t},style:i,className:this.props.hintClassName},o.createElement(Je._,{ref:function(t){e.draggable=t},onDrag:this.props.reorderable?this.handleDrag:void 0,onRelease:this.props.reorderable?this.handleRelease:void 0,onPress:this.props.reorderable?this.handlePress:void 0},s))},t.prototype.getSnapshotBeforeUpdate=function(e){return this.oldSize={},this.dragElement&&(this.oldSize=this.dragElement.getBoundingClientRect()),null},t.prototype.componentDidUpdate=function(e){var t=this,n=this.dragElement;if(n){var r=n.getBoundingClientRect(),o=this.oldSize;if(this.resizing){var i=r.width-o.width;if(this.state.rtl){var a=parseFloat(n.style.marginLeft||"0");n.style.marginLeft=a-i+"px"}else a=parseFloat(n.style.marginRight||"0"),n.style.marginRight=a+i+"px";this.pressXY.x+=this.state.rtl?-i:i;var s=r.height-o.height,l=parseFloat(n.style.height.substring(12));n.style.height="calc(100% + ".concat(l+s,"px)"),this.pressXY.y+=s}var c=o.left-r.left,u=o.top-r.top;0===c&&0===u||(this.dragging?e.defaultPosition.order===this.props.defaultPosition.order&&e.defaultPosition.col===this.props.defaultPosition.col||(this.currentTranslate.x=0,this.currentTranslate.y=0,n.style.transform=""):Math.abs(u)<15&&Math.abs(c)<15||requestAnimationFrame((function(){var e=t.element;e&&(e.style.transform="translate(".concat(c,"px, ").concat(u,"px)"),e.style.transition="transform 0s",requestAnimationFrame((function(){e.style.transform="",e.style.transition="transform ".concat(200,"ms cubic-bezier(0.2, 0, 0, 1) 0s")})))})))}},t.propTypes={defaultPosition:i.object.isRequired,style:i.object,className:i.string,hintStyle:i.object,hintClassName:i.string,header:i.any,body:i.any,item:i.any,resizable:i.oneOf(["horizontal","vertical",!0,!1]),reorderable:i.bool},t.displayName="KendoTileLayoutItem",t.defaultProps={resizable:!0,reorderable:!0},t}(o.Component),nn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rn=function(){return rn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},rn.apply(this,arguments)},on={column:"k-grid-flow-col",row:"k-grid-flow-row","column dense":"k-grid-flow-col-dense","row dense":"k-grid-flow-row-dense",unset:"k-grid-flow-unset"},an=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t.state={positions:(t.props.items||[]).map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e.defaultPosition)}))},t.focus=function(){t._element&&t._element.focus()},t.update=function(e,n,r,o,i){if(void 0===o&&(o=0),void 0===i&&(i=0),0!==n||0!==r||i||o){var a=!1,s=t.state.positions.map((function(e){return Object.assign({},e)})),l=s[e],c=s.find((function(e){return e.order===l.order+n}));c&&c!==l&&(l.order+=n,c.order+=-n,a=!0);var u=l.col+r;0!==r&&u>=1&&u+l.colSpan<=(t.props.columns||3)+1&&(l.col=u,a=!0);var d=l.colSpan+i;i&&d>=1&&d+l.col<=(t.props.columns||3)+1&&(l.colSpan=d,a=!0);var p=l.rowSpan+o;o&&p>=1&&(l.rowSpan=p,a=!0),a&&(t.setState({positions:s}),(0,X.N)(t.props.onReposition,{},t,{value:s}))}},t}return nn(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),t.getDerivedStateFromProps=function(e,t){return e.positions?{positions:e.positions.map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e)}))}:!e.items||t.positions&&e.items.length===t.positions.length?null:{positions:e.items.map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e.defaultPosition)}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.columns,i=void 0===r?3:r,s=t.columnWidth,l=void 0===s?"1fr":s,c=t.gap,u=t.rowHeight,d=void 0===u?"1fr":u,p=t.style,f=t.autoFlow,h=void 0===f?"column":f,m=t.items,g=void 0===m?[]:m,v=c?"".concat("number"==typeof c.rows?c.rows+"px":c.rows)+" "+"".concat("number"==typeof c.columns?c.columns+"px":c.columns):16,y=rn({gridTemplateColumns:"repeat(".concat(i,", minmax(0px, ").concat("number"==typeof l?l+"px":l,"))"),gridAutoRows:"minmax(0px, ".concat("number"==typeof d?d+"px":d,")"),gap:v,padding:v},p);return o.createElement("div",{ref:function(t){e._element=t},dir:this.props.dir,className:(0,a.A)("k-tilelayout",on[h],n),style:y,id:this.props.id,children:g.map((function(t,n){return o.createElement(tn,{key:e.props.dataItemKey?(0,Gt.Y)(e.props.dataItemKey)(t):n,update:e.update,defaultPosition:e.state.positions[n],index:n,resizable:t.resizable,reorderable:t.reorderable,style:t.style,className:t.className,hintClassName:t.hintClassName,hintStyle:t.hintStyle,ignoreDrag:e.props.ignoreDrag},t.item?t.item:o.createElement(o.Fragment,null,o.createElement("div",{className:"k-tilelayout-item-header k-card-header"},o.isValidElement(t.header)?t.header:o.createElement("h5",{className:"k-card-title"},t.header)),o.createElement("div",{className:"k-tilelayout-item-body k-card-body"},t.body)))}))})},t.propTypes={id:i.string,style:i.object,className:i.string,dir:i.string,gap:i.object,columns:i.number,columnWidth:i.oneOfType([i.number,i.string]),rowHeight:i.oneOfType([i.number,i.string]),dataItemKey:i.string,items:i.array,positions:i.array,autoFlow:i.oneOf(["column","row","column dense","row dense","unset"]),onReposition:i.func,ignoreDrag:i.func},t.displayName="KendoTileLayout",t}(o.Component),sn={primary:"k-bottom-nav-primary",secondary:"k-bottom-nav-secondary",tertiary:"k-bottom-nav-tertiary",info:"k-bottom-nav-info",success:"k-bottom-nav-success",warning:"k-bottom-nav-warning",error:"k-bottom-nav-error",dark:"k-bottom-nav-dark",light:"k-bottom-nav-light",inverse:"k-bottom-nav-inverse"},ln={flat:"k-bottom-nav-flat",solid:"k-bottom-nav-solid"},cn={vertical:"k-bottom-nav-item-flow-vertical",horizontal:"k-bottom-nav-item-flow-horizontal"},un={fixed:"k-pos-fixed",sticky:"k-pos-sticky"},dn=o.forwardRef((function(e,t){(0,C.s)(x);var n=o.useRef(null);o.useImperativeHandle(t,(function(){return{element:n.current}}));var r=e.className,i=e.style,s=e.selected,l=e.disabled,c=e.item,u=e.render,d=e.dataItem,p=e.icon,f=e.text,h=e.id,m=e.onSelect,g=e.onKeyDown,v=e.index,y=e.tabIndex,b=o.useMemo((function(){return(0,a.A)("k-bottom-nav-item",{"k-selected":s,"k-disabled":l},r)}),[s,l,r]),k=o.useCallback((function(e){m&&void 0!==v&&!l&&m(e,v)}),[m,v,l]),w=o.useCallback((function(e){g&&void 0!==v&&!l&&g(e,v)}),[g,v,l]),O=u,S=c,E=o.createElement("span",{ref:n,className:b,style:i,role:"link",id:h,tabIndex:y,onClick:k,onKeyDown:w,"aria-selected":s,"aria-disabled":l},S?o.createElement(S,{itemIndex:v,item:d}):o.createElement(o.Fragment,null,p&&o.createElement("span",{className:"k-bottom-nav-item-icon k-icon k-i-".concat(p)}),f&&o.createElement("span",{className:"k-bottom-nav-item-text",style:{userSelect:"none"}},f)));return void 0!==O?O.call(void 0,E,e):E}));dn.propTypes={className:i.string,style:i.object,id:i.string,disabled:i.bool,selected:i.bool,icon:i.string,text:i.string,tabIndex:i.number},dn.defaultProps={tabIndex:0},dn.displayName="KendoReactBottomNavigationItem";var pn=function(){return pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pn.apply(this,arguments)},fn=o.forwardRef((function(e,t){(0,C.s)(x);var n=o.useRef(null),r=o.useCallback((function(){n.current&&(0,Nt.n)(n.current)}),[]),i=o.useCallback((function(){return{element:n.current,focus:r}}),[r]);o.useImperativeHandle(t,i);var s=e.themeColor,l=void 0===s?hn.themeColor:s,c=e.fill,u=void 0===c?hn.fill:c,d=e.positionMode,p=void 0===d?hn.positionMode:d,f=e.itemFlow,h=void 0===f?hn.itemFlow:f,m=e.border,g=void 0===m?hn.border:m,y=e.className,b=e.items,k=e.item,O=e.itemRender,S=e.disabled,E=e.style,I=e.id,N=e.onSelect,T=e.onKeyDown,M=o.useMemo((function(){return(0,v.M)()}),[]),D=(0,xt.n)(n,e.dir),R=o.useMemo((function(){return(0,a.A)("k-bottom-nav",un[p],sn[l],ln[u],cn[h],{"k-bottom-nav-border":g,"k-disabled":S},y)}),[p,l,u,h,g,S,y]),P=o.useCallback((function(e,t){b&&!b[t].disabled&&N&&(0,X.N)(N,e,i(),{itemTarget:b[t],itemIndex:t})}),[b,N]),_=o.useCallback((function(e,t){P(e,t)}),[P]),A=o.useCallback((function(e,t){switch(e.keyCode){case w.R.enter:case w.R.space:P(e,t),e.preventDefault()}(0,X.N)(T,e,i(),void 0)}),[P,T]);return o.createElement("nav",{ref:n,className:R,style:E,id:I||M,dir:D},b&&b.map((function(e,t){return o.createElement(dn,pn({},e,{key:t,index:t,id:"".concat(I||M,"-").concat(t),disabled:S||e.disabled,selected:e.selected,dataItem:e,item:k,render:O,onSelect:_,onKeyDown:A}))})))})),hn={themeColor:"primary",fill:"flat",itemFlow:"vertical",positionMode:"fixed",border:!0};fn.propTypes={className:i.string,style:i.object,id:i.string,dir:i.string,themeColor:i.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),fill:i.oneOf(["solid","flat"]),itemFlow:i.oneOf(["vertical","horizontal"]),border:i.bool,disabled:i.bool,selected:i.number,onSelect:i.func},fn.defaultProps=hn,fn.displayName="KendoReactBottomNavigation";var mn=n(9302),gn=function(){return gn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gn.apply(this,arguments)},vn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,s=e.style,l=e.id,c=e.children,u=o.useMemo((function(){return(0,v.M)()}),[]),d=o.useMemo((function(){return e.orientation||yn.orientation}),[e.orientation]),p="horizontal"===d,f=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:yn.hAlign}),[e.align]),h=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:yn.vAlign}),[e.align]),m=o.useMemo((function(){return(0,a.A)("k-stack-layout",{"k-hstack":"horizontal"===d,"k-vstack":"vertical"===d,"k-justify-content-start":p&&"start"===f||!p&&"top"===h,"k-justify-content-center":p&&"center"===f||!p&&"middle"===h,"k-justify-content-end":p&&"end"===f||!p&&"bottom"===h,"k-justify-content-stretch":p&&"stretch"===f||!p&&"stretch"===h,"k-align-items-start":!p&&"start"===f||p&&"top"===h,"k-align-items-center":!p&&"center"===f||p&&"middle"===h,"k-align-items-end":!p&&"end"===f||p&&"bottom"===h,"k-align-items-stretch":!p&&"stretch"===f||p&&"stretch"===h},i)}),[d,p,f,h,i]),g=gn({gap:"".concat("number"==typeof e.gap?e.gap+"px":e.gap)},s);return o.createElement("div",{ref:n,className:m,style:g,id:l||u},c)})),yn={orientation:"horizontal",hAlign:"stretch",vAlign:"stretch"};vn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string,orientation:i.oneOf(["horizontal","vertical"]),gap:i.oneOfType([i.string,i.number]),align:i.shape({vertical:i.oneOf(["top","middle","bottom","stretch"]),horizontal:i.oneOf(["start","center","end","stretch"])})},vn.defaultProps=yn,vn.displayName="KendoReactStackLayout";var bn=function(){return bn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bn.apply(this,arguments)},kn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,s=e.style,l=e.id,c=e.children,u=e.gap,d=o.useMemo((function(){return(0,v.M)()}),[]),p=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:wn.hAlign}),[e.align]),f=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:wn.vAlign}),[e.align]),h=o.useMemo((function(){return(0,a.A)("k-grid-layout",{"k-justify-items-start":"start"===p,"k-justify-items-center":"center"===p,"k-justify-items-end":"end"===p,"k-justify-items-stretch":"stretch"===p,"k-align-items-start":"top"===f,"k-align-items-center":"middle"===f,"k-align-items-end":"bottom"===f,"k-align-items-stretch":"stretch"===f},i)}),[p,f,i]),m=u?"".concat("number"==typeof u.rows?u.rows+"px":u.rows)+" "+"".concat("number"==typeof u.cols?u.cols+"px":u.cols):void 0,g=e.rows&&e.rows.map((function(e){return"".concat("number"==typeof e.height?e.height+"px":e.height)})).join(" "),y=e.cols&&e.cols.map((function(e){return"".concat("number"==typeof e.width?e.width+"px":e.width)})).join(" "),b=bn({gap:m,gridTemplateColumns:y,gridTemplateRows:g},s);return o.createElement("div",{ref:n,className:h,style:b,id:l||d},c)})),wn={hAlign:"stretch",vAlign:"stretch",gap:void 0};kn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string,gap:i.shape({rows:i.oneOfType([i.string,i.number]),columns:i.oneOfType([i.string,i.number])}),align:i.shape({vertical:i.oneOf(["top","middle","bottom","stretch"]),horizontal:i.oneOf(["start","center","end","stretch"])})},kn.defaultProps=wn,kn.displayName="KendoReactGridLayout";var Cn=function(){return Cn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Cn.apply(this,arguments)},xn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,a=e.style,s=e.id,l=e.children,c=e.row,u=e.col,d=e.rowSpan,p=e.colSpan,f=o.useMemo((function(){return(0,v.M)()}),[]),h=Cn({gridArea:"".concat(c||"auto"," / ").concat(u||"auto"," / ").concat(d?"span "+d:"auto"," / ").concat(p?"span "+p:"auto")},a);return o.createElement("div",{ref:n,className:i,style:h,id:s||f},l)}));xn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string},xn.displayName="KendoReactGridLayoutItem";var On=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useCallback((function(){r.current&&r.current.focus()}),[r]);return o.useImperativeHandle(n,(function(){return{element:r.current,focus:i,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("li",{ref:r,id:e.id,style:e.style,className:(0,a.A)("k-flex-none k-breadcrumb-item",e.className)},e.children)})),Sn={id:i.string,className:i.string,children:i.any,style:i.object};On.displayName="KendoReactBreadcrumbListItem",On.propTypes=Sn;var En=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null);return o.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("span",{ref:r,id:e.id,tabIndex:e.tabIndex,style:e.style,className:(0,a.A)("k-icon k-i-arrow-chevron-right k-breadcrumb-delimiter-icon",e.className)})})),In={id:i.string,className:i.string,style:i.object,tabIndex:i.number};En.displayName="KendoReactBreadcrumbDelimiter",En.propTypes=In;var Nn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useCallback((function(){r.current&&r.current.focus()}),[r]);o.useImperativeHandle(n,(function(){return{element:r.current,focus:i,props:e}})),o.useImperativeHandle(t,(function(){return n.current}));var s=o.useCallback((function(t){e.id&&(0,X.N)(e.onItemSelect,t,t.target,{id:e.id})}),[e.onItemSelect]),l=o.useCallback((function(t){e.id&&(0,X.N)(e.onKeyDown,t,t.target,{id:e.id})}),[e.onKeyDown]);return o.createElement("span",{"aria-current":e.ariaCurrent?e.ariaCurrent:e.isLast,id:e.id,ref:r,style:e.style,dir:(0,xt.n)(r,e.dir),tabIndex:(0,gt.p)(e.tabIndex,e.disabled),className:(0,a.A)("k-cursor-pointer k-flex-none k-breadcrumb-link k-breadcrumb-icontext-link",{"k-disabled":e.disabled}),onClick:s,onKeyDown:l},e.iconClass?o.createElement("span",{className:(0,a.A)("k-icon",e.iconClass)}):e.icon?e.icon:"",e.text)})),Tn={id:i.string,className:i.string,tabIndex:i.number,style:i.object,dir:i.string,disabled:i.bool,text:i.string,icon:i.node,iconClass:i.string,onClick:i.func,ariaCurrent:i.bool};Nn.displayName="KendoReactBreadcrumbLink",Nn.propTypes=Tn;var Mn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null);return o.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("ol",{id:e.id,ref:r,style:e.style,dir:(0,xt.n)(r,e.dir),tabIndex:(0,gt.p)(e.tabIndex,e.disabled),className:(0,a.A)("k-breadcrumb-container k-flex-wrap",{"k-disabled":e.disabled},e.className)},e.children)})),Dn={id:i.string,className:i.string,children:i.element,tabIndex:i.number,style:i.object,dir:i.string,disabled:i.bool};Mn.displayName="KendoReactBreadcrumbOrderedList",Mn.propTypes=Dn;var Rn=function(){return Rn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Rn.apply(this,arguments)},Pn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useMemo((function(){return e.breadcrumbOrderedList||Mn}),[e.breadcrumbOrderedList]),s=o.useMemo((function(){return e.breadcrumbListItem||On}),[e.breadcrumbListItem]),l=o.useMemo((function(){return e.breadcrumbDelimiter||En}),[e.breadcrumbDelimiter]),c=o.useMemo((function(){return e.breadcrumbLink||Nn}),[e.breadcrumbLink]),u=o.useCallback((function(){r.current&&r.current.focus()}),[r]),d=o.useMemo((function(){return e.disabled||!1}),[e.disabled]);o.useImperativeHandle(n,(function(){return{element:r.current,focus:u,props:e}})),o.useImperativeHandle(t,(function(){return n.current}));var p=(0,xt.n)(r,e.dir),f=function(t){n.current&&(0,X.N)(e.onItemSelect,t,t.target,{id:t.target.id})},h=function(t){n.current&&(0,X.N)(e.onKeyDown,t,t.target,{id:t.target.id})},m=e.valueField||An.valueField,g=e.iconField||An.iconField,v=e.iconClassField||An.iconClassField,y=e.textField||An.textField;return o.createElement("nav",{"aria-label":e.ariaLabel,id:e.id,style:e.style,ref:r,dir:p,className:(0,a.A)("k-breadcrumb",{"k-rtl":"rtl"===p,"k-disabled":d},e.className)},o.createElement(i,null,o.createElement(o.Fragment,null,e.data.map((function(t,n,r){var i=t[m];return o.createElement(s,{key:i},0!==n&&o.createElement(l,null),o.createElement(c,Rn({isLast:r.length-1===n,id:String(i),icon:t[g]||void 0,iconClass:t[v]?String(t[v]):void 0,text:t[y]?String(t[y]):void 0,disabled:t.disabled||!1,onItemSelect:f,onKeyDown:h},e)))})))))})),_n={id:i.string,style:i.object,className:i.string,breadcrumbOrderedList:i.elementType,breadcrumbListItem:i.elementType,breadcrumbDelimiter:i.elementType,breadcrumbLink:i.elementType,data:i.arrayOf(i.shape({id:i.string,text:i.string,icon:i.any,iconClass:i.string})),dir:i.oneOf(["ltr","rtl"]),disabled:i.bool,valueField:i.string,textField:i.string,iconField:i.string,iconClassField:i.string,onItemSelect:i.func,ariaLabel:i.string},An={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass"};Pn.displayName="KendoReactBreadcrumb",Pn.propTypes=_n,Pn.defaultProps=An;var jn=n(6059),Fn=o.forwardRef((function(e,t){var n;(0,C.s)(x);var r=o.useRef(null),i=o.useState(!1),s=i[0],l=i[1],c=o.useCallback((function(){return{element:r.current}}),[]);o.useImperativeHandle(t,c);var u=e.expanded,d=void 0!==u&&u,p=e.disabled,f=e.title,h=e.subtitle,m=e.onAction,g=e.expandIcon,v=e.collapseIcon,y=o.useCallback((function(e){(0,X.N)(m,e,c(),{expanded:d})}),[m,d]),b=o.useCallback((function(e){e.keyCode!==w.R.enter&&e.keyCode!==w.R.space||(e.preventDefault(),(0,X.N)(m,e,c(),{expanded:d}))}),[m,d]),k=o.useCallback((function(){e.disabled||l(!0)}),[e.disabled]),O=o.useCallback((function(){e.disabled||l(!1)}),[e.disabled]),S=(0,jn.U)({onFocus:k,onBlur:O}),E=S.onFocus,I=S.onBlur;return o.createElement("div",{ref:r,className:(0,a.A)("k-expander",e.className,{"k-expanded":d,"k-focus":s&&!p,"k-disabled":p}),onFocus:E,onBlur:I,style:e.style,id:e.id,dir:(0,Tt.V)(r,e.dir),onKeyDown:p?void 0:b},o.createElement("div",{role:"button","aria-controls":e.ariaControls,"aria-expanded":d,"aria-disabled":p,tabIndex:(0,gt.p)(e.tabIndex,p),className:"k-expander-header",onClick:p?void 0:y},void 0!==f?o.createElement("div",{className:"k-expander-title"},f):void 0,o.createElement("span",{className:"k-spacer"}),void 0!==h?o.createElement("div",{className:"k-expander-sub-title"},h):void 0,o.createElement("span",{className:"k-expander-indicator"},o.createElement("span",{className:(0,a.A)((n={},n[String(g)]=Boolean(!d&&g),n["k-icon k-i-arrow-chevron-down"]=!d&&!g,n[String(v)]=Boolean(d&&v),n["k-icon k-i-arrow-chevron-up"]=d&&!v,n))}))),e.children)}));Fn.propTypes={children:i.node,className:i.string,style:i.object,dir:i.string,id:i.string,tabIndex:i.number,title:i.node,subtitle:i.node,expandIcon:i.string,collapseIcon:i.string,expanded:i.bool,disabled:i.bool,onAction:i.func},Fn.displayName="KendoReactExpansionPanel";var zn=function(){return zn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zn.apply(this,arguments)},Ln=o.forwardRef((function(e,t){return o.createElement("div",zn({ref:t},e,{className:(0,a.A)("k-expander-content-wrapper",e.className)}),o.createElement("div",{className:"k-expander-content"},e.children))}));Ln.displayName="KendoReactExpansionPanelContent"},5809:(e,t,n)=>{n.r(t),n.d(t,{GridPDFExport:()=>K,PDFExport:()=>x,PDFMargin:()=>h,TreeListPDFExport:()=>X,getPageMargin:()=>g,savePDF:()=>O});var r=n(3899),o=n(189),i=n(4407);function a(e,t,n){void 0===n&&(n={});var r=d;if(n.forceProxy&&!n.proxyURL)throw new Error("No proxyURL is set, but forceProxy is true");n.forceProxy||(l()&&(r=u),navigator.msSaveBlob&&(r=c)),r(e,t,n)}var s=function(){return document.createElement("a")},l=function(){return"download"in s()};function c(e,t){var n=e;if("string"==typeof e){for(var r=e.split(";base64,"),o=r[0],i=atob(r[1]),a=new Uint8Array(i.length),s=0;s<i.length;s++)a[s]=i.charCodeAt(s);n=new Blob([a.buffer],{type:o})}navigator.msSaveBlob(n,t)}function u(e,t){var n=e;window.Blob&&e instanceof Blob&&(n=URL.createObjectURL(e));var r=s();r.download=t,r.href=n;var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(o),setTimeout((function(){return URL.revokeObjectURL(n)}))}function d(e,t,n){if(n.proxyURL){var r=document.createElement("form");r.setAttribute("action",n.proxyURL),r.setAttribute("method","POST"),r.setAttribute("target",n.proxyTarget||"_self");var o=n.proxyData||{};o.fileName=t;var i=e.split(";base64,");for(var a in o.contentType=i[0].replace("data:",""),o.base64=i[1],o)if(o.hasOwnProperty(a)){var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name",a),s.setAttribute("value",o[a]),r.appendChild(s)}document.body.appendChild(r),r.submit(),document.body.removeChild(r)}}String.fromCharCode;var p,f=(p=function(e,t){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},p(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.render=function(){return null},t.propTypes={left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])},t}(r.Component),m=["bottom","left","right","top"];function g(e){var t=r.Children.toArray(e.children).find((function(e){return e&&e.type===h}));return t?function(e){for(var t={},n=0;n<m.length;n++){var r=m[n],o=e.props[r];void 0!==o&&(t[r]=o)}return t}(t):e.margin}var v=n(3209),y=function(){function e(e,t,n,o,i){void 0===i&&(i={});var a=this;this.drawDOM=e,this.exportPDF=t,this.saveAs=n,this.domElement=o,this.options=i,this.convertPageTemplateToHtml=function(e){var t=v.renderToStaticMarkup(r.createElement(a.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages}));return"<span>".concat(t,"</span>")}}return e.prototype.savePDF=function(e){var t=this,n=this.drawDOM(this.domElement,this.getDrawOptions()).then((function(e){return t.exportPDF(e,t.getPDFOptions())})).then((function(e){return t.saveAs(e,t.options.fileName||"export.pdf",t.getSaveOptions())}));e&&n.then(e,e)},e.prototype.getDrawOptions=function(){return{avoidLinks:this.options.avoidLinks,forcePageBreak:this.options.forcePageBreak,keepTogether:this.options.keepTogether,margin:this.options.margin,paperSize:this.options.paperSize,landscape:this.options.landscape,repeatHeaders:this.options.repeatHeaders,scale:this.options.scale,template:this.options.pageTemplate&&this.convertPageTemplateToHtml}},e.prototype.getPDFOptions=function(){return{author:this.options.author,creator:this.options.creator||"KendoReact PDF Generator",date:this.options.date,imgDPI:this.options.imageResolution,keywords:this.options.keywords,landscape:this.options.landscape,margin:this.options.margin,multiPage:!0,paperSize:this.options.paperSize,producer:this.options.producer,subject:this.options.subject,title:this.options.title}},e.prototype.getSaveOptions=function(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}},e}();const b=y;var k=n(9302),w={name:"@progress/kendo-react-pdf",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031834,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},C=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(e){function t(t){var n=e.call(this,t)||this;if(n.rootElForPDF=null,void 0!==k)k.validatePackage(w);else{var r="License activation failed for ".concat(w.name,"\n");r+="The @progress/kendo-licensing script is not loaded.\n",r+="See ".concat(w.licensingDocsUrl," for more information.\n"),console.warn(r)}return n}return C(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",{ref:function(t){e.rootElForPDF=t}},this.props.children)},t.prototype.save=function(e){new b(i.drawDOM,i.exportPDF,a,this.rootElForPDF,this.getOptions()).savePDF(e)},t.prototype.getOptions=function(){return Object.assign({},this.props,{margin:g(this.props)})},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string},t}(r.Component);function O(e,t,n){void 0===t&&(t={}),new b(i.drawDOM,i.exportPDF,a,e,t).savePDF(n)}var S=n(994),E={},I=function(e){return String(e).trim().split(" ")},N=function(e){return function(t){return function(e,t){var n=I(t);return Boolean(I(e.className).find((function(e){return n.indexOf(e)>=0})))}(t,e)}},T=function(e){return E[e]||(E[e]=function(t){return String(t.nodeName).toLowerCase()===e.toLowerCase()}),E[e]},M=function(e,t,n){if(void 0===n&&(n=!0),e){if(n&&t(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){var r=M(e,t);if(r)return r}e=e.nextSibling}}},D="k-grid-header",R="k-grid-footer",P=T("TABLE"),_=function(e){return e?"locked":"wrap"},A=function(){function e(e){this.element=e,this.list=M(e,N("k-grid-container"))}return e.prototype.content=function(e){return M(this.list,N("k-grid-content".concat(e?"-locked":"")))},e.prototype.header=function(e){return this.headerWrap=this.headerWrap||M(this.element,N(D)),M(this.headerWrap,N("".concat(D,"-").concat(_(e))))},e.prototype.footer=function(e){return this.footerWrap=this.footerWrap||M(this.element,N(R)),M(this.footerWrap,N("".concat(R,"-").concat(_(e))))},e.prototype.table=function(){return M(this.element,P)},e}(),j="k-first",F=function(e,t){for(var n=t.length,r=0;r<n;r++)e.appendChild(t[r].cloneNode(!0))},z=function(e){var t=document.createElement("div");return t.className="k-widget k-grid",t.appendChild(e),t},L=function(e){var t=e.length,n=e[0].cloneNode(!0),r=n.rows.length;if(t>1)for(var o=0;o<r;o++)for(var i=1;i<t;i++)F(n.rows[o],e[i].rows[o].cells);return n},B=function(e,t,n,r){for(var o=document.createElement("table"),i=e[0].cloneNode(!0),a=1;a<e.length;a++)F(i,e[a].querySelectorAll("col"));var s=L(t),l=L(n);if(s.className="k-grid-header",function(e,t){if(t.length>1&&e.rows.length>1)for(var n=1;n<e.rows.length;n++){var r=t[0].rows[n].cells.length,o=e.rows[n].cells[r];-1===String(o.className).indexOf(j)&&(o.className+=" ".concat(j))}}(s,t),o.appendChild(i),o.appendChild(s),o.appendChild(l),r.length){var c=L(r);c.className="k-grid-footer",o.appendChild(c)}return z(o)};function V(e){return function(t,n,o,i,a){return void 0===n&&(n={}),function(e,t,n,o,i,a){var s,l,c;function u(){e(function(){(c=document.createElement("div")).className="k-grid-pdf-export-element";var e=function(e){var t,n=new A(e),r=n.content();if(r){var o=[r.querySelector("colgroup")],i=[n.header().querySelector("thead")],a=[r.querySelector("tbody")],s=n.footer(),l=s?[s.querySelector("tfoot")]:[];t=B(o,i,a,l)}else t=z(n.table().cloneNode(!0));return t}(l);return c.appendChild(e),document.body.appendChild(c),e}(),n,d)}function d(){document.body.removeChild(s),document.body.removeChild(c),s=c=void 0,o&&o()}void 0===n&&(n={}),(s=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),l=document.createElement("div"),s.appendChild(l),document.body.appendChild(s),S.render(function(){var e=i&&{data:i,total:i.length,pageSize:i.length,skip:0},n={style:Object.assign({},t.props.style,{width:"1000px"})},o=Object.assign({},e,n);if(a&&a.length>0){var s=function(e){return r.Children.toArray(e.props.children).filter((function(e){return e&&e.type&&"KendoReactGridColumn"!==e.type.displayName}))}(t);return r.cloneElement(t,o,a.concat(s))}return r.cloneElement(t,o)}(),l,u)}(e,t,n,o,i,a)}}var H=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=function(e){function t(t){var n=e.call(this,t)||this;return n.saveGridPDF=V(n.getSavePDF()),n}return H(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t){this.saveGridPDF(this.getGrid(),Object.assign({},this.props,{margin:g(this.props)}),t,e,this.getCustomColumns())},t.prototype.getSavePDF=function(){return O},t.prototype.getGrid=function(){return r.Children.toArray(this.props.children).find((function(e){return e&&"KendoReactGrid"===e.type.displayName}))},t.prototype.getCustomColumns=function(){return r.Children.toArray(this.props.children).filter((function(e){return e&&"KendoReactGridColumn"===e.type.displayName}))},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string},t}(r.Component),W="k-grid-header",$="k-grid-footer",q=T("TABLE"),U=function(){function e(e){this.element=e,this.list=M(e,N("k-grid"))}return e.prototype.content=function(){return M(this.list,N("k-grid"))},e.prototype.header=function(){return this.headerWrap=this.headerWrap||M(this.element,N(W)),M(this.headerWrap,N("".concat(W)))},e.prototype.footer=function(){return this.footerWrap=this.footerWrap||M(this.element,N($)),M(this.footerWrap,N("".concat($)))},e.prototype.table=function(){return M(this.element,q)},e}();function G(e){return function(t,n,o,i,a){return void 0===n&&(n={}),function(e,t,n,o,i,a){var s,l,c,u,d,p;function f(){e(function(){(c=document.createElement("div")).className="k-treelist-pdf-export-element";var e=function(e){var t,n=new U(e),r=n.content(),o=n.header();if(o.childNodes.length>1&&o.removeChild(o.childNodes[1]),o.childNodes[0].childNodes.forEach((function(e){return e.style.top=0})),r){var i=[r.querySelector("colgroup")],a=[o],s=[r.querySelector("tbody")],l=n.footer(),c=l?[l.querySelector("tfoot")]:[];t=B(i,a,s,c)}else t=z(n.table().cloneNode(!0));return t}(l);return c.appendChild(e),document.body.appendChild(c),c}(),n,h)}function h(){document.body.removeChild(s),document.body.removeChild(c),s=c=void 0,o&&o()}void 0===n&&(n={}),(s=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),l=document.createElement("div"),s.appendChild(l),document.body.appendChild(s),S.render((u=n.allPages&&i?{data:i,take:Number.MAX_VALUE,skip:0}:{},d={style:Object.assign({},t.props.style,{width:"1000px"})},p=Object.assign({},u,d),a&&a.length>0?r.cloneElement(t,Object.assign({},p,{columns:a})):r.cloneElement(t,p)),l,f)}(e,t,n,o,i,a)}}var Y=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),X=function(e){function t(t){var n=e.call(this,t)||this;return n.saveTreeListPDF=G(n.getSavePDF()),n}return Y(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t,n){this.saveTreeListPDF(this.getTreeList(),Object.assign({},this.props,{margin:g(this.props)}),n,e,t||[])},t.prototype.getSavePDF=function(){return O},t.prototype.getTreeList=function(){var e=this.props.children;if(e&&e.props.data&&e.props.columns)return this.props.children},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string,allPages:o.bool},t}(r.Component)},9222:(e,t,n)=>{n.d(t,{G:()=>se,v:()=>ae});var r=n(3899),o=n(994),i=n(189),a=function(e){e.style.transitionDuration="",Array.from(e.classList).forEach((function(t){t.startsWith("k-slide-")&&e.classList.remove(t)}))},s="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),l=n(4006),c=n(7827),u=n(8259),d=n(8047);const p="bottom",f="center",h="middle",m="left",g="right",v="top",y="fit",b="flip",k="none";var w,C,x,O=function(e,t,n){var r=0;return e+t>n&&(r=n-(e+t)),e<0&&(r=-e),r},S=function(e){var t=e.offset,n=e.size,r=e.anchorSize,o=e.viewPortSize,i=e.anchorAlignPoint,a=e.elementAlignPoint,s=0,l=2*e.margin;if(a!==i&&a!==f&&a!==h&&i!==f&&i!==h){var c=i===v||i===m;t<0&&c?t+(s=n+r+l)+n>o&&(s=0):t>=0&&!c&&(t+n>o&&(s+=-(r+n+l)),t+s<0&&(s=0))}return s},E=(w=function(e){if(!I())return!1;var t=e?e.ownerDocument:document;if(!t||!t.body)return!1;var n=t.createElement("div");n.style.transform="matrix(10, 0, 0, 10, 0, 0)",n.innerHTML='<div style="position: fixed; top: 10px;">child</div>',t.body.appendChild(n);var r=10!==n.children[0].getBoundingClientRect().top;return t.body.removeChild(n),r},x=!1,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return x||(C=w.apply(void 0,e),x=!0),C}),I=function(){return Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)};const N={eitherRect:function(e,t){return e||{height:0,left:t.left,top:t.top,width:0}},scaleRect:function(e,t){return e&&1!==t?{height:e.height/t,left:e.left/t,top:e.top/t,width:e.width/t}:e},removeStackingOffset:function(e,t){return t?{height:e.height,left:e.left-t.left,top:e.top-t.top,width:e.width}:e},hasRelativeStackingContext:E,canUseDOM:I};function T(e){return e.ownerDocument||e.document||e}const M=function(e){return T(e).defaultView},D=function(e){return T(e).documentElement};var R=0;function P(){if(!R&&"undefined"!=typeof document){var e=document.createElement("div");e.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML="&nbsp;",document.body.appendChild(e),R=e.offsetWidth-e.scrollWidth,document.body.removeChild(e)}return R}function _(e){var t=M(e),n=D(e),r={height:t.innerHeight,width:t.innerWidth};return n.scrollHeight-n.clientHeight>0&&(r.width-=P()),r}function A(e){var t=D(e),n=M(e);return{x:n.pageXOffset||t.scrollLeft||0,y:n.pageYOffset||t.scrollTop||0}}const j=function(e){var t=e.getBoundingClientRect(),n=t.left,r=t.top;return t.height||t.width||(t=function(e){var t=e.style,n=t.display,r=t.left,o=t.position;e.style.display="",e.style.left="-10000px",e.style.position="absolute";var i=e.getBoundingClientRect();return e.style.display=n,e.style.left=r,e.style.position=o,i}(e)),{top:r,left:n,height:t.height,width:t.width}};function F(e){return e===(e.ownerDocument||{}).body?A(e):{x:e.scrollLeft,y:e.scrollTop}}const z=function(e){for(var t=e.offsetParent;t&&"static"===t.style.position;)t=t.offsetParent;return t||D(e)};function L(e,t){for(var n=[],r=e.parentNode;r&&(n.push(r),r!==t);)r=r.parentNode;return n}function B(e){for(var t=[],n=e.parentNode.firstElementChild;n;)n!==e&&t.push(n),n=n.nextElementSibling;return t}var V=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],H=function(){return N.canUseDOM()?window:null},K=/auto|scroll/,W=function(e){return function(e){return""+e.style.overflow+e.style.overflowX+e.style.overflowY}(e)||function(e){var t=window.getComputedStyle(e);return""+t.overflow+t.overflowX+t.overflowY}(e)},$=function(e){if(!e||!N.hasRelativeStackingContext())return null;for(var t=e.parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null},q=function(){return N.canUseDOM()&&parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1},U={addOffset:function(e,t){return{left:e.left+t.left,top:e.top+t.top}},addScroll:function(e,t){return{top:e.top+t.y,left:e.left+t.x,height:e.height,width:e.width}},align:function(e){var t=e.anchorRect,n=e.anchorAlign,r=e.elementRect,o=e.elementAlign,i=e.margin;void 0===i&&(i={});var a=n.horizontal,s=n.vertical,l=o.horizontal,c=o.vertical,u=i.horizontal||0,d=i.vertical||0,m=t.top,v=t.left;return s===p&&(m+=t.height),s!==f&&s!==h||(m+=Math.round(t.height/2)),c===p&&(m-=r.height,d*=-1),c!==f&&c!==h||(m-=Math.round(r.height/2),d*=-1),a===g&&(v+=t.width),a!==f&&a!==h||(v+=Math.round(t.width/2)),l===g&&(v-=r.width,u*=-1),l!==f&&l!==h||(v-=Math.round(r.width/2),u*=-1),{top:m+d,left:v+u}},boundingOffset:function(e){if(!e.getBoundingClientRect){var t=_(e);return{bottom:t.height,left:0,right:t.width,top:0}}var n=e.getBoundingClientRect();return{bottom:n.bottom,left:n.left,right:n.right,top:n.top}},getFontStyles:function(e){var t=H();if(!t||!e)return[];var n=t.getComputedStyle(e);return V.map((function(e){return{key:e,value:n[e]}}))},getWindow:H,hasOffsetParent:function(e){return!!e&&Boolean(e.offsetParent)},offset:function(e){return e?j(e):null},offsetAtPoint:function(e,t){if(!e)return null;var n=e.style,r=n.left,o=n.top,i=n.transition;e.style.transition="none",e.style.left=t.left+"px",e.style.top=t.top+"px";var a=j(e);return e.style.left=r,e.style.top=o,e.offsetHeight,e.style.transition=i,a},position:function(e,t,n){return e&&t?function(e,t,n){void 0===n&&(n=1);var r=t?z(t):null,o=function(e,t){var n=M(e),r=n.getComputedStyle(e),o=j(e),i=t||z(e),a=e.ownerDocument,s=i!==a.body&&i!==a.documentElement,l={top:0,left:0};if("fixed"!==r.position&&s){var c=n.getComputedStyle(i);(l=j(i)).top+=parseInt(c.borderTopWidth,10),l.left+=parseInt(c.borderLeftWidth,10)}return{top:o.top-l.top,left:o.left-l.left,height:o.height,width:o.width}}(e,r),i=o.top,a=o.left,s=o.height,l=o.width,c=function(e,t){return e?F(e):function(e){var t=z(e);return t?F(t):{x:0,y:0}}(t)}(r,e),u=c.x,d=c.y,p=e.ownerDocument,f=r===p.body||r===p.documentElement?1:n;return{top:i+d*f,left:a+u*f,height:s,width:l}}(e,t,n||1):null},removeScroll:function(e,t){return{top:e.top-t.y,left:e.left-t.x,height:e.height,width:e.width}},restrictToView:function(e){var t=e.anchorRect,n=e.anchorAlign,r=e.elementRect,o=e.elementAlign,i=e.collisions,a=e.viewPort,s=e.margin;void 0===s&&(s={});var l=r.top,c=r.left,u=r.height,d=r.width,p=a.height,f=a.width,h=s.horizontal||0,m=s.vertical||0,g=0,v=0,k=i.vertical===y,w=i.horizontal===y,C=i.vertical===b,x=i.horizontal===b;k&&(v+=O(l,u,p)),w&&(g+=O(c,d,f)),C&&(v+=S({margin:m,offset:l,size:u,anchorSize:t.height,viewPortSize:p,anchorAlignPoint:n.vertical,elementAlignPoint:o.vertical})),x&&(g+=S({margin:h,offset:c,size:d,anchorSize:t.width,viewPortSize:f,anchorAlignPoint:n.horizontal,elementAlignPoint:o.horizontal}));var E=C&&0!==v,I=x&&0!==g,N=k&&0!==v,T=w&&0!==g;return{flipped:I||E,fitted:N||T,flip:{horizontal:I,vertical:E},fit:{horizontal:T,vertical:N},offset:{left:g,top:v}}},scrollPosition:A,scrollableParents:function(e){var t=[];if(!N.canUseDOM())return t;for(var n=e.parentElement;n;)(K.test(W(n))||n.hasAttribute("data-scrollable"))&&t.push(n),n=n.parentElement;return t.push(window),t},getRelativeContextElement:$,stackingElementOffset:function(e){var t=$(e);return t?j(t):null},stackingElementScroll:function(e){var t=$(e);return t?{x:t.scrollLeft,y:t.scrollTop}:{x:0,y:0}},stackingElementViewPort:function(e){var t=$(e);return t?{height:t.scrollHeight,width:t.scrollWidth}:null},useRelativePosition:function(e){return Boolean($(e))},windowViewPort:_,zoomLevel:q,isZoomed:function(){return q()>1},zIndex:function(e,t){if(!e||!N.canUseDOM())return null;var n=function(e,t){for(var n,r,o=L(e),i=t;i&&(n=B(i),!(r=o.reduce((function(e,t){return e.concat(n.filter((function(e){return e===t})))}),[])[0]));)i=i.parentElement;return r}(e,t);if(!n)return null;var r=[e].concat(L(e,n)).reduce((function(e,t){var n=t.style.zIndex||window.getComputedStyle(t).zIndex,r=parseInt(n,10);return r>e?r:e}),0);return r?r+1:null}};const G=U;const Y=function(e){var t=e.anchor,n=e.element,r=e.anchorAlign,o=e.elementAlign,i=e.margin,a=e.offset,s=e.positionMode,l=e.scale||1,c="fixed"!==s&&G.hasOffsetParent(n)?function(e,t,n,r){var o=N.eitherRect(G.position(e,t,r),n);return N.scaleRect(o,r)}(t,n,a,l):function(e,t,n,r){var o=function(e,t){return e?{x:0,y:0}:G.scrollPosition(t)}(e,t),i=N.eitherRect(G.offset(e),n),a=2*r,s=G.stackingElementScroll(t);1!==r&&s&&(s.x/=a,s.y/=a);var l=G.stackingElementOffset(t);return 1!==r&&l&&(l.left/=a,l.top/=a),G.removeScroll(G.addScroll(N.removeStackingOffset(N.scaleRect(i,r),l),s),o)}(t,n,a,l),u=N.scaleRect(G.offset(n),l);return G.align({anchorAlign:r,anchorRect:c,elementAlign:o,elementRect:u,margin:i})};var X,J={name:"@progress/kendo-react-popup",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660031236,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},Z=(X=function(e,t){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},X(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}X(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Q=function(){return Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Q.apply(this,arguments)};function ee(e,t){if(e===t)return!0;if(!!e!=!!t)return!1;var n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(e[i]!==t[i])return!1}return!0}var te,ne={left:-1e3,top:0};!function(e){e.hiding="hiding",e.hidden="hidden",e.showing="showing",e.shown="shown",e.reposition="reposition"}(te||(te={}));var re="k-animation-container-shown",oe=function(e){function t(t){var n=e.call(this,t)||this;return n.context=0,n.state={current:te.hidden,previous:te.hidden,props:{}},n._popup=null,n.show=function(e){n.setPosition(e),n.animate(e.firstChild,"enter",n.onOpened),n.setState({current:te.shown,previous:n.state.current})},n.setPosition=function(e){var t=n.props,r=t.anchorAlign,o=t.popupAlign,i=t.collision,a=t.offset,s=t.anchor,l=t.margin,c=t.scale,u=t.positionMode,d=function(e){var t=e.anchor,n=e.currentLocation,r=e.element,o=e.anchorAlign,i=e.elementAlign,a=e.collisions,s=e.margin,l=e.scale||1,c=G.offsetAtPoint(r,n),u=N.scaleRect(c,l),d=N.scaleRect(G.offset(t),l),p=N.eitherRect(d,n),f=e.viewPort||G.windowViewPort(r);f.width=f.width/l,f.height=f.height/l;var h=G.restrictToView({anchorAlign:o,anchorRect:p,collisions:a,elementAlign:i,elementRect:u,margin:s,viewPort:f}),m=G.addOffset(n,h.offset);return{flip:h.flip,flipped:h.flipped,offset:m}}({anchor:s,anchorAlign:r,element:e,elementAlign:o,collisions:i,currentLocation:Y({anchor:s,anchorAlign:r,element:e,elementAlign:o,offset:a,margin:l,positionMode:u,scale:c}),margin:n.props.margin});if(e.style.top=d.offset.top+"px",e.style.left=d.offset.left+"px",n._collisions={fit:d.fit,fitted:d.fitted,flip:d.flip,flipped:d.flipped},n.props.onPosition){var p={target:n,flipped:d.flipped,fitted:d.fitted};n.props.onPosition.call(void 0,p)}},n.onOpened=function(){var e=n._popup;e&&(n.props.show&&e.classList.add(re),n.attachRepositionHandlers(e),n.props.onOpen&&n.props.onOpen.call(void 0,{target:n}))},n.animate=function(e,t,r){if(n.props.popupAlign){var o,i=n.props.popupAlign,l=i.horizontal,c=i.vertical;o="left"===l&&"center"===c?"right":"right"===l&&"center"===c?"left":"top"===c?"down":"up",n._collisions&&n._collisions.flipped&&(o={down:"up",up:"down",left:"right",right:"left"}[o]),function(e,t,n,r,o){if(0===n)return o();var i="k-slide-"+t+"-"+r,l=i+"-active",c=function(t){t.target===e&&(e.removeEventListener("transitionend",c),a(e),"exit"===r&&(e.style.display="none"),o())};e.addEventListener("transitionend",c);var u=e.ownerDocument;if(u){var d=u.defaultView;if(d){var p=function(){a(e),e.classList.add(i),d.requestAnimationFrame((function(){e.style.transitionDuration=n+"ms",e.classList.add(l)}))};s?d.requestAnimationFrame(p):p()}}}(e,o,n.animationDuration[t],t,r)}},n.onClosing=function(e){n.props.show||e.classList.remove(re),n.detachRepositionHandlers()},n.onClosed=function(){n.state.current===te.hiding&&n.state.previous===te.shown&&n.setState({current:te.hidden,previous:n.state.current}),n.props.onClose&&n.props.onClose.call(void 0,{target:n})},n.getCurrentZIndex=function(){return n.context?n.context+1:100},(0,l.s)(J),n.reposition=function(e,t,n){var r,o,i,a;void 0===n&&(n={});var s=0;n=n||{};var l=function(){s=!1===n.leading?0:(new Date).getTime(),r=void 0,a=e.apply(o,i),r||(o=i=null)};return function(){var c=(new Date).getTime();s||!1!==n.leading||(s=c);var u=t-(c-s);return o=void 0,i=arguments,u<=0||u>t?(r&&(clearTimeout(r),r=void 0),s=c,a=e.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=window.setTimeout(l,u)),a}}(n.reposition.bind(n),16.666666666666668),n}return Z(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._popup},enumerable:!1,configurable:!0}),t.getDerivedStateFromProps=function(e,t){var n=e.show,r=e.anchor,o=e.anchorAlign,i=e.appendTo,a=e.collision,s=e.popupAlign,l=e.className,c=e.popupClass,u=e.style,d=e.offset,p=e.contentKey,f=Q(Q({},t),{props:{show:n,anchor:r,anchorAlign:o,appendTo:i,collision:a,popupAlign:s,className:l,popupClass:c,style:u,offset:d,contentKey:p}});return e.show?t.current===te.hidden||t.current===te.hiding?Q(Q({},f),{current:te.showing,previous:t.current}):t.current===te.showing?Q(Q({},f),{current:te.shown,previous:t.current}):t.current!==te.shown||ee(d,t.props.offset)&&ee(o,t.props.anchorAlign)&&ee(i,t.props.appendTo)&&ee(a,t.props.collision)&&ee(s,t.props.popupAlign)&&ee(u,t.props.style)&&r===t.props.anchor&&c===t.props.popupClass&&l===t.props.className?f:Q(Q({},f),{current:te.reposition,previous:t.current}):t.current===te.hiding||t.current===te.hidden?Q(Q({},f),{current:te.hidden,previous:t.current}):Q(Q({},f),{current:te.hiding,previous:t.current})},t.prototype.componentDidUpdate=function(e){this.state.current===te.showing&&this._popup?this.show(this._popup):this.state.current===te.hiding&&this._popup?(this.onClosing(this._popup),this.animate(this._popup.firstChild,"exit",this.onClosed)):this.state.current===te.reposition&&this.state.previous===te.shown?this.setState({current:te.shown,previous:this.state.current}):this.state.current===te.shown&&e.contentKey!==this.props.contentKey&&this._popup&&this.setPosition(this._popup)},t.prototype.componentDidMount=function(){this.state.current===te.showing&&this._popup&&this.show(this._popup)},t.prototype.componentWillUnmount=function(){this.detachRepositionHandlers()},t.prototype.render=function(){var e=this,t=this.props,n=t.children,i=t.className,a=t.popupClass,s=t.show,l=t.id,p=t.positionMode,f=this.props.appendTo?this.props.appendTo:c.N?this.props.anchor&&this.props.anchor.ownerDocument?this.props.anchor.ownerDocument.body:document.body:void 0;this.state.current===te.reposition&&this.state.previous===te.shown&&this._popup&&this.setPosition(this._popup);var h=Object.assign({},{position:p,top:0,left:-1e4},this.props.style||{}),m=this.state.current===te.hiding;if((s||m)&&f){var g=this.getCurrentZIndex(),v=r.createElement(u.$.Provider,{value:g},r.createElement("div",{className:(0,d.A)("k-animation-container","k-animation-container-relative",i),id:l,ref:function(t){return e._popup=t},style:Q({zIndex:g},h)},r.createElement("div",{className:(0,d.A)("k-popup",a,"k-child-animation-container"),style:{transitionDelay:"0ms"}},n)));return null!==this.props.appendTo?o.createPortal(v,f):v}return null},Object.defineProperty(t.prototype,"animationDuration",{get:function(){var e=this.props.animate,t=0,n=0;return e&&(!0===e?t=n=300:(t=e.openDuration||0,n=e.closeDuration||0)),{enter:t,exit:n}},enumerable:!1,configurable:!0}),t.prototype.attachRepositionHandlers=function(e){var t=this;this.detachRepositionHandlers(),this._scrollableParents=G.scrollableParents(this.props.anchor||e),this._scrollableParents&&this._scrollableParents.map((function(e){return e.addEventListener("scroll",t.reposition)})),window.addEventListener("resize",this.reposition)},t.prototype.detachRepositionHandlers=function(){var e=this;this._scrollableParents&&(this._scrollableParents.map((function(t){return t.removeEventListener("scroll",e.reposition)})),this._scrollableParents=void 0),window.removeEventListener("resize",this.reposition)},t.prototype.reposition=function(){this.setState({current:te.reposition,previous:this.state.current})},t.propTypes={anchor:function(e){var t=e.anchor;return t&&"number"!=typeof t.nodeType?new Error("Invalid prop `anchor` supplied to `Kendo React Popup`. Validation failed."):null},appendTo:function(e){var t=e.appendTo;return t&&"number"!=typeof t.nodeType?new Error("Invalid prop `appendTo` supplied to `Kendo React Popup`. Validation failed."):null},className:i.oneOfType([i.string,i.arrayOf(i.string),i.object]),id:i.string,popupClass:i.oneOfType([i.string,i.arrayOf(i.string),i.object]),collision:i.shape({horizontal:i.oneOf([y,b,k]),vertical:i.oneOf([y,b,k])}),anchorAlign:i.shape({horizontal:i.oneOf([m,f,g]),vertical:i.oneOf([v,f,p])}),popupAlign:i.shape({horizontal:i.oneOf([m,f,g]),vertical:i.oneOf([v,f,p])}),offset:i.shape({left:i.number,top:i.number}),children:i.oneOfType([i.element,i.node]),show:i.bool,animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),margin:i.shape({horizontal:i.number,vertical:i.number}),positionMode:i.oneOf(["fixed","absolute"]),scale:i.number,style:i.object,onClose:i.func,onPosition:i.func,onOpen:i.func},t.defaultProps={collision:{horizontal:y,vertical:b},anchorAlign:{horizontal:m,vertical:p},popupAlign:{horizontal:m,vertical:v},offset:ne,animate:!0,show:!1,margin:{horizontal:0,vertical:0},positionMode:"absolute"},t.contextType=u.$,t.displayName="PopupComponent",t}(r.Component),ie=function(){return ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ie.apply(this,arguments)},ae=r.createContext((function(e){return e})),se=r.forwardRef((function(e,t){var n=r.useContext(ae).call(void 0,e);return r.createElement(oe,ie({ref:t},n))}));se.displayName="Popup"},5362:(e,t,n)=>{n.r(t),n.d(t,{Popup:()=>r.G,PopupPropsContext:()=>r.v});var r=n(9222)},1779:(e,t,n)=>{n.d(t,{_:()=>i});var r=n(3899),o=n(9844),i=r.forwardRef((function(e,t){var n=r.useRef(null),i=r.useRef(null),a=r.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);r.useImperativeHandle(i,(function(){return{element:a()||null}})),r.useImperativeHandle(t,(function(){return i.current})),r.useImperativeHandle(e.childRef,(function(){return n.current}));var s=r.useCallback((function(t){e.onPress&&e.onPress({element:a(),target:i.current,event:t})}),[a,e.onPress]),l=r.useCallback((function(t){e.onRelease&&e.onRelease({element:a(),target:i.current,event:t})}),[a,e.onRelease]),c=r.useCallback((function(t){e.onDragStart&&e.onDragStart({element:a(),target:i.current,event:t})}),[e,a]),u=r.useCallback((function(t){e.onDrag&&e.onDrag({element:a(),target:i.current,event:t})}),[a,e.onDrag]),d=r.useCallback((function(t){e.onDragEnd&&e.onDragEnd({element:a(),target:i.current,event:t})}),[a,e.onDragEnd]);return(0,o.O)(n,{onPress:s,onRelease:l,onDragStart:c,onDrag:u,onDragEnd:d},{mouseOnly:e.mouseOnly,autoScroll:e.autoScroll,hint:e.hint,scrollContainer:e.scrollContainer}),e.children?r.cloneElement(r.Children.only(e.children),{ref:n}):null}));i.displayName="KendoReactDraggable"},3503:(e,t,n)=>{n.d(t,{O:()=>o});var r=function(){return"undefined"!=typeof document?document:{}},o=function(){function e(){this.scrollbar=0}return Object.defineProperty(e.prototype,"scrollbarWidth",{get:function(){var e=r();if(!this.scrollbar&&e&&e.createElement){var t=e.createElement("div");t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",t.innerHTML="&nbsp;",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!1,configurable:!0}),e}()},7827:(e,t,n)=>{n.d(t,{N:()=>r});var r=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)},8047:(e,t,n)=>{n.d(t,{A:()=>r});var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={},r=function(e){return"object"==typeof e?Object.keys(e).forEach((function(t){n[t]=e[t]})):n[e]=!0},o=function(e){return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?o(e):r(e)}))};return o(e),Object.keys(n).map((function(e){return n[e]&&e||null})).filter((function(e){return null!==e})).join(" ")}},8259:(e,t,n)=>{n.d(t,{$:()=>o,u:()=>i});var r=n(3899),o=r.createContext(0),i=function(){return r.useContext(o)};o.displayName="KendoReactZIndexContext"},2333:(e,t,n)=>{n.d(t,{Dg:()=>i,Gc:()=>a,Fg:()=>s,tk:()=>l});var r=n(3899),o=n(3228),i=r.createContext([void 0,o.Z]),a=r.createContext([void 0,o.Z]),s=r.createContext([[],o.Z,o.Z]),l=r.createContext([[],o.Z,o.Z])},5407:(e,t,n)=>{function r(e,t,n,r){if(e){var o={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(o,r))}}n.d(t,{N:()=>r})},4100:(e,t,n)=>{n.d(t,{E:()=>o});var r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function o(e){var t=[];return e.replace(r,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}},9124:(e,t,n)=>{n.d(t,{n:()=>r});var r=function(e){if(e){if((e instanceof HTMLInputElement||-1!==e.tabIndex)&&e.focus)return void e.focus();var t=e.querySelector('input, [tabindex]:not([tabindex="-1"])');t&&t.focus&&t.focus()}}},4703:(e,t,n)=>{n.d(t,{p:()=>r});var r=function(e,t,n){var r="string"==typeof e?parseInt(e,void 0):e;if(NaN!==r)return void 0!==r?r:t?n?void 0:-1:0}},9659:(e,t,n)=>{n.d(t,{Y:()=>i});var r=n(4100),o={};function i(e){if(o[e])return o[e];var t=(0,r.E)(e);return o[e]=function(e){for(var n=e,r=0;r<t.length&&n;r++)n=n[t[r]];return n},o[e]}o.undefined=function(){}},3198:(e,t,n)=>{n.d(t,{M:()=>r});var r=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n}},848:(e,t,n)=>{n.d(t,{Y:()=>a,u:()=>s});var r=n(3899),o=n(9656),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=function(){return r.createContext((function(e){return e}))},s=function(e,t){return r.forwardRef((function(n,a){var s=(0,o.Y)(e,n);return r.createElement(t,i({},s,{ref:a}))}))}},6059:(e,t,n)=>{n.d(t,{U:()=>i});var r=n(3899),o=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function i(e){var t=e.onFocus,n=e.onBlur,i=e.onSyncFocus,a=e.onSyncBlur,s=r.useRef(!1),l=r.useRef(0),c=r.useCallback((function(e){clearTimeout(l.current),l.current=window.setTimeout((function(){return e()}))}),[l]),u=r.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];clearTimeout(l.current),i&&i.call(void 0,e[0]),s.current||(s.current=!0,t&&t.call.apply(t,o([void 0],e,!1)))}),[s,t,i]),d=r.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a&&a.call(void 0,e[0]),c((function(){s.current&&n&&(s.current=!1,n.call.apply(n,o([void 0],e,!1)))}))}),[s,c,n,a]);return r.useEffect((function(){return function(){clearTimeout(l.current)}}),[]),{onFocus:u,onBlur:d}}},8199:(e,t,n)=>{n.d(t,{n:()=>o});var r=n(3899);function o(e,t,n){var o=r.useState(t),i=o[0],a=o[1];return r.useEffect((function(){if(!i&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&a(t)}}),n),i}},9844:(e,t,n)=>{n.d(t,{O:()=>g});var r,o=n(3899),i=function(){var e=window&&window.navigator.userAgent;if(!e)return!1;var t=!1,n=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var o in r)if(r.hasOwnProperty(o)&&(n=e.match(r[o]))){(t={})[o]=!0,t[n[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,t.version=parseInt(document.DOCUMENT_NODE||n[2],10);break}return t},a=function(e){return e&&e.ownerDocument||window.document},s=function(e){var t=i(),n=a(e);return t.edge||t.safari?n.body:n.documentElement},l=function(e){if(e&&e.className&&"string"==typeof e.className&&e.className.indexOf("k-auto-scrollable")>-1)return!0;var t=window.getComputedStyle(e,"overflow").overflow;return t.indexOf("auto")>-1||t.indexOf("scroll")>-1},c=function(e){var t=s(e);if(!e||e===document.body||e===document.documentElement)return t;for(var n=e;n&&n!==document.body&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&n.nodeType!==Node.DOCUMENT_NODE&&!l(n);)n=n.parentNode;return!n||n!==document.body&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?n:t};!function(e){e.POINTER_DOWN="pointerdown",e.POINTER_MOVE="pointermove",e.POINTER_UP="pointerup",e.POINTER_CANCEL="pointercancel",e.MOUSE_DOWN="mousedown",e.MOUSE_MOVE="mousemove",e.MOUSE_UP="mouseup",e.CONTEXT_MENU="contextmenu",e.TOUCH_START="touchstart",e.TOUCH_MOVE="touchmove",e.TOUCH_END="touchend",e.TOUCH_CANCEL="touchcancel",e.SCROLL="scroll",e.START="KENDO_DRAG_AND_DROP_START",e.MOVE="KENDO_DRAG_AND_DROP_MOVE",e.END="KENDO_DRAG_AND_DROP_END",e.CANCEL="KENDO_DRAG_AND_DROP_CANCEL"}(r||(r={}));var u=function(){},d=function(e,t,n){void 0===n&&(n={});var o,i,l,d,p,f=n.onIsPressedChange,h=void 0===f?u:f,m=n.onIsScrollingChange,g=void 0===m?u:m,v=n.onVelocityChange,y=void 0===v?u:v,b=n.onOffsetChange,k=void 0===b?u:b,w=n.onPageOffsetChange,C=void 0===w?u:w,x=n.onClientOffsetChange,O=void 0===x?u:x,S=n.onScrollOffsetChange,E=void 0===S?u:S,I=n.onInitialScrollOffsetChange,N=void 0===I?u:I,T=t.payload,M=T.element,D=T.hint,R=e.autoScrollDirection,P=e.scrollableParent,_=function(e,t){return function(e){return/^touch/.test(e.type)}(e)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,offsetX:t.offset.x,offsetY:t.offset.y,type:e.type,originalEvent:e,isTouch:!0,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:function(e){return/^(scroll)/.test(e.type)}(e)?{pageX:t.pageOffset.x,pageY:t.pageOffset.y,clientX:t.clientOffset.x,clientY:t.clientOffset.y,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,offsetX:t.offset.x,offsetY:t.offset.y,type:e.type,originalEvent:e,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,originalEvent:e}}(t.event,e);switch(_.type){case r.POINTER_DOWN:if(_.type===r.POINTER_DOWN&&(!_.originalEvent.isPrimary||0!==_.originalEvent.button))break;case r.MOUSE_DOWN:if(_.type===r.MOUSE_DOWN&&_.originalEvent.which&&_.originalEvent.which>1||e.ignoreMouse)break;case r.TOUCH_START:if(_.type===r.TOUCH_START&&1!==_.originalEvent.touches.length)break;case r.START:var A=P||c(t.payload.element);N(A instanceof Window?{x:A.scrollX,y:A.scrollY}:{x:A.scrollLeft,y:A.scrollTop}),O({x:_.clientX,y:_.clientY}),C({x:_.pageX,y:_.pageY}),k({x:_.offsetX,y:_.offsetY}),h(!0),T.onPress&&T.onPress(_);break;case r.SCROLL:if(_.type===r.SCROLL&&!e.pressed)break;var j=P||c(M),F=j instanceof Window?{x:j.scrollX,y:j.scrollY}:{x:j.scrollLeft,y:j.scrollTop};_.scrollX=F.x-e.initialScrollOffset.x,_.scrollY=F.y-e.initialScrollOffset.y,E({x:_.scrollX,y:_.scrollY});case r.POINTER_MOVE:if(_.type===r.POINTER_MOVE&&!_.originalEvent.isPrimary)break;case r.MOUSE_MOVE:case r.TOUCH_MOVE:if(_.type===r.TOUCH_MOVE&&1!==_.originalEvent.touches.length)break;case r.MOVE:if(e.pressed){if(e.autoScroll&&"scroll"!==_.originalEvent.type&&M){var z=a(M),L=P||c(z.elementFromPoint(_.clientX,_.clientY)),B=(o=_.clientX,i=_.clientY,l=function(e,t){var n=s(e);if(e===n)return{top:n.scrollTop,left:n.scrollLeft,bottom:n.scrollTop+t.innerHeight,right:n.scrollLeft+t.innerWidth};var r=e.getBoundingClientRect();return{bottom:r.top+r.height,right:r.left+r.width,left:r.left,top:r.top}}(L,function(e){var t=a(e);return t&&t.defaultView||window}(M)),d={x:0,y:0},p=50,o-l.left<p?d.x=-(p-(o-l.left)):l.right-o<p&&(d.x=p-(l.right-o)),i-l.top<p?d.y=-(p-(i-l.top)):l.bottom-i<p&&(d.y=p-(l.bottom-i)),d);y({x:R&&!1===R.horizontal?0:B.x,y:R&&!1===R.vertical?0:B.y}),g(0!==B.y||0!==B.x)}!e.drag&&T.onDragStart&&T.onDragStart(_),T.onDrag&&T.onDrag(_);var V=function(e,t){var n=0,r=null;return t.forEach((function(t){if(t&&e){var o=function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=Math.max(r.top,n.top),i=Math.max(r.left,n.left),a=Math.min(r.left+r.width,n.left+n.width),s=Math.min(r.top+r.height,n.top+n.height),l=a-i,c=s-o;if(i<a&&o<s){var u=r.width*r.height,d=n.width*n.height,p=l*c;return Number((p/(u+d-p)).toFixed(4))}return 0}(e,t);o>n&&(n=o,r=t)}})),r}(D||M,e.drops.map((function(e){return e&&e.element})).filter((function(e){return e!==(D||M)}))),H=e.drops.find((function(e){return e.element===V}));H&&V&&function(e,t,n){var r=n.getBoundingClientRect();return r.top<=t&&r.left<=e&&t<=r.bottom&&e<=r.right}(_.clientX,_.clientY,P||c(V))&&V!==M?(e.drop&&e.drop.element)!==V?(e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(_),H.onDragEnter&&H.onDragEnter(_)):H.onDragOver&&H.onDragOver(_):e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(_)}O({x:_.clientX,y:_.clientY}),C({x:_.pageX,y:_.pageY});break;case r.POINTER_UP:if(_.type===r.POINTER_UP&&!_.originalEvent.isPrimary)break;case r.MOUSE_UP:case r.TOUCH_END:if(_.type===r.TOUCH_END&&1!==_.originalEvent.touches.length)break;case r.END:h(!1),g(!1),E({x:0,y:0}),T.onRelease&&T.onRelease(_),e.drop&&e.drop.onDrop&&e.drop.onDrop(_),T.onDragEnd&&T.onDragEnd(_);break;case r.POINTER_CANCEL:case r.CONTEXT_MENU:case r.TOUCH_CANCEL:case r.CANCEL:h(!1),g(!1),E({x:0,y:0}),T.onDragEnd&&T.onDragEnd(_),e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(_)}},p=function(e,t){if(e){var n,r;e===s(e)?(n=document.body.scrollHeight>window.innerHeight,r=document.body.scrollWidth>window.innerWidth):(n=e.offsetHeight<=e.scrollHeight,r=e.offsetWidth<=e.scrollWidth);var o=e.scrollTop+t.y,i=n&&o>0&&o<e.scrollHeight,a=e.scrollLeft+t.x,l=r&&a>0&&a<e.scrollWidth;i?e.scrollTop+=t.y:n&&o<0&&(e.scrollTop=0),l?e.scrollLeft+=t.x:r&&a<0&&(e.scrollLeft=0)}},f=n(3228),h=n(4912),m=n(2333);function g(e,t,n){void 0===n&&(n={});var r=t.onPress,i=void 0===r?f.Z:r,a=t.onRelease,s=void 0===a?f.Z:a,l=t.onDragStart,u=void 0===l?f.Z:l,g=t.onDrag,v=void 0===g?f.Z:g,y=t.onDragEnd,b=void 0===y?f.Z:y,k=n.hint,w=void 0===k?null:k,C=n.mouseOnly,x=void 0!==C&&C,O=n.autoScroll,S=void 0===O||O,E=n.scrollContainer,I=void 0===E?null:E,N=o.useState(!1),T=N[0],M=N[1],D=o.useState(!1),R=D[0],P=D[1],_=(0,h.W)(m.Gc)[0],A=(0,h.W)(m.Dg),j=A[0],F=A[1],z=o.useContext(m.tk)[0],L=o.useContext(m.Fg),B=L[0],V=L[1],H=L[2],K=o.useRef({x:0,y:0}),W=o.useRef(),$=o.useRef(!1),q=o.useRef(),U=o.useRef(null),G=o.useRef(!1),Y=o.useRef({x:0,y:0}),X=o.useRef({x:0,y:0}),J=o.useRef({x:0,y:0}),Z=o.useRef({x:0,y:0}),Q=o.useRef({x:0,y:0}),ee=o.useRef({x:0,y:0}),te=Boolean("undefined"!=typeof window&&window.PointerEvent),ne=!x&&te,re=o.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),oe=o.useCallback((function(){return w&&w.current&&w.current.element?w.current.element:w?w.current:null}),[w]),ie=o.useCallback((function(){return I&&I.current&&I.current.element?I.current.element:I?I.current:null}),[I]),ae=o.useCallback((function(){return"object"==typeof S&&S.boundaryElementRef&&S.boundaryElementRef.current&&S.boundaryElementRef.current.element?S.boundaryElementRef.current.element:"object"==typeof S&&S.boundaryElementRef&&S.boundaryElementRef.current?S.boundaryElementRef.current:null}),[S]),se=o.useRef(null);o.useImperativeHandle(se,(function(){return{element:re(),hint:oe(),onPress:ke,onDragStart:Ce,onDrag:xe,onDragEnd:Oe,onRelease:we,data:e.current}}));var le=o.useCallback((function(){var e=re();return e&&e.ownerDocument||document}),[re]),ce=o.useCallback((function(){var e=le();return e&&e.defaultView||window}),[le]),ue=o.useCallback((function(){return{drag:j?j.current:null,drop:_?_.current:null,drags:B.map((function(e){return e.current})),drops:z.map((function(e){return e.current})),pressed:T,ignoreMouse:$.current,scrollOffset:Q.current,offset:Y.current,pageOffset:X.current,initialScrollOffset:ee.current,clientOffset:J.current,initialClientOffset:Z.current,velocity:K.current,autoScroll:Boolean("object"==typeof S?!1!==S.enabled:S),scrollableParent:ae(),autoScrollDirection:"object"==typeof S?S.direction:{horizontal:!0,vertical:!0},isScrolling:R}}),[j,_,B,z,T,S,ae,R]),de=o.useCallback((function(e){M(e)}),[]),pe=o.useCallback((function(e){P(e)}),[]),fe=o.useCallback((function(e){K.current=e}),[]),he=o.useCallback((function(e){Y.current=e}),[]),me=o.useCallback((function(e){J.current=e}),[]),ge=o.useCallback((function(e){X.current=e}),[]),ve=o.useCallback((function(e){Z.current=e}),[]),ye=o.useCallback((function(e){Q.current=e}),[]),be=o.useCallback((function(e){ee.current=e}),[]),ke=o.useCallback((function(e){i(e)}),[i]),we=o.useCallback((function(e){s(e)}),[s]),Ce=o.useCallback((function(t){F(se,{target:e.current,event:t}),u(t)}),[F,e,u]),xe=o.useCallback((function(e){v(e)}),[v]),Oe=o.useCallback((function(t){G.current||(F(null,{target:e.current,event:t}),b(t))}),[b,F,e]),Se=o.useCallback((function(e){d(ue(),{event:e,payload:se.current},{onVelocityChange:fe,onOffsetChange:he,onClientOffsetChange:me,onPageOffsetChange:ge,onInitialClientOffsetChange:ve,onScrollOffsetChange:ye,onInitialScrollOffsetChange:be,onIsPressedChange:de,onIsScrollingChange:pe})}),[ue,fe,he,ge,me,ve,be,de,ye,pe]),Ee=o.useCallback((function(e){Se(e)}),[Se]),Ie=o.useCallback((function(e){Se(e)}),[Se]),Ne=o.useCallback((function(e){Se(e)}),[Se]),Te=o.useCallback((function(e){Se(e)}),[Se]),Me=o.useCallback((function(e){Se(e)}),[Se]),De=o.useCallback((function(e){Se(e)}),[Se]),Re=o.useCallback((function(e){Se(e)}),[Se]),Pe=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),_e=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),Ae=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),je=o.useCallback((function(e){if(0===e.touches.length&&1===e.changedTouches.length){var t=ce();$.current=!0,q.current=t.setTimeout((function(){$.current=!1}),2e3)}Se(e)}),[Se,ce]),Fe=o.useCallback((function(e){Se(e)}),[Se]),ze=o.useCallback((function(){var e=re();if(e){var t=e.style.touchAction;return e.style.touchAction="none",function(){e.style.touchAction=t}}}),[re]),Le=o.useCallback((function(){return V(se),function(){H(se)}}),[H,V]);o.useEffect((function(){var e=ce();if(R){var t=ie()||c(document.elementFromPoint(J.current.x,J.current.y));e.clearInterval(W.current),W.current=e.setInterval((function(){p(t,{x:K.current.x,y:K.current.y})}),50)}return function(){e.clearInterval(W.current)}}),[re,ie,ce,R]),o.useEffect(ze,[ze]),o.useEffect((function(){var e=ce(),t=re(),n=le();return ne?(t&&(U.current=c(t),U.current&&U.current.addEventListener("scroll",Fe,{passive:!0}),t.addEventListener("pointerdown",Ee,{passive:!0})),T&&(n.addEventListener("pointermove",Ie),n.addEventListener("pointerup",Te,!0),n.addEventListener("contextmenu",Pe),n.addEventListener("pointercancel",Ne,{passive:!0}))):(e.addEventListener("touchmove",f.Z,{capture:!1,passive:!1}),t&&(t.addEventListener("mousedown",Me,{passive:!0}),x||(t.addEventListener("touchstart",_e,{passive:!0}),T&&(t.addEventListener("touchmove",Ae,{passive:!0}),t.addEventListener("touchend",je,{passive:!0})))),T&&(n.addEventListener("mousemove",De,{passive:!0}),n.addEventListener("mouseup",Re,{passive:!0}))),function(){U.current&&U.current.removeEventListener("scroll",Fe),t&&(t.removeEventListener("pointerdown",Ee),t.removeEventListener("mousedown",Me),t.removeEventListener("touchstart",_e),t.removeEventListener("touchmove",Ae),t.removeEventListener("touchend",je)),n.removeEventListener("pointermove",Ie),n.removeEventListener("pointerup",Te,!0),n.removeEventListener("contextmenu",Pe),n.removeEventListener("pointercancel",Ne),n.removeEventListener("mousemove",De),n.removeEventListener("mouseup",Re),e.removeEventListener("touchmove",f.Z),e.clearTimeout(q.current)}}),[T,ce,re,le,x,ne,Pe,Me,De,Re,Ne,Ee,Ie,Te,je,Ae,_e,Fe]),o.useEffect((function(){return function(){G.current=!0}}),[]),o.useLayoutEffect(Le,[Le])}},4912:(e,t,n)=>{n.d(t,{W:()=>o});var r=n(3899),o=function(e,t){var n=r.useContext(e),o=n[0],i=n[1],a=r.useState(t),s=a[0],l=a[1];return[void 0!==o?o:s,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];void 0!==o?i.apply(void 0,e):l(e[0])}]}},3322:(e,t,n)=>{n.d(t,{i:()=>o});var r=n(3899),o=function(e,t,n){void 0===n&&(n={});var o=r.useCallback((function(r){n.onMouseDown&&n.onMouseDown.call(void 0,r),e.onMouseDown&&e.onMouseDown.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseDown,e.onMouseDown,t]),i=r.useCallback((function(r){n.onMouseUp&&n.onMouseUp.call(void 0,r),e.onMouseUp&&e.onMouseUp.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseUp,e.onMouseUp,t]);return{onClick:r.useCallback((function(r){n.onClick&&n.onClick.call(void 0,r),e.onClick&&e.onClick.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onClick,e.onClick,t]),onMouseUp:i,onMouseDown:o,onDoubleClick:r.useCallback((function(r){n.onDoubleClick&&n.onDoubleClick.call(void 0,r),e.onDoubleClick&&e.onDoubleClick.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onDoubleClick,e.onDoubleClick,t]),onMouseEnter:r.useCallback((function(r){n.onMouseEnter&&n.onMouseEnter.call(void 0,r),e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseEnter,e.onMouseEnter,t]),onMouseLeave:r.useCallback((function(r){n.onMouseLeave&&n.onMouseLeave.call(void 0,r),e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseLeave,e.onMouseLeave,t]),onMouseMove:r.useCallback((function(r){n.onMouseMove&&n.onMouseMove.call(void 0,r),e.onMouseMove&&e.onMouseMove.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseMove,e.onMouseMove,t]),onMouseOut:r.useCallback((function(r){n.onMouseOut&&n.onMouseOut.call(void 0,r),e.onMouseOut&&e.onMouseOut.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseOut,e.onMouseOut,t]),onMouseOver:r.useCallback((function(r){n.onMouseOver&&n.onMouseOver.call(void 0,r),e.onMouseOver&&e.onMouseOver.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseOver,e.onMouseOver,t])}}},9656:(e,t,n)=>{n.d(t,{Y:()=>o});var r=n(3899),o=function(e,t){return r.useContext(e)(t)}},1573:(e,t,n)=>{n.d(t,{V:()=>o});var r=n(3899);function o(e,t,n){var o=r.useState(t),i=o[0],a=o[1];return r.useEffect((function(){if(!i&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&a(t)}}),n),i}},3493:(e,t,n)=>{n.d(t,{R:()=>r});var r={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46}},3808:(e,t,n)=>{n.r(t),n.d(t,{AsyncFocusBlur:()=>P,BrowserSupportService:()=>o.O,COLLECTION_ACTION:()=>E,DragAndDrop:()=>de,Draggable:()=>pe._,Droppable:()=>me,FormComponent:()=>m,Icon:()=>q,Keys:()=>b.R,SvgIcon:()=>Y,Typography:()=>se,ZIndexContext:()=>r.$,canUseDOM:()=>i.N,canUseRef:()=>a,classNames:()=>s.A,clone:()=>u,cloneArray:()=>f,cloneDate:()=>c,cloneObject:()=>d,cloneValue:()=>p,createPropsContext:()=>_.Y,dispatchEvent:()=>M.N,extendDataItem:()=>I.u5,focusFirstFocusableChild:()=>h.n,getItemPath:()=>I.ym,getScrollbarWidth:()=>w.n,getTabIndex:()=>g.p,getter:()=>v.Y,guid:()=>y.M,hasRelativeStackingContext:()=>T,kendoThemeMaps:()=>ve.G,mapTree:()=>I.Gy,mapTreeItem:()=>I.eY,noop:()=>k.Z,setScrollbarWidth:()=>w.p,setter:()=>S,useAsyncFocusBlur:()=>D.U,useCollection:()=>B,useCustomComponent:()=>z,useDir:()=>A.n,useDocument:()=>V,useDraggable:()=>ge.O,useDroppable:()=>he,useMouse:()=>F.i,usePropsContext:()=>L.Y,useRtl:()=>j.V,useWindow:()=>H,useZIndexContext:()=>r.u,validatePackage:()=>N.s,withPropsContext:()=>_.u});var r=n(8259),o=n(3503),i=n(7827),a=function(e){return"string"!=typeof Comment&&(function(e){return Boolean("function"==typeof e&&!!e.prototype.isReactComponent)}(e)||function(e){return Boolean(e.$$typeof&&"function"==typeof e.render)}(e))},s=n(8047),l=n(3899),c=function(e){return e?new Date(e.getTime()):null};function u(e){var t={};return d(e,t),t}function d(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[n]=p(r,t[n])}}function p(e,t){if(Array.isArray(e))return f(e);if(e instanceof Date)return c(e);if(l.isValidElement(e))return l.cloneElement(e,e.props);if(e&&"object"==typeof e){var n=t||{};return d(e,n),n}return e}function f(e){return e.map((function(e){return p(e,void 0)}))}var h=n(9124),m=function(){},g=n(4703),v=n(9659),y=n(3198),b=n(3493),k=n(3228),w=n(2665),C=n(4100),x={undefined:function(e){return e}},O=function(e,t){return t&&t.arrays&&!isNaN(Number(e))?[]:{}};function S(e){if(x[e])return x[e];var t=(0,C.E)(e);return x[e]=function(e,n,r){for(var o=e,i=t.length-1,a=0;a<i&&o;a++)o=o[t[a]]=o[t[a]]||O(t[a+1],r);o[t[i]]=n},x[e]}var E,I=n(8006),N=n(4006),T=function(e){if(!i.N)return!1;var t=e?e.ownerDocument:document;if(!t||!t.body)return!1;var n=t.createElement("div");n.style.transform="matrix(10, 0, 0, 10, 0, 0)";var r=t.createElement("div");r.appendChild(t.createTextNode("child")),r.style.position="fixed",r.style.top="10px",n.appendChild(r),t.body.appendChild(n);var o=10!==r.getBoundingClientRect().top;return t.body.removeChild(n),o},M=n(5407),D=n(6059),R=function(){return R=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},R.apply(this,arguments)},P=function(e){var t=e.children,n=e.onFocus,r=e.onBlur,o=e.onSyncFocus,i=e.onSyncBlur,a=(0,D.U)({onFocus:n,onBlur:r,onSyncFocus:o,onSyncBlur:i});return l.createElement(l.Fragment,null,t.call(void 0,R({},a)))},_=n(848),A=n(8199),j=n(1573),F=n(3322),z=function(e){return[e,{}]},L=n(9656);!function(e){e[e.add=0]="add",e[e.remove=1]="remove"}(E||(E={}));var B=function(e){void 0===e&&(e=[]);var t=l.useRef(e),n=l.useCallback((function(e){switch(e.type){case E.add:t.current.push(e.item);break;case E.remove:var n=t.current.indexOf(e.item);t.current.splice(n,1)}}),[]);return[t.current,n]},V=function(e){var t=l.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]);return l.useCallback((function(){var e=t();return e&&e.ownerDocument||document}),[t])},H=function(e){var t=V(e);return l.useCallback((function(){var e=t();return e&&e.defaultView||window}),[t])},K=n(189),W={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},$=function(){return $=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},$.apply(this,arguments)},q=l.forwardRef((function(e,t){var n=e.className,r=e.name,o=e.themeColor,i=e.size,a=e.flip,c=e.style,u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["className","name","themeColor","size","flip","style"]),d=l.useRef(null),p=l.useRef(null);l.useImperativeHandle(d,(function(){return{element:p.current}})),l.useImperativeHandle(t,(function(){return d.current}));var f=l.useMemo((function(){return o||U.themeColor}),[o]),h=l.useMemo((function(){return i||U.size}),[i]),m=l.useMemo((function(){return a||U.flip}),[a]),g=l.useMemo((function(){return(0,s.A)("k-icon","k-i-"+r,"k-color-"+f,{"k-flip-h":"horizontal"===m||"both"===m,"k-flip-v":"vertical"===m||"both"===m},W[h],n)}),[r,f,h,m,n]),v=(0,F.i)(e,d);return l.createElement("span",$({ref:p},u,v,{className:g,style:c,role:"presentation"}))}));q.propTypes={style:K.object,classNames:K.string,name:K.string,themeColor:K.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:K.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:K.oneOf(["default","horizontal","vertical","both"])};var U={size:"default",themeColor:"inherit",flip:"default"};q.displayName="KendoIcon";var G=function(){return G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},G.apply(this,arguments)},Y=l.forwardRef((function(e,t){var n=e.children,r=e.className,o=e.svgClassName,i=e.icon,a=e.flip,c=e.size,u=e.style,d=e.svgStyle,p=e.themeColor,f=e.viewBox,h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),m=l.useRef(null);l.useImperativeHandle(t,(function(){return{element:m.current}}));var g=l.useMemo((function(){return i?i.name:X.icon}),[i]),v=l.useMemo((function(){return p||X.themeColor}),[p]),y=l.useMemo((function(){return c||X.size}),[c]),b=l.useMemo((function(){return a||X.flip}),[a]),k=l.useMemo((function(){return f||X.viewBox}),[f]),w=l.useMemo((function(){return(0,s.A)("k-svg-icon","k-color-"+v,"k-svg-i-"+g,{"k-flip-h":"horizontal"===b||"both"===b,"k-flip-v":"vertical"===b||"both"===b},W[y],r)}),[g,v,y,b,r]),C=l.useMemo((function(){return e.width&&e.height?G({width:e.width,height:e.height},u):e.width?G({width:e.width,height:e.width},u):e.height?G({width:e.height,height:e.height},u):G({},u)}),[e.width,e.height,u]);return l.createElement("span",{className:w,style:C,ref:m},l.createElement("svg",G({className:o,style:d,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:i?i.viewBox:k,dangerouslySetInnerHTML:i?{__html:i.content}:void 0},h),i?void 0:n))}));Y.propTypes={style:K.object,classNames:K.string,children:K.any,icon:K.object,themeColor:K.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:K.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:K.oneOf(["default","horizontal","vertical","both"])};var X={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};Y.displayName="KendoSvgIcon";var J={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},Z={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},Q={xsmall:"k-m-xs",small:"k-m-sm",medium:"k-m-md",large:"k-m-lg",xlarge:"k-m-xl",thin:"k-m-thin",hair:"k-m-hair"},ee={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},te={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},ne={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},re={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},oe={inherit:"k-color-inherit",primary:"k-color-primary",secondary:"k-color-secondary",tertiary:"k-color-tertiary",info:"k-color-info",success:"k-color-success",warning:"k-color-warning",error:"k-color-error",dark:"k-color-dark",light:"k-color-light",inverse:"k-color-inverse"},ie=function(){return ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ie.apply(this,arguments)},ae=function(e){var t=l.forwardRef((function(t,n){var r=t.id,o=t.style,i=t.className,a=t.fontSize,s=t.fontWeight,c=t.textAlign,u=t.textTransform,d=t.themeColor,p=t.margin,f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["id","style","className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),h=l.useRef(null),m=l.useRef(null);l.useImperativeHandle(h,(function(){return{element:m.current,props:t}})),l.useImperativeHandle(n,(function(){return h.current}));var g=e;return l.createElement(g,ie({id:r,ref:m,className:["k-".concat("p"===e?"paragraph":e),J[a],Z[s],ne[c],re[u],oe[d],function(){if(void 0!==p){if("string"==typeof p)return[Q[p]];if("number"==typeof p&&p>=0&&p<=24)return["k-m-".concat(p)];if("object"==typeof p){var e=[];return Object.keys(p).forEach((function(t){var n,r,o;null!==p[t]&&void 0!==p[t]&&e.push((n=t,o="string"==typeof(r=p[t])?ee[r]:r,"".concat(te[n]).concat(o)))})),e.join(" ")}}}(),i].filter((function(e){return void 0!==e})).join(" "),style:o},f),t.children)}));return t.propTypes={style:K.object,className:K.string,fontSize:K.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:K.oneOf(["light","normal","bold"]),margin:K.oneOfType([K.number,K.object,K.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:K.oneOf(["left","right","center","justify"]),textTransform:K.oneOf(["lowercase","uppercase","capitalize"]),themeColor:K.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},t.displayName="KendoReactTypography".concat(e.toUpperCase()),t},se={h1:ae("h1"),h2:ae("h2"),h3:ae("h3"),h4:ae("h4"),h5:ae("h5"),h6:ae("h6"),p:ae("p"),code:ae("code"),pre:ae("pre")},le=function(){return le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},le.apply(this,arguments)},ce=function(e,t,n){var r=l.useState(t||e),o=r[0],i=r[1];return[void 0!==t?t:o,l.useCallback((function(e,t){i(e),n&&n.call(void 0,le(le({},t),{value:e}))}),[n,i])]},ue=n(2333),de=function(e){var t=ce(null,void 0),n=t[0],r=t[1],o=ce(null,void 0),i=o[0],a=o[1],s=B([]),c=s[0],u=s[1],d=B([]),p=d[0],f=d[1];return l.createElement(ue.Dg.Provider,{value:[n,r]},l.createElement(ue.Gc.Provider,{value:[i,a]},l.createElement(ue.Fg.Provider,{value:[c,function(e){u({type:E.add,item:e})},function(e){u({type:E.remove,item:e})}]},l.createElement(ue.tk.Provider,{value:[p,function(e){f({type:E.add,item:e})},function(e){f({type:E.remove,item:e})}]},e.children))))};de.displayName="KendoReactDragAndDrop";var pe=n(1779),fe=n(4912);function he(e,t){void 0===t&&(t={onDragEnter:k.Z,onDragOver:k.Z,onDragLeave:k.Z,onDrop:k.Z});var n=t.onDragEnter,r=void 0===n?k.Z:n,o=t.onDragOver,i=void 0===o?k.Z:o,a=t.onDragLeave,s=void 0===a?k.Z:a,c=t.onDrop,u=void 0===c?k.Z:c,d=(0,fe.W)(ue.Gc)[1],p=l.useContext(ue.tk),f=p[1],h=p[2],m=l.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),g=l.useRef(null);l.useImperativeHandle(g,(function(){return{element:m(),onDragEnter:v,onDragOver:y,onDragLeave:b,onDrop:w,data:e.current}}));var v=l.useCallback((function(t){d(g,{target:e.current,event:t}),r(t)}),[d,e,r]),y=l.useCallback((function(e){i(e)}),[i]),b=l.useCallback((function(t){d(null,{target:e.current,event:t}),s(t)}),[d,e,s]),w=l.useCallback((function(t){d(null,{target:e.current,event:t}),u(t)}),[d,e,u]),C=l.useCallback((function(){return f(g),function(){h(g)}}),[h,f]);l.useLayoutEffect(C,[C])}var me=l.forwardRef((function(e,t){var n=l.useRef(null),r=l.useRef(null),o=l.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);l.useImperativeHandle(r,(function(){return{element:o()||void 0}})),l.useImperativeHandle(t,(function(){return r.current})),l.useImperativeHandle(e.childRef,(function(){return n.current}));var i=l.useCallback((function(t){e.onDragEnter&&e.onDragEnter({element:o(),target:r.current,event:t})}),[e.onDragEnter,o]),a=l.useCallback((function(t){e.onDragOver&&e.onDragOver({element:o(),target:r.current,event:t})}),[o,e.onDragOver]),s=l.useCallback((function(t){e.onDragLeave&&e.onDragLeave({element:o(),target:r.current,event:t})}),[e.onDragLeave,o]),c=l.useCallback((function(t){e.onDrop&&e.onDrop({element:o(),target:r.current,event:t})}),[e.onDrop,o]);return he(n,{onDragEnter:i,onDragOver:a,onDragLeave:s,onDrop:c}),e.children?l.cloneElement(l.Children.only(e.children),{ref:n}):null}));me.displayName="KendoReactDroppable";var ge=n(9844),ve=n(2697)},3228:(e,t,n)=>{n.d(t,{Z:()=>r});var r=function(){}},2665:(e,t,n)=>{n.d(t,{n:()=>i,p:()=>a});var r=n(3503),o=n(7827),i=function(){return!(!o.N||!document.body)&&(new r.O).scrollbarWidth},a=function(){if(!o.N||!document.body)return!1;var e=(new r.O).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width","".concat(e,"px"))}},2697:(e,t,n)=>{n.d(t,{G:()=>r});var r={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg"}}},8006:(e,t,n)=>{n.d(t,{Gy:()=>s,eY:()=>l,u5:()=>c,ym:()=>u});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function i(e,t,n){var i;return n?r(r({},e),((i={})[t]=n.length?o([],n,!0):void 0,i)):e&&e[t]?o([],e[t],!0):[]}function a(e,t,n){if(e[t]){var r=i(e,t).map((function(e){return a(e,t,n)}));return n(i(e,t,r))}return n(e)}var s=function(e,t,n){return o([],e.map((function(e){return a(e,t,n)})),!0)},l=function(e,t,n,r){for(var o=e,i=[],a=0;a<t.length;a++)o=o[t[a]],o=Array.isArray(o)?o:o[n],i.push(o);var s=i.length>1?i[i.length-2]:e,l=t[t.length-1],c=r(s[l]);s.splice(l,1,c)},c=function(e,t,n){var r;return Object.assign({},e,e[t]?((r={})[t]=e[t].slice(),r):{},n||{})},u=function(e,t,n){var r=[],i=o([],t,!0);if(i.length){var a=e[i.shift()||0];for(r.push(a);i.length&&n;)a=a[n][i.shift()||0],r.push(a)}return r}},4006:(e,t,n)=>{n.d(t,{s:()=>o});var r=n(9302);function o(e){if(void 0!==r)r.validatePackage(e);else{var t="License activation failed for ".concat(e.name,"\n");t+="The @progress/kendo-licensing script is not loaded.\n",t+="See ".concat(e.licensingDocsUrl," for more information.\n"),console.warn(t)}}},4407:e=>{e.exports=a},9302:e=>{e.exports=n},499:e=>{e.exports=o},189:e=>{e.exports=t},3899:t=>{t.exports=e},994:e=>{e.exports=r},3209:e=>{e.exports=s},6144:e=>{e.exports=i}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return l[e].call(n.exports,n,n.exports,u),n.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return(()=>{var e=d;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDialogs=e.EditorUtils=e.EditorToolsSettings=e.EditorTools=e.Editor=e.ProseMirror=void 0;var t=u(1801);Object.defineProperty(e,"Editor",{enumerable:!0,get:function(){return t.Editor}});var n=u(8671);Object.defineProperty(e,"EditorTools",{enumerable:!0,get:function(){return n.EditorTools}});var r=u(2804);Object.defineProperty(e,"EditorToolsSettings",{enumerable:!0,get:function(){return r.EditorToolsSettings}});var o=u(5538);Object.defineProperty(e,"EditorUtils",{enumerable:!0,get:function(){return o.EditorUtils}});var i=u(3695);Object.defineProperty(e,"EditorDialogs",{enumerable:!0,get:function(){return i.EditorDialogs}});var a=u(431);e.ProseMirror={Selection:a.Selection,SelectionRange:a.SelectionRange,TextSelection:a.TextSelection,NodeSelection:a.NodeSelection,AllSelection:a.AllSelection,EditorState:a.EditorState,Plugin:a.Plugin,PluginKey:a.PluginKey,Transaction:a.Transaction,Decoration:a.Decoration,DecorationSet:a.DecorationSet,EditorView:a.EditorView,Node:a.Node,ResolvedPos:a.ResolvedPos,NodeRange:a.NodeRange,Fragment:a.Fragment,Slice:a.Slice,ReplaceError:a.ReplaceError,Mark:a.Mark,Schema:a.Schema,NodeType:a.NodeType,MarkType:a.MarkType,ContentMatch:a.ContentMatch,DOMParser:a.DOMParser,DOMSerializer:a.DOMSerializer,Transform:a.Transform,Step:a.Step,StepResult:a.StepResult,joinPoint:a.joinPoint,canJoin:a.canJoin,canSplit:a.canSplit,insertPoint:a.insertPoint,dropPoint:a.dropPoint,liftTarget:a.liftTarget,findWrapping:a.findWrapping,StepMap:a.StepMap,MapResult:a.MapResult,Mapping:a.Mapping,AddMarkStep:a.AddMarkStep,RemoveMarkStep:a.RemoveMarkStep,ReplaceStep:a.ReplaceStep,ReplaceAroundStep:a.ReplaceAroundStep,replaceStep:a.replaceStep,deleteSelection:a.deleteSelection,joinBackward:a.joinBackward,selectNodeBackward:a.selectNodeBackward,joinForward:a.joinForward,selectNodeForward:a.selectNodeForward,joinUp:a.joinUp,joinDown:a.joinDown,lift:a.lift,newlineInCode:a.newlineInCode,exitCode:a.exitCode,createParagraphNear:a.createParagraphNear,liftEmptyBlock:a.liftEmptyBlock,splitBlock:a.splitBlock,splitBlockKeepMarks:a.splitBlockKeepMarks,selectParentNode:a.selectParentNode,selectAll:a.selectAll,wrapIn:a.wrapIn,setBlockType:a.setBlockType,toggleMark:a.toggleMark,autoJoin:a.autoJoin,chainCommands:a.chainCommands,pcBaseKeymap:a.pcBaseKeymap,macBaseKeymap:a.macBaseKeymap,baseKeymap:a.baseKeymap,history:a.history,undo:a.undo,redo:a.redo,undoDepth:a.undoDepth,redoDepth:a.redoDepth,InputRule:a.InputRule,inputRules:a.inputRules,undoInputRule:a.undoInputRule,emDash:a.emDash,ellipsis:a.ellipsis,openDoubleQuote:a.openDoubleQuote,closeDoubleQuote:a.closeDoubleQuote,openSingleQuote:a.openSingleQuote,closeSingleQuote:a.closeSingleQuote,smartQuotes:a.smartQuotes,wrappingInputRule:a.wrappingInputRule,textblockTypeInputRule:a.textblockTypeInputRule,keymap:a.keymap,keydownHandler:a.keydownHandler,orderedList:a.orderedList,bulletList:a.bulletList,listItem:a.listItem,addListNodes:a.addListNodes,wrapInList:a.wrapInList,splitListItem:a.splitListItem,liftListItem:a.liftListItem,sinkListItem:a.sinkListItem,dropCursor:a.dropCursor,gapCursor:a.gapCursor,tableEditing:a.tableEditing,fixTables:a.fixTables,fixTablesKey:a.fixTablesKey,cellAround:a.cellAround,isInTable:a.isInTable,selectionCell:a.selectionCell,moveCellForward:a.moveCellForward,inSameTable:a.inSameTable,findCell:a.findCell,colCount:a.colCount,nextCell:a.nextCell,removeColSpan:a.removeColSpan,addColSpan:a.addColSpan,columnIsHeader:a.columnIsHeader,tableNodes:a.tableNodes,tableNodeTypes:a.tableNodeTypes,CellSelection:a.CellSelection,TableMap:a.TableMap,tableEditingKey:a.tableEditingKey,columnResizing:a.columnResizing,columnResizingPluginKey:a.columnResizingPluginKey,updateColumnsOnResize:a.updateColumnsOnResize,selectedRect:a.selectedRect,addColumn:a.addColumn,addColumnBefore:a.addColumnBefore,addColumnAfter:a.addColumnAfter,deleteColumn:a.deleteColumn,rowIsHeader:a.rowIsHeader,addRow:a.addRow,addRowBefore:a.addRowBefore,addRowAfter:a.addRowAfter,deleteRow:a.deleteRow,mergeCells:a.mergeCells,splitCell:a.splitCell,splitCellWithType:a.splitCellWithType,setCellAttr:a.setCellAttr,toggleHeader:a.toggleHeader,toggleHeaderRow:a.toggleHeaderRow,toggleHeaderColumn:a.toggleHeaderColumn,toggleHeaderCell:a.toggleHeaderCell,goToNextCell:a.goToNextCell,deleteTable:a.deleteTable}})(),d})()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("react-dom"),require("@progress/kendo-react-intl"),require("react-transition-group"),require("@progress/kendo-drawing"),require("react-dom/server")):"function"==typeof define&&define.amd?define(["react","prop-types","@progress/kendo-licensing","react-dom","@progress/kendo-react-intl","react-transition-group","@progress/kendo-drawing","react-dom/server"],t):"object"==typeof exports?exports.KendoReactEditor=t(require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("react-dom"),require("@progress/kendo-react-intl"),require("react-transition-group"),require("@progress/kendo-drawing"),require("react-dom/server")):e.KendoReactEditor=t(e.React,e.PropTypes,e.KendoLicensing,e.ReactDOM,e.KendoReactIntl,e.ReactTransitionGroup,e.KendoDrawing,e.ReactDOMServer)}(self,(function(e,t,n,r,o,i,a,s){return(()=>{"use strict";var l={1801:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Editor=void 0;var s=n(3899),l=n(189),c=n(2888),u=n(3808),d=n(431),p=n(2346),f=n(3605),h=n(2804),m=n(3695),g=n(5538),v=n(580),y=n(1457),b=h.EditorToolsSettings.link,k=h.EditorToolsSettings.bold,w=h.EditorToolsSettings.italic,C=h.EditorToolsSettings.underline,x=n(3131),O=n(9302),S=n(7363),E=n(3364),I=n(499),N=function(e){function t(t){var n=e.call(this,t)||this;if(n.state={view:void 0,linkDialog:!1},n._element=null,n._contentElement=null,n.iframe=null,n.trOnChange=null,n.htmlOnChange=null,n.focus=function(){n.view&&n.view.focus()},n.renderDialog=function(e,t,r){return n.state[r]&&s.createElement(e,{view:n.view,settings:t,dir:n.props.dir,onClose:function(){var e;return n.setState(((e={})[r]=!1,e))}})},n.renderTool=function(e,t){var r=s.createElement(e,{view:n.view,dir:n.props.dir,key:t});return r.type===c.ToolbarSeparator?s.createElement(e,{key:t}):r},n.updateTools=function(e,t){n.setState({view:e})},n.filterTransaction=function(e,t){var r={target:n,transaction:e,state:t};return!1!==(n.props.onExecute&&n.props.onExecute.call(void 0,r))},n.onPasteHtml=function(e){if(n.props.onPasteHtml&&n.pasteEvent){var t={target:n,pastedHtml:e,nativeEvent:n.pasteEvent},r=n.props.onPasteHtml.call(void 0,t);if(n.pasteEvent=void 0,"string"==typeof r)return r}return e},n.dispatchTransaction=function(e){var t=e.docChanged;if(n.props.onChange&&t){n.trOnChange=e;var r=e.doc,o=e.doc.type.schema,i=n,a={target:i,value:r,get html(){return i.htmlOnChange=g.EditorUtils.getHtml({doc:r,schema:o}),i.htmlOnChange},transaction:e,schema:o};n.props.onChange.call(void 0,a)}!n.view||void 0!==n.props.value&&t||n.view.updateState(n.view.state.apply(e))},n.onFocus=function(e,t){if(n.props.onFocus){var r={target:n,nativeEvent:t};n.props.onFocus.call(void 0,r)}return!1},n.onBlur=function(e,t){if(n.props.onBlur){var r={target:n,nativeEvent:t};n.props.onBlur.call(void 0,r)}return!1},n.onPaste=function(e,t){return n.props.onPasteHtml&&(n.pasteEvent=t),!1},void 0!==O)O.validatePackage(S.packageMetadata);else{var r="License activation failed for ".concat(S.packageMetadata.name,"\n");r+="The @progress/kendo-licensing script is not loaded.\n",r+="See ".concat(S.packageMetadata.licensingDocsUrl," for more information.\n"),console.warn(r)}return n}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return null!==this.trOnChange?this.trOnChange.doc:void 0!==this.props.value?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentElement",{get:function(){return this._contentElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return this._view},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.iframe&&x.firefox||this.initialize()},t.prototype.componentDidUpdate=function(e){var t=this.props.value,n=this.view;void 0!==t&&n&&((0,y.updateEditorValue)(n,t,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)},t.prototype.componentWillUnmount=function(){this.view&&this.view.destroy(),this._view=void 0;var e=this.iframe&&this.iframe.contentWindow;if(e){this._contentElement&&this._contentElement.parentNode&&this._contentElement.parentNode.removeChild(this._contentElement);for(var t=e.document.head;t&&t.firstChild;)t.removeChild(t.firstChild)}},t.prototype.render=function(){var e=this,t=this.props,n=t.tools,r=void 0===n?[]:n,o=t.defaultEditMode,i=void 0===o?"iframe":o,a=t.preserveWhitespace,l=void 0===a?"full":a,d=t.style,p=t.className,f=(0,I.provideLocalizationService)(this);this.view&&(v.editorPropsKey.getState(this.view.state).preserveWhitespace=l);var h=this.props.contentStyle;void 0===h&&void 0===(d||{}).height&&(h={height:"300px"});var g=r.map((function(t,n){return Array.isArray(t)?s.createElement(c.ButtonGroup,{key:n},t.map(e.renderTool,n)):e.renderTool(t,n)}));return s.createElement("div",{ref:function(t){return e._element=t},className:(0,u.classNames)("k-widget k-editor",p,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:d},g.length>0&&s.createElement(c.Toolbar,{keyboardNavigation:this.props.keyboardNavigation},g),"iframe"===i?s.createElement("div",{className:"k-editor-content"},s.createElement("iframe",{onLoad:x.firefox?function(){e.initialize()}:void 0,ref:function(t){return e.iframe=t},frameBorder:"0",title:f.toLanguageString(E.keys.iframeTitle,E.messages[E.keys.iframeTitle]),style:h,className:"k-iframe"})):s.createElement("div",{style:h,className:"k-editor-content"},s.createElement("div",{ref:function(t){return e._contentElement=t},suppressContentEditableWarning:!0,role:"textbox","aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel})),this.renderDialog(m.EditorDialogs.InsertLinkDialog,b,"linkDialog"))},t.prototype.initialize=function(){var e=this,t=this.iframe&&this.iframe.contentWindow;if(t){var n=t.document;[f.defaultStyle,f.tablesStyles,"rtl"===this.props.dir?f.rtlStyles:void 0].forEach((function(e){if(e){var t=n.createElement("style");t.appendChild(n.createTextNode(e)),n.head.appendChild(t)}}));var r=n.createElement("meta");r.setAttribute("charset","utf-8"),n.head.appendChild(r),this._contentElement=n.createElement("div"),n.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content")}var o=this._contentElement;if(o){var s=this.props.preserveWhitespace,l=void 0===s?"full":s,u=[new d.Plugin({view:function(){return{update:e.updateTools}},key:new d.PluginKey("toolbar-tools-update-plugin")}),new d.Plugin({filterTransaction:this.filterTransaction,key:new d.PluginKey("onExecute-event-plugin")}),new d.Plugin({key:v.editorPropsKey,state:{init:function(){return{preserveWhitespace:l}},apply:function(e,t){return t}}}),(0,d.spacesFix)(),(0,d.caretColor)(),(0,d.history)(),(0,d.dropCursor)(),(0,d.gapCursor)(),(0,d.tableEditing)()],h=i(i({},g.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:k,italic:w,underline:C}})),{"Mod-k":function(){var t=e.state.linkDialog,n=e.view;if(n){var r=n.state,o=r.selection.empty,i=(0,d.getMark)(r,r.schema.marks[b.mark]);t||o&&!i||e.setState({linkDialog:!0})}return!t},"Alt-F10":function(){var t,n=null===(t=e.element)||void 0===t?void 0:t.querySelector(".k-toolbar");if(n){var r=n.querySelector(c.toolbarButtons.join(","));if(r)return r.focus(),!0}return!1}}),m=this.props,y=m.defaultContent,x=void 0===y?"":y,O=m.value,S=m.onMount,E=O&&"string"!=typeof O?O:g.EditorUtils.createDocument(new d.Schema({nodes:p.nodes,marks:p.marks}),O||x,{preserveWhitespace:l}),I={state:d.EditorState.create({plugins:a(a([],u,!0),[(0,d.keymap)(h),(0,d.keymap)(d.baseKeymap)],!1),doc:E}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste}},N={plugins:u,shortcuts:h,target:this,viewProps:I,dom:o},T=this._view=S&&S.call(void 0,N)||new d.EditorView({mount:o},I);this.setState({view:T})}},t.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},t}(s.Component);t.Editor=N,(0,I.registerForLocalization)(N)},3605:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.rtlStyles=t.tablesStyles=t.defaultStyle=void 0,t.defaultStyle='\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\n.k-editor-resize-wrap-element {\n display: inline-block;\n position: relative;\n}\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\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.ProseMirror.resize-cursor-vertical {\n cursor: sn-resize;\n cursor: row-resize;\n}\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',t.tablesStyles='\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 /* 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',t.rtlStyles="body { direction: rtl }"},2346:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.nodes=t.marks=void 0;var r=n(431);Object.defineProperty(t,"marks",{enumerable:!0,get:function(){return r.marks}}),Object.defineProperty(t,"nodes",{enumerable:!0,get:function(){return r.nodes}})},4394:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getShortcuts=void 0;var o=n(431),i=n(2804),a=i.EditorToolsSettings.bold,s=i.EditorToolsSettings.underline,l=i.EditorToolsSettings.italic,c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.getShortcuts=function(e){var t=(0,o.chainCommands)(o.exitCode,(function(t,n){var r=e&&e.types&&e.types.hardBreak||"hard_break",o=t.schema.nodes[r];return n&&n(t.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0})),n=e&&e.types&&e.types.listItem||"list_item",i=e&&e.toolsSettings||{};return r(r(r(r({"Mod-b":function(e,t){return(0,o.toggleInlineFormat)(i.bold||a)(e,t)},"Mod-i":function(e,t){return(0,o.toggleInlineFormat)(i.italic||l)(e,t)},"Mod-u":function(e,t){return(0,o.toggleInlineFormat)(i.underline||s)(e,t)},"Mod-z":o.undo,"Shift-Mod-z":o.redo},r({},c?{}:{"Mod-y":o.redo})),{Backspace:o.undoInputRule,"Mod-Enter":t,"Shift-Enter":t}),r({},c?{"Ctrl-Enter":t}:{})),{Enter:function(e,t){return(0,o.splitListItem)(e.schema.nodes[n])(e,t)},Tab:(0,o.goToNextCell)(1),"Shift-Tab":(0,o.goToNextCell)(-1)})}},2804:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.EditorToolsSettings=t.listsTypes=void 0;var i,a,s=n(3364),l=n(431);t.listsTypes=r({},l.indentRules.listsTypes),i=t.EditorToolsSettings||(t.EditorToolsSettings={}),a={type:"button"},i.bold=r(r({},l.bold),{props:r({icon:"bold"},a),messages:{title:s.keys.bold},commandName:"Bold"}),i.italic=r(r({},l.italic),{props:r({icon:"italic"},a),messages:{title:s.keys.italic},commandName:"Italic"}),i.underline=r(r({},l.underline),{props:r({icon:"underline"},a),messages:{title:s.keys.underline},commandName:"Underline"}),i.strikethrough=r(r({},l.strikethrough),{props:r({icon:"strikethrough"},a),messages:{title:s.keys.strikethrough},commandName:"Strikethrough"}),i.subscript=r(r({},l.subscript),{props:r({icon:"subscript"},a),messages:{title:s.keys.subscript},commandName:"Subscript"}),i.superscript=r(r({},l.superscript),{props:r({icon:"superscript"},a),messages:{title:s.keys.superscript},commandName:"Superscript"}),i.link=r(r({},l.link),{props:r({icon:"link-horizontal"},a),messages:{insertHyperlink:s.keys.insertHyperlink,insertHyperlinkDialogTitle:s.keys.insertHyperlinkDialogTitle,insertHyperlinkAddress:s.keys.insertHyperlinkAddress,insertHyperlinkTitle:s.keys.insertHyperlinkTitle,insertHyperlinkNewWindow:s.keys.insertHyperlinkNewWindow,insertHyperlinkCancel:s.keys.insertHyperlinkCancel,insertHyperlinkInsert:s.keys.insertHyperlinkInsert},commandName:"Link"}),i.insertFile=r(r({},l.link),{props:r({icon:"file-add"},a),messages:{insertHyperlink:s.keys.insertFile,insertHyperlinkDialogTitle:s.keys.insertFileDialogTitle,insertHyperlinkAddress:s.keys.insertFileAddress,insertHyperlinkTitle:s.keys.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:s.keys.insertFileCancel,insertHyperlinkInsert:s.keys.insertFileInsert},commandName:"InsertFile",linkTarget:!1}),i.insertTable={props:r({icon:"table-insert"},a),messages:{createTable:s.keys.createTable,createTableHint:s.keys.createTableHint},commandName:"InsertTable"},i.addRowBefore={props:r({icon:"table-row-insert-above"},a),messages:{title:s.keys.addRowBefore},commandName:"AddRowBefore"},i.addRowAfter={props:r({icon:"table-row-insert-below"},a),messages:{title:s.keys.addRowAfter},commandName:"AddRowAfter"},i.addColumnBefore={props:r({icon:"table-column-insert-left"},a),messages:{title:s.keys.addColumnBefore},commandName:"AddColumnBefore"},i.addColumnAfter={props:r({icon:"table-column-insert-right"},a),messages:{title:s.keys.addColumnAfter},commandName:"AddColumnAfter"},i.deleteRow={props:r({icon:"table-row-delete"},a),messages:{title:s.keys.deleteRow},commandName:"DeleteRow"},i.deleteColumn={props:r({icon:"table-column-delete"},a),messages:{title:s.keys.deleteColumn},commandName:"DeleteColumn"},i.deleteTable={props:r({icon:"table-delete"},a),messages:{title:s.keys.deleteTable},commandName:"DeleteTable"},i.mergeCells={props:r({icon:"cells-merge"},a),messages:{title:s.keys.mergeCells},commandName:"MergeCells"},i.splitCell={props:r({icon:"cell-split-horizontally"},a),messages:{title:s.keys.splitCell},commandName:"SplitCell"},i.print={props:r({icon:"print"},a),messages:{title:s.keys.print}},i.selectAll={props:r({icon:"select-all"},a),messages:{title:s.keys.selectAll}},i.pdf={props:r({icon:"pdf"},a),messages:{title:s.keys.pdf}},i.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},i.cleanFormatting={props:r({icon:"clear-css"},a),messages:{title:s.keys.cleanFormatting},commandName:"CleanFormatting"},i.image={node:"image",props:r({icon:"image"},a),messages:{insertImage:s.keys.insertImage,insertImageDialogTitle:s.keys.insertImageDialogTitle,insertImageAddress:s.keys.insertImageAddress,insertImageTitle:s.keys.insertImageTitle,insertImageAltText:s.keys.insertImageAltText,insertImageWidth:s.keys.insertImageWidth,insertImageHeight:s.keys.insertImageHeight,insertImageCancel:s.keys.insertImageCancel,insertImageInsert:s.keys.insertImageInsert},commandName:"InsertImage"},i.viewHtml={props:r({icon:"html"},a),messages:{viewHtml:s.keys.viewHtml,viewHtmlDialogTitle:s.keys.viewHtmlDialogTitle,viewHtmlCancel:s.keys.viewHtmlCancel,viewHtmlUpdate:s.keys.viewHtmlUpdate},commandName:"SetContent"},i.findAndReplace={props:r({icon:"find"},a),messages:{findReplaceToolTitle:s.keys.findReplaceToolTitle,findReplaceDialogTitle:s.keys.findReplaceDialogTitle,findReplaceTabFind:s.keys.findReplaceTabFind,findReplaceTabReplace:s.keys.findReplaceTabReplace,findReplaceFindWhat:s.keys.findReplaceFindWhat,findReplaceReplaceWith:s.keys.findReplaceReplaceWith,findReplaceReplace:s.keys.findReplaceReplace,findReplaceReplaceAll:s.keys.findReplaceReplaceAll,findReplaceMatchCase:s.keys.findReplaceMatchCase,findReplaceMatchWord:s.keys.findReplaceMatchWord,findReplaceMatchCyclic:s.keys.findReplaceMatchCyclic,findReplaceUseRegExp:s.keys.findReplaceUseRegExp,findReplacePrevMatch:s.keys.findReplacePrevMatch,findReplaceNextMatch:s.keys.findReplaceNextMatch,findReplaceMatches:s.keys.findReplaceMatches}},i.unlink=r(r({},l.link),{props:r({icon:"unlink-horizontal"},a),messages:{title:s.keys.unlink},commandName:"Unlink"}),i.undo={props:r({icon:"undo"},a),messages:{title:s.keys.undo},commandName:"Undo"},i.redo={props:r({icon:"redo"},a),messages:{title:s.keys.redo},commandName:"Redo"},i.fontSize={style:"font-size",defaultItem:{text:s.messages[s.keys.fontSize],value:"",localizationKey:s.keys.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"},i.fontName={style:"font-family",defaultItem:{text:s.messages[s.keys.fontName],value:"",localizationKey:s.keys.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"},i.formatBlock={defaultItem:{text:s.messages[s.keys.format],value:"",localizationKey:s.keys.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"},i.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",view:"palette",title:s.keys.foregroundColor},commandName:"ForeColor"},i.backColor={style:"background-color",colorPickerProps:{icon:"background",view:"palette",title:s.keys.backgroundColor},commandName:"BackColor"},i.alignLeft={actions:o([],l.alignLeftRules,!0),props:r({icon:"align-left"},a),messages:{title:s.keys.alignLeft},commandName:"AlignLeft"},i.alignRight={actions:o([],l.alignRightRules,!0),props:r({icon:"align-right"},a),messages:{title:s.keys.alignRight},commandName:"AlignRight"},i.alignCenter={actions:o([],l.alignCenterRules,!0),props:r({icon:"align-center"},a),messages:{title:s.keys.alignCenter},commandName:"AlignCenter"},i.alignJustify={actions:o([],l.alignJustifyRules,!0),props:r({icon:"align-justify"},a),messages:{title:s.keys.alignJustify},commandName:"AlignJustify"},i.alignRemove={actions:o([],l.alignRemoveRules,!0),props:r({icon:"align-remove"},a),messages:{},commandName:"AlignRemove"},i.indent={actions:l.indentRules.nodes,listsTypes:t.listsTypes,props:r({icon:"indent-increase"},a),messages:{title:s.keys.indent},commandName:"Indent"},i.outdent={actions:l.outdentRules.nodes,listsTypes:t.listsTypes,props:r({icon:"indent-decrease"},a),messages:{title:s.keys.outdent},commandName:"Outdent"},i.orderedList={listType:t.listsTypes.orderedList,props:r({icon:"list-ordered"},a),messages:{title:s.keys.orderedList},commandName:"OrderedList",types:r({},t.listsTypes)},i.bulletList={listType:t.listsTypes.bulletList,props:r({icon:"list-unordered"},a),messages:{title:s.keys.bulletList},commandName:"UnorderedList",types:r({},t.listsTypes)}},9953:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FindAndReplaceDialog=void 0;var a=n(3899),s=n(2888),l=n(6516),c=n(3457),u=n(499),d=n(3364),p=n(2804),f=n(2226),h=n(431),m={className:"k-checkbox k-checkbox-md k-rounded-md",type:"checkbox"},g=p.EditorToolsSettings.findAndReplace,v=function(e){function t(t){var n=e.call(this,t)||this;return n.onTabSelect=function(e){n.setState({selectedTab:e.selected})},n.onClose=function(){var e=n.props.view,t=e.state,r=t.tr.setSelection(h.TextSelection.create(t.doc,t.selection.from,t.selection.to));e.updateState(t.apply(r)),e.focus(),n.props.onClose.call(void 0)},n.matchesMessage=function(e){var t=n.state.matches,r=n.state.nextMatch,o=0,i=0;if(t&&r){var a=t.findIndex((function(e){return e.eq(r)}));o=-1===a?t.length:a+1,i=t.length}return(0,f.formatString)(e,o,i)},n.onFindNext=function(){n.onFind()},n.onFindPrev=function(){n.onFind(!0)},n.onFind=function(e){void 0===e&&(e=!1);var t=n.props.view,r=n.state,o=r.searchText,i=r.matchCase,a=r.matchCyclic,s={text:o,matchWord:r.matchWord,matchCase:i,useRegExp:r.useRegExp,backward:e,matchCyclic:a},l=(0,h.find)(t.state,s);if(l){var c=t.state.tr.setSelection(l);c.scrollIntoView(),t.updateState(t.state.apply(c)),n.setState({nextMatch:l})}},n.onReplace=function(){var e=n.props.view,t=e.state.selection,r=n.state.replaceText;if(!t.empty){var o=t.from,i=o+r.length,a=(0,h.replace)(t,r,e.state.tr);a.setSelection(h.TextSelection.create(a.doc,o,i)),a.scrollIntoView(),e.dispatch(a),n.setNextState({})}},n.onReplaceAll=function(){var e=n.props.view,t=n.state,r=t.searchText,o=t.replaceText,i=t.matchCase,a={text:r,matchWord:t.matchWord,matchCase:i,useRegExp:t.useRegExp},s=(0,h.replaceAll)(e.state,o,a);s&&e.dispatch(s),n.setNextState({})},n.onKeyDown=function(e){13===e.keyCode?n.onFindNext():27===e.keyCode&&n.onClose()},n.onMatchCaseChecked=function(e){return n.setNextState({matchCase:e.target.checked})},n.onMatchWordChecked=function(e){return n.setNextState({matchWord:e.target.checked})},n.onMatchCyclicChecked=function(e){return n.setNextState({matchCyclic:e.target.checked})},n.onUseRegExpChecked=function(e){return n.setNextState({useRegExp:e.target.checked})},n.onSearchChange=function(e){return n.setNextState({searchText:e.target.value})},n.onReplaceChange=function(e){return n.setNextState({replaceText:e.target.value})},n.setNextState=function(e){var t=i(i(i({},n.state),e),{matches:void 0,nextMatch:void 0}),r=n.props.view;if(t.searchText){var o=t.searchText,a=t.matchWord,s=t.matchCase,l=t.useRegExp,c=t.matchCyclic,u={text:o,matchWord:a,matchCase:s,useRegExp:l},d=r.state.selection,p=(0,h.findAll)(r.state.doc,u),f=!n.state.searchText&&p[0]||p.find((function(e){return e.from>=d.from}))||c&&p[0]||void 0;n.setState(i(i({},t),{matches:p,nextMatch:f}))}else n.setState(t)},n.state={selectedTab:0,searchText:(0,h.selectedLineTextOnly)(t.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1},n}return o(t,e),Object.defineProperty(t.prototype,"settings",{get:function(){return this.props.settings||g},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.view,r=this.state,o=r.matches,i=void 0===o?[]:o,a=r.nextMatch;if(t.nextMatch!==a){var s=n.state,l=s.tr,c=[];i.forEach((function(e){c.push({from:e.from,to:e.to,attrs:{class:a&&e.eq(a)?"k-text-selected":"k-text-highlighted"}})})),l.setMeta(h.textHighlightKey,c),l.setSelection(a||h.TextSelection.create(s.doc,s.selection.from)),n.dispatch(l)}},t.prototype.render=function(){var e=(0,u.provideLocalizationService)(this),t=this.settings.messages,n=t.findReplaceDialogTitle,r=t.findReplaceTabFind,o=t.findReplaceTabReplace,p=t.findReplaceFindWhat,f=t.findReplaceReplaceWith,h=t.findReplaceReplace,g=t.findReplaceReplaceAll,v=t.findReplaceMatchCase,y=t.findReplaceMatchWord,b=t.findReplaceMatchCyclic,k=t.findReplaceUseRegExp,w=t.findReplacePrevMatch,C=t.findReplaceNextMatch,x=t.findReplaceMatches,O=this.state,S=O.matchCase,E=O.matchWord,I=O.matchCyclic,N=O.useRegExp,T=O.searchText,M=O.replaceText,D=O.nextMatch,R=a.createElement("div",{className:"k-search-options"},a.createElement("span",null,a.createElement("input",i({},m,{id:"match-case",checked:S,onChange:this.onMatchCaseChecked})),a.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},e.toLanguageString(v,d.messages[v]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"match-whole",checked:E,onChange:this.onMatchWordChecked})),a.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},e.toLanguageString(y,d.messages[y]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"match-cyclic",checked:I,onChange:this.onMatchCyclicChecked})),a.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},e.toLanguageString(b,d.messages[b]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"regular-expression",checked:N,onChange:this.onUseRegExpChecked})),a.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},e.toLanguageString(k,d.messages[k])))),P=a.createElement("div",{className:"k-matches-container"},a.createElement(s.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},a.createElement("span",{className:"k-icon k-i-arrow-chevron-left"}),e.toLanguageString(w,d.messages[w])),a.createElement("span",null,this.matchesMessage(e.toLanguageString(x,d.messages[x]))),a.createElement(s.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(C,d.messages[C]),a.createElement("span",{className:"k-icon k-i-arrow-chevron-right"}))),_=a.createElement(a.Fragment,null,a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"findWhat"},e.toLanguageString(p,d.messages[p]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"findWhat",type:"text",className:"k-input",value:T,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}))),A=a.createElement(a.Fragment,null,a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"replaceWith"},e.toLanguageString(f,d.messages[f]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"replaceWith",className:"k-input",type:"text",value:M,onChange:this.onReplaceChange})));return a.createElement(l.Window,{title:e.toLanguageString(n,d.messages[n]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:function(){return null},maximizeButton:function(){return null},appendTo:document.body},a.createElement(c.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},a.createElement(c.TabStripTab,{title:e.toLanguageString(r,d.messages[r])},a.createElement("div",{className:"k-edit-form-container"},_),R,P),a.createElement(c.TabStripTab,{title:e.toLanguageString(o,d.messages[o])},a.createElement("div",{className:"k-edit-form-container"},_,A),a.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},a.createElement(s.Button,{disabled:!Boolean(D),onClick:this.onReplace},e.toLanguageString(h,d.messages[h])),a.createElement(s.Button,{disabled:!Boolean(D),onClick:this.onReplaceAll},e.toLanguageString(g,d.messages[g]))),R,P)))},t}(a.Component);t.FindAndReplaceDialog=v,(0,u.registerForLocalization)(v)},3856:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.InsertImageDialog=void 0;var a=n(3899),s=n(6516),l=n(2888),c=n(431),u=n(499),d=n(3364),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.src=null,t.altText=null,t.title=null,t.width=null,t.height=null,t.onClose=function(){t.props.view.focus(),t.props.onClose()},t.onInsert=function(){var e=t.props,n=e.view,r=e.settings,o=n.state.schema.nodes[r.node],i={src:t.src?t.src.value:null,title:t.title?t.title.value:null,alt:t.altText?t.altText.value:null,width:t.width?t.width.value:null,height:t.height?t.height.value:null},a=Object.keys(i).filter((function(e){return null!==i[e]&&""!==i[e]})).reduce((function(e,t){var n;return Object.assign(e,((n={})[t]=i[t],n))}),{}),s=o.createAndFill(a);s&&(0,c.insertNode)(s,!0)(n.state,(function(e){return n.dispatch(e.setMeta("commandName",r.commandName).setMeta("args",a))})),t.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,p=t.render,f=r.messages,h=f.insertImageDialogTitle,m=f.insertImageAddress,g=f.insertImageTitle,v=f.insertImageAltText,y=f.insertImageWidth,b=f.insertImageHeight,k=f.insertImageCancel,w=f.insertImageInsert,C=(0,u.provideLocalizationService)(this),x=n&&n.state,O={};x&&x.selection instanceof c.NodeSelection&&x.selection.node.type===x.schema.nodes[r.node]&&(O=x.selection.node.attrs);var S=a.createElement("div",{className:"k-edit-form-container"},a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-image-url"},C.toLanguageString(m,d.messages[m]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-url",defaultValue:O.src,ref:function(t){return e.src=t},autoFocus:!0})),a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-image-alt"},C.toLanguageString(v,d.messages[v]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-alt",defaultValue:O.alt,ref:function(t){return e.altText=t}})),a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-image-title"},C.toLanguageString(g,d.messages[g]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-title",defaultValue:O.title,ref:function(t){return e.title=t}})),a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-image-width"},C.toLanguageString(y,d.messages[y]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-width",defaultValue:O.width,ref:function(t){return e.width=t}})),a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-image-height"},C.toLanguageString(b,d.messages[b]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-height",defaultValue:O.height,ref:function(t){return e.height=t}}))),E=[a.createElement(l.Button,{onClick:this.onClose,dir:o,key:"cancel"},C.toLanguageString(k,d.messages[k])),a.createElement(l.Button,{onClick:this.onInsert,themeColor:"primary",dir:o,key:"insert"},C.toLanguageString(w,d.messages[w]))],I=a.createElement(s.Dialog,{title:C.toLanguageString(h,d.messages[h]),onClose:this.onClose,key:"dialog",closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},S,a.createElement.apply(a,i([s.DialogActionsBar,null],E,!1)));return p?p(I,{content:S,actionButtons:E}):I},t}(a.Component);t.InsertImageDialog=p,(0,u.registerForLocalization)(p)},4150:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.InsertLinkDialog=void 0;var a=n(3899),s=n(6516),l=n(2888),c=n(431),u=n(499),d=n(3364),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.href=null,t.title=null,t.target=null,t.onClose=function(){t.props.view.focus(),t.props.onClose()},t.onInsert=function(){var e=t.props.view,n=t.props.settings.mark,r={href:t.href?t.href.value:void 0,title:t.title?t.title.value:void 0,target:t.target&&t.target.checked?"_blank":void 0};(0,c.applyLink)({mark:n,attrs:r},t.props.settings.commandName)(e.state,e.dispatch),t.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,p=t.render,f=(0,u.provideLocalizationService)(this),h=r.messages,m=h.insertHyperlinkDialogTitle,g=h.insertHyperlinkAddress,v=h.insertHyperlinkTitle,y=h.insertHyperlinkNewWindow,b=h.insertHyperlinkCancel,k=h.insertHyperlinkInsert,w=!!n&&(0,c.getMark)(n.state,n.state.schema.marks[r.mark]),C=a.createElement("div",{className:"k-edit-form-container"},a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"k-editor-link-url"},f.toLanguageString(g,d.messages[g]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-link-url",ref:function(t){return e.href=t},defaultValue:w&&w.attrs.href||void 0,autoFocus:!0})),a.createElement("div",{className:"k-edit-label k-editor-link-text-row"},a.createElement("label",{htmlFor:"k-editor-link-text"},f.toLanguageString(v,d.messages[v]))),a.createElement("div",{className:"k-edit-field k-editor-link-text-row"},a.createElement("input",{type:"text",className:"k-input",id:"k-editor-link-text",ref:function(t){return e.title=t},defaultValue:w&&w.attrs.title||void 0})),!1!==r.linkTarget&&a.createElement("div",{className:"k-edit-field"},a.createElement("input",{type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md",id:"k-editor-link-target",ref:function(t){return e.target=t},defaultChecked:w&&!!w.attrs.target||void 0}),a.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},f.toLanguageString(y,d.messages[y])))),x=[a.createElement(l.Button,{onClick:this.onClose,dir:o,key:"cancel"},f.toLanguageString(b,d.messages[b])),a.createElement(l.Button,{onClick:this.onInsert,themeColor:"primary",dir:o,key:"insert"},f.toLanguageString(k,d.messages[k]))],O=a.createElement(s.Dialog,{title:f.toLanguageString(m,d.messages[m]),onClose:this.onClose,closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},C,a.createElement.apply(a,i([s.DialogActionsBar,null],x,!1)));return p?p(O,{content:C,actionButtons:x}):O},t}(a.Component);t.InsertLinkDialog=p,(0,u.registerForLocalization)(p)},3695:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDialogs=void 0;var i=n(4150),a=n(3856),s=n(5391),l=n(9953);!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(i.InsertLinkDialog);e.InsertLinkDialog=t;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(a.InsertImageDialog);e.InsertImageDialog=n;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(s.ViewHtmlDialog);e.ViewHtmlDialog=r;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l.FindAndReplaceDialog);e.FindAndReplaceDialog=c}(t.EditorDialogs||(t.EditorDialogs={}))},5391:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ViewHtmlDialog=void 0;var a=n(3899),s=n(6516),l=n(2888),c=n(431),u=n(499),d=n(3364),p=n(580),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.htmlArea=null,t.onUpdate=function(){var e=t.props,n=e.view,r=e.settings,o=(0,c.trimWhitespace)(t.htmlArea?t.htmlArea.value:""),i=p.editorPropsKey.getState(n.state).preserveWhitespace;(0,c.setHtml)(o,r.commandName,{preserveWhitespace:i})(n.state,n.dispatch),t.onClose()},t.onClose=function(){t.props.view.focus(),t.props.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,p=t.render,f=(0,u.provideLocalizationService)(this),h=r.messages,m=h.viewHtmlDialogTitle,g=h.viewHtmlCancel,v=h.viewHtmlUpdate,y=a.createElement("textarea",{className:"k-textarea k-editor-textarea",style:{height:"280px",width:"490px"},ref:function(t){return e.htmlArea=t},defaultValue:(0,c.indentHtml)((0,c.getHtml)(n.state)),autoFocus:!0}),b=[a.createElement(l.Button,{onClick:this.onClose,dir:o,key:"cancel"},f.toLanguageString(g,d.messages[g])),a.createElement(l.Button,{onClick:this.onUpdate,themeColor:"primary",dir:o,key:"update"},f.toLanguageString(v,d.messages[v]))],k=a.createElement(s.Dialog,{title:f.toLanguageString(m,d.messages[m]),onClose:this.onClose,key:"dialog",closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},y,a.createElement.apply(a,i([s.DialogActionsBar,null],b,!1)));return p?p(k,{content:y,actionButtons:b}):k},t}(a.Component);t.ViewHtmlDialog=f,(0,u.registerForLocalization)(f)},3364:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.keys=t.messages=void 0;var r="editor.bold",o="editor.italic",i="editor.underline",a="editor.strikethrough",s="editor.subscript",l="editor.superscript",c="editor.hyperlink",u="editor.insertFile",d="editor.print",p="editor.selectAll",f="editor.cleanFormatting",h="editor.pdf",m="editor.foregroundColor",g="editor.backgroundColor",v="editor.createTable",y="editor.insertTableHint",b="editor.addRowBefore",k="editor.addRowAfter",w="editor.addColumnBefore",C="editor.addColumnAfter",x="editor.deleteRow",O="editor.deleteColumn",S="editor.deleteTable",E="editor.mergeCells",I="editor.splitCell",N="editor.hyperlink-dialog-title",T="editor.hyperlink-dialog-content-address",M="editor.hyperlink-dialog-content-title",D="editor.hyperlink-dialog-content-newwindow",R="editor.hyperlink-dialog-cancel",P="editor.hyperlink-dialog-insert",_="editor.insertfile-dialog-title",A="editor.insertfile-dialog-content-address",j="editor.insertfile-dialog-content-title",F="editor.insertfile-dialog-cancel",z="editor.insertfile-dialog-insert",L="editor.image",B="editor.image-dialog-title",V="editor.image-address",H="editor.image-title",K="editor.image-altText",W="editor.image-width",$="editor.image-height",q="editor.image-cancel",U="editor.image-insert",G="editor.viewHtml",Y="editor.viewHtml-dialog-title",X="editor.viewHtml-cancel",J="editor.viewHtml-update",Z="editor.unlink",Q="editor.undo",ee="editor.redo",te="editor.fontSize",ne="editor.fontName",re="editor.format",oe="editor.alignLeft",ie="editor.alignRight",ae="editor.alignCenter",se="editor.alignJustify",le="editor.indent",ce="editor.outdent",ue="editor.orderedList",de="editor.bulletList",pe="editor.findReplace-tool-title",fe="editor.findReplace-dialog-title",he="editor.findReplace-tab-find",me="editor.findReplace-tab-replace",ge="editor.findReplace-findWhat",ve="editor.findReplace-replaceWith",ye="editor.findReplace-replace",be="editor.findReplace-replaceAll",ke="editor.findReplace-matchCase",we="editor.findReplace-matchWord",Ce="editor.findReplace-matchCyclic",xe="editor.findReplace-useRegExp",Oe="editor.findReplace-prevMatch",Se="editor.findReplace-nextMatch",Ee="editor.findReplace-matches",Ie="editor.iframeTitle";t.messages=((n={})[r]="Bold",n[o]="Italic",n[i]="Underline",n[a]="Strikethrough",n[s]="Subscript",n[l]="Superscript",n[Z]="Remove hyperlink",n[Q]="Undo",n[ee]="Redo",n[te]="Font Size",n[ne]="Font Name",n[re]="Format",n[oe]="Align text left",n[ie]="Align text right",n[ae]="Center text",n[se]="Justify",n[le]="Indent",n[ce]="Outdent",n[ue]="Insert ordered list",n[de]="Insert unordered list",n[d]="Print",n[p]="Select All",n[f]="Clean formatting",n[h]="Export as PDF",n[m]="Color",n[g]="Background color",n[v]="Create a table",n[y]="Create a {0} x {1} table",n[b]="Add row above",n[k]="Add row below",n[w]="Add column on the left",n[C]="Add column on the right",n[x]="Delete row",n[O]="Delete column",n[S]="Delete table",n[E]="Merge cells",n[I]="Split cell",n[c]="Insert hyperlink",n[N]="Insert hyperlink",n[T]="Web address",n[M]="Title",n[D]="Open link in new window",n[R]="Cancel",n[P]="Insert",n[u]="Insert file",n[_]="Insert file",n[A]="Web address",n[j]="Title",n[F]="Cancel",n[z]="Insert",n[L]="Insert image",n[B]="Insert image",n[V]="Web address",n[H]="Title",n[K]="Alternate text",n[W]="Width (px)",n[$]="Height (px)",n[q]="Cancel",n[U]="Insert",n[G]="View HTML",n[Y]="View HTML",n[X]="Cancel",n[J]="Update",n[pe]="Find and Replace",n[fe]="Find and Replace",n[he]="Find",n[me]="Replace",n[ge]="Find What:",n[ve]="Replace With",n[ye]="Replace",n[be]="Replace All",n[ke]="Match Case",n[we]="Match whole word only",n[Ce]="Match cyclic (Wrap around)",n[xe]="Regular Expression",n[Oe]="Prev",n[Se]="Next",n[Ee]="{0} of {1} matches",n[Ie]="Editable area. Press Alt + F10 for toolbar.",n),t.keys={bold:r,italic:o,underline:i,strikethrough:a,subscript:s,superscript:l,unlink:Z,undo:Q,redo:ee,fontSize:te,fontName:ne,format:re,alignLeft:oe,alignRight:ie,alignCenter:ae,alignJustify:se,indent:le,outdent:ce,orderedList:ue,bulletList:de,print:d,selectAll:p,cleanFormatting:f,pdf:h,foregroundColor:m,backgroundColor:g,createTable:v,createTableHint:y,addRowBefore:b,addRowAfter:k,addColumnBefore:w,addColumnAfter:C,deleteRow:x,deleteColumn:O,deleteTable:S,mergeCells:E,splitCell:I,insertHyperlink:c,insertHyperlinkDialogTitle:N,insertHyperlinkAddress:T,insertHyperlinkTitle:M,insertHyperlinkNewWindow:D,insertHyperlinkCancel:R,insertHyperlinkInsert:P,insertFile:u,insertFileDialogTitle:_,insertFileAddress:A,insertFileTitle:j,insertFileCancel:F,insertFileInsert:z,insertImage:L,insertImageDialogTitle:B,insertImageAddress:V,insertImageTitle:H,insertImageAltText:K,insertImageWidth:W,insertImageHeight:$,insertImageCancel:q,insertImageInsert:U,viewHtml:G,viewHtmlDialogTitle:Y,viewHtmlCancel:X,viewHtmlUpdate:J,findReplaceToolTitle:pe,findReplaceDialogTitle:fe,findReplaceTabFind:he,findReplaceTabReplace:me,findReplaceFindWhat:ge,findReplaceReplaceWith:ve,findReplaceReplace:ye,findReplaceReplaceAll:be,findReplaceMatchCase:ke,findReplaceMatchWord:we,findReplaceMatchCyclic:Ce,findReplaceUseRegExp:xe,findReplacePrevMatch:Oe,findReplaceNextMatch:Se,findReplaceMatches:Ee,iframeTitle:Ie}},7363:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata=void 0,t.packageMetadata={name:"@progress/kendo-react-editor",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660124040,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},7628:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.createAlignTool=void 0;var s=n(3899),l=n(2888),c=n(2804),u=n(431),d=n(2226),p=n(499),f=n(3364),h=c.EditorToolsSettings.alignRemove;t.createAlignTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),c=n&&n.state,m=!!c&&(0,u.isAligned)(c,e.actions),g=m?h.actions:e.actions,v=m?h.commandName:e.commandName,y=(0,p.provideLocalizationService)(this),b=e.messages.title,k=s.createElement(l.Button,i({onClick:function(){return n&&(0,u.alignBlocks)(g,v)(n.state,n.dispatch)},selected:m,togglable:!0},d.onDownPreventDefault,{title:y.toLanguageString(b,f.messages[b])},e.props,o));return r?r.call(void 0,k,{view:n}):k},n}(s.Component);return(0,p.registerForLocalization)(t),t}},8631:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ApplyColorTool=void 0;var o=n(3899),i=n(1574),a=n(431),s=n(499),l=n(3364);t.ApplyColorTool=function(e){var t=e.view,n=e.style,c=e.colorPickerProps,u=e.commandName,d=c.title,p=c.view,f=void 0===p?"palette":p,h=o.useCallback((function(e){t&&((0,a.applyInlineStyle)({style:n,value:e.value},u)(t.state,t.dispatch),"palette"===f&&t.focus())}),[t,n,f,u]);return o.createElement(i.ColorPicker,r({onChange:h,onActiveColorClick:h},c,{title:d?(0,s.useLocalization)().toLanguageString(d,l.messages[d]):d}))}},3280:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.CleanFormatting=void 0;var i=n(3899),a=n(2888),s=n(499),l=n(2226),c=n(3364),u=n(431),d=n(2804).EditorToolsSettings.cleanFormatting,p=(0,u.cleanFormatting)();t.CleanFormatting=function(e){var t=e.view,n=e.render,u=e.settings,f=void 0===u?d:u,h=o(e,["view","render","settings"]),m=f.messages.title,g=i.useCallback((function(){t&&p(t.state,(function(e){e.setMeta("commandName",f.commandName),t.dispatch(e)}))}),[t]),v=i.createElement(a.Button,r({onClick:g,disabled:!t||!p(t.state),title:(0,s.useLocalization)().toLanguageString(m,c.messages[m])},l.onDownPreventDefault,f.props,h));return n?n.call(void 0,v,{view:t}):v}},3037:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.FindAndReplace=void 0;var s=n(3899),l=n(2888),c=n(9953),u=n(2226),d=n(3364),p=n(2804),f=n(499),h=p.EditorToolsSettings.findAndReplace,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showDialog:!1},t.onClose=function(){return t.setState({showDialog:!1})},t.onOpen=function(){return t.setState({showDialog:!0})},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.view,n=a(e,["view"]),r=h.props,o=(0,f.provideLocalizationService)(this),p=h.messages.findReplaceToolTitle;return[s.createElement(l.Button,i({onClick:this.onOpen},u.onDownPreventDefault,{disabled:!t,title:o.toLanguageString(p,d.messages[p]),key:"tool"},r,n)),this.state.showDialog&&t&&s.createElement(c.FindAndReplaceDialog,{view:t,onClose:this.onClose,dir:n.dir,key:"dialog"})]},t}(s.Component);t.FindAndReplace=m,(0,f.registerForLocalization)(m)},1403:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.FontStyleToolNS=void 0;var s=n(3899),l=n(5375),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.FontStyleToolNS||(t.FontStyleToolNS={})).createStyleDropDownList=function(e){var t=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.onChange=function(t){var r=t.target.value,o=n.props.view,i=e.style;if(o){(0,c.applyInlineStyle)({style:i,value:r.value},e.commandName)(o.state,o.dispatch);var a=t.syntheticEvent;a&&"click"===a.type&&o.focus()}},n}return o(n,t),n.prototype.render=function(){var t=e.style,n=this.props,r=n.view,o=n.render,f=n.data,h=n.defaultItem,m=a(n,["view","render","data","defaultItem"]),g=f||e.items,v=h||e.defaultItem,y=r?(0,c.getInlineStyles)(r.state,{name:t,value:/^.+$/}):[],b=(0,d.provideLocalizationService)(this);v&&v.localizationKey&&((v=i({},v)).text=v.localizationKey?b.toLanguageString(v.localizationKey,p.messages[v.localizationKey]):v.text);var k=1===new Set(y).size?y[0]:null,w=s.createElement(l.DropDownList,i({value:k?g.find((function(e){return e.value===k})):k,data:g,defaultItem:v,itemRender:u.itemRender,textField:"text",dataItemKey:"value",onChange:this.onChange,style:u.userSelectNone,leftRightKeysNavigation:!1,title:v.text},m));return o?o.call(void 0,w,{view:r}):w},n}(s.Component);return(0,d.registerForLocalization)(t),t}},847:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.FormatBlockToolNS=void 0;var s=n(3899),l=n(5375),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.FormatBlockToolNS||(t.FormatBlockToolNS={})).createFormatBlockDropDownList=function(e){var t=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.onChange=function(t){var r=t.target.value,o=n.props.view;if(o&&(0,c.formatBlockElements)(r.value,e.commandName)(o.state,o.dispatch)){var i=t.syntheticEvent;i&&"click"===i.type&&o.focus()}},n}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=t.data,f=t.defaultItem,h=a(t,["view","render","data","defaultItem"]),m=o||e.items,g=f||e.defaultItem,v=n&&n.state,y=v?(0,c.getBlockFormats)(v):[],b=(0,d.provideLocalizationService)(this);g&&g.localizationKey&&((g=i({},g)).text=g.localizationKey?b.toLanguageString(g.localizationKey,p.messages[g.localizationKey]):g.text);var k=1===new Set(y).size?y[0]:null,w=s.createElement(l.DropDownList,i({value:k?m.find((function(e){return e.value===k})):k,onChange:this.onChange,itemRender:u.itemRender,data:m,defaultItem:g,textField:"text",dataItemKey:"value",style:u.userSelectNone,leftRightKeysNavigation:!1,title:g.text},h));return r?r.call(void 0,w,{view:n}):w},n}(s.Component);return(0,d.registerForLocalization)(t),t}},3270:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryToolNS=void 0;var r,o=n(431),i=n(8980);(r=t.HistoryToolNS||(t.HistoryToolNS={})).createUndoTool=function(e){return(0,i.createProseMirrorTool)(e,o.undo)},r.createRedoTool=function(e){return(0,i.createProseMirrorTool)(e,o.redo)}},9476:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.IndentToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.IndentToolNS||(t.IndentToolNS={})).createIndentTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=o.dir,h=n&&n.state,m=h&&h.schema.nodes,g=m&&m[e.listsTypes.listItem],v=e.actions,y=!!h&&!!g&&((0,c.isIndented)(h,v,f)||v.some((function(e){return m&&m[e.node]&&(0,c.hasNode)(h,m[e.node])})))&&!(0,c.hasNode)(h,g),b=!!h&&(0,c.canIndentAsListItem)(h,g),k=y||b,w=(0,d.provideLocalizationService)(this),C=e.messages.title,x=s.createElement(l.Button,i({onClick:function(){n&&b&&g?(0,c.sinkListItem)(g)(n.state,n.dispatch):n&&y&&(0,c.indentBlocks)(v,e.commandName,f)(n.state,n.dispatch)},title:w.toLanguageString(C,p.messages[C]),disabled:!k},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,x,{view:n}):x},n}(s.Component);return(0,d.registerForLocalization)(t),t}},5436:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.InlineFormatToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.InlineFormatToolNS||(t.InlineFormatToolNS={})).createInlineFormatTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=n&&n.state,h={mark:e.mark,altMarks:e.altMarks,altStyle:e.altStyle},m=(0,d.provideLocalizationService)(this),g=e.messages.title,v=s.createElement(l.Button,i({onClick:function(){return n&&(0,c.toggleInlineFormat)(h,f&&f.tr.setMeta("commandName",e.commandName))(n.state,n.dispatch)},selected:!!f&&(0,c.hasMark)(f,h),togglable:!0},u.onDownPreventDefault,{title:m.toLanguageString(g,p.messages[g])},e.props,o));return r?r.call(void 0,v,{view:n}):v},n}(s.Component);return(0,d.registerForLocalization)(t),t}},8210:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.createInsertImageTool=void 0;var s=n(3899),l=n(431),c=n(2888),u=n(2226),d=n(3695),p=n(499),f=n(3364);t.createInsertImageTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),h=n&&n.state,m=h?h.schema.nodes[e.node]:void 0,g=(0,p.provideLocalizationService)(this),v=e.messages.insertImage,y=[s.createElement(c.Button,i({onClick:this.toggleDialog,key:"insertImage",disabled:!m||!h||!(0,l.canInsert)(h,m)},u.onDownPreventDefault,{title:g.toLanguageString(v,f.messages[v])},e.props,o)),this.state.openedDialog&&n&&s.createElement(d.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:n,settings:e,dir:o.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,y,{view:n}):y},n}(s.Component);return(0,p.registerForLocalization)(t),t}},1493:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.LinkToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(3695),p=n(499),f=n(3364);(t.LinkToolNS||(t.LinkToolNS={})).createLinkTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),h=n&&n.state,m=!h||h.selection.empty,g=h&&(0,c.getMark)(h,h.schema.marks[e.mark]),v=(0,p.provideLocalizationService)(this),y=e.messages.insertHyperlink,b=[s.createElement(l.Button,i({onClick:this.toggleDialog,key:"link",disabled:m&&!g},u.onDownPreventDefault,{title:v.toLanguageString(y,f.messages[y])},e.props,o)),this.state.openedDialog&&n&&s.createElement(d.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:e,dir:o.dir,view:n,onClose:this.toggleDialog})||null];return r?r.call(void 0,b,{view:n}):b},n}(s.Component);return(0,p.registerForLocalization)(t),t}},5962:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InsertTablePopupNS=t.InsertTableToolNS=void 0;var r=n(3895);Object.defineProperty(t,"InsertTableToolNS",{enumerable:!0,get:function(){return r.InsertTableToolNS}});var o=n(5388);Object.defineProperty(t,"InsertTablePopupNS",{enumerable:!0,get:function(){return o.InsertTablePopupNS}})},5388:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.InsertTablePopupNS=void 0;var i,a,s=n(3899),l=n(189),c=n(5362),u=n(2011);i=t.InsertTablePopupNS||(t.InsertTablePopupNS={}),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.pointerdown=!1,t.onWindowDown=function(e){var n=t.props.anchor;(!n||n!==e.target&&n.firstElementChild!==e.target)&&(t.props.show&&!t.pointerdown&&t.props.onClose(),t.pointerdown=!1)},t.onPointerDown=function(){return t.pointerdown=!0},t}return o(t,e),t.prototype.componentDidUpdate=function(e){e.show&&this.props.show&&this.props.onClose()},t.prototype.componentDidMount=function(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)},t.prototype.componentWillUnmount=function(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)},t.prototype.render=function(){var e=this.props,n=e.show,r=e.anchor,o=e.dir,i=e.rows,a=void 0===i?t.defaultProps.rows:i,l=e.columns,d=void 0===l?t.defaultProps.columns:l,p="rtl"===o?"right":"left";return s.createElement(c.Popup,{anchor:r,anchorAlign:{horizontal:p,vertical:"bottom"},popupAlign:{horizontal:p,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:n,style:"rtl"===o?{direction:"rtl"}:void 0},s.createElement(u.default,{rows:a,columns:d,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},t}(s.Component),i.InsertTablePopup=a},2011:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(3899),a=n(2226),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={row:-1,col:-1},t}return o(t,e),t.prototype.renderCell=function(e,t,n){var r=this,o=Math.floor(e/this.props.columns),a=e%this.props.columns,s=a<=n&&o<=t;return i.createElement("span",{className:"k-ct-cell k-disabled"+(s?" ".concat("k-selected"):""),onMouseEnter:function(){return r.setState({row:o,col:a})},onClick:function(){return r.props.onCellClick.call(void 0,o,a)},key:e})},t.prototype.render=function(){var e=this,t=[],n=this.props.columns*this.props.rows,r=this.state,o=r.row,s=r.col,l=this.props.onDown,c=this.props.createTableMessage;s>-1&&(c=(0,a.formatString)(this.props.createTableHintMessage,o+1,s+1));for(var u=0;u<n;u++)t.push(this.renderCell(u,o,s));return[i.createElement("div",{onMouseLeave:function(){return e.setState({row:-1,col:-1})},key:"cells",style:{borderColor:"inherit"},onPointerDown:l,onMouseDown:l},t),i.createElement("div",{className:"k-status",key:"status",onPointerDown:l,onMouseDown:l},c)]},t}(i.Component);t.default=s},3895:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.InsertTableToolNS=void 0;var s=n(3899),l=n(2888),c=n(2226),u=n(499),d=n(3364),p=n(5388),f=n(431);(t.InsertTableToolNS||(t.InsertTableToolNS={})).createInsertTableTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedPopup:!1},e.button=null,e.togglePopup=function(){e.setState({openedPopup:!e.state.openedPopup})},e.closePopup=function(){e.state.openedPopup&&e.togglePopup()},e.onTableInsert=function(t,n){var r=e.props.view;if(r){var o=r.state.schema.nodes,i=o.table,a=o.table_row,s=o.table_cell,l=(0,f.createTable)({table:i,table_row:a,table_cell:s},t,n);l&&(0,f.insertNode)(l,!0)(r.state,r.dispatch),r.focus(),e.closePopup()}},e}return o(n,t),n.prototype.render=function(){var t=this,n=this.props,r=n.view,o=n.render,h=a(n,["view","render"]),m=r&&r.state,g=(0,u.provideLocalizationService)(this),v=e.messages,y=v.createTable,b=v.createTableHint,k=g.toLanguageString(y,d.messages[y]),w=g.toLanguageString(b,d.messages[b]),C=[s.createElement(l.Button,i({onClick:this.togglePopup,ref:function(e){return t.button=e&&e.element},key:"InsertTable",disabled:!m||!(0,f.canInsert)(m,m.schema.nodes.table)},c.onDownPreventDefault,{title:k},e.props,h)),r&&s.createElement(p.InsertTablePopupNS.InsertTablePopup,{key:"insertTablePopup",createTableMessage:k,createTableHintMessage:w,dir:h.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return o?o.call(void 0,C,{view:r}):C},n}(s.Component);return(0,u.registerForLocalization)(t),t}},3377:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ListTool=void 0;var i=n(3899),a=n(431),s=n(2888),l=n(2804),c=n(499),u=n(3364),d=function(e,t){var n=e.selection,r=n.from,o=n.to,i=null;return e.doc.nodesBetween(r,o,(function(e){return!(i=i||(e.type===t?e:null))})),i};t.ListTool=function(e){var t,n,p=!1,f=e.view,h=l.listsTypes,m=e.listType,g=(0,c.useLocalization)(),v=o([],e.items||[],!0);if(f){var y=f.state,b=y&&y.schema.nodes;t=b&&d(y,b[h.orderedList]),n=b&&d(y,b[h.bulletList]),p=Boolean(m===h.orderedList?t&&!n:!t&&n)}if(p&&(t||n)){var k=(0,a.listStyle)((t||n).attrs);v=v.map((function(e,t){return r(r({},e),{selected:k?e.style===k:0===t})}))}return i.createElement("span",{onMouseDown:function(e){e.preventDefault()}},i.createElement(s.SplitButton,{textField:"text",items:v,icon:e.icon,onButtonClick:function(e){f&&((0,a.toggleList)(f.state,f.dispatch,f,r(r({listType:m},h),{listAttrs:{}}),"InsertList"),f.focus())},onItemClick:function(e){if(f){var o=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},i=t||n;if(i&&(0,a.listStyle)(i.attrs)!==e.item.style){var s=f.state.selection.$head.posAtIndex(0,-2)-1;f.dispatch(f.state.tr.setNodeMarkup(s,f.state.schema.nodes[m],o))}else(0,a.toggleList)(f.state,f.dispatch,f,r(r({listType:m},h),{listAttrs:o}),"InsertList");f.focus()}},buttonClass:p?"k-selected":void 0,title:void 0!==e.title?e.title:g.toLanguageString(e.titleKey,u.messages[e.titleKey])}))}},7441:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.ListToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.ListToolNS||(t.ListToolNS={})).createListTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=!1,h=(0,d.provideLocalizationService)(this),m=e.messages.title,g=e.types,v=e.listType;if(n){var y=n.state,b=y.schema.nodes,k=(0,c.hasNode)(y,b[g.orderedList]),w=(0,c.hasNode)(y,b[g.bulletList]);f=v===g.orderedList?k&&!w:!k&&w}var C=s.createElement(l.Button,i({onClick:function(){return n&&(0,c.toggleList)(n.state,n.dispatch,n,i({listType:v},g),e.commandName)},togglable:!0,selected:f,title:h.toLanguageString(m,p.messages[m])},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,C,{view:n}):C},n}(s.Component);return(0,d.registerForLocalization)(t),t}},8671:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.EditorTools=void 0;var a=n(3899),s=n(2804),l=n(5962),c=n(7628),u=n(1403),d=n(8631),p=n(847),f=n(3270),h=n(9476),m=n(5436),g=n(8210),v=n(1493),y=n(7441),b=n(4997),k=n(3350),w=n(8389),C=n(7306),x=n(219),O=n(3061),S=n(9460),E=n(3280),I=n(3037),N=n(3377);!function(e){function t(e){return c.createAlignTool(e)}e.createAlignTool=t;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignLeft));e.AlignLeft=n;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignRight));e.AlignRight=r;var T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignCenter));e.AlignCenter=T;var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignJustify));function D(e){return l.InsertTableToolNS.createInsertTableTool(e)}e.AlignJustify=M,e.createInsertTableTool=D;var R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(D(s.EditorToolsSettings.insertTable));e.InsertTable=R;var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l.InsertTablePopupNS.InsertTablePopup);function _(e){return u.FontStyleToolNS.createStyleDropDownList(e)}e.InsertTablePopup=P,e.createStyleDropDownList=_;var A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(_(s.EditorToolsSettings.fontSize));e.FontSize=A;var j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(_(s.EditorToolsSettings.fontName));function F(e){return p.FormatBlockToolNS.createFormatBlockDropDownList(e)}e.FontName=j,e.ForeColor=function(e){return a.createElement(d.ApplyColorTool,i({},s.EditorToolsSettings.foreColor,e))},e.BackColor=function(e){return a.createElement(d.ApplyColorTool,i({},s.EditorToolsSettings.backColor,e))},e.createFormatBlockDropDownList=F;var z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(F(s.EditorToolsSettings.formatBlock));function L(e){return f.HistoryToolNS.createUndoTool(e)}function B(e){return f.HistoryToolNS.createRedoTool(e)}e.FormatBlock=z,e.createUndoTool=L,e.createRedoTool=B;var V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(L(s.EditorToolsSettings.undo));e.Undo=V;var H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(B(s.EditorToolsSettings.redo));function K(e){return h.IndentToolNS.createIndentTool(e)}e.Redo=H,e.createIndentTool=K;var W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(K(s.EditorToolsSettings.indent));function $(e){return m.InlineFormatToolNS.createInlineFormatTool(e)}e.Indent=W,e.createInlineFormatTool=$;var q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.bold));e.Bold=q;var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.italic));e.Italic=U;var G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.underline));e.Underline=G;var Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.strikethrough));e.Strikethrough=Y;var X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.subscript));e.Subscript=X;var J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.superscript));function Z(e){return g.createInsertImageTool(e)}e.Superscript=J,e.createInsertImageTool=Z;var Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Z(s.EditorToolsSettings.image));function ee(e){return v.LinkToolNS.createLinkTool(e)}e.InsertImage=Q,e.createLinkTool=ee;var te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ee(s.EditorToolsSettings.link));e.Link=te;var ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ee(s.EditorToolsSettings.insertFile));function re(e){return y.ListToolNS.createListTool(e)}e.InsertFile=ne,e.createListTool=re;var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(re(s.EditorToolsSettings.orderedList));e.OrderedList=oe;var ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(re(s.EditorToolsSettings.bulletList));function ae(e){return b.OutdentToolNS.createOutdentTool(e)}e.UnorderedList=ie,e.BulletedList=function(e){return a.createElement(N.ListTool,i({listType:s.EditorToolsSettings.bulletList.listType,items:[{icon:"list-unordered",text:"Disc",style:"disc"},{icon:"list-unordered-outline",text:"Circle",style:"circle"},{icon:"list-unordered-square",text:"Square",style:"square"}],icon:"list-unordered",titleKey:s.EditorToolsSettings.bulletList.messages.title},e))},e.NumberedList=function(e){return a.createElement(N.ListTool,i({listType:s.EditorToolsSettings.orderedList.listType,items:[{icon:"list-ordered",text:"Decimal"},{icon:"list-roman-upper",text:"Upper roman",style:"upper-roman"},{icon:"list-roman-lower",text:"Lower roman",style:"lower-roman"},{icon:"list-latin-big",text:"Upper latin",style:"upper-latin"},{icon:"list-latin-small",text:"Lower latin",style:"lower-latin"}],icon:"list-ordered",titleKey:s.EditorToolsSettings.orderedList.messages.title},e))},e.createOutdentTool=ae;var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ae(s.EditorToolsSettings.outdent));function le(e){return k.TableEditNS.createAddRowBeforeTool(e)}function ce(e){return k.TableEditNS.createAddRowAfterTool(e)}function ue(e){return k.TableEditNS.createAddColumnBeforeTool(e)}function de(e){return k.TableEditNS.createAddColumnAfterTool(e)}function pe(e){return k.TableEditNS.createDeleteRowTool(e)}function fe(e){return k.TableEditNS.createDeleteColumnTool(e)}function he(e){return k.TableEditNS.createDeleteTableTool(e)}function me(e){return k.TableEditNS.createMergeCellsTool(e)}function ge(e){return k.TableEditNS.createSplitCellTool(e)}e.Outdent=se,e.Print=function(e){return a.createElement(x.Print,i({},e))},e.Pdf=function(e){return a.createElement(O.Pdf,i({},e))},e.SelectAll=function(e){return a.createElement(S.SelectAll,i({},e))},e.CleanFormatting=function(e){return a.createElement(E.CleanFormatting,i({},e))},e.createAddRowBeforeTool=le,e.createAddRowAfterTool=ce,e.createAddColumnBeforeTool=ue,e.createAddColumnAfterTool=de,e.createDeleteRowTool=pe,e.createDeleteColumnTool=fe,e.createDeleteTableTool=he,e.createMergeCellsTool=me,e.createSplitCellTool=ge;var ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(le(s.EditorToolsSettings.addRowBefore));e.AddRowBefore=ve;var ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ce(s.EditorToolsSettings.addRowAfter));e.AddRowAfter=ye;var be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ue(s.EditorToolsSettings.addColumnBefore));e.AddColumnBefore=be;var ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(de(s.EditorToolsSettings.addColumnAfter));e.AddColumnAfter=ke;var we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(pe(s.EditorToolsSettings.deleteRow));e.DeleteRow=we;var Ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(fe(s.EditorToolsSettings.deleteColumn));e.DeleteColumn=Ce;var xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(he(s.EditorToolsSettings.deleteTable));e.DeleteTable=xe;var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(me(s.EditorToolsSettings.mergeCells));e.MergeCells=Oe;var Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ge(s.EditorToolsSettings.splitCell));function Ee(e){return w.UnlinkToolNS.createUnlinkTool(e)}e.SplitCell=Se,e.createUnlinkTool=Ee;var Ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Ee(s.EditorToolsSettings.unlink));function Ne(e){return C.ViewHtmlToolNS.createViewHtmlTool(e)}e.Unlink=Ie,e.createViewHtmlTool=Ne;var Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Ne(s.EditorToolsSettings.viewHtml));e.ViewHtml=Te;var Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(I.FindAndReplace);e.FindAndReplace=Me}(t.EditorTools||(t.EditorTools={}))},4997:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.OutdentToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.OutdentToolNS||(t.OutdentToolNS={})).createOutdentTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=n&&n.state,h=o.dir,m=!!f&&(0,c.isIndented)(f,e.actions,h),g=f&&f.schema.nodes[e.listsTypes.listItem],v=!!f&&(0,c.canOutdentAsListItem)(f,{nodes:e.actions,listsTypes:e.listsTypes}),y=m||v,b=(0,d.provideLocalizationService)(this),k=e.messages.title,w=s.createElement(l.Button,i({onClick:function(){n&&v&&g?(0,c.liftListItem)(g)(n.state,n.dispatch):n&&m&&(0,c.indentBlocks)(e.actions,e.commandName,h)(n.state,n.dispatch)},title:b.toLanguageString(k,p.messages[k]),disabled:!y},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,w,{view:n}):w},n}(s.Component);return(0,d.registerForLocalization)(t),t}},3061:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.Pdf=void 0;var i=n(3899),a=n(2888),s=n(499),l=n(5809),c=n(2226),u=n(3364),d=n(2804),p=d.EditorToolsSettings.pdf,f=d.EditorToolsSettings.savePdfOptions;t.Pdf=function(e){var t=e.view,n=e.render,d=e.settings,h=void 0===d?p:d,m=e.savePdfOptions,g=e.savePdfCallback,v=o(e,["view","render","settings","savePdfOptions","savePdfCallback"]),y=h.messages.title,b=i.useCallback((function(){t&&(0,l.savePDF)(t.dom,r(r({},f),m||{}),g)}),[t,m,g]),k=i.createElement(a.Button,r({onClick:b,title:(0,s.useLocalization)().toLanguageString(y,u.messages[y])},c.onDownPreventDefault,h.props,v));return n?n.call(void 0,k,{view:t}):k}},219:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.Print=void 0;var i=n(3899),a=n(2888),s=n(499),l=n(2226),c=n(3364),u=n(2804).EditorToolsSettings.print;t.Print=function(e){var t=e.view,n=e.render,d=e.settings,p=void 0===d?u:d,f=o(e,["view","render","settings"]),h=t&&t.dom,m=h&&h.ownerDocument,g=m&&m.defaultView,v=p.messages.title,y=i.useCallback((function(){g&&g.print()}),[g]),b=i.createElement(a.Button,r({onClick:y,disabled:!g||g===window,title:(0,s.useLocalization)().toLanguageString(v,c.messages[v])},l.onDownPreventDefault,p.props,f));return n?n.call(void 0,b,{view:t}):b}},8980:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.createProseMirrorTool=void 0;var s=n(3899),l=n(2888),c=n(2226),u=n(499),d=n(3364);t.createProseMirrorTool=function(e,t){var n=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return o(r,n),r.prototype.render=function(){var n=this.props,r=n.view,o=n.render,p=a(n,["view","render"]),f=(0,u.provideLocalizationService)(this),h=e.messages.title,m=r&&r.state,g=!!m&&!t(m),v=s.createElement(l.Button,i({onClick:function(){return r&&t(r.state,(function(t){return r.dispatch(t.setMeta("commandName",e.commandName))}))},disabled:g},c.onDownPreventDefault,{title:f.toLanguageString(h,d.messages[h])},e.props,p));return o?o.call(void 0,v,{view:r}):v},r}(s.Component);return(0,u.registerForLocalization)(n),n}},9460:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectAll=void 0;var i=n(3899),a=n(2888),s=n(499),l=n(2226),c=n(3364),u=n(431),d=n(2804).EditorToolsSettings.selectAll;t.SelectAll=function(e){var t=e.view,n=e.render,p=e.settings,f=void 0===p?d:p,h=o(e,["view","render","settings"]),m=f.messages.title,g=i.useCallback((function(){t&&((0,u.selectAll)(t.state,t.dispatch),t.focus())}),[t]),v=i.createElement(a.Button,r({onClick:g,title:(0,s.useLocalization)().toLanguageString(m,c.messages[m])},l.onDownPreventDefault,f.props,h));return n?n.call(void 0,v,{view:t}):v}},3350:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TableEditNS=void 0;var r,o=n(431),i=n(8980),a=function(e,t){var n=(0,o.deleteColumn)(e,t);if(n&&!t){var r=(0,o.selectionCell)(e),i=r&&r.node(r.depth);if(i&&1===i.content.childCount)return!1}return n},s=function(e,t){var n=(0,o.deleteRow)(e,t);if(n&&!t){var r=(0,o.selectionCell)(e),i=r&&r.node(r.depth-1);if(i&&1===i.content.childCount)return!1}return n};(r=t.TableEditNS||(t.TableEditNS={})).createAddRowBeforeTool=function(e){return(0,i.createProseMirrorTool)(e,o.addRowBefore)},r.createAddRowAfterTool=function(e){return(0,i.createProseMirrorTool)(e,o.addRowAfter)},r.createAddColumnBeforeTool=function(e){return(0,i.createProseMirrorTool)(e,o.addColumnBefore)},r.createAddColumnAfterTool=function(e){return(0,i.createProseMirrorTool)(e,o.addColumnAfter)},r.createDeleteRowTool=function(e){return(0,i.createProseMirrorTool)(e,s)},r.createDeleteColumnTool=function(e){return(0,i.createProseMirrorTool)(e,a)},r.createDeleteTableTool=function(e){return(0,i.createProseMirrorTool)(e,o.deleteTable)},r.createMergeCellsTool=function(e){return(0,i.createProseMirrorTool)(e,o.mergeCells)},r.createSplitCellTool=function(e){return(0,i.createProseMirrorTool)(e,o.splitCell)}},8389:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.UnlinkToolNS=void 0;var s=n(3899),l=n(2888),c=n(431),u=n(2226),d=n(499),p=n(3364);(t.UnlinkToolNS||(t.UnlinkToolNS={})).createUnlinkTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f={mark:e.mark},h=!!n&&(0,c.hasMark)(n.state,f),m=(0,d.provideLocalizationService)(this),g=e.messages.title,v=s.createElement(l.Button,i({onClick:function(){return n&&(0,c.removeLink)(f,n.state.tr.setMeta("commandName",e.commandName))(n.state,n.dispatch)},disabled:!h},u.onDownPreventDefault,{title:m.toLanguageString(g,p.messages[g])},e.props,o));return r?r.call(void 0,v,{view:n}):v},n}(s.Component);return(0,d.registerForLocalization)(t),t}},2226:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.userSelectNone=t.itemRender=t.formatString=t.onDownPreventDefault=void 0;var r=n(3899);t.onDownPreventDefault={onMouseDown:function(e){return e.preventDefault()},onPointerDown:function(e){return e.preventDefault()}},t.userSelectNone={userSelect:"none"},t.formatString=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t,n){e=e.replace("{"+n+"}",String(t))})),e},t.itemRender=function(e,t){return t.dataItem.style?r.cloneElement(e,e.props,r.createElement("span",{style:t.dataItem.style},e.props.children)):e}},7306:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.ViewHtmlToolNS=void 0;var s=n(3899),l=n(2888),c=n(2226),u=n(3695),d=n(499),p=n(3364);(t.ViewHtmlToolNS||(t.ViewHtmlToolNS={})).createViewHtmlTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=(0,d.provideLocalizationService)(this),h=e.messages.viewHtml,m=[s.createElement(l.Button,i({onClick:this.toggleDialog,key:"viewHtml"},c.onDownPreventDefault,{title:f.toLanguageString(h,p.messages[h])},e.props,o)),this.state.openedDialog&&n&&s.createElement(u.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:n,settings:e,dir:o.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,m,{view:n}):m},n}(s.Component);return(0,d.registerForLocalization)(t),t}},3131:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.firefox=void 0,t.firefox="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent)},1457:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateEditorValue=void 0;var r=n(431),o=n(5538),i=function(e,t){var n=t.tr||e.state.tr.setSelection(new r.AllSelection(e.state.doc)).replaceSelectionWith(t.doc||o.EditorUtils.createDocument(e.state.schema,t.html||"")).setMeta("commandName","setHTML");e.updateState(e.state.apply(n))};t.updateEditorValue=function(e,t,n,r,o){"string"==typeof t?r&&t===o?i(e,{tr:r}):t!==n&&i(e,{html:t}):r&&t.eq(r.doc)?i(e,{tr:r}):e.state.doc.eq(t)||i(e,{doc:t})}},5538:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.EditorUtils=void 0;var o,i=n(4394),a=n(2346),s=n(431),l=n(580);(o=t.EditorUtils||(t.EditorUtils={})).alignBlocks=function(e,t,n){return Boolean((0,s.alignBlocks)(t,n)(e.state,e.dispatch))},o.applyInlineStyle=function(e,t,n){return(0,s.applyInlineStyle)(t,n)(e.state,e.dispatch)},o.applyLink=function(e,t,n){return(0,s.applyLink)(t,n)(e.state,e.dispatch)},o.canIndentList=function(e,t){return(0,s.canIndentAsListItem)(e,t)},o.canInsert=function(e,t){return(0,s.canInsert)(e,t)},o.canOutdentList=function(e,t){return(0,s.canOutdentAsListItem)(e,{listsTypes:t,nodes:[]})},o.convertMsLists=function(e){return(0,s.convertMsLists)(e)},o.createDocument=function(e,t,n){return(0,s.parseContent)((0,s.trimWhitespace)(t),e,void 0!==n?n:{preserveWhitespace:"full"})},o.createTable=function(e,t,n){return(0,s.createTable)(e,t,n)},o.formatBlockElements=function(e,t,n){return(0,s.formatBlockElements)(t,n)(e.state,e.dispatch)},o.getBlockFormats=function(e){return(0,s.getBlockFormats)(e)},o.getHtml=function(e){return(0,s.getHtml)(e)},o.getInlineStyles=function(e,t){return(0,s.getInlineStyles)(e,t)},o.getMark=function(e,t){return(0,s.getMark)(e,t)},o.hasMark=function(e,t){return(0,s.hasMark)(e,t)},o.hasNode=function(e,t){return(0,s.hasNode)(e,t)},o.indentBlocks=function(e,t,n,r){return Boolean((0,s.indentBlocks)(t,n,r)(e.state,e.dispatch))},o.indentHtml=function(e){return(0,s.indentHtml)(e)},o.insertNode=function(e,t,n){(0,s.insertNode)(t,n)(e.state,e.dispatch)},o.isAligned=function(e,t){return(0,s.isAligned)(e,t)},o.isIndented=function(e,t,n){return(0,s.isIndented)(e,t,n)},o.removeComments=function(e){return(0,s.removeComments)(e)},o.removeTag=function(e,t){return(0,s.removeTag)(e,t)},o.pasteCleanup=function(e,t){return(0,s.pasteCleanup)(e,t)},o.sanitizeClassAttr=function(e){(0,s.sanitizeClassAttr)(e)},o.sanitizeStyleAttr=function(e){(0,s.sanitizeStyleAttr)(e)},o.removeAttribute=function(e){(0,s.removeAttribute)(e)},o.sanitize=function(e){return(0,s.sanitize)(e)},o.replaceImageSourcesFromRtf=function(e,t){return(0,s.replaceImageSourcesFromRtf)(e,t)},o.textHighlight=function(e){return(0,s.textHighlight)(e)},o.imageResizing=function(e){return(0,s.imageResizing)(e)},o.tableResizing=function(){return(0,s.tableResizing)()},o.setHtml=function(e,t,n,r){var o=(0,s.trimWhitespace)(t);(0,s.setHtml)(o,n,r)(e.state,e.dispatch)},o.toggleInlineFormat=function(e,t,n,r){return(0,s.toggleInlineFormat)(t,n,r)(e.state,e.dispatch)},o.toggleList=function(e,t,n){return(0,s.toggleList)(e.state,e.dispatch,e,t,n)},o.getShortcuts=function(e){return i.getShortcuts(e)},o.propsKey=l.editorPropsKey,o.imageResizeKey=s.imageResizeKey,o.marks=r({},a.marks),o.nodes=r({},a.nodes)},580:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.editorPropsKey=void 0;var r=n(431);t.editorPropsKey=new r.PluginKey("editor-props")},4343:(e,t,n)=>{n.d(t,{f:()=>b});var r,o=n(3899),i=n(189),a=n(8047),s=n(3228),l=n(6144),c=n(9013),u=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},p=c.Z.styles,f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elementRef=o.createRef(),t}return u(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.elementRef.current},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.children,r=t.style,i=t.appear,s=t.enter,c=t.exit,u=t.transitionName,f=t.transitionEnterDuration,h=t.transitionExitDuration,m=t.className,g=t.onEnter,v=t.onEntering,y=t.onEntered,b=t.onExit,k=t.onExiting,w=t.onExited,C=t.onAfterExited,x=t.mountOnEnter,O=t.unmountOnExit,S=t.animationEnteringStyle,E=t.animationEnteredStyle,I=t.animationExitingStyle,N=t.animationExitedStyle,T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["children","style","appear","enter","exit","transitionName","transitionEnterDuration","transitionExitDuration","className","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onAfterExited","mountOnEnter","unmountOnExit","animationEnteringStyle","animationEnteredStyle","animationExitingStyle","animationExitedStyle"]),M=(0,a.A)(m,p["child-animation-container"]),D=d({transitionDelay:"0ms"},r),R={entering:d({transitionDuration:"".concat(f,"ms")},S),entered:d({},E),exiting:d({transitionDuration:"".concat(h,"ms")},I),exited:d({},N)},P={in:this.props.in,appear:i,enter:s,exit:c,mountOnEnter:x,unmountOnExit:O,timeout:{enter:f,exit:h},onEnter:function(){g&&g.call(void 0,{animatedElement:e.element,target:e})},onEntering:function(){v&&v.call(void 0,{animatedElement:e.element,target:e})},onEntered:function(){y&&y.call(void 0,{animatedElement:e.element,target:e})},onExit:function(){b&&b.call(void 0,{animatedElement:e.element,target:e})},onExiting:function(){k&&k.call(void 0,{animatedElement:e.element,target:e})},onExited:function(){C&&C.call(void 0,{animatedElement:e.element,target:e}),w&&w.call(void 0,{animatedElement:e.element,target:e})},classNames:{appear:p["".concat(u,"-appear")]||"".concat(u,"-appear"),appearActive:p["".concat(u,"-appear-active")]||"".concat(u,"-appear-active"),enter:p["".concat(u,"-enter")]||"".concat(u,"-enter"),enterActive:p["".concat(u,"-enter-active")]||"".concat(u,"-enter-active"),exit:p["".concat(u,"-exit")]||"".concat(u,"-exit"),exitActive:p["".concat(u,"-exit-active")]||"".concat(u,"-exit-active")}};return o.createElement(l.CSSTransition,d({},P,T,{nodeRef:this.elementRef}),(function(t){return o.createElement("div",{style:d(d({},D),R[t]),className:M,ref:e.elementRef},n)}))},t.propTypes={in:i.bool,children:i.oneOfType([i.arrayOf(i.node),i.node]),transitionName:i.string.isRequired,className:i.string,appear:i.bool,enter:i.bool,exit:i.bool,transitionEnterDuration:i.number.isRequired,transitionExitDuration:i.number.isRequired,mountOnEnter:i.bool,unmountOnExit:i.bool,animationEnteringStyle:i.object,animationEnteredStyle:i.object,animationExitingStyle:i.object,animationExitedStyle:i.object},t.defaultProps={mountOnEnter:!0,unmountOnExit:!1,onEnter:s.Z,onEntering:s.Z,onEntered:s.Z,onExit:s.Z,onExiting:s.Z,onExited:s.Z,onAfterExited:s.Z,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}},t}(o.Component),h=n(4006),m={name:"@progress/kendo-react-animation",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660123390,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},g=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},y=c.Z.styles,b=function(e){function t(t){var n=e.call(this,t)||this;return(0,h.s)(m),n}return g(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.style,r=e.children,i=e.component,s=e.className,c=e.childFactory,u=(e.stackChildren,e.componentChildStyle),d=e.componentChildClassName,p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["id","style","children","component","className","childFactory","stackChildren","componentChildStyle","componentChildClassName"]),h={id:t,style:n,component:i,childFactory:c,className:(0,a.A)(y["animation-container"],y["animation-container-relative"],s)},m=o.Children.map(r||null,(function(e){return o.createElement(f,v({},p,{style:u,className:d}),e)}));return o.createElement(l.TransitionGroup,v({},h),m)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,component:i.string,id:i.string,style:i.any,transitionName:i.string.isRequired,appear:i.bool.isRequired,enter:i.bool.isRequired,exit:i.bool.isRequired,transitionEnterDuration:i.number.isRequired,transitionExitDuration:i.number.isRequired},t.defaultProps={component:"div"},t}(o.Component)},8686:(e,t,n)=>{n.d(t,{U:()=>d});var r,o=n(3899),i=n(189),a=n(4343),s=n(3228),l=n(9013),c=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)},d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={maxHeight:void 0,maxWidth:void 0},t.componentWillEnter=function(e){var n=t.props,r=n.onEnter,o=n.onBeforeEnter;o&&o.call(void 0,e),t.updateContainerDimensions(e.animatedElement,(function(){r&&r.call(void 0,e)}))},t.componentIsEntering=function(e){var n=t.props.onEntering;t.updateContainerDimensions(e.animatedElement,(function(){n&&n.call(void 0,e)}))},t.componentWillExit=function(e){var n=t.props.onExit;t.updateContainerDimensions(e.animatedElement,(function(){n&&n.call(void 0,e)}))},t.updateContainerDimensions=function(e,n){void 0===n&&(n=s.Z);var r=e.firstChild;if(r){var o=l.Z.outerHeight(r),i=l.Z.outerWidth(r);t.setState({maxHeight:o,maxWidth:i},n)}},t}return c(t,e),t.prototype.render=function(){var e,t=this.props,n=t.direction,r=t.children,i=t.childFactory,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["direction","children","childFactory"]),l=this.state,c=l.maxHeight,d=l.maxWidth,p={maxHeight:(e="vertical"===n?{maxHeight:c?"".concat(c,"px"):""}:{maxWidth:d?"".concat(d,"px"):""}).maxHeight,maxWidth:e.maxWidth};return o.createElement(a.f,u({},s,{childFactory:function(t){var n=i?i(t):t;return n.props.in?n:o.cloneElement(n,u(u({},n.props),{style:u(u({},n.props.style),{maxHeight:e.maxHeight,maxWidth:e.maxWidth})}))},onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:p,transitionName:"reveal-".concat(n)}),r)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["horizontal","vertical"]),component:i.string,id:i.string,style:i.any},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"},t}(o.Component)},9013:(e,t,n)=>{n.d(t,{Z:()=>r});const r={outerHeight:function(e){if(!e||!e.ownerDocument.defaultView)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop),r=parseFloat(t.marginBottom);return e.offsetHeight+n+r},outerWidth:function(e){if(!e||!e.ownerDocument.defaultView)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginLeft),r=parseFloat(t.marginRight);return e.offsetWidth+n+r},styles:{"animation-container":"k-animation-container","animation-container-relative":"k-animation-container-relative","animation-container-fixed":"k-animation-container-fixed","push-right-enter":"k-push-right-enter","push-right-appear":"k-push-right-appear","push-right-enter-active":"k-push-right-enter-active","push-right-appear-active":"k-push-right-appear-active","push-right-exit":"k-push-right-exit","push-right-exit-active":"k-push-right-exit-active","push-left-enter":"k-push-left-enter","push-left-appear":"k-push-left-appear","push-left-enter-active":"k-push-left-enter-active","push-left-appear-active":"k-push-left-appear-active","push-left-exit":"k-push-left-exit","push-left-exit-active":"k-push-left-exit-active","push-down-enter":"k-push-down-enter","push-down-appear":"k-push-down-appear","push-down-enter-active":"k-push-down-enter-active","push-down-appear-active":"k-push-down-appear-active","push-down-exit":"k-push-down-exit","push-down-exit-active":"k-push-down-exit-active","push-up-enter":"k-push-up-enter","push-up-appear":"k-push-up-appear","push-up-enter-active":"k-push-up-enter-active","push-up-appear-active":"k-push-up-appear-active","push-up-exit":"k-push-up-exit","push-up-exit-active":"k-push-up-exit-active",expand:"k-expand","expand-vertical-enter":"k-expand-vertical-enter","expand-vertical-appear":"k-expand-vertical-appear","expand-vertical-enter-active":"k-expand-vertical-enter-active","expand-vertical-appear-active":"k-expand-vertical-appear-active","expand-vertical-exit":"k-expand-vertical-exit","expand-vertical-exit-active":"k-expand-vertical-exit-active","expand-horizontal-enter":"k-expand-horizontal-enter","expand-horizontal-appear":"k-expand-horizontal-appear","expand-horizontal-enter-active":"k-expand-horizontal-enter-active","expand-horizontal-appear-active":"k-expand-horizontal-appear-active","expand-horizontal-exit":"k-expand-horizontal-exit","expand-horizontal-exit-active":"k-expand-horizontal-exit-active","child-animation-container":"k-child-animation-container","fade-enter":"k-fade-enter","fade-appear":"k-fade-appear","fade-enter-active":"k-fade-enter-active","fade-appear-active":"k-fade-appear-active","fade-exit":"k-fade-exit","fade-exit-active":"k-fade-exit-active","zoom-in-enter":"k-zoom-in-enter","zoom-in-appear":"k-zoom-in-appear","zoom-in-enter-active":"k-zoom-in-enter-active","zoom-in-appear-active":"k-zoom-in-appear-active","zoom-in-exit":"k-zoom-in-exit","zoom-in-exit-active":"k-zoom-in-exit-active","zoom-out-enter":"k-zoom-out-enter","zoom-out-appear":"k-zoom-out-appear","zoom-out-enter-active":"k-zoom-out-enter-active","zoom-out-appear-active":"k-zoom-out-appear-active","zoom-out-exit":"k-zoom-out-exit","zoom-out-exit-active":"k-zoom-out-exit-active","slide-in-appear":"k-slide-in-appear",centered:"k-centered","slide-in-appear-active":"k-slide-in-appear-active","slide-down-enter":"k-slide-down-enter","slide-down-appear":"k-slide-down-appear","slide-down-enter-active":"k-slide-down-enter-active","slide-down-appear-active":"k-slide-down-appear-active","slide-down-exit":"k-slide-down-exit","slide-down-exit-active":"k-slide-down-exit-active","slide-up-enter":"k-slide-up-enter","slide-up-appear":"k-slide-up-appear","slide-up-enter-active":"k-slide-up-enter-active","slide-up-appear-active":"k-slide-up-appear-active","slide-up-exit":"k-slide-up-exit","slide-up-exit-active":"k-slide-up-exit-active","slide-right-enter":"k-slide-right-enter","slide-right-appear":"k-slide-right-appear","slide-right-enter-active":"k-slide-right-enter-active","slide-right-appear-active":"k-slide-right-appear-active","slide-right-exit":"k-slide-right-exit","slide-right-exit-active":"k-slide-right-exit-active","slide-left-enter":"k-slide-left-enter","slide-left-appear":"k-slide-left-appear","slide-left-enter-active":"k-slide-left-enter-active","slide-left-appear-active":"k-slide-left-appear-active","slide-left-exit":"k-slide-left-exit","slide-left-exit-active":"k-slide-left-exit-active","reveal-vertical-enter":"k-reveal-vertical-enter","reveal-vertical-appear":"k-reveal-vertical-appear","reveal-vertical-enter-active":"k-reveal-vertical-enter-active","reveal-vertical-appear-active":"k-reveal-vertical-appear-active","reveal-vertical-exit":"k-reveal-vertical-exit","reveal-vertical-exit-active":"k-reveal-vertical-exit-active","reveal-horizontal-enter":"k-reveal-horizontal-enter","reveal-horizontal-appear":"k-reveal-horizontal-appear","reveal-horizontal-enter-active":"k-reveal-horizontal-enter-active","reveal-horizontal-appear-active":"k-reveal-horizontal-appear-active","reveal-horizontal-exit":"k-reveal-horizontal-exit","reveal-horizontal-exit-active":"k-reveal-horizontal-exit-active"}}},7037:(e,t,n)=>{n.d(t,{z:()=>p});var r,o=n(3899),i=n(189),a=n(8047),s=n(2697),l=n(4006),c=n(2709),u=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},p=function(e){function t(t){var n=e.call(this,t)||this;return n._element=null,n.handleClick=function(e){n.toggleIfApplicable(),n.props.onClick&&n.props.onClick.call(void 0,e)},(0,l.s)(c.k),n.state={selected:!0===n.props.togglable&&!0===n.props.selected},n}return u(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return void 0!==this._selectedTemp?this._selectedTemp:this.state.selected},enumerable:!1,configurable:!0}),t.getDerivedStateFromProps=function(e,t){return e.togglable&&void 0!==e.selected&&e.selected!==t.selected?{selected:e.selected}:null},t.prototype.render=function(){var e,n=this,r=this.props,i=r.children,l=r.togglable,c=r.icon,u=r.iconClass,p=r.imageUrl,f=r.imageAlt,h=(r.className,r.onClick,r.size),m=void 0===h?t.defaultProps.size:h,g=r.shape,v=void 0===g?t.defaultProps.shape:g,y=r.rounded,b=void 0===y?t.defaultProps.rounded:y,k=r.fillMode,w=void 0===k?t.defaultProps.fillMode:k,C=r.themeColor,x=void 0===C?t.defaultProps.themeColor:C,O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(r,["children","togglable","icon","iconClass","imageUrl","imageAlt","className","onClick","size","shape","rounded","fillMode","themeColor"]),S=void 0!==c||void 0!==u||void 0!==p,E=void 0!==i,I=function(e){var t=e.imageUrl,n=e.icon,r=e.iconClass,i=e.imageAlt;if(t)return o.createElement("img",{role:"presentation",className:"k-button-icon",alt:i,src:t});if(n){var s=(0,a.A)("k-button-icon k-icon","k-i-"+n);return o.createElement("span",{role:"presentation",className:s})}return r?o.createElement("span",{role:"presentation",className:(0,a.A)("k-button-icon",r)}):null}({icon:c,iconClass:u,imageUrl:p,imageAlt:f});return o.createElement("button",d({ref:function(e){return n._element=e},"aria-pressed":l?this.state.selected:void 0},O,{onClick:this.handleClick,className:(0,a.A)("k-button",(e={},e["k-button-".concat(s.G.sizeMap[m]||m)]=m,e["k-button-".concat(v)]=v,e["k-button-".concat(w)]=w,e["k-button-".concat(w,"-").concat(x)]=Boolean(w&&x),e["k-rounded-".concat(s.G.roundedMap[b]||b)]=b,e["k-icon-button"]=!E&&S,e["k-disabled"]=this.props.disabled,e["k-selected"]=this.state.selected,e["k-rtl"]="rtl"===this.props.dir,e),this.props.className)}),I,i&&o.createElement("span",{className:"k-button-text"},i))},t.prototype.toggleIfApplicable=function(){var e=this;if(this.props.togglable&&void 0===this.props.selected){var t=!this.state.selected;this._selectedTemp=t,this.setState({selected:t},(function(){return e._selectedTemp=void 0}))}},t.propTypes={children:i.node,selected:i.bool,togglable:i.bool,icon:i.string,iconClass:i.string,imageUrl:i.string,imageAlt:i.string,size:i.oneOf([null,"small","medium","large"]),shape:i.oneOf([null,"rectangle","square"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"flat","link","outline","solid"]),themeColor:i.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},t.defaultProps={togglable:!1,size:"medium",shape:"rectangle",rounded:"medium",fillMode:"solid",themeColor:"base"},t}(o.Component)},7711:(e,t,n)=>{n.d(t,{h:()=>f});var r,o=n(3899),i=n(189),a=n(8047),s=n(4006),l=n(2709),c=n(1889),u=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},p=c.Z.styles,f=function(e){function t(t){var n=e.call(this,t)||this;return n._element=null,(0,s.s)(l.k),n}return u(t,e),t.prototype.render=function(){var e,t=this,n=this.mapButtons(this.props.children),r=(0,a.A)([p["button-group"]],((e={})["k-disabled"]=this.props.disabled,e[p["button-group-stretched"]]=!!this.props.width,e),this.props.className),i={className:r,style:{width:"".concat(this.props.width)},dir:this.props.dir,role:"group","aria-disabled":this.props.disabled};return o.createElement("div",d({ref:function(e){t._element=e}},i,{className:r}),n)},t.prototype.mapButtons=function(e){var t=this,n=o.Children.count(e),r=void 0!==this.props.dir?"rtl"===this.props.dir:this._element&&"rtl"===getComputedStyle(this._element).direction||!1;return o.Children.map(e,(function(e,i){return o.isValidElement(e)?t.renderButton(e,i,i===n-1,r):e}))},t.prototype.renderButton=function(e,t,n,r){var i,s=(0,a.A)(e.props.className,((i={})[p["group-start"]]=r?n:0===t,i[p["group-end"]]=r?0===t:n,i)),l=d(d({},this.props.width?{width:this.props.width}:{}),e.props.style||{}),c=this.props.disabled||e.props.disabled,u=d(d(d(d({},e.props),s?{className:s}:{}),Object.keys(l).length?{style:l}:{}),void 0!==c?{disabled:c}:{});return o.Children.count(e.props.children)>0?o.cloneElement(e,u,e.props.children):o.cloneElement(e,u)},t.propTypes={children:i.oneOfType([i.arrayOf(i.element),i.element]),className:i.string,disabled:i.bool,width:i.string,dir:i.string},t}(o.Component)},1711:(e,t,n)=>{n.d(t,{A:()=>y});var r=n(3899),o=n(189),i=n(228),a=n(8199),s=n(3493),l=n(4703),c=n(8047),u=n(2697),d=n(4163),p=n(5770),f=n(5209),h=n(4006),m=n(2709),g=n(3322),v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},y=r.forwardRef((function(e,t){var n;(0,h.s)(m.k);var o=r.useRef(null),y=r.useRef(null),b=(0,a.n)(y,e.dir);r.useImperativeHandle(o,(function(){return{element:y.current,props:e}})),r.useImperativeHandle(t,(function(){return o.current}));var k=r.useContext(i.Wn),w=k[0],C=k[1],x=r.useContext(i.OW),O=x[0],S=x[1],E=r.useContext(i.zD)[1],I=r.useMemo((function(){return e.selected||(Array.isArray(w)?w.some((function(t){return t===e.value})):w===e.value)}),[e.selected,e.value,w]),N=r.useMemo((function(){return O===e.value}),[e.value,O]);r.useEffect((function(){N&&y.current&&y.current.focus()}),[N]);var T=r.useCallback((function(t){C({type:f.ey.toggle,payload:e.value,event:t})}),[C,e.value]),M=r.useCallback((function(t){e.removable&&(E({type:p.S.remove,payload:e.value,event:t}),S({type:d.E.reset,payload:e.value,event:t}),C({type:f.ey.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:o.current,syntheticEvent:t}))}),[e.onRemove,e.value,e.removable,E,S,C]),D=r.useCallback((function(t){switch(t.keyCode){case s.R.left:S({type:d.E.prev,payload:e.value,event:t});break;case s.R.right:S({type:d.E.next,payload:e.value,event:t});break;case s.R.enter:C({type:f.ey.toggle,payload:e.value,event:t});break;case s.R.delete:M(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onKeyDown,e.value,S,C,M]),R=r.useCallback((function(t){S({payload:e.value,type:d.E.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onFocus,e.value,S]),P=r.useCallback((function(t){e.onBlur&&e.onBlur.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onBlur]),_=(0,g.i)(e,o,{onClick:T});return r.createElement("div",v({},_,{role:e.role,id:e.value,style:e.style,ref:y,dir:b,tabIndex:(0,l.p)(e.tabIndex,e.disabled,void 0),className:(0,c.A)("k-chip",(n={"k-rtl":"rtl"===b,"k-disabled":e.disabled,"k-selected":I,"k-focus":N},n["k-chip-".concat(u.G.sizeMap[e.size]||e.size)]=e.size,n["k-rounded-".concat(u.G.roundedMap[e.rounded]||e.rounded)]=e.rounded,n["k-chip-".concat(e.fillMode)]=e.fillMode,n["k-chip-".concat(e.fillMode,"-").concat(e.themeColor)]=Boolean(e.fillMode&&e.themeColor),n),e.className),"aria-checked":I,"aria-disabled":e.disabled,"aria-describedby":e.ariaDescribedBy,onFocus:R,onBlur:P,onKeyDown:D}),I&&e.selectedIcon&&r.createElement("span",{className:(0,c.A)("k-chip-icon","k-icon",e.selectedIcon)}),e.icon&&r.createElement("span",{className:(0,c.A)("k-chip-icon","k-icon",e.icon)}),r.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&r.createElement("span",{"aria-label":e.text,className:"k-chip-label"},e.text)),e.removable&&r.createElement("span",{className:"k-chip-actions"},r.createElement("span",{className:"k-chip-action"},r.createElement("span",{className:(0,c.A)("k-chip-remove-action","k-icon",e.removeIcon),onClick:M}))))})),b={id:o.string,text:o.string,value:o.any,dir:o.oneOf(["ltr","rtl"]),removable:o.bool,removeIcon:o.string,disabled:o.bool,icon:o.string,selectedIcon:o.string,onRemove:o.func,dataItem:o.any,selected:o.bool,ariaDescribedBy:o.string,size:o.oneOf([null,"small","medium","large"]),rounded:o.oneOf([null,"small","medium","large","full"]),fillMode:o.oneOf([null,"outline","solid"]),themeColor:o.oneOf([null,"base","info","success","warning","error"])};y.displayName="KendoReactChip",y.propTypes=b,y.defaultProps={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"}},228:(e,t,n)=>{n.d(t,{Wn:()=>y,OW:()=>b,zD:()=>k,jg:()=>w});var r=n(3899),o=n(189),i=n(8199),a=n(9659),s=n(3322),l=n(4703),c=n(8047),u=n(2697),d=n(5209),p=n(4163),f=n(5770),h=n(1711),m=n(4006),g=n(2709),v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},y=r.createContext([null,function(e){}]),b=r.createContext([null,function(e){}]),k=r.createContext([null,function(e){}]),w=r.forwardRef((function(e,t){var n;(0,m.s)(g.k);var o=r.useRef(null),w=r.useRef(null),C=(0,i.n)(w,e.dir),O=e.chip,S=e.id,E=e.style,I=e.tabIndex,N=e.disabled,T=e.size,M=e.className,D=e.ariaDescribedBy,R=e.ariaLabelledBy,P=e.selection,_=void 0===P?x.selection:P,A=e.value,j=void 0===A?x.defaultValue:A,F=e.defaultData,z=void 0===F?x.defaultData:F,L=e.valueField,B=void 0===L?x.valueField:L,V=e.textField,H=void 0===V?x.textField:V,K=e.onChange,W=e.onDataChange,$=r.useMemo((function(){return O||h.A}),[O,h.A]);r.useImperativeHandle(o,(function(){return{element:w.current,props:e}})),r.useImperativeHandle(t,(function(){return o.current}));var q=r.useCallback((function(e,t){K&&o.current&&K.call(void 0,{value:e,target:o.current,syntheticEvent:t})}),[K]),U=function(e,t,n){var o=r.useState(e),i=o[0],a=o[1];return[i,function(e){var r=(0,d.TX)(t.state||i,v(v({},e),t));n&&n(r,e.event),a(r)}]}(j,{selection:_,state:j},q),G=U[0],Y=U[1],X=r.useCallback((function(e,t){W&&o.current&&W.call(void 0,{value:e,target:o.current,syntheticEvent:t})}),[W]),J=function(e,t,n){var o=r.useState(e),i=o[0],a=o[1];return[i,function(e){var r=(0,f.I)(t.state||i,v(v({},e),t));n&&n(r,e.event),a(r)}]}(e.data||z,{state:e.data,valueField:B},X),Z=J[0],Q=J[1],ee=r.useCallback((function(e,t){return e.push(t[B]),e}),[B]),te=r.useMemo((function(){return e.data||Z}),[e.data,Z]),ne=r.useMemo((function(){return j||G}),[j,G]),re=r.useMemo((function(){return te.reduce(ee,[])}),[te,ee]),oe=r.useCallback((function(e){return(0,a.Y)(B)(e)}),[B]),ie=r.useCallback((function(e){return(0,a.Y)(H)(e)}),[H]),ae=function(e){var t=r.useState(null),n=t[0],o=t[1];return[n,function(t){var n=(0,p.L)(t.payload,v(v({},t),e));o(n)}]}({items:re}),se=ae[0],le=ae[1],ce=(0,s.i)(e,o);return r.createElement(y.Provider,{value:[ne,Y]},r.createElement(b.Provider,{value:[se,le]},r.createElement(k.Provider,{value:[te,Q]},r.createElement("div",v({ref:w},ce,{role:"listbox",id:S,dir:C,style:E,tabIndex:(0,l.p)(I,N,void 0),className:(0,c.A)("k-chip-list",(n={"k-rtl":"rtl"===C,"k-disabled":N},n["k-chip-list-".concat(u.G.sizeMap[T]||T)]=T,n),M),"aria-labelledby":R,"aria-describedby":D}),te.map((function(e,t){return r.createElement($,{role:"option",dataItem:e,size:T,key:[oe(e),t].join("-"),text:ie(e),value:oe(e)})}))))))})),C={id:o.string,className:o.string,tabIndex:o.number,data:o.any,defaultData:o.arrayOf(o.any),onDataChange:o.func,value:o.oneOfType([o.any,o.arrayOf(o.any)]),defaultValue:o.oneOfType([o.any,o.arrayOf(o.any)]),onChange:o.func,selection:o.oneOf(["single","none","multiple"]),textField:o.string,valueField:o.string,disabled:o.bool,dir:o.oneOf(["ltr","rtl"]),ariaLabelledBy:o.string,ariaDescribedBy:o.string,size:o.oneOf([null,"small","medium","large"])},x={chip:h.A,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};w.displayName="KendoReactChipList",w.propTypes=C,w.defaultProps=x},5770:(e,t,n)=>{var r;n.d(t,{S:()=>r,I:()=>o}),function(e){e.remove="remove",e.add="add",e.reorder="reorder"}(r||(r={}));var o=function(e,t){switch(t.type){case r.add:break;case r.remove:return e.filter((function(e){return e[t.valueField]!==t.payload}));case r.reorder:break;default:return e}}},4163:(e,t,n)=>{var r;n.d(t,{E:()=>r,L:()=>o}),function(e){e.next="next",e.prev="prev",e.current="current",e.reset="reset"}(r||(r={}));var o=function(e,t){var n=t.items.findIndex((function(t){return t===e}));switch(t.type){case r.next:return n===t.items.length-1?e:t.items[n+1];case r.prev:return 0===n?e:t.items[n-1];case r.current:return t.payload;case r.reset:return null;default:return e}}},5209:(e,t,n)=>{n.d(t,{ey:()=>o,TX:()=>a});var r,o,i=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};!function(e){e.single="single",e.multiple="multiple",e.none="none"}(r||(r={})),function(e){e.toggle="toggle",e.remove="remove"}(o||(o={}));var a=function(e,t){switch(t.selection){case r.single:switch(t.type){case o.toggle:if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case o.remove:return t.payload===e?null:e;default:return e}case r.multiple:switch(t.type){case o.toggle:if(Array.isArray(e))return e.some((function(e){return e===t.payload}))?e.filter((function(e){return e!==t.payload})):i(i([],e,!0),[t.payload],!1);if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case o.remove:return Array.isArray(e)?e.some((function(e){return e===t.payload}))?e.filter((function(e){return e!==t.payload})):i(i([],e,!0),[t.payload],!1):e;default:return e}case r.none:return null;default:return e}}},2888:(e,t,n)=>{n.r(t),n.d(t,{Button:()=>r.z,ButtonGroup:()=>o.h,Chip:()=>z.A,ChipList:()=>L.jg,DropDownButton:()=>N,DropDownButtonItem:()=>S,FloatingActionButton:()=>X,FloatingActionButtonItem:()=>W,SplitButton:()=>x,SplitButtonItem:()=>m,Toolbar:()=>R,ToolbarItem:()=>_,ToolbarSeparator:()=>j,ToolbarSpacer:()=>F,toolbarButtons:()=>T.w});var r=n(7037),o=n(7711),i=n(3899),a=n(189),s=n(3198),l=n(3493),c=n(8047),u=n(2697),d=n(5407),p=function(e){var t,n=i.useCallback((function(t){e.onClick(t,e.index)}),[e]),r=e.dataItem.render||e.item||(void 0===e.item?e.render:null),o=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,a=i.createElement("li",{id:e.id,className:(0,c.A)("k-item",e.className,{"k-focus":e.focused}),tabIndex:-1,onClick:n,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},i.createElement("span",{tabIndex:-1,className:(0,c.A)("k-link k-menu-link",{"k-selected":e.dataItem.selected,"k-disabled":e.dataItem.disabled}),key:"icon"},r?i.createElement(r,{item:e.dataItem,itemIndex:e.index}):i.createElement(i.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass)&&i.createElement("span",{className:(0,c.A)("k-icon",(t={},t["k-i-".concat(e.dataItem.icon)]=e.dataItem.icon,t["".concat(e.dataItem.iconClass)]=e.dataItem.iconClass,t))}),e.dataItem.imageUrl&&i.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),o&&i.createElement("span",{className:"k-menu-link-text"},o))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,a,e):a};p.displayName="KendoReactButtonItem";var f,h=(f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},f(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){return null},t.propTypes={text:a.string,icon:a.string,iconClass:a.string,imageUrl:a.string,disabled:a.bool,render:a.any},t}(i.Component),g=function(e,t,n,r){if(n)return e;var o=Math.min(r-1,Math.max(0,e));switch(t){case l.R.enter:case l.R.space:case l.R.esc:return-1;case l.R.up:case l.R.left:return o-1<0?r-1:o-1;case l.R.down:case l.R.right:return o+1>=r?0:o+1;case l.R.home:return 0;case l.R.end:return r-1;default:return e}},v=n(9222);function y(e){var t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function b(e){var t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}var k=n(4006),w=n(2709),C=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focused:!1,focusedIndex:-1,opened:!1},n.wrapper=null,n.mainButton=null,n.list=null,n.guid=(0,s.M)(),n.skipFocus=!1,n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==l.R.down?n.opened&&e.keyCode===l.R.up&&(n.dispatchPopupEvent(e,!1),n.setState({focusedIndex:-1,opened:!1})):(n.dispatchPopupEvent(e,!0),n.setState({focusedIndex:0,opened:!0}));else{var r=void 0;if(e.keyCode===l.R.enter||e.keyCode===l.R.space?(e.preventDefault(),n.dispatchClickEvent(e,t),t>=0&&(r={focusedIndex:n.opened?-1:0,opened:!n.opened},n.dispatchPopupEvent(e,r.opened))):n.opened&&e.keyCode===l.R.esc&&(r={focusedIndex:-1,opened:!1},n.dispatchPopupEvent(e,r.opened)),n.opened){var o=g(t,e.keyCode,e.altKey,n.buttonsData.length);o!==t&&((r=r||{}).focusedIndex=o);var i=e.keyCode===l.R.up||e.keyCode===l.R.down||e.keyCode===l.R.left||e.keyCode===l.R.right;e.altKey||!i&&e.keyCode!==l.R.home&&e.keyCode!==l.R.end||e.preventDefault()}r&&n.setState(r)}},n.switchFocus=function(e){n.skipFocus=!0,e(),window.setTimeout((function(){return n.skipFocus=!1}),0)},n.onFocus=function(e){n.skipFocus||((0,d.N)(n.props.onFocus,e,n,void 0),n.setState({focused:!0}))},n.onItemClick=function(e,t){var r=n.opened;r&&n.setState({focusedIndex:0,opened:!1}),n.dispatchClickEvent(e,t),r&&n.dispatchPopupEvent(e,!1)},n.onBlur=function(e){n.skipFocus||(n.setState({focused:!1,focusedIndex:-1,opened:!1}),(0,d.N)(n.props.onBlur,e,n,void 0),n.opened&&n.dispatchPopupEvent(e,!1))},n.onPopupClose=function(){n.state.focused&&n.switchFocus((function(){n.element&&(n.element.removeAttribute("tabindex"),n.element.focus({preventScroll:!0}))}))},n.listRef=function(e){n.list=e,e&&n.state.focused&&n.switchFocus((function(){e.focus({preventScroll:!0}),n.element&&(n.element.tabIndex=-1)}))},n.onSplitPartClick=function(e){if(n.buttonsData.length){var t=!n.opened;n.dispatchPopupEvent(e,t),n.setState({focusedIndex:t?0:-1,opened:t,focused:!0})}},n.onDownSplitPart=function(e){e.preventDefault(),n.element&&document.activeElement!==n.element&&document.activeElement!==n.list&&n.element.focus()},n.onItemDown=function(e){document.activeElement===n.list&&e.preventDefault()},n.dispatchPopupEvent=function(e,t){(0,d.N)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},(0,k.s)(w.k),n}return C(t,e),Object.defineProperty(t.prototype,"opened",{get:function(){return void 0===this.props.opened?this.state.opened:this.props.opened},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter((function(e){return e&&e.type===m})).map((function(e){return e.props}));var t=this.isRtl(),n=t?"rtl":void 0,o=this.props,a=o.id,s=o.style,l=o.tabIndex,d=o.disabled;return i.createElement("div",{id:a,style:s,className:(0,c.A)("k-split-button","k-button-group",{"k-focus":this.state.focused},"k-rounded-".concat(u.G.roundedMap[this.props.rounded||"medium"]),this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:n,ref:function(t){return e.wrapper=t}},i.createElement(r.z,{ref:function(t){return e.mainButton=t&&t.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:function(t){return e.onItemClick(t,-1)},disabled:d||void 0,tabIndex:l,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,iconClass:this.props.iconClass,imageUrl:this.props.imageUrl,dir:n,"aria-disabled":d,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),i.createElement(r.z,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"arrow-s",className:"k-split-button-arrow",disabled:d||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:n,"aria-label":"menu toggling button"}),this.renderPopup(t))},t.prototype.componentDidMount=function(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()},Object.defineProperty(t.prototype,"element",{get:function(){return this.mainButton},enumerable:!1,configurable:!0}),t.prototype.dispatchClickEvent=function(e,t){this.isItemDisabled(t)||(-1===t?(0,d.N)(this.props.onButtonClick,e,this,void 0):(0,d.N)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))},t.prototype.renderPopup=function(e){var t,n=this.props.popupSettings,r=void 0===n?{}:n,o=this.state.focusedIndex;return i.createElement(v.G,{anchor:this.wrapper,show:this.opened,animate:r.animate,popupClass:(0,c.A)("k-menu-popup",r.popupClass),anchorAlign:r.anchorAlign||y(e),popupAlign:r.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},i.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":o>=0?"".concat(this.guid,"-").concat(o):void 0,className:(0,c.A)("k-group k-menu-group k-reset",(t={},t["k-menu-group-".concat(u.G.sizeMap[this.props.size]||this.props.size)]=this.props.size,t))},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.item,r=t.itemRender,o=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,a){return i.createElement(p,{className:"k-menu-item",dataItem:t,textField:o,focused:e.state.focusedIndex===a,onClick:e.onItemClick,onDown:e.onItemDown,render:r,item:n,key:a,index:a,id:"".concat(e.guid,"-").concat(a)})})):null},t.prototype.isItemDisabled=function(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled},t.prototype.isRtl=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction},t.propTypes={accessKey:a.string,ariaLabel:a.string,title:a.string,onButtonClick:a.func,onFocus:a.func,onBlur:a.func,onItemClick:a.func,onOpen:a.func,onClose:a.func,text:a.string,items:a.arrayOf(a.any),textField:a.string,tabIndex:a.number,disabled:a.bool,icon:a.string,iconClass:a.string,imageUrl:a.string,popupSettings:a.object,itemRender:a.any,item:a.func,className:a.string,buttonClass:a.string,dir:a.string},t.defaultProps={size:"medium",rounded:"medium",shape:"rectangle",fillMode:"solid",themeColor:"base"},t}(i.Component),O=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.render=function(){return null},t.propTypes={text:a.string,icon:a.string,iconClass:a.string,imageUrl:a.string,selected:a.bool,disabled:a.bool,render:a.any},t}(i.Component),E=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=function(){return I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},I.apply(this,arguments)},N=function(e){function t(t){var n=e.call(this,t)||this;return n.state={opened:!1,focused:!1,focusedIndex:-1},n.wrapper=null,n.mainButton=null,n.list=null,n.skipFocus=!1,n.guid=(0,s.M)(),n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==l.R.down?n.opened&&e.keyCode===l.R.up&&(n.dispatchPopupEvent(e,!1),n.setState({focusedIndex:-1,opened:!1})):(n.dispatchPopupEvent(e,!0),n.setState({focusedIndex:0,opened:!0}));else{var r=I({},n.state);if(e.keyCode===l.R.enter||e.keyCode===l.R.space?(t>=0&&n.dispatchClickEvent(e,t),e.preventDefault(),r.focusedIndex=n.opened?-1:0,r.opened=!n.opened,n.dispatchPopupEvent(e,r.opened)):n.opened&&e.keyCode===l.R.esc&&(r.focusedIndex=-1,r.opened=!1,n.dispatchPopupEvent(e,r.opened)),n.opened){var o=g(t,e.keyCode,e.altKey,n.buttonsData.length);r.focusedIndex=o;var i=e.keyCode===l.R.up||e.keyCode===l.R.down||e.keyCode===l.R.left||e.keyCode===l.R.right;e.altKey||!i&&e.keyCode!==l.R.home&&e.keyCode!==l.R.end||e.preventDefault()}n.setState(r)}},n.switchFocus=function(e){n.skipFocus=!0,e(),window.setTimeout((function(){return n.skipFocus=!1}),0)},n.handleFocus=function(e){n.skipFocus||(n.setState({focused:!0,focusedIndex:n.opened?0:-1}),(0,d.N)(n.props.onFocus,e,n,void 0))},n.handleBlur=function(e){n.skipFocus||(n.setState({focused:!1,opened:!1,focusedIndex:-1}),(0,d.N)(n.props.onBlur,e,n,void 0),n.opened&&n.dispatchPopupEvent(e,!1))},n.onItemClick=function(e,t){n.setState({focusedIndex:-1,opened:!1}),n.dispatchClickEvent(e,t),n.dispatchPopupEvent(e,!1)},n.onItemDown=function(e){document.activeElement===n.list&&e.preventDefault()},n.mouseDown=function(e){e.preventDefault(),n.element&&document.activeElement!==n.element&&document.activeElement!==n.list&&n.element.focus()},n.onPopupClose=function(){n.state.focused&&n.switchFocus((function(){n.element&&(n.element.removeAttribute("tabindex"),n.element.focus({preventScroll:!0}))}))},n.listRef=function(e){n.list=e,e&&n.state.focused&&n.switchFocus((function(){e.focus({preventScroll:!0}),n.element&&(n.element.tabIndex=-1)}))},n.onClickMainButton=function(e){if(n.buttonsData.length){var t=!n.opened;n.setState({opened:t,focused:!0,focusedIndex:t?0:-1}),n.dispatchPopupEvent(e,t)}},n.dispatchPopupEvent=function(e,t){(0,d.N)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},(0,k.s)(w.k),n}return E(t,e),Object.defineProperty(t.prototype,"opened",{get:function(){return void 0===this.props.opened?this.state.opened:this.props.opened},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t=this.isRtl(),n=t?"rtl":void 0,o=this.props,a=o.id,s=o.style,l=o.tabIndex,u=o.disabled;return this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter((function(e){return e&&e.type===S})).map((function(e){return e.props})),i.createElement("div",{id:a,style:s,className:(0,c.A)("k-dropdown-button",{"k-focus":this.state.focused},this.props.className),onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,dir:n,ref:function(t){return e.wrapper=t}},i.createElement(r.z,{size:this.props.size,shape:this.props.shape,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,disabled:u||void 0,tabIndex:l,accessKey:this.props.accessKey,icon:this.props.icon,iconClass:this.props.iconClass,className:this.props.buttonClass,imageUrl:this.props.imageUrl,dir:n,ref:function(t){return e.mainButton=t&&t.element},type:"button","aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),this.renderPopup(t))},t.prototype.componentDidMount=function(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()},Object.defineProperty(t.prototype,"element",{get:function(){return this.mainButton},enumerable:!1,configurable:!0}),t.prototype.dispatchClickEvent=function(e,t){this.isItemDisabled(t)||(0,d.N)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})},t.prototype.renderPopup=function(e){var t,n=this.props.popupSettings,r=void 0===n?{}:n,o=this.state.focusedIndex;return i.createElement(v.G,{anchor:this.wrapper,show:this.opened,animate:r.animate,popupClass:(0,c.A)("k-menu-popup",r.popupClass),anchorAlign:r.anchorAlign||y(e),popupAlign:r.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},i.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,"aria-activedescendant":o>=0?"".concat(this.guid,"-").concat(o):void 0,ref:this.listRef,className:(0,c.A)("k-group k-menu-group k-reset",(t={},t["k-menu-group-".concat(u.G.sizeMap[this.props.size]||this.props.size)]=this.props.size,t))},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.item,r=t.itemRender,o=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,a){return i.createElement(p,{className:"k-menu-item",dataItem:t,textField:o,focused:e.state.focusedIndex===a,onClick:e.onItemClick,onDown:e.onItemDown,render:r,item:n,index:a,key:a,id:"".concat(e.guid,"-").concat(a)})})):null},t.prototype.isItemDisabled=function(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled},t.prototype.isRtl=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction},t.propTypes={accessKey:a.string,ariaLabel:a.string,title:a.string,onFocus:a.func,onBlur:a.func,onItemClick:a.func,onOpen:a.func,onClose:a.func,items:a.arrayOf(a.any),textField:a.string,tabIndex:a.number,disabled:a.bool,icon:a.string,iconClass:a.string,imageUrl:a.string,popupSettings:a.object,itemRender:a.func,item:a.func,className:a.string,buttonClass:a.string,dir:a.string},t.defaultProps={size:"medium",rounded:"medium",shape:"rectangle",fillMode:"solid",themeColor:"base"},t}(i.Component),T=n(1889),M=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(){return D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},D.apply(this,arguments)},R=function(e){function t(n){var r=e.call(this,n)||this;return r._element=null,r.offsetHeight=0,r.offsetWidth=0,r.buttons=[],r.focusedSelector=r.selectors.map((function(e){return e+":focus"})).join(","),r.setTabIndex=function(e){var n=r.props.tabIndex,o=void 0===n?t.defaultProps.tabIndex:n;r.buttons.forEach((function(t,n){t.tabIndex=n===e?o:-1}))},r.onKeyDown=function(e){var t=e.target;if((e.keyCode===l.R.left||e.keyCode===l.R.right)&&!e.defaultPrevented&&-1!==r.buttons.findIndex((function(e){return e===t}))){var n=r.focusedIndex;e.keyCode===l.R.left?r.focusButton(n,n-1):r.focusButton(n,n+1)}},r.onWindowResize=function(e){var t=r.element;if(t){var n=t.offsetWidth,o=t.offsetHeight;if(r.offsetWidth!==n||r.offsetHeight!==o){r.offsetWidth=n,r.offsetHeight=o;var i={offsetWidth:r.offsetWidth,offsetHeight:r.offsetHeight};r.props.onResize&&r.props.onResize.call(void 0,D(D({target:r},i),{nativeEvent:e}))}}},(0,k.s)(w.k),r}return M(t,e),Object.defineProperty(t.prototype,"selectors",{get:function(){return this.props.buttons||T.w},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"focusedIndex",{get:function(){var e=this.element&&this.element.querySelector(this.focusedSelector);return Math.max(0,this.buttons.findIndex((function(t){return t===e})))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.onWindowResize);var e=this.element;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,!1!==this.props.keyboardNavigation&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(0)))},t.prototype.componentDidUpdate=function(){var e=this.element;e&&!1!==this.props.keyboardNavigation&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(this.focusedIndex))},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.onWindowResize),this.buttons.length=0},t.prototype.render=function(){var e=this;return i.createElement("div",{id:this.props.id,className:(0,c.A)("k-widget k-toolbar",this.props.className),style:this.props.style,role:void 0!==this.props.role?this.props.role||void 0:"toolbar",dir:this.props.dir,ref:function(t){return e._element=t},onKeyDown:!1!==this.props.keyboardNavigation?this.onKeyDown:void 0},this.props.children)},t.prototype.focusButton=function(e,n){var r=this.props.tabIndex,o=void 0===r?t.defaultProps.tabIndex:r,i=this.buttons[n];if(i){i.tabIndex=o,i.focus();var a=this.buttons[e];a&&(a.tabIndex=-1)}},t.propTypes={tabIndex:a.number,dir:a.string,keyboardNavigation:a.bool,style:a.object,className:a.string,role:a.string,onResize:a.func,buttons:a.arrayOf(a.string)},t.defaultProps={tabIndex:0},t}(i.Component),P=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t}return P(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return i.createElement("span",{id:this.props.id,className:this.props.className,style:this.props.style,ref:function(t){return e._element=t}},this.props.children)},t.propTypes={className:a.string},t}(i.PureComponent),A=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(t,e),t.prototype.render=function(){return i.createElement(_,{className:"k-separator"})},t}(i.PureComponent),F=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useRef(null);i.useImperativeHandle(r,(function(){return{element:n.current}})),i.useImperativeHandle(t,(function(){return{element:n.current}}));var o=i.useMemo((function(){return(0,c.A)("k-spacer",e.className)}),[e.className]);return i.createElement("span",{ref:n,className:o})}));F.displayName="KendoReactToolbarSpacer",F.propTypes={className:a.string};var z=n(1711),L=n(228),B=n(8259),V=n(8199),H=n(4703),K=function(){return K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},K.apply(this,arguments)},W=i.forwardRef((function(e,t){var n=e.className,r=e.disabled,o=e.text,a=e.icon,s=e.style,l=e.id,u=e.focused,d=e.tabIndex,p=e.index,f=e.dataItem,h=e.item,m=e.onDown,g=e.onClick,v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["className","disabled","text","icon","style","id","focused","tabIndex","index","dataItem","item","onDown","onClick"]),y=i.useRef(null),b=i.useCallback((function(){y.current&&y.current.focus()}),[]),k=i.useCallback((function(){return{element:y.current,focus:b}}),[b]);i.useImperativeHandle(t,k);var w=i.useCallback((function(e){g&&void 0!==p&&!r&&g(e,p)}),[g,p]),C=i.useMemo((function(){return(0,c.A)("k-fab-item",{"k-focus":u,"k-disabled":r},n)}),[n,r,u]),x=h;return i.createElement("li",K({ref:y,id:l,className:C,style:s,role:"menuitem",tabIndex:(0,H.p)(d,r),"aria-disabled":r,"aria-label":"".concat(o||""," floatingactionbutton item"),onClick:w,onMouseDown:m,onPointerDown:m},v),x?i.createElement(x,{itemIndex:p,item:f}):i.createElement(i.Fragment,null,o&&i.createElement("span",{className:"k-fab-item-text"},o),a&&i.createElement("span",{className:(0,c.A)("k-fab-item-icon k-icon k-i-".concat(a))})))}));W.propTypes={className:a.string,style:a.object,children:a.any,disabled:a.bool,focused:a.bool,index:a.number,icon:a.string,text:a.string,tabIndex:a.number,customProp:a.any},W.displayName="KendoFloatingActionButtonItem";var $="16px",q=function(e){return"number"==typeof e?e+"px":e},U=function(e,t){var n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},G=function(e,t){var n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},Y=function(){return Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Y.apply(this,arguments)},X=i.forwardRef((function(e,t){(0,k.s)(w.k);var n=e.align,r=void 0===n?J.align:n,o=e.alignOffset,a=e.className,p=e.disabled,f=e.icon,h=e.iconClass,m=e.id,g=e.items,y=e.item,b=e.text,C=e.positionMode,x=void 0===C?J.positionMode:C,O=e.shape,S=void 0===O?J.shape:O,E=e.size,I=void 0===E?J.size:E,N=e.style,T=e.rounded,M=void 0===T?J.rounded:T,D=e.themeColor,R=void 0===D?J.themeColor:D,P=e.overlayStyle,_=e.tabIndex,A=e.accessKey,j=e.popupSettings,F=void 0===j?{}:j,z=e.modal,L=e.onClick,K=e.onItemClick,X=e.onFocus,Z=e.onBlur,Q=e.onKeyDown,ee=e.onOpen,te=e.onClose,ne=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["align","alignOffset","className","disabled","icon","iconClass","id","items","item","text","positionMode","shape","size","style","rounded","themeColor","overlayStyle","tabIndex","accessKey","popupSettings","modal","onClick","onItemClick","onFocus","onBlur","onKeyDown","onOpen","onClose"]),re=(0,B.u)(),oe=re?re+2:100,ie=i.useRef(null),ae=i.useRef(null),se=i.useRef(null),le=i.useRef(null),ce=i.useCallback((function(){ae.current&&ae.current.focus()}),[]),ue=i.useCallback((function(){return{element:ae.current,focus:ce}}),[ce]);i.useImperativeHandle(ie,ue),i.useImperativeHandle(t,(function(){return ie.current}));var de=i.useState(!1),pe=de[0],fe=de[1],he=i.useState(!1),me=he[0],ge=he[1],ve=i.useState(-1),ye=ve[0],be=ve[1],ke=i.useMemo((function(){return(0,s.M)()}),[]),we=(0,V.n)(ae,e.dir),Ce="rtl"===we,xe=i.useMemo((function(){return(0,s.M)()}),[]);i.useEffect((function(){!function(e,t,n,r){var o=t.horizontal,i=t.vertical;if(e.current){var a=n&&void 0!==n.x?q(n.x):$,s=n&&void 0!==n.x?"calc(50% + ".concat(q(n.x),")"):"50%",l=n&&void 0!==n.y?q(n.y):$,c=n&&void 0!==n.y?"calc(50% + ".concat(q(n.y),")"):"50%";e.current.style.setProperty(function(e,t){return{end:t?"left":"right",center:"left",start:t?"right":"left"}[e.horizontal||"end"]}(t,r),"center"===o?s:a),e.current.style.setProperty(function(e){return{top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]}(t),"middle"===i?c:l),r&&("top"!==i&&"bottom"!==i||"start"!==o||e.current.style.setProperty("left","unset"),"middle"===i&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===i&&"start"===o&&e.current.style.setProperty("left","unset"))}}(ae,r,o,Ce)}),[ae,r,o,Ce]),i.useEffect((function(){me&&ae&&ae.current&&ae.current.focus()}),[me,ae]);var Oe=i.useCallback((function(e,t){g&&(0,d.N)(t?ee:te,e,ue(),void 0)}),[ee,te,g]),Se=i.useCallback((function(e){e.target&&!p&&(!g&&L?(0,d.N)(L,e,ue(),void 0):(fe(!pe),ge(!0),be(pe?-1:0),Oe(e,!pe)))}),[fe,ge,be,L,Oe,pe,g,p]),Ee=i.useCallback((function(e){ge(!0),be(pe?0:-1),X&&(0,d.N)(X,e,ue(),void 0)}),[X,ge,be]),Ie=i.useCallback((function(e){ge(!1),fe(!1),be(-1),(0,d.N)(Z,e,ue(),void 0),pe&&Oe(e,!1)}),[Z,ge,fe,be,Oe]),Ne=i.useCallback((function(e){e.preventDefault()}),[]),Te=i.useCallback((function(e,t){g&&(g[t].disabled||(0,d.N)(K,e,ue(),{itemProps:g[t],itemIndex:t}))}),[K]),Me=i.useCallback((function(e,t){e.target&&g&&(be(t),fe(!1),Te(e,t),Oe(e,!1))}),[be,fe,Te,Oe]),De=i.useCallback((function(e){document.activeElement===ae.current&&e.preventDefault()}),[ae,document.activeElement]),Re=i.useCallback((function(e){var t=ye,n=g?g.length-1:-1,o="bottom"===r.vertical;switch(e.keyCode){case l.R.enter:case l.R.space:t>=0&&Te(e,t),e.preventDefault(),fe(!pe),be(pe?-1:0);break;case l.R.esc:e.preventDefault(),fe(!1),be(-1);break;case l.R.home:e.preventDefault(),be(0);break;case l.R.end:e.preventDefault(),be(n);break;case l.R.down:case l.R.right:e.preventDefault(),t<n&&!o&&be(t+1),t>0&&o&&be(t-1);break;case l.R.up:case l.R.left:e.preventDefault(),t>0&&!o&&be(t-1),t<n&&o&&be(t+1)}(0,d.N)(Q,e,ue(),void 0)}),[Q,ye,be,Ce,fe]),Pe=i.useMemo((function(){var e;return(0,c.A)("k-fab k-fab-solid",((e={})["k-fab-".concat(S)]=S,e["k-fab-sm"]="small"===I,e["k-fab-md"]="medium"===I,e["k-fab-lg"]="large"===I,e["k-disabled"]=p,e["k-pos-absolute"]="absolute"===x,e["k-pos-fixed"]="fixed"===x,e["k-focus"]=me,e["k-rounded-".concat(u.G.roundedMap[M]||M)]=M,e["k-fab-solid-".concat(R)]=R,e),"k-".concat(r.vertical,"-").concat(r.horizontal),a)}),[R,I,M,S,p,x,r,me,a]),_e=g&&g.map((function(e,t){return i.createElement(W,Y({},e,{key:t,index:t,id:"".concat(xe,"-").concat(t),disabled:p||e.disabled,focused:ye===t,dataItem:e,item:y,className:(0,c.A)(e.className,(n=we||"ltr",o=r.horizontal,{rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[n]["end"===o?"end":"start"])),onClick:Me,onDown:De}));var n,o})),Ae=f&&!b,je=(ae.current?ae.current.offsetWidth:0)/2-16;return i.createElement(B.$.Provider,{value:oe},i.createElement(i.Fragment,null,i.createElement("button",Y({ref:ae,id:m||ke,role:g?"menubutton":"button",type:"button","aria-disabled":p,"aria-expanded":g?pe:void 0,"aria-haspopup":!!g,"aria-label":"".concat(b||""," floatingactionbutton"),"aria-owns":g?xe:void 0,"aria-activedescendant":ye>=0&&g?"".concat(xe,"-").concat(ye):void 0,tabIndex:(0,H.p)(_,p),accessKey:A,dir:we,disabled:p,className:Pe,style:N,onClick:Se,onMouseDown:Ne,onFocus:Ee,onBlur:Ie,onKeyDown:Re},ne),f?i.createElement("span",{role:"presentation",className:(0,c.A)("k-fab-icon k-icon k-i-".concat(f))}):h?i.createElement("span",{role:"presentation",className:h}):null,b&&i.createElement("span",{className:"k-fab-text"},b)),z&&pe&&i.createElement("div",{className:"k-overlay",style:Y({zIndex:oe},P)}),i.createElement(v.G,{ref:le,anchor:ae.current,show:pe,animate:F.animate,popupClass:(0,c.A)("k-popup-transparent k-fab-popup",F.popupClass),anchorAlign:F.anchorAlign||U(r,Ce),popupAlign:F.popupAlign||G(r,Ce),style:{boxShadow:"none"}},i.createElement("ul",{ref:se,role:"menu","aria-labelledby":m,id:xe,className:(0,c.A)("k-fab-items",{"k-fab-items-bottom":"bottom"!==r.vertical,"k-fab-items-top":"bottom"===r.vertical}),style:{paddingLeft:Ae?je:void 0,paddingRight:Ae?je:void 0}},_e))))}));X.propTypes={className:a.string,style:a.object,id:a.string,dir:a.string,tabIndex:a.number,accessKey:a.string,disabled:a.bool,icon:a.string,iconClass:a.string,text:a.string,alignOffset:a.shape({x:a.oneOfType([a.number,a.string]),y:a.oneOfType([a.number,a.string])}),align:a.shape({vertical:a.oneOf(["top","middle","bottom"]),horizontal:a.oneOf(["start","center","end"])}),positionMode:a.oneOf(["absolute","fixed"]),shape:a.oneOf([null,"rectangle","square"]),size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),themeColor:a.oneOf([null,"primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:a.bool,overlayStyle:a.object};var J={align:{vertical:"bottom",horizontal:"end"},shape:"rectangle",size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};X.displayName="KendoFloatingActionButton"},2709:(e,t,n)=>{n.d(t,{k:()=>r});var r={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660123506,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},1889:(e,t,n)=>{n.d(t,{w:()=>i,Z:()=>a});var r=':not(.k-disabled):not([disabled]):not([disabled="true"])',o=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",i=["button"+r+o,".k-button-group > button"+r+o,".k-dropdownlist"+r,".k-colorpicker"+r];const a={styles:{button:"k-button",flat:"k-flat",outline:"k-outline",clear:"k-button-clear",primary:"k-primary","state-selected":"k-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched",ltr:"k-ltr",rtl:"k-rtl"}}},6516:(e,t,n)=>{n.r(t),n.d(t,{Dialog:()=>I,DialogActionsBar:()=>c,DialogPropsContext:()=>E,Window:()=>X,WindowActionsBar:()=>W,WindowPropsContext:()=>Y});var r=n(3899),o=n(994),i=n(189),a=n(7037),s=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.id,i=e.closeIcon;return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",id:o},r.createElement("div",{className:"k-window-title k-dialog-title"},t),r.createElement("div",{className:"k-window-actions k-dialog-actions"},i&&r.createElement(a.z,{role:"button","aria-label":"Close",onClick:n,icon:"x",fillMode:"flat",className:"k-window-action k-dialog-action k-dialog-close"})))},l=n(8047),c=function(e){var t=e.layout,n=void 0===t?p.layout:t,o=e.children,i=(0,l.A)("k-dialog-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return r.createElement("div",{className:i},o)};c.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var u,d,p={layout:"stretched"},f=n(3198),h=n(5407),m=n(3493),g=n(8259),v=n(7827),y=n(848),b=n(4006),k={name:"@progress/kendo-react-dialogs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660123908,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},w="data-windowid",C=function(e,t,n){var r=e;if(t&&t.defaultView){var o=t.querySelectorAll(".k-window:not(.k-dialog), .k-dialog-wrapper"),i=!1;return o.forEach((function(e){var o=t.defaultView.getComputedStyle(e,null);if(e.getAttribute(w)!==n&&null!==o.zIndex){var a=parseInt(o.zIndex,10);a>=r&&(r=a,i=!0)}})),i?r+2:r}return r},x=(u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},u(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),O=function(){return O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},O.apply(this,arguments)},S=function(e){function t(t){var n=e.call(this,t)||this;return n.context=0,n._id=(0,f.M)(),n.titleId=n.generateTitleId(),n.contentId=n.generateContentId(),n.onCloseDialog=function(e){e.preventDefault(),(0,h.N)(n.props.onClose,e,n,void 0)},n.onKeyDown=function(e){e.keyCode===m.R.esc&&n.props.onClose&&(e.preventDefault(),n.onCloseDialog(e));var t=n.element;if(t&&e.keyCode===m.R.tab){var r=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),o=r[0],i=r[r.length-1],a=n.getDocument();e.shiftKey?(a&&a.activeElement===o||a&&a.activeElement===n.element)&&(i.focus(),e.preventDefault()):a&&a.activeElement===i&&(o.focus(),e.preventDefault())}},n.getCurrentZIndex=function(){return n.state&&void 0!==n.context?n.state.zIndex>(n.context?n.context+2:0)?n.state.zIndex:n.context+2:n.context?n.context:10002},n.getDocument=function(){return n.props.appendTo?n.props.appendTo.ownerDocument:document},(0,b.s)(k),n.state={zIndex:C(n.getCurrentZIndex(),n.getDocument(),n._id)},n}return x(t,e),t.prototype.componentDidMount=function(){this.element&&this.props.autoFocus&&this.element.focus()},t.prototype.render=function(){var e,t=this,n=void 0!==this.props.id?this.props.id:this.titleId,i=this.props,a=i.title,l=i.width,c=i.height,u=i.children,d=i.minWidth,p=i.dir,f=i.style,h=i.contentStyle,m=r.Children.toArray(u),y=this.getContent(m),b=this.getActionBar(m),k=a?{"aria-labelledby":n}:null,C=void 0===this.props.closeIcon||this.props.closeIcon,x=this.getCurrentZIndex(),S=r.createElement(g.$.Provider,{value:x},r.createElement("div",O({},((e={})[w]=this._id,e),{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.onKeyDown,tabIndex:0,dir:p,style:O({zIndex:x},f),ref:function(e){return t.element=e}}),r.createElement("div",{className:"k-overlay"}),r.createElement("div",O({},k,{className:"k-widget k-window k-dialog",role:"dialog","aria-modal":!0,"aria-describedby":this.contentId,style:{width:l,height:c,minWidth:d}}),this.props.title&&r.createElement(s,{closeIcon:C,onCloseButtonClick:this.onCloseDialog,id:n},a),r.createElement("div",{className:"k-window-content k-dialog-content",style:h,id:this.contentId},y),b)));return v.N?null!==this.props.appendTo?o.createPortal(S,this.props.appendTo||document.body):S:null},t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===c}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==c}))},t.prototype.generateTitleId=function(){return"dialog-title"+this._id},t.prototype.generateContentId=function(){return"dialog-content"+this._id},t.displayName="Dialog",t.propTypes={title:i.any,id:i.string,dir:i.string,style:i.object,closeIcon:i.bool,width:i.oneOfType([i.number,i.string]),height:i.oneOfType([i.number,i.string]),minWidth:i.oneOfType([i.number,i.string]),autoFocus:i.bool},t.defaultProps={autoFocus:!1},t.contextType=g.$,t}(r.Component),E=(0,y.Y)(),I=(0,y.u)(E,S);I.displayName="KendoReactDialog",function(e){e.DEFAULT="DEFAULT",e.FULLSCREEN="FULLSCREEN",e.MINIMIZED="MINIMIZED"}(d||(d={}));var N,T=n(499),M="dialogs.windowMaximizeButton",D="dialogs.windowMinimizeButton",R="dialogs.windowRestoreButton",P="dialogs.windowCloseButton",_=((N={})[M]="maximize",N[D]="minimize",N[R]="restore",N[P]="close",N),A=function(){return A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},A.apply(this,arguments)},j=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.onMinimizeButtonClick,i=e.onFullScreenButtonClick,s=e.onRestoreButtonClick,l=e.onDoubleClick,c=e.stage,u=e.forwardedRef,p=e.id,f=(0,T.useLocalization)(),h=e.minimizeButton?r.createElement(e.minimizeButton,{onClick:o,stage:c}):r.createElement(a.z,{fillMode:"flat",icon:"window-minimize",onClick:o,"aria-label":f.toLanguageString(D,_[D])}),m=e.maximizeButton?r.createElement(e.maximizeButton,{onClick:i,stage:c}):r.createElement(a.z,{fillMode:"flat",icon:"window-maximize",onClick:i,"aria-label":f.toLanguageString(M,_[M])}),g=e.restoreButton?r.createElement(e.restoreButton,{onClick:s,stage:c}):r.createElement(a.z,{fillMode:"flat",icon:"window-restore",onClick:s,"aria-label":f.toLanguageString(R,_[R])}),v=e.closeButton?r.createElement(e.closeButton,{onClick:n,stage:c}):r.createElement(a.z,{fillMode:"flat",icon:"close",onClick:n,"aria-label":f.toLanguageString(P,_[P])});return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:u,onDoubleClick:l},r.createElement("div",{className:"k-window-title",id:p},t||""),r.createElement("div",{className:"k-window-actions"},c===d.DEFAULT&&h,c===d.DEFAULT&&m,c!==d.DEFAULT&&g,v))},F=r.forwardRef((function(e,t){return r.createElement(j,A({},e,{forwardedRef:t}))})),z=n(1779),L=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=["n","e","s","w","se","sw","ne","nw"],V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",null," ",B.map((function(t,n){return r.createElement(z._,{key:n,onDrag:function(n){var r=n.event;r.originalEvent.preventDefault(),e.props.onResize(r,{end:!1,direction:t})},onRelease:function(n){var r=n.event;r.originalEvent.preventDefault(),e.props.onResize(r,{end:!0,direction:t})}},r.createElement("div",{className:"k-resize-handle k-resize-"+t,style:{display:"block",touchAction:"none"}}))})))},t}(r.Component),H=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},t.prototype.render=function(){return this.props.children},t}(r.Component),W=function(e){var t=e.layout,n=void 0===t?$.layout:t,o=e.children,i=(0,l.A)("k-window-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return r.createElement("div",{className:i},o)};W.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var $={layout:"end"},q=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},U.apply(this,arguments)},G=function(e){function t(t){var n=e.call(this,t)||this;return n.context=0,n.draggable=null,n.offSetCoordinates={x:0,y:0},n._id=(0,f.M)(),n.titleId=n.generateTitleId(),n.onKeyDown=function(e){if(e.target===e.currentTarget){var t=n.props.minWidth||120,r=n.props.minHeight||100;if(e.ctrlKey&&n.props.resizable){switch(e.keyCode){case m.R.up:e.preventDefault(),r<=n.height-5&&n.setState({height:n.height-5});break;case m.R.down:e.preventDefault(),n.setState({height:n.height+5});break;case m.R.left:t<=n.width-5&&n.setState({width:n.width-5});break;case m.R.right:n.setState({width:n.width+5});break;default:return}n.dispatchMoveEvent(n.props.onResize,e,!1,void 0)}else if(e.altKey)switch(e.keyCode){case m.R.up:n.windowStage===d.MINIMIZED?(n.handleRestore(e),(0,h.N)(n.props.onStageChange,e,n,{state:d.DEFAULT})):n.windowStage===d.DEFAULT&&(n.handleFullscreen(e),(0,h.N)(n.props.onStageChange,e,n,{state:d.FULLSCREEN}));break;case m.R.down:n.windowStage===d.FULLSCREEN?(n.handleRestore(e),(0,h.N)(n.props.onStageChange,e,n,{state:d.DEFAULT})):n.windowStage===d.DEFAULT&&(n.handleMinimize(e),(0,h.N)(n.props.onStageChange,e,n,{state:d.MINIMIZED}))}else{if(!e.ctrlKey)switch(e.keyCode){case m.R.esc:return void(n.props.onClose&&n.handleCloseWindow(e));case m.R.up:n.setState({top:n.state.top-5});break;case m.R.down:n.setState({top:n.state.top+5});break;case m.R.left:n.setState({left:n.state.left-5});break;case m.R.right:n.setState({left:n.state.left+5});break;default:return}n.dispatchMoveEvent(n.props.onMove,e,!1,void 0)}}},n.onPress=function(e){var t=e.event;n.windowCoordinatesState.differenceLeft=t.pageX-n.left,n.windowCoordinatesState.differenceTop=t.pageY-n.top},n.onDrag=function(e){var t=e.event;t.originalEvent.preventDefault(),n.windowStage!==d.FULLSCREEN&&n.props.draggable&&(n.setState({top:Math.max(t.pageY-n.windowCoordinatesState.differenceTop,0),left:t.pageX-n.windowCoordinatesState.differenceLeft,isDragging:!0}),n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!1))},n.onRelease=function(e){var t=e.event;n.windowStage!==d.FULLSCREEN&&n.props.draggable&&n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!0),n.setState({isDragging:!1})},n.onFocus=function(){n._blurTimeout?(clearTimeout(n._blurTimeout),n._blurTimeout=void 0):n.setState({focused:!0,zIndex:C(n.getCurrentZIndex(),n.getDocument(),n._id)})},n.onBlur=function(){clearTimeout(n._blurTimeout);var e=n.getWindow();e&&(n._blurTimeout=e.setTimeout((function(){n.setState({focused:!1}),n._blurTimeout=void 0})))},n.getInitialTop=function(){if(void 0!==n.props.top)return n.props.top;if(void 0!==n.props.initialTop)return n.props.initialTop;var e=300;if(void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),n.props.appendTo)return n.props.appendTo.offsetHeight/2-e/2;var t=n.getWindow();return t?t.innerHeight/2-e/2:0},n.getInitialLeft=function(){if(void 0!==n.props.left)return n.props.left;if(void 0!==n.props.initialLeft)return n.props.initialLeft;var e=300;if(void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),n.props.appendTo)return n.props.appendTo.offsetWidth/2-e/2;var t=n.getWindow();return t?t.innerWidth/2-e/2:0},n.getInitialWidth=function(){var e=300;return void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),e},n.getInitialHeight=function(){var e=300;return void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),e},n.handleMinimize=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height,n.setState({stage:d.MINIMIZED,height:0}),(0,h.N)(n.props.onStageChange,e,n,{state:d.MINIMIZED})},n.handleFullscreen=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height;var t=n.getWindow(),r=t?t.innerWidth:0,o=t?t.innerHeight:0;n.setState({left:0,top:0,width:n.props.appendTo?n.props.appendTo.offsetWidth:r,height:n.props.appendTo?n.props.appendTo.offsetHeight:o,stage:d.FULLSCREEN}),(0,h.N)(n.props.onStageChange,e,n,{state:d.FULLSCREEN})},n.handleRestore=function(e){e.preventDefault(),n.windowStage===d.FULLSCREEN?n.setState({stage:d.DEFAULT,left:n.windowCoordinatesState.leftBeforeAction,top:n.windowCoordinatesState.topBeforeAction,width:n.windowCoordinatesState.widthBeforeAction,height:n.windowCoordinatesState.heightBeforeAction}):n.windowStage===d.MINIMIZED&&n.setState({stage:d.DEFAULT,height:n.windowCoordinatesState.heightBeforeAction}),(0,h.N)(n.props.onStageChange,e,n,{state:d.DEFAULT})},n.handleCloseWindow=function(e){e.preventDefault(),(0,h.N)(n.props.onClose,e,n,{state:void 0})},n.handleDoubleClick=function(e){n.windowStage===d.FULLSCREEN||n.windowStage===d.MINIMIZED?n.handleRestore(e):n.handleFullscreen(e)},n.handleResize=function(e,t){var r=n.props.appendTo?e.pageX-n.offSetCoordinates.x:e.pageX,o=n.props.appendTo?e.pageY-n.offSetCoordinates.y:e.pageY,i=n.width,a=n.height,s=n.props.minWidth||120,l=n.props.minHeight||100,c=n.top-o,u=n.left-r,d=r-n.left,p=o-n.top,f=Object.assign({},n.state,{isDragging:!t.end});t.direction.indexOf("n")>=0&&l-(a+c)<0&&(n.top>0&&(f.height=a+c),f.top=o),t.direction.indexOf("s")>=0&&l-p<0&&(f.height=p),t.direction.indexOf("w")>=0&&s-(i+u)<0&&(n.left>0&&(f.width=i+u),f.left=r),t.direction.indexOf("e")>=0&&s-d<0&&(f.width=d),n.setState(f),n.dispatchMoveEvent(n.props.onResize,e,!0,t.end)},n.dispatchMoveEvent=function(e,t,r,o){e&&e.call(void 0,{nativeEvent:t.nativeEvent?t.nativeEvent:t.originalEvent,drag:r,end:o,target:n,left:n.state.left,top:n.state.top,width:n.state.width,hight:n.state.height,height:n.state.height})},n.handleBrowserWindowResize=function(){if(n.windowStage===d.FULLSCREEN){var e=n.getWindow(),t=e?e.innerWidth:0,r=e?e.innerHeight:0;n.setState({width:n.props.appendTo?n.props.appendTo.offsetWidth:t,height:n.props.appendTo?n.props.appendTo.offsetHeight:r})}},n.getCurrentZIndex=function(){return n.state&&void 0!==n.context?n.state.zIndex>(n.context?n.context+2:0)?n.state.zIndex:n.context+2:n.context?n.context:10002},n.getDocument=function(){return n.props.appendTo?n.props.appendTo.ownerDocument:document},n.getWindow=function(){var e=n.getDocument();return e&&e.defaultView},(0,b.s)(k),n.state={stage:n.props.stage||d.DEFAULT,isDragging:!1,top:n.getInitialTop(),left:n.getInitialLeft(),width:n.getInitialWidth(),height:n.getInitialHeight(),focused:!0,zIndex:C(n.getCurrentZIndex(),n.getDocument(),n._id)},n.windowCoordinatesState={leftBeforeAction:n.getInitialLeft(),topBeforeAction:n.getInitialTop(),widthBeforeAction:n.getInitialWidth(),heightBeforeAction:n.getInitialHeight()},n}return q(t,e),t.prototype.componentDidMount=function(){var e=this.getWindow();e&&e.addEventListener("resize",this.handleBrowserWindowResize);var t=this.getDocument();if(this.props.appendTo&&t){var n=this.props.appendTo.getBoundingClientRect(),r=t.body.getBoundingClientRect();this.offSetCoordinates.x=n.left-r.left,this.offSetCoordinates.y=n.top-r.top}},t.prototype.componentWillUnmount=function(){var e=this.getWindow();e&&e.removeEventListener("resize",this.handleBrowserWindowResize)},t.prototype.componentDidUpdate=function(){var e=this.getDocument();if(this.props.appendTo&&e){var t=this.props.appendTo.getBoundingClientRect(),n=e.body.getBoundingClientRect();this.offSetCoordinates.x=t.left-n.left,this.offSetCoordinates.y=t.top-n.top}},t.prototype.render=function(){var e,t=this,n=r.Children.toArray(this.props.children),i=this.getContent(n),a=this.getActionBar(n),s=this.getCurrentZIndex(),c=(0,l.A)("k-widget","k-window",this.props.className,{"k-window-minimized":"MINIMIZED"===this.state.stage},{"k-window-focused":this.state.focused}),u=r.createElement(g.$.Provider,{value:s},r.createElement(r.Fragment,null,this.props.modal&&r.createElement("div",{className:"k-overlay",style:U({zIndex:s},this.props.overlayStyle)}),r.createElement("div",U({},((e={})[w]=this._id,e),{tabIndex:0,role:"dialog","aria-labelledby":this.titleId,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,ref:function(e){t.windowElement=e,t.element=e},className:c,style:U({top:this.top,left:this.left,width:this.width,height:this.height||"",zIndex:s},this.props.style)}),r.createElement(K,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},r.createElement(z._,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(e){return t.draggable=e}},r.createElement(F,{stage:this.windowStage,onDoubleClick:this.props.doubleClickStageChange?this.handleDoubleClick:void 0,onMinimizeButtonClick:this.handleMinimize,onFullScreenButtonClick:this.handleFullscreen,onRestoreButtonClick:this.handleRestore,onCloseButtonClick:this.handleCloseWindow,closeButton:this.props.closeButton,minimizeButton:this.props.minimizeButton,maximizeButton:this.props.maximizeButton,restoreButton:this.props.restoreButton,id:this.titleId},this.props.title)),this.windowStage!==d.MINIMIZED?r.createElement(r.Fragment,null,r.createElement("div",{className:"k-window-content"},i),a):null,this.windowStage===d.DEFAULT&&this.props.resizable?r.createElement(V,{onResize:this.handleResize}):null))));return v.N?null!==this.props.appendTo?o.createPortal(u,this.props.appendTo||document.body):u:null},Object.defineProperty(t.prototype,"top",{get:function(){return this.windowStage!==d.FULLSCREEN?Math.max(this.props.top||this.state.top,0):0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.windowStage!==d.FULLSCREEN?Math.max(this.props.left||this.state.left,0):0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){var e=this.props.width||this.state.width;if(this.windowStage===d.FULLSCREEN){if(this.props.appendTo)return this.props.appendTo.offsetWidth;var t=this.getWindow();e=t?t.innerWidth:0}return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var e=this.props.height||this.state.height;if(this.windowStage===d.FULLSCREEN){if(this.props.appendTo)return this.props.appendTo.offsetHeight;var t=this.getWindow();e=t?t.innerHeight:0}else this.windowStage===d.MINIMIZED&&(e=0);return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!1,configurable:!0}),t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===W}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==W}))},t.prototype.generateTitleId=function(){return"window-title-"+this._id},t.displayName="Window",t.propTypes={width:i.number,height:i.number,left:i.number,top:i.number,initialWidth:i.number,initialHeight:i.number,initialLeft:i.number,initialTop:i.number,minWidth:i.number,minHeight:i.number,resizable:i.bool,draggable:i.bool,title:i.any,shouldUpdateOnDrag:i.bool,stage:i.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"]),className:i.string,style:i.object,overlayStyle:i.object},t.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0,modal:!1,doubleClickStageChange:!0},t.contextType=g.$,t}(r.Component),Y=(0,y.Y)(),X=(0,y.u)(Y,G);X.displayName="KendoReactWindow"},5375:(e,t,n)=>{n.r(t),n.d(t,{AutoComplete:()=>Ie,AutoCompletePropsContext:()=>Ee,ComboBox:()=>ke,ComboBoxPropsContext:()=>be,DropDownList:()=>se,DropDownListPropsContext:()=>ae,DropDownTree:()=>Ut,DropDownTreePropsContext:()=>qt,MultiColumnComboBox:()=>Qe,MultiColumnComboBoxPropsContext:()=>Ze,MultiSelect:()=>$e,MultiSelectPropsContext:()=>We,MultiSelectTree:()=>tn,MultiSelectTreePropsContext:()=>en,getMultiSelectTreeValue:()=>an,getValueMap:()=>on});var r,o=n(3899),i=n(189),a=n(2697),s=n(8047),l=n(3493),c=n(4703),u=n(848),d=n(6097),p=n(9222),f=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)},m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.width,r=e.dir,i=e.itemsCount,a=e.popupSettings;return o.createElement(p.G,h({style:{width:n,direction:r},contentKey:i&&i.join()},a),t)},t}(o.Component);const g=m;var v=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=a.G.sizeMap,b=a.G.roundedMap,k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.input=null,t}return v(t,e),t.prototype.render=function(){var e,t=this,n=this.props,r=n.size,i=n.rounded,a=n.fillMode,l=n.inputRef;return o.createElement("div",{className:"k-list-filter"},o.createElement("span",{className:(0,s.A)("k-searchbox k-input",(e={},e["k-input-".concat(y[r]||r)]=r,e["k-rounded-".concat(b[i]||i)]=i,e["k-input-".concat(a)]=a,e))},o.createElement("span",{className:"k-input-icon k-icon k-i-search"}),o.createElement("input",{ref:l||function(e){return t.input=e},value:this.props.value||"",className:"k-input-inner",onChange:this.props.onChange,onKeyDown:this.props.onKeyDown,tabIndex:this.props.tabIndex,onClick:function(e){return e.stopPropagation()}})))},t}(o.Component);const w=k;var C=function(e){return null!=e},x=function(e,t,n){if(!C(e))return!1;var r=String(e);return n&&(r=r.toLowerCase()),0===r.indexOf(t)},O=function(e,t,n){var r=-1;if(t){t=t.toLowerCase();for(var o=0;o<e.length;o++){var i=(E(e[o],n)||"")+"";if(i&&i.toLowerCase().startsWith(t)){r=o;break}}}return r},S=function(e,t,n,r){void 0===r&&(r=!1);var o=function(e){return r?e:e.toLowerCase()};return e.findIndex((function(e){return n?o(E(e,n))===o(t):o(t)===o(e.toString())}))},E=function(e,t){if(t&&C(e)){var n=t.split("."),r=e;return n.forEach((function(e){r=r?r[e]:void 0})),r}return e},I=function(e,t,n){t.forEach((function(t){var r=e.findIndex((function(e){return N(e,t,n)}));-1!==r&&e.splice(r,1)}))},N=function(e,t,n){return e===t||C(e)===C(t)&&E(e,n)===E(t,n)},T=function(e,t,n){if(t){var r=S(e,t,n,!0);return-1!==r?e[r]:e[O(e,t,n)]}return e[0]},M=function(e){"INPUT"!==e.target.nodeName&&e.preventDefault()},D=function(e,t,n){return!!e==!!t&&e.text===t.text&&(e===t||function(e,t,n){if(void 0===e&&(e=[]),void 0===t&&(t=[]),e===t)return!0;if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!N(e[r],t[r],n))return!1;return!0}(e.data,t.data,n))},R=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(e){return e.preventDefault()},_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.defaultItem,r=e.textField;return o.createElement("div",{onClick:this.props.onClick,onMouseDown:P,style:{position:"unset"},className:(0,s.A)("k-list-optionlabel",{"k-selected":t})},E(n,r)||"")},t}(o.Component);const A=_;var j=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){return t.props.onClick(t.props.index,e)},t}return j(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.group,r=e.dataItem,i=e.virtual,a=e.render,l=o.createElement("li",{id:this.props.id,role:"option","aria-selected":t,className:(0,s.A)("k-list-item",{"k-selected":t,"k-focus":this.props.focused,"k-first":Boolean(n)}),onClick:this.handleClick,style:{position:i?"relative":"unset"}},o.createElement("span",{className:"k-list-item-text"},E(r,this.props.textField).toString()),void 0!==n?o.createElement("div",{className:"k-list-item-group-label"},n):null);return void 0!==a?a.call(void 0,l,this.props):l},t}(o.Component);const z=F;var L,B=n(499),V="dropdowns.nodata",H="dropdowns.clear",K=((L={})[H]="clear",L[V]="NO DATA FOUND.",L),W=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.renderItems=function(){var e=this,t=this.props,n=t.textField,r=t.valueField,i=t.groupField,a=t.optionsGuid,s=t.skip,l=void 0===s?0:s,c=t.virtual,u=t.focusedIndex,d=t.highlightSelected,p=void 0===d||d,f=t.value,h=t.data,m=t.itemRender,g=Array.isArray(f);return h.map((function(t,s){var d,v,y=l+s,b=p&&(!g&&N(t,f,r)||g&&-1!==f.findIndex((function(e){return N(e,t,r)}))),k=void 0;return s>0&&void 0!==i&&(d=E(t,i),v=E(h[s-1],i),d&&v&&d!==v&&(k=d)),o.createElement(z,{id:"option-".concat(a,"-").concat(y),virtual:c,dataItem:t,selected:b,focused:u===s,index:y,key:y,onClick:e.props.onClick,textField:n,group:k,render:m})}))},t.prototype.renderNoValueElement=function(e){var t=this.props.noDataRender,n=o.createElement("div",{className:"k-nodata"},o.createElement("div",null,e.toLanguageString(V,K[V])));return t?t.call(void 0,n):n},t.prototype.render=function(){var e=(0,B.provideLocalizationService)(this),t=this.props,n=t.id,r=t.show,i=t.wrapperCssClass,a=t.wrapperStyle,s=t.listStyle,l=t.listRef,c=t.wrapperRef,u=t.listClassName,d=void 0===u?"k-list-ul":u,p=this.renderItems();return p.length?o.createElement("div",{className:i,style:a,ref:c,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onScroll:this.props.onScroll,unselectable:"on"},o.createElement("ul",{id:n,role:"listbox","aria-hidden":!r||void 0,className:d,ref:l,style:s},p),this.props.scroller&&o.createElement("div",{className:"k-height-container"},this.props.scroller)):this.renderNoValueElement(e)},t}(o.Component);const q=$;(0,B.registerForLocalization)($);const U=function(){function e(){var e=this;this.container=null,this.scrollElement=null,this.list=null,this.containerHeight=0,this.skip=0,this.total=0,this.enabled=!1,this.pageSize=0,this.itemHeight=0,this.PageChange=null,this.prevScrollPos=0,this.listTranslate=0,this.scrollSyncing=!1,this.scrollerRef=function(t){var n=e;n.container=t,t&&(t.setAttribute("unselectable","on"),window.setTimeout(n.calcScrollElementHeight.bind(n),0))},this.calcScrollElementHeight=function(){e.scrollSyncing=!0;var t=!1;e.itemHeight=e.list?e.list.children[0].offsetHeight:e.itemHeight,e.containerHeight=Math.min(1533915,e.itemHeight*e.total);var n=e.containerHeight;return e.scrollElement&&(t=e.scrollElement.style.height!==n+"px")&&(e.scrollElement.style.height=n+"px"),e.scrollSyncing=!1,t},this.scrollHandler=this.scrollHandler.bind(this)}return Object.defineProperty(e.prototype,"translate",{get:function(){return this.listTranslate},enumerable:!1,configurable:!0}),e.prototype.changePage=function(e,t){var n=Math.min(Math.max(0,e),this.total-this.pageSize);n!==this.skip&&this.PageChange&&this.PageChange({skip:n,take:this.pageSize},t)},e.prototype.translateTo=function(e){this.listTranslate=e,this.list&&(this.list.style.transform="translateY("+e+"px)")},e.prototype.reset=function(){this.container&&(this.calcScrollElementHeight(),this.container.scrollTop=0,this.translateTo(0))},e.prototype.scrollToEnd=function(){this.container&&this.list&&(this.calcScrollElementHeight(),this.container.scrollTop=this.container.scrollHeight-this.container.offsetHeight,this.translateTo(this.container.scrollHeight))},e.prototype.localScrollUp=function(e){var t,n=this.itemHeight,r=this.container.scrollTop,o=this.listTranslate,i=r-o;if(!(i>n)){for(t=0;t<this.skip&&!(o+n+i<=r);t++)o-=n;if(o=this.validateTranslate(o),this.skip-t<=0&&o>=r)return this.translateTo(0),this.changePage(0,e),void(this.container.scrollTop=0);o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip-t,e))}},e.prototype.localScrollDown=function(e){var t,n=this.itemHeight,r=this.container.scrollTop,o=this.listTranslate,i=this.list.children.length;for(t=0;t<i&&!(o+n>=r);t++)o+=n;o=this.validateTranslate(o),t>=i&&this.skip+t>=this.total?(this.translateTo(o),this.changePage(this.total-1,e)):o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip+t,e))},e.prototype.scrollNonStrict=function(e){var t=this.total*this.prevScrollPos/this.containerHeight,n=Math.min(Math.floor(t),this.total-1),r=this.containerHeight*t/this.total;r=this.validateTranslate(r),this.translateTo(r),this.changePage(n,e)},e.prototype.scrollHandler=function(e){var t=this.container?this.container.scrollTop:0,n=this.prevScrollPos;this.prevScrollPos=t,this.enabled&&this.list&&this.container&&!this.scrollSyncing&&(t-n<=0&&t>this.listTranslate-this.list.scrollHeight/10?this.localScrollUp(e):t-n>0&&t<this.listTranslate+2*this.list.scrollHeight/3?this.localScrollDown(e):this.scrollNonStrict(e))},e.prototype.validateTranslate=function(e){return e=Math.max(0,e),Math.min(this.containerHeight,e)},e}();var G=function(){function e(){}return e.prototype.navigate=function(e){var t=e.keyCode;return t===l.R.up||t===l.R.left?this.next({current:e.current,min:e.min,max:e.max,step:-1}):t===l.R.down||t===l.R.right?this.next({current:e.current,min:e.min,max:e.max,step:1}):t===l.R.home?0:t===l.R.end?e.max:void 0},e.prototype.next=function(e){return C(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min},e}(),Y=n(3198),X=function(){return X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},X.apply(this,arguments)},J=function(){function e(e){var t=this;this.wrapper=null,this.list=null,this.vs=new U,this.navigation=new G,this.handleItemClick=function(e,n){var r=t.initState();r.syntheticEvent=n,n.stopPropagation(),t.component.handleItemSelect(e,r),t.togglePopup(r),t.applyState(r)},this.handleFocus=function(e){if(!t.component.state.focused){var n=t.initState();n.data.focused=!0,n.events.push({type:"onFocus"}),n.syntheticEvent=e,t.applyState(n)}},this.filterChanged=function(e,n){var r=t.component.props,o=r.textField;r.filterable&&n.events.push({type:"onFilterChange",filter:{field:o,operator:"contains",ignoreCase:!0,value:e}})},this.togglePopup=function(e){var n=t.component.props,r=void 0!==n.opened?n.opened:t.component.state.opened;void 0===n.opened&&(e.data.opened=!r),r?e.events.push({type:"onClose"}):(e.events.push({type:"onOpen"}),t.calculatePopupWidth())},this.pageChange=function(e,n){var r=t.initState();r.syntheticEvent=n,t.triggerOnPageChange(r,e.skip,e.take),t.applyState(r)},this.scrollToVirtualItem=function(e,n){var r=t.vs;if(r.enabled=!1,0===e.skip)r.reset();else if(e.skip+e.pageSize===e.total)r.scrollToEnd();else{var o=r.translate;0===o&&(r.calcScrollElementHeight(),o=r.itemHeight*e.skip,r.translateTo(o-r.itemHeight)),r.container&&(r.container.scrollTop=o),t.scrollToItem(n,!0)}window.setTimeout((function(){return r.enabled=!0}),10)},this.renderScrollElement=function(){var e=t.vs;return e.enabled&&o.createElement("div",{ref:function(t){return e.scrollElement=t},key:"scrollElementKey"})},this.listBoxId=(0,Y.M)(),this.guid=(0,Y.M)(),this.component=e,this.vs.PageChange=this.pageChange}return e.prototype.didMount=function(){var e=this.component.props,t=e.popupSettings||{},n=e.style||{},r=t.width,o=!0===e.opened;void 0===r&&this.calculatePopupWidth(),void 0===e.dir&&void 0===n.direction&&(this.calculateDir(),o=!0),o&&this.component.forceUpdate()},e.prototype.calculateDir=function(){var e=this.component.element;e&&e.ownerDocument&&e.ownerDocument.defaultView&&(this.dirCalculated=e.ownerDocument.defaultView.getComputedStyle(e).direction||void 0)},e.prototype.calculatePopupWidth=function(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")},e.prototype.scrollToItem=function(e,t){var n=this.list||this.vs.list;if(n&&e>=0){var r=this.vs,o=r.container||n.parentNode,i=void 0!==t?t:r.enabled;!function(e,t,n,r,o){var i=e.offsetHeight,a=t.children.item(n),s=a.offsetTop+(o?r-e.scrollTop:0),l=a.offsetHeight;if(o){var c=0;s+l>i?c=s+l-i:s<0&&(c=s),0!==c?e.scrollTop+=c:0===e.scrollTop&&0!==r&&(e.scrollTop=r)}else s+l>i+e.scrollTop?e.scrollTop=s+l-i:s<e.scrollTop&&(e.scrollTop-=e.scrollTop-s)}(o,n,e,r.translate,i)}},e.prototype.initState=function(){return{data:{},events:[],syntheticEvent:void 0}},e.prototype.applyState=function(e){var t=this;Object.keys(e.data).length>0&&this.component.setState(e.data);var n={syntheticEvent:e.syntheticEvent,nativeEvent:e.syntheticEvent?e.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};e.events.forEach((function(e){var r=e.type;delete e.type;var o=r&&t.component.props[r];o&&o.call(void 0,X(X({},n),e))}))},e.prototype.triggerOnPageChange=function(e,t,n){var r=this.component.props.virtual;if(r){var o=Math.min(Math.max(0,t),Math.max(0,r.total-n));o!==r.skip&&e.events.push({type:"onPageChange",page:{skip:o,take:n}})}},e.prototype.triggerPageChangeCornerItems=function(e,t){var n=this.component.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=void 0!==n.opened?n.opened:this.component.state.opened;e&&a&&this.vs.enabled&&(a.skip>0&&N(e,o[0],i)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!s&&a.skip+a.pageSize<a.total&&N(e,o[o.length-1],i)&&this.triggerOnPageChange(t,a.skip+1,a.pageSize))},e.prototype.getPopupSettings=function(){return Object.assign({},e.defaultProps.popupSettings,this.component.props.popupSettings)},e.basicPropTypes={opened:i.bool,disabled:i.bool,dir:i.string,tabIndex:i.number,accessKey:i.string,data:i.array,textField:i.string,className:i.string,label:i.string,loading:i.bool,popupSettings:i.shape({animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),popupClass:i.string,className:i.string,appendTo:i.any,width:i.oneOfType([i.string,i.number]),height:i.oneOfType([i.string,i.number])}),onOpen:i.func,onClose:i.func,onFocus:i.func,onBlur:i.func,onChange:i.func,itemRender:i.func,listNoDataRender:i.func,focusedItemIndex:i.func,header:i.node,footer:i.node},e.propTypes=X(X({},e.basicPropTypes),{value:i.any,defaultValue:i.any,filterable:i.bool,filter:i.string,virtual:i.shape({pageSize:i.number.isRequired,skip:i.number.isRequired,total:i.number.isRequired}),onFilterChange:i.func,onPageChange:i.func}),e.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0},e}();const Z=J;var Q=n(4006),ee={name:"@progress/kendo-react-dropdowns",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660123731,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},te=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(){return ne=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ne.apply(this,arguments)},re=a.G.sizeMap,oe=a.G.roundedMap,ie=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n._element=null,n.base=new Z(n),n.searchState={word:"",last:""},n._select=null,n._skipFocusEvent=!1,n._filterInput=null,n._navigated=!1,n.focus=function(){n.base.wrapper&&n.base.wrapper.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.virtual,s=r.dataItemKey,l=r.defaultItem,c=a?a.skip:0,u=-1===e&&void 0!==l?l:i[e-c],d=!N(u,n.value,s);n.triggerOnChange(u,t),d&&n.base.triggerPageChangeCornerItems(u,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.dummySelect=function(e){return o.createElement("select",{name:n.props.name,ref:function(e){n._select=e},tabIndex:-1,"aria-hidden":!0,title:n.props.label,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},o.createElement("option",{value:n.props.valueMap?n.props.valueMap.call(void 0,e):e}))},n.renderListContainer=function(){var e,t=n.props,r=t.header,i=t.footer,a=t.dir,l=t.data,c=void 0===l?[]:l,u=t.size,d=n.base,p=d.getPopupSettings(),f=void 0!==n.props.opened?n.props.opened:n.state.opened,h=void 0!==p.width?p.width:d.popupWidth,m={dir:void 0!==a?a:d.dirCalculated,width:h,popupSettings:{popupClass:(0,s.A)(p.popupClass,"k-list-container"),className:p.className,animate:p.animate,anchor:n.element,show:f,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:p.appendTo},itemsCount:[c.length]};return o.createElement(g,ne({},m),n.renderListFilter(),r&&o.createElement("div",{className:"k-list-header"},r),o.createElement("div",{className:(0,s.A)("k-list",(e={},e["k-list-".concat(re[u]||u)]=u,e["k-virtual-list"]=n.base.vs.enabled,e))},n.renderDefaultItem(),n.renderList()),i&&o.createElement("div",{className:"k-list-footer"},i))},n.renderList=function(){var e=n.props,t=e.data,r=void 0===t?[]:t,i=e.textField,a=e.dataItemKey,s=e.virtual,l=void 0===s?{skip:0}:s,c=e.listNoDataRender,u=e.itemRender,d=n.base.vs,p=l.skip,f=void 0!==n.props.opened?n.props.opened:n.state.opened,h=n.base.getPopupSettings(),m="translateY(".concat(d.translate,"px)");return o.createElement(q,{id:n.base.listBoxId,show:f,data:r.slice(),focusedIndex:n.focusedIndex(),value:n.value,textField:i,valueField:a,optionsGuid:n.base.guid,listRef:function(e){return d.list=n.base.list=e},wrapperStyle:{maxHeight:h.height},wrapperCssClass:"k-list-content",listStyle:d.enabled?{transform:m}:void 0,key:"listkey",skip:p,onClick:n.handleItemClick,itemRender:u,noDataRender:c,onScroll:function(e){d.scrollHandler(e)},wrapperRef:d.scrollerRef,scroller:n.base.renderScrollElement()})},n.renderListFilter=function(){var e=void 0!==n.props.filter?n.props.filter:n.state.text;return n.props.filterable&&o.createElement(w,{value:e,ref:function(e){return n._filterInput=e&&e.input},onChange:n.handleListFilterChange,onKeyDown:n.handleKeyDown,size:n.props.size,rounded:n.props.rounded,fillMode:n.props.fillMode})},n.renderDefaultItem=function(){var e=n.props,t=e.textField,r=e.defaultItem,i=e.dataItemKey;return void 0!==r&&o.createElement(A,{defaultItem:r,textField:t,selected:N(n.value,r,i),key:"defaultitemkey",onClick:n.handleDefaultItemClick})},n.search=function(e){clearTimeout(n._typingTimeout),n.props.filterable||(n._typingTimeout=window.setTimeout((function(){return n.searchState.word=""}),n.props.delay),n.selectNext(e))},n.selectNext=function(e){var t,r=n.props,o=r.data,i=void 0===o?[]:o,a=r.dataItemKey,s=i.map((function(e,t){return{item:e,itemIndex:t}})),l=n.searchState.word,c=n.searchState.last,u=function(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==t)return!1;return!0}(l,c),d=s.length,p=Math.max(0,i.findIndex((function(e){return N(e,n.value,a)})));n.props.defaultItem&&(t={item:n.props.defaultItem,itemIndex:-1},d+=1,p+=1),s=function(e,t,n){var r=e;return n&&(r=[n].concat(r)),r.slice(t).concat(r.slice(0,t))}(s,p+=u?1:0,t);for(var f,h,m,g=0,v=n.props,y=v.textField,b=v.ignoreCase;g<d;g++)if(f=E(s[g].item,y),h=u&&x(f,c,b),m=x(f,l,b),h||m){g=s[g].itemIndex;break}if(g!==d){var k=n.base.initState();k.syntheticEvent=e,n.handleItemSelect(g,k),n.applyState(k),n._valueDuringOnChange=void 0}},n.handleKeyDown=function(e){var t=n.props,r=t.data,o=void 0===r?[]:r,i=t.filterable,a=t.disabled,s=t.leftRightKeysNavigation,c=void 0===s||s,u=t.virtual,d=void 0===u?{skip:0,total:0,pageSize:0}:u,p=void 0!==n.props.opened?n.props.opened:n.state.opened,f=e.keyCode,h=f===l.R.home||f===l.R.end,m=f===l.R.up||f===l.R.down,g=!p&&(e.altKey&&f===l.R.down||f===l.R.enter||f===l.R.space),v=p&&(e.altKey&&f===l.R.up||f===l.R.esc),y=c&&(f===l.R.left||f===l.R.right),b=m||!i&&(y||h),k=n.base.initState();if(k.syntheticEvent=e,!a){if(h&&n.base.vs.enabled)f===l.R.home?0!==d.skip?(n.base.triggerOnPageChange(k,0,d.pageSize),n._navigated=!0):n.triggerOnChange(o[0],k):d.skip<d.total-d.pageSize?(n.base.triggerOnPageChange(k,d.total-d.pageSize,d.pageSize),n._navigated=!0):n.triggerOnChange(o[o.length-1],k);else if(p&&f===l.R.enter){var w=n.focusedIndex();void 0!==w&&n.handleItemSelect(w,k),n.base.togglePopup(k),e.preventDefault()}else g||v?(n.base.togglePopup(k),e.preventDefault()):b&&(n.onNavigate(k,f),e.preventDefault());n.applyState(k)}},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.handleFocus=function(e){n._skipFocusEvent||n.base.handleFocus(e)},n.handleBlur=function(e){if(!n._skipFocusEvent&&n.state.focused){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState();r.syntheticEvent=e,r.data.focused=!1,r.events.push({type:"onBlur"}),t&&n.base.togglePopup(r),n.applyState(r)}},n.handleDefaultItemClick=function(e){var t=n.base.initState();t.syntheticEvent=e,n.base.togglePopup(t),n.triggerOnChange(n.props.defaultItem,t),n.applyState(t)},n.handleWrapperClick=function(e){if(!e.isPropagationStopped()){var t=n.base.initState();t.syntheticEvent=e,n.state.focused||(t.data.focused=!0),n.base.togglePopup(t),n.applyState(t)}},n.handleKeyPress=function(e){if(!n.props.filterable&&0!==e.which&&e.keyCode!==l.R.enter){var t=String.fromCharCode(e.charCode||e.keyCode);n.props.ignoreCase&&(t=t.toLowerCase())," "===t&&e.preventDefault(),n.searchState={word:n.searchState.word+t,last:n.searchState.last+t},n.search(e)}},n.handleListFilterChange=function(e){var t=n.base.initState();t.syntheticEvent=e,void 0===n.props.filter&&(t.data.text=e.target.value),n.base.filterChanged(e.target.value,t),n.applyState(t)},n.onPopupOpened=function(){n._filterInput&&n.focusElement(n._filterInput)},n.onPopupClosed=function(){n.state.focused&&window.setTimeout((function(){n.state.focused&&n.base.wrapper&&n.focusElement(n.base.wrapper)}))},n.setValidity=function(){n._select&&n._select.setCustomValidity&&n._select.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please select a value from the list!")},(0,Q.s)(ee),n}return te(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e;return void 0!==this._valueDuringOnChange?e=this._valueDuringOnChange:void 0!==this.props.value?e=this.props.value:void 0!==this.state.value?e=this.state.value:void 0!==this.props.defaultValue&&(e=this.props.defaultValue),C(e)||void 0===this.props.defaultItem||(e=this.props.defaultItem),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){var e=this.props,t=e.data,n=void 0===t?[]:t,r=e.dataItemKey,o=this.value;return n.findIndex((function(e){return N(e,o,r)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&""!==this.value&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=e.virtual?e.virtual.total:0,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=void 0!==e.opened?e.opened:t.opened,u=!c&&l;if(this.base.getPopupSettings().animate||u&&this.onPopupOpened(),a&&a.total!==s)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var d=this.value,p=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return N(e,d,i)})),h=!N(p,d,i);u&&a?this.base.scrollToVirtualItem(a,f):u&&!a||l&&c&&d&&h&&!this._navigated?this.base.scrollToItem(f):l&&c&&this._navigated&&(this._navigated&&a&&0===a.skip?this.base.vs.reset():this._navigated&&a&&a.skip===a.total-a.pageSize&&this.base.vs.scrollToEnd())}this._navigated=!1,this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,t,n=this.props,r=n.style,i=n.className,a=n.label,l=n.dir,u=n.virtual,p=n.size,f=n.rounded,h=n.fillMode,m=void 0!==this.props.opened?this.props.opened:this.state.opened,g=this.value,v=E(g,this.props.textField),y=!this.validityStyles||this.validity.valid,b=this.base;b.vs.enabled=void 0!==u,void 0!==u&&(b.vs.skip=u.skip,b.vs.total=u.total,b.vs.pageSize=u.pageSize);var k=this.props,w=k.dataItemKey,C=k.data,x=void 0===C?[]:C,O=k.disabled,S=k.tabIndex,I=k.loading,T=k.iconClassName,D=k.valueRender,R=this.state.focused,P=x.findIndex((function(e){return N(e,g,w)})),_=o.createElement("span",{className:"k-input-inner"},o.createElement("span",{className:"k-input-value-text"},v)),A=void 0!==D?D.call(void 0,_,g):_,j=o.createElement("span",{ref:this.componentRef,className:(0,s.A)("k-dropdownlist k-picker",i,(e={},e["k-picker-".concat(re[p]||p)]=p,e["k-rounded-".concat(oe[f]||f)]=f,e["k-picker-".concat(h)]=h,e["k-focus"]=R,e["k-disabled"]=O,e["k-invalid"]=!y,e["k-loading"]=I,e["k-required"]=this.required,e)),style:a?ne(ne({},r),{width:void 0}):r,dir:l,onMouseDown:m?M:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:(0,c.p)(S,O),accessKey:this.props.accessKey,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,onClick:O?void 0:this.handleWrapperClick,role:"combobox","aria-required":this.required,"aria-disabled":O||void 0,"aria-haspopup":"listbox","aria-expanded":m||!1,"aria-owns":this.base.listBoxId,"aria-activedescendant":m?"option-"+this.base.guid+"-"+(P+(u?u.skip:0)):void 0,"aria-label":this.props.ariaLabel||this.props.label,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,id:this.props.id,title:this.props.title},A,I&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon",key:"loading"}),o.createElement("button",{tabIndex:-1,type:"button","aria-hidden":!0,className:(0,s.A)("k-input-button k-button k-icon-button",(t={},t["k-button-".concat(re[p]||p)]=p,t["k-button-".concat(h)]=h,t["k-button-".concat(h,"-base")]=h,t))},o.createElement("span",{className:(0,s.A)("k-button-icon k-icon k-i-arrow-s",T)})),this.dummySelect(g),this.renderListContainer());return a?o.createElement(d._,{label:a,editorValue:v,editorValid:y,editorDisabled:this.props.disabled,style:{width:r?r.width:void 0},children:j}):j},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.defaultItem,a=n.dataItemKey,s=n.virtual,l=void 0===s?{skip:0,total:0,pageSize:0}:s,c=this.base.vs,u=this.value,d=o.findIndex((function(e){return N(e,u,a)})),p=this.base.navigation.navigate({current:l.skip+d,max:(c.enabled?l.total:o.length)-1,min:void 0!==i?-1:0,keyCode:t});void 0!==p&&this.handleItemSelect(p,e),this.applyState(e)},t.prototype.focusedIndex=function(){var e=C(this.props.filter)?this.props.filter:this.state.text,t=this.props,n=t.data,r=void 0===n?[]:n,o=t.virtual,i=void 0===o?{skip:0}:o,a=t.dataItemKey,s=t.textField,l=t.focusedItemIndex,c=this.value,u=!(r.findIndex((function(e){return N(e,c,a)}))<0&&!this.props.defaultItem);return!u&&e&&0===i.skip?l?l(r,e,s):r.indexOf(T(r,e,s)):u||0!==i.skip?void 0:0},t.prototype.focusElement=function(e){var t=this;this._skipFocusEvent=!0,e.focus(),window.setTimeout((function(){return t._skipFocusEvent=!1}),30)},t.prototype.triggerOnChange=function(e,t){N(this.value,e,this.props.dataItemKey)||(void 0===this.props.value&&(t.data.value=e),this._valueDuringOnChange=e,t.events.push({type:"onChange"}))},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.displayName="DropDownList",t.propTypes=ne({delay:i.number,ignoreCase:i.bool,iconClassName:i.string,defaultItem:i.any,valueRender:i.func,valueMap:i.func,validationMessage:i.string,required:i.bool,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,ariaLabel:i.string,leftRightKeysNavigation:i.bool,title:i.string},Z.propTypes),t.defaultProps=ne(ne({delay:500,tabIndex:0,ignoreCase:!0},Z.defaultProps),{required:!1,size:"medium",rounded:"medium",fillMode:"solid"}),t}(o.Component),ae=(0,u.Y)(),se=(0,u.u)(ae,ie);se.displayName="KendoReactDropDownList";var le=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._input=null,t}return le(t,e),Object.defineProperty(t.prototype,"input",{get:function(){return this._input},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e){var t=e.value,n=e.suggestedText,r=this.props,o=r.value,i=r.suggestedText,a=r.focused,s=this.input,l=t!==o||i!==n,c=l&&t.startsWith(o)&&!(n&&i&&n.endsWith(i));a&&s&&document.activeElement!==s&&s.focus(),i&&l&&!c&&s&&s.setSelectionRange(o.length-i.length,o.length)},t.prototype.render=function(){var e=this,t=this.props,n=t.expanded,r=void 0!==n&&n,i=t.disabled,a=t.role,s=void 0===a?"listbox":a,l=t.render,c=o.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:"k-input-inner",tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:function(t){return e._input=t},onKeyDown:this.props.onKeyDown,onFocus:this.props.onFocus,onBlur:this.props.onBlur,"aria-disabled":i||void 0,disabled:i||void 0,readOnly:this.props.readOnly||void 0,"aria-haspopup":"listbox","aria-expanded":r,"aria-owns":this.props.owns,"aria-activedescendant":r?this.props.activedescendant:void 0,"aria-describedby":this.props.ariaDescribedBy,"aria-labelledby":this.props.ariaLabelledBy});return l?l.call(void 0,c):c},t}(o.Component);const ue=ce;var de=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){return e.preventDefault()},t}return de(t,e),t.prototype.render=function(){var e=(0,B.provideLocalizationService)(this).toLanguageString(H,K[H]);return o.createElement("span",{className:"k-clear-value",role:"button",onClick:this.props.onClick,onMouseDown:this.onMouseDown,tabIndex:-1,title:e,key:"clearbutton"},o.createElement("span",{className:"k-icon k-i-x"}))},t}(o.Component);const fe=pe;(0,B.registerForLocalization)(pe);var he=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),me=function(){return me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},me.apply(this,arguments)},ge=a.G.sizeMap,ve=a.G.roundedMap,ye=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new Z(n),n._element=null,n._inputId=(0,Y.M)(),n._suggested="",n._input=null,n.itemHeight=0,n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.virtual,s=r.dataItemKey,l=i[e-(a?a.skip:0)],c=!N(l,n.value,s);n.triggerOnChange(l,t),void 0!==n.state.text&&(t.data.text=void 0),c&&n.base.triggerPageChangeCornerItems(l,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.toggleBtnClick=function(e){var t=n.base.initState();t.syntheticEvent=e,n.base.togglePopup(t),n.applyState(t)},n.onScroll=function(e){var t=n.base,r=t.vs,o=t.list;r.scrollHandler(e);var i=n.props,a=i.data,s=void 0===a?[]:a,l=i.groupField;if(l&&s.length){for(var c=n.itemHeight=n.itemHeight||(r.enabled?r.itemHeight:o?o.children[0].offsetHeight:0),u=e.target.scrollTop-r.skip*c,d=s[0][l],p=1;p<s.length&&!(c*p>u);p++)s[p]&&s[p][l]&&(d=s[p][l]);d!==n.state.group&&(n.setState({group:d}),n.props.onGroupScroll&&n.props.onGroupScroll.call(void 0,{group:d}))}},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.handleBlur=function(e){if(n.state.focused){var t=n.base.initState();t.data.focused=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,n.applyValueOnRejectSuggestions(e.currentTarget.value,t)}},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();if(o.syntheticEvent=e,!e.altKey&&(t===l.R.up||t===l.R.down))return e.preventDefault(),n.onNavigate(o,t),void n.applyState(o);var i=function(){e.preventDefault(),n.base.togglePopup(o),n.applyState(o)};r?e.altKey&&t===l.R.up?i():t===l.R.enter?(e.preventDefault(),n.applyValueOnEnter(e.currentTarget.value,o)):t===l.R.esc&&n.applyValueOnRejectSuggestions(e.currentTarget.value,o):e.altKey&&t===l.R.down&&i()},n.inputOnChange=function(e){var t=n.base.initState();t.syntheticEvent=e;var r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=e.currentTarget,i=o.value;if(n.props.suggest){var a=o.selectionEnd===i.length,s=void 0!==n.props.filter?n.props.filter:n.state.text;C(s)||(s=E(n.value,n.props.textField)||"");var l=s&&s===i,c=s&&s.length>i.length;l||c||!a?n._suggested="":n.suggestValue(i)}void 0===n.props.filter&&(t.data.text=i),void 0!==n.state.focusedItem&&(t.data.focusedItem=void 0),r||n.base.togglePopup(t),n.base.filterChanged(i,t),n.applyState(t)},n.clearButtonClick=function(e){var t=n.base.initState();t.syntheticEvent=e,e.stopPropagation(),n._suggested="",n.base.filterChanged("",t),void 0===n.props.filter&&void 0!==n.state.text&&(t.data.text=void 0),n.triggerOnChange(null,t),(void 0!==n.props.opened?n.props.opened:n.state.opened)&&n.base.togglePopup(t),n.applyState(t)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},(0,Q.s)(ee),n}return he(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){var e=this.props,t=e.data,n=void 0===t?[]:t,r=e.dataItemKey,o=this.value;return n.findIndex((function(e){return N(e,o,r)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&""!==this.value&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=e.virtual?e.virtual.total:0,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=void 0!==e.opened?e.opened:t.opened,u=!c&&l,d=this.value;if(this._valueOnDidUpdate=d,a&&a.total!==s)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var p=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return N(e,d,i)})),h=!N(p,d,i);u&&a?this.base.scrollToVirtualItem(a,f):(u&&!a||l&&c&&d&&h)&&this.base.scrollToItem(f)}u&&this._input&&this._input.focus(),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,n,r=this.props,i=r.dir,a=r.disabled,l=r.clearButton,c=void 0===l?t.defaultProps.clearButton:l,u=r.label,p=r.textField,f=r.className,h=r.style,m=r.loading,g=r.iconClassName,v=r.virtual,y=r.size,b=r.rounded,k=r.fillMode,w=!this.validityStyles||this.validity.valid,x=void 0!==this.props.filter?this.props.filter:this.state.text,O=E(this.value,p),S=C(x)?x:O,I=c&&(!!S||C(this.value)),N=this.base.vs,T=this.props.id||this._inputId;N.enabled=void 0!==v,void 0!==v&&(N.skip=v.skip,N.total=v.total,N.pageSize=v.pageSize);var M=o.createElement("span",{className:(0,s.A)("k-combobox k-input",(e={},e["k-input-".concat(ge[y]||y)]=y,e["k-rounded-".concat(ve[b]||b)]=b,e["k-input-".concat(k)]=k,e["k-invalid"]=!w,e["k-loading"]=m,e["k-required"]=this.required,e["k-disabled"]=a,e),f),ref:this.componentRef,style:u?me(me({},h),{width:void 0}):h,dir:i},this.renderSearchBar(S||"",T),I&&!m&&o.createElement(fe,{onClick:this.clearButtonClick,key:"clearbutton"}),m&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon",key:"loading"}),o.createElement("button",{tabIndex:-1,type:"button",className:(0,s.A)("k-input-button k-button k-icon-button",(n={},n["k-button-".concat(ge[y]||y)]=y,n["k-button-".concat(k)]=k,n["k-button-".concat(k,"-base")]=k,n)),onClick:this.toggleBtnClick,onMouseDown:function(e){return e.preventDefault()}},o.createElement("span",{className:(0,s.A)("k-button-icon k-icon k-i-arrow-s",g)})),this.renderListContainer());return u?o.createElement(d._,{label:u,editorId:T,editorValue:S,editorValid:w,editorDisabled:a,style:{width:h?h.width:void 0},children:M}):M},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.virtual,a=void 0===i?{skip:0}:i,s=this.props.filter?this.props.filter:this.state.text,l=this.getFocusedIndex(),c=this.base.vs,u=this.value;if(this._suggested="",-1===l||C(u))if(""===s)this.handleItemSelect(0,e);else{var d=a.skip+l,p=this.base.navigation.navigate({keyCode:t,current:d,max:(c.enabled?c.total:o.length)-1,min:0});void 0!==p&&this.handleItemSelect(p,e)}else this.handleItemSelect(l,e)},t.prototype.applyValueOnEnter=function(e,t){var n,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.allowCustom,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=E(this.value,a)===e?this.index:S(i,e,a),u=-1!==c,d=void 0;if(this._suggested="",u)d=i[c];else{if(!s)return this.selectFocusedItem(e,t);d=void 0!==a?((n={})[a]=e,n):e}this.triggerOnChange(d,t),l&&this.base.togglePopup(t),void 0===this.props.filter&&void 0!==this.state.text&&(t.data.text=void 0),this.applyState(t)},t.prototype.applyValueOnRejectSuggestions=function(e,t){var n,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.allowCustom,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=E(this.value,a);if(this._suggested="",e===c||""===e&&!C(c))return l&&this.base.togglePopup(t),this.applyState(t);var u=S(i,e,a,!0),d=null;-1!==u?d=i[u]:s&&(d=e?a?((n={})[a]=e,n):e:null),this.triggerOnChange(d,t),void 0!==this.state.text&&(t.data.text=void 0,this.base.filterChanged("",t)),l&&this.base.togglePopup(t),this.applyState(t)},t.prototype.selectFocusedItem=function(e,t){var n=void 0!==this.props.opened?this.props.opened:this.state.opened,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.virtual,l=void 0===s?{skip:0}:s,c=r.focusedItemIndex,u=void 0===c?O:c,d=l.skip,p=""===e&&0===d?0:u(i,e,a);return-1!==p?this.handleItemSelect(p+d,t):(this.triggerOnChange(null,t),void 0!==this.state.text&&(t.data.text=void 0)),n&&this.base.togglePopup(t),this.applyState(t)},t.prototype.renderListContainer=function(){var e,t=this.base,n=this.props,r=n.dir,i=n.header,a=n.footer,l=n.data,c=void 0===l?[]:l,u=n.groupField,d=n.size,p=n.list,f=n.virtual,h=void 0!==this.props.opened?this.props.opened:this.state.opened,m=t.getPopupSettings(),v=void 0!==m.width?m.width:t.popupWidth,y=this.state.group;return void 0===y&&void 0!==u&&(y=E(c[0],u)),o.createElement(g,{width:v,popupSettings:{animate:m.animate,anchor:this.element,show:h,popupClass:(0,s.A)(m.popupClass,"k-reset"),className:m.className,appendTo:m.appendTo},dir:void 0!==r?r:this.base.dirCalculated,itemsCount:[c.length]},o.createElement("div",{className:(0,s.A)((e={},e["k-list"]=!p,e["k-list-".concat(ge[d]||d)]=!p&&d,e["k-virtual-list"]=f,e["k-data-table"]=p,e["k-table-".concat(ge[d]||d)]=p&&d,e))},i&&o.createElement("div",{className:"k-table-header"},i),!p&&y&&o.createElement("div",{className:"k-list-group-sticky-header"},y),this.renderList(),a&&o.createElement("div",{className:"k-list-footer"},a)))},t.prototype.renderList=function(){var e,t=this,n=this.base,r=this.props,i=r.textField,a=r.dataItemKey,l=r.listNoDataRender,c=r.itemRender,u=r.data,d=void 0===u?[]:u,p=r.virtual,f=void 0===p?{skip:0}:p,h=n.getPopupSettings(),m=n.vs,g=f.skip,v=void 0!==this.props.opened?this.props.opened:this.state.opened,y="translateY(".concat(m.translate,"px)"),b=v?this.getFocusedIndex():void 0,k=void 0!==this.props.filter?this.props.filter:this.state.text,w=E(this.value,i),x=C(k)&&k!==w?null:this.value,O=this.props.list||q;return o.createElement(O,{id:n.listBoxId,virtual:Boolean(f),show:v,data:d,focusedIndex:b,value:x,textField:i,valueField:a,groupField:this.props.groupField,optionsGuid:n.guid,listRef:function(e){m.list=t.base.list=e,t.itemHeight=0},wrapperStyle:{maxHeight:h.height},wrapperCssClass:(0,s.A)("k-list-content",(e={},e["k-list-scroller"]=!f,e["k-virtual-content"]=f,e)),listStyle:m.enabled?{transform:y}:void 0,key:"listkey",skip:g,onClick:this.handleItemClick,itemRender:c,noDataRender:l,onMouseDown:function(e){return e.preventDefault()},onScroll:this.onScroll,wrapperRef:m.scrollerRef,scroller:this.base.renderScrollElement()})},t.prototype.renderSearchBar=function(e,t){var n=this,r=this.props,i=r.placeholder,a=r.tabIndex,s=r.disabled,l=r.data,c=void 0===l?[]:l,u=r.dataItemKey,d=r.virtual,p=void 0===d?{skip:0}:d,f=void 0!==this.props.opened?this.props.opened:this.state.opened,h=this.value,m=Math.max(0,c.findIndex((function(e){return N(e,h,u)})));return this._suggested&&!N(this._valueOnDidUpdate,h,u)&&(this._suggested=""),o.createElement(ue,{id:t,placeholder:i,tabIndex:a||void 0,accessKey:this.props.accessKey,value:e+this._suggested,suggestedText:this._suggested,ref:function(e){return n._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.inputOnChange,onFocus:this.base.handleFocus,onBlur:this.handleBlur,disabled:s,expanded:f,owns:this.base.listBoxId,activedescendant:"option-".concat(this.base.guid,"-").concat(m+p.skip),role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.triggerOnChange=function(e,t){var n=this.value;!C(n)&&!C(e)||N(n,e,this.props.dataItemKey)||(void 0===this.props.value&&(t.data.value=e),this._valueDuringOnChange=e,t.events.push({type:"onChange"}))},t.prototype.getFocusedIndex=function(){var e=this.value,t=this.props,n=t.data,r=void 0===n?[]:n,o=t.textField,i=t.dataItemKey,a=t.virtual,s=void 0===a?{skip:0}:a,l=t.focusedItemIndex,c=void 0===l?O:l,u=this.props.filter?this.props.filter:this.state.text;return C(e)&&void 0===u?r.findIndex((function(t){return N(t,e,i)})):u?c(r,u,o):0===s.skip?0:-1},t.prototype.suggestValue=function(e){var t=this.props,n=t.data,r=t.textField;this._suggested=function(e,t,n){void 0===t&&(t=[]);var r="";if(e){var o=t[O(t,e,n)];if(o){var i=E(o,n);e.toLowerCase()!==i.toLowerCase()&&(r=i.substring(e.length))}}return r}(e,n,r)},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.displayName="ComboBox",t.propTypes=me(me({},Z.propTypes),{size:i.oneOf([null,"small","medium","large"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"solid","flat","outline"]),dataItemKey:i.string,groupField:i.string,suggest:i.bool,placeholder:i.string,allowCustom:i.bool,clearButton:i.bool,iconClassName:i.string,validationMessage:i.string,required:i.bool,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,list:i.any,valueRender:i.func}),t.defaultProps=me(me({},Z.defaultProps),{size:"medium",rounded:"medium",fillMode:"solid",allowCustom:!1,clearButton:!0,required:!1}),t}(o.Component),be=(0,u.Y)(),ke=(0,u.u)(be,ye);ke.displayName="KendoReactComboBox";var we=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ce=function(){return Ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ce.apply(this,arguments)},xe=a.G.sizeMap,Oe=a.G.roundedMap,Se=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new Z(n),n._element=null,n._inputId=(0,Y.M)(),n._suggested="",n._input=null,n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props.data,o=E((void 0===r?[]:r)[e],n.props.textField);n.triggerOnChange(o,t)},n.itemFocus=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=i[e];N(n.state.focusedItem,s,a)||(t.data.focusedItem=s)},n.togglePopup=function(e){n.base.togglePopup(e)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.onChangeHandler=function(e){var t=n.base.initState(),r=e.currentTarget,o=r.value,i=r.selectionEnd===o.length;t.syntheticEvent=e;var a=n._suggested,s=n.value,l=s&&s.substring(0,s.length-a.length),c=l&&l===o,u=l&&l.length>o.length,d=n.props.suggest,p=void 0!==n.props.opened?n.props.opened:n.state.opened;if(void 0!==d&&!1!==d){c||u||!i?n._suggested="":n.suggestValue(o);var f=o+n._suggested,h={userInput:o,value:n._suggested};n.triggerOnChange(f,t,{suggestion:h})}else n._suggested="",n.triggerOnChange(o,t);(!p&&o||p&&!o)&&n.togglePopup(t),t.data.focusedItem=void 0,n.applyState(t)},n.clearButtonClick=function(e){var t=n.base.initState(),r=void 0!==n.props.opened?n.props.opened:n.state.opened;t.syntheticEvent=e,n._suggested="",n.triggerOnChange("",t),void 0!==n.state.focusedItem&&(t.data.focusedItem=void 0),r&&n.togglePopup(t),n.applyState(t)},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();o.syntheticEvent=e;var i=function(){r&&e.preventDefault()};t===l.R.enter||t===l.R.esc?(i(),n.applyInputValue(e.currentTarget.value,o,e.keyCode)):t!==l.R.up&&t!==l.R.down||(i(),n.onNavigate(o,t))},n.handleBlur=function(e){if(n.state.focused){var t=n.base.initState();t.data.focused=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,n.applyInputValue(e.currentTarget.value,t)}},(0,Q.s)(ee),n}return we(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||""!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.data,r=void 0===n?[]:n,o=e.data,i=void 0===o?[]:o,a=this.focusedIndex(),s=r[a],l=i!==r,c=void 0!==s&&t.focusedItem!==s,u=void 0!==this.props.opened?this.props.opened:this.state.opened,d=void 0!==e.opened?e.opened:t.opened;(u&&(c||l)||!d&&u)&&this.base.scrollToItem(a),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,t=this,n=this.props,r=n.dir,i=n.disabled,a=n.label,l=n.className,c=n.style,u=n.loading,p=n.suggest,f=n.size,h=n.rounded,m=n.fillMode,g=!this.validityStyles||this.validity.valid,v=this.base,y=this.value,b=!1!==this.props.clearButton&&!u&&!!y,k=this.props.id||this._inputId;"string"==typeof p&&(this._suggested=p);var w=o.createElement("span",{className:(0,s.A)("k-autocomplete k-input",l,(e={},e["k-input-".concat(xe[f]||f)]=f,e["k-rounded-".concat(Oe[h]||h)]=h,e["k-input-".concat(m)]=m,e["k-invalid"]=!g,e["k-loading"]=u,e["k-required"]=this.required,e["k-disabled"]=i,e)),ref:function(e){t._element=e,v.wrapper=e},style:a?Ce(Ce({},c),{width:void 0}):c,dir:r},this.renderSearchBar(y||"",k),u&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),b&&!u&&o.createElement(fe,{onClick:this.clearButtonClick,key:"clearbutton"}),this.renderListContainer());return a?o.createElement(d._,{label:a,editorId:k,editorValue:y,editorValid:g,editorDisabled:i,style:{width:c?c.width:void 0},children:w}):w},t.prototype.onNavigate=function(e,t){var n=this,r=this.value,o=this.props,i=o.data,a=void 0===i?[]:i,s=o.textField,l=o.focusedItemIndex,c=void 0!==this.state.focusedItem?a.findIndex((function(e){return N(e,n.state.focusedItem,s)})):l?l(a,r,s):a.indexOf(T(a,r,s)),u=this.base.navigation.navigate({keyCode:t,current:c,max:a.length-1,min:0});void 0!==u&&this.itemFocus(u,e),this.applyState(e)},t.prototype.applyInputValue=function(e,t,n){var r=void 0!==this.props.opened?this.props.opened:this.state.opened,o=this.props,i=o.data,a=void 0===i?[]:i,s=o.textField;if(this._suggested="",r&&n===l.R.enter){var c=E(a[this.focusedIndex(e)],s);this.triggerOnChange(c,t)}r&&this.togglePopup(t),this.applyState(t)},t.prototype.renderSearchBar=function(e,t){var n=this,r=this.base,i=this.props,a=i.placeholder,s=i.tabIndex,l=i.disabled,c=i.readonly,u=this.state.focused,d=void 0!==this.props.opened?this.props.opened:this.state.opened;return o.createElement(ue,{id:t,placeholder:a,tabIndex:s||void 0,accessKey:this.props.accessKey,value:e,suggestedText:this._suggested,focused:u,name:this.props.name,ref:function(e){return n._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.onChangeHandler,onFocus:r.handleFocus,onBlur:this.handleBlur,disabled:l,readOnly:c,expanded:d,owns:r.listBoxId,activedescendant:"option-"+r.guid+"-"+this.focusedIndex(),role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.renderListContainer=function(){var e,t=this.base,n=this.props,r=n.dir,i=n.header,a=n.footer,l=n.data,c=void 0===l?[]:l,u=n.size,d=t.getPopupSettings(),p=void 0!==this.props.opened?this.props.opened:this.state.opened,f=void 0!==d.width?d.width:t.popupWidth;return o.createElement(g,{width:f,popupSettings:{animate:d.animate,anchor:this.element,show:p,popupClass:(0,s.A)(d.popupClass),className:d.className,appendTo:d.appendTo},dir:void 0!==r?r:this.base.dirCalculated,itemsCount:[c.length]},i&&o.createElement("div",{className:"k-list-header"},i),o.createElement("div",{className:(0,s.A)("k-list",(e={},e["k-list-".concat(xe[u]||u)]=u,e))},this.renderList()),a&&o.createElement("div",{className:"k-list-footer"},a))},t.prototype.renderList=function(){var e=this.base,t=e.getPopupSettings(),n=this.props,r=n.textField,i=n.data,a=void 0===i?[]:i,s=n.listNoDataRender,l=n.itemRender,c=this.value,u=void 0!==this.props.opened?this.props.opened:this.state.opened;return o.createElement(q,{id:e.listBoxId,show:u,data:a.slice(),focusedIndex:this.focusedIndex(),value:c,textField:r,valueField:r,highlightSelected:!1,optionsGuid:e.guid,listRef:function(t){return e.list=t},wrapperStyle:{maxHeight:t.height},wrapperCssClass:"k-list-content",onClick:this.handleItemClick,itemRender:l,noDataRender:s,onMouseDown:function(e){return e.preventDefault()}})},t.prototype.triggerOnChange=function(e,t,n){(this.value!==e||n)&&(t.data.value=e,this._valueDuringOnChange=e,t.events.push(Ce({type:"onChange"},n||{})))},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.prototype.suggestValue=function(e){if(this._suggested="",e){var t=this.props,n=t.data,r=void 0===n?[]:n,o=t.textField,i=r[O(r,e,o)];if(i){var a=E(i,o);e.toLowerCase()!==a.toLowerCase()&&(this._suggested=a.substring(e.length))}}},t.prototype.focusedIndex=function(e){var t=this,n=this.props,r=n.data,o=void 0===r?[]:r,i=n.textField,a=n.focusedItemIndex,s=void 0!==e?e:this.value;return void 0!==this.state.focusedItem?o.findIndex((function(e){return N(e,t.state.focusedItem,i)})):a?a(o,s,i):Math.max(0,o.indexOf(T(o,s,i)))},t.displayName="AutoComplete",t.propTypes=Ce(Ce({},Z.basicPropTypes),{size:i.oneOf([null,"small","medium","large"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"solid","flat","outline"]),suggest:i.oneOfType([i.bool,i.string]),placeholder:i.string,value:i.string,defaultValue:i.string,validationMessage:i.string,required:i.bool,readonly:i.bool,clearButton:i.bool,valueRender:i.func,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string}),t.defaultProps=Ce(Ce({},Z.defaultProps),{size:"medium",rounded:"medium",fillMode:"solid"}),t}(o.Component),Ee=(0,u.Y)(),Ie=(0,u.u)(Ee,Se);Ie.displayName="KendoReactAutoComplete";var Ne=n(1711),Te=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Me=function(e){return e.syntheticEvent.preventDefault()},De=function(e){return e.syntheticEvent.stopPropagation()},Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Te(t,e),t.prototype.render=function(){var e=this.props,t=e.data,n=e.guid,r=e.focused,i=e.tagRender,a=e.tag,s=e.onTagDelete,l=e.size;return o.createElement(o.Fragment,null,t.map((function(e,c){var u=a?o.createElement(a,{key:e.text+c,tagData:e,guid:n,focusedTag:r,onTagDelete:s}):o.createElement(Ne.A,{id:"tag-".concat(n,"-").concat(e.text.replace(/\s+/g,"-")),"aria-selected":!0,role:"option","aria-setsize":t.length,key:e.text+c,text:e.text,removable:!0,removeIcon:"k-i-close",onRemove:function(t){return s.call(void 0,e.data,t.syntheticEvent)},onMouseDown:Me,onClick:De,className:e===r?"k-focus":void 0,size:l});return i?i(e,u):u})),this.props.children)},t}(o.Component);const Pe=Re;var _e;!function(e){e[e.PopupList=0]="PopupList",e[e.TagsList=1]="TagsList"}(_e||(_e={}));var Ae,je=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fe=function(){return Fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Fe.apply(this,arguments)},ze=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Le=a.G.sizeMap,Be=a.G.roundedMap,Ve=function(e){return e.preventDefault()},He=function(e){return e===Ae.CustomItem};!function(e){e[e.None=0]="None",e[e.ListItem=1]="ListItem",e[e.CustomItem=2]="CustomItem"}(Ae||(Ae={}));var Ke=function(e){function t(t){var n=e.call(this,t)||this;return n.state={activedescendant:_e.PopupList},n._element=null,n._valueItemsDuringOnChange=null,n._inputId=(0,Y.M)(),n.base=new Z(n),n._tags=[],n._input=null,n._skipFocusEvent=!1,n.scrollToFocused=!1,n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.dataItemKey,s=r.virtual,l=i[e-(s?s.skip:0)],c=n.value.findIndex((function(e){return N(e,l,a)})),u=[];-1!==c?(u=n.value).splice(c,1):u=ze(ze([],n.value,!0),[l],!1),(void 0!==n.props.filter?n.props.filter:n.state.text)&&(n.state.text&&(t.data.text=""),n.base.filterChanged("",t)),void 0!==n.state.focusedIndex&&(t.data.focusedIndex=void 0),n.triggerOnChange(u,t),n.base.triggerPageChangeCornerItems(l,t)},n.onTagDelete=function(e,t){var r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();o.syntheticEvent=t,r&&n.base.togglePopup(o),n.state.focused||(o.data.focused=!0,n.focus());var i=n.value;I(i,e,n.props.dataItemKey),n.triggerOnChange(i,o),n.applyState(o)},n.itemFocus=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.allowCustom,s=r.virtual,l=s?s.skip:0,c=void 0!==n.props.filter?n.props.filter:n.state.text,u=n.getFocusedState().focusedIndex,d=a&&c,p=i[e-l];p&&u!==e?n.state.focusedIndex!==e&&(t.data.focusedIndex=e,t.data.activedescendant=_e.PopupList):d&&-1===e&&void 0!==n.state.focusedIndex&&(t.data.focusedIndex=void 0),n.base.triggerPageChangeCornerItems(p,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.searchbarRef=function(e){var t=n._input=e&&e.input;t&&n.state.focused&&window.setTimeout((function(){return t.focus()}),0)},n.onChangeHandler=function(e){var t=n.base.initState(),r=e.currentTarget.value,o=void 0!==n.props.opened?n.props.opened:n.state.opened;t.syntheticEvent=e,void 0===n.props.filter&&(t.data.text=r),t.data.focusedIndex=void 0,o||n.base.togglePopup(t),n.base.filterChanged(r,t),n.applyState(t)},n.clearButtonClick=function(e){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState();r.syntheticEvent=e,e.stopPropagation(),n.value.length>0&&n.triggerOnChange([],r),void 0!==n.state.focusedIndex&&(r.data.focusedIndex=void 0),t&&n.base.togglePopup(r);var o=void 0!==n.props.filter?n.props.filter:n.state.text;C(o)&&""!==o&&n.base.filterChanged("",r),n.state.text&&(r.data.text=""),n.applyState(r)},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.filter?n.props.filter:n.state.text,o=void 0!==n.props.opened?n.props.opened:n.state.opened,i=n.getFocusedState().focusedItem,a=n.base.initState();if(a.syntheticEvent=e,!r&&n.value.length>0&&(t===l.R.left||t===l.R.right||t===l.R.home||t===l.R.end||t===l.R.delete||t===l.R.backspace))return n.onTagsNavigate(e,a);var s=function(){e.preventDefault(),n.base.togglePopup(a),n.applyState(a)};o?e.altKey&&t===l.R.up?s():t===l.R.up||t===l.R.down?(e.preventDefault(),n.onNavigate(a,t)):t===l.R.enter?(e.preventDefault(),n.props.allowCustom&&r&&null===i?n.customItemSelect(e):n.selectFocusedItem(e)):t===l.R.esc&&s():e.altKey&&t===l.R.down&&s()},n.renderListContainer=function(){var e,t,r=n.base,i=n.props,a=i.header,l=i.footer,c=i.allowCustom,u=i.dir,d=i.data,p=void 0===d?[]:d,f=i.size,h=n.base.getPopupSettings(),m=void 0!==n.props.opened?n.props.opened:n.state.opened,v=void 0!==n.props.filter?n.props.filter:n.state.text,y=void 0!==h.width?h.width:r.popupWidth,b={dir:void 0!==u?u:r.dirCalculated,width:y,popupSettings:{popupClass:(0,s.A)(h.popupClass),className:h.className,animate:h.animate,anchor:n.element,show:m,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:h.appendTo},itemsCount:[p.length,n.value.length]},k=n.getFocusedState().focusedType,w=c&&v&&o.createElement("div",{className:(0,s.A)("k-list",(e={},e["k-list-".concat(Le[f]||f)]=f,e)),key:"customitem",onClick:n.customItemSelect,onMouseDown:Ve},o.createElement("div",{className:(0,s.A)("k-list-item k-custom-item",{"k-focus":He(k)}),style:{fontStyle:"italic"}},v,o.createElement("span",{className:"k-icon k-i-plus",style:{position:"absolute",right:"0.5em"}})));return o.createElement(g,Fe({},b),a&&o.createElement("div",{className:"k-list-header"},a),w,o.createElement("div",{className:(0,s.A)("k-list",(t={},t["k-list-".concat(Le[f]||f)]=f,t["k-virtual-list"]=n.base.vs.enabled,t))},n.renderList()),l&&o.createElement("div",{className:"k-list-footer"},l))},n.renderList=function(){var e=n.props,t=e.data,r=void 0===t?[]:t,i=e.textField,a=e.listNoDataRender,s=e.itemRender,l=e.dataItemKey,c=e.virtual,u=n.base.vs,d=c?c.skip:0,p=void 0!==n.props.opened?n.props.opened:n.state.opened,f=n.getFocusedState().focusedIndex,h=n.base.getPopupSettings(),m="translateY(".concat(u.translate,"px)");return o.createElement(q,{id:n.base.listBoxId,show:p,data:r.slice(),focusedIndex:f-d,value:n.value,textField:i,valueField:l,optionsGuid:n.base.guid,listRef:function(e){u.list=n.base.list=e},wrapperStyle:{maxHeight:h.height},wrapperCssClass:"k-list-content",listStyle:u.enabled?{transform:m}:void 0,key:"listKey",skip:d,onClick:n.handleItemClick,itemRender:s,noDataRender:a,onMouseDown:Ve,onBlur:n.handleBlur,onScroll:function(e){u.scrollHandler(e)},wrapperRef:u.scrollerRef,scroller:n.base.renderScrollElement()})},n.customItemSelect=function(e){var t,r=void 0!==n.props.filter?n.props.filter:n.state.text,o=n.props.textField;if(r){var i=n.base.initState();i.syntheticEvent=e;var a=o?((t={})[o]=r,t):r;void 0!==n.state.text&&(i.data.text=""),i.data.focusedIndex=void 0,n.base.filterChanged("",i);var s=ze(ze([],n.value,!0),[a],!1);n.triggerOnChange(s,i),n.base.togglePopup(i),n.applyState(i)}},n.handleWrapperClick=function(e){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n._input;!t&&r&&n.focusElement(r);var o=n.base.initState();o.syntheticEvent=e,n.state.focused||(o.events.push({type:"onFocus"}),o.data.focused=!0),n.base.togglePopup(o),n.applyState(o)},n.handleItemClick=function(e,t){var r=n.base.initState();r.syntheticEvent=t,n.handleItemSelect(e,r),n.props.autoClose&&n.base.togglePopup(r),t.stopPropagation(),n.applyState(r)},n.handleBlur=function(e){if(n.state.focused&&!n._skipFocusEvent){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState(),o=n.props,i=o.allowCustom,a=o.filterable;r.syntheticEvent=e,r.data.focused=!1,r.events.push({type:"onBlur"}),t&&(n.state.opened&&(r.data.opened=!1),r.events.push({type:"onClose"})),i||a||!n.state.text||(r.data.text=""),n.applyState(r)}},n.handleFocus=function(e){n._skipFocusEvent||n.base.handleFocus(e)},n.onPopupOpened=function(){n._input&&n.state.focused&&n.focusElement(n._input)},n.onPopupClosed=function(){n.state.focused&&window.setTimeout((function(){n.state.focused&&n.focusElement(n._input)}),0)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},(0,Q.s)(ee),n}return je(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e=[];return this._valueItemsDuringOnChange?e.push.apply(e,this._valueItemsDuringOnChange):this.props.value?e.push.apply(e,this.props.value):this.state.value?e.push.apply(e,this.state.value):this.props.defaultValue&&e.push.apply(e,this.props.defaultValue),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&this.value.length>0&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.virtual,r=n?n.skip:0,o=e.virtual?e.virtual.total:0,i=void 0!==this.props.opened?this.props.opened:this.state.opened,a=void 0!==e.opened?e.opened:t.opened,s=!a&&i,l=a&&!i;if(!this.base.getPopupSettings().animate&&l&&this.onPopupClosed(),n&&n.total!==o)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var c=this.getFocusedState(),u=c.focusedItem,d=c.focusedIndex;s&&n?this.base.scrollToVirtualItem(n,d-r):s&&!n?this.base.scrollToItem(d):i&&a&&u&&this.scrollToFocused&&this.base.scrollToItem(d-r)}this.scrollToFocused=!1,this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.allowCustom,o=n.data,i=void 0===o?[]:o,a=void 0!==this.props.opened?this.props.opened:this.state.opened,s=void 0!==this.props.filter?this.props.filter:this.state.text,c=this.getFocusedState(),u=c.focusedType,d=c.focusedIndex,p=r&&s,f=He(u),h=this.base,m=h.vs;if(a&&t===l.R.up&&f)void 0!==this.state.focusedIndex&&(e.data.focusedIndex=void 0);else{var g=h.navigation.navigate({keyCode:t,current:d,max:(m.enabled?m.total:i.length)-1,min:p?-1:0});void 0!==g&&(this.itemFocus(g,e),this.scrollToFocused=!0)}this.applyState(e)},t.prototype.render=function(){var e,t,n=this.props,r=n.style,i=n.className,a=n.label,l=n.dir,c=n.disabled,u=n.tags,p=n.textField,f=n.dataItemKey,h=n.virtual,m=n.size,g=n.rounded,v=n.fillMode,y=n.loading,b=n.filter,k=this.state,w=k.text,C=k.focused,x=k.focusedTag,O=this.base.vs,S=this.props.id||this._inputId;O.enabled=void 0!==h,void 0!==h&&(O.skip=h.skip,O.total=h.total,O.pageSize=h.pageSize);var I=[];void 0===u?this.value.forEach((function(e){I.push({text:E(e,p),data:[e]})})):I.push.apply(I,u),this.setItems(I,this._tags);var N=!this.validityStyles||this.validity.valid,T=Boolean(void 0!==b?b:w)||this.value.length>0,R=o.createElement("div",{ref:this.componentRef,className:(0,s.A)("k-multiselect k-input",i,(e={},e["k-input-".concat(Le[m]||m)]=m,e["k-rounded-".concat(Be[g]||g)]=g,e["k-input-".concat(v)]=v,e["k-focus"]=C&&!c,e["k-invalid"]=!N,e["k-disabled"]=c,e["k-loading"]=y,e["k-required"]=this.required,e)),style:a?Fe(Fe({},r),{width:void 0}):r,dir:l,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleWrapperClick,onMouseDown:M},o.createElement("div",{className:(0,s.A)("k-input-values k-chip-list k-selection-multiple",(t={},t["k-chip-list-".concat(Le[m]||m)]=m,t)),role:"listbox",id:"tagslist-"+this.base.guid},I.length>0&&o.createElement(Pe,{tagRender:this.props.tagRender,onTagDelete:this.onTagDelete,data:I,guid:this.base.guid,focused:x?I.find((function(e){return D(e,x,f)})):void 0,size:m}),this.renderSearchbar(S)),y&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),T&&o.createElement(fe,{onClick:this.clearButtonClick}),this.renderListContainer());return a?o.createElement(d._,{label:a,editorId:S,editorValue:w||E(this.value[0],p),editorValid:N,editorDisabled:c,style:{width:r?r.width:void 0},children:R}):R},t.prototype.renderSearchbar=function(e){var t=this.state,n=t.activedescendant,r=t.focusedTag,i=this.props,a=i.disabled,s=i.placeholder,l=i.ariaDescribedBy,c=(void 0!==this.props.filter?this.props.filter:this.state.text)||"",u=void 0!==this.props.opened?this.props.opened:this.state.opened,d=this.getFocusedState().focusedIndex,p=0!==this.value.length||c?void 0:s,f=n===_e.TagsList&&void 0!==r?"tag-".concat(this.base.guid,"-").concat(r.text.replace(/\s+/g,"-")):"option-".concat(this.base.guid,"-").concat(d);return o.createElement(ue,{id:e,size:Math.max((p||"").length,c.length,1),tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,placeholder:p,value:c,onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,ref:this.searchbarRef,disabled:a,expanded:u,owns:this.base.listBoxId,role:"combobox",activedescendant:f,ariaDescribedBy:"tagslist-".concat(this.base.guid).concat(l?" "+l:""),ariaLabelledBy:this.props.ariaLabelledBy})},t.prototype.onTagsNavigate=function(e,t){var n=e.keyCode,r=this.state.focusedTag,o=this._tags,i=this.props.dataItemKey,a=r?o.findIndex((function(e){return D(e,r,i)})):-1,s=void 0,c=-1!==a;if(n===l.R.left)s=o[a=c?Math.max(0,a-1):o.length-1];else if(n===l.R.right)a===o.length-1?s=void 0:c&&(s=o[a=Math.min(o.length-1,a+1)]);else if(n===l.R.home)s=o[0];else if(n===l.R.end)s=o[o.length-1];else if(n===l.R.delete){if(c){var u=this.value;I(u,o[a].data,i),this.triggerOnChange(u,t)}}else if(n===l.R.backspace)if(u=this.value,c)I(u,o[a].data,i),this.triggerOnChange(u,t);else if(!c&&o.length){var d=o.pop();I(u,d.data,i),this.triggerOnChange(u,t)}s!==r&&(t.data.focusedTag=s,t.data.activedescendant=_e.TagsList),this.applyState(t)},t.prototype.triggerOnChange=function(e,t){void 0===this.props.value&&(t.data.value=ze([],e,!0)),this._valueItemsDuringOnChange=[],this.setItems(e,this._valueItemsDuringOnChange),t.events.push({type:"onChange"})},t.prototype.selectFocusedItem=function(e){var t=this.props,n=t.data,r=void 0===n?[]:n,o=t.virtual,i=this.getFocusedState().focusedIndex;void 0!==r[i-(o?o.skip:0)]&&this.handleItemClick(i,e)},t.prototype.setItems=function(e,t){t.length=0,t.push.apply(t,e)},t.prototype.getFocusedState=function(){var e,t=this.state.focusedIndex,n=void 0!==this.props.filter?this.props.filter:this.state.text,r=this.props,o=r.allowCustom,i=r.data,a=void 0===i?[]:i,s=r.dataItemKey,l=r.virtual,c=r.textField,u=r.focusedItemIndex,d=void 0===u?O:u,p=l&&l.skip||0;if(void 0!==t)return{focusedIndex:t,focusedItem:a[t-p],focusedType:Ae.ListItem};var f=this.value;if(o&&n)return{focusedItem:null,focusedIndex:-1,focusedType:Ae.CustomItem};if(n)return{focusedItem:a[e=d(a,n,c)],focusedIndex:e+p,focusedType:Ae.ListItem};if(f.length){var h=f[f.length-1];return e=a.findIndex((function(e){return N(e,h,s)})),void 0!==a[e]?{focusedIndex:e+p,focusedItem:a[e],focusedType:Ae.ListItem}:{focusedType:Ae.None,focusedIndex:-1}}return 0===p?{focusedItem:a[0],focusedIndex:0,focusedType:Ae.ListItem}:{focusedType:Ae.None,focusedIndex:-1}},t.prototype.focusElement=function(e){var t=this;this._skipFocusEvent=!0,e.focus(),window.setTimeout((function(){return t._skipFocusEvent=!1}),0)},t.prototype.applyState=function(e){this.base.applyState(e),this._valueItemsDuringOnChange=null},t.displayName="MultiSelect",t.propTypes=Fe(Fe({},Z.propTypes),{autoClose:i.bool,value:i.arrayOf(i.any),defaultValue:i.arrayOf(i.any),dataItemKey:i.string,placeholder:i.string,tags:i.arrayOf(i.shape({text:i.string,data:i.arrayOf(i.any)})),tagRender:i.func,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string}),t.defaultProps=Fe(Fe({},Z.defaultProps),{autoClose:!0,required:!1,size:"medium",rounded:"medium",fillMode:"solid"}),t}(o.Component),We=(0,u.Y)(),$e=(0,u.u)(We,Ke);$e.displayName="KendoReactMultiSelect";var qe=function(){return qe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},qe.apply(this,arguments)},Ue=function(e){return o.createElement(q,qe({},e,{wrapperCssClass:"k-table-body k-table-scroller",listClassName:"k-table k-table-list",listStyle:qe({},e.listStyle)}))},Ge=n(9656),Ye=n(2665),Xe=n(9659),Je=function(){return Je=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Je.apply(this,arguments)},Ze=(0,u.Y)(),Qe=o.forwardRef((function(e,t){var n=(0,Ge.Y)(Ze,e),r=o.useRef(null),i=o.useRef(null),a=(0,Ye.n)(),l=n.columns,c=void 0===l?tt.columns:l,u=n.popupSettings,d=void 0===u?tt.popupSettings:u,p=n.className,f=(n.size,n.onOpen),h=n.onClose,m=n.onFocus,g=n.onBlur,v=n.onChange,y=n.onFilterChange,b=n.onPageChange,k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(n,["columns","popupSettings","className","size","onOpen","onClose","onFocus","onBlur","onChange","onFilterChange","onPageChange"]);o.useImperativeHandle(r,(function(){return{element:i.current&&i.current.element,focus:function(){i.current&&i.current.focus()},get value(){return i.current&&i.current.value},get name(){return i.current&&i.current.name},props:n}})),o.useImperativeHandle(t,(function(){return r.current}));var w=o.useMemo((function(){if(void 0===w&&void 0!==n.groupField&&n.data)return E(n.data[0],n.groupField)}),[n.data,n.groupField]),C=o.useState(w),x=C[0],O=C[1],S=o.useMemo((function(){return o.createElement(o.Fragment,null,n.header,o.createElement("div",{className:"k-table-header-wrap"},o.createElement("table",{className:"k-table",role:"presentation"},o.createElement("colgroup",null,c.map((function(e,t){return o.createElement("col",{key:e.uniqueKey?e.uniqueKey:t,style:{width:e.width?e.width:tt.width}})}))),o.createElement("thead",{className:"k-table-thead"},o.createElement("tr",{className:"k-table-row"},c.map((function(e,t){return o.createElement("th",{className:"k-table-th",key:e.uniqueKey?e.uniqueKey:t},e.header||" ")}))),x&&o.createElement("tr",{className:"k-table-group-row"},o.createElement("th",{className:"k-table-th",colSpan:c.length},x))))))}),[n.header,c,x]),I=o.useMemo((function(){return"calc(".concat(c.map((function(e){return t=e.width,n=tt.width,t?"number"==typeof t?t+"px":t:n;var t,n})).filter(Boolean).join(" + ")," + ").concat(a,"px + 4px)")}),[c,a]),N=n.virtual?n.virtual.skip:0,T=o.useCallback((function(e,t){var r,i,a,l=c.map((function(e,n){return o.createElement("span",{className:"k-table-td",style:{width:e.width?e.width:tt.width},key:e.uniqueKey?e.uniqueKey:n},e.field?(0,Xe.Y)(e.field)(t.dataItem):"")})),u=void 0,d=n.data||[],p=t.index-N;void 0!==n.groupField&&(r=(a=(0,Xe.Y)(n.groupField))(d[p]),i=a(d[p-1]),r&&i&&r!==i&&(u=r)),u&&l.push(o.createElement("div",{key:"group",className:"k-table-td k-table-group-td"},o.createElement("span",null,u)));var f=o.cloneElement(e,Je(Je({},e.props),{className:(0,s.A)("k-table-row",{"k-table-alt-row":t.index%2!=0,"k-focus":t.focused,"k-selected":t.selected,"k-first":Boolean(u)})}),l);return n.itemRender?n.itemRender.call(void 0,f,t):f}),[c,n.groupField,n.itemRender,n.data,N]),M=o.useCallback((function(e,t){e&&e.call(void 0,Je(Je({},t),{target:r.current}))}),[]),D=o.useCallback((function(e){return M(f,e)}),[f]),R=o.useCallback((function(e){return M(h,e)}),[h]),P=o.useCallback((function(e){return M(m,e)}),[m]),_=o.useCallback((function(e){return M(g,e)}),[g]),A=o.useCallback((function(e){return M(v,e)}),[v]),j=o.useCallback((function(e){return M(y,e)}),[y]),F=o.useCallback((function(e){return M(b,e)}),[b]),z=o.useCallback((function(e){O(e.group)}),[]);o.useEffect((function(){(0,Ye.p)()}));var L=o.useCallback((function(e){return o.createElement(Ue,Je({},e))}),[]);return o.createElement(ke,Je({},k,{list:L,popupSettings:Je(Je({width:I},d),{popupClass:"k-dropdowngrid-popup k-reset",className:d.className}),ref:i,header:S,itemRender:T,size:n.size,rounded:n.rounded,fillMode:n.fillMode,onOpen:D,onClose:R,onFocus:P,onBlur:_,onChange:A,onFilterChange:j,onPageChange:F,onGroupScroll:z,className:(0,s.A)("k-dropdowngrid",p)}))})),et=Je(Je({},ye.propTypes),{columns:i.any.isRequired}),tt={columns:[],popupSettings:{},width:"200px",size:"medium",rounded:"medium",fillMode:"solid"};Qe.displayName="KendoMultiColumnComboBox",Qe.propTypes=et,Qe.defaultProps=tt;var nt=n(3228),rt=n(1573),ot=n(8006),it=n(5407),at="_";function st(e,t,n){if(pt(e))return t[Number(e)];var r=t[Number(function(e){return dt(e)?e:e.split(at)[0]}(e))],o=r&&r[n]||[];return o.length?st(function(e){if(dt(e))return e;var t=e.indexOf(at);return e.substring(t+1)}(e),o,n):void 0}function lt(e){return ct("0",e)}function ct(e,t){return e=e.toString(),t?t+at+e:e}function ut(e){var t=e.lastIndexOf(at);return t<0?"":e.substring(0,t)}function dt(e){return""===e||e.indexOf(at)<0}function pt(e){return""!==e&&e.indexOf(at)<0}function ft(e){var t=e.lastIndexOf(at);return t<0?e:e.substring(t+1)}const ht=function(){function e(){this.objects=[]}return e.prototype.init=function(e){for(var t,n=0;n<e.length;n++)n%5e4==0&&(t={},this.objects.push(t)),t[e[n]]=!0},e.prototype.hasId=function(e){return this.objects.some((function(t){return t[e]}))},e}();function mt(e,t){var n=(e||"").split("."),r=t;return n.forEach((function(e){r=r?r[e]:void 0})),r}function gt(e,t){var n=mt(t,e);return Boolean(n&&n.length)}function vt(e,t){return t.expanded(e)&&gt(e,t.getChildrenField())}function yt(e,t,n,r){var o=function(e,t,n,r){var o=[],i=new ht;return i.init(e),kt(i,t,n,"",o,r),o}([e],t,n,r);return o.length?o[0]:void 0}function bt(e,t,n){for(var r=function(e){return e.split(at)}(e),o=t,i=0;i<r.length;i++){var a=o[Number(r[i])];if(n.disabled(a))return!1;o=a[n.getChildrenField()]}return!0}function kt(e,t,n,r,o,i){for(var a=0;a<n.length;a++){var s=n[a],l=ct(a,r);e.hasId(mt(t,s))&&o.push(l),gt(s,i)&&kt(e,t,mt(i,s),l,o,i)}}function wt(e,t,n,r,o){switch(r){case l.R.left:return pt(t)||o.expanded(e)&&bt(t,n,o)?t:ut(t);case l.R.right:return vt(e,o)?lt(t):t;case l.R.up:return i=Number(ft(t)),a=ut(t),i?xt(ct(i-1,a),n,o):pt(t)?t:a;case l.R.down:return vt(e,o)?lt(t):Ct(t,n,o)||t;case l.R.home:return"0";case l.R.end:return function(){for(var e,t=(n.length-1).toString(),r=n[n.length-1];vt(r,o);)t=ct((e=r[o.getChildrenField()]).length-1,t),r=e[e.length-1];return t}();default:return t}var i,a}function Ct(e,t,n){var r=ut(e),o=r?st(r,t,n.getChildrenField()):void 0,i=o?o[n.getChildrenField()]:t,a=Number(ft(e));return a<i.length-1?ct(a+1,r):o?Ct(r,t,n):void 0}function xt(e,t,n){var r=st(e,t,n.getChildrenField());return vt(r,n)?xt(ct(r[n.getChildrenField()].length-1,e),t,n):e}var Ot=n(1779),St=n(8686),Et="items",It=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nt=function(){return Nt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Nt.apply(this,arguments)},Tt=a.G.sizeMap,Mt=o.createContext((function(e){return e})),Dt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.itemGuid=(0,Y.M)(),t.onCheckChange=function(e){t.props.onCheckChange(e,t.item,t.itemId)},t.onExpandChange=function(e){t.props.onExpandChange(e,t.item,t.itemId)},t.onItemClick=function(e){t.props.onItemClick(e,t.item,t.itemId)},t.onPress=function(e){t.props.onPress(e.event,t.item,t.itemId)},t.onDrag=function(e){t.props.onDrag(e.event,t.item,t.itemId)},t.onRelease=function(e){t.props.onRelease(e.event,t.item,t.itemId)},t.assignDraggableMeta=function(e){e&&(e._kendoItemId=t.props.itemId,e._kendoTreeViewGuid=t.props.treeGuid)},t}return It(t,e),t.prototype.render=function(){var e=this,t=this.renderSubitemsIfApplicable(),n=this.renderItemInPart();return o.createElement("li",{className:this.getRootClassName(),tabIndex:this.tabIndex,role:"treeitem","aria-expanded":this.ariaExpanded,"aria-selected":this.ariaSelected,"aria-checked":this.ariaChecked,"aria-disabled":!!this.fieldsSvc.disabled(this.item)||void 0,ref:function(t){return e.itemElement=t}},o.createElement("div",{className:"k-treeview-".concat(this.props.position),ref:this.assignDraggableMeta},this.renderExpandIcon(),this.renderCheckbox(),this.props.draggable?o.createElement(Ot._,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease},n):n),this.props.animate?o.createElement(St.U,{transitionEnterDuration:200,transitionExitDuration:200,style:{display:"block"},children:t}):t)},t.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.itemId;e&&e===t&&this.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement&&(this.checkboxElement.indeterminate=this.fieldsSvc.checkIndeterminate(this.item))},t.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId;if(t&&t!==e.focusedItemId&&t===this.itemId&&this.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement){var n=this.fieldsSvc.checkIndeterminate(this.item);n!==e.fieldsService.checkIndeterminate(e.item)&&(this.checkboxElement.indeterminate=n)}},t.prototype.renderCheckbox=function(){var e,t=this;if(this.props.checkboxes){var n=this.props.size;return o.createElement("div",{className:"k-checkbox-wrap"},o.createElement("input",{type:"checkbox",className:(0,s.A)("k-checkbox k-rounded-md",(e={},e["k-checkbox-".concat(Tt[n]||n)]=n,e)),"aria-label":this.item.text,checked:Boolean(this.fieldsSvc.checked(this.item)),id:this.itemGuid,tabIndex:-1,onChange:this.onCheckChange,ref:function(e){return t.checkboxElement=e}}),o.createElement("label",{className:"k-checkbox-label",htmlFor:this.itemGuid}))}},t.prototype.renderExpandIcon=function(){return this.props.expandIcons&&(this.fieldsSvc.hasChildren(this.item)||gt(this.item,this.fieldsSvc.getChildrenField()))&&o.createElement("span",{className:"k-treeview-toggle"},o.createElement("span",{className:this.getIconClassName(),onClick:this.onExpandChange}))},t.prototype.renderSubitemsIfApplicable=function(){var e=this,t=this.fieldsSvc.children(this.item);return vt(this.item,this.fieldsSvc)?o.createElement("ul",{className:"k-treeview-group",role:"group"},t.map((function(n,r){return o.createElement(Rt,{item:n,position:0===r?"top":r===t.length-1?"bot":"mid",itemId:ct(r,e.itemId),treeGuid:e.props.treeGuid,animate:e.props.animate,focusedItemId:e.props.focusedItemId,tabbableItemId:e.props.tabbableItemId,fieldsService:e.props.fieldsService,itemUI:e.props.itemUI,checkboxes:e.props.checkboxes,ariaMultiSelectable:e.props.ariaMultiSelectable,onItemClick:e.props.onItemClick,onFocusDomElNeeded:e.props.onFocusDomElNeeded,draggable:e.props.draggable,onPress:e.props.onPress,onDrag:e.props.onDrag,onRelease:e.props.onRelease,expandIcons:e.props.expandIcons,onExpandChange:e.props.onExpandChange,onCheckChange:e.props.onCheckChange,key:r,size:e.props.size})}))):void 0},t.prototype.renderItemInPart=function(){return o.createElement("span",{className:this.getContentClassName(),style:{touchAction:"none"},onClick:this.onItemClick},o.createElement("span",{className:"k-treeview-leaf-text"},this.props.itemUI?o.createElement(this.props.itemUI,{item:this.item,itemHierarchicalIndex:this.itemId}):this.fieldsSvc.text(this.item)))},Object.defineProperty(t.prototype,"fieldsSvc",{get:function(){return this.props.fieldsService},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemId",{get:function(){return this.props.itemId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return(this.props.focusedItemId||this.props.tabbableItemId)===this.itemId?0:-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaExpanded",{get:function(){return this.fieldsSvc.hasChildren(this.item)||gt(this.item,this.fieldsSvc.getChildrenField())?Boolean(this.fieldsSvc.expanded(this.item)):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaChecked",{get:function(){return this.props.checkboxes?this.fieldsSvc.checked(this.item)?"true":this.fieldsSvc.checkIndeterminate(this.item)?"mixed":"false":void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaSelected",{get:function(){return!!this.fieldsSvc.selected(this.item)||(this.props.ariaMultiSelectable?!!this.fieldsSvc.disabled(this.item)&&void 0:void 0)},enumerable:!1,configurable:!0}),t.prototype.getIconClassName=function(){var e=this.fieldsSvc.expanded(this.item);return(0,s.A)("k-icon",{"k-i-expand":!e,"k-i-collapse":e,"k-i-loading":e&&!gt(this.item,this.fieldsSvc.getChildrenField())})},t.prototype.getRootClassName=function(){return(0,s.A)("k-treeview-item",{"k-disabled":this.fieldsSvc.disabled(this.item)})},t.prototype.getContentClassName=function(){return(0,s.A)("k-treeview-leaf",{"k-focus":this.props.focusedItemId===this.itemId,"k-selected":this.fieldsSvc.selected(this.item)})},t.defaultProps={position:"top"},t}(o.Component),Rt=o.forwardRef((function(e,t){var n=o.useContext(Mt).call(void 0,e);return o.createElement(Dt,Nt({ref:t},n))}));Rt.displayName="TreeViewItem";const Pt=function(){function e(e){this.expandField=e.expandField,this.selectField=e.selectField,this.hasChildrenField=e.hasChildrenField,this.childrenField=e.childrenField,this.textField=e.textField,this.disableField=e.disableField,this.checkField=e.checkField,this.checkIndeterminateField=e.checkIndeterminateField,this.focusIdField=e.focusIdField}return e.prototype.expanded=function(e){return mt(this.expandField,e)},e.prototype.selected=function(e){return mt(this.selectField,e)},e.prototype.text=function(e){return mt(this.textField,e)},e.prototype.disabled=function(e){return mt(this.disableField,e)},e.prototype.hasChildren=function(e){return mt(this.hasChildrenField,e)},e.prototype.children=function(e){return mt(this.childrenField,e)||[]},e.prototype.checked=function(e){return mt(this.checkField,e)},e.prototype.checkIndeterminate=function(e){return mt(this.checkIndeterminateField,e)},e.prototype.focusId=function(e){return this.focusIdField&&mt(this.focusIdField,e)},e.prototype.getChildrenField=function(){return this.childrenField},e}();var _t={name:"@progress/kendo-react-treeview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660123702,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},At=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jt=a.G.sizeMap,Ft=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:"0"},n.fieldsSvc=null,n.allowExplicitFocus=!1,n.treeGuid=(0,Y.M)(),n._element=null,n.onFocusDomElNeeded=function(e){n.allowExplicitFocus&&n.focusDomItem(e)},n.onCheckChange=function(e,t,r){n.setFocus(r),n.dispatchCheckChange(e,t,r)},n.onExpandChange=function(e,t,r){n.setFocus(r),n.dispatchExpandChange(e,t,r)},n.onPress=function(e,t,r){n.props.onItemDragStart&&n.props.onItemDragStart.call(void 0,{target:n,item:t,itemHierarchicalIndex:r})},n.onDrag=function(e,t,r){var o=e.pageX,i=e.pageY,a=e.clientX,s=e.clientY;n.props.onItemDragOver&&n.props.onItemDragOver.call(void 0,{target:n,item:t,itemHierarchicalIndex:r,pageX:o,pageY:i,clientX:a,clientY:s})},n.onRelease=function(e,t,r){var o=e.pageX,i=e.pageY,a=e.clientX,s=e.clientY;n.props.onItemDragEnd&&n.props.onItemDragEnd.call(void 0,{target:n,item:t,itemHierarchicalIndex:r,pageX:o,pageY:i,clientX:a,clientY:s})},n.onItemClick=function(e,t,r){n.setFocus(r),n.dispatchItemClick(e,t,r)},n.onFocus=function(){clearTimeout(n.blurRequest),void 0===n.state.focusedItemId&&n.data.length&&n.setFocus(n.state.tabbableItemId)},n.onBlur=function(){clearTimeout(n.blurRequest),n.blurRequest=window.setTimeout((function(){return n.setFocus(void 0)}),0)},n.onKeyDown=function(e){var t=n.getFocusedItem();if(t&&n.fieldsSvc){var r=wt(t,n.state.focusedItemId,n.data,e.keyCode,n.fieldsSvc);r!==n.state.focusedItemId&&(e.preventDefault(),n.allowExplicitFocus=!0,n.setFocus(r)),n.dispatchEventsOnKeyDown(e,t)}},(0,Q.s)(_t),n}return At(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e,t=this;this.fieldsSvc=new Pt(this.props);var n=this.props,r=n.size,i=n.className;return o.createElement("div",{className:(0,s.A)("k-treeview",(e={},e["k-treeview-".concat(jt[r]||r)]=r,e),i),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,role:"tree","aria-multiselectable":!!this.ariaMultiSelectable||void 0,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],ref:function(e){return t._element=e},tabIndex:this.props.tabIndex},o.createElement("ul",{className:"k-treeview-lines k-treeview-group",role:"group"},this.data.map((function(e,n){return o.createElement(Rt,{item:e,position:0===n?"top":n===t.data.length-1?"bot":"mid",itemId:n.toString(),treeGuid:t.treeGuid,animate:t.props.animate,focusedItemId:t.state.focusedItemId,tabbableItemId:t.state.tabbableItemId,fieldsService:t.fieldsSvc,itemUI:t.props.item,checkboxes:t.props.checkboxes,ariaMultiSelectable:t.ariaMultiSelectable,onItemClick:t.onItemClick,onFocusDomElNeeded:t.onFocusDomElNeeded,draggable:t.props.draggable,onPress:t.onPress,onDrag:t.onDrag,onRelease:t.onRelease,expandIcons:t.props.expandIcons,onExpandChange:t.onExpandChange,onCheckChange:t.onCheckChange,key:n,size:r})}))))},t.prototype.componentDidUpdate=function(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},t.prototype.dispatchEventsOnKeyDown=function(e,t){var n=this;if(null!==this.fieldsSvc){var r=function(){return n.fieldsSvc&&bt(n.state.focusedItemId,n.data,n.fieldsSvc)};e.keyCode===l.R.left&&this.fieldsSvc.expanded(t)&&r()||e.keyCode===l.R.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||gt(t,this.props.childrenField))&&r()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===l.R.enter&&r()?this.dispatchItemClick(e,t,this.state.focusedItemId):e.keyCode===l.R.space&&r()&&(e.preventDefault(),this.dispatchCheckChange(e,t,this.state.focusedItemId))}},t.prototype.setFocus=function(e){if(e&&this.fieldsSvc)if(this.fieldsSvc.focusIdField){var t=this.getItemById(e);this.setState({focusedItemId:e,focusedItemPublicId:this.fieldsSvc.focusId(t)})}else this.setState({focusedItemId:e});else this.setState((function(e){return{focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:e.focusedItemId}}))},t.prototype.getFocusedItem=function(){return this.state.focusedItemId?this.getItemById(this.state.focusedItemId):void 0},t.prototype.getItemById=function(e){return st(e,this.data,this.props.childrenField||Et)},t.prototype.dispatchCheckChange=function(e,t,n){(0,it.N)(this.props.onCheckChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchExpandChange=function(e,t,n){(0,it.N)(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchItemClick=function(e,t,n){(0,it.N)(this.props.onItemClick,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.refocusDueToFocusIdField=function(){if(this.fieldsSvc&&this.fieldsSvc.focusIdField){var e=this.state.focusedItemPublicId;if(e){var t=this.props.getFocusHierarchicalIndex?this.props.getFocusHierarchicalIndex(e):yt(e,this.fieldsSvc.focusIdField,this.data,this.props.childrenField);t!==this.state.focusedItemId&&(this.allowExplicitFocus=!0,this.setState({focusedItemId:t}))}}},Object.defineProperty(t.prototype,"ariaMultiSelectable",{get:function(){return!0===this.props["aria-multiselectable"]||"true"===this.props["aria-multiselectable"]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.data||[]},enumerable:!1,configurable:!0}),t.prototype.focusDomItem=function(e){e.focus()},Object.defineProperty(t.prototype,"guid",{get:function(){return this.treeGuid},enumerable:!1,configurable:!0}),t.propTypes={data:i.arrayOf(i.any),animate:i.bool,tabIndex:i.number,focusIdField:i.string,getHierarchicalIndexById:i.func,onExpandChange:i.func,onItemClick:i.func,expandField:i.string,selectField:i.string,childrenField:i.string,hasChildrenField:i.string,textField:i.string,disableField:i.string,item:i.any,"aria-multiselectable":function(e,t,n){return void 0!==e[t]&&!0!==e[t]&&!1!==e[t]&&"true"!==e[t]&&"false"!==e[t]?new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed."):null},"aria-label":i.string,"aria-labelledby":i.string,size:i.oneOf([null,"small","medium","large"])},t.defaultProps={animate:!0,expandField:"expanded",selectField:"selected",hasChildrenField:"hasChildren",childrenField:Et,textField:"text",disableField:"disabled",checkField:"checked",checkIndeterminateField:"checkIndeterminate",size:"medium"},t}(o.Component);function zt(e,t,n){var r=o.useState(t),i=r[0],a=r[1];return o.useEffect((function(){void 0!==i&&e.current&&a(e.current.offsetWidth)}),n),i}var Lt=function(e){return o.createElement("div",{className:"k-nodata"},o.createElement("div",null,e.children))},Bt=function(){return Bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Bt.apply(this,arguments)},Vt=a.G.sizeMap,Ht=a.G.roundedMap,Kt=function(e){return o.createElement("span",{className:"k-input-value-text"},e.children)},Wt=function(e){return e.split("_").map((function(e){return parseInt(e,10)}))},$t={selectField:"selected",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},required:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},qt=(0,u.Y)(),Ut=o.forwardRef((function(e,t){var n,r;(0,Q.s)(ee);var i=(0,Ge.Y)(qt,e),a=o.useMemo((function(){return(0,Y.M)()}),[]),u=i.id||a,f=i.data,h=void 0===f?[]:f,m=i.dataItemKey,g=i.popupSettings,v=void 0===g?{}:g,y=i.style,b=void 0===y?{}:y,k=i.opened,x=i.disabled,O=i.onOpen,S=void 0===O?nt.Z:O,I=i.onClose,T=void 0===I?nt.Z:I,M=i.placeholder,D=i.label,R=i.name,P=i.selectField,_=void 0===P?$t.selectField:P,A=i.subItemsField,j=void 0===A?$t.subItemsField:A,F=i.validationMessage,z=i.valid,L=i.required,W=i.validityStyles,$=(0,c.p)(i.tabIndex,x),q=o.useRef(null),U=o.useRef(null),G=o.useRef(null),X=o.useRef(null),J=o.useRef(null),Z=o.useRef(!1),te=o.useState(void 0),ne=te[0],re=te[1],oe=void 0!==i.value,ie=oe?i.value:void 0!==ne?ne:i.defaultValue,ae=C(ie),se=ae?E(ie,i.textField):"",le=function(e,t){var n=e.valid;return{customError:void 0!==e.validationMessage,valid:Boolean(void 0!==n?n:!e.required||t),valueMissing:!t}}({validationMessage:F,valid:z,required:L},ae),ce=o.useCallback((function(){return U.current&&U.current.focus()}),[]);o.useImperativeHandle(q,(function(){return{props:i,element:U.current,focus:ce}})),o.useImperativeHandle(t,(function(){return q.current}));var ue=(0,rt.V)(U,i.dir),de=void 0!==v.width?v.width:void 0!==b.width?b.width:$t.popupSettings.width,pe=zt(U,de),fe=Bt({width:pe},void 0!==ue?{direction:ue}:{}),he=o.useState(!1),me=he[0],ge=he[1],ve=void 0!==k?k:me,ye=o.useState(!1),be=ye[0],ke=ye[1],we=o.useState(""),Ce=we[0],xe=we[1],Oe=o.useCallback((function(){X.current&&X.current.setCustomValidity&&X.current.setCustomValidity(le.valid?"":void 0===F?"Please select a value from the list!":F)}),[F,le]);o.useEffect(Oe);var Se=o.useCallback((function(e){if(!ve){if(S){var t=Bt({},e);S.call(void 0,t)}void 0===k&&ge(!0)}}),[ve,k,S]),Ee=o.useCallback((function(e){if(ve){if(T){var t=Bt({},e);T.call(void 0,t)}void 0===k&&ge(!1)}}),[ve,k,T]),Ie=o.useCallback((function(e){if(!e.isDefaultPrevented()&&q.current){ke(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};(ve?Ee:Se)(t)}}),[ve,k,S,T]),Ne=o.useCallback((function(e){Z.current=!0,e(),window.setTimeout((function(){return Z.current=!1}),0)}),[]),Te=o.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=J.current&&J.current.element;if(q.current&&(!e.isDefaultPrevented()||G.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};if(ve)if(t===l.R.esc||n&&t===l.R.up)e.preventDefault(),Ee(o);else if(r&&r.querySelector(".k-focus")&&(t===l.R.up||t===l.R.down||t===l.R.left||t===l.R.right||t===l.R.home||t===l.R.end)){if(t===l.R.up&&G.current){var i=Array.from(r.querySelectorAll(".k-treeview-item")),a=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],i,!0).reverse().find((function(e){return Boolean(e&&e.querySelector(".k-focus"))}));if(a&&0===i.indexOf(a))return Ne((function(){De(G.current)}))}Ne(nt.Z)}else t===l.R.down&&Ne((function(){De(G.current||r)}));else n&&t===l.R.down&&(e.preventDefault(),Se(o))}}),[ve,k,S,T]),Me=o.useCallback((function(e){var t=e.keyCode;e.altKey||t!==l.R.up&&t!==l.R.down||(e.preventDefault(),Ne(t===l.R.up?function(){De(U.current)}:function(){De(J.current&&J.current.element)}))}),[]),De=o.useCallback((function(e){e&&Ne((function(){return e.focus()}))}),[]),Re=o.useCallback((function(){be||!ve||k?i.filterable?De(G.current):De(J.current&&J.current.element):Ee({target:q.current})}),[T,i.filterable,be,k,ve]),Pe=o.useCallback((function(){be&&De(U.current)}),[be]),_e=o.useCallback((function(e){if(!be&&!Z.current&&(ke(!0),i.onFocus&&q.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};i.onFocus.call(void 0,t)}}),[be,i.onFocus]),Ae=o.useCallback((function(e){if(be&&!Z.current&&q.current){ke(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};if(i.onBlur){var n=Bt({},t);i.onBlur.call(void 0,n)}Ee(t)}}),[be,i.onBlur,ve,k,T]),je=o.useCallback((function(){be&&Ne(nt.Z)}),[be]),Fe=o.useCallback((function(e,t,n){if(i.onChange){var r=Bt({value:t,level:n?Wt(n):[]},e);i.onChange.call(void 0,r)}oe||re(t)}),[i.onChange,oe]),ze=o.useCallback((function(e){if(!N(e.item,ie,m)&&q.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,o={syntheticEvent:e.syntheticEvent,nativeEvent:r,target:q.current};Fe(o,t,n),Ee(o)}}),[oe,ie,i.onChange,m,ve,k,T]),Le=o.useCallback((function(e){if(q.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};Fe(t,null),Ee(t),e.preventDefault()}}),[oe,i.onChange,ve,k,T]),Be=o.useCallback((function(e){if(e.syntheticEvent.stopPropagation(),i.onExpandChange&&q.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,o=e.syntheticEvent,a={level:Wt(n),item:t,nativeEvent:r,syntheticEvent:o,target:q.current};i.onExpandChange.call(void 0,a)}}),[i.onExpandChange]),Ve=o.useCallback((function(e){if(i.onFilterChange&&q.current){var t={filter:{field:i.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};i.onFilterChange.call(void 0,t),void 0===i.filter&&xe(e.target.value)}}),[i.onFilterChange,i.filter,i.textField]),He=o.useMemo((function(){return oe||!ae?h:(0,ot.Gy)(h,j,(function(e){var t;return(0,ot.u5)(e,j,((t={})[_]=N(e,ie,m),t))}))}),[h,ie,oe,ae,_,j]),Ke=i.listNoData||Lt,We=i.valueHolder||Kt,$e=(0,B.useLocalization)(),qe=!W||le.valid,Ue=i.size,Ye=i.rounded,Xe=i.fillMode,Je=o.createElement("span",{className:(0,s.A)("k-dropdowntree k-picker",i.className,(n={},n["k-picker-".concat(Vt[Ue]||Ue)]=Ue,n["k-rounded-".concat(Ht[Ye]||Ye)]=Ye,n["k-picker-".concat(Xe)]=Xe,n["k-focus"]=be,n["k-invalid"]=!qe,n["k-loading"]=i.loading,n["k-required"]=L,n["k-disabled"]=i.disabled,n)),tabIndex:$,accessKey:i.accessKey,id:u,style:D?Bt(Bt({},b),{width:void 0}):b,dir:ue,ref:U,onKeyDown:x?void 0:Te,onMouseDown:je,onClick:x?void 0:Ie,onFocus:_e,onBlur:Ae,role:"combobox","aria-haspopup":"true","aria-expanded":ve,"aria-disabled":x,"aria-label":D,"aria-labelledby":i.ariaLabelledBy,"aria-describedby":i.ariaDescribedBy},o.createElement("span",{className:"k-input-inner"},o.createElement(We,{item:ie},se||M)),i.loading&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),ae&&!x&&o.createElement("span",{onClick:Le,className:"k-clear-value",title:$e.toLanguageString(H,K[H]),role:"button",tabIndex:-1,onMouseDown:function(e){return e.preventDefault()}},o.createElement("span",{className:"k-icon k-i-x"})),o.createElement("button",{tabIndex:-1,type:"button","aria-label":"select",className:(0,s.A)("k-input-button k-button k-icon-button",(r={},r["k-button-".concat(Vt[Ue]||Ue)]=Ue,r["k-button-".concat(Xe)]=Xe,r["k-button-".concat(Xe,"-base")]=Xe,r))},o.createElement("span",{className:"k-button-icon k-icon k-i-arrow-s"})),o.createElement("select",{name:R,ref:X,tabIndex:-1,"aria-hidden":!0,title:D,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},o.createElement("option",{value:i.valueMap?i.valueMap.call(void 0,ie):ie})),o.createElement(p.G,{className:(0,s.A)(v.className,{"k-rtl":"rtl"===ue}),popupClass:v.popupClass,style:fe,animate:v.animate,anchor:U.current,show:ve,onOpen:Re,onClose:Pe,appendTo:v.appendTo},i.filterable&&o.createElement(w,{value:void 0===i.filter?Ce:i.filter,inputRef:G,onChange:Ve,onKeyDown:Me,size:Ue,rounded:Ye,fillMode:Xe}),h.length>0?o.createElement(Ft,{ref:J,tabIndex:$,data:He,focusIdField:m,textField:i.textField,selectField:_,expandField:i.expandField,childrenField:j,expandIcons:!0,onItemClick:ze,onExpandChange:Be,size:Ue,item:i.item}):o.createElement(Ke,null,$e.toLanguageString(V,K[V]))));return D?o.createElement(d._,{label:D,editorValue:se,editorPlaceholder:M,editorValid:qe,editorDisabled:x,editorId:u,style:{width:b?b.width:void 0},children:Je,dir:ue}):Je})),Gt={opened:i.bool,disabled:i.bool,dir:i.string,tabIndex:i.number,accessKey:i.string,data:i.array,value:i.any,valueMap:i.func,placeholder:i.string,dataItemKey:i.string.isRequired,textField:i.string.isRequired,selectField:i.string,expandField:i.string,subItemsField:i.string,className:i.string,style:i.object,label:i.string,validationMessage:i.string,validityStyles:i.bool,valid:i.bool,required:i.bool,name:i.string,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,filterable:i.bool,filter:i.string,loading:i.bool,popupSettings:i.shape({animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),popupClass:i.string,className:i.string,appendTo:i.any,width:i.oneOfType([i.string,i.number]),height:i.oneOfType([i.string,i.number])}),onOpen:i.func,onClose:i.func,onFocus:i.func,onBlur:i.func,onChange:i.func,onFilterChange:i.func,onExpandChange:i.func,item:i.func,valueHolder:i.func,listNoData:i.func};Ut.displayName="KendoReactDropDownTree",Ut.defaultProps=$t,Ut.propTypes=Gt;var Yt=function(){return Yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yt.apply(this,arguments)},Xt=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Jt=a.G.sizeMap,Zt=a.G.roundedMap,Qt={checkField:"checkField",checkIndeterminateField:"checkIndeterminateField",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},size:"medium",rounded:"medium",fillMode:"solid",required:!1,validityStyles:!0},en=(0,u.Y)(),tn=o.forwardRef((function(e,t){var n,r,i=(0,Ge.Y)(en,e);(0,Q.s)(ee);var a=o.useMemo((function(){return(0,Y.M)()}),[]),u=i.id||a,f=i.data,h=void 0===f?[]:f,m=i.dataItemKey,g=i.popupSettings,v=void 0===g?{}:g,y=i.style,b=void 0===y?{}:y,k=i.opened,C=i.disabled,x=i.onOpen,O=void 0===x?nt.Z:x,S=i.onClose,I=void 0===S?nt.Z:S,T=i.placeholder,M=i.label,R=i.name,P=i.checkField,_=void 0===P?Qt.checkField:P,A=i.checkIndeterminateField,j=void 0===A?Qt.checkIndeterminateField:A,F=i.subItemsField,z=void 0===F?Qt.subItemsField:F,L=i.validationMessage,H=i.valid,W=i.tags,$=i.value,q=i.required,U=void 0===q?Qt.required:q,G=i.validityStyles,X=void 0===G?Qt.validityStyles:G,J=(0,c.p)(i.tabIndex,C),Z=o.useRef(null),te=o.useRef(null),ne=o.useRef(null),re=o.useRef(null),oe=o.useRef(null),ie=o.useRef(!1),ae=o.useRef([]),se=o.useRef(null),le=o.useState(),ce=le[0],ue=le[1],de=o.useState(!1),pe=de[0],he=de[1],me=o.useState(!1),ge=me[0],ve=me[1],ye=o.useState(""),be=ye[0],ke=ye[1],we=void 0!==k?k:pe,Ce=Boolean(Array.isArray($)&&$.length),xe=function(e,t){var n=e.valid;return{customError:void 0!==e.validationMessage,valid:Boolean(void 0!==n?n:!e.required||t),valueMissing:!t}}({validationMessage:L,valid:H,required:U},Ce),Oe=(0,rt.V)(te,i.dir),Se=void 0!==v.width?v.width:void 0!==b.width?b.width:Qt.popupSettings.width,Ee=zt(te,Se),Ie=Yt({width:Ee},void 0!==Oe?{direction:Oe}:{}),Ne=o.useCallback((function(){return te.current&&te.current.focus()}),[]);ae.current=void 0===W?($||[]).map((function(e){return{text:E(e,i.textField),data:[e]}})):Xt([],W,!0),o.useImperativeHandle(Z,(function(){return{props:i,element:te.current,focus:Ne}})),o.useImperativeHandle(t,(function(){return Z.current}));var Te=o.useCallback((function(){re.current&&re.current.setCustomValidity&&re.current.setCustomValidity(xe.valid?"":void 0===L?"Please select a value from the list!":L)}),[L,xe]);o.useEffect(Te),o.useEffect((function(){se.current&&we&&se.current.setPosition(se.current._popup)}),[$,we]);var Me=o.useCallback((function(e,t,n){if(i.onChange){var r=Yt({items:t,operation:n},e);i.onChange.call(void 0,r)}}),[i.onChange]),De=o.useCallback((function(e){if(!N(e.item,$,m)&&Z.current){var t=e.item,n=e.nativeEvent,r={syntheticEvent:e.syntheticEvent,nativeEvent:n,target:Z.current};Me(r,[t],"toggle")}}),[$,m,Me]),Re=o.useCallback((function(e){if(!we){if(O){var t=Yt({},e);O.call(void 0,t)}void 0===k&&he(!0)}}),[we,k,O]),_e=o.useCallback((function(e){if(we){if(I){var t=Yt({},e);I.call(void 0,t)}void 0===k&&he(!1)}}),[we,k,I]),Ae=o.useCallback((function(e){ie.current=!0,e(),window.setTimeout((function(){return ie.current=!1}),0)}),[]),je=o.useCallback((function(e){e&&Ae((function(){return e.focus()}))}),[Ae]),Fe=o.useCallback((function(){!ge&&we?_e({target:Z.current}):i.filterable?je(ne.current):je(oe.current&&oe.current.element)}),[ge,we,je,_e,i.filterable]),ze=o.useCallback((function(){ge&&je(te.current)}),[ge,je]),Le=o.useCallback((function(e){if(!ge&&!ie.current&&(ve(!0),i.onFocus&&Z.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};i.onFocus.call(void 0,t)}}),[ge,i.onFocus]),Be=o.useCallback((function(e){if(ge&&!ie.current&&Z.current){ve(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};if(i.onBlur){var n=Yt({},t);i.onBlur.call(void 0,n)}_e(t)}}),[ge,i.onBlur,we,k,I]),Ve=o.useCallback((function(){ge&&Ae(nt.Z)}),[ge,Ae]),He=o.useCallback((function(e){if(!e.isDefaultPrevented()&&Z.current){ve(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};we||Re(t)}}),[we,Re]),Ke=o.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=oe.current&&oe.current.element;if(Z.current&&(!e.isDefaultPrevented()||ne.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};if($&&$.length>0&&(t===l.R.left||t===l.R.right||t===l.R.home||t===l.R.end||t===l.R.delete)){var i=ae.current,a=ce?i.findIndex((function(e){return D(e,ce,m)})):-1,s=void 0,c=-1!==a;t===l.R.left?s=i[a=c?Math.max(0,a-1):i.length-1]:t===l.R.right?a===i.length-1?s=void 0:c&&(s=i[a=Math.min(i.length-1,a+1)]):t===l.R.home?s=i[0]:t===l.R.end?s=i[i.length-1]:t===l.R.delete&&c&&Me(o,i[a].data,"delete"),s!==ce&&ue(s)}if(we)if(t===l.R.esc||n&&t===l.R.up)e.preventDefault(),_e(o);else if(r&&r.querySelector(".k-focus")&&(t===l.R.up||t===l.R.down||t===l.R.left||t===l.R.right||t===l.R.home||t===l.R.end)){if(t===l.R.up&&ne.current){var u=Array.from(r.querySelectorAll(".k-treeview-item")),d=Xt([],u,!0).reverse().find((function(e){return Boolean(e&&e.querySelector(".k-focus"))}));if(d&&0===u.indexOf(d))return Ae((function(){je(ne.current)}))}Ae(nt.Z)}else t===l.R.down&&Ae((function(){je(ne.current||r)}));else n&&t===l.R.down&&(e.preventDefault(),Re(o))}}),[we,_e,je,Ae,Re,ce,m,$,Me]),We=o.useCallback((function(e){var t=e.keyCode;e.altKey||t!==l.R.up&&t!==l.R.down||(e.preventDefault(),Ae(t===l.R.up?function(){je(te.current)}:function(){je(oe.current&&oe.current.element)}))}),[je,Ae]),$e=o.useCallback((function(e){if(Z.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};Me(t,[],"clear"),_e(t),e.preventDefault()}}),[Me,_e]),qe=o.useCallback((function(e,t){_e({target:Z.current}),ge||je(ne.current),Me({syntheticEvent:t,nativeEvent:t.nativeEvent,target:Z.current},e,"delete")}),[Me,_e,je,ge]),Ue=o.useCallback((function(e){if(i.onExpandChange&&Z.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,o=e.syntheticEvent,a={level:(s=n,s.split("_").map((function(e){return parseInt(e,10)}))),item:t,nativeEvent:r,syntheticEvent:o,target:Z.current};i.onExpandChange.call(void 0,a)}var s}),[i.onExpandChange]),Ye=o.useCallback((function(e){if(i.onFilterChange&&Z.current){var t={filter:{field:i.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};i.onFilterChange.call(void 0,t),void 0===i.filter&&ke(e.target.value)}}),[i.onFilterChange,i.filter,i.textField]),Xe=i.listNoData||Lt,Je=(0,B.useLocalization)(),Ze=!X||xe.valid,Qe=i.size,et=i.rounded,tt=i.fillMode,ot=o.createElement("span",{className:(0,s.A)("k-multiselect k-input",i.className,(n={},n["k-input-".concat(Jt[Qe]||Qe)]=Qe,n["k-rounded-".concat(Zt[et]||et)]=et,n["k-input-".concat(tt)]=tt,n["k-focus"]=ge&&!C,n["k-invalid"]=!Ze,n["k-disabled"]=C,n["k-loading"]=i.loading,n["k-required"]=U,n)),tabIndex:J,accessKey:i.accessKey,id:u,style:M?Yt(Yt({},b),{width:void 0}):b,dir:Oe,ref:te,onKeyDown:C?void 0:Ke,onMouseDown:Ve,onFocus:Le,onBlur:Be,role:"combobox","aria-haspopup":"true","aria-expanded":we,"aria-disabled":C,"aria-label":M,"aria-labelledby":i.ariaLabelledBy,"aria-describedby":i.ariaDescribedBy,onClick:C?void 0:He},ae.current.length>0&&o.createElement("div",{className:(0,s.A)("k-input-values k-chip-list k-selection-multiple",(r={},r["k-chip-list-".concat(Jt[Qe]||Qe)]=Qe,r)),role:"listbox",id:"tagslist-"+u},o.createElement(Pe,{tag:i.tag,onTagDelete:qe,data:ae.current,guid:u,focused:ce?ae.current.find((function(e){return D(e,ce,m)})):void 0,size:Qe})),!Ce&&o.createElement("span",{className:"k-input-inner"},o.createElement("span",{className:"k-input-value-text"}," ")),i.loading&&o.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),Ce&&!C&&o.createElement(fe,{onClick:$e}),o.createElement("select",{name:R,ref:re,tabIndex:-1,"aria-hidden":!0,title:M,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},o.createElement("option",{value:i.valueMap?i.valueMap.call(void 0,$):$})),o.createElement(p.G,{popupClass:v.popupClass,className:(0,s.A)(v.className,{"k-rtl":"rtl"===Oe}),style:Ie,animate:v.animate,anchor:te.current,show:we,onOpen:Fe,onClose:ze,appendTo:v.appendTo,ref:se},i.filterable&&o.createElement(w,{value:void 0===i.filter?be:i.filter,inputRef:ne,onChange:Ye,onKeyDown:We,tabIndex:J,size:Qe,rounded:et,fillMode:tt}),h.length>0?o.createElement(Ft,{ref:oe,tabIndex:J,data:h,focusIdField:m,textField:i.textField,checkField:_,checkIndeterminateField:j,expandField:i.expandField,childrenField:z,expandIcons:!0,onItemClick:De,onCheckChange:De,onExpandChange:Ue,checkboxes:!0,size:Qe,item:i.item}):o.createElement(Xe,null,Je.toLanguageString(V,K[V]))));return M?o.createElement(d._,{label:M,editorValue:Ce,editorPlaceholder:T,editorValid:Ze,editorDisabled:C,editorId:u,style:{width:b?b.width:void 0},children:ot,dir:Oe}):ot})),nn={opened:i.bool,disabled:i.bool,dir:i.string,tabIndex:i.number,accessKey:i.string,data:i.array,value:i.any,valueMap:i.func,placeholder:i.string,dataItemKey:i.string.isRequired,textField:i.string.isRequired,checkField:i.string,checkIndeterminateField:i.string,expandField:i.string,subItemsField:i.string,className:i.string,style:i.object,label:i.string,validationMessage:i.string,validityStyles:i.bool,valid:i.bool,required:i.bool,name:i.string,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,filterable:i.bool,filter:i.string,loading:i.bool,tags:i.arrayOf(i.shape({text:i.string,data:i.arrayOf(i.any)})),popupSettings:i.shape({animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),popupClass:i.string,className:i.string,appendTo:i.any,width:i.oneOfType([i.string,i.number]),height:i.oneOfType([i.string,i.number])}),onOpen:i.func,onClose:i.func,onFocus:i.func,onBlur:i.func,onChange:i.func,onFilterChange:i.func,onExpandChange:i.func,item:i.func,listNoData:i.func};tn.displayName="KendoReactMultiSelectTree",tn.defaultProps=Qt,tn.propTypes=nn;var rn=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},on=function(e,t){var n={};return e&&e.length&&e.forEach((function(e){n[t(e)]=!0})),n},an=function(e,t){var n=t.items,r=t.dataItemKey,o=t.value,i=t.subItemsField,a=void 0===i?"items":i,s=t.operation,l=(0,Xe.Y)(r),c=on(o,l);if("clear"===s)return[];if("delete"===s){var u=on(n,l);return o.filter((function(e){return!u[l(e)]}))}for(var d,p=n[0],f=l(p),h=(0,Xe.Y)(a),m=rn([],e,!0),g=[],v=[];m.length;){var y=m.pop();if(f===l(y)){v=g.map((function(e){return e.item})),d=y;break}g&&g.length&&g[g.length-1].parentPosition===m.length&&g.pop(),(N=h(y))&&N.length&&(g.push({item:y,parentPosition:m.length}),m.push.apply(m,N))}for(var b=rn([],h(d)||[],!0),k=[];b.length;)y=b.pop(),k.push(y),(N=h(y))&&N.length&&b.push.apply(b,N);var w=[];if(c[f]){var C=l(d),x=on(k,l),O=on(v,l);w.push.apply(w,o.filter((function(e){var t=l(e);return!x[t]&&C!==t&&!O[t]})))}else{w.push.apply(w,o),w.push(d),w.push.apply(w,k.filter((function(e){return!c[l(e)]})));for(var S=v.filter((function(e){return!c[l(e)]})),E=on(w,l),I=S.length-1;I>-1;I--){var N,T=S[I];if((N=h(T)).filter((function(e){return E[l(e)]})).length<N.length)break;w.push(T),E[l(T)]=!0}}return w}},431:(e,t,n)=>{function r(e){this.content=e}n.r(t),n.d(t,{AddMarkStep:()=>be,AllSelection:()=>nt,CellSelection:()=>As,ContentMatch:()=>_,DOMParser:()=>J,DOMSerializer:()=>se,Decoration:()=>_a,DecorationSet:()=>Fa,EditorState:()=>dt,EditorView:()=>as,Fragment:()=>s,GapCursor:()=>wd,InputRule:()=>Sc,MapResult:()=>pe,Mapping:()=>he,Mark:()=>d,MarkType:()=>G,Node:()=>D,NodeRange:()=>T,NodeSelection:()=>et,NodeType:()=>q,Plugin:()=>ft,PluginKey:()=>gt,RemoveMarkStep:()=>ke,ReplaceAroundStep:()=>Ce,ReplaceError:()=>p,ReplaceStep:()=>we,ResolvedPos:()=>S,Schema:()=>Y,Selection:()=>Ge,SelectionRange:()=>Ye,Slice:()=>f,Step:()=>ge,StepMap:()=>fe,StepResult:()=>ve,TableMap:()=>ms,TextSelection:()=>Ze,Transaction:()=>at,Transform:()=>qe,TransformError:()=>$e,__endComposition:()=>is,__parseFromClipboard:()=>rs,__serializeForClipboard:()=>ns,activeNode:()=>xn,addColSpan:()=>Ps,addColumn:()=>rl,addColumnAfter:()=>il,addColumnBefore:()=>ol,addListNodes:()=>_n,addRow:()=>cl,addRowAfter:()=>Rd,addRowBefore:()=>Dd,alignBlocks:()=>On,alignCenterRules:()=>$r,alignJustifyRules:()=>qr,alignLeftRules:()=>Kr,alignRemoveRules:()=>Ur,alignRightRules:()=>Wr,applyInlineStyle:()=>un,applyLink:()=>pn,autoJoin:()=>yr,baseKeymap:()=>Or,blockNodes:()=>gn,blockquote:()=>Sr,bold:()=>zc,buildKeymap:()=>qc,buildListKeymap:()=>Uc,bulletList:()=>Dn,canBeIndented:()=>Dr,canIndentAsListItem:()=>Tr,canInsert:()=>jt,canJoin:()=>Te,canOutdentAsListItem:()=>Mr,canSplit:()=>Ne,caretColor:()=>Wu,caretColorKey:()=>Ku,cellAround:()=>Cs,chainCommands:()=>br,changeTextBlock:()=>mn,cleanFormatting:()=>En,cleanMarks:()=>Zt,cleanTextBlockFormatting:()=>yn,closeDoubleQuote:()=>Rc,closeHistory:()=>vc,closeSingleQuote:()=>_c,colCount:()=>Ts,columnIsHeader:()=>_s,columnResizing:()=>Tl,columnResizingPluginKey:()=>Nl,convertMsLists:()=>nu,createParagraphNear:()=>or,createTable:()=>Td,deleteColumn:()=>sl,deleteRow:()=>fl,deleteSelection:()=>Wn,deleteTable:()=>Sl,domToPmDoc:()=>Tt,dropCursor:()=>bd,dropPoint:()=>Pe,ellipsis:()=>Mc,emDash:()=>Tc,exitCode:()=>rr,expandSelection:()=>qt,expandToWordWrap:()=>Ut,find:()=>Cu,findAll:()=>xu,findAt:()=>wu,findCell:()=>Ns,findWrapping:()=>Ee,fixTables:()=>tl,fixTablesKey:()=>Qs,formatBlockElements:()=>vn,gapCursor:()=>xd,getActiveMarks:()=>rn,getBlockFormats:()=>bn,getHtml:()=>Dt,getInlineStyles:()=>sn,getMark:()=>nn,getNodeFromSelection:()=>Ht,getSelectionText:()=>Vt,goToNextCell:()=>Ol,hasMark:()=>Qt,hasNode:()=>wn,hasSameMarkup:()=>Bt,history:()=>kc,htmlToFragment:()=>It,imageResizeKey:()=>Fu,imageResizing:()=>Hu,inSameTable:()=>Is,indent:()=>Rr,indentBlocks:()=>Ir,indentHtml:()=>Wt,indentRules:()=>Hn,inputRules:()=>Ec,insertImage:()=>hn,insertNode:()=>Lt,insertPoint:()=>Re,insertText:()=>fn,isAligned:()=>Sn,isInTable:()=>xs,isIndented:()=>Nr,italic:()=>Lc,joinBackward:()=>$n,joinDown:()=>Qn,joinForward:()=>Yn,joinPoint:()=>De,joinUp:()=>Zn,keydownHandler:()=>ao,keymap:()=>io,lift:()=>er,liftBlockquote:()=>Er,liftEmptyBlock:()=>ir,liftListItem:()=>Fn,liftTarget:()=>Se,link:()=>Wc,listItem:()=>Rn,listStyle:()=>zr,macBaseKeymap:()=>xr,marks:()=>Gl,mergeCells:()=>ml,moveCellForward:()=>Es,newlineInCode:()=>tr,nextCell:()=>Ms,nodes:()=>tc,openDoubleQuote:()=>Dc,openSingleQuote:()=>Pc,orderedList:()=>Mn,outdent:()=>Pr,outdentRules:()=>Kn,parentBlockFormat:()=>Cn,parseContent:()=>Mt,pasteCleanup:()=>du,pcBaseKeymap:()=>Cr,placeholder:()=>Tu,pmAddRowAfter:()=>dl,pmAddRowBefore:()=>ul,pmDocToFragment:()=>Nt,redo:()=>Cc,redoDepth:()=>Oc,removeAllMarks:()=>Jt,removeAttribute:()=>au,removeColSpan:()=>Rs,removeComments:()=>ou,removeLink:()=>dn,removeTag:()=>iu,replace:()=>Ou,replaceAll:()=>Su,replaceImageSourcesFromRtf:()=>ku,replaceStep:()=>_e,rowIsHeader:()=>ll,sanitize:()=>ru,sanitizeClassAttr:()=>su,sanitizeStyleAttr:()=>uu,selectAll:()=>cr,selectNodeBackward:()=>Un,selectNodeForward:()=>Xn,selectParentNode:()=>lr,selectTextblockEnd:()=>fr,selectTextblockStart:()=>pr,selectedLineTextOnly:()=>Kt,selectedRect:()=>nl,selectionCell:()=>Os,selectionMarks:()=>tn,setBlockType:()=>mr,setCellAttr:()=>yl,setHtml:()=>Rt,sinkListItem:()=>zn,smartQuotes:()=>Ac,spacesFix:()=>Ru,splitBlock:()=>ar,splitBlockKeepMarks:()=>sr,splitCell:()=>gl,splitCellWithType:()=>vl,splitListItem:()=>jn,strikethrough:()=>Vc,subscript:()=>Hc,superscript:()=>Kc,tableColumnResizeKey:()=>Xu,tableEditing:()=>Al,tableEditingKey:()=>ws,tableNodeTypes:()=>ks,tableNodes:()=>bs,tableResizeKey:()=>Yu,tableResizing:()=>yd,tableRowResizeKey:()=>Ju,textHighlight:()=>_u,textHighlightKey:()=>Pu,textblockTypeInputRule:()=>Fc,toggleHeader:()=>kl,toggleHeaderCell:()=>xl,toggleHeaderColumn:()=>Cl,toggleHeaderRow:()=>wl,toggleInlineFormat:()=>cn,toggleList:()=>Lr,toggleMark:()=>gr,toggleOrderedList:()=>Vr,toggleUnorderedList:()=>Br,trimWhitespace:()=>Et,underline:()=>Bc,undo:()=>wc,undoDepth:()=>xc,undoInputRule:()=>Nc,updateColumnsOnResize:()=>Il,wrapIn:()=>hr,wrapInList:()=>An,wrappingInputRule:()=>jc}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var o=n&&n!=e?this.remove(n):this,i=o.find(e),a=o.content.slice();return-1==i?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new r(a)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var o=this.remove(t),i=o.content.slice(),a=o.find(e);return i.splice(-1==a?i.length:a,0,t,n),new r(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};const o=r;function i(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),a=t.child(r);if(o!=a){if(!o.sameMarkup(a))return n;if(o.isText&&o.text!=a.text){for(let e=0;o.text[e]==a.text[e];e++)n++;return n}if(o.content.size||a.content.size){let e=i(o.content,a.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function a(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let s=e.child(--o),l=t.child(--i),c=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let e=0,t=Math.min(s.text.length,l.text.length);for(;e<t&&s.text[s.text.length-e-1]==l.text[l.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let e=a(s.content,l.content,n-1,r-1);if(e)return e}n-=c,r-=c}else n-=c,r-=c}}class s{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,o){for(let i=0,a=0;a<t;i++){let s=this.content[i],l=a+s.nodeSize;if(l>e&&!1!==n(s,r+a,o||null,i)&&s.content.size){let o=a+1;s.nodesBetween(Math.max(0,e-o),Math.min(s.content.size,t-o),n,r+o)}a=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",i=!0;return this.nodesBetween(e,t,((a,s)=>{a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf?(r?o+="function"==typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new s(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let o=0,i=0;i<t;o++){let a=this.content[o],s=i+a.nodeSize;s>e&&((i<e||s>t)&&(a=a.isText?a.cut(Math.max(0,e-i),Math.min(a.text.length,t-i)):a.cut(Math.max(0,e-i-1),Math.min(a.content.size,t-i-1))),n.push(a),r+=a.nodeSize),i=s}return new s(n,r)}cutByIndex(e,t){return e==t?s.empty:0==e&&t==this.content.length?this:new s(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new s(r,o)}addToStart(e){return new s([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new s(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return i(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return a(this,e,t,n)}findIndex(e,t=-1){if(0==e)return c(0,e);if(e==this.size)return c(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e=>e.toJSON())):null}static fromJSON(e,t){if(!t)return s.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new s(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return s.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new s(t||e,n)}static from(e){if(!e)return s.empty;if(e instanceof s)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new s([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}s.empty=new s([],0);const l={index:0,offset:0};function c(e,t){return l.index=e,l.offset=t,l}function u(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!u(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!u(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class d{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&u(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return d.none;if(e instanceof d)return[e];let t=e.slice();return t.sort(((e,t)=>e.type.rank-t.type.rank)),t}}d.none=[];class p extends Error{}class f{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=m(this.content,e+this.openStart,t);return n&&new f(n,this.openStart,this.openEnd)}removeBetween(e,t){return new f(h(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return f.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new f(s.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new f(e,n,r)}}function h(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(o==t||i.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(h(i.content,t-o-1,n-o-1)))}function m(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),a=e.maybeChild(o);if(i==t||a.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=m(a.content,t-i-1,n);return s&&e.replaceChild(o,a.copy(s))}function g(e,t,n){if(n.openStart>e.depth)throw new p("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new p("Inconsistent open depths");return v(e,t,n,0)}function v(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let a=v(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:a}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(s.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return C(i,x(e,o,a,t,r))}{let r=e.parent,o=r.content;return C(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return C(i,O(e,t,r))}function y(e,t){if(!t.type.compatibleContent(e.type))throw new p("Cannot join "+t.type.name+" onto "+e.type.name)}function b(e,t,n){let r=e.node(n);return y(r,t.node(n)),r}function k(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function w(e,t,n,r){let o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(k(e.nodeAfter,r),i++));for(let e=i;e<a;e++)k(o.child(e),r);t&&t.depth==n&&t.textOffset&&k(t.nodeBefore,r)}function C(e,t){if(!e.type.validContent(t))throw new p("Invalid content for node "+e.type.name);return e.copy(t)}function x(e,t,n,r,o){let i=e.depth>o&&b(e,t,o+1),a=r.depth>o&&b(n,r,o+1),l=[];return w(null,e,o,l),i&&a&&t.index(o)==n.index(o)?(y(i,a),k(C(i,x(e,t,n,r,o+1)),l)):(i&&k(C(i,O(e,t,o+1)),l),w(t,n,o,l),a&&k(C(a,O(n,r,o+1)),l)),w(r,null,o,l),new s(l)}function O(e,t,n){let r=[];return w(null,e,n,r),e.depth>n&&k(C(b(e,t,n+1),O(e,t,n+1)),r),w(t,null,n,r),new s(r)}f.empty=new f(s.empty,0,0);class S{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return d.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new T(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,o=t;for(let t=e;;){let{index:e,offset:i}=t.content.findIndex(o),a=o-i;if(n.push(t,e,r+i),!a)break;if(t=t.child(e),t.isText)break;o=a-1,r+=i+1}return new S(t,n,o)}static resolveCached(e,t){for(let n=0;n<E.length;n++){let r=E[n];if(r.pos==t&&r.doc==e)return r}let n=E[I]=S.resolve(e,t);return I=(I+1)%N,n}}let E=[],I=0,N=12;class T{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const M=Object.create(null);class D{constructor(e,t,n,r=d.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||s.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&u(this.attrs,t||e.defaultAttrs||M)&&d.sameSet(this.marks,n||d.none)}copy(e=null){return e==this.content?this:new D(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new D(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return f.empty;let r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i).content.cut(r.pos-a,o.pos-a);return new f(s,r.depth-i,o.depth-i)}replace(e,t,n){return g(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return S.resolveCached(this,e)}resolveNoCache(e){return S.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,(e=>(n.isInSet(e.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),P(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=s.empty,r=0,o=n.childCount){let i=this.contentMatchAt(e).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let e=r;e<o;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){if(!this.type.validContent(this.content))throw new RangeError(`Invalid content for node ${this.type.name}: ${this.content.toString().slice(0,50)}`);let e=d.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!d.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e=>e.type.name))}`);this.content.forEach((e=>e.check()))}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((e=>e.toJSON()))),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=s.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}D.prototype.text=void 0;class R extends D{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):P(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new R(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new R(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function P(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class _{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new A(e,t);if(null==n.next)return _.empty;let r=j(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);H(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let i=t[r.join(",")]=new _(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort(V);i.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return i}(H(e,0))}(function(e){let t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce(((t,n)=>t.concat(e(n,i))),[]);if("seq"!=t.type){if("star"==t.type){let a=n();return r(i,a),o(e(t.expr,a),a),[r(a)]}if("plus"==t.type){let a=n();return o(e(t.expr,i),a),o(e(t.expr,a),a),[r(a)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){let a=i;for(let r=0;r<t.min;r++){let r=n();o(e(t.expr,a),r),a=r}if(-1==t.max)o(e(t.expr,a),a);else for(let i=t.min;i<t.max;i++){let i=n();r(a,i),o(e(t.expr,a),i),a=i}return[r(a)]}if("name"==t.type)return[r(i,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let a=e(t.exprs[r],i);if(r==t.exprs.length-1)return a;o(a,i=n())}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((e=>e.to=t))}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,i=[];for(let t=0;t<e.next.length;t++){let{type:n,next:a}=e.next[t];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(a)&&r.push(a)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(i,a){let l=i.matchFragment(e,n);if(l&&(!t||l.validEnd))return s.from(a.map((e=>e.createAndFill())));for(let e=0;e<i.next.length;e++){let{type:t,next:n}=i.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(n,a.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:i,next:a}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||r.type&&!a.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),t[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map(((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r})).join("\n")}}_.empty=new _(!0);class A{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function j(e){let t=[];do{t.push(F(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function F(e){let t=[];do{t.push(z(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function z(e){let t=function(e){if(e.eat("(")){let t=j(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let e in n){let r=n[e];r.groups.indexOf(t)>-1&&o.push(r)}return 0==o.length&&e.err("No node type or group '"+t+"' found"),o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=B(e,t)}return t}function L(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function B(e,t){let n=L(e),r=n;return e.eat(",")&&(r="}"!=e.next?L(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function V(e,t){return t-e}function H(e,t){let n=[];return function t(r){let o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:i}=o[e];r||-1!=n.indexOf(i)||t(i)}}(t),n.sort(V)}function K(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function W(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(!t.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function $(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new U(e[n]);return t}class q{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=$(n.attrs),this.defaultAttrs=K(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==_.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:W(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new D(this,this.computeAttrs(e),s.from(t),d.setFrom(n))}createChecked(e=null,t,n){if(t=s.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new D(this,this.computeAttrs(e),t,d.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=s.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(s.empty,!0);return o?new D(this,e,t.append(o),d.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(null==this.markSet)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:d.none:e}static compile(e,t){let n=Object.create(null);e.forEach(((e,r)=>n[e]=new q(e,t,r)));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class U{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class G{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=$(r.attrs),this.excluded=null;let o=K(this.attrs);this.instance=o?new d(this,o):null}create(e=null){return!e&&this.instance?this.instance:new d(this,W(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,o)=>n[e]=new G(e,r++,t,o))),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class Y{constructor(e){this.cached=Object.create(null),this.spec={nodes:o.from(e.nodes),marks:o.from(e.marks||{}),topNode:e.topNode},this.nodes=q.compile(this.spec.nodes,this),this.marks=G.compile(this.spec.marks,this);let t=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw new RangeError(e+" can not be both a node and a mark");let n=this.nodes[e],r=n.spec.content||"",o=n.spec.marks;n.contentMatch=t[r]||(t[r]=_.parse(r,this.nodes)),n.inlineContent=n.contentMatch.inlineContent,n.markSet="_"==o?null:o?X(this,o.split(" ")):""!=o&&n.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:X(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof q))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new R(n,n.defaultAttrs,e,d.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return D.fromJSON(this,e)}markFromJSON(e){return d.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function X(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=r)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class J{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)})),this.normalizeLists=!this.tags.some((t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)}))}parse(e,t={}){let n=new re(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new re(this,t,!0);return n.addAll(e,t.from,t.to),f.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(oe(e,n.tag)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(e)||r.context&&!n.matchesContext(r.context)||i.length>e.length&&(61!=i.charCodeAt(e.length)||i.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach((e=>{n(e=ie(e)),e.mark=t}))}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach((e=>{n(e=ie(e)),e.node=t}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new J(e,J.schemaRules(e)))}}const Z={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Q={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ee={ol:!0,ul:!0};function te(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class ne{constructor(e,t,n,r,o,i,a){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=d.none,this.stashMarks=[],this.match=i||(4&a?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(s.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=s.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(s.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):ae(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Z.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class re{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,o=t.topNode,i=te(null,t.preserveWhitespace,0)|(n?4:0);r=o?new ne(o.type,o.attrs,d.none,d.none,!0,t.topMatch||o.type.contentMatch,i):new ne(n?null:e.schema.topNodeType,null,d.none,d.none,!0,null,i),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style"),n=t?this.readStyles(function(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(let e=0;e<n.length;e++)this.addPendingMark(n[e]);if(this.addElement(e),null!=n)for(let e=0;e<n.length;e++)this.removePendingMark(n[e],r)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();ee.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&ee.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:Q.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let t,n=this.top,i=this.needsBlock;if(Z.hasOwnProperty(r))t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),t&&this.sync(n),this.needsBlock=i}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=d.none;e:for(let n=0;n<e.length;n+=2)for(let r;;){let o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t}addElementByRule(e,t,n){let r,o,i;t.node?(o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace)):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(a)&&this.open--,i&&this.removePendingMark(i,a)}addAll(e,t,n){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(let e=0;e<t.length;e++)this.enterInner(t[e],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let i=te(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ne(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(e,a)=>{for(;e>=0;e--){let s=t[e];if(""==s){if(e==t.length-1||0==e)continue;for(;a>=o;a--)if(i(e-1,a))return!0;return!1}{let e=a>0||0==a&&r?this.nodes[a].type:n&&a>=o?n.node(a-o).type:null;if(!e||e.name!=s&&-1==e.groups.indexOf(s))return!1;a--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function oe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ie(e){let t={};for(let n in e)t[n]=e[n];return t}function ae(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],a=e=>{i.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(i.indexOf(o)<0&&a(o))return!0}};if(a(o.contentMatch))return!0}}class se{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=ce(t).createDocumentFragment());let r=n,o=[];return e.forEach((e=>{if(o.length||e.marks.length){let n=0,i=0;for(;n<o.length&&i<e.marks.length;){let t=e.marks[i];if(this.marks[t.type.name]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<e.marks.length;){let n=e.marks[i++],a=this.serializeMark(n,e.isInline,t);a&&(o.push([n,r]),r.appendChild(a.dom),r=a.contentDOM||a.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=se.renderSpec(ce(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&se.renderSpec(ce(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r,o=t[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let a=n?e.createElementNS(n,o):e.createElement(o),s=t[1],l=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s)){l=2;for(let e in s)if(null!=s[e]){let t=e.indexOf(" ");t>0?a.setAttributeNS(e.slice(0,t),e.slice(t+1),s[e]):a.setAttribute(e,s[e])}}for(let o=l;o<t.length;o++){let i=t[o];if(0===i){if(o<t.length-1||o>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:t,contentDOM:o}=se.renderSpec(e,i,n);if(a.appendChild(t),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:a,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new se(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=le(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return le(e.marks)}}function le(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ce(e){return e.document||window.document}const ue=Math.pow(2,16);function de(e){return 65535&e}class pe{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class fe{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&fe.empty)return fe.empty}recover(e){let t=0,n=de(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/ue}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,o=this.inverted?2:1,i=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let s=this.ranges[a]-(this.inverted?r:0);if(s>e)break;let l=this.ranges[a+o],c=this.ranges[a+i],u=s+l;if(e<=u){let o=s+r+((l?e==s?-1:e==u?1:t:t)<0?0:c);if(n)return o;let i=e==s?2:e==u?1:4;return(t<0?e!=s:e!=u)&&(i|=8),new pe(o,i,e==(t<0?s:u)?null:a/3+(e-s)*ue)}r+=c-l}return n?e+r:new pe(e+r,0,null)}touches(e,t){let n=0,r=de(t),o=this.inverted?2:1,i=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let a=this.ranges[t]-(this.inverted?n:0);if(a>e)break;let s=this.ranges[t+o];if(e<=a+s&&t==3*r)return!0;n+=this.ranges[t+i]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(a,a+l,s,s+c),o+=c-l}}invert(){return new fe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?fe.empty:new fe(e<0?[0,-e,0]:[0,0,e])}}fe.empty=new fe([]);class he{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new he(this.maps,this.mirror,e,t)}copy(){return new he(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror)for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new he;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let o=this.maps[n].mapResult(e,t);if(null!=o.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this.maps[t].recover(o.recover);continue}}r|=o.delInfo,e=o.pos}return n?e:new pe(e,r,null)}}const me=Object.create(null);class ge{getMap(){return fe.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=me[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in me)throw new RangeError("Duplicate use of step JSON ID "+e);return me[e]=t,t.prototype.jsonID=e,t}}class ve{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new ve(e,null)}static fail(e){return new ve(null,e)}static fromReplace(e,t,n,r){try{return ve.ok(e.replace(t,n,r))}catch(e){if(e instanceof p)return ve.fail(e.message);throw e}}}function ye(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let i=e.child(o);i.content.size&&(i=i.copy(ye(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return s.fromArray(r)}class be extends ge{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),o=new f(ye(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),r),t.openStart,t.openEnd);return ve.fromReplace(e,this.from,this.to,o)}invert(){return new ke(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new be(t.pos,n.pos,this.mark)}merge(e){return e instanceof be&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new be(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new be(t.from,t.to,e.markFromJSON(t.mark))}}ge.jsonID("addMark",be);class ke extends ge{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new f(ye(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return ve.fromReplace(e,this.from,this.to,n)}invert(){return new be(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new ke(t.pos,n.pos,this.mark)}merge(e){return e instanceof ke&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ke(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ke(t.from,t.to,e.markFromJSON(t.mark))}}ge.jsonID("removeMark",ke);class we extends ge{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&xe(e,this.from,this.to)?ve.fail("Structure replace would overwrite content"):ve.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new fe([this.from,this.to-this.from,this.slice.size])}invert(e){return new we(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new we(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof we)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?f.empty:new f(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new we(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?f.empty:new f(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new we(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new we(t.from,t.to,f.fromJSON(e,t.slice),!!t.structure)}}ge.jsonID("replace",we);class Ce extends ge{constructor(e,t,n,r,o,i,a=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=a}apply(e){if(this.structure&&(xe(e,this.from,this.gapFrom)||xe(e,this.gapTo,this.to)))return ve.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return ve.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?ve.fromReplace(e,this.from,this.to,n):ve.fail("Content does not fit in gap")}getMap(){return new fe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Ce(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new Ce(t.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ce(t.from,t.to,t.gapFrom,t.gapTo,f.fromJSON(e,t.slice),t.insert,!!t.structure)}}function xe(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let e=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function Oe(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Se(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!Oe(r,o,i))break}return null}function Ee(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}(e,t),i=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;let s=(a.length?a[a.length-1]:t).contentMatch;for(let e=r;s&&e<o;e++)s=s.matchType(n.child(e).type);return s&&s.validEnd?a:null}(r,t);return i?o.map(Ie).concat({type:t,attrs:n}).concat(i.map(Ie)):null}function Ie(e){return{type:e,attrs:null}}function Ne(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let e=o.depth-1,t=n-2;e>i;e--,t--){let n=o.node(e),i=o.index(e);if(n.type.spec.isolating)return!1;let a=n.content.cutByIndex(i,n.childCount),s=r&&r[t]||n;if(s!=n&&(a=a.replaceChild(0,s.type.create(s.attrs))),!n.canReplace(i+1,n.childCount)||!s.type.validContent(a))return!1}let s=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(s,s,l?l.type:o.node(i+1).type)}function Te(e,t){let n=e.resolve(t),r=n.index();return Me(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Me(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function De(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let o,i,a=r.index(e);if(e==r.depth?(o=r.nodeBefore,i=r.nodeAfter):n>0?(o=r.node(e+1),a++,i=r.node(e).maybeChild(a)):(o=r.node(e).maybeChild(a-1),i=r.node(e+1)),o&&!o.isTextblock&&Me(o,i)&&r.node(e).canReplace(a,a+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function Re(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}function Pe(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let e=0;e<n.openStart;e++)o=o.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,i=r.index(t)+(n>0?1:0),a=r.node(t),s=!1;if(1==e)s=a.canReplace(i,i,o);else{let e=a.contentMatchAt(i).findWrapping(o.firstChild.type);s=e&&a.canReplaceWith(i,i,e[0])}if(s)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function _e(e,t,n=t,r=f.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return Ae(o,i,r)?new we(t,n,r):new je(o,i,r).fit()}function Ae(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}ge.jsonID("replaceAround",Ce);class je{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=s.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=s.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let o=this.placed,i=n.depth,a=r.depth;for(;i&&a&&1==o.childCount;)o=o.firstChild.content,i--,a--;let s=new f(o,i,a);return e>-1?new Ce(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new we(n.pos,r.pos,s):null}findFittable(){for(let e=1;e<=2;e++)for(let t=this.unplaced.openStart;t>=0;t--){let n,r=null;t?(r=Le(this.unplaced.content,t-1).firstChild,n=r.content):n=this.unplaced.content;let o=n.firstChild;for(let n=this.depth;n>=0;n--){let i,{type:a,match:l}=this.frontier[n],c=null;if(1==e&&(o?l.matchType(o.type)||(c=l.fillBefore(s.from(o),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:t,frontierDepth:n,parent:r,inject:c};if(2==e&&o&&(i=l.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:n,parent:r,wrap:i};if(r&&l.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Le(e,t);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new f(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),0))}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Le(e,t);if(r.childCount<=1&&t>0){let o=e.size-t<=t+r.size;this.unplaced=new f(Fe(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new f(Fe(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let i=this.unplaced,a=n?n.content:i.content,l=i.openStart-e,c=0,u=[],{match:d,type:p}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)u.push(r.child(e));d=d.matchFragment(r)}let h=a.size+e-(i.content.size-i.openEnd);for(;c<a.childCount;){let e=a.child(c),t=d.matchType(e.type);if(!t)break;c++,(c>1||0==l||e.content.size)&&(d=t,u.push(Be(e.mark(p.allowedMarks(e.marks)),1==c?l:0,c==a.childCount?h:-1)))}let m=c==a.childCount;m||(h=-1),this.placed=ze(this.placed,t,s.from(u)),this.frontier[t].match=d,m&&h<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=a;e<h;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=m?0==e?f.empty:new f(Fe(i.content,e-1,1),e-1,h<0?i.openEnd:e-1):new f(Fe(i.content,e,c),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!Ve(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=Ve(e,t,r,n,o);if(i){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=Ve(e,n,r,t,!0);if(!o||o.childCount)continue e}return{depth:t,fit:i,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=ze(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=ze(this.placed,this.depth,s.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(s.empty,!0);e.childCount&&(this.placed=ze(this.placed,this.frontier.length,e))}}function Fe(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Fe(e.firstChild.content,t-1,n)))}function ze(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ze(e.lastChild.content,t-1,n)))}function Le(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Be(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Be(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(s.empty,!0)))),e.copy(r)}function Ve(e,t,n,r,o){let i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;let s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function He(e){return e.spec.defining||e.spec.definingForContent}function Ke(e,t,n,r,o){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(Ke(o.content,t+1,n,r,o)))}if(t>r){let t=o.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(s.empty,!0))}return e}function We(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}let $e=class extends Error{};$e=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},$e.prototype=Object.create(Error.prototype),$e.prototype.constructor=$e,$e.prototype.name="TransformError";class qe{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new he}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new $e(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=f.empty){let r=_e(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new f(s.from(n),0,0))}delete(e,t){return this.replace(e,t,f.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),i=e.doc.resolve(n);if(Ae(o,i,r))return e.step(new we(t,n,r));let a=We(o,e.doc.resolve(n));0==a[a.length-1]&&a.pop();let s=-(o.depth+1);a.unshift(s);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let n=o.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(e)>-1?s=e:o.before(e)==t&&a.splice(1,0,-e)}let l=a.indexOf(s),c=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=c[e].type,n=He(t);if(n&&o.node(l).type!=t)u=e;else if(n||!t.isTextblock)break}for(let t=r.openStart;t>=0;t--){let s=(t+u+1)%(r.openStart+1),d=c[s];if(d)for(let t=0;t<a.length;t++){let c=a[(t+l)%a.length],u=!0;c<0&&(u=!1,c=-c);let p=o.node(c-1),h=o.index(c-1);if(p.canReplaceWith(h,h,d.type,d.marks))return e.replace(o.before(c),u?i.after(c):n,new f(Ke(r.content,0,r.openStart,s),s,r.openEnd))}}let d=e.steps.length;for(let s=a.length-1;s>=0&&(e.replace(t,n,r),!(e.steps.length>d));s--){let e=a[s];e<0||(t=o.before(e),n=i.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=Re(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new f(s.from(r),0,0))}(this,e,t,n),this}deleteRange(e,t){return function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=We(r,o);for(let t=0;t<i.length;t++){let n=i[t],a=t==i.length-1;if(a&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),o.end(n));if(n>0&&(a||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return e.delete(r.before(n),o.after(n))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return e.delete(r.before(i),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:r,$to:o,depth:i}=t,a=r.before(i+1),l=o.after(i+1),c=a,u=l,d=s.empty,p=0;for(let e=i,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,d=s.from(r.node(e).copy(d)),p++):c--;let h=s.empty,m=0;for(let e=i,t=!1;e>n;e--)t||o.after(e+1)<o.end(e)?(t=!0,h=s.from(o.node(e).copy(h)),m++):u++;e.step(new Ce(c,u,a,l,new f(d.append(h),p,m),d.size-p,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let r=new we(t-n,t+n,f.empty,!0);e.step(r)}(this,e,t),this}wrap(e,t){return function(e,t,n){let r=s.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=s.from(n[e].type.create(n[e].attrs,r))}let o=t.start,i=t.end;e.step(new Ce(o,i,o,i,new f(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){return function(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);let a=e.mapping.slice(i),l=a.map(n,1),c=a.map(n+t.nodeSize,1);return e.step(new Ce(l,c,l+1,c-1,new f(s.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r=[]){return function(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let a=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Ce(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new f(s.from(a),0,0),1,!0))}(this,e,t,n,r),this}split(e,t=1,n){return function(e,t,n=1,r){let o=e.doc.resolve(t),i=s.empty,a=s.empty;for(let e=o.depth,t=o.depth-n,l=n-1;e>t;e--,l--){i=s.from(o.node(e).copy(i));let t=r&&r[l];a=s.from(t?t.type.create(t.attrs,a):o.node(e).copy(a))}e.step(new we(t,t,new f(i.append(a),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let o,i,a=[],s=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),d=Math.min(l+e.nodeSize,n),p=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(p)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=d:a.push(o=new ke(c,d,u[e])));i&&i.to==c?i.to=d:s.push(i=new be(c,d,r))}})),a.forEach((t=>e.step(t))),s.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,((e,a)=>{if(!e.isInline)return;i++;let s=null;if(r instanceof G){let t,n=e.marks;for(;t=r.isInSet(n);)(s||(s=[])).push(t),n=t.removeFromSet(n)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(a+e.nodeSize,n);for(let e=0;e<s.length;e++){let n,l=s[e];for(let e=0;e<o.length;e++){let t=o[e];t.step==i-1&&l.eq(o[e].style)&&(n=t)}n?(n.to=r,n.step=i):o.push({style:l,from:Math.max(a,t),to:r,step:i})}}})),o.forEach((t=>e.step(new ke(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],a=t+1;for(let t=0;t<o.childCount;t++){let s=o.child(t),l=a+s.nodeSize,c=r.matchType(s.type);if(c){r=c;for(let t=0;t<s.marks.length;t++)n.allowsMarkType(s.marks[t].type)||e.step(new ke(a,l,s.marks[t]))}else i.push(new we(a,l,f.empty));a=l}if(!r.validEnd){let t=r.fillBefore(s.empty,!0);e.replace(a,a,new f(t,0,0))}for(let t=i.length-1;t>=0;t--)e.step(i[t])}(this,e,t,n),this}}const Ue=Object.create(null);class Ge{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Ye(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=f.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let o=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){let{$from:s,$to:l}=i[a],c=e.mapping.slice(o);e.replaceRange(c.map(s.pos),c.map(l.pos),a?f.empty:t),0==a&&it(e,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:a}=r[o],s=e.mapping.slice(n),l=s.map(i.pos),c=s.map(a.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),it(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new Ze(e):ot(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let o=t<0?ot(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):ot(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new nt(e.node(0))}static atStart(e){return ot(e,e,0,0,1)||new nt(e)}static atEnd(e){return ot(e,e,e.content.size,e.childCount,-1)||new nt(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Ue[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Ue)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ue[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Ze.between(this.$anchor,this.$head).getBookmark()}}Ge.prototype.visible=!0;class Ye{constructor(e,t){this.$from=e,this.$to=t}}let Xe=!1;function Je(e){Xe||e.parent.inlineContent||(Xe=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ze extends Ge{constructor(e,t=e){Je(e),Je(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return Ge.near(n);let r=e.resolve(t.map(this.anchor));return new Ze(r.parent.inlineContent?r:n,n)}replace(e,t=f.empty){if(super.replace(e,t),t==f.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof Ze&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Qe(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ze(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=Ge.findFrom(t,n,!0)||Ge.findFrom(t,-n,!0);if(!e)return Ge.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(Ge.findFrom(e,-n,!0)||Ge.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new Ze(e,t)}}Ge.jsonID("text",Ze);class Qe{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Qe(e.map(this.anchor),e.map(this.head))}resolve(e){return Ze.between(e.resolve(this.anchor),e.resolve(this.head))}}class et extends Ge{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?Ge.near(o):new et(o)}content(){return new f(s.from(this.node),0,0)}eq(e){return e instanceof et&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new tt(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new et(e.resolve(t.anchor))}static create(e,t){return new et(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}et.prototype.visible=!1,Ge.jsonID("node",et);class tt{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new Qe(n,n):new tt(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&et.isSelectable(n)?new et(t):Ge.near(t)}}class nt extends Ge{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=f.empty){if(t==f.empty){e.delete(0,e.doc.content.size);let t=Ge.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new nt(e)}map(e){return new nt(e)}eq(e){return e instanceof nt}getBookmark(){return rt}}Ge.jsonID("all",nt);const rt={map(){return this},resolve:e=>new nt(e)};function ot(e,t,n,r,o,i=!1){if(t.inlineContent)return Ze.create(e,n);for(let a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){let r=t.child(a);if(r.isAtom){if(!i&&et.isSelectable(r))return et.create(e,n-(o<0?r.nodeSize:0))}else{let t=ot(e,r,n+o,o<0?r.childCount:0,o,i);if(t)return t}n+=r.nodeSize*o}return null}function it(e,t,n){let r=e.steps.length-1;if(r<t)return;let o,i=e.steps[r];(i instanceof we||i instanceof Ce)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==o&&(o=r)})),e.setSelection(Ge.near(e.doc.resolve(o),n)))}class at extends qe{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return d.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||d.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let o=this.storedMarks;if(!o){let e=this.doc.resolve(t);o=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(Ge.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function st(e,t){return t&&e?e.bind(t):e}class lt{constructor(e,t,n){this.name=e,this.init=st(t.init,n),this.apply=st(t.apply,n)}}const ct=[new lt("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new lt("selection",{init:(e,t)=>e.selection||Ge.atStart(t.doc),apply:e=>e.selection}),new lt("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new lt("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class ut{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=ct.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new lt(e.key,e.spec.state,e))}))}}class dt{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let o=!1;for(let i=0;i<this.config.plugins.length;i++){let a=this.config.plugins[i];if(a.spec.appendTransaction){let s=r?r[i].n:0,l=r?r[i].state:this,c=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,l,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new dt(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new at(this)}static create(e){let t=new ut(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new dt(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new ut(this.schema,e.plugins),n=t.fields,r=new dt(t);for(let t=0;t<n.length;t++){let o=n[t].name;r[o]=this.hasOwnProperty(o)?this[o]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((e=>e.toJSON()))),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new ut(e.schema,e.plugins),o=new dt(r);return r.fields.forEach((r=>{if("doc"==r.name)o.doc=D.fromJSON(e.schema,t.doc);else if("selection"==r.name)o.selection=Ge.fromJSON(o.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let i in n){let a=n[i],s=a.spec.state;if(a.key==r.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(t,i))return void(o[r.name]=s.fromJSON.call(a,e,t[i],o))}o[r.name]=r.init(e,o)}})),o}}function pt(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=pt(o,t,{})),n[r]=o}return n}class ft{constructor(e){this.spec=e,this.props={},e.props&&pt(e.props,this,this.props),this.key=e.key?e.key.key:mt("plugin")}getState(e){return e[this.key]}}const ht=Object.create(null);function mt(e){return e in ht?e+"$"+ ++ht[e]:(ht[e]=0,e+"$")}class gt{constructor(e="key"){this.key=mt(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}var vt="k-parent-node",yt="k-colgroup-data",bt="k-resizable-node",kt="k-editor-resize-handle",wt="data-dir-table-resize",Ct="data-dir-image-resize",xt=["div","ol","ul","li","table","tbody","thead","tfoot","td","th","p","tr","col","colgroup","article","main","nav","header","footer","aside","section"],Ot=function(e,t){var n=(e.ownerDocument||document).createElement(t);Array.from(e.rows).filter((function(e){return e.getAttribute(vt)===t})).forEach((function(e){e.removeAttribute(vt),n.appendChild(e)})),n.children.length&&e.appendChild(n)},St=function(e,t){var n=t.toUpperCase();e.filter((function(e){return e.nodeName===n})).forEach((function(e){Array.from(e.children).forEach((function(n){n.setAttribute(vt,t),e.parentNode&&e.parentNode.insertBefore(n,e)})),e.remove()}))},Et=function(e,t){void 0===t&&(t=xt);var n=t.join("|");return e.replace(new RegExp("\\s*(<(?:"+n+")(?:\\s[^>]*?)?>)","g"),"$1").replace(new RegExp("(<\\/(?:"+n+")(?:\\s[^>]*?)?>)\\s*","g"),"$1")},It=function(e){var t,n=document.createElement("template");if("content"in n)n.innerHTML=e,t=n.content;else{var r=(new DOMParser).parseFromString(e,"text/html");t=document.createDocumentFragment();for(var o=r.body;o&&o.firstChild;)t.appendChild(o.firstChild)}return t},Nt=function(e){var t=se.fromSchema(e.type.schema).serializeFragment(e.content);return function(e){Array.from(e.querySelectorAll("table")).forEach((function(e){Ot(e,"thead"),Ot(e,"tbody"),Ot(e,"tfoot");var t=Array.from(e.children).find((function(e){return 0===e.children.length}));t&&t.remove()}))}(t),t},Tt=function(e,t,n){return J.fromSchema(t).parse(e,n)},Mt=function(e,t,n){var r,o=It(e);return r=o,Array.from(r.querySelectorAll("table")).forEach((function(e){var t=Array.from(e.children);t.some((function(e){return"THEAD"===e.nodeName||"TFOOT"===e.nodeName}))&&(St(t,"thead"),St(t,"tbody"),St(t,"tfoot"));var n=t.find((function(e){return"COLGROUP"===e.nodeName}));n&&(e.setAttribute(yt,n.outerHTML),n.remove())})),Tt(o,t,n)},Dt=function(e){var t=Nt(e.doc),n=document.createElement("div");return n.appendChild(t),n.innerHTML},Rt=function(e,t,n){return void 0===t&&(t="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(r,o){return o(r.tr.setSelection(new nt(r.doc)).replaceSelectionWith(Mt(e,r.schema,n)).setMeta("commandName",t))}},Pt=function(){return Pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Pt.apply(this,arguments)};function _t(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create,Object.create;var At=function(e,t){var n=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};var i=e.split(/\s*;\s*/).filter((function(e){return Boolean(e)})),a=i.filter((function(e){var t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===n&&r.test(t[1]))}));return o&&a.push(n+": "+o),{style:a.join("; ")+(a.length?";":""),changed:Boolean(o)||a.length!==i.length}},jt=function(e,t){for(var n=e.selection.$from,r=n.depth;r>=0;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1},Ft=function(e){return e instanceof D?e.type.name:e.name},zt=function(e,t){return void 0===t&&(t=1),function(n){return function(e,t){return void 0===t&&(t=1),function(n){for(var r=n.$from,o=r.depth;o>0;o--){var i=r.node(o);if(e(i)&&0==(t-=1))return{depth:o,node:i}}}}((function(t){return Ft(t)===Ft(e)}),t)(n)}},Lt=function(e,t){return function(n,r){var o=n.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),r(o)}},Bt=function(e,t,n,r){var o=s.from(Mt(e,n,r)),i=s.from(Mt(t,n,r));return o.eq(i)},Vt=function(e){var t=e.selection;if(t instanceof Ze||t instanceof nt){var n=t.content().content;return n.textBetween(0,n.size)}return""},Ht=function(e){if(e.selection instanceof et)return e.selection.node},Kt=function(e){var t="",n=!1,r=e.selection,o=e.doc,i=r.$from,a=r.$to,s=r.from,l=r.to;return i.sameParent(a)&&(o.nodesBetween(s,l,(function(e){n=n||e.isLeaf&&!e.isText})),n||(t=Vt(e))),t},Wt=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},$t={before:/[^ !,?.\[\]{}()]+$/i,after:/^[^ !,?.\[\]{}()]+/i},qt=function(e,t,n){if(!n.applyToWord||!e.selection.empty)return{state:e,dispatch:t};var r=!0===n.applyToWord?$t:n.applyToWord,o=null,i=e.tr,a=e.selection,s=a.$head.nodeBefore,l=a.$head.nodeAfter;if(s&&"text"===s.type.name&&s.text&&l&&"text"===l.type.name&&l.text){var c=[];a.$head.parent.descendants((function(e,t){return c.push({node:e,pos:t}),!1}));for(var u=a.$head.parentOffset,d=c.findIndex((function(e){var t=e.node,n=e.pos;return n<=u&&n+t.nodeSize>=u})),p=c[d].node.text,f=!1,h=d-1;h>=0;h--){var m=c[h];!f&&m&&"text"===m.node.type.name?p=m.node.text+p:(f=!0,u-=m.node.nodeSize)}for(h=d+1;h<c.length&&((m=c[h])&&"text"===m.node.type.name);h++)p+=m.node.text;var g=p.substring(0,u),v=p.substring(u),y=r.before.exec(g),b=r.after.exec(v);if(y&&b){var k=y[0].length,w=b[0].length,C=o=a.from;return i.setSelection(Ze.create(e.doc,C-k,C+w)),{state:{tr:i,selection:i.selection,doc:i.doc,storedMarks:null,schema:i.doc.type.schema},dispatch:function(e){e.setSelection(Ze.create(e.doc,o)),t(e)}}}}return{state:e,dispatch:t}},Ut=function(e,t){return function(n,r,o){var i=qt(n,r,t),a=i.state,s=i.dispatch;return e(t)(a,s)}},Gt=function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,a=o.$to,s=0===i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o<t.length;o++){var i=r(o);if(i)return i.v}return!1},Yt=function(e,t,n){return function(r,o){var i=r.selection,a=i.empty,s=i.$cursor,l=i.ranges;if(a&&!s||!Gt(r.doc,l,e))return!1;if(o)if(s)e.isInSet(r.storedMarks||s.marks())?o(n.removeStoredMark(e)):o(n.addStoredMark(e.create(t)));else{for(var c=!1,u=0;!c&&u<l.length;u++){var d=l[u],p=d.$from,f=d.$to;c=r.doc.rangeHasMark(p.pos,f.pos,e)}for(u=0;u<l.length;u++){var h=l[u];p=h.$from,f=h.$to,c?n.removeMark(p.pos,f.pos,e):n.addMark(p.pos,f.pos,e.create(t))}o(n.scrollIntoView())}return!0}},Xt=function(e,t,n,r){void 0===r&&(r=null);var o=[],i=0;return e.doc.nodesBetween(t,n,(function(e,a){if(e.isInline){i++;var s=null;if(r instanceof G){var l=r.isInSet(e.marks);l&&(s=[l])}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length)for(var c=Math.min(a+e.nodeSize,n),u=0;u<s.length;u++){for(var d=s[u],p=void 0,f=0;f<o.length;f++){var h=o[f];h.step===i-1&&d.eq(h.style)&&(p=h)}p?(p.to=c,p.step=i):o.push({style:d,from:Math.max(a,t),to:c,step:i})}}})),o.forEach((function(t){return e.step(new ke(t.from,t.to,t.style))})),e},Jt=function(e){var t=(void 0===e?{}:e).except,n=void 0===t?[]:t;return function(e,t){var r,o=e.tr;Zt(o,{except:(r=n,r instanceof Array?r:[r])}),o.docChanged&&t(o)}},Zt=function(e,t){var n=t.except,r=e.doc,o=e.selection,i=r.type.schema,a=o.empty,s=o.ranges,l=(n||[]).map((function(e){return e.name}));if(!a){var c=Object.keys(i.marks).map((function(e){return i.marks[e]})).filter((function(e){return-1===l.indexOf(e.name)}));s.forEach((function(t){var n=t.$from,r=t.$to;c.forEach((function(t){return e.removeMark(n.pos,r.pos,t)}))}))}},Qt=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return r[e]})),i=t.altStyle,a=e.selection,s=a.from,l=a.$from,c=a.to,u=a.empty,d=r[t.mark],p=e.doc,f=!1;return u?(n=e.storedMarks||l.marks(),f=d&&d.isInSet(n)||o.some((function(e){return r[e].isInSet(n)}))):f=d&&p.rangeHasMark(s,c,d)||o.some((function(e){return p.rangeHasMark(s,c,r[e])})),!f&&i&&r.style?tn(e,r.style).some((function(e){return null!==en(e,i)})):Boolean(f)},en=function(e,t){for(var n=(e&&e.attrs.style||"").split(/\s*;\s*/).filter((function(e){return Boolean(e)})),r=0;r<n.length;r++){var o=n[r].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},tn=function(e,t){var n=e.selection,r=n.from,o=n.$from,i=n.to,a=n.empty,s=[];return a?s.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(r,i,(function(e){e.isInline&&s.push(t.isInSet(e.marks))})),s},nn=function(e,t){var n=tn(e,t),r=n.filter((function(e){return Boolean(e)}));return n.length===r.length?n[0]:void 0},rn=function(e,t){var n=tn(e,t),r=n.filter((function(e){return Boolean(e)}));return{hasNodesWithoutMarks:n.length!==r.length,marks:r}},on=function(e,t){var n=e.find((function(e){return"style"===e.type.name})),r=n&&n.attrs.style;return At(r,t)},an=function(e,t,n,r,o){var i=o.create({style:r.style}),a=[],s=[],l=null,c=null;return e.doc.nodesBetween(t,n,(function(e,u,d){if(e.isInline){var p=e.marks;if(!i.isInSet(p)&&d.type.allowsMarkType(i.type)){var f=Math.max(u,t),h=Math.min(u+e.nodeSize,n),m=on(p,r);if(m.changed||r.newValue){for(var g=m.changed?{style:m.style||null}:{style:[r.style]+": "+r.newValue+";"},v=o.isInSet(p)?p.find((function(e){return"style"===e.type.name})):null,y=v?Pt(Pt({},v.attrs),g):g,b=o.create(y),k=b.addToSet(p),w=0;w<p.length;w++)p[w].isInSet(k)||(l&&l.to===f&&l.mark.eq(p[w])?l.to=h:(l=new ke(f,h,p[w]),a.push(l)));var C=c&&c.to===f,x=C&&b.attrs.style===c.mark.attrs.style;C&&x?c.to=h:Object.keys(y).some((function(e){return null!==y[e]}))&&(c=new be(f,h,b),s.push(c))}}}})),a.forEach((function(t){return e.step(t)})),s.forEach((function(t){return e.step(t)})),a.length+s.length>0},sn=function(e,t){var n=e.schema.marks.style;return(n?tn(e,n):[]).map((function(e){return en(e,t)})).filter((function(e){return null!==e}))},ln=function(e,t){return function(n,r,o){var i=n.selection,a=i.empty,s=i.$cursor,l=i.ranges;if(a&&!s||!Gt(n.doc,l,e))return!1;var c,u,d,p,f=!1;if(r){var h=o||n.tr;if(s){var m=n.storedMarks||s.marks();if(e.isInSet(m)){var g=on(m,t),v=m.find((function(e){return"style"===e.type.name})),y=Pt(Pt({},v?v.attrs:{}),{style:g.style||null});if(c=v.attrs,u=y,d=Object.keys(c),p=Object.keys(u),d.length===p.length&&d.every((function(e){return c[e]===u[e]})))return!1;r(h.removeStoredMark(e)),Object.keys(y).some((function(e){return null!==y[e]}))&&r(h.addStoredMark(e.create(y))),f=!0}}else{for(var b=0;b<l.length;b++){var k=l[b],w=k.$from,C=k.$to;f=an(h,w.pos,C.pos,t,e)}f&&(h.scrollIntoView(),r(h))}}return f}},cn=function(e,t,n){return function(r,o){var i=r.schema.marks,a=e.altStyle,s=e.altMarks,l=void 0===s?[]:s,c=e.mark,u=t||r.tr,d=!1,p=!1,f=function(){return p=!0};a&&i.style&&(d=ln(i.style,{style:a.name,value:a.value})(r,f,u));var h=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([c],l).filter((function(e){return i[e]})),m=h.map((function(e){return Qt(r,{mark:e})&&i[e]})).filter((function(e){return e}));return m.length?function(e,t,n,r){var o=t.selection,i=o.$cursor,a=o.ranges;if(r=r||t.tr,i)e.forEach((function(e){e.isInSet(t.storedMarks||i.marks())&&n(r.removeStoredMark(e))}));else{for(var s=function(t){var n=a[t],o=n.$from,i=n.$to;e.forEach((function(e){Xt(r,o.pos,i.pos,e)}))},l=0;l<a.length;l++)s(l);n(r.scrollIntoView())}}(m,r,f,u):d||Yt(i[c],n,u)(r,f),p&&o(u),p}},un=function(e,t){return function(n,r){var o=n.schema.marks.style,i={style:e.style,value:/^.+$/,newValue:e.value},a=n.tr;t&&a.setMeta("commandName",t),a.setMeta("args",e);var s=n.selection,l=s.empty,c=s.$cursor,u=s.ranges;if(l&&!c||!o||!Gt(n.doc,u,o))return!1;if(c){var d=n.storedMarks||c.marks(),p=o.isInSet(d)?d.find((function(e){return"style"===e.type.name})):null,f={style:null};if(p&&p.attrs.style){var h=At(p.attrs.style,i);h.changed&&h.style&&(f.style=h.style)}else i.newValue&&(f.style=[i.style]+": "+i.newValue+";");var m=p?Pt(Pt({},p.attrs),f):f;return Object.keys(m).some((function(e){return null!==m[e]}))?r(a.addStoredMark(o.create(m))):r(a.removeStoredMark(o)),!0}return ln(o,i)(n,r,a)}},dn=function(e,t){return function(n,r){var o=n.selection.$cursor;if(o){var i=o.parent,a=o.index(),s=n.schema.marks[e.mark],l=i.child(a).marks.find((function(e){return e.type===s})),c=i.childCount,u=o.pos-o.textOffset,d=i.child(a).nodeSize,p=void 0,f=void 0;for(p=a-1;p>=0&&l.isInSet(i.child(p).marks);)d+=f=i.child(p).nodeSize,u-=f,p-=1;for(p=a+1;p<c&&l.isInSet(i.child(p).marks);)d+=i.child(p).nodeSize,p+=1;r(Xt(t||n.tr,u,u+d,l))}else cn(e,t)(n,r)}},pn=function(e,t){var n=e.mark,r=e.attrs;return void 0===t&&(t="link"),function(e,o){var i=e.schema.marks,a=e.tr;t&&(a.setMeta("commandName",t),a.setMeta("args",r));var s=!1,l=function(){return s=!0};if(function(e,t){var n=tn(e,t);return 1===n.length&&n[0]?n[0]:null}(e,i[n]))!function(e,t){return function(n,r){var o=n.selection,i=o.$cursor,a=o.from,s=o.to,l=n.schema.marks[e.mark];if(i){var c=i.parent,u=i.index(),d=c.child(u).marks.find((function(e){return e.type===l})),p=c.childCount,f=i.pos-i.textOffset,h=c.child(u).nodeSize,m=void 0,g=void 0;for(m=u-1;m>=0&&d.isInSet(c.child(m).marks);)h+=g=c.child(m).nodeSize,f-=g,m-=1;for(m=u+1;m<p&&d.isInSet(c.child(m).marks);)h+=c.child(m).nodeSize,m+=1;t.removeMark(f,f+h,l),t.addMark(f,f+h,l.create(e.attrs)),r(t)}else t.doc.nodesBetween(a,s,(function(n,o){n.isInline&&l.isInSet(n.marks)&&(t.removeMark(o,o+n.nodeSize,l),t.addMark(o,o+n.nodeSize,l.create(e.attrs)),r(t))}))}}({mark:n,attrs:r},a)(e,l);else{var c=e;Qt(e,{mark:n})&&(dn({mark:n,attrs:r},a)(e,l),c=dt.create({doc:a.doc,selection:a.selection})),s?Yt(i[n],r,a)(c,l):cn({mark:n},a,r)(c,l)}return s&&o(a),s}},fn=function(e){return function(t,n){n(t.tr.insertText(e.text,e.from,e.to))}},hn=function(e){return function(t,n){var r=t.schema.nodes.image.createAndFill(e);Lt(r)(t,(function(t){return n(t.setMeta("commandName","insertImage").setMeta("args",e))}))}},mn=function(e,t,n,r){if(!n.isTextblock)return!1;e.selection.ranges.forEach((function(o){var i=e.steps.length,a=o.$from.pos,l=o.$to.pos;e.doc.nodesBetween(a,l,(function(o,a){if(o.eq(t)&&o.isTextblock&&!o.hasMarkup(n,r)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(a),n)){e.clearIncompatible(e.mapping.slice(i).map(a,1),n);var l=e.mapping.slice(i),c=l.map(a,1),u=l.map(a+o.nodeSize,1),d=new f(s.from(n.create(r,null,o.marks)),0,0);return e.step(new Ce(c,u,c+1,u-1,d,1,!0)),!1}}))}))},gn=function(e,t){void 0===t&&(t={blocksInSelection:!1});var n=e.doc,r=e.selection,o=r.$from,i=r.ranges,a=t.blocksInSelection,s=[],l=r instanceof et?r.node:void 0;return l?l.isBlock?(s.push(l),l.nodesBetween(0,l.content.size,(function(e){e.isBlock&&s.push(e)}))):!a&&o.parent&&o.parent.isBlock&&s.push(o.parent):i.forEach((function(e){var t=e.$from.pos,r=e.$to.pos;n.nodesBetween(t,r,(function(e,n,o,i){e.isBlock&&(!a||n>=t&&n+e.content.size+2<=r)&&s.push(e)}))})),s},vn=function(e,t){return function(n,r){var o=gn(n),i=n.schema.nodes,a=n.tr;a.setMeta("commandName",t),a.setMeta("args",{value:e}),o.forEach((function(t){if(t.type.isTextblock)if("p"===e){var n=t.attrs,r=n.level,o=_t(n,["level"]);mn(a,t,i.paragraph,o)}else if(/^h[1-6]$/i.test(e))r=parseInt(e.substr(1),10),mn(a,t,i.heading,Pt(Pt({},t.attrs),{level:r}));else if("blockquote"===e){var s=t.attrs;r=s.level,o=_t(s,["level"]),mn(a,t,i.blockquote,o)}}));var s=a.docChanged;return s&&r(a.scrollIntoView()),s}},yn=function(e,t){void 0===t&&(t={blocksInSelection:!0});var n=e.doc,r=e.selection,o=t.blocksInSelection,i=t.blockNodeType;gn({doc:n,selection:r},{blocksInSelection:o}).filter((function(e){return e.isTextblock})).forEach((function(t){var n=t.attrs||{},r=n.style,o=void 0===r?"":r,a=n.class,s=void 0===a?"":a,l=_t(n,["style","class"]),c=i||t.type;(o||s||c!==t.type)&&mn(e,t,c,l)}))},bn=function(e){var t=gn(e),n=e.schema.nodes,r=[];return t.forEach((function(e){e.type===n.paragraph?r.push("p"):e.type===n.heading?r.push("h"+e.attrs.level):e.type===n.blockquote&&n.blockquote.isTextblock&&r.push("blockquote")})),r},kn=function(e,t){var n,r,o=e.attrs.style;return o&&t.forEach((function(e){r={style:e.name,value:/^.+$/,newValue:e.value},n=At(o,r),o=n.changed?n.style:o})),o=o||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:o||null})},wn=function(e,t){var n=e.selection,r=n.from,o=n.to,i=!1;return e.doc.nodesBetween(r,o,(function(e){return!(i=i||e.type===t)})),i},Cn=function(e){var t=bn(e);return 1===new Set(t).size?t[0]:null},xn=function(e){return{tag:Cn(e)||""}},On=function(e,t){return function(n,r){var o=gn(n),i=n.tr;i.setMeta("commandName",t),o.forEach((function(t){if(t.type.isTextblock){var n={},r=e.find((function(e){return e.node===t.type.name}));r&&(n=kn(t,r.style)),mn(i,t,t.type,n)}}));var a=i.docChanged;return a&&r(i.scrollIntoView()),a}},Sn=function(e,t){var n=gn(e),r=!1;return n.forEach((function(e){if(!r&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));n&&(r=n.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),r},En=function(e){return void 0===e&&(e={blocksInSelection:!0}),function(t,n){var r=t.tr,o=e.blocksInSelection,i=e.blockNodeType,a=(e.exceptMarks||[t.schema.marks.link]).filter(Boolean);Zt(r,{except:a}),yn(r,{blocksInSelection:o,blockNodeType:i});var s=r.docChanged;return s&&n&&n(r),s}};const In=["ol",0],Nn=["ul",0],Tn=["li",0],Mn={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1})}],toDOM:e=>1==e.attrs.order?In:["ol",{start:e.attrs.order},0]},Dn={parseDOM:[{tag:"ul"}],toDOM:()=>Nn},Rn={parseDOM:[{tag:"li"}],toDOM:()=>Tn,defining:!0};function Pn(e,t){let n={};for(let t in e)n[t]=e[t];for(let e in t)n[e]=t[e];return n}function _n(e,t,n){return e.append({ordered_list:Pn(Mn,{content:"list_item+",group:n}),bullet_list:Pn(Dn,{content:"list_item+",group:n}),list_item:Pn(Rn,{content:t})})}function An(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i),l=!1,c=a;if(!a)return!1;if(a.depth>=2&&o.node(a.depth-1).type.compatibleContent(e)&&0==a.startIndex){if(0==o.index(a.depth-1))return!1;let e=n.doc.resolve(a.start-2);c=new T(e,e,a.depth),a.endIndex<a.parent.childCount&&(a=new T(o,n.doc.resolve(i.end(a.depth)),a.depth)),l=!0}let u=Ee(c,e,t,a);return!!u&&(r&&r(function(e,t,n,r,o){let i=s.empty;for(let e=n.length-1;e>=0;e--)i=s.from(n[e].type.create(n[e].attrs,i));e.step(new Ce(t.start-(r?2:0),t.end,t.start,t.end,new f(i,0,0),n.length,!0));let a=0;for(let e=0;e<n.length;e++)n[e].type==o&&(a=e+1);let l=n.length-a,c=t.start+n.length-(r?2:0),u=t.parent;for(let n=t.startIndex,r=t.endIndex,o=!0;n<r;n++,o=!1)!o&&Ne(e.doc,c,l)&&(e.split(c,l),c+=2*l),c+=u.child(n).nodeSize;return e}(n.tr,a,u,l,e).scrollIntoView()),!0)}}function jn(e){return function(t,n){let{$from:r,$to:o,node:i}=t.selection;if(i&&i.isBlock||r.depth<2||!r.sameParent(o))return!1;let a=r.node(-1);if(a.type!=e)return!1;if(0==r.parent.content.size&&r.node(-1).childCount==r.indexAfter(-1)){if(3==r.depth||r.node(-3).type!=e||r.index(-2)!=r.node(-2).childCount-1)return!1;if(n){let o=s.empty,i=r.index(-1)?1:r.index(-2)?2:3;for(let e=r.depth-i;e>=r.depth-3;e--)o=s.from(r.node(e).copy(o));let a=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;o=o.append(s.from(e.createAndFill()));let l=r.before(r.depth-(i-1)),c=t.tr.replace(l,r.after(-a),new f(o,4-i,0)),u=-1;c.doc.nodesBetween(l,c.doc.content.size,((e,t)=>{if(u>-1)return!1;e.isTextblock&&0==e.content.size&&(u=t+1)})),u>-1&&c.setSelection(Ge.near(c.doc.resolve(u))),n(c.scrollIntoView())}return!0}let l=o.pos==r.end()?a.contentMatchAt(0).defaultType:null,c=t.tr.delete(r.pos,o.pos),u=l?[null,{type:l}]:void 0;return!!Ne(c.doc,r.pos,2,u)&&(n&&n(c.split(r.pos,2,u).scrollIntoView()),!0)}}function Fn(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!i&&(!n||(r.node(i.depth-1).type==e?function(e,t,n,r){let o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new Ce(i-1,a,i,a,new f(s.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new T(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const l=Se(r);return null!=l&&(t(o.lift(r,l).scrollIntoView()),!0)}(t,n,e,i):function(e,t,n){let r=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,i=n.startIndex;t>i;t--)e-=o.child(t).nodeSize,r.delete(e-1,e+1);let i=r.doc.resolve(n.start),a=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,c=n.endIndex==o.childCount,u=i.node(-1),d=i.index(-1);if(!u.canReplace(d+(l?0:1),d+1,a.content.append(c?s.empty:s.from(o))))return!1;let p=i.pos,h=p+a.nodeSize;return r.step(new Ce(p-(l?1:0),h+(c?1:0),p+1,h-1,new f((l?s.empty:s.from(o.copy(s.empty))).append(c?s.empty:s.from(o.copy(s.empty))),l?0:1,c?0:1),l?0:1)),t(r.scrollIntoView()),!0}(t,n,i)))}}function zn(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));if(!i)return!1;let a=i.startIndex;if(0==a)return!1;let l=i.parent,c=l.child(a-1);if(c.type!=e)return!1;if(n){let r=c.lastChild&&c.lastChild.type==l.type,o=s.from(r?e.create():null),a=new f(s.from(e.create(null,s.from(l.type.create(null,o)))),r?3:1,0),u=i.start,d=i.end;n(t.tr.step(new Ce(u-(r?3:1),d,u,d,a,1,!0)).scrollIntoView())}return!0}}var Ln={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},Bn={listType:Ln.orderedList,types:Pt({},Ln)},Vn={listType:Ln.bulletList,types:Pt({},Ln)},Hn={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:Pt({},Ln)},Kn={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:Pt({},Ln)};const Wn=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0),$n=(e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let o=Gn(r);if(!o){let n=r.blockRange(),o=n&&Se(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&ur(e,o,t))return!0;if(0==r.parent.content.size&&(qn(i,"end")||et.isSelectable(i))){let n=_e(e.doc,r.before(),r.after(),f.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(qn(i,"end")?Ge.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):et.create(r.doc,o.pos-i.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),0))};function qn(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}const Un=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=Gn(r)}let a=i&&i.nodeBefore;return!(!a||!et.isSelectable(a)||(t&&t(e.tr.setSelection(et.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),0))};function Gn(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}const Yn=(e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;let o=Jn(r);if(!o)return!1;let i=o.nodeAfter;if(ur(e,o,t))return!0;if(0==r.parent.content.size&&(qn(i,"start")||et.isSelectable(i))){let n=_e(e.doc,r.before(),r.after(),f.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(qn(i,"start")?Ge.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):et.create(r.doc,r.mapping.map(o.pos))),t(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),0))},Xn=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;i=Jn(r)}let a=i&&i.nodeAfter;return!(!a||!et.isSelectable(a)||(t&&t(e.tr.setSelection(et.create(e.doc,i.pos)).scrollIntoView()),0))};function Jn(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const Zn=(e,t)=>{let n,r=e.selection,o=r instanceof et;if(o){if(r.node.isTextblock||!Te(e.doc,r.from))return!1;n=r.from}else if(n=De(e.doc,r.from,-1),null==n)return!1;if(t){let r=e.tr.join(n);o&&r.setSelection(et.create(r.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(r.scrollIntoView())}return!0},Qn=(e,t)=>{let n,r=e.selection;if(r instanceof et){if(r.node.isTextblock||!Te(e.doc,r.to))return!1;n=r.to}else if(n=De(e.doc,r.to,1),null==n)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0},er=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Se(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},tr=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(t&&t(e.tr.insertText("\n").scrollIntoView()),0))};function nr(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const rr=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),a=nr(o.contentMatchAt(i));if(!a||!o.canReplaceWith(i,i,a))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,a.createAndFill());o.setSelection(Ge.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0},or=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof nt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=nr(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,a=e.tr.insert(n,i.createAndFill());a.setSelection(Ze.create(a.doc,n+1)),t(a.scrollIntoView())}return!0},ir=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(Ne(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Se(r);return null!=o&&(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},ar=(e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof et&&e.selection.node.isBlock)return!(!n.parentOffset||!Ne(e.doc,n.pos)||(t&&t(e.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(t){let o=r.parentOffset==r.parent.content.size,i=e.tr;(e.selection instanceof Ze||e.selection instanceof nt)&&i.deleteSelection();let a=0==n.depth?null:nr(n.node(-1).contentMatchAt(n.indexAfter(-1))),s=o&&a?[{type:a}]:void 0,l=Ne(i.doc,i.mapping.map(n.pos),1,s);if(s||l||!Ne(i.doc,i.mapping.map(n.pos),1,a?[{type:a}]:void 0)||(a&&(s=[{type:a}]),l=!0),l&&(i.split(i.mapping.map(n.pos),1,s),!o&&!n.parentOffset&&n.parent.type!=a)){let e=i.mapping.map(n.before()),t=i.doc.resolve(e);a&&n.node(-1).canReplaceWith(t.index(),t.index()+1,a)&&i.setNodeMarkup(i.mapping.map(n.before()),a)}t(i.scrollIntoView())}return!0},sr=(e,t)=>ar(e,t&&(n=>{let r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})),lr=(e,t)=>{let n,{$from:r,to:o}=e.selection,i=r.sharedDepth(o);return 0!=i&&(n=r.before(i),t&&t(e.tr.setSelection(et.create(e.doc,n))),!0)},cr=(e,t)=>(t&&t(e.tr.setSelection(new nt(e.doc))),!0);function ur(e,t,n){let r,o,i=t.nodeBefore,a=t.nodeAfter;if(i.type.spec.isolating||a.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(i,i+1)||!o.isTextblock&&!Te(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let l=t.parent.canReplace(t.index(),t.index()+1);if(l&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&o.matchType(r[0]||a.type).validEnd){if(n){let o=t.pos+a.nodeSize,l=s.empty;for(let e=r.length-1;e>=0;e--)l=s.from(r[e].create(null,l));l=s.from(i.copy(l));let c=e.tr.step(new Ce(t.pos-1,o,t.pos,o,new f(l,1,0),r.length,!0)),u=o+2*r.length;Te(c.doc,u)&&c.join(u),n(c.scrollIntoView())}return!0}let c=Ge.findFrom(t,1),u=c&&c.$from.blockRange(c.$to),d=u&&Se(u);if(null!=d&&d>=t.depth)return n&&n(e.tr.lift(u,d).scrollIntoView()),!0;if(l&&qn(a,"start",!0)&&qn(i,"end")){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let l=a,c=1;for(;!l.isTextblock;l=l.firstChild)c++;if(r.canReplace(r.childCount,r.childCount,l.content)){if(n){let r=s.empty;for(let e=o.length-1;e>=0;e--)r=s.from(o[e].copy(r));n(e.tr.step(new Ce(t.pos-o.length,t.pos+a.nodeSize,t.pos+c,t.pos+a.nodeSize-c,new f(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function dr(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(Ze.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}const pr=dr(-1),fr=dr(1);function hr(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i),s=a&&Ee(a,e,t);return!!s&&(r&&r(n.tr.wrap(a,s).scrollIntoView()),!0)}}function mr(e,t=null){return function(n,r){let{from:o,to:i}=n.selection,a=!1;return n.doc.nodesBetween(o,i,((r,o)=>{if(a)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)a=!0;else{let t=n.doc.resolve(o),r=t.index();a=t.parent.canReplaceWith(r,r+1,e)}})),!!a&&(r&&r(n.tr.setBlockType(o,i,e,t).scrollIntoView()),!0)}}function gr(e,t=null){return function(n,r){let{empty:o,$cursor:i,ranges:a}=n.selection;if(o&&!i||!function(e,t,n){for(let r=0;r<t.length;r++){let{$from:o,$to:i}=t[r],a=0==o.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(o.pos,i.pos,(e=>{if(a)return!1;a=e.inlineContent&&e.type.allowsMarkType(n)})),a)return!0}return!1}(n.doc,a,e))return!1;if(r)if(i)e.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let o=!1,i=n.tr;for(let t=0;!o&&t<a.length;t++){let{$from:r,$to:i}=a[t];o=n.doc.rangeHasMark(r.pos,i.pos,e)}for(let n=0;n<a.length;n++){let{$from:r,$to:s}=a[n];if(o)i.removeMark(r.pos,s.pos,e);else{let n=r.pos,o=s.pos,a=r.nodeAfter,l=s.nodeBefore,c=a&&a.isText?/^\s*/.exec(a.text)[0].length:0,u=l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+c<o&&(n+=c,o-=u),i.addMark(n,o,e.create(t))}}r(i.scrollIntoView())}return!0}}function vr(e,t){return n=>{if(!n.isGeneric)return e(n);let r=[];for(let e=0;e<n.mapping.maps.length;e++){let t=n.mapping.maps[e];for(let e=0;e<r.length;e++)r[e]=t.map(r[e]);t.forEach(((e,t,n,o)=>r.push(n,o)))}let o=[];for(let e=0;e<r.length;e+=2){let i=r[e],a=r[e+1],s=n.doc.resolve(i),l=s.sharedDepth(a),c=s.node(l);for(let e=s.indexAfter(l),n=s.after(l+1);n<=a;++e){let r=c.maybeChild(e);if(!r)break;if(e&&-1==o.indexOf(n)){let i=c.child(e-1);i.type==r.type&&t(i,r)&&o.push(n)}n+=r.nodeSize}}o.sort(((e,t)=>e-t));for(let e=o.length-1;e>=0;e--)Te(n.doc,o[e])&&n.join(o[e]);e(n)}}function yr(e,t){let n=Array.isArray(t)?e=>t.indexOf(e.type.name)>-1:t;return(t,r,o)=>e(t,r&&vr(r,n),o)}function br(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}let kr=br(Wn,$n,Un),wr=br(Wn,Yn,Xn);const Cr={Enter:br(tr,or,ir,ar),"Mod-Enter":rr,Backspace:kr,"Mod-Backspace":kr,"Shift-Backspace":kr,Delete:wr,"Mod-Delete":wr,"Mod-a":cr},xr={"Ctrl-h":Cr.Backspace,"Alt-Backspace":Cr["Mod-Backspace"],"Ctrl-d":Cr.Delete,"Ctrl-Alt-Backspace":Cr["Mod-Delete"],"Alt-Delete":Cr["Mod-Delete"],"Alt-d":Cr["Mod-Delete"],"Ctrl-a":pr,"Ctrl-e":fr};for(let e in Cr)xr[e]=Cr[e];const Or=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&"darwin"==os.platform())?xr:Cr;var Sr=function(e,t){return hr(e.schema.nodes.blockquote)(e,t)},Er=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=e.schema.nodes.blockquote,a=e.doc,s=-1,l=r.blockRange(o);l&&a.nodesBetween(l.start,l.end,(function(e,t,n,r){e.type===i&&(s=t)}));var c=-1!==s;return t&&c&&t(e.tr.lift(l,a.resolve(s).depth)),c},Ir=function(e,t,n){return function(r,o){var i=gn(r),a=r.tr;a.setMeta("commandName",t),i.forEach((function(t){if(t.type.isTextblock){var r=void 0,o=e.find((function(e){return e.node===t.type.name}));if(o){var i="rtl"===n?o.rtlStyle:o.style,s={name:i,value:o.step>0?""+o.step+o.unit:""};if(t.attrs.style){var l=new RegExp(i+":\\s?(\\d+)"+o.unit,"i"),c=t.attrs.style.match(l);if(c){var u=parseFloat(c[1])+o.step;u=u<=0?"":u,s.value=""+u+(u?o.unit:"")}}r=kn(t,[s])}r&&mn(a,t,t.type,r)}}));var s=a.docChanged;return s&&o(a.scrollIntoView()),s}},Nr=function(e,t,n){var r=gn(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));if(r){var i="rtl"===n?r.rtlStyle:r.style,a=new RegExp(i+":\\s?\\d+"+r.unit,"i");o=a.test(e.attrs.style)}}})),o},Tr=function(e,t){return zn(t)(e)},Mr=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],o=e.schema.nodes[t.listsTypes.bulletList],i=!!zt(r,2)(e.selection),a=!!zt(o,2)(e.selection);return(i||a)&&Fn(n)(e)},Dr=function(e,t){var n=e.schema.nodes,r=n[Hn.listsTypes.listItem];return(Nr(e,t.nodes)||Hn.nodes.some((function(t){return n[t.node]&&wn(e,n[t.node])})))&&!wn(e,r)},Rr=function(e,t){var n=e.schema.nodes[Hn.listsTypes.listItem],r=Dr(e,Hn);Tr(e,n)?zn(n)(e,t):r&&Ir(Hn.nodes)(e,t)},Pr=function(e,t){var n=e.schema.nodes,r=n[Kn.listsTypes.listItem],o=Dr(e,Kn);wn(e,n.blockquote)?Er(e,t):Mr(e,Kn)?Fn(r)(e,t):o&&Ir(Kn.nodes)(e,t)},_r=function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],i=e.nodes[n.orderedList],a=e.nodes[n.listItem],s=t.depth;s>0;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(r=s),l.type!==o&&l.type!==i&&l.type!==a)break}return r-1};function Ar(e,t,n,r){var o=r||e.schema.nodes.listItem,i=t.$from,a=t.$to,l=i.blockRange(a,(function(e){return e.childCount&&e.firstChild.type===o}));if(!l||l.depth<2||i.node(l.depth-1).type!==o)return n;var c=l.end,u=a.end(l.depth);return c<u&&(n.step(new Ce(c-1,u,c,u,new f(s.from(o.create(void 0,l.parent.copy())),1,0),1,!0)),l=new T(n.doc.resolve(i.pos),n.doc.resolve(u),l.depth)),n.lift(l,Se(l)).scrollIntoView()}function jr(e){return function(t,n){var r=t.tr,o=t.selection,i=o.$from,a=o.$to;return r.doc.nodesBetween(i.pos,a.pos,(function(n,o){if(n.isTextblock||"blockquote"===n.type.name||"div"===n.type.name){var i=new et(r.doc.resolve(r.mapping.map(o))),a=i.$from.blockRange(i.$to);if(!a||i.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var s=a&&Se(a);if(null==s)return!1;r.lift(a,s)}})),n&&n(r),!0}}var Fr=/list\-style\-type:\s?([\w-]+)/,zr=function(e){var t=e.style||"",n=Fr.exec(t);return n&&n[1]||""},Lr=function(e,t,n,r,o){var i=r.listType,a=r.listAttrs,s=void 0===a?{style:null}:a,l=e.selection,c=l.$from.node(l.$from.depth-2),u=l.$to.node(l.$to.depth-2);if(c&&c.type.name===i&&zr(c.attrs)===zr(s)&&u&&u.type.name===i&&zr(u.attrs)===zr(s)){var d=n.state.schema.nodes,p={bulletList:d[r.bulletList],orderedList:d[r.orderedList],listItem:d[r.listItem]},f=function(e,t){for(var n,r=t.bulletList,o=t.orderedList,i=t.listItem,a=e.depth-1;a>0;a--){var s=e.node(a);if(s.type!==r&&s.type!==o||(n=a),s.type!==r&&s.type!==o&&s.type!==i)break}return n}(l.$to,p),h=function(e,t,n,r,o,i){i||(i=e.schema.nodes.listItem);var a=!1;return o.doc.nodesBetween(t,n,(function(n,s){if(!a&&n.type===i&&s>t){a=!0;for(var l=r+3;l>r+2;){var c=o.doc.resolve(o.mapping.map(s));l=c.depth;var u=o.doc.resolve(o.mapping.map(s+n.textContent.length)),d=new Ze(c,u);o=Ar(e,d,o,i)}}})),o}(e,l.$to.pos,l.$to.end(f),f,n.state.tr,p.listItem);return h=function(e,t,n){var r=e.selection,o=r.from,i=r.to,a=e.schema.nodes,s=a.paragraph,l=a.heading,c=[];t.doc.nodesBetween(o,i,(function(e,t){e.type!==s&&e.type!==l||c.push({node:e,pos:t})}));for(var u=c.length-1;u>=0;u--){var d=c[u],p=t.doc.resolve(t.mapping.map(d.pos));if(p.depth>0){var f;f=d.node.textContent&&d.node.textContent.length>0?t.doc.resolve(t.mapping.map(d.pos+d.node.textContent.length)):t.doc.resolve(t.mapping.map(d.pos+1));var h=p.blockRange(f);h&&t.lift(h,_r(e.schema,p,n))}}return t}(e,h,r),h.setMeta("commandName",o),t(h),!0}return function(e){return function(t,n,r){if(!r)return!1;var o,i,a=(t=r.state).schema.nodes[e.listType],s=t.selection,l=s.$from,c=s.$to,u=l.node(-2),d=l.node(-3),p=function(e,t,n,r){return 0===function(e,t,n){for(var r=Array(),o=function(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var r=t.node(t.depth),o=t;t.depth>=1;)(r=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==n.indexOf(r.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));i.pos<=n.start(n.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&r.push(s),0===a)break;var l=e.resolve(i.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return r}(e,t,n).filter((function(e){return e.type!==r})).length}(t.doc,l,c,a);return(u&&u.type===a||d&&d.type===a)&&p?jr(e)(t,n):(p||(jr(e)(t,n),t=r.state),(o=a,void 0===(i=e.listAttrs)&&(i={}),yr(An(o,i),(function(e,t){return e.type===t.type&&e.type===o})))(t,n))}}(r)(e,t,n)};function Br(e,t,n){return Lr(e,t,n,Pt({listType:Vn.listType},Vn.types))}function Vr(e,t,n){return Lr(e,t,n,Pt({listType:Bn.listType},Bn.types))}for(var Hr=function(e,t){return{name:e,value:t}},Kr=[{node:"paragraph",style:[Hr("text-align","left")]},{node:"heading",style:[Hr("text-align","left")]}],Wr=[{node:"paragraph",style:[Hr("text-align","right")]},{node:"heading",style:[Hr("text-align","right")]}],$r=[{node:"paragraph",style:[Hr("text-align","center")]},{node:"heading",style:[Hr("text-align","center")]}],qr=[{node:"paragraph",style:[Hr("text-align","justify")]},{node:"heading",style:[Hr("text-align","justify")]}],Ur=[{node:"paragraph",style:[Hr("text-align","")]},{node:"heading",style:[Hr("text-align","")]}],Gr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Yr={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Xr="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Jr=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),Zr="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Qr=Jr||Xr&&+Xr[1]<57,eo=0;eo<10;eo++)Gr[48+eo]=Gr[96+eo]=String(eo);for(eo=1;eo<=24;eo++)Gr[eo+111]="F"+eo;for(eo=65;eo<=90;eo++)Gr[eo]=String.fromCharCode(eo+32),Yr[eo]=String.fromCharCode(eo);for(var to in Gr)Yr.hasOwnProperty(to)||(Yr[to]=Gr[to]);const no="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function ro(e){let t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(let e=0;e<i.length-1;e++){let a=i[e];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else if(/^s(hift)?$/i.test(a))r=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);no?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function oo(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function io(e){return new ft({props:{handleKeyDown:ao(e)}})}function ao(e){let t=function(e){let t=Object.create(null);for(let n in e)t[ro(n)]=e[n];return t}(e);return function(e,n){let r,o=function(e){var t=!(Qr&&(e.ctrlKey||e.altKey||e.metaKey)||Zr&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?Yr:Gr)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,a=t[oo(o,n,!i)];if(a&&a(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=Gr[n.keyCode])&&r!=o){let o=t[oo(r,n,!0)];if(o&&o(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){let r=t[oo(o,n,!0)];if(r&&r(e.state,e.dispatch,e))return!0}return!1}}const so="undefined"!=typeof navigator?navigator:null,lo="undefined"!=typeof document?document:null,co=so&&so.userAgent||"",uo=/Edge\/(\d+)/.exec(co),po=/MSIE \d/.exec(co),fo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(co),ho=!!(po||fo||uo),mo=po?document.documentMode:fo?+fo[1]:uo?+uo[1]:0,go=!ho&&/gecko\/(\d+)/i.test(co);go&&(/Firefox\/(\d+)/.exec(co)||[0,0])[1];const vo=!ho&&/Chrome\/(\d+)/.exec(co),yo=!!vo,bo=vo?+vo[1]:0,ko=!ho&&!!so&&/Apple Computer/.test(so.vendor),wo=ko&&(/Mobile\/\w+/.test(co)||!!so&&so.maxTouchPoints>2),Co=wo||!!so&&/Mac/.test(so.platform),xo=/Android \d/.test(co),Oo=!!lo&&"webkitFontSmoothing"in lo.documentElement.style,So=Oo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,Eo=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Io=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let No=null;const To=function(e,t,n){let r=No||(No=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},Mo=function(e,t,n,r){return n&&(Ro(e,t,n,r,-1)||Ro(e,t,n,r,1))},Do=/^(img|br|input|textarea|hr)$/i;function Ro(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Po(e))){let n=e.parentNode;if(!n||1!=n.nodeType||_o(e)||Do.test(e.nodeName)||"false"==e.contentEditable)return!1;t=Eo(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?Po(e):0}}}function Po(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function _o(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Ao=function(e){let t=e.isCollapsed;return t&&yo&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function jo(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Fo(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function zo(e,t){return"number"==typeof e?e:e[t]}function Lo(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Bo(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let a=n||e.dom;a;a=Io(a)){if(1!=a.nodeType)continue;let e=a,n=e==i.body,s=n?Fo(i):Lo(e),l=0,c=0;if(t.top<s.top+zo(r,"top")?c=-(s.top-t.top+zo(o,"top")):t.bottom>s.bottom-zo(r,"bottom")&&(c=t.bottom-s.bottom+zo(o,"bottom")),t.left<s.left+zo(r,"left")?l=-(s.left-t.left+zo(o,"left")):t.right>s.right-zo(r,"right")&&(l=t.right-s.right+zo(o,"right")),l||c)if(n)i.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let o=e.scrollLeft-n,i=e.scrollTop-r;t={left:t.left-o,top:t.top-i,right:t.right-o,bottom:t.bottom-i}}if(n)break}}function Vo(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Io(r));return t}function Ho(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:i}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Ko=null;function Wo(e,t){let n,r,o=2e8,i=0,a=t.top,s=t.top;for(let l=e.firstChild,c=0;l;l=l.nextSibling,c++){let e;if(1==l.nodeType)e=l.getClientRects();else{if(3!=l.nodeType)continue;e=To(l).getClientRects()}for(let u=0;u<e.length;u++){let d=e[u];if(d.top<=a&&d.bottom>=s){a=Math.max(d.bottom,a),s=Math.min(d.top,s);let e=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(e<o){n=l,o=e,r=e&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==l.nodeType&&e&&(i=c+(t.left>=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=Go(r,1);if(n.top!=n.bottom&&$o(t,n))return{node:e,offset:o+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:Wo(n,r)}function $o(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function qo(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let n=e.childNodes[i];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let o=e[r];if($o(t,o))return qo(n,t,o)}}if((i=(i+1)%r)==o)break}return e}function Uo(e,t){let n,r=e.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{let e=r.caretPositionFromPoint(t.left,t.top);e&&({offsetNode:n,offset:o}=e)}catch(e){}if(!n&&r.caretRangeFromPoint){let e=r.caretRangeFromPoint(t.left,t.top);e&&({startContainer:n,startOffset:o}=e)}let i,a=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!a||!e.dom.contains(1!=a.nodeType?a.parentNode:a)){let n=e.dom.getBoundingClientRect();if(!$o(t,n))return null;if(a=qo(e.dom,t,n),!a)return null}if(ko)for(let e=a;n&&e;e=Io(e))e.draggable&&(n=void 0);if(a=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(a,t),n){if(go&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let e,r=n.childNodes[o];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?i=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(i=function(e,t,n,r){let o=-1;for(let n=t;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(t.node.isBlock&&t.parent){let e=t.dom.getBoundingClientRect();if(e.left>r.left||e.top>r.top)o=t.posBefore;else{if(!(e.right<r.left||e.bottom<r.top))break;o=t.posAfter}}n=t.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,1)}(e,n,o,t))}null==i&&(i=function(e,t,n){let{node:r,offset:o}=Wo(t,n),i=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();i=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}(e,a,t));let s=e.docView.nearestDesc(a,!0);return{pos:i,inside:s?s.posAtStart-s.border:-1}}function Go(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const Yo=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Xo(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),a=Oo||go;if(3==r.nodeType){if(!a||!Yo.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let e=o,t=o,i=n<0?1:-1;return n<0&&!o?(t++,i=-1):n>=0&&o==r.nodeValue.length?(e--,i=1):n<0?e--:t++,Jo(Go(To(r,e,t),i),i<0)}{let e=Go(To(r,o,o),n);if(go&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let t=Go(To(r,o-1,o-1),-1);if(t.top==e.top){let n=Go(To(r,o,o+1),-1);if(n.top!=e.top)return Jo(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(null==i&&o&&(n<0||o==Po(r))){let e=r.childNodes[o-1];if(1==e.nodeType)return Zo(e.getBoundingClientRect(),!1)}if(null==i&&o<Po(r)){let e=r.childNodes[o];if(1==e.nodeType)return Zo(e.getBoundingClientRect(),!0)}return Zo(r.getBoundingClientRect(),n>=0)}if(null==i&&o&&(n<0||o==Po(r))){let e=r.childNodes[o-1],t=3==e.nodeType?To(e,Po(e)-(a?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return Jo(Go(t,1),!1)}if(null==i&&o<Po(r)){let e=r.childNodes[o];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?To(e,0,a?0:1):1==e.nodeType?e:null:null;if(t)return Jo(Go(t,-1),!0)}return Jo(Go(3==r.nodeType?To(r):r,-n),n>=0)}function Jo(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Zo(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Qo(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}const ei=/[\u0590-\u08ac]/;let ti=null,ni=null,ri=!1;class oi{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>Eo(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let o,i=this.getDesc(r);if(i&&(!t||i.node)){if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return i;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n,r=0,o=0;for(let t=0;r<this.children.length;r++){let n=this.children[r],i=t+n.size;if(i>e||n instanceof di){o=e-t;break}t=i}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof ii&&n.side>=0;r--);if(t<=0){let e,n=!0;for(;e=r?this.children[r-1]:null,e&&e.dom.parentNode!=this.contentDOM;r--,n=!1);return e&&t&&n&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?Eo(e.dom)+1:0}}{let e,n=!0;for(;e=r<this.children.length?this.children[r]:null,e&&e.dom.parentNode!=this.contentDOM;r++,n=!1);return e&&n&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?Eo(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let i=n,a=0;;a++){let n=this.children[a],s=i+n.size;if(-1==r&&e<=s){let o=i+n.border;if(e>=o&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,o);e=i;for(let t=a;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=Eo(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(s>t||a==this.children.length-1)){t=s;for(let e=a+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=Eo(n.dom);break}t+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=s}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let o=Math.min(e,t),i=Math.max(e,t);for(let a=0,s=0;a<this.children.length;a++){let l=this.children[a],c=s+l.size;if(o>s&&i<c)return l.setSelection(e-s-l.border,t-s-l.border,n,r);s=c}let a=this.domFromPos(e,e?-1:1),s=t==e?a:this.domFromPos(t,t?-1:1),l=n.getSelection(),c=!1;if((go||ko)&&e==t){let{node:e,offset:t}=a;if(3==e.nodeType){if(c=!(!t||"\n"!=e.nodeValue[t-1]),c&&t==e.nodeValue.length)for(let t,n=e;n;n=n.parentNode){if(t=n.nextSibling){"BR"==t.nodeName&&(a=s={node:t.parentNode,offset:Eo(t)+1});break}let e=n.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(go&&l.focusNode&&l.focusNode!=s.node&&1==l.focusNode.nodeType){let e=l.focusNode.childNodes[l.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||c&&ko)&&Mo(a.node,a.offset,l.anchorNode,l.anchorOffset)&&Mo(s.node,s.offset,l.focusNode,l.focusOffset))return;let u=!1;if((l.extend||e==t)&&!c){l.collapse(a.node,a.offset);try{e!=t&&l.extend(s.node,s.offset),u=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!u){if(e>t){let e=a;a=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(a.node,a.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){let r=n+o.border,a=i-o.border;if(e>=r&&t<=a)return this.dirty=e==n||t==i?2:1,void(e!=r||t!=a||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-r,t-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class ii extends oi{constructor(e,t,n,r){let o,i=t.type.toDOM;if("function"==typeof i&&(i=i(n,(()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r))),!t.type.spec.raw){if(1!=i.nodeType){let e=document.createElement("span");e.appendChild(i),i=e}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class ai extends oi{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class si extends oi{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let o=r.nodeViews[t.type.name],i=o&&o(t,r,n);return i&&i.dom||(i=se.renderSpec(document,t.type.spec.toDOM(t,n))),new si(e,t,i.dom,i.contentDOM||i.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=si.create(this.parent,this.mark,!0,n),o=this.children,i=this.size;t<i&&(o=Oi(o,t,i,n)),e>0&&(o=Oi(o,0,e,n));for(let e=0;e<o.length;e++)o[e].parent=r;return r.children=o,r}}class li extends oi{constructor(e,t,n,r,o,i,a,s,l){super(e,[],o,i),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=a,i&&this.updateChildren(s,l)}static create(e,t,n,r,o,i){let a,s=o.nodeViews[t.type.name],l=s&&s(t,o,(()=>a?a.parent?a.parent.posBeforeChild(a):void 0:i),n,r),c=l&&l.dom,u=l&&l.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else c||({dom:c,contentDOM:u}=se.renderSpec(document,t.type.spec.toDOM(t)));u||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let d=c;return c=bi(c,n,t),l?a=new pi(e,t,n,r,c,u||null,d,l,o,i+1):t.isText?new ui(e,t,n,r,c,d,o):new li(e,t,n,r,c,u||null,d,o,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>s.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&ki(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,o=e.composing?this.localCompositionInfo(e,t):null,i=o&&o.pos>-1?o:null,a=o&&o.pos<0,s=new Ci(this,i&&i.node);!function(e,t,n,r){let o=t.locals(e),i=0;if(0==o.length){for(let n=0;n<e.childCount;n++){let a=e.child(n);r(a,o,t.forChild(i,a),n),i+=a.nodeSize}return}let a=0,s=[],l=null;for(let c=0;;){if(a<o.length&&o[a].to==i){let e,t=o[a++];for(;a<o.length&&o[a].to==i;)(e||(e=[t])).push(o[a++]);if(e){e.sort(xi);for(let t=0;t<e.length;t++)n(e[t],c,!!l)}else n(t,c,!!l)}let u,d;if(l)d=-1,u=l,l=null;else{if(!(c<e.childCount))break;d=c,u=e.child(c++)}for(let e=0;e<s.length;e++)s[e].to<=i&&s.splice(e--,1);for(;a<o.length&&o[a].from<=i&&o[a].to>i;)s.push(o[a++]);let p=i+u.nodeSize;if(u.isText){let e=p;a<o.length&&o[a].from<e&&(e=o[a].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<p&&(l=u.cut(e-i),u=u.cut(0,e-i),p=e,d=-1)}r(u,u.isInline&&!u.isLeaf?s.filter((e=>!e.inline)):s.slice(),t.forChild(i,u),d),i=p}}(this.node,this.innerDeco,((t,o,i)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!i&&s.syncToMarks(o==this.node.childCount?d.none:this.node.child(o).marks,n,e),s.placeWidget(t,e,r)}),((t,i,l,c)=>{let u;s.syncToMarks(t.marks,n,e),s.findNodeMatch(t,i,l,c)||a&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=s.findIndexWithChild(o.node))>-1&&s.updateNodeAt(t,i,l,u,e)||s.updateNextNode(t,i,l,e,c)||s.addNode(t,i,l,e,r),r+=t.nodeSize})),s.syncToMarks([],n,e),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||2==this.dirty)&&(i&&this.protectLocalComposition(e,i),fi(this.contentDOM,this.children,e),wo&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof Ze)||n<t||r>t+this.node.content.size)return null;let o=e.domSelection(),i=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=Po(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(o.focusNode,o.focusOffset);if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,o=function(e,t,n,r){for(let o=0,i=0;o<e.childCount&&i<=r;){let a=e.child(o++),s=i;if(i+=a.nodeSize,!a.isText)continue;let l=a.text;for(;o<e.childCount;){let t=e.child(o++);if(i+=t.nodeSize,!t.isText)break;l+=t.text}if(i>=n){let e=s<r?l.lastIndexOf(t,r-s-1):-1;if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}return-1}(this.node.content,e,n-t,r-t);return o<0?null:{node:i,pos:o,text:e}}return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new ai(this,o,t,r);e.input.compositionNodes.push(i),this.children=Oi(this.children,n,n+r.length,e,i)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node)||(this.updateInner(e,t,n,r),0))}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(ki(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=vi(this.dom,this.nodeDOM,gi(this.outerDeco,this.node,t),gi(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function ci(e,t,n,r,o){return bi(r,t,e),new li(void 0,e,t,n,r,r,r,o,0)}class ui extends li{constructor(e,t,n,r,o,i,a){super(e,t,n,r,o,null,i,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node)||(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,0))}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new ui(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class di extends oi{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class pi extends li{constructor(e,t,n,r,o,i,a,s,l,c){super(e,t,n,r,o,i,a,l,c),this.spec=s}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(e,t,n);return o&&this.updateInner(e,t,n,r),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function fi(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i<t.length;i++){let a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=wi(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof si){let t=r?r.previousSibling:e.lastChild;fi(a.contentDOM,a.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=wi(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const hi=function(e){e&&(this.nodeName=e)};hi.prototype=Object.create(null);const mi=[new hi];function gi(e,t,n){if(0==e.length)return mi;let r=n?mi[0]:new hi,o=[r];for(let i=0;i<e.length;i++){let a=e[i].type.attrs;if(a){a.nodeName&&o.push(r=new hi(a.nodeName));for(let e in a){let i=a[e];null!=i&&(n&&1==o.length&&o.push(r=new hi(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+i:"style"==e?r.style=(r.style?r.style+";":"")+i:"nodeName"!=e&&(r[e]=i))}}}return o}function vi(e,t,n,r){if(n==mi&&r==mi)return t;let o=t;for(let t=0;t<r.length;t++){let i=r[t],a=n[t];if(t){let t;a&&a.nodeName==i.nodeName&&o!=e&&(t=o.parentNode)&&t.nodeName.toLowerCase()==i.nodeName||(t=document.createElement(i.nodeName),t.pmIsDeco=!0,t.appendChild(o),a=mi[0]),o=t}yi(o,a||mi[0],i)}return o}function yi(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==o.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<o.length;t++)-1==r.indexOf(o[t])&&e.classList.add(o[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function bi(e,t,n){return vi(e,e,mi,gi(t,n,1!=e.nodeType))}function ki(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function wi(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Ci{constructor(e,t){this.lock=t,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){let s;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof si)){s=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=s.node;if(l){if(l!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,o=this.stack.length>>1,i=Math.min(o,e.length);for(;r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++)if(this.top.children[t].matchesMark(e[o])){r=t;break}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=si.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(let r=this.index,o=Math.min(this.top.children.length,r+5);r<o;r++){let o=this.top.children[r];if(o.matchesNode(e,t,n)&&!this.preMatch.matched.has(o)){i=r;break}}return!(i<0||(this.destroyBetween(this.index,i),this.index++,0))}updateNodeAt(e,t,n,r,o){let i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,o){for(let i=this.index;i<this.top.children.length;i++){let a=this.top.children[i];if(a instanceof li){let s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;let l=a.dom;if((!this.lock||!(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))||e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&ki(t,a.outerDeco))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}addNode(e,t,n,r,o){this.top.children.splice(this.index++,0,li.create(this.top,e,t,n,r,o)),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new ii(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof si;)t=e,e=t.children[t.children.length-1];e&&e instanceof ui&&!/\n$/.test(e.node.text)||((ko||yo)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new di(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}function xi(e,t){return e.type.side-t.type.side}function Oi(e,t,n,r,o){let i=[];for(let a=0,s=0;a<e.length;a++){let l=e[a],c=s,u=s+=l.size;c>=n||u<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function Si(e,t=null){let n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let s,l,c=r.resolve(a);if(Ao(n)){for(s=c;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&et.isSelectable(e)&&o.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,o=t==Po(e);r||o;){if(e==n)return!0;let t=Eo(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==Po(e)}}(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;l=new et(a==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;s=r.resolve(t)}return l||(l=_i(e,s,c,"pointer"==t||e.state.selection.head<c.pos&&!i?1:-1)),l}function Ei(e){return e.editable?e.hasFocus():ji(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Ii(e,t=!1){let n=e.state.selection;if(Ri(e,n),Ei(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&yo){let t=e.domSelection(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&Mo(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,Eo(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&ho&&mo<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,o,{anchor:i,head:a}=n;!Ni||n instanceof Ze||(n.$from.parent.inlineContent||(r=Ti(e,n.from)),n.empty||n.$from.parent.inlineContent||(o=Ti(e,n.to))),e.docView.setSelection(i,a,e.root,t),Ni&&(r&&Di(r),o&&Di(o)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{Ei(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Ni=ko||yo&&bo<63;function Ti(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(ko&&o&&"false"==o.contentEditable)return Mi(o);if(!(o&&"false"!=o.contentEditable||i&&"false"!=i.contentEditable)){if(o)return Mi(o);if(i)return Mi(i)}}function Mi(e){return e.contentEditable="true",ko&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Di(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Ri(e,t){if(t instanceof et){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Pi(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Pi(e)}function Pi(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function _i(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||Ze.between(t,n,r)}function Ai(e){return(!e.editable||e.root.activeElement==e.dom)&&ji(e)}function ji(e){let t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function Fi(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&Ge.findFrom(i,t)}function zi(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Li(e,t,n){let r=e.state.selection;if(!(r instanceof Ze)){if(r instanceof et&&r.node.isInline)return zi(e,new Ze(t>0?r.$to:r.$from));{let n=Fi(e.state,t);return!!n&&zi(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=Fi(e.state,t);return!!(n&&n instanceof et)&&zi(e,n)}if(!(Co&&n.indexOf("m")>-1)){let n,o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText)return!1;let a=t<0?o.pos-i.nodeSize:o.pos;return!!(i.isAtom||(n=e.docView.descAt(a))&&!n.contentDOM)&&(et.isSelectable(i)?zi(e,new et(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):!!Oo&&zi(e,new Ze(e.state.doc.resolve(t<0?a:a+i.nodeSize))))}}function Bi(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Vi(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Hi(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=!1;for(go&&1==n.nodeType&&r<Bi(n)&&Vi(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(Vi(e))o=n,i=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(Wi(n))break;{let t=n.previousSibling;for(;t&&Vi(t);)o=n.parentNode,i=Eo(t),t=t.previousSibling;if(t)n=t,r=Bi(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?$i(e,t,n,r):o&&$i(e,t,o,i)}function Ki(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=Bi(n);for(;;)if(r<a){if(1!=n.nodeType)break;if(!Vi(n.childNodes[r]))break;o=n,i=++r}else{if(Wi(n))break;{let t=n.nextSibling;for(;t&&Vi(t);)o=t.parentNode,i=Eo(t)+1,t=t.nextSibling;if(t)n=t,r=0,a=Bi(n);else{if(n=n.parentNode,n==e.dom)break;r=a=0}}}o&&$i(e,t,o,i)}function Wi(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function $i(e,t,n,r){if(Ao(t)){let e=document.createRange();e.setEnd(n,r),e.setStart(n,r),t.removeAllRanges(),t.addRange(e)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();let{state:o}=e;setTimeout((()=>{e.state==o&&Ii(e)}),50)}function qi(e,t,n){let r=e.state.selection;if(r instanceof Ze&&!r.empty||n.indexOf("s")>-1)return!1;if(Co&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=Fi(e.state,t);if(n&&n instanceof et)return zi(e,n)}if(!o.parent.inlineContent){let n=t<0?o:i,a=r instanceof nt?Ge.near(n,t):Ge.findFrom(n,t);return!!a&&zi(e,a)}return!1}function Ui(e,t){if(!(e.state.selection instanceof Ze))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let r=e.state.tr;return t<0?r.delete(n.pos-i.nodeSize,n.pos):r.delete(n.pos,n.pos+i.nodeSize),e.dispatch(r),!0}return!1}function Gi(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Yi(e,t){let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let a=e.someProp("clipboardSerializer")||se.fromSchema(e.state.schema),s=ia(),l=s.createElement("div");l.appendChild(a.serializeFragment(r,{document:s}));let c,u=l.firstChild,d=0;for(;u&&1==u.nodeType&&(c=ra[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=s.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),d++}u=l.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:l,text:e.someProp("clipboardTextSerializer",(e=>e(t)))||t.content.textBetween(0,t.content.size,"\n\n")}}function Xi(e,t,n,r,o){let i,a,l=o.parent.type.spec.code;if(!n&&!t)return null;let c=t&&(r||l||!n);if(c){if(e.someProp("transformPastedText",(e=>{t=e(t,l||r)})),l)return t?new f(s.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):f.empty;let n=e.someProp("clipboardTextParser",(e=>e(t,o,r)));if(n)a=n;else{let n=o.marks(),{schema:r}=e.state,a=se.fromSchema(r);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=i.appendChild(document.createElement("p"));e&&t.appendChild(a.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(e=>{n=e(n)})),i=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=ia().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);if((n=o&&ra[o[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join("")),r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),Oo&&function(e){let t=e.querySelectorAll(yo?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);let u=i&&i.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let e=+d[3];e>0&&i.firstChild;e--)i=i.firstChild;if(!a){let t=e.someProp("clipboardParser")||e.someProp("domParser")||J.fromSchema(e.state.schema);a=t.parseSlice(i,{preserveWhitespace:!(!c&&!d),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Ji.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(d)a=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:o,openStart:i,openEnd:a}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;o=s.from(t.create(n[e+1],o)),i++,a++}return new f(o,i,a)}(na(a,+d[1],+d[2]),d[4]);else if(a=f.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,o=t.node(n).contentMatchAt(t.index(n)),i=[];if(e.forEach((e=>{if(!i)return;let t,n=o.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&r.length&&Qi(n,r,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=ea(i[i.length-1],r.length));let t=Zi(e,n);i.push(t),o=o.matchType(t.type),r=n}})),i)return s.from(i)}return e}(a.content,o),!0),a.openStart||a.openEnd){let e=0,t=0;for(let t=a.content.firstChild;e<a.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=a.content.lastChild;t<a.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);a=na(a,e,t)}return e.someProp("transformPasted",(e=>{a=e(a)})),a}const Ji=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Zi(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,s.from(e));return e}function Qi(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let i=Qi(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(s.from(Zi(n,e,o+1))))}}function ea(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,ea(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(s.empty,!0);return e.copy(n.append(r))}function ta(e,t,n,r,o,i){let a=t<0?e.firstChild:e.lastChild,l=a.content;return o<r-1&&(l=ta(l,t,n,r,o+1,i)),o>=n&&(l=t<0?a.contentMatchAt(0).fillBefore(l,e.childCount>1||i<=o).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(s.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(l))}function na(e,t,n){return t<e.openStart&&(e=new f(ta(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new f(ta(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const ra={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let oa=null;function ia(){return oa||(oa=document.implementation.createHTMLDocument("title"))}const aa={};let sa={};class la{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function ca(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function ua(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>da(e,t))}))}function da(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function pa(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function fa(e){return{left:e.clientX,top:e.clientY}}function ha(e,t,n,r,o){if(-1==r)return!1;let i=e.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(e.someProp(t,(t=>r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1))))return!0;return!1}function ma(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function ga(e,t,n,r){return ha(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function va(e,t,n,r){return ha(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(ma(e,Ze.create(r,0,r.content.size),"pointer"),!0);let o=r.resolve(t);for(let t=o.depth+1;t>0;t--){let n=t>o.depth?o.nodeAfter:o.node(t),i=o.before(t);if(n.inlineContent)ma(e,Ze.create(r,i+1,i+1+n.content.size),"pointer");else{if(!et.isSelectable(n))continue;ma(e,et.create(r,i),"pointer")}return!0}}(e,n,r)}function ya(e){return Sa(e)}sa.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!wa(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!xo||!yo||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!wo||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||function(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||Co&&72==n&&"c"==r?Ui(e,-1)||Hi(e):46==n||Co&&68==n&&"c"==r?Ui(e,1)||Ki(e):13==n||27==n||(37==n||Co&&66==n&&"c"==r?Li(e,-1,r)||Hi(e):39==n||Co&&70==n&&"c"==r?Li(e,1,r)||Ki(e):38==n||Co&&80==n&&"c"==r?qi(e,-1,r)||Hi(e):40==n||Co&&78==n&&"c"==r?function(e){if(!ko||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelection();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Gi(e,n,"true"),setTimeout((()=>Gi(e,n,"false")),20)}return!1}(e)||qi(e,1,r)||Ki(e):r==(Co?"m":"c")&&(66==n||73==n||89==n||90==n))}(e,n)?n.preventDefault():ca(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,jo(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},sa.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},sa.keypress=(e,t)=>{let n=t;if(wa(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Co&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof Ze&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const ba=Co?"metaKey":"ctrlKey";aa.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=ya(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[ba]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let a=e.posAtCoords(fa(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new ka(e,a,n,!!r)):("doubleClick"==i?ga:va)(e,a.pos,a.inside,n)?n.preventDefault():ca(e,"pointer"))};class ka{constructor(e,t,n,r){let o,i;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[ba],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),i=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,i=n.depth?n.before():0}const a=r?null:n.target,s=a?e.docView.nearestDesc(a,!0):null;this.target=s?s.dom:null;let{selection:l}=e.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||l instanceof et&&l.from<=i&&l.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!go||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ca(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Ii(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(fa(e))),this.allowDefault||!t?ca(this.view,"pointer"):function(e,t,n,r,o){return ha(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(o?function(e,t){if(-1==t)return!1;let n,r,o=e.state.selection;o instanceof et&&(n=o.node);let i=e.state.doc.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e);if(et.isSelectable(t)){r=n&&o.$from.depth>0&&e>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(e);break}}return null!=r&&(ma(e,et.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&et.isSelectable(r))&&(ma(e,new et(n),"pointer"),!0)}(e,n))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||ko&&this.mightDrag&&!this.mightDrag.node.isAtom||yo&&!(this.view.state.selection instanceof Ze)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(ma(this.view,Ge.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):ca(this.view,"pointer")}move(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),ca(this.view,"pointer"),0==e.buttons&&this.done()}}function wa(e,t){return!!e.composing||!!(ko&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}aa.touchdown=e=>{ya(e),ca(e,"pointer")},aa.contextmenu=e=>ya(e);const Ca=xo?5e3:-1;function xa(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>Sa(e)),t))}function Oa(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Sa(e,t=!1){if(!(xo&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Oa(e),t||e.docView&&e.docView.dirty){let t=Si(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}sa.compositionstart=sa.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),Sa(e,!0),e.markCursor=null;else if(Sa(e),go&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelection();for(let e=t.focusNode,n=t.focusOffset;e&&1==e.nodeType&&0!=n;){let r=n<0?e.lastChild:e.childNodes[n-1];if(!r)break;if(3==r.nodeType){t.collapse(r,r.nodeValue.length);break}e=r,n=-1}}e.input.composing=!0}xa(e,Ca)},sa.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,xa(e,20))};const Ea=ho&&mo<15||wo&&So<604;function Ia(e,t,n,r){let o=Xi(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,o||f.empty))))return!0;if(!o)return!1;let i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}aa.copy=sa.cut=(e,t)=>{let n=t,r=e.state.selection,o="cut"==n.type;if(r.empty)return;let i=Ea?null:n.clipboardData,a=r.content(),{dom:s,text:l}=Yi(e,a);i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},sa.paste=(e,t)=>{let n=t;if(e.composing&&!xo)return;let r=Ea?null:n.clipboardData;r&&Ia(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Ia(e,r.value,null,t):Ia(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class Na{constructor(e,t){this.slice=e,this.move=t}}const Ta=Co?"altKey":"ctrlKey";aa.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(fa(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof et?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(et.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(et.create(e.state.doc,t.posBefore)))}let a=e.state.selection.content(),{dom:s,text:l}=Yi(e,a);n.dataTransfer.clearData(),n.dataTransfer.setData(Ea?"Text":"text/html",s.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ea||n.dataTransfer.setData("text/plain",l),e.dragging=new Na(a,!n[Ta])},aa.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},sa.dragover=sa.dragenter=(e,t)=>t.preventDefault(),sa.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(fa(n));if(!o)return;let i=e.state.doc.resolve(o.pos);if(!i)return;let a=r&&r.slice;a?e.someProp("transformPasted",(e=>{a=e(a)})):a=Xi(e,n.dataTransfer.getData(Ea?"Text":"text/plain"),Ea?null:n.dataTransfer.getData("text/html"),!1,i);let s=!(!r||n[Ta]);if(e.someProp("handleDrop",(t=>t(e,n,a||f.empty,s))))return void n.preventDefault();if(!a)return;n.preventDefault();let l=a?Pe(e.state.doc,i.pos,a):i.pos;null==l&&(l=i.pos);let c=e.state.tr;s&&c.deleteSelection();let u=c.mapping.map(l),d=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,p=c.doc;if(d?c.replaceRangeWith(u,u,a.content.firstChild):c.replaceRange(u,u,a),c.doc.eq(p))return;let h=c.doc.resolve(u);if(d&&et.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new et(h));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,o)=>t=o)),c.setSelection(_i(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},aa.focus=e=>{e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&Ii(e)}),20))},aa.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},aa.beforeinput=(e,t)=>{if(yo&&xo&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,jo(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in sa)aa[e]=sa[e];function Ma(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Da{constructor(e,t){this.toDOM=e,this.spec=t||ja,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:i}=e.mapResult(t.from+r,this.side<0?-1:1);return i?null:new _a(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Da&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ma(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Ra{constructor(e,t){this.attrs=e,this.spec=t||ja}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new _a(o,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Ra&&Ma(this.attrs,e.attrs)&&Ma(this.spec,e.spec)}static is(e){return e.type instanceof Ra}destroy(){}}class Pa{constructor(e,t){this.attrs=e,this.spec=t||ja}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new _a(o.pos-n,i.pos-n,this)}valid(e,t){let n,{index:r,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(n=e.child(r)).isText&&o+n.nodeSize==t.to}eq(e){return this==e||e instanceof Pa&&Ma(this.attrs,e.attrs)&&Ma(this.spec,e.spec)}destroy(){}}class _a{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new _a(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new _a(e,e,new Da(t,n))}static inline(e,t,n,r){return new _a(e,t,new Ra(n,r))}static node(e,t,n,r){return new _a(e,t,new Pa(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Ra}}const Aa=[],ja={};class Fa{constructor(e,t){this.local=e.length?e:Aa,this.children=t.length?t:Aa}static create(e,t){return t.length?Ka(t,e,0,ja):za}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,o){for(let i=0;i<this.local.length;i++){let a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let a=this.children[i]+1;this.children[i+2].findInner(e-a,t-a,n,r+a,o)}}map(e,t,n){return this==za||0==e.maps.length?this:this.mapInner(e,t,0,0,n||ja)}mapInner(e,t,n,r,o){let i;for(let a=0;a<this.local.length;a++){let s=this.local[a].map(e,n,r);s&&s.type.valid(t,s)?(i||(i=[])).push(s):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(e,t,n,r,o,i,a){let s=e.slice(),l=(e,t,n,r)=>{for(let a=0;a<s.length;a+=3){let l,c=s[a+1];if(c<0||e>c+i)continue;let u=s[a]+i;t>=u?s[a+1]=e<=u?-2:-1:n>=o&&(l=r-n-(t-e))&&(s[a]+=l,s[a+1]+=l)}};for(let e=0;e<n.maps.length;e++)n.maps[e].forEach(l);let c=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(-2==s[t+1]){c=!0,s[t+1]=-1;continue}let l=n.map(e[t]+i),u=l-o;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+i,-1)-o,{index:p,offset:f}=r.content.findIndex(u),h=r.maybeChild(p);if(h&&f==u&&f+h.nodeSize==d){let r=s[t+2].mapInner(n,h,l+1,e[t]+i+1,a);r!=za?(s[t]=u,s[t+1]=d,s[t+2]=r):(s[t+1]=-2,c=!0)}else c=!0}if(c){let l=function(e,t,n,r,o,i,a){function s(e,t){for(let i=0;i<e.local.length;i++){let s=e.local[i].map(r,o,t);s?n.push(s):a.onRemove&&a.onRemove(e.local[i].spec)}for(let n=0;n<e.children.length;n+=3)s(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&s(e[n+2],t[n]+i+1);return n}(s,e,t,n,o,i,a),c=Ka(l,r,0,a);t=c.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new Fa(t.sort(Wa),s)}(this.children,i||[],e,t,n,r,o):i?new Fa(i.sort(Wa),Aa):za}add(e,t){return t.length?this==za?Fa.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,o=0;e.forEach(((e,i)=>{let a,s=i+n;if(a=Va(t,e,s)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(e,a,s+1):r.splice(o,0,i,i+e.nodeSize,Ka(a,e,s+1,ja)),o+=3}}));let i=Ba(o?Ha(t):t,-n);for(let t=0;t<i.length;t++)i[t].type.valid(e,i[t])||i.splice(t--,1);return new Fa(i.length?this.local.concat(i).sort(Wa):this.local,r||this.children)}remove(e){return 0==e.length||this==za?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let o,i=n[r]+t,a=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>i&&t.to<a&&(e[n]=null,(o||(o=[])).push(t));if(!o)continue;n==this.children&&(n=this.children.slice());let s=n[r+2].removeInner(o,i+1);s!=za?n[r+2]=s:(n.splice(r,3),r-=3)}if(r.length)for(let n,o=0;o<e.length;o++)if(n=e[o])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Fa(r,n):za}forChild(e,t){if(this==za)return this;if(t.isLeaf)return Fa.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let o=e+1,i=o+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<i&&t.to>o&&t.type instanceof Ra){let e=Math.max(o,t.from)-o,n=Math.min(i,t.to)-o;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new Fa(r.sort(Wa),Aa);return n?new La([e,n]):e}return n||za}eq(e){if(this==e)return!0;if(!(e instanceof Fa)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return $a(this.localsInner(e))}localsInner(e){if(this==za)return Aa;if(e.inlineContent||!this.local.some(Ra.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Ra||t.push(this.local[e]);return t}}Fa.empty=new Fa([],[]),Fa.removeOverlap=$a;const za=Fa.empty;class La{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,ja)));return La.from(n)}forChild(e,t){if(t.isLeaf)return Fa.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,t);o!=za&&(o instanceof La?n=n.concat(o.members):n.push(o))}return La.from(n)}eq(e){if(!(e instanceof La)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?$a(n?t:t.sort(Wa)):Aa}static from(e){switch(e.length){case 0:return za;case 1:return e[0];default:return new La(e)}}}function Ba(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new _a(o.from+t,o.to+t,o.type))}return n}function Va(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let t,i=0;i<e.length;i++)(t=e[i])&&t.from>n&&t.to<r&&((o||(o=[])).push(t),e[i]=null);return o}function Ha(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Ka(e,t,n,r){let o=[],i=!1;t.forEach(((t,a)=>{let s=Va(e,t,a+n);if(s){i=!0;let e=Ka(s,t,n+a+1,r);e!=za&&o.push(a,a+t.nodeSize,e)}}));let a=Ba(i?Ha(e):e,-n).sort(Wa);for(let e=0;e<a.length;e++)a[e].type.valid(t,a[e])||(r.onRemove&&r.onRemove(a[e].spec),a.splice(e--,1));return a.length||o.length?new Fa(a,o):za}function Wa(e,t){return e.from-t.from||e.to-t.to}function $a(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),qa(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),qa(t,o+1,i.copy(r.to,i.to)))}}return t}function qa(e,t,n){for(;t<e.length&&Wa(n,e[t])>0;)t++;e.splice(t,0,n)}function Ua(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=za&&t.push(r)})),e.cursorWrapper&&t.push(Fa.create(e.state.doc,[e.cursorWrapper.deco])),La.from(t)}const Ga={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ya=ho&&mo<=11;class Xa{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Ja{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Xa,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);ho&&mo<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Ya&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Ga)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Ai(this.view)){if(this.suppressingSelectionUpdates)return Ii(this.view);if(ho&&mo<=11&&!this.view.state.selection.empty){let e=this.view.domSelection();if(e.focusNode&&Mo(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelection())}ignoreSelectionChange(e){if(0==e.rangeCount)return!0;let t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){if(!this.view.docView||this.flushingSoon>-1)return;let e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);let t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Ai(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(let t=0;t<e.length;t++){let n=this.registerMutation(e[t],a);n&&(r=r<0?n.from:Math.min(n.from,r),o=o<0?n.to:Math.max(n.to,o),n.typeOver&&(i=!0))}if(go&&a.length>1){let e=a.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}var s;(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),s=this.view,Za||(Za=!0,"normal"==getComputedStyle(s.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."))),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Ii(this.view),this.currentSelection.set(t))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++)t.push(e.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,o=e.nextSibling;if(ho&&mo<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:i}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!i||Array.prototype.indexOf.call(e.addedNodes,i)<0)&&(o=i)}let i=r&&r.parentNode==e.target?Eo(r)+1:0,a=n.localPosFromDOM(e.target,i,-1),s=o&&o.parentNode==e.target?Eo(o):e.target.childNodes.length;return{from:a,to:n.localPosFromDOM(e.target,s,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let Za=!1;function Qa(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(ko&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||ko&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function es(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:_i(e,t.resolve(n.anchor),t.resolve(n.head))}function ts(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,o++}return o}const ns=Yi,rs=Xi,is=Sa;class as{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new la,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(ds),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=cs(this),ls(this),this.nodeViews=us(this),this.docView=ci(this.state.doc,ss(this),Ua(this),this.dom,this),this.domObserver=new Ja(this,((e,t,n,r)=>function(e,t,n,r,o){if(t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Si(e,t);if(n&&!e.state.selection.eq(n)){let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.dispatch(r)}return}let i=e.state.doc.resolve(t),a=i.sharedDepth(n);t=i.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l=e.state.selection,c=function(e,t,n){let r,{node:o,fromOffset:i,toOffset:a,from:s,to:l}=e.docView.parseRange(t,n),c=e.domSelection(),u=c.anchorNode;if(u&&e.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:c.anchorOffset}],Ao(c)||r.push({node:c.focusNode,offset:c.focusOffset})),yo&&8===e.input.lastKeyCode)for(let e=a;e>i;e--){let t=o.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){a=e;break}if(!n||n.size)break}let d=e.state.doc,p=e.someProp("domParser")||J.fromSchema(e.state.schema),f=d.resolve(s),h=null,m=p.parse(o,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:i,to:a,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:r,ruleFromNode:Qa,context:f});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),h={anchor:e+s,head:t+s}}return{doc:m,sel:h,from:s,to:l}}(e,t,n);if(yo&&e.cursorWrapper&&c.sel&&c.sel.anchor==e.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let t=e.cursorWrapper.deco.type.toDOM.nextSibling,n=t&&t.nodeValue?t.nodeValue.length:1;c.sel={anchor:c.sel.anchor+n,head:c.sel.anchor+n}}let u,d,p=e.state.doc,f=p.slice(c.from,c.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(u=e.state.selection.to,d="end"):(u=e.state.selection.from,d="start"),e.input.lastKeyCode=null;let h=function(e,t,n,r,o){let i=e.findDiffStart(t,n);if(null==i)return null;let{a,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);return"end"==o&&(r-=a+Math.max(0,i-Math.min(a,s))-i),a<i&&e.size<t.size?(i-=r<=i&&r>=a?i-r:0,s=i+(s-a),a=i):s<i&&(i-=r<=i&&r>=s?i-r:0,a=i+(a-s),s=i),{start:i,endA:a,endB:s}}(f.content,c.doc.content,c.from,u,d);if((wo&&e.input.lastIOSEnter>Date.now()-225||xo)&&o.some((e=>"DIV"==e.nodeName||"P"==e.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",(t=>t(e,jo(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!h){if(!(r&&l instanceof Ze&&!l.empty&&l.$head.sameParent(l.$anchor))||e.composing||c.sel&&c.sel.anchor!=c.sel.head){if(c.sel){let t=es(e,e.state.doc,c.sel);t&&!t.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(t))}return}h={start:l.from,endA:l.to,endB:l.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof Ze&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=c.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),ho&&mo<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>c.from&&"  "==c.doc.textBetween(h.start-c.from-1,h.start-c.from+1)&&(h.start--,h.endA--,h.endB--);let m,g=c.doc.resolveNoCache(h.start-c.from),v=c.doc.resolveNoCache(h.endB-c.from),y=p.resolve(h.start),b=g.sameParent(v)&&g.parent.inlineContent&&y.end()>=h.endA;if((wo&&e.input.lastIOSEnter>Date.now()-225&&(!b||o.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!b&&g.pos<c.doc.content.size&&(m=Ge.findFrom(c.doc.resolve(g.pos+1),1,!0))&&m.head==v.pos)&&e.someProp("handleKeyDown",(t=>t(e,jo(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>h.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||ts(r,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=e.resolve(ts(i,!0,!0));return!(!a.parent.isTextblock||a.pos>n||ts(a,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(p,h.start,h.endA,g,v)&&e.someProp("handleKeyDown",(t=>t(e,jo(8,"Backspace")))))return void(xo&&yo&&e.domObserver.suppressSelectionUpdates());yo&&xo&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),xo&&!b&&g.start()!=v.start()&&0==v.parentOffset&&g.depth==v.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==h.endA&&(h.endB-=2,v=c.doc.resolveNoCache(h.endB-c.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,jo(13,"Enter"))}))}),20));let k,w,C,x=h.start,O=h.endA;if(b)if(g.pos==v.pos)ho&&mo<=11&&0==g.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Ii(e)),20)),k=e.state.tr.delete(x,O),w=p.resolve(h.start).marksAcross(p.resolve(h.endA));else if(h.endA==h.endB&&(C=function(e,t){let n,r,o,i=e.firstChild.marks,a=t.firstChild.marks,l=i,c=a;for(let e=0;e<a.length;e++)l=a[e].removeFromSet(l);for(let e=0;e<i.length;e++)c=i[e].removeFromSet(c);if(1==l.length&&0==c.length)r=l[0],n="add",o=e=>e.mark(r.addToSet(e.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",o=e=>e.mark(r.removeFromSet(e.marks))}let u=[];for(let e=0;e<t.childCount;e++)u.push(o(t.child(e)));if(s.from(u).eq(e))return{mark:r,type:n}}(g.parent.content.cut(g.parentOffset,v.parentOffset),y.parent.content.cut(y.parentOffset,h.endA-y.start()))))k=e.state.tr,"add"==C.type?k.addMark(x,O,C.mark):k.removeMark(x,O,C.mark);else if(g.parent.child(g.index()).isText&&g.index()==v.index()-(v.textOffset?0:1)){let t=g.parent.textBetween(g.parentOffset,v.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,x,O,t))))return;k=e.state.tr.insertText(t,x,O)}if(k||(k=e.state.tr.replace(x,O,c.doc.slice(h.start-c.from,h.endB-c.from))),c.sel){let t=es(e,k.doc,c.sel);t&&!(yo&&xo&&e.composing&&t.empty&&(h.start!=h.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==x||t.head==k.mapping.map(O)-1)||ho&&t.empty&&t.head==x)&&k.setSelection(t)}w&&k.ensureMarks(w),e.dispatch(k.scrollIntoView())}(this,e,t,n,r))),this.domObserver.start(),function(e){for(let t in aa){let n=aa[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!pa(e,t)||da(e,t)||!e.editable&&t.type in sa||n(e,t)})}ko&&e.dom.addEventListener("input",(()=>null)),ua(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&ua(this),this._props=e,e.plugins&&(e.plugins.forEach(ds),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}updateStateInner(e,t){let n=this.state,r=!1,o=!1;if(e.storedMarks&&this.composing&&(Oa(this),o=!0),this.state=e,t){let e=us(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,r=!0),ua(this)}this.editable=cs(this),ls(this);let i=Ua(this),a=ss(this),s=t?"reset":e.scrollToSelection>n.scrollToSelection?"to selection":"preserve",l=r||!this.docView.matchesNode(e.doc,a,i);!l&&e.selection.eq(n.selection)||(o=!0);let c="preserve"==s&&o&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){let r=e.root.elementFromPoint(i,a);if(!r||r==e.dom||!e.dom.contains(r))continue;let s=r.getBoundingClientRect();if(s.top>=o-20){t=r,n=s.top;break}}return{refDOM:t,refTop:n,stack:Vo(e.dom)}}(this);if(o){this.domObserver.stop();let t=l&&(ho||yo)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(n.selection,e.selection);if(l){let n=yo?this.trackWrites=this.domSelection().focusNode:null;!r&&this.docView.update(e.doc,a,i,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ci(e.doc,a,i,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return Mo(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Ii(this,t):(Ri(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(n),"reset"==s)this.dom.scrollTop=0;else if("to selection"==s){let t=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(e.selection instanceof et){let n=this.docView.domAfterPos(e.selection.from);1==n.nodeType&&Bo(this,n.getBoundingClientRect(),t)}else Bo(this,this.coordsAtPos(e.selection.head,1),t)}else c&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;Ho(n,0==r?0:r-t)}(c)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let o=this.directPlugins[r].props[e];if(null!=o&&(n=t?t(o):o))return n}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let i=o[r].props[e];if(null!=i&&(n=t?t(i):i))return n}}hasFocus(){return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(Ko)return e.focus(Ko);let t=Vo(e);e.focus(null==Ko?{get preventScroll(){return Ko={preventScroll:!0},!0}}:void 0),Ko||(Ko=!1,Ho(t,0))}(this.dom),Ii(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return e||document}posAtCoords(e){return Uo(this,e)}coordsAtPos(e,t=1){return Xo(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function(e,t,n){return ti==t&&ni==n?ri:(ti=t,ni=n,ri="up"==n||"down"==n?function(e,t,n){let r=t.selection,o="up"==n?r.$from:r.$to;return Qo(e,t,(()=>{let{node:t}=e.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.dom;break}t=n.dom.parentNode}let r=Xo(e,o.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=To(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let o=t[e];if(o.bottom>o.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return ei.test(r.parent.textContent)&&s.modify?Qo(e,t,(()=>{let t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");let l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),l})):"left"==n||"backward"==n?i:a}(e,t,n))}(this,t||this.state,e)}destroy(){this.docView&&(function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ua(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){da(e,t)||!aa[t.type]||!e.editable&&t.type in sa||aa[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelection(){return this.root.getSelection()}}function ss(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e&&(t.class+=" "+n[e]),"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),[_a.node(0,e.state.doc.content.size,t)]}function ls(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:_a.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function cs(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function us(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function ds(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}let ps,fs;if("undefined"!=typeof WeakMap){let e=new WeakMap;ps=t=>e.get(t),fs=(t,n)=>(e.set(t,n),n)}else{let e=[],t=10,n=0;ps=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},fs=(r,o)=>(n==t&&(n=0),e[n++]=r,e[n++]=o)}class hs{constructor(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r}}class ms{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,o=t/this.width|0,i=r+1,a=o+1;for(let e=1;i<this.width&&this.map[t+e]==n;e++)i++;for(let e=1;a<this.height&&this.map[t+this.width*e]==n;e++)a++;return new hs(r,o,i,a)}throw new RangeError("No cell with offset "+e+" found")}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError("No cell with offset "+e+" found")}nextCell(e,t,n){let{left:r,right:o,top:i,bottom:a}=this.findCell(e);return"horiz"==t?(n<0?0==r:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?0==i:a==this.height)?null:this.map[r+this.width*(n<0?i-1:a)]}rectBetween(e,t){let{left:n,right:r,top:o,bottom:i}=this.findCell(e),{left:a,right:s,top:l,bottom:c}=this.findCell(t);return new hs(Math.min(n,a),Math.min(o,l),Math.max(r,s),Math.max(i,c))}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){let i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,o==e.left&&o&&this.map[i-1]==a||r==e.top&&r&&this.map[i-this.width]==a||t.push(a))}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){let i=o+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<o;)n++;return n==r?i-1:this.map[n]}o=i}}static get(e){return ps(e)||fs(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);let t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let o=e.child(r),i=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let o=n.child(e);t+o.attrs.rowspan>r&&(i+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){let t=o.child(e);i+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,a=[];for(let e=0,o=t*n;e<o;e++)r[e]=0;for(let s=0,l=0;s<n;s++){let c=e.child(s);l++;for(let e=0;;e++){for(;o<r.length&&0!=r[o];)o++;if(e==c.childCount)break;let u=c.child(e),{colspan:d,rowspan:p,colwidth:f}=u.attrs;for(let e=0;e<p;e++){if(e+s>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:l,n:p-e});break}let c=o+e*t;for(let e=0;e<d;e++){0==r[c+e]?r[c+e]=l:(i||(i=[])).push({type:"collision",row:s,pos:l,n:d-e});let n=f&&f[e];if(n){let r=(c+e)%t*2,o=a[r];null==o||o!=n&&1==a[r+1]?(a[r]=n,a[r+1]=1):o==n&&a[r+1]++}}}o+=d,l+=u.nodeSize}let u=(s+1)*t,d=0;for(;o<u;)0==r[o++]&&d++;d&&(i||(i=[])).push({type:"missing",row:s,n:d}),l++}let s=new ms(t,n,r,i),l=!1;for(let e=0;!l&&e<a.length;e+=2)null!=a[e]&&a[e+1]<n&&(l=!0);return l&&function(e,t,n){e.problems||(e.problems=[]);for(let r=0,o={};r<e.map.length;r++){let i=e.map[r];if(o[i])continue;o[i]=!0;let a=n.nodeAt(i),s=null;for(let n=0;n<a.attrs.colspan;n++){let o=t[(r+n)%e.width*2];null==o||a.attrs.colwidth&&a.attrs.colwidth[n]==o||((s||(s=gs(a.attrs)))[n]=o)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}(s,a,e),s}(e))}}function gs(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function vs(e,t){let n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((e=>Number(e))):null,o=Number(e.getAttribute("colspan")||1),i={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==o?r:null};for(let n in t){let r=t[n].getFromDOM,o=r&&r(e);null!=o&&(i[n]=o)}return i}function ys(e,t){let n={};1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(let r in t){let o=t[r].setDOMAttr;o&&o(e.attrs[r],n)}return n}function bs(e){let t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(let e in t)n[e]={default:t[e].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:()=>["table",["tbody",0]]},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:()=>["tr",0]},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:e=>vs(e,t)}],toDOM:e=>["td",ys(e,t),0]},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:e=>vs(e,t)}],toDOM:e=>["th",ys(e,t),0]}}}function ks(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}}return t}const ws=new gt("selectingCells");function Cs(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function xs(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function Os(e){let t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:Cs(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}(t.$head)}function Ss(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function Es(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Is(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Ns(e){return ms.get(e.node(-1)).findCell(e.pos-e.start(-1))}function Ts(e){return ms.get(e.node(-1)).colCount(e.pos-e.start(-1))}function Ms(e,t,n){let r=e.start(-1),o=ms.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function Ds(e,t,n){let r={};for(let t in e)r[t]=e[t];return r[t]=n,r}function Rs(e,t,n=1){let r=Ds(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((e=>e>0))||(r.colwidth=null)),r}function Ps(e,t,n=1){let r=Ds(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}function _s(e,t,n){let r=ks(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0}class As extends Ge{constructor(e,t=e){let n=e.node(-1),r=ms.get(n),o=e.start(-1),i=r.rectBetween(e.pos-o,t.pos-o),a=e.node(0),s=r.cellsInRect(i).filter((e=>e!=t.pos-o));s.unshift(t.pos-o);let l=s.map((e=>{let t=n.nodeAt(e),r=e+o+1;return new Ye(a.resolve(r),a.resolve(r+t.content.size))}));super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(e,t){let n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(Ss(n)&&Ss(r)&&Is(n,r)){let e=this.$anchorCell.node(-1)!=n.node(-1);return e&&this.isRowSelection()?As.rowSelection(n,r):e&&this.isColSelection()?As.colSelection(n,r):new As(n,r)}return Ze.between(n,r)}content(){let e=this.$anchorCell.node(-1),t=ms.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[];for(let n=r.top;n<r.bottom;n++){let a=[];for(let i=n*t.width+r.left,s=r.left;s<r.right;s++,i++){let n=t.map[i];if(!o[n]){o[n]=!0;let i=t.findCell(n),s=e.nodeAt(n),l=r.left-i.left,c=i.right-r.right;if(l>0||c>0){let e=s.attrs;l>0&&(e=Rs(e,0,l)),c>0&&(e=Rs(e,e.colspan-c,c)),s=i.left<r.left?s.type.createAndFill(e):s.type.create(e,s.content)}if(i.top<r.top||i.bottom>r.bottom){let e=Ds(s.attrs,"rowspan",Math.min(i.bottom,r.bottom)-Math.max(i.top,r.top));s=i.top<r.top?s.type.createAndFill(e):s.type.create(e,s.content)}a.push(s)}}i.push(e.child(n).copy(s.from(a)))}const a=this.isColSelection()&&this.isRowSelection()?e:i;return new f(s.from(a),1,1)}replace(e,t=f.empty){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:a}=r[o],s=e.mapping.slice(n);e.replace(s.map(i.pos),s.map(a.pos),o?f.empty:t)}let o=Ge.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new f(s.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=ms.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<o.length;n++)e(t.nodeAt(o[n]),r+o[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){let n=ms.get(e.node(-1)),r=e.start(-1),o=n.findCell(e.pos-r),i=n.findCell(t.pos-r),a=e.node(0);return o.top<=i.top?(o.top>0&&(e=a.resolve(r+n.map[o.left])),i.bottom<n.height&&(t=a.resolve(r+n.map[n.width*(n.height-1)+i.right-1]))):(i.top>0&&(t=a.resolve(r+n.map[i.left])),o.bottom<n.height&&(e=a.resolve(r+n.map[n.width*(n.height-1)+o.right-1]))),new As(e,t)}isRowSelection(){let e=ms.get(this.$anchorCell.node(-1)),t=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-t),r=e.colCount(this.$headCell.pos-t);if(Math.min(n,r)>0)return!1;let o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width}eq(e){return e instanceof As&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){let n=ms.get(e.node(-1)),r=e.start(-1),o=n.findCell(e.pos-r),i=n.findCell(t.pos-r),a=e.node(0);return o.left<=i.left?(o.left>0&&(e=a.resolve(r+n.map[o.top*n.width])),i.right<n.width&&(t=a.resolve(r+n.map[n.width*(i.top+1)-1]))):(i.left>0&&(t=a.resolve(r+n.map[i.top*n.width])),o.right<n.width&&(e=a.resolve(r+n.map[n.width*(o.top+1)-1]))),new As(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new As(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){return new As(e.resolve(t),e.resolve(n))}getBookmark(){return new js(this.$anchorCell.pos,this.$headCell.pos)}}As.prototype.visible=!1,Ge.jsonID("cell",As);class js{constructor(e,t){this.anchor=e,this.head=t}map(e){return new js(e.map(this.anchor),e.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&Is(t,n)?new As(t,n):Ge.near(n,1)}}function Fs(e){if(!(e.selection instanceof As))return null;let t=[];return e.selection.forEachCell(((e,n)=>{t.push(_a.node(n,n+e.nodeSize,{class:"selectedCell"}))})),Fa.create(e.doc,t)}function zs(e,t){let n=e.createAndFill();return new qe(n).replace(0,n.content.size,t).doc}function Ls(e,t,n,r,o,i,a,s){if(0==a||a==t.height)return!1;let l=!1;for(let c=o;c<i;c++){let o=a*t.width+c,i=t.map[o];if(t.map[o-t.width]==i){l=!0;let o=n.nodeAt(i),{top:u,left:d}=t.findCell(i);e.setNodeMarkup(e.mapping.slice(s).map(i+r),null,Ds(o.attrs,"rowspan",a-u)),e.insert(e.mapping.slice(s).map(t.positionAt(a,d,n)),o.type.createAndFill(Ds(o.attrs,"rowspan",u+o.attrs.rowspan-a))),c+=o.attrs.colspan-1}}return l}function Bs(e,t,n,r,o,i,a,s){if(0==a||a==t.width)return!1;let l=!1;for(let c=o;c<i;c++){let o=c*t.width+a,i=t.map[o];if(t.map[o-1]==i){l=!0;let o=n.nodeAt(i),u=t.colCount(i),d=e.mapping.slice(s).map(i+r);e.setNodeMarkup(d,null,Rs(o.attrs,a-u,o.attrs.colspan-(a-u))),e.insert(d+o.nodeSize,o.type.createAndFill(Rs(o.attrs,0,a-u))),c+=o.attrs.rowspan-1}}return l}function Vs(e,t,n,r,o){let i=n?e.doc.nodeAt(n-1):e.doc,a=ms.get(i),{top:l,left:c}=r,u=c+o.width,d=l+o.height,p=e.tr,h=0;function m(){i=n?p.doc.nodeAt(n-1):p.doc,a=ms.get(i),h=p.mapping.maps.length}(function(e,t,n,r,o,i,a){let l,c,u=ks(e.doc.type.schema);if(o>t.width)for(let i=0,s=0;i<t.height;i++){let d=n.child(i);s+=d.nodeSize;let p,f=[];p=null==d.lastChild||d.lastChild.type==u.cell?l||(l=u.cell.createAndFill()):c||(c=u.header_cell.createAndFill());for(let e=t.width;e<o;e++)f.push(p);e.insert(e.mapping.slice(a).map(s-1+r),f)}if(i>t.height){let d=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,o);e++){let o=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==u.header_cell;d.push(o?c||(c=u.header_cell.createAndFill()):l||(l=u.cell.createAndFill()))}let p=u.row.create(null,s.from(d)),f=[];for(let e=t.height;e<i;e++)f.push(p);e.insert(e.mapping.slice(a).map(r+n.nodeSize-2),f)}return!(!l&&!c)})(p,a,i,n,u,d,h)&&m(),Ls(p,a,i,n,c,u,l,h)&&m(),Ls(p,a,i,n,c,u,d,h)&&m(),Bs(p,a,i,n,l,d,c,h)&&m(),Bs(p,a,i,n,l,d,u,h)&&m();for(let e=l;e<d;e++){let t=a.positionAt(e,c,i),r=a.positionAt(e,u,i);p.replace(p.mapping.slice(h).map(t+n),p.mapping.slice(h).map(r+n),new f(o.rows[e-l],0,0))}m(),p.setSelection(new As(p.doc.resolve(n+a.positionAt(l,c,i)),p.doc.resolve(n+a.positionAt(d-1,u-1,i)))),t(p)}const Hs=ao({ArrowLeft:Ws("horiz",-1),ArrowRight:Ws("horiz",1),ArrowUp:Ws("vert",-1),ArrowDown:Ws("vert",1),"Shift-ArrowLeft":$s("horiz",-1),"Shift-ArrowRight":$s("horiz",1),"Shift-ArrowUp":$s("vert",-1),"Shift-ArrowDown":$s("vert",1),Backspace:qs,"Mod-Backspace":qs,Delete:qs,"Mod-Delete":qs});function Ks(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Ws(e,t){return(n,r,o)=>{let i=n.selection;if(i instanceof As)return Ks(n,r,Ge.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;let a=Xs(o,e,t);if(null==a)return!1;if("horiz"==e)return Ks(n,r,Ge.near(n.doc.resolve(i.head+t),t));{let o,i=n.doc.resolve(a),s=Ms(i,e,t);return o=s?Ge.near(s,1):t<0?Ge.near(n.doc.resolve(i.before(-1)),-1):Ge.near(n.doc.resolve(i.after(-1)),1),Ks(n,r,o)}}}function $s(e,t){return(n,r,o)=>{let i=n.selection;if(!(i instanceof As)){let r=Xs(o,e,t);if(null==r)return!1;i=new As(n.doc.resolve(r))}let a=Ms(i.$headCell,e,t);return!!a&&Ks(n,r,new As(i.$anchorCell,a))}}function qs(e,t){let n=e.selection;if(!(n instanceof As))return!1;if(t){let r=e.tr,o=ks(e.schema).cell.createAndFill().content;n.forEachCell(((e,t)=>{e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new f(o,0,0))})),r.docChanged&&t(r)}return!0}function Us(e,t){let n=Cs(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new As(n))),!0)}function Gs(e,t,n){if(!xs(e.state))return!1;let r=function(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;let o=t.firstChild,i=o.type.spec.tableRole,a=o.type.schema,l=[];if("row"==i)for(let e=0;e<t.childCount;e++){let o=t.child(e).content,i=e?0:Math.max(0,n-1),s=e<t.childCount-1?0:Math.max(0,r-1);(i||s)&&(o=zs(ks(a).row,new f(o,i,s)).content),l.push(o)}else{if("cell"!=i&&"header_cell"!=i)return null;l.push(n||r?zs(ks(a).row,new f(t,n,r)).content:t)}return function(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:o,colspan:i}=r.child(t).attrs;for(let t=e;t<e+o;t++)n[t]=(n[t]||0)+i}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let o=0;o<n.length;o++)if(o>=t.length&&t.push(s.empty),n[o]<r){let i=ks(e).cell.createAndFill(),a=[];for(let e=n[o];e<r;e++)a.push(i);t[o]=t[o].append(s.from(a))}return{height:t.length,width:r,rows:t}}(a,l)}(n),o=e.state.selection;if(o instanceof As){r||(r={width:1,height:1,rows:[s.from(zs(ks(e.state.schema).cell,n))]});let t=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),a=ms.get(t).rectBetween(o.$anchorCell.pos-i,o.$headCell.pos-i);return r=function({width:e,height:t,rows:n},r,o){if(e!=r){let t=[],o=[];for(let e=0;e<n.length;e++){let i=n[e],a=[];for(let n=t[e]||0,o=0;n<r;o++){let s=i.child(o%i.childCount);n+s.attrs.colspan>r&&(s=s.type.create(Rs(s.attrs,s.attrs.colspan,n+s.attrs.colspan-r),s.content)),a.push(s),n+=s.attrs.colspan;for(let n=1;n<s.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+s.attrs.colspan}o.push(s.from(a))}n=o,e=r}if(t!=o){let e=[];for(let r=0,i=0;r<o;r++,i++){let a=[],l=n[i%t];for(let e=0;e<l.childCount;e++){let t=l.child(e);r+t.attrs.rowspan>o&&(t=t.type.create(Ds(t.attrs,"rowspan",Math.max(1,o-t.attrs.rowspan)),t.content)),a.push(t)}e.push(s.from(a))}n=e,t=o}return{width:e,height:t,rows:n}}(r,a.right-a.left,a.bottom-a.top),Vs(e.state,e.dispatch,i,a,r),!0}if(r){let t=Os(e.state),n=t.start(-1);return Vs(e.state,e.dispatch,n,ms.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function Ys(e,t){if(t.ctrlKey||t.metaKey)return;let n,r=Js(e,t.target);if(t.shiftKey&&e.state.selection instanceof As)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=Cs(e.state.selection.$anchor))&&Zs(e,t).pos!=n.pos)o(n,t),t.preventDefault();else if(!r)return;function o(t,n){let r=Zs(e,n),o=null==ws.getState(e.state);if(!r||!Is(t,r)){if(!o)return;r=t}let i=new As(t,r);if(o||!e.state.selection.eq(i)){let n=e.state.tr.setSelection(i);o&&n.setMeta(ws,t.pos),e.dispatch(n)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",a),null!=ws.getState(e.state)&&e.dispatch(e.state.tr.setMeta(ws,-1))}function a(n){let a,s=ws.getState(e.state);if(null!=s)a=e.state.doc.resolve(s);else if(Js(e,n.target)!=r&&(a=Zs(e,t),!a))return i();a&&o(a,n)}e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",a)}function Xs(e,t,n){if(!(e.state.selection instanceof Ze))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){let i=r.before(o),a="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?i:null}}return null}function Js(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function Zs(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Cs(e.state.doc.resolve(n.pos)):null}const Qs=new gt("fix-tables");function el(e,t,n,r){let o=e.childCount,i=t.childCount;e:for(let a=0,s=0;a<i;a++){let i=t.child(a);for(let t=s,r=Math.min(o,a+3);t<r;t++)if(e.child(t)==i){s=t+1,n+=i.nodeSize;continue e}r(i,n),s<o&&e.child(s).sameMarkup(i)?el(e.child(s),i,n+1,r):i.nodesBetween(0,i.content.size,r,n+1),n+=i.nodeSize}}function tl(e,t){let n,r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){let o=ms.get(t);if(!o.problems)return r;r||(r=e.tr);let i,a,s=[];for(let e=0;e<o.height;e++)s.push(0);for(let e=0;e<o.problems.length;e++){let i=o.problems[e];if("collision"==i.type){let e=t.nodeAt(i.pos);for(let t=0;t<e.attrs.rowspan;t++)s[i.row+t]+=i.n;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,Rs(e.attrs,e.attrs.colspan-i.n,i.n))}else if("missing"==i.type)s[i.row]+=i.n;else if("overlong_rowspan"==i.type){let e=t.nodeAt(i.pos);r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,Ds(e.attrs,"rowspan",e.attrs.rowspan-i.n))}else if("colwidth mismatch"==i.type){let e=t.nodeAt(i.pos);r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,Ds(e.attrs,"colwidth",i.colwidth))}}for(let e=0;e<s.length;e++)s[e]&&(null==i&&(i=e),a=e);for(let l=0,c=n+1;l<o.height;l++){let n=t.child(l),o=c+n.nodeSize,u=s[l];if(u>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let s=[];for(let n=0;n<u;n++)s.push(ks(e.schema)[t].createAndFill());let d=0!=l&&i!=l-1||a!=l?o-1:c+1;r.insert(r.mapping.map(d),s)}c=o}return r.setMeta(Qs,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&el(t.doc,e.doc,0,r):e.doc.descendants(r),n}function nl(e){let t,n=e.selection,r=Os(e),o=r.node(-1),i=r.start(-1),a=ms.get(o);return t=n instanceof As?a.rectBetween(n.$anchorCell.pos-i,n.$headCell.pos-i):a.findCell(r.pos-i),t.tableStart=i,t.map=a,t.table=o,t}function rl(e,{map:t,tableStart:n,table:r},o){let i=o>0?-1:0;_s(t,r,o+i)&&(i=0==o||o==t.width?null:0);for(let a=0;a<t.height;a++){let s=a*t.width+o;if(o>0&&o<t.width&&t.map[s-1]==t.map[s]){let i=t.map[s],l=r.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,Ps(l.attrs,o-t.colCount(i))),a+=l.attrs.rowspan-1}else{let l=null==i?ks(r.type.schema).cell:r.nodeAt(t.map[s+i]).type,c=t.positionAt(a,o,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function ol(e,t){if(!xs(e))return!1;if(t){let n=nl(e);t(rl(e.tr,n,n.left))}return!0}function il(e,t){if(!xs(e))return!1;if(t){let n=nl(e);t(rl(e.tr,n,n.right))}return!0}function al(e,{map:t,table:n,tableStart:r},o){let i=e.mapping.maps.length;for(let a=0;a<t.height;){let s=a*t.width+o,l=t.map[s],c=n.nodeAt(l);if(o>0&&t.map[s-1]==l||o<t.width-1&&t.map[s+1]==l)e.setNodeMarkup(e.mapping.slice(i).map(r+l),null,Rs(c.attrs,o-t.colCount(l)));else{let t=e.mapping.slice(i).map(r+l);e.delete(t,t+c.nodeSize)}a+=c.attrs.rowspan}}function sl(e,t){if(!xs(e))return!1;if(t){let n=nl(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;al(r,n,e),e!=n.left;e--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=ms.get(n.table);t(r)}return!0}function ll(e,t,n){let r=ks(t.type.schema).header_cell;for(let o=0;o<e.width;o++)if(t.nodeAt(e.map[o+n*e.width]).type!=r)return!1;return!0}function cl(e,{map:t,tableStart:n,table:r},o){let i=n;for(let e=0;e<o;e++)i+=r.child(e).nodeSize;let a=[],s=o>0?-1:0;ll(t,r,o+s)&&(s=0==o||o==t.height?null:0);for(let i=0,l=t.width*o;i<t.width;i++,l++)if(o>0&&o<t.height&&t.map[l]==t.map[l-t.width]){let o=t.map[l],a=r.nodeAt(o).attrs;e.setNodeMarkup(n+o,null,Ds(a,"rowspan",a.rowspan+1)),i+=a.colspan-1}else{let e=null==s?ks(r.type.schema).cell:r.nodeAt(t.map[l+s*t.width]).type;a.push(e.createAndFill())}return e.insert(i,ks(r.type.schema).row.create(null,a)),e}function ul(e,t){if(!xs(e))return!1;if(t){let n=nl(e);t(cl(e.tr,n,n.top))}return!0}function dl(e,t){if(!xs(e))return!1;if(t){let n=nl(e);t(cl(e.tr,n,n.bottom))}return!0}function pl(e,{map:t,table:n,tableStart:r},o){let i=0;for(let e=0;e<o;e++)i+=n.child(e).nodeSize;let a=i+n.child(o).nodeSize,s=e.mapping.maps.length;e.delete(i+r,a+r);for(let i=0,a=o*t.width;i<t.width;i++,a++){let l=t.map[a];if(o>0&&l==t.map[a-t.width]){let t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(s).map(l+r),null,Ds(t,"rowspan",t.rowspan-1)),i+=t.colspan-1}else if(o<t.width&&l==t.map[a+t.width]){let a=n.nodeAt(l),c=a.type.create(Ds(a.attrs,"rowspan",a.attrs.rowspan-1),a.content),u=t.positionAt(o+1,i,n);e.insert(e.mapping.slice(s).map(r+u),c),i+=a.attrs.colspan-1}}}function fl(e,t){if(!xs(e))return!1;if(t){let n=nl(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;pl(r,n,e),e!=n.top;e--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=ms.get(n.table);t(r)}return!0}function hl(e){let t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function ml(e,t){let n=e.selection;if(!(n instanceof As)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=nl(e),{map:o}=r;if(function({width:e,height:t,map:n},r){let o=r.top*e+r.left,i=o,a=(r.bottom-1)*e+r.left,s=o+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[i]==n[i-1]||r.right<e&&n[s]==n[s+1])return!0;i+=e,s+=e}for(let i=r.left;i<r.right;i++){if(r.top>0&&n[o]==n[o-e]||r.bottom<t&&n[a]==n[a+e])return!0;o++,a++}return!1}(o,r))return!1;if(t){let n,i,a=e.tr,l={},c=s.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let s=o.map[e*o.width+t],u=r.table.nodeAt(s);if(!l[s])if(l[s]=!0,null==n)n=s,i=u;else{hl(u)||(c=c.append(u.content));let e=a.mapping.map(s+r.tableStart);a.delete(e,e+u.nodeSize)}}if(a.setNodeMarkup(n+r.tableStart,null,Ds(Ps(i.attrs,i.attrs.colspan,r.right-r.left-i.attrs.colspan),"rowspan",r.bottom-r.top)),c.size){let e=n+1+i.content.size,t=hl(i)?n+1:e;a.replaceWith(t+r.tableStart,e+r.tableStart,c)}a.setSelection(new As(a.doc.resolve(n+r.tableStart))),t(a)}return!0}function gl(e,t){const n=ks(e.schema);return vl((({node:e})=>n[e.type.spec.tableRole]))(e,t)}function vl(e){return(t,n)=>{let r,o,i=t.selection;if(i instanceof As){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(r=function(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from),!r)return!1;o=Cs(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){let a=r.attrs,s=[],l=a.colwidth;a.rowspan>1&&(a=Ds(a,"rowspan",1)),a.colspan>1&&(a=Ds(a,"colspan",1));let c,u=nl(t),d=t.tr;for(let e=0;e<u.right-u.left;e++)s.push(l?Ds(a,"colwidth",l&&l[e]?[l[e]]:null):a);for(let t=u.top;t<u.bottom;t++){let n=u.map.positionAt(t,u.left,u.table);t==u.top&&(n+=r.nodeSize);for(let o=u.left,i=0;o<u.right;o++,i++)o==u.left&&t==u.top||d.insert(c=d.mapping.map(n+u.tableStart,1),e({node:r,row:t,col:o}).createAndFill(s[i]))}d.setNodeMarkup(o,e({node:r,row:u.top,col:u.left}),s[0]),i instanceof As&&d.setSelection(new As(d.doc.resolve(i.$anchorCell.pos),c&&d.doc.resolve(c))),n(d)}return!0}}function yl(e,t){return function(n,r){if(!xs(n))return!1;let o=Os(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){let i=n.tr;n.selection instanceof As?n.selection.forEachCell(((n,r)=>{n.attrs[e]!==t&&i.setNodeMarkup(r,null,Ds(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,Ds(o.nodeAfter.attrs,e,t)),r(i)}return!0}}function bl(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<r.length;e++){const o=t.table.nodeAt(r[e]);if(o&&o.type!==n.header_cell)return!1}return!0}function kl(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!xs(t))return!1;if(n){let r=ks(t.schema),o=nl(t),i=t.tr,a=o.map.cellsInRect("column"==e?new hs(o.left,0,o.right,o.map.height):"row"==e?new hs(0,o.top,o.map.width,o.bottom):o),s=a.map((e=>o.table.nodeAt(e)));for(let e=0;e<a.length;e++)s[e].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[e],r.cell,s[e].attrs);if(0==i.steps.length)for(let e=0;e<a.length;e++)i.setNodeMarkup(o.tableStart+a[e],r.header_cell,s[e].attrs);n(i)}return!0}}(e):function(t,n){if(!xs(t))return!1;if(n){let r=ks(t.schema),o=nl(t),i=t.tr,a=bl("row",o,r),s=bl("column",o,r),l=("column"===e?a:"row"===e&&s)?1:0,c="column"==e?new hs(0,l,1,o.map.height):"row"==e?new hs(l,0,o.map.width,1):o,u="column"==e?s?r.cell:r.header_cell:"row"==e?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((e=>{const t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,u,n.attrs)})),n(i)}return!0}}let wl=kl("row",{useDeprecatedLogic:!0}),Cl=kl("column",{useDeprecatedLogic:!0}),xl=kl("cell",{useDeprecatedLogic:!0});function Ol(e){return function(t,n){if(!xs(t))return!1;let r=function(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t);if(r.childCount)return n-1-r.lastChild.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}}(Os(t),e);if(null!=r){if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(Ze.between(e,Es(e))).scrollIntoView())}return!0}}}function Sl(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}class El{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Il(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,Il(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}}function Il(e,t,n,r,o,i){let a=0,s=!0,l=t.firstChild,c=e.firstChild;for(let e=0,n=0;e<c.childCount;e++){let{colspan:u,colwidth:d}=c.child(e).attrs;for(let e=0;e<u;e++,n++){let c=o==n?i:d&&d[e],u=c?c+"px":"";a+=c||r,c||(s=!1),l?(l.style.width!=u&&(l.style.width=u),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=u}}for(;l;){let e=l.nextSibling;l.parentNode.removeChild(l),l=e}s?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}const Nl=new gt("tableColumnResizing");function Tl({handleWidth:e=5,cellMinWidth:t=25,View:n=El,lastColumnResizable:r=!0}={}){let o=new ft({key:Nl,state:{init(e,r){return this.spec.props.nodeViews[ks(r.schema).table.name]=(e,r)=>new n(e,t,r),new Ml(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>Nl.getState(e).activeHandle>-1?{class:"resize-cursor"}:null,handleDOMEvents:{mousemove(t,n){!function(e,t,n,r,o){let i=Nl.getState(e.state);if(!i.dragging){let r=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),a=-1;if(r){let{left:o,right:i}=r.getBoundingClientRect();t.clientX-o<=n?a=Dl(e,t,"left"):i-t.clientX<=n&&(a=Dl(e,t,"right"))}if(a!=i.activeHandle){if(!o&&-1!==a){let t=e.state.doc.resolve(a),n=t.node(-1),r=ms.get(n),o=t.start(-1);if(r.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==r.width-1)return}Pl(e,a)}}}(t,n,e,0,r)},mouseleave(e){!function(e){let t=Nl.getState(e.state);t.activeHandle>-1&&!t.dragging&&Pl(e,-1)}(e)},mousedown(e,n){!function(e,t,n){let r=Nl.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;let o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let i=e.domAtPos(t),a=i.node.childNodes[i.offset].offsetWidth,s=n;if(r)for(let e=0;e<n;e++)r[e]&&(a-=r[e],s--);return a/s}(e,r.activeHandle,o.attrs);function a(t){window.removeEventListener("mouseup",a),window.removeEventListener("mousemove",s);let r=Nl.getState(e.state);r.dragging&&(function(e,t,n){let r=e.state.doc.resolve(t),o=r.node(-1),i=ms.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<i.height;e++){let t=e*i.width+s;if(e&&i.map[t]==i.map[t-i.width])continue;let r=i.map[t],{attrs:c}=o.nodeAt(r),u=1==c.colspan?0:s-i.colCount(r);if(c.colwidth&&c.colwidth[u]==n)continue;let d=c.colwidth?c.colwidth.slice():_l(c.colspan);d[u]=n,l.setNodeMarkup(a+r,null,Ds(c,"colwidth",d))}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,Rl(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(Nl,{setDragging:null})))}function s(t){if(!t.which)return a(t);let r=Nl.getState(e.state),o=Rl(r.dragging,t,n);!function(e,t,n,r){let o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=ms.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;Il(i,l.firstChild,l,r,s,n)}(e,r.activeHandle,o,n)}e.dispatch(e.state.tr.setMeta(Nl,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",a),window.addEventListener("mousemove",s),t.preventDefault()}(e,n,t)}},decorations(e){let t=Nl.getState(e);if(t.activeHandle>-1)return function(e,t){let n=[],r=e.doc.resolve(t),o=r.node(-1);if(!o)return Fa.empty;let i=ms.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan;for(let e=0;e<i.height;e++){let t=s+e*i.width-1;if(!(s!=i.width&&i.map[t]==i.map[t+1]||0!=e&&i.map[t-1]==i.map[t-1-i.width])){let e=i.map[t],r=a+e+o.nodeAt(e).nodeSize-1,s=document.createElement("div");s.className="column-resize-handle",n.push(_a.widget(r,s))}}return Fa.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return o}class Ml{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){let t=this,n=e.getMeta(Nl);if(n&&null!=n.setHandle)return new Ml(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Ml(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let n=e.mapping.map(t.activeHandle,-1);Ss(e.doc.resolve(n))||(n=null),t=new Ml(n,t.dragging)}return t}}function Dl(e,t,n){let r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;let{pos:o}=r,i=Cs(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;let a=ms.get(i.node(-1)),s=i.start(-1),l=a.map.indexOf(i.pos-s);return l%a.width==0?-1:s+a.map[l-1]}function Rl(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Pl(e,t){e.dispatch(e.state.tr.setMeta(Nl,{setHandle:t}))}function _l(e){let t=[];for(let n=0;n<e;n++)t.push(0);return t}function Al({allowTableNodeSelection:e=!1}={}){return new ft({key:ws,state:{init:()=>null,apply(e,t){let n=e.getMeta(ws);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;let{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:Fs,handleDOMEvents:{mousedown:Ys},createSelectionBetween(e){if(null!=ws.getState(e.state))return e.state.selection},handleTripleClick:Us,handleKeyDown:Hs,handlePaste:Gs},appendTransaction:(t,n,r)=>function(e,t,n){let r,o,i=(t||e).selection,a=(t||e).doc;if(i instanceof et&&(o=i.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=As.create(a,i.from);else if("row"==o){let e=a.resolve(i.from+1);r=As.rowSelection(e,e)}else if(!n){let e=ms.get(i.node),t=i.from+1,n=t+e.map[e.width*e.height-1];r=As.create(a,t+1,n)}}else i instanceof Ze&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.pos-6)return!1;let n=e.pos,r=t.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}(i)?r=Ze.create(a,i.from):i instanceof Ze&&function({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===t.parentOffset}(i)&&(r=Ze.create(a,i.$from.start(),i.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,tl(r,n),e)})}var jl=["blockquote",0],Fl=["hr"],zl=["pre",["code",0]],Ll=["ol",0],Bl=["ul",0],Vl=["li",0],Hl=function(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n},Kl=function(e){var t={};return e.forEach((function(e){t[e]={default:null}})),t},Wl=function(){return Kl(["style","class","id"])},$l=function(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return!0;return!1},ql=function(e,t){void 0===t&&(t=[]);var n={},r=function(r){r&&null!==e[r]&&!t.find((function(e){return e===r}))&&(n[r]=e[r])};for(var o in e)r(o);return n},Ul=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},Gl=Pt(Pt(Pt(Pt(Pt(Pt(Pt(Pt(Pt(Pt({link:{attrs:Pt(Pt({},Wl()),{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:Hl}],toDOM:function(e){return["a",ql(e.attrs),0]}}},Ul("strong")),Ul("b")),Ul("em")),Ul("i")),Ul("u")),Ul("del")),Ul("sub")),Ul("sup")),Ul("code")),{style:{attrs:Pt({},Wl()),parseDOM:[{tag:"span",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["span",ql(e.attrs),0]:["span",0]}}}),Yl=function(e){var t;return(t={})[e]={default:null,getFromDOM:function(t){return t.getAttribute(e)},setDOMAttr:function(t,n){n[e]=t}},t},Xl=Pt(Pt(Pt(Pt({},Yl("style")),Yl("class")),Yl("id")),Yl("headers")),Jl={doc:{content:"colgroup*"},col:{attrs:Kl(["id","class","style","span"]),parseDOM:[{getAttrs:Hl,tag:"col"}],toDOM:function(e){return["col",e.attrs]}},colgroup:{attrs:Kl(["id","class","style","span"]),content:"col*",parseDOM:[{getAttrs:Hl,tag:"colgroup"}],toDOM:function(e){return["colgroup",e.attrs,0]}},text:{inline:!0,group:"inline"}},Zl=new Y({nodes:Jl,marks:{}}),Ql=function(e){var t=Tt(It(e),Zl,{preserveWhitespace:!1});return Nt(t).firstChild},ec=bs({tableGroup:"block",cellContent:"block+",cellAttributes:Xl});ec.table_row.attrs=Pt(Pt({},ec.table_row.attrs),Kl([vt,"style","class","id"])),ec.table_row.toDOM=function(e){return["tr",ql(e.attrs),0]},ec.table_row.parseDOM=[{tag:"tr",getAttrs:Hl}],ec.table.attrs=Pt(Pt({},ec.table.attrs),Kl(["style","class","id",yt,bt])),ec.table.toDOM=function(e){var t=$l(e.attrs)?ql(e.attrs,[yt,bt]):{},n=null;if(e.attrs[yt]&&!function(e){for(var t=!1,n=e.child(0),r=0;r<n.childCount;r++)if(n.child(r).attrs.colwidth){t=!0;break}return t}(e)){var r=Ql(e.attrs[yt]);if(r){var o=Array.from(r.children).map((function(e){return["col",Hl(e)]}));n=["colgroup",Hl(r)].concat(o)}}return n?["table",t,n,["tbody",0]]:["table",t,["tbody",0]]},ec.table.parseDOM=[{tag:"table",getAttrs:function(e){var t=Hl(e),n=Array.from(e.childNodes).find((function(e){return"COLGROUP"===e.nodeName}));return n&&(t[yt]=n.outerHTML),t}}];var tc=Pt({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:Pt({},Wl()),parseDOM:[{tag:"p",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["p",ql(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:Pt({},Wl()),parseDOM:[{tag:"div",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["div",ql(e.attrs),0]:["div",0]}},blockquote:{attrs:Pt({},Wl()),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["blockquote",ql(e.attrs),0]:jl}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return Fl}},heading:{attrs:Pt(Pt({},Wl()),{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:1})}},{tag:"h2",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:2})}},{tag:"h3",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:3})}},{tag:"h4",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:4})}},{tag:"h5",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:5})}},{tag:"h6",getAttrs:function(e){return Pt(Pt({},Hl(e)),{level:6})}}],toDOM:function(e){return $l(e.attrs,"level")?["h"+e.attrs.level,ql(e.attrs,["level"]),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return zl}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:Pt({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},Wl()),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["img",ql(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:Pt({},Wl()),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["br",ql(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:Pt(Pt({},Wl()),{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return Pt(Pt({},Hl(e)),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?$l(e.attrs,"order")?["ol",ql(e.attrs,["order"]),0]:Ll:["ol",Pt(Pt({},ql(e.attrs,["order"])),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:Pt({},Wl()),parseDOM:[{tag:"ul",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["ul",ql(e.attrs),0]:Bl}},list_item:{content:"(paragraph | heading) block*",attrs:Pt({},Wl()),parseDOM:[{tag:"li",getAttrs:Hl}],toDOM:function(e){return $l(e.attrs)?["li",ql(e.attrs),0]:Vl},defining:!0}},ec),nc=200,rc=function(){};rc.prototype.append=function(e){return e.length?(e=rc.from(e),!this.length&&e||e.length<nc&&this.leafAppend(e)||this.length<nc&&e.leafPrepend(this)||this.appendInner(e)):this},rc.prototype.prepend=function(e){return e.length?rc.from(e).append(this):this},rc.prototype.appendInner=function(e){return new ic(this,e)},rc.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?rc.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},rc.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},rc.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},rc.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},rc.from=function(e){return e instanceof rc?e:e&&e.length?new oc(e):rc.empty};var oc=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=nc)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=nc)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(rc);rc.empty=new oc([]);var ic=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(rc);const ac=rc;class sc{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}t&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,a,s=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new lc(e.map));let t,o=e.step.map(n.slice(r));o&&s.maybeStep(o).doc&&(t=s.mapping.maps[s.mapping.maps.length-1],l.push(new lc(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else s.maybeStep(e.step);return e.selection?(i=n?e.selection.map(n.slice(r)):e.selection,a=new sc(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:a,transform:s,selection:i}}addTransform(e,t,n,r){let o=[],i=this.eventCount,a=this.items,s=!r&&a.length?a.get(a.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),u=new lc(e.mapping.maps[n],c,t);(l=s&&s.merge(u))&&(u=l,n?o.pop():a=a.slice(0,a.length-1)),o.push(u),t&&(i++,t=void 0),r||(s=u)}let l=i-n.depth;return l>uc&&(a=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(a,l),i-=l),new sc(a.append(o),i)}remapping(e,t){let n=new he;return this.items.forEach(((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new sc(this.items.append(e.map((e=>new lc(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,a=this.eventCount;this.items.forEach((e=>{e.selection&&a--}),r);let s=t;this.items.forEach((t=>{let r=o.getMirror(--s);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(t.step){let i=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(s+1,r));c&&a++,n.push(new lc(l,i,c))}else n.push(new lc(l))}),r);let l=[];for(let e=t;e<i;e++)l.push(new lc(o.maps[e]));let c=this.items.slice(0,r).append(l).append(n),u=new sc(c,a);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach(((i,a)=>{if(a>=e)r.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(n)),a=e&&e.getMap();if(n--,a&&t.appendMap(a,n),e){let s=i.selection&&i.selection.map(t.slice(n));s&&o++;let l,c=new lc(a.invert(),e,s),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new sc(ac.from(r.reverse()),o)}}sc.empty=new sc(ac.empty,0);class lc{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new lc(t.getMap().invert(),t,this.selection)}}}class cc{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const uc=20;function dc(e){let t=[];return e.forEach(((e,n,r,o)=>t.push(r,o))),t}function pc(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function fc(e,t,n,r){let o=gc(t),i=yc.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,o);if(!a)return;let s=a.selection.resolve(a.transform.doc),l=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,o),c=new cc(r?l:a.remaining,r?a.remaining:l,null,0);n(a.transform.setSelection(s).setMeta(yc,{redo:r,historyState:c}).scrollIntoView())}let hc=!1,mc=null;function gc(e){let t=e.plugins;if(mc!=t){hc=!1,mc=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){hc=!0;break}}return hc}function vc(e){return e.setMeta(bc,!0)}const yc=new gt("history"),bc=new gt("closeHistory");function kc(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new ft({key:yc,state:{init:()=>new cc(sc.empty,sc.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let o,i=n.getMeta(yc);if(i)return i.historyState;n.getMeta(bc)&&(e=new cc(e.done,e.undone,null,0));let a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(yc))return a.getMeta(yc).redo?new cc(e.done.addTransform(n,void 0,r,gc(t)),e.undone,dc(n.mapping.maps[n.steps.length-1]),e.prevTime):new cc(e.done,e.undone.addTransform(n,void 0,r,gc(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new cc(e.done.rebased(n,o),e.undone.rebased(n,o),pc(e.prevRanges,n.mapping),e.prevTime):new cc(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),pc(e.prevRanges,n.mapping),e.prevTime);{let o=0==e.prevTime||!a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),i=a?pc(e.prevRanges,n.mapping):dc(n.mapping.maps[n.steps.length-1]);return new cc(e.done.addTransform(n,o?t.selection.getBookmark():void 0,r,gc(t)),sc.empty,i,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?wc:"historyRedo"==n?Cc:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const wc=(e,t)=>{let n=yc.getState(e);return!(!n||0==n.done.eventCount||(t&&fc(n,e,t,!1),0))},Cc=(e,t)=>{let n=yc.getState(e);return!(!n||0==n.undone.eventCount||(t&&fc(n,e,t,!0),0))};function xc(e){let t=yc.getState(e);return t?t.done.eventCount:0}function Oc(e){let t=yc.getState(e);return t?t.undone.eventCount:0}class Sc{constructor(e,t){var n;this.match=e,this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){let i=n;if(t[1]){let e=t[0].lastIndexOf(t[1]);i+=t[0].slice(e+t[1].length);let n=(r+=e)-o;n>0&&(i=t[0].slice(e-n,e)+i,r=o)}return e.tr.insertText(i,r,o)}):t}}function Ec({rules:e}){let t=new ft({state:{init:()=>null,apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(n,r,o,i)=>Ic(n,r,o,i,e,t),handleDOMEvents:{compositionend:n=>{setTimeout((()=>{let{$cursor:r}=n.state.selection;r&&Ic(n,r.pos,r.pos,"",e,t)}))}}},isInputRules:!0});return t}function Ic(e,t,n,r,o,i){if(e.composing)return!1;let a=e.state,s=a.doc.resolve(t);if(s.parent.type.spec.code)return!1;let l=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"")+r;for(let s=0;s<o.length;s++){let c=o[s].match.exec(l),u=c&&o[s].handler(a,c,t-(c[0].length-r.length),n);if(u)return e.dispatch(u.setMeta(i,{transform:u,from:t,to:n,text:r})),!0}return!1}const Nc=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let o,i=n[r];if(i.spec.isInputRules&&(o=i.getState(e))){if(t){let n=e.tr,r=o.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(o.text){let t=n.doc.resolve(o.from).marks();n.replaceWith(o.from,o.to,e.schema.text(o.text,t))}else n.delete(o.from,o.to);t(n)}return!0}}return!1},Tc=new Sc(/--$/,"—"),Mc=new Sc(/\.\.\.$/,"…"),Dc=new Sc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),Rc=new Sc(/"$/,"”"),Pc=new Sc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),_c=new Sc(/'$/,"’"),Ac=[Dc,Rc,Pc,_c];function jc(e,t,n=null,r){return new Sc(e,((e,o,i,a)=>{let s=n instanceof Function?n(o):n,l=e.tr.delete(i,a),c=l.doc.resolve(i).blockRange(),u=c&&Ee(c,t,s);if(!u)return null;l.wrap(c,u);let d=l.doc.resolve(i-1).nodeBefore;return d&&d.type==t&&Te(l.doc,i-1)&&(!r||r(o,d))&&l.join(i-1),l}))}function Fc(e,t,n=null){return new Sc(e,((e,r,o,i)=>{let a=e.doc.resolve(o),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,s):null}))}var zc={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},Lc={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},Bc={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},Vc={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},Hc={mark:"sub"},Kc={mark:"sup"},Wc={mark:"link"},$c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),qc=function(e,t){var n={},r=t&&t.applyToWord||!1;if(n["Mod-z"]=wc,n["Shift-Mod-z"]=Cc,n.Backspace=br(Nc,Wn,$n,Un),n.Enter=br(tr,or,ir,sr),$c||(n["Mod-y"]=Cc),e.marks.strong&&(n["Mod-b"]=Ut(cn,Pt(Pt({},zc),{applyToWord:r}))),e.marks.em&&(n["Mod-i"]=Ut(cn,Pt(Pt({},Lc),{applyToWord:r}))),e.marks.u&&(n["Mod-u"]=Ut(cn,Pt(Pt({},Bc),{applyToWord:r}))),e.nodes.hard_break){var o=e.nodes.hard_break,i=br(rr,(function(e,t){return t(e.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0}));n["Shift-Enter"]=i}return n},Uc=function(e){var t,n={};return e.nodes.list_item&&(n.Enter=(t=e.nodes.list_item,function(e,n){return jn(t)(e,(function(t){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&t.ensureMarks(r),n(t)}))})),n},Gc=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,Yc=function(e){return/^MsoListParagraph/.test(e.className)},Xc=function(e){var t=e.innerHTML;return(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},Jc=function(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n},Zc=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},Qc=function(e,t){var n=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var r=e;r.getAttribute("datalist")?(n.push(e),t.add(n)):Yc(r)&&n.length?n.push(e):(n=[],"DIV"===r.nodeName?Qc(r.children,t):"TABLE"===r.nodeName&&Array.from(r.querySelectorAll("td,th")).forEach((function(e){Qc(e.children,t)})))}}))},eu=function(e){var t,n=e.innerHTML,r=function(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")};return n=n.replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(n)?{tag:"ul",style:(t=r(Xc(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(n)?{tag:"ol",style:Zc(r(Xc(e)))}:void 0},tu=function(e){var t,n=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?Xc(e):e.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^(&nbsp;|\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==n?"<"+n+">"+e.innerHTML+"</"+n+">":e.innerHTML),e.parentNode.removeChild(e);var r=document.createElement("li");return r.innerHTML=t,r},nu=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e.replace(Gc,(function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e}))}(e);var n=new Set;return Qc(t.children,n),n.forEach((function(e){return function(e){var t,n,r,o,i,a,s,l,c,u,d,p,f,h=-1,m={};for(l=0;l<e.length;l++){var g=(f={datalist:(c=e[l]).getAttribute("datalist"),datalevel:c.getAttribute("datalevel")}).datalist,v=eu(c);if(u=v&&v.tag){if(d=f.datalevel||parseFloat(c.style.marginLeft||0),f.datalevel||c.style.marginLeft){var y=u+g;m[d]||(m[d]={}),(!n||n<0)&&(n=d,r=g,o=(s=e.filter((function(e){return e.getAttribute("datalist")===String(r)})))[s.length-1],a=Jc(u,v&&v.style),c.parentNode.insertBefore(a,c),h=d,m[d][y]=a),i=o===c,p=m[d][y],(d>h||!p)&&(p=Jc(u,v&&v.style),m[d][y]=p,t.appendChild(p)),t=tu(c),p.appendChild(t),i?n=h=-1:h=d}}else!t||i&&!Yc(c)||(c.style.marginLeft&&(c.style.marginLeft=""),c.style.marginLeft&&(c.style.margin=""),t.appendChild(c))}}(e)})),t.innerHTML},ru=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},ou=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},iu=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},au=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},su=function(e){/^Mso/.test(e.value)&&au(e)},lu=/\s*;\s*/,cu=/\s*:\s*/,uu=function(e){var t,n,r=e.value.split(lu).filter((function(e){return Boolean(e)})),o=e.ownerElement.style,i="";r.forEach((function(e){var r;r=e.split(cu),t=r[0],n=r[1],void 0!==o[t]&&(i+=t+": "+n+"; ")})),(i=i.trim())?e.value=i:au(e)},du=function(e,t){var n=e;if(t.convertMsLists&&(n=nu(n)),t.stripTags&&(n=iu(n,t.stripTags)),t.attributes){var r=document.createElement("div");r.innerHTML=n,Array.from(r.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e.attributes.length-1;n>=0;n--){var r=e.attributes[n];t[r.name]?t[r.name](r):t["*"]&&t["*"](r)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,t.attributes)})),n=r.innerHTML}return n};function pu(e){for(var t=e.length,n=new Array(t/2),r=0;r<t;r+=2)n[r]=String.fromCharCode(parseInt(e.substring(r,r+2),16));return btoa(n.join(""))}var fu=/<img\s[^>]*?src=(?:'|")file:\/[^'"]+(?:'|")[^>]*>/gi,hu=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,mu=new RegExp("(?:("+hu.source+"))([\\da-fA-F\\s]+)\\}","g"),gu=/[^\da-fA-F]/g,vu=/file:\/[^'"]+\.(jpg|png|gif)/i,yu=/\\(png|jpeg)blip\\/,bu="text/rtf",ku=function(e,t){var n=e.match(fu);if(!n||-1===t.types.indexOf(bu))return e;var r=t.getData(bu),o=[],i=r.match(mu);if(!r||!i)return e;for(var a=0,s=i;a<s.length;a++){var l=s[a],c=yu.exec(l);if(c){var u=l.replace(hu,"").replace(gu,"");o.push("data:image/"+c[1]+";base64,"+pu(u))}}return n.length!==o.length?e:e.replace(fu,(function(e){var t=o.shift()||"";return e.replace(vu,t)}))},wu=function(e,t,n,r,o){var i,a,s,l,c,u,d=[],p=[],f=t.matchCase,h=t.matchWord,m=t.useRegExp,g=t.text;if(m&&(/^\\$/.test(g)||/[^\\]\\$/.test(g))&&(g=g.substring(0,g.length-1)),!g)return d;var v=f?"g":"gi",y=m?new RegExp(g,v):Nu(g,v);return e.nodesBetween(n,r,(function(t,f,m){if(o(d))return!1;t.inlineContent&&f+t.content.size>=n&&(p.length=0,t.nodesBetween(0,t.content.size,(function(t,m,g,v){if(o(d))return!1;var b=1+f+m;if(t.isText&&b+t.nodeSize>=n){if(c=t.text||"",u=g.childCount-1>=v+1&&g.child(v+1),p.push(n<=b?{text:c,start:b}:{text:c.slice(n-b),start:n}),u&&u.isText)return;for(a=p.map((function(e){return e.text})).join(""),i=y.exec(a);null!==i&&(s=p[0].start+i.index,l=s+i[0].length,n<=s&&r>=l&&Iu(i,h)&&d.push(Ze.create(e,s,l)),!o(d));)i=y.exec(a)}else p.length=0})))})),d},Cu=function(e,t){var n=t.backward,r=t.matchCyclic,o=_t(t,["backward","matchCyclic"]),i=n?function(){return!1}:function(e){return e.length>0},a=e.doc,s=e.selection,l=[];return n?!(l=wu(a,o,0,s.from,i)).length&&r&&(l=wu(a,o,s.from,a.content.size,i)):!(l=wu(a,o,s.to,a.content.size,i)).length&&r&&(l=wu(a,o,0,s.to,i)),l.length?l[l.length-1]:null},xu=function(e,t){return wu(e,t,0,e.content.size,(function(){return!1}))},Ou=function(e,t,n){var r=e.from,o=e.to;return n.insertText(t,r,o).setSelection(Ze.create(n.doc,r,r+t.length)),n},Su=function(e,t,n){var r=xu(e.doc,n);if(0===r.length)return null;for(var o=e.tr,i=r.length-1;i>=0;i--)o.insertText(t,r[i].from,r[i].to);return o},Eu=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,Iu=function(e,t){if(t){if(!0===t){var n=e.input,r=n.charAt(e.index-1),o=n.charAt(e.index+e[0].length);return Eu.test(r)&&Eu.test(o)}return t(e)}return!0},Nu=function(e,t){var n=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(n,t)};function Tu(e){var t={class:"k-placeholder","data-placeholder":e};return new ft({key:new gt("placeholder"),props:{decorations:function(e){var n=e.doc,r=n.content.firstChild;if(!(0===n.childCount||1===n.childCount&&r.inlineContent&&0===r.childCount))return Fa.empty;var o=[];return n.descendants((function(e,n){o.push(_a.node(n,n+e.nodeSize,t))})),Fa.create(n,o)}}})}var Mu=/\s+/g,Du=/text-align/,Ru=function(){return new ft({key:new gt("spaces-fix"),props:{decorations:function(e){var t,n,r,o,i=[],a=e.doc;return a.nodesBetween(0,a.content.size,(function(e,a,s){if(e.type.isText&&function(e){return Du.test(e&&e.attrs&&e.attrs.style||"")}(s))for(n=Mu.exec(e.text||"");null!==n;){if(t=a+n.index,r=n[0].length,n.index+r<n.input.length)for(o=0;o<=r-1;o+=2)i.push(_a.inline(t+o,t+o+1,{style:"white-space: normal"}));n=Mu.exec(e.text||"")}})),Fa.create(a,i)}}})},Pu=new gt("highlight");function _u(e){return void 0===e&&(e=Pu),new ft({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map((function(e){return _a.inline(e.from,e.to,e.attrs)}));return Fa.create(e.doc,t)}}})}var Au={southeast:{x:1,y:1},east:{x:1,y:0},south:{x:0,y:1},north:{x:0,y:-1},west:{x:-1,y:0},southwest:{x:-1,y:1},northwest:{x:-1,y:-1},northeast:{x:1,y:-1}},ju=Object.keys(Au),Fu=new gt("image-resize"),zu=function(e,t,n){e.style[t]=n+"px"},Lu=/[^\-]width:|[^\-]height:/,Bu=/^.+$/,Vu=function(){function e(e,t,n,r){this.activeHandle=e,this.dragging=t,this.rect=n,this.nodePosition=r}return e.prototype.apply=function(t){var n=t.getMeta(Fu);return n?new e(n.activeHandle,n.setDragging,n.rect,n.nodePosition):this},e}(),Hu=function(e){return void 0===e&&(e={node:"image",lockRatio:!0}),new ft({key:Fu,view:function(t){return{resize:function(){Fu.getState(t.state).rect&&t.dispatch(t.state.tr.setMeta("resize",!0))},get window(){return t.dom.ownerDocument&&t.dom.ownerDocument.defaultView},attachResize:function(){var e=this.window;e&&(e.removeEventListener("resize",this.resize),e.addEventListener("resize",this.resize))},removeResize:function(){var e=this.window;e&&e.removeEventListener("resize",this.resize)},update:function(t,n){var r=t.state,o=r.selection,i=r.schema.nodes[e.node],a=Fu.getState(r),s=a.rect;if(o instanceof et&&i===o.node.type){var l=t.nodeDOM(o.from),c={top:l.offsetTop,left:l.offsetLeft,width:l.offsetWidth,height:l.offsetHeight};if(!n.selection.eq(o)||s&&(s.width!==c.width||s.height!==c.height||s.top!==c.top||s.left!==c.left)){var u=r.tr;u.setMeta(Fu,{rect:c,nodePosition:o.from}),t.dispatch(u),this.attachResize()}}else s&&(a.rect=null,a.nodePosition=-1)},destroy:function(){this.removeResize()}}},state:{init:function(){return new Vu("",null,null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(t,n){return function(e,t,n){var r=t.target.getAttribute(Ct);if(!r)return!1;var o=Fu.getState(e.state);t.preventDefault();var i=e.state.tr;function a(t){!function(e,t,n){var r=Fu.getState(e.state),o=r.rect,i=r.dragging,a=r.nodePosition,s=r.activeHandle;if(i&&o){var l=e.nodeDOM(a),c=Au[s],u=(t.clientX-i.startX)*c.x,d=(t.clientY-i.startY)*c.y,p=c.x?u+l.width:o.width,f=c.y?d+l.height:o.height;if(n.lockRatio&&c.x&&c.y){var h=Math.min(p/l.width,f/l.height),m=l.width*h,g=l.height*h;i.startX=t.clientX-(p-m)*c.x,i.startY=t.clientY-(f-g)*c.y,p=m,f=g}else i.startX=c.x?t.clientX:i.startX,i.startY=c.y?t.clientY:i.startY;zu(l,"width",p),zu(l,"height",f),o.top=l.offsetTop,o.left=l.offsetLeft,o.width=l.offsetWidth,o.height=l.offsetHeight;var v=l.nextElementSibling;v.style.width=o.width+"px",v.style.height=o.height+"px",v.style.top=o.top+"px",v.style.left=o.left+"px"}}(e,t,n)}return i.setMeta(Fu,{setDragging:{startX:t.clientX,startY:t.clientY},activeHandle:r,rect:o.rect,nodePosition:o.nodePosition}),i.setMeta("addToHistory",!1),e.dispatch(i),t.view.addEventListener("mouseup",(function t(n){n.view.removeEventListener("mouseup",t),n.view.removeEventListener("mousemove",a),function(e){var t=Fu.getState(e.state),n=t.rect,r=t.dragging,o=t.nodePosition;if(r&&n){var i=e.state.selection;if(i instanceof et){var a=i.node.attrs,s=n.width,l=n.height,c=void 0;if(Lu.test(a.style||"")){var u=At(a.style,{style:"width",value:Bu,newValue:s+"px"}),d=At(u.style||"",{style:"height",value:Bu,newValue:l+"px"}).style;c=Pt(Pt({},a),{style:d})}else c=Pt(Pt({},a),{width:s,height:l});var p=i.node.type.createAndFill(c);if(p){var f=e.state.tr;f.replaceWith(o,o+1,p),f.setSelection(et.create(f.doc,o)),f.setMeta("commandName","image-resize"),f.setMeta("args",c),f.setMeta(Fu,{setDragging:null,activeHandle:null,rect:n,nodePosition:o}),e.dispatch(f)}}}}(e)})),t.view.addEventListener("mousemove",a),!0}(t,n,e)}},decorations:function(t){var n=t.selection,r=t.schema.nodes[e.node],o=Fu.getState(t).rect;if(o&&n instanceof et&&r===n.node.type){var i=document.createElement("div");i.className="k-editor-resize-handles-wrapper",i.style.width=o.width+"px",i.style.height=o.height+"px",i.style.top=o.top+"px",i.style.left=o.left+"px";for(var a=0;a<ju.length;a++){var s=document.createElement("div");s.className=kt+" "+ju[a],s.setAttribute(Ct,ju[a]),i.appendChild(s)}return Fa.create(t.doc,[_a.widget(t.selection.from+1,i)])}return Fa.empty}}})},Ku=new gt("caret-color");function Wu(){return new ft({key:Ku,props:{decorations:function(e){var t=e.doc,n=e.selection,r=e.storedMarks;if(!n.empty||!r)return Fa.empty;var o=en((r||[]).find((function(e){return"style"===e.type.name})),{name:"color",value:/^.+$/});if(!o)return Fa.empty;var i=n.$anchor.parent,a=[];return t.descendants((function(e,t){e.eq(i)&&a.push(_a.node(t,t+e.nodeSize,{style:"caret-color: "+o}))})),Fa.create(t,a)}}})}var $u=function(){function e(e,t){this.node=e,this.view=t,this.dom=document.createElement("div"),this.dom.className="k-editor-resize-wrap-element",this.table=this.dom.appendChild(document.createElement("table")),e.attrs[yt]&&this.renderColgroup(e.attrs[yt]);var n=this.table.appendChild(document.createElement("tbody"));this.setAttributes(this.table,e.attrs),this.resizeHandles=ju.map((function(e){var t=document.createElement("span");return t.className=kt+" "+e,t.setAttribute(wt,e),t})),this.contentDOM=n}return e.prototype.update=function(e){var t=this;if(e.type!==this.node.type)return!1;var n=this.node;return this.node=e,e.attrs[bt]?this.resizeHandles.forEach((function(e){t.dom.appendChild(e)})):Array.from(this.dom.children).filter((function(e){return e.classList.contains(kt)})).forEach((function(e){return e.remove()})),this.setAttributes(this.table,e.attrs),n.attrs[yt]!==e.attrs[yt]&&this.renderColgroup(e.attrs[yt]),!0},e.prototype.ignoreMutation=function(e){return"attributes"===e.type&&(e.target===this.table||e.target.firstChild===this.table||this.colgroup&&this.colgroup.contains(e.target))},e.prototype.destroy=function(){this.node=void 0,this.view=void 0,this.table=void 0,this.colgroup=void 0,this.resizeHandles=void 0},e.prototype.renderColgroup=function(e){this.table&&this.table.firstChild&&"COLGROUP"===this.table.firstChild.nodeName&&this.table.removeChild(this.table.firstChild),e&&(this.colgroup=Ql(e),this.table.insertBefore(this.colgroup,this.table.firstChild))},e.prototype.setAttributes=function(e,t){var n=[yt,bt];for(var r in t)if(r&&-1===n.indexOf(r)){var o=e.getAttribute(r),i=t[r];i&&i!==o?e.setAttribute(r,i):i||e.removeAttribute(r)}},e}(),qu=/^.+$/,Uu=function(e){return(e||"").split(/\s*;\s*/).filter(Boolean).map((function(e){var t,n=e.split(/\s*:\s*/);return(t={})[n[0]]=n[1],t})).reduce((function(e,t){return Pt(Pt({},e),t)}),{})};function Gu(e,t,n){var r;if(new RegExp("[^-]?"+t+":").test(e.style||"")){var o=At(e.style||"",{style:t,value:qu,newValue:n}).style;r=Pt(Pt({},e),{style:o})}else r=e.style?Pt(Pt({},e),{style:e.style.replace(/;$/,"")+"; "+t+": "+n+";"}):Pt(Pt({},e),{style:t+": "+n+";"});return r}var Yu=new gt("table-resize"),Xu=new gt("table-column-resizing"),Ju=new gt("table-row-resizing");function Zu(e,t){var n=!1;return(n=(n=n||e!==Yu&&Boolean(Yu.get(t))&&Yu.getState(t).dragging)||e!==Xu&&Boolean(Xu.get(t))&&Xu.getState(t).dragging)||e!==Ju&&Boolean(Ju.get(t))&&Ju.getState(t).dragging}function Qu(e,t){var n=!1;return(n=n||e!==Xu&&Boolean(Xu.get(t))&&Xu.getState(t).activeHandle>-1)||e!==Ju&&Boolean(Ju.get(t))&&Ju.getState(t).activeHandle>-1}function ed(e){return e&&e.firstChild&&"TABLE"===e.firstChild.nodeName?e.firstChild:e}function td(e){for(;e&&"TD"!==e.nodeName&&"TH"!==e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}function nd(e,t){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{node:r,depth:n}}return null}var rd=function(){function e(e,t){this.activeHandle=e,this.dragging=t}return e.prototype.apply=function(t){var n,r=this,o=t.getMeta(Xu);if(o&&null!=o.setHandle)return new e(o.setHandle,null);if(o&&void 0!==o.setDragging)return new e(r.activeHandle,o.setDragging);if(r.activeHandle>-1&&t.docChanged){var i=t.mapping.map(r.activeHandle,-1);n=t.doc.resolve(i),Boolean("row"===n.parent.type.spec.tableRole&&n.nodeAfter)||(i=-1),r=new e(i,r.dragging)}return r},e}();function od(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=e.state.doc.resolve(r.pos),i=nd(o,(function(e){return"table"===e.type.spec.tableRole}));if(null===i)return-1;var a=o.start(i.depth),s=i.node,l=ms.get(s);return a+l.map[l.width*n.rowIndex+n.cellIndex]}function id(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function ad(e,t){var n=e.state.tr;n.setMeta("addToHistory",!1),n.setMeta(Xu,{setHandle:t}),e.dispatch(n)}var sd={southeast:!0,southwest:!0,northwest:!0,northeast:!0},ld=Pt({east:!0,west:!0},sd),cd=Pt({south:!0,north:!0},sd),ud=function(){function e(e,t,n){this.activeHandle=e,this.dragging=t,this.nodePosition=n}return e.prototype.apply=function(t){var n=t.getMeta(Yu);return n?new e(n.activeHandle,n.setDragging,n.nodePosition):this},e}(),dd=function(e){var t=Array.from(e.firstChild.children).map((function(e){return e.offsetWidth})),n=Array.from(e.rows).map((function(e){return e.offsetHeight})),r=t.reduce((function(e,t){return e+t}),0),o=n.reduce((function(e,t){return e+t}),0),i=e.offsetHeight;return{width:r,height:o,colsWidth:t,rowsHeight:n,offsetWidth:e.offsetWidth,offsetHeight:i}},pd=function(e,t){var n=t.target.getAttribute(wt);if(!n)return!1;var r=Yu.getState(e.state);t.preventDefault();var o=e.state.tr;o.setMeta(Yu,{setDragging:{startX:t.clientX,startY:t.clientY},activeHandle:n,nodePosition:r.nodePosition}),o.setMeta("addToHistory",!1),function(e,t,n){var r=e.state.doc.nodeAt(n),o=ed(e.nodeDOM(n)),i=dd(o),a=i.width,s=i.height,l=i.colsWidth,c=i.rowsHeight,u=i.offsetWidth,d=i.offsetHeight,p=o.firstChild,f=Array.from(p&&p.children||[]),h=!1;f.forEach((function(e,t){e.style.width&&!/%$/.test(e.style.width)&&(e.style.width=100*l[t]/a+"%",h=!0)}));var m=!1;r.forEach((function(e,r,o){var i=Uu(e.attrs.style).height;i&&!/%$/.test(i)&&(t.setNodeMarkup(n+r+1,null,Gu(e.attrs,"height",100*c[o]/s+"%")),m=!0)}));var g=r.attrs;Uu(g.style).width!==u+"px"&&(g=Gu(g,"width",u+"px")),h&&(g[yt]=p.outerHTML),m&&(g=Gu(g,"height",d+"px")),(h||m)&&t.setNodeMarkup(n,null,g)}(e,o,r.nodePosition),e.dispatch(o);var i=t.view||window;function a(t){!function(e,t){var n=Yu.getState(e.state),r=n.dragging,o=n.nodePosition,i=n.activeHandle;if(!(o<0)&&r){var a=ed(e.nodeDOM(o)),s=a.getBoundingClientRect(),l=Au[i],c=(t.clientX-r.startX)*l.x,u=(t.clientY-r.startY)*l.y,d=(a.ownerDocument&&a.ownerDocument.defaultView||window).getComputedStyle(a),p=/px/.test(d.width)?parseFloat(d.width):a.offsetWidth,f=/px/.test(d.height)?parseFloat(d.height):a.offsetHeight,h=l.x?c+p:s.width,m=l.y?u+f:s.height;r.startX=l.x?t.clientX:r.startX,r.startY=l.y?t.clientY:r.startY,ld[i]&&(a.style.width=h+"px"),cd[i]&&(a.style.height=m+"px")}}(e,t)}return i.addEventListener("mouseup",(function t(n){i.removeEventListener("mouseup",t),i.removeEventListener("mousemove",a),function(e){var t=Yu.getState(e.state),n=t.dragging,r=t.nodePosition,o=t.activeHandle;if(n){var i=e.state.doc.nodeAt(r),a=ed(e.nodeDOM(r)),s=dd(a);if(i){var l=s.offsetWidth+"px",c=s.offsetHeight+"px",u=e.state.tr,d=i.attrs,p=Uu(d.style);ld[o]&&a.style.width&&p.width!==l&&(d=Gu(d,"width",l)),cd[o]&&a.style.height&&p.height!==c&&(d=Gu(d,"height",c)),d=function(e,t,n,r){var o=e.state.doc.nodeAt(n),i=ed(e.nodeDOM(n)),a=(i.ownerDocument&&i.ownerDocument.defaultView||window).getComputedStyle,s=Array.from(i.rows);o.forEach((function(e,r,o){var i=Uu(e.attrs.style).height;i&&!/px$/.test(i)&&t.setNodeMarkup(n+r+1,null,Gu(e.attrs,"height",a(s[o]).height))}));var l=i.firstChild,c=Array.from(l&&l.children||[]),u=!1;c.forEach((function(e,t){e.style.width&&!/px$/.test(e.style.width)&&(e.style.width=a(c[t]).width,u=!0)}));var d=Pt({},r);return u&&(d[yt]=l.outerHTML),d}(e,u,r,d),u.setNodeMarkup(r,null,d),u.setMeta("commandName","node-resize"),u.setMeta("args",d),u.setMeta(Yu,{setDragging:null,activeHandle:null,nodePosition:r}),e.dispatch(u)}}}(e)})),i.addEventListener("mousemove",a),!0},fd=function(){function e(){}return e.prototype.ignoreMutation=function(e){return"attributes"===e.type&&"style"===e.attributeName&&"TR"===e.target.nodeName},e}();function hd(){var e=new ft({key:Ju,state:{init:function(e,t){return this.spec.props.nodeViews[ks(t.schema).row.name]=function(e,t){return new fd},new md(-1,null)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return Qu(Ju,e)?null:Ju.getState(e).activeHandle>-1?{class:"resize-cursor-vertical"}:null},handleDOMEvents:{mousemove:function(e,t){return Zu(Ju,e.state)||function(e,t,n){var r=Ju.getState(e.state);if(!r.dragging){var o=td(t.target),i=-1;if(o){var a=o.parentNode,s=a.getBoundingClientRect();Math.abs(t.clientY-s.top)<=5&&a.rowIndex>0?i=gd(e,t,a.rowIndex-1):s.bottom-t.clientY>0&&s.bottom-t.clientY<=5&&(i=gd(e,t,a.rowIndex))}i!==r.activeHandle&&vd(e,i)}}(e,t),!1},mouseleave:function(e){return function(e){var t=Ju.getState(e.state);t.activeHandle>-1&&!t.dragging&&vd(e,-1)}(e),!1},mousedown:function(e,t){return function(e,t){var n=Ju.getState(e.state);if(-1===n.activeHandle||n.dragging)return!1;var r=e.state.doc,o=r.resolve(n.activeHandle),i=r.nodeAt(n.activeHandle),a=o.parent,s=Uu(i.attrs.style).height,l=Uu(a.attrs.style).height,c=s?parseFloat(s):0;function u(t){t.view.removeEventListener("mouseup",u),t.view.removeEventListener("mousemove",d);var n=Ju.getState(e.state);if(n.dragging){var r=e.state.tr.setMeta(Ju,{setDragging:null});!function(e,t,n){var r=e.state.doc,o=r.nodeAt(n),i=e.nodeDOM(n),a=i.ownerDocument&&i.ownerDocument.defaultView||window;i.style.height=a.getComputedStyle(i).height,t.setNodeMarkup(n,null,Gu(o.attrs,"height",i.style.height));var s=i&&i.closest("table"),l=s&&s.style.height;if(l){var c=r.resolve(n),u=c.start(c.depth)-1;t.setNodeMarkup(u,null,Gu(c.parent.attrs,"height",l))}}(e,r,n.activeHandle),e.dispatch(r)}}function d(t){if(!t.which)return u(t);var n=Ju.getState(e.state),r=function(e,t){var n=t.clientY-e.startY;return e.startHeight.rowHeight+n}(n.dragging,t),o=t.clientY-n.dragging.startY;!function(e,t,n,r,o){var i=e.nodeDOM(t);if(i){i.style.height=n+"px";var a=i.ownerDocument&&i.ownerDocument.defaultView||window;i.style.height=a.getComputedStyle(i).height;var s=i.closest("table"),l=parseFloat(o)+r+"px",c=s&&s.style.height;c&&c!==l&&(s.style.height=parseFloat(o)+r+"px",s.style.height=a.getComputedStyle(s).height)}}(e,n.activeHandle,r,o,l)}return s||(c=e.nodeDOM(n.activeHandle).offsetHeight),e.dispatch(e.state.tr.setMeta(Ju,{setDragging:{startY:t.clientY,startHeight:{rowHeight:c,tableHeight:l}}})),t.view.addEventListener("mouseup",u),t.view.addEventListener("mousemove",d),t.preventDefault(),!0}(e,t)}},decorations:function(e){if(Zu(Ju,e))return Fa.empty;var t=Ju.getState(e);return t.activeHandle>-1?function(e,t){var n=[];if("number"!=typeof t)return Fa.empty;for(var r=e.doc.resolve(t),o=r.parent,i=ms.get(o),a=r.index(r.depth),s=r.start(r.depth),l=0;l<i.width;l++){var c=l+a*i.width,u=i.map[c],d=o.nodeAt(u),p=s+u+(d?d.nodeSize:0)-1,f=document.createElement("div");f.className="row-resize-handle",n.push(_a.widget(p,f))}return Fa.create(e.doc,n)}(e,t.activeHandle):void 0},nodeViews:{}}});return e}var md=function(){function e(e,t){this.activeHandle=e,this.dragging=t}return e.prototype.apply=function(t){var n,r=this,o=t.getMeta(Ju);if(o&&null!=o.setHandle)return new e(o.setHandle,null);if(o&&void 0!==o.setDragging)return new e(r.activeHandle,o.setDragging);if(r.activeHandle>-1){var i=t.mapping.map(r.activeHandle,-1);"row"===(n=t.doc.resolve(i)).parent.type.spec.tableRole&&n.nodeAfter||(i=null),r=new e(i,r.dragging)}return r},e}();function gd(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=e.state.doc.resolve(r.pos),i=nd(o,(function(e){return"table"===e.type.spec.tableRole}));if(null===i)return-1;var a=o.start(i.depth),s=i.node,l=ms.get(s);return a+l.map[l.width*n]-1}function vd(e,t){var n=e.state.tr;n.setMeta("addToHistory",!1),n.setMeta(Ju,{setHandle:t}),e.dispatch(n)}var yd=function(){return[(void 0===n&&(n={node:"table"}),new ft({key:Yu,view:function(e){return{selectedNode:function(e,t){var n=e.selection;if(n instanceof et&&t===n.node.type&&n instanceof et)return{node:n.node,pos:n.from};var r=nd(n.$from,(function(e){return e.type===t})),o=r&&r.node;if(o){var i=new Array(n.$from.depth+1).fill(0).findIndex((function(e,t){return"table"===n.$from.node(t).type.spec.tableRole}));return{node:o,pos:n.$from.start(i)-1}}return null},update:function(e,t){var r,o,i,a,s,l=e.state,c=l.schema.nodes[n.node],u=this.selectedNode(l,c),d=this.selectedNode(t,c);if((u||!d||t.doc.eq(e.state.doc))&&(u||d)){var p=l.tr;p.setMeta("addToHistory",!1),u&&d&&u.pos!==d.pos?(p.setMeta(Yu,{nodePosition:u.pos}),p.setNodeMarkup(d.pos,c,Pt(Pt({},d.node.attrs),((r={})[bt]=!1,r))),p.setNodeMarkup(u.pos,c,Pt(Pt({},u.node.attrs),((o={})[bt]=!0,o))),e.dispatch(p)):u&&d&&u.pos===d.pos&&!u.node.attrs[bt]&&!l.selection.eq(t.selection)?(p.setMeta(Yu,{nodePosition:u.pos}),e.dispatch(p.setNodeMarkup(u.pos,c,Pt(Pt({},u.node.attrs),((i={})[bt]=!0,i))))):u&&!d?(p.setMeta(Yu,{nodePosition:u.pos}),e.dispatch(p.setNodeMarkup(u.pos,c,Pt(Pt({},u.node.attrs),((a={})[bt]=!0,a))))):!u&&d&&(p.setMeta(Yu,{nodePosition:-1}),e.dispatch(p.setNodeMarkup(d.pos,c,Pt(Pt({},d.node.attrs),((s={})[bt]=!1,s)))))}}}},state:{init:function(){return new ud("",null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(e,t){return pd(e,t)}}}})),(e=$u,t=new ft({key:Xu,state:{init:function(t,n){return this.spec.props.nodeViews[ks(n.schema).table.name]=function(t,n){return new e(t,n)},new rd(-1,null)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return Qu(Xu,e)?null:Xu.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,t){return Zu(Xu,e.state)||function(e,t,n){var r=Xu.getState(e.state);if(!r.dragging){var o=td(t.target),i=-1;if(o){var a=function(e){var t=e.parentNode;return{cellIndex:e.cellIndex,rowIndex:t.rowIndex}}(o),s=o.getBoundingClientRect(),l=s.left,c=s.right;Math.abs(t.clientX-l)<=5&&a.cellIndex>0?(a.cellIndex--,i=od(e,t,a)):c-t.clientX>0&&c-t.clientX<=5&&(i=od(e,t,a))}i!==r.activeHandle&&ad(e,i)}}(e,t),!1},mouseleave:function(e){return function(e){var t=Xu.getState(e.state);t.activeHandle>-1&&!t.dragging&&ad(e,-1)}(e),!1},mousedown:function(e,t){return function(e,t,n){var r,o=Xu.getState(e.state);if(-1===o.activeHandle||o.dragging)return!1;for(var i=e.state.doc.resolve(o.activeHandle),a=i.parent,s=i.index(),l=0,c=0;c<=s;c++)l+=a.child(c).attrs.colspan;var u,d,p=i.node(i.depth-1),f=e.domAtPos(o.activeHandle),h=f.node.childNodes[f.offset].closest("table");if(p.attrs[yt])(u=(g=h.firstChild).children[l-1]).style.width||(u.style.width=u.offsetWidth+"px");else{var m=0;for(c=0;c<a.childCount;c++)m+=a.child(c).attrs.colspan;var g=document.createElement("colgroup"),v=new Array(m);for(c=0;c<m;c++)v[c]=document.createElement("col"),g.appendChild(v[c]);h.insertBefore(g,h.firstChild),(u=v[s]).style.width=u.offsetWidth+"px",d=Pt(Pt({},p.attrs),((r={})[yt]="<colgroup>"+v.reduce((function(e,t){return e+t.outerHTML}),"")+"</colgroup>",r))}var y=parseFloat(u.style.width),b=e.state.tr.setMeta(Xu,{setDragging:{startX:t.clientX,startWidth:y}});if(!h.style.width){var k=Array.from(u.parentNode.children).map((function(e){return e.style.width}));if(k.every(Boolean)){var w=k.reduce((function(e,t){return e+parseFloat(t)}),0);d=Gu(d||p.attrs,"width",w+"px")}}if(d){var C=i.posAtIndex(0,i.depth-1)-1;b.setNodeMarkup(C,null,d)}function x(t){t.view.removeEventListener("mouseup",x),t.view.removeEventListener("mousemove",O);var n=Xu.getState(e.state);if(n.dragging){var r=e.state.tr;!function(e,t,n,r){var o,i=e.state.doc.resolve(n),a=i.node(-1),s=i.start(-1),l=i.posAtIndex(0,i.depth-1)-1,c=e.nodeDOM(s).closest("table"),u=a.attrs;if(a&&u[yt]){var d=c.firstChild;u=Pt(Pt({},u),((o={})[yt]=d.outerHTML,o))}var p=c.style.width;c&&p&&Uu(u.style).width!==p&&(u=Gu(u,"width",p),t.setNodeMarkup(l,null,u))}(e,r,n.activeHandle,id(n.dragging,t,25)),e.dispatch(r.setMeta(Xu,{setDragging:null}))}}function O(t){if(!t.which)return x(t);var n=Xu.getState(e.state),r=id(n.dragging,t,25);!function(e,t,n,r){var o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=ms.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;"TABLE"!==l.nodeName&&(l=l.closest("table"));var c=l,u=c.firstChild,d=Array.from(u.children);if(d[s].style.width=n+"px",c.style.width){var p=d.map((function(e){return e.style.width}));if(p.every(Boolean)){var f=p.reduce((function(e,t){return e+parseFloat(t)}),0);c.style.width=f+"px"}}}(e,n.activeHandle,r)}return e.dispatch(b),t.view.addEventListener("mouseup",x),t.view.addEventListener("mousemove",O),t.preventDefault(),!0}(e,t)}},decorations:function(e){if(!Zu(Xu,e)){var t=Xu.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=ms.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,l=0;l<i.height;l++){var c=s+l*i.width-1;if(!(s!==i.width&&i.map[c]===i.map[c+1]||0!==l&&i.map[c-1]===i.map[c-1-i.width])){var u=i.map[c],d=a+u+o.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",n.push(_a.widget(d,p))}}return Fa.create(e.doc,n)}(e,t.activeHandle)}return Fa.empty},nodeViews:{}}}),t),hd()];var e,t,n};function bd(e={}){return new ft({view:t=>new kd(t,e)})}class kd{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),o=n?t.bottom:t.top;n&&r&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:t.left,right:t.right,top:o-this.width/2,bottom:o+this.width/2}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let n,r,o=this.editorView.dom.offsetParent;if(this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!o||o==document.body&&"static"==getComputedStyle(o).position)n=-pageXOffset,r=-pageYOffset;else{let e=o.getBoundingClientRect();n=e.left-o.scrollLeft,r=e.top-o.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-r+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t):r;if(t&&!o){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&(e=Pe(this.editorView.state.doc,e,this.editorView.dragging.slice),null==e))return this.setCursor(null);this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class wd extends Ge{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return wd.valid(n)?new wd(n):Ge.near(n)}content(){return f.empty}eq(e){return e instanceof wd&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new wd(e.resolve(t.pos))}getBookmark(){return new Cd(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&wd.valid(e))return e;let r=e.pos,o=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){o=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let a=e.doc.resolve(r);if(wd.valid(a))return a}for(;;){let i=t>0?o.firstChild:o.lastChild;if(!i){if(o.isAtom&&!o.isText&&!et.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),n=!1;continue e}break}o=i,r+=t;let a=e.doc.resolve(r);if(wd.valid(a))return a}return null}}}wd.prototype.visible=!1,wd.findFrom=wd.findGapCursorFrom,Ge.jsonID("gapcursor",wd);class Cd{constructor(e){this.pos=e}map(e){return new Cd(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return wd.valid(t)?new wd(t):Ge.near(t)}}function xd(){return new ft({props:{decorations:Nd,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&wd.valid(n)?new wd(n):null,handleClick:Ed,handleKeyDown:Od,handleDOMEvents:{beforeinput:Id}}})}const Od=ao({ArrowLeft:Sd("horiz",-1),ArrowRight:Sd("horiz",1),ArrowUp:Sd("vert",-1),ArrowDown:Sd("vert",1)});function Sd(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){let i=e.selection,a=t>0?i.$to:i.$from,s=i.empty;if(i instanceof Ze){if(!o.endOfTextblock(n)||0==a.depth)return!1;s=!1,a=e.doc.resolve(t>0?a.after():a.before())}let l=wd.findGapCursorFrom(a,t,s);return!!l&&(r&&r(e.tr.setSelection(new wd(l))),!0)}}function Ed(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!wd.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&et.isSelectable(e.state.doc.nodeAt(o.inside))||(e.dispatch(e.state.tr.setSelection(new wd(r))),0))}function Id(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof wd))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=s.empty;for(let e=r.length-1;e>=0;e--)o=s.from(r[e].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new f(o,0,0));return i.setSelection(Ze.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function Nd(e){if(!(e.selection instanceof wd))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Fa.create(e.doc,[_a.widget(e.selection.head,t,{key:"gapcursor"})])}var Td=function(e,t,n){for(var r,o=e.table,i=e.table_row,a=e.table_cell,s=[],l=0;l<t+1;l++){r=[];for(var c=0;c<n+1;c++)r.push(a.createAndFill());s.push(i.createAndFill(void 0,r))}return o.createAndFill(void 0,s)},Md=function(e,t){for(var n=e.$head,r=n.depth;r>0;r--){var o=n.node(r);if(o.type.name===t)return{pos:n.before(r),node:o}}return null},Dd=function(e,t){var n=t&&function(e){var n,r=Md(e.selection,"table_row"),o=Md(e.selection,"table");if(r&&o&&r.node.attrs[vt]){for(var i=0,a=0;a<o.node.nodeSize;a++)if(o.node.child(a).eq(r.node)){i=a;break}var s=o.node.child(i-1),l=r.pos-s.nodeSize;e.setNodeMarkup(l,void 0,((n={})[vt]=r.node.attrs[vt],n))}return t(e)};return ul(e,n)},Rd=function(e,t){return dl(e,t&&function(e){var n,r=Md(e.selection,"table_row");if(r&&r.node.attrs[vt]){var o=r.pos+r.node.nodeSize;e.setNodeMarkup(o,void 0,((n={})[vt]=r.node.attrs[vt],n))}return t(e)})}},1574:(e,t,n)=>{n.r(t),n.d(t,{Checkbox:()=>dn,CheckboxPropsContext:()=>un,ColorGradient:()=>ct,ColorGradientPropsContext:()=>lt,ColorPalette:()=>gt,ColorPalettePropsContext:()=>mt,ColorPicker:()=>Ot,ColorPickerPropsContext:()=>xt,FlatColorPicker:()=>Nt,Input:()=>He,InputPropsContext:()=>Ve,MaskedTextBox:()=>Ut,MaskedTextBoxPropsContext:()=>qt,NumericTextBox:()=>Fe,NumericTextBoxPropsContext:()=>je,RadioButton:()=>hn,RadioButtonPropsContext:()=>fn,RadioGroup:()=>yn,RadioGroupPropsContext:()=>vn,RangeSlider:()=>Qt,RangeSliderPropsContext:()=>Zt,Rating:()=>_n,RatingItem:()=>xn,RatingPropsContext:()=>Pn,SLIDER_LABEL_ATTRIBUTE:()=>W,Slider:()=>J,SliderLabel:()=>$,SliderPropsContext:()=>X,Switch:()=>ln,SwitchPropsContext:()=>sn,TextArea:()=>Cn,TextAreaPropsContext:()=>wn});var r,o,i=n(3899),a=n(189),s=n(9124),l=n(3198),c=n(8047),u=n(4703),d=n(1779),p=n(848),f=n(4006),h={name:"@progress/kendo-react-inputs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660123787,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},m=n(3493),g=n(5407),v=n(499),y="numerictextbox.increment",b="numerictextbox.decrement",k="slider.dragTitle",w="colorGradient.r",C="colorGradient.g",x="colorGradient.b",O="colorGradient.a",S="colorGradient.hex",E="colorGradient.contrastRatio",I="colorGradient.colorGradientAALevel",N="colorGradient.colorGradientAAALevel",T="colorGradient.colorGradientPass",M="colorGradient.colorGradientFail",D="colorGradient.hueSliderLabel",R="colorGradient.alphaSliderLabel",P="colorGradient.toggleInputsButton",_="flatColorPicker.cancelBtn",A="flatColorPicker.applyBtn",j="checkbox.validation",F="checkbox.optionalText",z="switch.validation",L="colorPicker.dropdownButtonAriaLabel",B="rating.ariaLabel",V=((r={})[y]="Increase value",r[b]="Decrease value",r["slider.increment"]="Increase",r["slider.decrement"]="Decrease",r[k]="Drag",r[w]="r",r[C]="g",r[x]="b",r[O]="a",r[S]="hex",r[E]="Contrast ratio",r[I]="AA",r[N]="AAA",r[T]="Pass",r[M]="Fail",r[D]="Hue slider",r[R]="Alpha slider",r[P]="Toggle colorgradient inputs",r[_]="Cancel",r[A]="Apply",r[j]="Please check this box if you want to proceed!",r[F]="(Optional)",r["radioButton.validation"]="Please select option if you want to proceed!",r[z]="Please turn on if you want to proceed!",r[L]="Select",r[B]="Rating",r),H=n(8199),K=function(){return K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},K.apply(this,arguments)},W="data-slider-label",$=function(e){var t,n,r=i.useRef(null),o=(0,H.n)(r),a=e.vertical?{bottom:"".concat(e.position,"%")}:((t={})["rtl"===o?"right":"left"]="".concat(e.position,"%"),t),s=e.vertical?"k-tick-vertical":"k-tick-horizontal";return i.createElement("li",{ref:r,className:"k-tick k-tick-large ".concat(s),title:e.title,style:K({zIndex:1,position:"absolute"},a)},i.createElement("span",K({},((n={})[W]=!0,n),{className:"k-label",onClick:e.onClick}),e.children))},q=n(7037),U=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),G=function(){return G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},G.apply(this,arguments)},Y=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:void 0===n.props.defaultValue?n.props.min:n.props.defaultValue,focused:!1,dir:n.props.dir},n._sliderTrack=null,n._element=null,n.buttons=function(e){return e.enabled?i.createElement(i.Fragment,null,i.createElement(q.z,{className:"k-button-decrease k-rounded-full",icon:n.props.vertical?"arrow-s":"arrow-w",title:e.decrementTitle,onClick:e.decrement}),e.children,i.createElement(q.z,{className:"k-button-increase k-rounded-full",icon:n.props.vertical?"arrow-n":"arrow-e",title:e.incrementTitle,onClick:e.increment})):e.children},n.focus=function(){n._element&&n._element.focus()},n.isLabel=function(e){for(var t=e;t;){if(Boolean(t.getAttribute(W)))return!0;t=t.parentElement}return!1},n.onFocus=function(){n.setState({focused:!0})},n.onBlur=function(){n.setState({focused:!1})},n.onKeyDown=function(e){var t=void 0;e.keyCode===m.R.left||e.keyCode===m.R.down?t=n.state.value-(n.props.step||0):e.keyCode===m.R.right||e.keyCode===m.R.up?t=n.state.value+(n.props.step||0):e.keyCode===m.R.home?t=n.props.min:e.keyCode===m.R.end&&(t=n.props.max),void 0!==t&&(e.preventDefault(),n.change(e,t))},n.decrement=function(e){e.preventDefault(),n.change(e,n.state.value-(n.props.step||0))},n.increment=function(e){e.preventDefault(),n.change(e,n.state.value+(n.props.step||0))},n.dragStart=function(e){n.isLabel(e.event.originalEvent.target)||(e.event.isTouch&&e.event.originalEvent.preventDefault(),n.drag(e))},n.dragOver=function(e){e.event.originalEvent.preventDefault(),n.drag(e)},n.drag=function(e){var t=e.element.getBoundingClientRect(),r=(n.props.vertical?t.bottom-e.event.clientY:"rtl"===n.state.dir?t.right-e.event.clientX:e.event.clientX-t.left)/(n.props.vertical?t.height:t.width);n.change(e,n.props.min+r*(n.props.max-n.props.min))},(0,f.s)(h),n}return U(t,e),t.getDerivedStateFromProps=function(e,t){var n=void 0!==e.value?e.value:t.value,r=e.min,o=e.max;return void 0===n?null:{value:Math.min(Math.max(n,r),o)}},t.prototype.componentDidMount=function(){if(!this.state.dir&&window&&this._element){var e=window.getComputedStyle(this._element).direction;e&&this.setState({dir:e})}},t.prototype.render=function(){var e,t=this,n=(0,v.provideLocalizationService)(this),r=(this.state.value-this.props.min)/(this.props.max-this.props.min)*100,o=this.props.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},a=this.props.vertical?{paddingTop:0,height:"100%"}:{};return i.createElement("div",{ref:function(e){return t._element=e},dir:this.state.dir,id:this.props.id,style:G({gap:0},this.props.style),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,className:(0,c.A)("k-slider k-widget",{"k-focus":this.state.focused,"k-disabled":this.props.disabled,"k-slider-horizontal":!this.props.vertical,"k-slider-vertical":this.props.vertical},this.props.className)},i.createElement(this.buttons,{enabled:this.props.buttons,decrement:this.decrement,increment:this.increment,incrementTitle:n.toLanguageString("slider.increment",V["slider.increment"]),decrementTitle:n.toLanguageString("slider.decrement",V["slider.decrement"])},i.createElement(d._,{onDrag:this.dragOver,onPress:this.dragStart},i.createElement("div",{className:"k-slider-track-wrap",style:G({flexGrow:1,position:"relative",touchAction:"none"},o)},this.props.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:G({margin:0},a)},i.Children.map(this.props.children,(function(e){return e&&i.cloneElement(e,{position:100*(e.props.position-t.props.min)/(t.props.max-t.props.min),vertical:t.props.vertical},e.props.children)}))),i.createElement("div",{className:"k-slider-track",style:this.props.vertical?{bottom:0,height:"100%"}:(e={},e["rtl"===this.state.dir?"right":"left"]=0,e.width="100%",e),ref:function(e){return t._sliderTrack=e}},i.createElement("div",{className:"k-slider-selection",style:this.props.vertical?{height:r+"%"}:{width:r+"%"}}),i.createElement("span",{role:"slider","aria-valuemin":this.props.min,"aria-valuemax":this.props.max,"aria-valuenow":this.state.value,"aria-valuetext":String(this.state.value),"aria-orientation":this.props.vertical?"vertical":void 0,"aria-disabled":this.props.disabled?"true":void 0,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel,tabIndex:(0,u.p)(this.props.tabIndex,this.props.disabled,void 0),className:"k-draghandle",title:n.toLanguageString(k,V[k]),style:this.props.vertical?{bottom:"calc("+r+"%)",zIndex:1}:"rtl"===this.state.dir?{right:"calc("+r+"% - 13px)",zIndex:1}:{left:"calc("+r+"%)",zIndex:1}}))))))},Object.defineProperty(t.prototype,"sliderTrack",{get:function(){return this._sliderTrack},enumerable:!1,configurable:!0}),t.prototype.change=function(e,t){t=Math.min(Math.max(t,this.props.min),this.props.max),this.setState({value:t}),(0,g.N)(this.props.onChange,e,this,{value:t})},t.displayName="Slider",t.propTypes={min:a.number.isRequired,max:a.number.isRequired,value:a.number,vertical:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,ariaLabel:a.string},t}(i.Component),X=(0,p.Y)(),J=(0,p.u)(X,Y);J.displayName="KendoReactSlider",(0,v.registerForLocalization)(Y);var Z=function(e){return null!=e},Q=function(e,t,n){return!Z(e)||isNaN(e)||e<=t?t:e>=n?n:e},ee=n(4407),te=function(e,t,n){if(void 0===n&&(n=!0),-1===["hex","rgba"].indexOf(t))throw new Error("Unsupported color output format '".concat(t,"'. The available options are 'hex' or 'rgba'."));if(Z(e)){var r=(0,ee.parseColor)(e.trim(),n);if(Z(r))return"hex"===t?r.toCss():r.toCssRgba()}},ne=function(e,t){void 0===t&&(t=!0);var n=(0,ee.parseColor)(e,t);return Z(n)?n.toHSV():{}},re=function(e,t){void 0===t&&(t=!0);var n=(0,ee.parseColor)(e,t);return Z(n)?n.toBytes():{}},oe=function(e){var t=Q(e.h,0,359.9),n=Q(e.s,0,1),r=Q(e.v,0,1),o=Q(e.a,0,1);return ee.Color.fromHSV(t,n,r,o).toCssRgba()},ie=function(e){return oe({h:e,s:1,v:1,a:1})},ae=function(e,t){var n=Q(e.r,0,255),r=Q(e.g,0,255),o=Q(e.b,0,255),i=Q(e.a,0,1),a=Q(t.r,0,255),s=Q(t.g,0,255),l=Q(t.b,0,255);return{r:Math.round((1-i)*a+i*n),g:Math.round((1-i)*s+i*r),b:Math.round((1-i)*l+i*o)}},se=function(e){var t=[e.r||0,e.g||0,e.b||0].map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*t[0]+.7152*t[1]+.0722*t[2]},le=function(e,t){return n=se(ae(e,t)),r=se(ae(t,{r:0,g:0,b:0,a:1})),(Math.max(n,r)+.05)/(Math.min(n,r)+.05);var n,r},ce={},ue=n(9656),de=n(2697),pe=n(6097),fe=function(){return fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fe.apply(this,arguments)},he=1111111.1111111,me=/\d/,ge=function(e,t){return void 0!==e?e:t},ve=function(e,t,n){return null===e&&void 0===e?"":"string"==typeof e?e:n.formatNumber(e,t)},ye=function(e){return(String(e).split(".")[1]||"").length},be=function(e,t){return Math.max(ye(e),ye(t))},ke=function(e,t){var n=function(e){return Math.min(e,15)}(t);return parseFloat(e.toFixed(n))},we=function(e,t,n,r,o,i,a){var s=be(e||0,n||0),l=xe(ke((e||0)+(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=ve(l,i,a),t.selectionStart=t.selectionEnd=Ne(t.currentLooseValue,me)},Ce=function(e,t,n,r,o,i,a){var s=be(e||0,n||0),l=xe(ke((e||0)-(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=ve(l,i,a),t.selectionStart=t.selectionEnd=Ne(t.currentLooseValue,me)},xe=function(e,t,n){return null==e?e:e>1||e<1||1===e?void 0!==n&&void 0!==t&&n<t?null:(void 0!==n&&e>n&&(e=n),void 0!==t&&e<t&&(e=t),e):null},Oe=function(e,t,n,r){e.selectionStart=e.selectionEnd=t,function(e,t,n){var r=function(e,t){var n=t.findIndex((function(t){t[0];var n=t[1];return Boolean(n)&&e.indexOf(n)===e.length-n.length}));if(-1===n)return-1;var r=t[n][1];return e.length-r.length}(e,t);if(-1!==r&&n.selectionStart>r)n.selectionStart=n.selectionEnd=r;else{n.selectionStart>e.length&&(n.selectionStart=n.selectionEnd=e.length);var o=function(e,t){var n=t.findIndex((function(t){var n=t[0];return t[1],Boolean(n)&&0===e.indexOf(n)}));return-1===n?-1:t[n][0].length}(e,t);-1!==o&&n.selectionStart<o&&(n.selectionStart=n.selectionEnd=o),-1===n.selectionStart&&(n.selectionStart=n.selectionEnd=0)}}(n,r,e)},Se=function(e,t,n,r){e.eventValue=r.parseNumber(e.prevLooseValue,t),e.currentLooseValue=e.prevLooseValue,e.valueIsCorrected=!0,Oe(e,e.selectionStart,e.currentLooseValue,n)},Ee=function(e,t){var n=e.indexOf(t.decimal);return n>-1?n:Ne(e,me)},Ie=function(e){return e.split("").reverse().join("")},Ne=function(e,t){return e.length-Ie(e).search(t)},Te=function(e){return e.split(e[e.search(me)])[0]},Me=function(e){var t=Ie(e);return Ie(t.split(t[t.search(me)])[0])},De=function(e,t){return e.search(t)},Re=function(e,t){var n=e.indexOf(t);return n>-1?e.length-n-1:0},Pe=function(e,t,n,r,o){var i="0"===e.replace(o,"")[0],a="0"===t.replace(o,"")[0];if(i&&!a)return n-1;if(a&&r)return n+1;for(var s=0,l=0;l<n;l++)me.test(e.charAt(l))&&s++;for(var c=0;s>0&&t.length>c;)me.test(t.charAt(c))&&s--,c++;return c},_e=function(e,t,n){var r=fe({},e),o=r.prevLooseValue,i=n.numberSymbols(),a=function(e,t){var n=t.formatNumber(he,e),r=t.formatNumber(-he,e),o=t.formatNumber(0,e),i=t.formatNumber(1,e),a=t.numberSymbols(),s=new RegExp("[\\d\\".concat(a.decimal).concat(a.group,"]"),"g");return[n,r,o,i].map((function(e){return e.replace(s,"")})).join("").split("").filter((function(e,t,n){return n.indexOf(e)===t})).join("")}(t,n),s=String(r.currentLooseValue),l=String(o),c=new RegExp("[^\\d\\".concat(i.decimal,"]"),"g"),u=new RegExp("[^\\d\\".concat(i.decimal,"\\").concat(i.group,"]"),"g"),d=new RegExp("[\\d\\".concat(i.decimal,"\\").concat(i.group,"]")),p=s.replace(c,""),f=De(s,me),h=-1===f?-1:Ne(s,me),m=s.indexOf(i.decimal),g=(s.substring(0,f)+s.substring(f,h).replace(u,"")+s.substring(h,s.length)).split("").filter((function(e){return-1!==a.indexOf(e)||-1!==e.search(d)})).join(""),v=n.formatNumber(.31111111111111117,t).replace(c,""),y=v.indexOf(i.decimal),b=y>-1?v.length-y-1:0,k=n.formatNumber(1,t).replace(c,""),w=k.indexOf(i.decimal),C=w>-1?k.length-w-1:0,x=function(e,t){var n=t.formatNumber(he,e),r=t.formatNumber(-he,e),o=t.formatNumber(0,e),i=t.formatNumber(1,e),a=Te(n),s=Te(r),l=Te(o),c=Te(i);return{positiveInfo:[a,Me(n)],negativeInfo:[s,Me(r)],zeroInfo:[l,Me(o)],oneInfo:[c,Me(i)]}}(t,n),O=[x.positiveInfo,x.negativeInfo,x.zeroInfo,x.oneInfo],S=1!==O.findIndex((function(e){return-1!==e.findIndex((function(e){return Boolean(e)}))})),E=s.length>0&&s.length<l.length,I="string"==typeof t&&"p"===t[0]&&s&&-1===s.indexOf(i.percentSign);if(!r.isPaste){if(""===s)return r.eventValue=null,r.currentLooseValue="",r;if(r.currentLooseValue===i.minusSign&&n.formatNumber(-0,t)!==l)return r.eventValue=-0,r.currentLooseValue=ve(r.eventValue,t,n),Oe(r,Ee(r.currentLooseValue,i),r.currentLooseValue,O),r;if(function(e,t){var n=String(e.currentLooseValue),r=String(e.prevLooseValue);return n.split(t.minusSign).length!==r.split(t.minusSign).length&&n.length===r.length+t.minusSign.length}(r,i)){var N=n.parseNumber(o,t);r.eventValue=-(null!==N?N:0),r.currentLooseValue=ve(r.eventValue,t,n);var T=De(r.currentLooseValue,me),M=De(l,me);return Oe(r,r.selectionEnd-1+(T-M),r.currentLooseValue,O),r}if(function(e,t){var n=String(e.currentLooseValue),r=String(e.prevLooseValue);return-1===n.indexOf(t.minusSign)&&-1!==r.indexOf(t.minusSign)}(r,i))return r.eventValue=n.parseNumber(r.currentLooseValue,t),Oe(r,r.selectionStart,r.currentLooseValue,O),r;if(r.currentLooseValue===i.decimal){r.eventValue=0;var D=ve(r.eventValue,t,n);if(0===C&&b>0){var R=Ne(D,me);r.currentLooseValue=D.substring(0,R)+i.decimal+D.substring(R)}else r.currentLooseValue=D;return Oe(r,Ee(r.currentLooseValue,i)+1,r.currentLooseValue,O),r}if(function(e,t){return String(e.currentLooseValue).split(t.decimal).length>2}(r,i))return Se(r,t,O,n),r;if(I)return r.eventValue=n.parseNumber(s,t)/100,r.currentLooseValue=ve(r.eventValue,t,n),r;if(String(r.currentLooseValue).replace(/[^\d]/g,"").length>15)return Se(r,t,O,n),r;if(p!==s&&s&&S){var P=O.findIndex((function(e){var t=e[0],n=e[1],r=s.indexOf(t),o=s.indexOf(n),a=0===r,l=o===s.length-n.length,c=r+t.length!==f&&-1!==f&&s[r+t.length]!==i.decimal,u=o!==h&&-1!==h&&s[o-1]!==i.decimal;return t&&n?!c&&!u&&a&&l:t?!c&&a:!!n&&!u&&l}));if(-1===P)return Se(r,t,O,n),r}if(p[p.length-1]===i.decimal&&b>0)return r.eventValue=n.parseNumber(s,t),r.currentLooseValue=g,r;if(r.currentLooseValue&&o&&(a+i.decimal+i.group).split("").findIndex((function(e){return s.split("").filter((function(t){return t===e})).length<l.split("").filter((function(t){return t===e})).length&&s.length+1===l.length&&(e!==i.decimal||0!==Re(l.replace(c,""),i.decimal))}))>-1)return r.eventValue=n.parseNumber(e.prevLooseValue,t),r.currentLooseValue=e.prevLooseValue,r;var _=Re(p,i.decimal),A="0"===p[p.length-1];if(E&&A&&_<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=ve(r.eventValue,t,n),r;if(_>0){var j=s.substring(0,m);if(A&&(!j||0!==l.indexOf(j))){r.eventValue=n.parseNumber(r.currentLooseValue,t);var F=ve(r.eventValue,t,n);return Oe(r,Pe(s,F,r.selectionEnd,E,c),F,O),r.currentLooseValue=F,r}if(_>b){var z=s.indexOf(i.decimal),L=s.substring(0,z)+s.substring(z,z+1+b)+s.substring(h,String(r.currentLooseValue).length);return r.eventValue=n.parseNumber(L,t),r.currentLooseValue=L,Oe(r,r.selectionStart,L,O),r}if(C!==b&&_<=b&&A)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=g,r;if(_<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=ve(r.eventValue,t,n),r}}return r.eventValue=n.parseNumber(r.currentLooseValue,t),I&&(r.eventValue=r.eventValue/100),"number"==typeof r.eventValue?(F=ve(r.eventValue,t,n),1===s.length?Oe(r,Ee(F,i),F,O):Oe(r,Pe(s,F,r.selectionEnd,E,c),F,O),r.currentLooseValue=F):r.currentLooseValue=ve(n.parseNumber(p),t,n),r},Ae=function(){return Ae=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ae.apply(this,arguments)},je=(0,p.Y)(),Fe=i.forwardRef((function(e,t){var n;(0,f.s)(h);var r=(0,ue.Y)(je,e),o=i.useMemo((function(){return(0,l.M)()}),[]),a=r.id||o,s=(0,v.useInternationalization)(),d=(0,v.useLocalization)(),p=i.useRef(null),m=i.useRef(),k=i.useState(!1),w=k[0],C=k[1],x=i.useRef({eventValue:null,prevLooseValue:"",currentLooseValue:"",focused:!1,selectionStart:void 0,selectionEnd:void 0,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1}),O=i.useRef(!1),S=i.useRef(),E=i.useRef(r.defaultValue),I=ve(x.current.focused&&!r.disabled?x.current.currentLooseValue:ge(r.value,E.current),r.format,s);S.current=I,i.useEffect((function(){p.current&&p.current.setCustomValidity&&p.current.setCustomValidity(R().valid?"":r.validationMessage||"Please enter a valid value!")}));var N=i.useCallback((function(){p.current&&p.current.focus()}),[]),T=i.useCallback((function(){return void 0!==m.current?m.current:ge(r.value,E.current)}),[r.value]),M=i.useCallback((function(){return r.name}),[r.name]),D=i.useCallback((function(){return r.required}),[r.required]),R=i.useCallback((function(){var e=void 0!==r.validationMessage,t=T();return{customError:e,valid:void 0!==r.valid?r.valid:!(x.current.valueIsOutOfRange||D()&&null==t),valueMissing:null==t}}),[r.validationMessage,r.valid,T,D]),P=i.useCallback((function(){return r.validityStyles}),[r.validityStyles]),_=i.useCallback((function(){return r}),[r]),A=i.useCallback((function(){var e={element:p.current,focus:N};return Object.defineProperty(e,"name",{get:M}),Object.defineProperty(e,"value",{get:T}),Object.defineProperty(e,"validity",{get:R}),Object.defineProperty(e,"validityStyles",{get:P}),Object.defineProperty(e,"required",{get:D}),Object.defineProperty(e,"props",{get:_}),e}),[M,T,R,P,D,N,_]);i.useImperativeHandle(t,A);var j=i.useCallback((function(){return{eventValue:ge(r.value,E.current),prevLooseValue:S.current,currentLooseValue:p.current.value,selectionStart:p.current.selectionStart,selectionEnd:p.current.selectionEnd,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1,isPaste:O.current,focused:x.current.focused}}),[r.value]),F=i.useCallback((function(e,t){if(!r.disabled){m.current=t.eventValue,E.current=t.eventValue;var n=ve(xe(t.eventValue,r.min,r.max),r.format,s),o=xe(s.parseNumber(n,r.format),r.min,r.max);o!==t.eventValue&&(t.valueIsOutOfRange=!0,t.eventValue=o,E.current=o),r.value!==t.eventValue&&(0,g.N)(r.onChange,e,A(),{value:t.eventValue}),m.current=void 0,x.current=t,C((function(e){return!e}))}}),[r.value,r.onChange,r.disabled,C,A]),z=i.useCallback((function(e){var t=j();O.current=!1,F(e,_e(t,r.format,s))}),[r.format,r.onChange,s,F,j]),L=i.useCallback((function(e){var t=j(),n=s.parseNumber(String(t.currentLooseValue),r.format);if(t.selectionEnd>t.selectionStart&&t.selectionEnd-t.selectionStart===String(t.currentLooseValue).length)O.current=!0;else{switch(e.keyCode){case 38:we(n,t,r.step,r.min,r.max,r.format,s);break;case 40:Ce(n,t,r.step,r.min,r.max,r.format,s);break;case 13:if(!1===r.rangeOnEnter)return;var o=ve(xe(n,r.min,r.max),r.format,s),i=xe(s.parseNumber(o,r.format),r.min,r.max);t.eventValue=i,t.currentLooseValue=ve(i,r.format,s),t.selectionStart=t.selectionEnd=t.currentLooseValue.length;break;case 110:var a=p.current,l=s.numberSymbols();a&&(t.currentLooseValue=t.currentLooseValue.slice(0,t.selectionStart)+l.decimal+t.currentLooseValue.slice(t.selectionEnd),t.selectionStart=t.selectionEnd=t.selectionStart+1,t=_e(t,r.format,s));break;default:return}e.preventDefault(),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.rangeOnEnter,F,j]),B=i.useCallback((function(){O.current=!0}),[]),H=i.useCallback((function(e){if(!r.readOnly&&!r.disabled){var t=j();we(s.parseNumber(String(t.currentLooseValue),r.format),t,r.step,r.min,r.max,r.format,s),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.readOnly,r.disabled,F,j]),K=i.useCallback((function(e){if(!r.readOnly&&!r.disabled){var t=j();Ce(s.parseNumber(String(t.currentLooseValue),r.format),t,r.step,r.min,r.max,r.format,s),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.readOnly,r.disabled,F,j]),W=i.useCallback((function(e){document&&document.activeElement===p.current&&p.current&&!r.readOnly&&!r.disabled&&(e.nativeEvent.deltaY<0&&H(e),e.nativeEvent.deltaY>0&&K(e))}),[H,K,r.disabled,r.readOnly]),$=i.useCallback((function(e){x.current.currentLooseValue=S.current,x.current.focused=!0,(0,g.N)(r.onFocus,e,A(),{}),C((function(e){return!e}))}),[r.onFocus,C,A]),U=i.useCallback((function(e){x.current={eventValue:null,prevLooseValue:"",currentLooseValue:"",focused:!1,selectionStart:void 0,selectionEnd:void 0,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1},(0,g.N)(r.onBlur,e,A(),{}),C((function(e){return!e}))}),[r.onBlur,C,A]),G=i.useCallback((function(e){document&&p.current&&(e.preventDefault(),document.activeElement!==p.current&&p.current.focus())}),[]);i.useLayoutEffect((function(){p.current&&void 0!==x.current.selectionStart&&void 0!==x.current.selectionEnd&&(p.current.selectionStart=x.current.selectionStart,p.current.selectionEnd=x.current.selectionEnd,x.current.selectionStart=void 0,x.current.selectionEnd=void 0)}),[w]);var Y=!P()||R().valid,X=i.createElement("span",{dir:r.dir,style:r.label?r.style:Ae({width:r.width},r.style),className:(0,c.A)("k-input","k-numerictextbox",(n={},n["k-input-".concat(de.G.sizeMap[r.size]||r.size)]=r.size,n["k-input-".concat(r.fillMode)]=r.fillMode,n["k-rounded-".concat(de.G.roundedMap[r.rounded]||r.rounded)]=r.rounded,n["k-invalid"]=!Y,n["k-required"]=r.required,n["k-disabled"]=r.disabled,n),r.className),"aria-disabled":r.disabled?"true":void 0},i.createElement("input",{value:null===I?"":I,tabIndex:(0,u.p)(r.tabIndex,r.disabled),accessKey:r.accessKey,disabled:r.disabled,title:r.title,"aria-valuemin":r.min,"aria-valuemax":r.max,"aria-label":r.ariaLabel,"aria-labelledby":r.ariaLabelledBy,"aria-describedby":r.ariaDescribedBy,placeholder:r.placeholder,spellCheck:!1,autoComplete:"off",autoCorrect:"off",type:r.inputType||"tel",className:"k-input-inner",id:a,name:r.name,readOnly:r.readOnly,style:r.inputStyle,onChange:z,onFocus:$,onBlur:U,onKeyDown:L,onPaste:B,onWheel:W,ref:p}),r.children,r.spinners&&i.createElement("span",{className:"k-input-spinner k-spin-button",onMouseDown:G},i.createElement(q.z,{tabIndex:-1,type:"button",icon:"arrow-n",rounded:null,className:"k-spinner-increase","aria-label":d.toLanguageString(y,V[y]),title:d.toLanguageString(y,V[y]),onClick:H}),i.createElement(q.z,{tabIndex:-1,type:"button",icon:"arrow-s",rounded:null,className:"k-spinner-decrease","aria-label":d.toLanguageString(b,V[b]),title:d.toLanguageString(b,V[b]),onClick:K})));return r.label?i.createElement(pe._,{label:r.label,editorId:a,editorValue:null===I?"":I,editorValid:Y,editorDisabled:r.disabled,editorPlaceholder:r.placeholder,children:X,style:{width:r.width},dir:r.dir}):X}));Fe.propTypes={value:a.number,defaultValue:a.number,step:a.number,format:a.oneOfType([a.string,a.shape({style:a.oneOf(["decimal","currency","percent","scientific","accounting"]),currency:a.string,currencyDisplay:a.oneOf(["symbol","code","name"]),useGrouping:a.bool,minimumIntegerDigits:a.number,minimumFractionDigits:a.number,maximumFractionDigits:a.number})]),width:a.oneOfType([a.string,a.number]),tabIndex:a.number,accessKey:a.string,title:a.string,placeholder:a.string,min:a.number,max:a.number,spinners:a.bool,disabled:a.bool,readOnly:a.bool,dir:a.string,name:a.string,label:a.string,validationMessage:a.string,required:a.bool,id:a.string,rangeOnEnter:a.bool,ariaLabelledBy:a.string,ariaDescribedBy:a.string,ariaLabel:a.string,onChange:a.func,onFocus:a.func,onBlur:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])},Fe.displayName="KendoNumericTextBox",Fe.defaultProps={step:1,spinners:!0,disabled:!1,required:!1,validityStyles:!0,rangeOnEnter:!0,onChange:function(e){},onFocus:function(e){},onBlur:function(e){},size:"medium",rounded:"medium",fillMode:"solid"};var ze=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Le=function(){return Le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Le.apply(this,arguments)},Be=function(e){function t(n){var r=e.call(this,n)||this;return r._input=null,r._inputId=(0,l.M)(),r.focus=function(){r._input&&r._input.focus()},r.isInvalid=function(e){var t=!1;for(var n in e)e.hasOwnProperty(n)&&(t=t||Boolean(e[n]));return t},r.setValidity=function(){r._input&&r._input.setCustomValidity&&(r.validity.valid||!r.validityStyles?r._input.classList.remove("k-invalid"):r._input.classList.add("k-invalid"),r._input.setCustomValidity(r.validity.valid?"":r.props.validationMessage||""))},r.handleChange=function(e){r.setState({value:e.target.value}),r.valueDuringOnChange=e.target.value,r.props.onChange&&r.props.onChange.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:e.target.value,target:r}),r.valueDuringOnChange=void 0},r.handleAutoFill=function(e){if("autoFillStart"===e.animationName){var t=e.target.parentNode;t&&t.classList.contains("k-empty")&&t.classList.remove("k-empty")}},(0,f.s)(h),r.state={value:r.props.defaultValue||t.defaultProps.defaultValue},r}return ze(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e={badInput:!!this._input&&this._input.validity.badInput,patternMismatch:!!this._input&&this._input.validity.patternMismatch,rangeOverflow:!!this._input&&this._input.validity.rangeOverflow,rangeUnderflow:!!this._input&&this._input.validity.rangeUnderflow,stepMismatch:!!this._input&&this._input.validity.stepMismatch,tooLong:!!this._input&&this._input.validity.tooLong,typeMismatch:!!this._input&&this._input.validity.typeMismatch,valueMissing:!!this._input&&this._input.validity.valueMissing};return Le(Le({},e),{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!this._input||!this.isInvalid(e)})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.setValidity()},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.label,o=t.id,a=(t.validationMessage,t.defaultValue,t.valid,t.visited,t.touched,t.modified,t.ariaLabelledBy),s=t.ariaDescribedBy,l=(t.validityStyles,t.style),u=t.ariaLabel,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["className","label","id","validationMessage","defaultValue","valid","visited","touched","modified","ariaLabelledBy","ariaDescribedBy","validityStyles","style","ariaLabel"]),p=o||this._inputId,f=!this.validityStyles||this.validity.valid,h=(0,c.A)(n,"k-input k-input-md k-rounded-md k-input-solid"),m=i.createElement("input",Le({"aria-labelledby":a,"aria-describedby":s,"aria-disabled":this.props.disabled||void 0,"aria-invalid":!f||void 0,"aria-label":u||void 0},d,{style:r?void 0:l,value:this.value,id:p,className:h,onChange:this.handleChange,onAnimationStart:this.handleAutoFill,ref:function(t){e._input=t}}));return r?i.createElement(pe._,{label:r,editorId:p,editorValue:String(this.value),editorValid:f,editorDisabled:d.disabled,editorPlaceholder:d.placeholder,children:m,style:l,dir:d.dir}):m},t.displayName="Input",t.propTypes={label:a.string,validationMessage:a.string,required:a.bool,validate:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,ariaLabel:a.string},t.defaultProps={defaultValue:"",required:!1,validityStyles:!0},t}(i.Component),Ve=(0,p.Y)(),He=(0,p.u)(Ve,Be);He.displayName="KendoReactInput";var Ke=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const We=function(e){function t(t){var n=e.call(this,t)||this;return n.onChange=function(e){var t=e.target.value,r=te(t,"rgba");n.setState({hex:t}),Z(r)&&n.props.onHexChange(t,r,e)},n.onBlur=function(){Z(te(n.state.hex,"rgba"))||n.setState({hex:n.state.originalHex})},n.state={hex:n.props.hex,originalHex:n.props.hex},n}return Ke(t,e),t.prototype.render=function(){return i.createElement(He,{value:this.state.hex,onChange:this.onChange,onBlur:this.onBlur,disabled:this.props.disabled})},t.getDerivedStateFromProps=function(e,t){return e.hex!==t.originalHex?{hex:e.hex,originalHex:e.hex}:null},t}(i.Component);var $e=n(2609),qe=n(8011),Ue=function(e){(0,f.s)(qe.k);var t=e.id,n=e.editorId,r=e.editorRef,o=e.editorDisabled,a=e.children,s=e.editorValid,l=e.style,u=e.className,d=e.optional,p=(0,v.useLocalization)(),h=d?p.toLanguageString($e.y,$e.s[$e.y]):"",m=h&&i.createElement("span",{className:"k-label-optional"},h),g=i.useCallback((function(e){if(r&&r.current&&!o){r.current.focus&&(e.preventDefault(),r.current.focus());var t=r.current.actionElement;t&&(e.preventDefault(),t.click())}}),[r]),y=(0,c.A)({"k-label":!0,"k-label-empty":!a,"k-text-error":!1===s,"k-text-disabled":!0===o},u);return i.createElement("label",{id:t,htmlFor:n,onClick:g,style:l,className:y},a,m)};Ue.propTypes={id:a.string,editorId:a.string,editorRef:a.oneOfType([a.func,a.shape({current:a.any})]),editorValid:a.bool,editorDisabled:a.bool,style:a.object,className:a.string,optional:a.bool},Ue.displayName="KendoReactLabel";var Ge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ye=function(){return Ye=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ye.apply(this,arguments)},Xe=["rgba","rgb","hex"],Je=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={inputMode:Xe[1]},t.onRgbaRChange=function(e){t.dispatchRgbaChange({r:e.value},e)},t.onRgbaGChange=function(e){t.dispatchRgbaChange({g:e.value},e)},t.onRgbaBChange=function(e){t.dispatchRgbaChange({b:e.value},e)},t.onRgbaAChange=function(e){t.dispatchRgbaChange({a:e.value},e)},t}return Ge(t,e),t.prototype.render=function(){var e=(0,v.provideLocalizationService)(this),t=e.toLanguageString(w,V[S]),n=e.toLanguageString(w,V[w]),r=e.toLanguageString(w,V[C]),o=e.toLanguageString(w,V[x]),a=e.toLanguageString(w,V[O]),s=e.toLanguageString(P,V[P]);return i.createElement("div",{className:"k-colorgradient-inputs k-hstack"},i.createElement("div",{className:"k-vstack"},i.createElement(q.z,{"aria-label":s,fillMode:"flat",icon:"arrows-kpi",className:"k-colorgradient-toggle-mode k-icon-button",onClick:this.onToggleModeChange.bind(this)})),"hex"===this.state.inputMode&&i.createElement("div",{className:"k-vstack k-flex-1"},i.createElement("span",{className:"k-hex-value k-textbox k-input"},i.createElement(We,{hex:this.props.hex,onHexChange:this.props.onHexChange,disabled:this.props.disabled})),i.createElement(Ue,{className:"k-colorgradient-input-label"},t)),("rgb"===this.state.inputMode||"rgba"===this.state.inputMode)&&i.createElement(i.Fragment,null,i.createElement("div",{className:"k-vstack"},i.createElement(Fe,{inputType:"number",value:this.props.rgba.r,ariaLabel:String(this.props.rgba.r),min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaRChange,disabled:this.props.disabled}),i.createElement(Ue,{className:"k-colorgradient-input-label"},n)),i.createElement("div",{className:"k-vstack"},i.createElement(Fe,{inputType:"number",value:this.props.rgba.g,ariaLabel:String(this.props.rgba.g),min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaGChange,disabled:this.props.disabled}),i.createElement(Ue,{className:"k-colorgradient-input-label"},r)),i.createElement("div",{className:"k-vstack"},i.createElement(Fe,{inputType:"number",value:this.props.rgba.b,ariaLabel:String(this.props.rgba.b),min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaBChange,disabled:this.props.disabled}),i.createElement(Ue,{className:"k-colorgradient-input-label"},o))),"rgba"===this.state.inputMode&&i.createElement("div",{className:"k-vstack"},this.props.opacity&&i.createElement(Fe,{inputType:"number",value:this.props.rgba.a,ariaLabel:String(this.props.rgba.a),min:0,max:1,step:.01,spinners:!1,format:"n2",onChange:this.onRgbaAChange,disabled:this.props.disabled}),this.props.opacity&&i.createElement(Ue,{className:"k-colorgradient-input-label"},a)))},t.prototype.dispatchRgbaChange=function(e,t){var n=Ye({},this.props.rgba);void 0!==e.r&&(n.r=e.r),void 0!==e.g&&(n.g=e.g),void 0!==e.b&&(n.b=e.b),void 0!==e.a&&(n.a=e.a),this.props.onRgbaChange(n,t)},t.prototype.onToggleModeChange=function(){var e=Xe.length-1===Xe.indexOf(this.state.inputMode)?0:Xe.indexOf(this.state.inputMode)+1;if(this.props.opacity)this.setState({inputMode:Xe[e]});else{var t="rgba"===Xe[e]?e+1:e;this.setState({inputMode:Xe[t]})}},t}(i.Component);const Ze=Je;(0,v.registerForIntl)(Je),(0,v.registerForLocalization)(Je);var Qe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qe(t,e),t.prototype.render=function(){var e=(0,v.provideLocalizationService)(this),t=e.toLanguageString(E,V[E]),n=e.toLanguageString(I,V[I]),r=e.toLanguageString(N,V[N]),o=e.toLanguageString(T,V[T]),a=e.toLanguageString(M,V[M]),s=le(this.props.rgba,this.props.bgColor),l=4.5.toFixed(1),c=7..toFixed(1),u="".concat(t,": ").concat(s.toFixed(2)),d="".concat(n,": ").concat(l),p="".concat(r,": ").concat(c),f=i.createElement("span",{className:"k-contrast-validation k-text-success"},o," ",i.createElement("span",{className:"k-icon k-i-check"})),h=i.createElement("span",{className:"k-contrast-validation k-text-error"},a," ",i.createElement("span",{className:"k-icon k-i-close"}));return i.createElement("div",{className:"k-vbox k-colorgradient-color-contrast"},i.createElement("div",{className:"k-contrast-ratio"},i.createElement("span",{className:"k-contrast-ratio-text"},u),s>=4.5?i.createElement("span",{className:"k-contrast-validation k-text-success"},i.createElement("span",{className:"k-icon k-i-check"}),s>=7&&i.createElement("span",{className:"k-icon k-i-check"})):i.createElement("span",{className:"k-contrast-validation k-text-error"},i.createElement("span",{className:"k-icon k-i-close"}))),i.createElement("div",null,i.createElement("span",null,d),s>=4.5?f:h),i.createElement("div",null,i.createElement("span",null,p),s>=7?f:h))},t}(i.Component);(0,v.registerForLocalization)(et);var tt=function(e,t){if(0===e.length)return"";var n=e.reduce((function(e,n,r,o){return 0===r?"M ".concat(n[0],",").concat(n[1]):"".concat(e," ").concat(t(n,r,o))}),"");return'<path d="'.concat(n,'" fill="none" stroke="white" stroke-width="1"/>')},nt=function(e,t){var n=t[0]-e[0],r=t[1]-e[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(r,2)),angle:Math.atan2(r,n)}},rt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.renderSvgCurveLine=function(){var e,t,n=this,r=this.props.metrics,o=function(e,t,i,a,s){var l=(i+a)/2,c=Object.assign({},n.props.hsva,{s:t/r.width,v:1-l/r.height}),u=le(re(oe(c)),re(n.props.backgroundColor||""));return i+.5>a?u<e+1&&u>e-1?l:null:s(u,e)?o(e,t,i,a-(a-i)/2,s):o(e,t,i+(a-i)/2,a,s)},i=function(e,t,n){void 0===n&&(n=!1);for(var i=[],a=0;a<=r.width;a+=r.width/t){var s=o(e,a,0,r.height,n?function(e,t){return e<t}:function(e,t){return e>t});null!==s&&i.push([a,s])}return i},a=(t=nt,e=function(e,n,r,o){var i=t(n||e,r||e),a=i.angle+(o?Math.PI:0),s=.1*i.length;return[e[0]+Math.cos(a)*s,e[1]+Math.sin(a)*s]},function(t,n,r){var o=e(r[n-1],r[n-2],t),i=o[0],a=o[1],s=e(t,r[n-1],r[n+1],!0),l=s[0],c=s[1];return"C ".concat(i,",").concat(a," ").concat(l,",").concat(c," ").concat(t[0],",").concat(t[1])});return tt(i(4.5,16),a)+tt(i(4.5,16,!0),a)+tt(i(7,16),a)+tt(i(7,16,!0),a)},t.prototype.shouldComponentUpdate=function(e){return e.hsva.h!==this.props.hsva.h||e.hsva.a!==this.props.hsva.a||this.props.backgroundColor!==e.backgroundColor},t.prototype.render=function(){return i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"k-color-contrast-svg",dangerouslySetInnerHTML:{__html:this.renderSvgCurveLine()},style:{position:"absolute",overflow:"visible",pointerEvents:"none",left:0,top:0,zIndex:3}})},t}(i.Component),it=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),at="rgba(255, 255, 255, 1)",st=function(e){function t(n){var r=e.call(this,n)||this;r.wrapper=null,r.onHexChange=function(e,t,n){if(r.isUncontrolled){var o=ne(t);r.setState({hsva:o,backgroundColor:ie(o.h),rgba:re(t),hex:e})}else!function(e,t,n){ce[e]={value:t,hex:n}}(r.state.guid,t,e);r.dispatchChangeEvent(t,n,n.nativeEvent)},r.onRgbaChange=function(e,t){var n=function(e){var t=Q(e.r,0,255),n=Q(e.g,0,255),r=Q(e.b,0,255),o=Q(e.a,0,1);return ee.Color.fromBytes(t,n,r,o).toCssRgba()}(e);if(r.isUncontrolled){var o=ne(n),i=te(n,"hex");r.setState({hsva:o,backgroundColor:ie(o.h),rgba:e,hex:i})}else!function(e,t,n){ce[e]={value:t,rgba:n}}(r.state.guid,n,e);r.dispatchChangeEvent(n,t.syntheticEvent,t.nativeEvent)},r.onAlphaSliderChange=function(e){r.handleHsvaChange(Object.assign({},r.state.hsva,{a:e.value/100}),e.syntheticEvent,e.nativeEvent)},r.onHueSliderChange=function(e){r.handleHsvaChange(Object.assign({},r.state.hsva,{h:e.value}),e.syntheticEvent,e.nativeEvent)},r.onDrag=function(e){r.gradientWrapper.classList.add("k-dragging"),r.changePosition(e.event)},r.onRelease=function(){r.gradientWrapper.classList.remove("k-dragging")},r.onGradientWrapperClick=function(e){r.changePosition(e)},r.changePosition=function(e){var t=r.getGradientRectMetrics(),n=e.clientX-t.left,o=e.clientY-t.top,i=Q(n,0,t.width),a=Q(o,0,t.height),s=Object.assign({},r.state.hsva,{s:i/t.width,v:1-a/t.height});r.handleHsvaChange(s,e,e.nativeEvent)},r.onFocus=function(e){r.props.onFocus&&r.props.onFocus.call(void 0,{nativeEvent:e,target:r})},r.focus=function(){(0,s.n)(r.wrapper)},(0,f.s)(h);var o=n.value||n.defaultValue||te(at,"rgba");return r.state=Object.assign({},t.getStateFromValue(o),{isFirstRender:!0,guid:(0,l.M)()}),r}return it(t,e),t.getDerivedStateFromProps=function(e,n){return e.value&&!n.isFirstRender?t.getStateFromValue(e.value,n.guid):null},t.prototype.componentDidMount=function(){this.setAlphaSliderBackground(this.state.backgroundColor),this.state.isFirstRender&&this.setState({isFirstRender:!1})},t.prototype.componentWillUnmount=function(){var e;e=this.state.guid,delete ce[e]},t.prototype.componentDidUpdate=function(e,t){t.backgroundColor!==this.state.backgroundColor&&this.setAlphaSliderBackground(this.state.backgroundColor)},t.prototype.renderRectangleDragHandle=function(){var e={};if(!this.state.isFirstRender){var t=this.getGradientRectMetrics(),n=(1-this.state.hsva.v)*t.height,r=this.state.hsva.s*t.width;e.top="".concat(n,"px"),e.left="".concat(r,"px")}return i.createElement("div",{className:"k-hsv-draghandle k-draghandle",style:e})},t.prototype.handleHsvaChange=function(e,t,n){var r=oe(e);if(this.isUncontrolled){var o=te(r,"hex");this.setState({hsva:e,backgroundColor:ie(e.h),rgba:re(r),hex:o})}else!function(e,t,n){ce[e]={value:t,hsva:n}}(this.state.guid,r,e);this.dispatchChangeEvent(r,t,n)},t.prototype.dispatchChangeEvent=function(e,t,n){this.props.onChange&&this.props.onChange.call(void 0,{syntheticEvent:t,nativeEvent:n,target:this,value:e})},t.getStateFromValue=function(e,t){Z(te(e,"hex"))||(e=at);var n=function(e,t){if(e){var n=ce[e];return n&&n.value===t?n.hsva:void 0}}(t,e)||ne(e),r=function(e,t){if(e){var n=ce[e];return n&&n.value===t?n.rgba:void 0}}(t,e)||re(e),o=function(e,t){if(e){var n=ce[e];return n&&n.value===t?n.hex:void 0}}(t,e)||te(e,"hex");return{hsva:n,backgroundColor:ie(n.h),rgba:r,hex:o}},t.prototype.setAlphaSliderBackground=function(e){this.props.opacity&&this.alphaSlider&&this.alphaSlider.sliderTrack&&(this.alphaSlider.sliderTrack.style.background="linear-gradient(to top, transparent, ".concat(e,")"))},Object.defineProperty(t.prototype,"isUncontrolled",{get:function(){return void 0===this.props.value},enumerable:!1,configurable:!0}),t.prototype.getGradientRectMetrics=function(){return this.gradientWrapper.getBoundingClientRect()},t.prototype.render=function(){var e=this,t=(0,v.provideLocalizationService)(this),n=(0,c.A)("k-colorgradient",{"k-disabled":this.props.disabled});return i.createElement("div",{id:this.props.id,className:n,"aria-disabled":this.props.disabled?"true":void 0,style:this.props.style,ref:function(t){return e.wrapper=t},tabIndex:(0,u.p)(this.props.tabIndex,this.props.disabled),"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,onFocus:this.onFocus},i.createElement("div",{className:"k-colorgradient-canvas k-hstack"},i.createElement("div",{className:"k-hsv-rectangle",style:{background:this.state.backgroundColor}},i.createElement(d._,{onDrag:this.onDrag,onRelease:this.onRelease,ref:function(t){return e.gradientWrapper=t?t.element:void 0}},i.createElement("div",{className:"k-hsv-gradient",style:{touchAction:"none"},onClick:this.onGradientWrapperClick},this.renderRectangleDragHandle())),this.props.backgroundColor&&!this.state.isFirstRender&&i.createElement(ot,{metrics:this.gradientWrapper?this.getGradientRectMetrics():void 0,hsva:this.state.hsva,backgroundColor:this.props.backgroundColor})),i.createElement("div",{className:"k-hsv-controls k-hstack"},i.createElement(J,{value:this.state.hsva.h,buttons:!1,vertical:!0,min:0,max:360,step:5,onChange:this.onHueSliderChange,className:"k-hue-slider k-colorgradient-slider",disabled:this.props.disabled,ariaLabel:t.toLanguageString(D,V[D])}),this.props.opacity&&i.createElement(J,{value:Z(this.state.hsva.a)?100*this.state.hsva.a:100,buttons:!1,vertical:!0,min:0,max:100,step:1,ariaLabel:t.toLanguageString(R,V[R]),onChange:this.onAlphaSliderChange,className:"k-alpha-slider k-colorgradient-slider",disabled:this.props.disabled,ref:function(t){return e.alphaSlider=t}}))),i.createElement(Ze,{rgba:this.state.rgba,onRgbaChange:this.onRgbaChange,hex:this.state.hex,onHexChange:this.onHexChange,opacity:this.props.opacity,disabled:this.props.disabled}),this.props.backgroundColor&&i.createElement(et,{bgColor:re(this.props.backgroundColor),rgba:this.state.rgba}))},t.displayName="ColorGradient",t.propTypes={defaultValue:a.string,value:a.string,onChange:a.func,onFocus:a.func,opacity:a.bool,backgroundColor:a.string,disabled:a.bool,style:a.any,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t.defaultProps={opacity:!0},t}(i.Component),lt=(0,p.Y)(),ct=(0,p.u)(lt,st);ct.displayName="KendoReactColorGradient";var ut=function(){function e(){this.colorRows=[]}return e.prototype.setColorMatrix=function(e,t){if(this.colorRows=[],Z(e)&&e.length){t=t||e.length;for(var n=0;n<e.length;n+=t){var r=e.slice(n,t+n);this.colorRows.push(r)}}},e.prototype.getCellCoordsFor=function(e){var t=this;if(Z(e)){var n=e?(0,ee.parseColor)(e,!0):e,r=[e];Z(n)&&r.push(n.toCss(),n.toCssRgba());for(var o=function(e){for(var n=function(n){if(r.some((function(r){return r===t.colorRows[e][n]})))return{value:{row:e,col:n}}},o=0;o<i.colorRows[e].length;o++){var a=n(o);if("object"==typeof a)return a}},i=this,a=0;a<this.colorRows.length;a++){var s=o(a);if("object"==typeof s)return s.value}}},e.prototype.getColorAt=function(e){if(Z(e)&&Z(this.colorRows[e.row]))return this.colorRows[e.row][e.col]},e.prototype.getNextCell=function(e,t,n){if(!(Z(e)&&Z(e.row)&&Z(e.col)))return{row:0,col:0};var r=this.clampIndex(e.row+n,this.colorRows.length-1);return{row:r,col:this.clampIndex(e.col+t,this.colorRows[r].length-1)}},e.prototype.clampIndex=function(e,t){return e<0?0:e>t?t:e},e}(),dt={basic:{colors:["#000000","#7f7f7f","#880015","#ed1c24","#ff7f27","#fff200","#22b14c","#00a2e8","#3f48cc","#a349a4"," ffffff","#c3c3c3","#b97a57","#ffaec9","#ffc90e","#efe4b0","#b5e61d","#99d9ea","#7092be","#c8bfe7"],columns:10},office:{colors:["#ffffff","#000000","#e6e6e6","#435569","#4371c4","#ed7e32","#a5a4a5","#febf04","#5a9bd5","#71ae48","#f2f2f3","#7f7f7f","#d1cece","#d5dde3","#dae1f4","#fce5d4","#deeded","#fff2cc","#deeaf6","#e1efd9","#d7d8d8","#585959","#aeabab","#adbaca","#b4c5e7","#f6caac","#dbdbdb","#ffe498","#bcd6ee","#c5e0b2","#bfbfc0","#3f3f3f","#767070","#8595b1","#8fabdb","#f5b183","#c9c8c9","#fed965","#9bc4e5","#a8d08d","#a5a5a6","#262625","#393939","#334050","#2e5496","#c45a11","#7b7b7a","#bf9000","#2f75b5","#548235","#7f7f7f","#0b0c0c","#161616","#222a34","#203764","#843d0b","#525252","#7f6000","#1d4d79","#375623"],columns:10},apex:{colors:["#ffffff","#000000","#c9c2d1","#69676d","#ceb966","#9cb084","#6bb1c9","#6585cf","#7e6bc9","#a379bb","#f2f2f2","#7f7f7f","#f4f2f5","#e0e0e2","#f5f1e0","#ebefe6","#e1eff4","#e0e6f5","#e5e1f4","#ece4f1","#d8d8d8","#595959","#e9e6ec","#c2c1c5","#ebe3c1","#d7dfcd","#c3dfe9","#c1ceeb","#cbc3e9","#dac9e3","#bfbfbf","#3f3f3f","#dedae3","#a4a3a8","#e1d5a3","#c3cfb5","#a6d0de","#a2b5e2","#b1a6de","#c7aed6","#a5a5a5","#262626","#9688a5","#4e4d51","#ae9638","#758c5a","#3d8da9","#365bb0","#533da9","#7d4d99","#7f7f7f","#0c0c0c","#635672","#343336","#746425","#4e5d3c","#295e70","#243c75","#372970","#533366"],columns:10},austin:{colors:["#ffffff","#000000","#caf278","#3e3d2d","#94c600","#71685a","#ff6700","#909465","#956b43","#fea022","#f2f2f2","#7f7f7f","#f4fce4","#dddcd0","#efffc0","#e3e1dc","#ffe0cb","#e8e9df","#ece1d6","#feecd2","#d8d8d8","#595959","#e9f9c9","#bbb9a1","#dfff82","#c8c3ba","#ffc299","#d2d4c0","#dac3ad","#fed9a6","#bfbfbf","#3f3f3f","#dff7ae","#ada598","#cfff43","#ada598","#ffa365","#bcbfa1","#c8a585","#fec67a","#a5a5a5","#262626","#a9ea25","#2e2d21","#6f9400","#544e43","#bf4d00","#6c6f4b","#6f5032","#d77b00","#7f7f7f","#0c0c0c","#74a50f","#1f1e16","#4a6300","#38342d","#7f3300","#484a32","#4a3521","#8f5200"],columns:10},clarity:{colors:["#ffffff","#292934","#f3f2dc","#d2533c","#93a299","#ad8f67","#726056","#4c5a6a","#808da0","#79463d","#f2f2f2","#e7e7ec","#e7e5b9","#f6dcd8","#e9ecea","#eee8e0","#e4dedb","#d8dde3","#e5e8ec","#e9d6d3","#d8d8d8","#c4c4d1","#d5d185","#edbab1","#d3d9d6","#ded2c2","#c9beb8","#b2bcc8","#ccd1d9","#d3aea7","#bfbfbf","#8a8aa3","#aca73b","#e4978a","#bec7c1","#cdbba3","#af9e94","#8c9bac","#b2bac6","#bd857c","#a5a5a5","#56566e","#56531d","#a43925","#6b7c72","#866b48","#554840","#39434f","#5c697b","#5a342d","#7f7f7f","#3b3b4b","#22210b","#6d2619","#47534c","#594730","#39302b","#262d35","#3d4652","#3c231e"],columns:10},slipstream:{colors:["#ffffff","#000000","#b4dcfa","#212745","#4e67c8","#5eccf3","#a7ea52","#5dceaf","#ff8021","#f14124","#f2f2f2","#7f7f7f","#8bc9f7","#c7cce4","#dbe0f4","#def4fc","#edfadc","#def5ef","#ffe5d2","#fcd9d3","#d8d8d8","#595959","#4facf3","#909aca","#b8c2e9","#beeafa","#dbf6b9","#beebdf","#ffcca6","#f9b3a7","#bfbfbf","#3f3f3f","#0d78c9","#5967af","#94a3de","#9ee0f7","#caf297","#9de1cf","#ffb279","#f68d7b","#a5a5a5","#262626","#063c64","#181d33","#31479f","#11b2eb","#81d319","#34ac8b","#d85c00","#c3260c","#7f7f7f","#0c0c0c","#021828","#101322","#202f6a","#0b769c","#568c11","#22725c","#903d00","#821908"],columns:10},metro:{colors:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],columns:10},flow:{colors:["#ffffff","#000000","#dbf5f9","#04617b","#0f6fc6","#009dd9","#0bd0d9","#10cf9b","#7cca62","#a5c249","#f2f2f2","#7f7f7f","#b2e9f2","#b4ecfc","#c7e2fa","#c4eeff","#c9fafc","#c9faed","#e4f4df","#edf2da","#d8d8d8","#595959","#76d9e8","#6adafa","#90c6f6","#89deff","#93f5f9","#94f6db","#cae9c0","#dbe6b6","#bfbfbf","#3f3f3f","#21b2c8","#20c8f7","#59a9f2","#4fceff","#5df0f6","#5ff2ca","#b0dfa0","#c9da91","#a5a5a5","#262626","#105964","#02485c","#0b5394","#0075a2","#089ca2","#0b9b74","#54a838","#7e9532","#7f7f7f","#0c0c0c","#062328","#01303d","#073763","#004e6c","#05686c","#07674d","#387025","#546321"],columns:10},hardcover:{colors:["#ffffff","#000000","#ece9c6","#895d1d","#873624","#d6862d","#d0be40","#877f6c","#972109","#aeb795","#f2f2f2","#7f7f7f","#e1dca5","#f2e0c6","#f0d0c9","#f6e6d5","#f5f2d8","#e7e5e1","#fbc7bc","#eef0e9","#d8d8d8","#595959","#d0c974","#e6c28d","#e2a293","#eeceaa","#ece5b2","#cfccc3","#f78f7a","#dee2d4","#bfbfbf","#3f3f3f","#a29a36","#daa454","#d4735e","#e6b681","#e2d88c","#b7b2a5","#f35838","#ced3bf","#a5a5a5","#262626","#514d1b","#664515","#65281a","#a2641f","#a39428","#655f50","#711806","#879464","#7f7f7f","#0c0c0c","#201e0a","#442e0e","#431b11","#6c4315","#6d621a","#433f35","#4b1004","#5a6243"],columns:10},trek:{colors:["#ffffff","#000000","#fbeec9","#4e3b30","#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529","#f2f2f2","#7f7f7f","#f7e09e","#e1d6cf","#fcecd5","#eddfda","#f0e7e5","#f3eae1","#ece9e3","#f5e3d1","#d8d8d8","#595959","#f3cc5f","#c4ad9f","#f9d9ab","#dcc0b6","#e1d0cc","#e7d5c4","#d9d4c7","#ebc7a3","#bfbfbf","#3f3f3f","#d29f0f","#a78470","#f6c781","#cba092","#d2b9b2","#dbc1a7","#c6bfab","#e1ac76","#a5a5a5","#262626","#694f07","#3a2c24","#c87d0e","#7b4b3a","#926255","#a17242","#7b7153","#90571e","#7f7f7f","#0c0c0c","#2a1f03","#271d18","#855309","#523226","#614138","#6b4c2c","#524b37","#603a14"],columns:10},verve:{colors:["#ffffff","#000000","#d2d2d2","#666666","#ff388c","#e40059","#9c007f","#68007f","#005bd3","#00349e","#f2f2f2","#7f7f7f","#bdbdbd","#e0e0e0","#ffd7e8","#ffc6dc","#ffb8f1","#f1b2ff","#c3dcff","#b8cfff","#d8d8d8","#595959","#9d9d9d","#c1c1c1","#ffafd1","#ff8eba","#ff71e4","#e365ff","#87baff","#72a0ff","#bfbfbf","#3f3f3f","#696969","#a3a3a3","#ff87ba","#ff5597","#ff2ad7","#d519ff","#4b98ff","#2b71ff","#a5a5a5","#262626","#343434","#4c4c4c","#e90062","#ab0042","#75005f","#4e005f","#00449e","#002676","#7f7f7f","#0c0c0c","#151515","#333333","#9b0041","#72002c","#4e003f","#34003f","#002d69","#00194f"],columns:10},monochrome:{colors:["#000000","#1a1a1a","#333333","#4d4d4d","#666666","#808080","#999999","#b3b3b3","#cccccc","#e6e6e6","#f2f2f2","#ffffff"],columns:12}},pt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ft="office",ht=function(e){function t(t){var n=e.call(this,t)||this;return n.wrapper=null,n.paletteService=null,n.guid=(0,l.M)(),n.focus=function(){n.wrapper&&n.wrapper.focus()},n.onKeyDown=function(e){switch(e.keyCode){case m.R.down:n.handleCellNavigation(0,1);break;case m.R.up:n.handleCellNavigation(0,-1);break;case m.R.right:n.handleCellNavigation(1,0);break;case m.R.left:n.handleCellNavigation(-1,0);break;case m.R.enter:n.handleEnter(e);break;default:return}e.preventDefault()},n.onColorClick=function(e,t){n.isUncontrolled?n.setState({selectedColor:e,focusedColor:e}):n.setState({focusedColor:e}),n.dispatchChangeEvent(e,t)},n.onFocus=function(e){n.paletteService&&(n.setState({focusedColor:n.state.selectedColor||n.paletteService.colorRows[0][0]}),n.props.onFocus&&n.props.onFocus.call(void 0,e))},n.onBlur=function(){n.setState({focusedColor:void 0})},(0,f.s)(h),n.state={selectedColor:void 0!==n.props.value?n.props.value:n.props.defaultValue,isFirstRender:!0},n}return pt(t,e),t.prototype.render=function(){var e=this,t=this.getPaletteInfo(),n=this.paletteService=new ut;n.setColorMatrix(t.colors,t.columns);var r=n.getCellCoordsFor(this.state.selectedColor),o=n.getCellCoordsFor(this.state.focusedColor),a=(0,c.A)("k-colorpalette",{"k-disabled":this.props.disabled});return t.colors.length?i.createElement("div",{id:this.props.id,className:a,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,"aria-disabled":this.props.disabled?"true":void 0,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:(0,u.p)(this.props.tabIndex,this.props.disabled),ref:function(t){return e.wrapper=t}},i.createElement("div",{className:"k-colorpalette-table-wrap",role:"grid"},i.createElement("table",{className:"k-colorpalette-table k-palette",role:"presentation"},i.createElement("tbody",{role:"rowgroup"},this.renderRows(n.colorRows,r,o))))):""},t.getDerivedStateFromProps=function(e,t){if(t.isFirstRender||void 0===e.value){if(t.isFirstRender)return{isFirstRender:!1}}else{if(""===e.value&&void 0!==t.selectedColor)return{selectedColor:void 0};if(""!==e.value&&e.value!==t.selectedColor)return{selectedColor:e.value}}return null},t.prototype.handleCellNavigation=function(e,t){if(this.paletteService)if(this.focusedColorCooridanates){var n=this.paletteService.getNextCell(this.focusedColorCooridanates,e,t);this.setState({focusedColor:this.paletteService.getColorAt(n)})}else this.setState({focusedColor:this.paletteService.colorRows[0][0]})},t.prototype.handleEnter=function(e){this.isUncontrolled&&this.setState({selectedColor:this.state.focusedColor}),this.dispatchChangeEvent(this.state.focusedColor,e)},t.prototype.dispatchChangeEvent=function(e,t){(0,g.N)(this.props.onChange,t,this,{value:e,rgbaValue:te(e,"rgba")})},Object.defineProperty(t.prototype,"focusedColorCooridanates",{get:function(){return this.state.focusedColor&&this.paletteService?this.paletteService.getCellCoordsFor(this.state.focusedColor):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUncontrolled",{get:function(){return void 0===this.props.value},enumerable:!1,configurable:!0}),t.prototype.getPaletteInfo=function(){if("string"==typeof this.props.palette){var e=dt[this.props.palette];return Z(e)?{colors:e.colors,columns:this.props.columns||e.columns||10}:{colors:[],columns:0}}return{colors:this.props.palette||[],columns:this.props.columns||10}},t.prototype.renderRows=function(e,t,n){var r=this;return e.map((function(e,o){return i.createElement("tr",{role:"row",key:o},r.renderColumns(e,o,t,n))}))},t.prototype.renderColumns=function(e,t,n,r){var o=this,a=void 0!==n&&n.row===t,s=n&&n.col,l=void 0!==r&&r.row===t,u=r&&r.col,d="number"!=typeof this.props.tileSize?this.props.tileSize:{width:this.props.tileSize,height:this.props.tileSize},p=d.width+"px",f=d.height+"px";return e.map((function(e,n){var r=a&&s===n,d=(0,c.A)("k-colorpalette-tile",{"k-selected":r,"k-focus":l&&u===n});return i.createElement("td",{role:"gridcell",className:d,"aria-label":e,"aria-selected":!!r||!!o.props.disabled&&void 0,style:{backgroundColor:e,width:p,height:f,minWidth:p},onClick:function(t){return o.onColorClick(e,t)},id:o.createCellId({row:t,col:n}),key:n})}))},t.prototype.createCellId=function(e){return"".concat(this.guid,"_").concat(e.row,"_").concat(e.col)},t.displayName="ColorPalette",t.propTypes={palette:a.oneOfType([a.arrayOf(a.string.isRequired),a.string]),columns:a.number,tileSize:a.any,defaultValue:a.string,value:a.string,disabled:a.bool,tabIndex:a.number,onChange:a.func,onFocus:a.func,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t.defaultProps={palette:ft,tileSize:24},t}(i.Component),mt=(0,p.Y)(),gt=(0,p.u)(mt,ht);gt.displayName="KendoReactColorPalette";var vt=n(9222),yt=function(){return yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},yt.apply(this,arguments)},bt=function(e){var t=e.popupSettings||{},n="rtl"===e.dir?"right":"left",r=i.useMemo((function(){return{horizontal:n,vertical:"bottom"}}),[n]),o=i.useMemo((function(){return{horizontal:n,vertical:"top"}}),[n]);return i.createElement(i.Fragment,null,e.input,e.button,i.createElement(vt.G,yt({style:yt(yt({},(t||{}).style),{direction:e.dir})},t,{anchor:e.popupAnchor,anchorAlign:r,popupAlign:o,show:e.open,onOpen:e.onOpen,onClose:e.onClose,className:(0,c.A)("k-reset",t.className)}),e.content))};bt.displayName="KendoPickerComponent";var kt=function(){return kt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},kt.apply(this,arguments)},wt={palette:ft,tileSize:24},Ct=function(e){return void 0!==e},xt=(0,p.Y)(),Ot=i.forwardRef((function(e,t){var n,r;(0,f.s)(h);var o=(0,ue.Y)(xt,e),a=(0,v.useLocalization)(),s=o.size,l=void 0===s?St.size:s,d=o.rounded,p=void 0===d?St.rounded:d,g=o.fillMode,y=void 0===g?St.fillMode:g,b=o.popupSettings,k=o.gradientSettings,w=o.paletteSettings,C=o.valid,x=o.disabled,O=o.tabIndex,S=o.view,E=o.icon,I=o.iconClassName,N=o.onChange,T=o.onFocus,M=o.onBlur,D=o.onActiveColorClick,R=i.useRef(null),P=i.useRef(null),_=i.useRef(null),A=i.useRef(),j=i.useRef(null),F=i.useCallback((function(){R.current&&R.current.focus()}),[]);i.useImperativeHandle(t,(function(){return{element:R.current,actionElement:j.current,focus:F}}));var z=i.useState(!1),B=z[0],K=z[1],W=i.useState(o.defaultValue),$=W[0],U=W[1],G=i.useState(!1),Y=G[0],X=G[1],J=Ct(o.value),Z=Ct(o.open),Q=J?o.value:$,ee=Z?o.open:Y,te=i.useCallback((function(e,t){Z||(!e&&!t&&R&&R.current&&R.current.focus(),X(e))}),[Z]),ne=i.useCallback((function(e){var t=e.altKey,n=e.keyCode;if(n!==m.R.esc)return n!==m.R.enter||Z?void(!t||n!==m.R.up&&n!==m.R.down||(e.preventDefault(),e.stopPropagation(),n===m.R.up&&R&&R.current&&(R.current.focus(),te(!1)),n===m.R.down&&te(!0))):(e.preventDefault(),e.stopPropagation(),void te(!ee));te(!1)}),[ee,Z]),re=i.useCallback((function(){Z||(P.current?P.current.focus():_.current&&_.current.focus())}),[Z]),oe=i.useCallback((function(){te(!ee,!0)}),[ee]),ie=i.useCallback((function(e){D&&D.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:Q})}),[D,Q]),ae=i.useCallback((function(e){A.current?(clearTimeout(A.current),A.current=void 0):K(!0),T&&T.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[T]),se=i.useCallback((function(){te(!1,!0),K(!1),A.current=void 0}),[]),le=i.useCallback((function(e){clearTimeout(A.current),A.current=window.setTimeout(se),M&&M.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[M]),ce=i.useCallback((function(e,t){var n=t?e.rgbaValue:e.value;J||U(n),t&&te(!1),N&&N.call(void 0,{value:n,nativeEvent:e.nativeEvent,syntheticEvent:e.syntheticEvent})}),[J,N]),pe=i.useCallback((function(e){return ce(e,!0)}),[Ct,ce]),fe=(0,H.n)(R,o.dir),he=!1!==C;return i.createElement("span",{id:o.id,"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy,className:(0,c.A)("k-colorpicker","k-picker","k-icon-picker",(n={},n["k-picker-".concat(de.G.sizeMap[l]||l)]=l,n["k-picker-".concat(y)]=y,n["k-rounded-".concat(de.G.roundedMap[p]||p)]=p,n["k-invalid"]=!he,n["k-disabled"]=x,n["k-focus"]=B,n)),ref:R,tabIndex:(0,u.p)(O,x),title:o.title,onKeyDown:ne,onFocus:ae,onBlur:le,dir:fe},i.createElement(bt,{dir:fe,open:ee,onOpen:re,popupAnchor:R.current||void 0,popupSettings:kt({},b),input:i.createElement("span",{onClick:ie,className:"k-input-inner"},i.createElement("span",{className:(0,c.A)("k-value-icon","k-color-preview",{"k-no-color":!Q,"k-icon-color-preview":E||I})},(I||E)&&i.createElement("span",{className:(0,c.A)("k-color-preview-icon",I,(r={},r["k-icon k-i-".concat(E)]=E&&!I,r))}),i.createElement("span",{className:"k-color-preview-mask",style:{backgroundColor:Q}}))),button:i.createElement(q.z,{tabIndex:-1,type:"button",onClick:oe,className:"k-input-button",rounded:null,icon:"arrow-s","aria-label":a.toLanguageString(L,V[L])}),content:i.createElement(i.Fragment,null,("combo"===S||"gradient"===S)&&i.createElement(ct,kt({},k,{tabIndex:0,ref:P,value:Q,onChange:ce})),("combo"===S||"palette"===S)&&i.createElement(gt,kt({},w,{ref:_,value:Q,onChange:pe})))}))}));Ot.propTypes={value:a.string,defaultValue:a.string,disabled:a.bool,view:a.oneOf(["gradient","palette","combo"]),dir:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])};var St={size:"medium",rounded:"medium",fillMode:"solid",view:"palette",gradientSettings:{opacity:!0},paletteSettings:wt};Ot.defaultProps=St,Ot.displayName="KendoColorPicker";var Et,It=n(7711),Nt=i.forwardRef((function(e,t){(0,f.s)(h);var n=i.useRef(null),r=i.useRef(null),o=i.useRef(null),a=i.useState("ColorGradient"===(e.view||"ColorGradient")),s=a[0],l=a[1],d=i.useState("rgba(255, 255, 255, 1)"),p=d[0],m=d[1],g=i.useState("rgba(255, 255, 255, 1)"),v=g[0],y=g[1],b=i.useCallback((function(){n.current&&n.current.focus()}),[n]);i.useImperativeHandle(n,(function(){return{element:r.current,focus:b,props:e}})),i.useImperativeHandle(t,(function(){return n.current}));var k=i.useCallback((function(e){("ColorGradient"===e&&!s||"ColorPalette"===e&&s)&&l(!s)}),[s]),w=i.useCallback((function(){m("rgba(255, 255, 255, 1)")}),[]),C=i.useCallback((function(e){m(e.value)}),[]),x=i.useCallback((function(){y(p)}),[p]),O=i.useCallback((function(){y("rgba(255, 255, 255, 1)")}),[]),S=i.useCallback((function(){m(v)}),[v]),E=i.useCallback((function(){r.current&&r.current.focus()}),[r]),I=i.useCallback((function(){y(p)}),[p]);return i.createElement("div",{id:e.id,style:e.style,ref:r,tabIndex:(0,u.p)(e.tabIndex,e.disabled),className:(0,c.A)("k-flatcolorpicker k-coloreditor",{"k-disabled":e.disabled},e.className),onBlur:I},i.createElement(i.Fragment,null,e.header||i.createElement("div",{className:"k-coloreditor-header k-hstack"},i.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},i.createElement(It.h,null,i.createElement(q.z,{type:"button",togglable:!0,fillMode:"flat",selected:s,onClick:function(){return k("ColorGradient")}},i.createElement("span",{className:"k-icon k-i-color-canvas"})),i.createElement(q.z,{type:"button",togglable:!0,fillMode:"flat",selected:!s,onClick:function(){return k("ColorPalette")}},i.createElement("span",{className:"k-icon k-i-palette"})))),i.createElement("div",{className:"k-spacer"}),i.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},e.showClearButton&&Mt.showClearButton&&i.createElement(q.z,{type:"button",fillMode:"flat",onClick:w},i.createElement("span",{className:"k-icon k-i-reset-color"})),e.showPreview&&Mt.showPreview&&i.createElement("div",{className:"k-coloreditor-preview k-vstack"},i.createElement("span",{className:"k-coloreditor-preview-color k-color-preview",style:{background:p}}),i.createElement("span",{className:"k-coloreditor-current-color k-color-preview",style:{background:v},onClick:S})))),i.createElement("div",{className:"k-coloreditor-views k-vstack"},s?i.createElement(ct,{ref:o,value:p,onChange:C,onFocus:E}):i.createElement(gt,{value:p,onChange:C,onFocus:E})),e.showButtons&&Mt.showButtons&&i.createElement("div",{className:"k-coloreditor-footer k-actions k-actions-end"},i.createElement(q.z,{type:"button",className:"k-coloreditor-cancel",onClick:O},V[_]),i.createElement(q.z,{type:"button",className:"k-coloreditor-apply k-primary",onClick:x},V[A]))))})),Tt={id:a.string,value:a.string,view:a.string,header:a.elementType,showClearButton:a.bool,showPreview:a.bool,showButtons:a.bool},Mt={showClearButton:!0,showPreview:!0,showButtons:!0};Nt.displayName="KendoFlatColorPicker",Nt.propTypes=Tt,Nt.defaultProps=Mt,function(e){e[e.Literal=0]="Literal",e[e.Mask=1]="Mask",e[e.Undefined=2]="Undefined"}(Et||(Et={}));var Dt=function(){function e(e,t,n){void 0===n&&(n=Et.Undefined),this.value=e,this.rest=t,this.type=n}return e.prototype.map=function(t){return new e(t(this.value),this.rest)},e.prototype.chain=function(e){return e(this.value,this.rest)},e.prototype.fold=function(e,t){return e(this.value,this.rest)},e.prototype.concat=function(e){return this.map((function(t,n){return e.chain((function(e,n){return t.concat([e])}))}))},e.prototype.toString=function(){return"Result({ value: '".concat(this.value,"', rest: ").concat(this.rest," })")},e}(),Rt=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.input=e,this.control=t,this.inputCursor=0,this.controlCursor=0}return e.prototype.eof=function(){return this.inputCursor>=this.input.length},e.prototype.next=function(){return{char:this.input[this.inputCursor++],control:this.control[this.controlCursor++]}},e.prototype.peek=function(){return{char:this.input[this.inputCursor],control:this.control[this.controlCursor]}},e.prototype.eat_input=function(){this.inputCursor++},e.prototype.eat_control=function(){this.controlCursor++},e.prototype.eat=function(){this.inputCursor++,this.controlCursor++},e}(),Pt=function(e){return(e||"").split("")},_t=function(){function e(e){this.parse=e}return e.prototype.run=function(e,t){return void 0===t&&(t=""),e instanceof Rt?this.parse(e):this.parse(new Rt(Pt(e),Pt(t)))},e.prototype.map=function(t){var n=this;return new e((function(e){return n.parse(e).map(t)}))},e.prototype.chain=function(t){var n=this;return new e((function(e){return n.parse(e).chain((function(e,n){return t(e).run(n)}))}))},e.prototype.isLiteral=function(e){return this.run(e).type===Et.Literal},e}(),At=function(e,t){return new _t((function(n){var r=n.next().char,o=e[r];return"\\"===r?(r=n.next().char,new Dt(t.literal(r),n)):new Dt(o?t.mask(o):t.literal(r),n)}))},jt=function(e){return new _t((function(t){var n=e.prompt,r=e.promptPlaceholder,o=t.next().char;return new Dt(o===n?r:o,t)}))},Ft=function(e){return new _t((function(t){var n=t.next().char;return new Dt(e?n:"",t)}))},zt=function(e){return e.reduce((function(e,t){return n=t,e.chain((function(e){return n.map((function(t){return e.concat([t])}))}));var n}),(t=[],new _t((function(e){return new Dt(t,e)}))));var t},Lt=function(e){return new _t((function(t){for(var n=new Dt([],t);!t.eof();)n=n.concat(e.run(t));return n}))},Bt=function(){function e(){this.rules={},this.prompt="_",this.mask="",this.promptPlaceholder=" ",this.includeLiterals=!1,this.maskTokens=[],this.unmaskTokens=[],this.rawTokens=[],this.validationTokens=[]}return e.prototype.update=function(e){var t=e.mask,n=void 0===t?"":t,r=e.prompt,o=void 0===r?"":r,i=e.promptPlaceholder,a=void 0===i?" ":i,s=e.rules,l=void 0===s?{}:s,c=e.includeLiterals,u=void 0!==c&&c;this.mask=n,this.prompt=o,this.promptPlaceholder=a,this.rules=l,this.includeLiterals=u,this.tokenize()},e.prototype.validationValue=function(e){void 0===e&&(e="");var t=e;return zt(this.validationTokens).run(e).fold((function(e){t=e.join("")})),t},e.prototype.rawValue=function(e){void 0===e&&(e="");var t=e;return this.rawTokens.length?(zt(this.rawTokens).run(e).fold((function(e){t=e.join("")})),t):t},e.prototype.maskRaw=function(e){void 0===e&&(e="");var t=e;return this.maskTokens.length?(zt(this.maskTokens).run(e).fold((function(e){t=e.join("")})),t):t},e.prototype.maskInput=function(e,t,n){return e.length<t.length?this.maskRemoved(e,t,n):this.maskInserted(e,t,n)},e.prototype.maskInRange=function(e,t,n,r){var o="",i=r,a=t.split("").slice(0,n),s=t.split("").slice(r);return zt(this.maskTokens.slice(n,r)).run(e).fold((function(e){o=a.concat(e).concat(s).join("")})),{selection:i,value:o}},e.prototype.maskRemoved=function(e,t,n){var r=this,o="",i=n,a=e.split("").slice(n),s=e.split("").slice(0,n).join(""),l=this.maskTokens.length-(e.length-n);return zt(this.maskTokens.slice(0,l)).run(s,t).fold((function(e){i=r.adjustPosition(e,i),o=e.concat(a).join("")})),{selection:i,value:o}},e.prototype.adjustPosition=function(e,t){var n=e[t];return this.maskTokens[t].isLiteral(n)||n===this.prompt?t:t+1},e.prototype.maskInserted=function(e,t,n){var r=this,o="",i=n,a=e.slice(0,n);return zt(this.unmaskTokens).run(a,t).chain((function(e){i=e.join("").length;var n=t.slice(i);return zt(r.maskTokens).run(e.join("")+n,t)})).fold((function(e){o=e.join("")})),{selection:i,value:o}},Object.defineProperty(e.prototype,"maskTokenCreator",{get:function(){var e=this.prompt,t=this.promptPlaceholder;return{literal:function(e){return t=e,new _t((function(e){return e.peek().char===t?(e.eat(),new Dt(t,e,Et.Literal)):new Dt(t,e,Et.Literal)}));var t},mask:function(n){return(r={prompt:e,promptPlaceholder:t},function(e){return new _t((function(t){for(var n=r.prompt,o=r.promptPlaceholder;!t.eof();){var i=t.peek(),a=i.char,s=i.control;if(a===s&&s===n)return t.eat(),new Dt(n,t,Et.Mask);if(e.test(a))return t.eat(),new Dt(a,t,Et.Mask);if(a===o)return t.eat(),new Dt(n,t,Et.Mask);t.eat_input()}return t.eat(),new Dt(n,t,Et.Mask)}))})(n);var r}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unmaskTokenCreator",{get:function(){var e=this;return{literal:function(e){return t=e,new _t((function(e){return e.eof()?new Dt("",e):(e.peek().char===t&&e.eat(),new Dt(t,e))}));var t},mask:function(t){return(n=e.prompt,function(e){return new _t((function(t){for(;!t.eof();){var r=t.peek(),o=r.char,i=r.control;if(o===n&&i===n)return t.eat(),new Dt(o,t);if(e.test(o))return t.eat(),new Dt(o,t);t.eat_input()}return t.eat(),new Dt("",t)}))})(t);var n}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawTokenCreator",{get:function(){var e=this,t=e.prompt,n=e.promptPlaceholder,r=e.includeLiterals;return{literal:function(e){return Ft(r)},mask:function(e){return jt({prompt:t,promptPlaceholder:n})}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"validationTokenCreator",{get:function(){var e=this.prompt;return{literal:function(e){return Ft(!1)},mask:function(t){return jt({prompt:e,promptPlaceholder:""})}}},enumerable:!1,configurable:!0}),e.prototype.tokenize=function(){var e=this;Lt(At(this.rules,this.maskTokenCreator)).run(this.mask).fold((function(t,n){e.maskTokens=t})),Lt(At(this.rules,this.unmaskTokenCreator)).run(this.mask).fold((function(t,n){e.unmaskTokens=t})),Lt(At(this.rules,this.rawTokenCreator)).run(this.mask).fold((function(t,n){e.rawTokens=t})),Lt(At(this.rules,this.validationTokenCreator)).run(this.mask).fold((function(t,n){e.validationTokens=t}))},e}(),Vt={"#":/[\d\s\+\-]/,"&":/[\S]/,0:/[\d]/,9:/[\d\s]/,"?":/[a-zA-Z\s]/,A:/[a-zA-Z0-9]/,C:/./,L:/[a-zA-Z]/,a:/[a-zA-Z0-9\s]/},Ht=function(){return!1},Kt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=function(){return Wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Wt.apply(this,arguments)},$t=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n._inputId="k-".concat((0,l.M)()),n._service=new Bt,n._isPasted=!1,n._selection=[null,null],n._input=null,n.focus=function(){n._input&&n._input.focus()},n.pasteHandler=function(e){var t=e.target,r=t.selectionStart,o=t.selectionEnd;o!==r&&(n._isPasted=!0,n._selection=[r||0,o||0])},n.onChangeHandler=function(e){var t=e.currentTarget,r=t.value,o=n._selection[0]||0,i=n._selection[1]||0;if(!n.props.mask)return n._isPasted=!1,n._selection=[null,null],void n.triggerOnChange(r,e);var a,s=n.value;if(n._isPasted){n._isPasted=!1;var l=s.length-i,c=r.length-l;a=n._service.maskInRange(r.slice(o,c),s,o,i)}else a=n._service.maskInput(r,s,t.selectionStart||0);n._selection=[a.selection,a.selection],n.triggerOnChange(a.value,e)},n.focusHandler=function(e){n.state.focused||(n.setState({focused:!0}),n.props.onFocus&&n.props.onFocus.call(void 0,{target:n,syntheticEvent:e,nativeEvent:e.nativeEvent}))},n.blurHandler=function(e){n.state.focused&&(n.setState({focused:!1}),n.props.onBlur&&n.props.onBlur.call(void 0,{target:n,syntheticEvent:e,nativeEvent:e.nativeEvent}))},n.setValidity=function(){n.element&&n.element.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"")},(0,f.s)(h),n}return Kt(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rawValue",{get:function(){return this._service.rawValue(this.value)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=this.value,t=this._service.validationValue(e);return{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!(this.required&&!t||this.props.maskValidation&&this.props.prompt&&-1!==e.indexOf(this.props.prompt)),valueMissing:!t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){if(this.element&&this.state.focused&&t.focused){var n=this._selection,r=n[0],o=n[1],i=e.selection,a=this.props.selection;(!i&&a||i&&a&&(i.start!==a.start||i.end!==a.end))&&(r=a.start,o=a.end),null!==r&&null!==o&&this.element.setSelectionRange(r,o)}var s,l;s=e,l=this.props,s.includeLiterals===l.includeLiterals&&s.mask===l.mask&&s.prompt===l.prompt&&s.promptPlaceholder===l.promptPlaceholder&&function(e,t){if(!!e!=!!t)return!1;if(e===t||!e||!t)return!0;var n=!0;for(var r in e)if(e[r]!==t[r]){n=!1;break}if(n)for(var r in t)if(!e.hasOwnProperty(r)){n=!1;break}return n}(s.rules,l.rules)||this.updateService(),this.setValidity()},t.prototype.componentDidMount=function(){this.updateService(),this.setValidity()},t.prototype.render=function(){var e,n=this,r=this.props,o=r.size,a=void 0===o?t.defaultProps.size:o,s=r.fillMode,l=void 0===s?t.defaultProps.fillMode:s,d=r.rounded,p=void 0===d?t.defaultProps.rounded:d,f=this.props.id||this._inputId,h=!this.validityStyles||this.validity.valid,m=this.props.style||{},g=i.createElement("span",{dir:this.props.dir,className:(0,c.A)("k-maskedtextbox k-input",(e={},e["k-input-".concat(de.G.sizeMap[a]||a)]=a,e["k-input-".concat(l)]=l,e["k-rounded-".concat(de.G.roundedMap[p]||p)]=p,e["k-invalid"]=!h,e["k-required"]=this.required,e["k-disabled"]=this.props.disabled,e),this.props.className),style:this.props.label?m:Wt({width:this.props.width},m)},i.createElement("input",{type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,className:"k-input-inner",value:this.value,id:f,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,name:this.props.name,tabIndex:(0,u.p)(this.props.tabIndex,this.props.disabled,!0),accessKey:this.props.accessKey,title:this.props.title,disabled:this.props.disabled||void 0,readOnly:this.props.readonly||void 0,placeholder:this.props.placeholder,ref:function(e){return n._input=e},onChange:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragStart:Ht,onDrop:Ht}));return this.props.label?i.createElement(pe._,{label:this.props.label,editorId:f,editorValue:this.value,editorValid:h,editorDisabled:this.props.disabled,editorPlaceholder:this.props.placeholder,children:g,style:{width:this.props.width},dir:this.props.dir}):g},t.prototype.triggerOnChange=function(e,t){if(this.setState({value:e}),this.props.onChange){this._valueDuringOnChange=e;var n={syntheticEvent:t,nativeEvent:t.nativeEvent,selectionStart:this._selection[0],selectionEnd:this._selection[1],target:this,value:this.value};this.props.onChange.call(void 0,n),this._valueDuringOnChange=void 0}},t.prototype.updateService=function(e){var t=Object.assign({includeLiterals:this.props.includeLiterals,mask:this.props.mask,prompt:this.props.prompt,promptPlaceholder:this.props.promptPlaceholder,rules:this.rules},e);this._service.update(t)},Object.defineProperty(t.prototype,"rules",{get:function(){return Object.assign({},Vt,this.props.rules)},enumerable:!1,configurable:!0}),t.displayName="MaskedTextBox",t.propTypes={value:a.string,defaultValue:a.string,placeholder:a.string,title:a.string,dir:a.string,id:a.string,style:a.object,className:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,width:a.oneOfType([a.string,a.number]),tabIndex:a.number,accessKey:a.string,disabled:a.bool,readonly:a.bool,prompt:a.string,promptPlaceholder:a.string,includeLiterals:a.bool,maskValidation:a.bool,mask:a.string,rules:function(e,t,n){var r=e.rules;return void 0===r||Object.entries(r).some((function(e){return"string"!=typeof e||!(r[e]instanceof RegExp)}))?null:new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed.")},selection:a.shape({start:a.number.isRequired,end:a.number.isRequired}),name:a.string,label:a.string,validationMessage:a.string,required:a.bool,valid:a.bool,validityStyles:a.bool,onChange:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])},t.defaultProps={prompt:"_",promptPlaceholder:" ",includeLiterals:!1,maskValidation:!0,rules:Vt,required:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},t}(i.Component),qt=(0,p.Y)(),Ut=(0,p.u)(qt,$t);Ut.displayName="KendoReactMaskedTextBox";var Gt,Yt=n(9844),Xt=function(){return Xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Xt.apply(this,arguments)};!function(e){e.start="start",e.end="end",e.min="min",e.max="max",e.increase="increase",e.decrease="decrease"}(Gt||(Gt={}));var Jt=function(){return Jt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Jt.apply(this,arguments)},Zt=(0,p.Y)(),Qt=i.forwardRef((function(e,t){var n,r;(0,f.s)(h);var o=(0,ue.Y)(Zt,e),a=i.useRef(null),s=i.useRef(null),l=i.useRef(null),d=i.useRef(null),p=i.useRef(null),g=i.useCallback((function(){d.current&&d.current.focus()}),[d]);i.useImperativeHandle(a,(function(){return{element:s.current,focus:g,props:o}})),i.useImperativeHandle(t,(function(){return a.current}));var y=i.useMemo((function(){return o.min}),[o.min]),b=i.useMemo((function(){return o.max}),[o.max]),w=i.useMemo((function(){return void 0!==o.step?o.step:tn.step}),[o.step,tn.step]),C=(0,H.n)(s,o.dir),x=i.useState(""),O=x[0],S=x[1],E=function(e,t,n){var r=i.useState(e),o=r[0],a=r[1],s=i.useCallback((function(e){var r=function(e,t){var n,r;switch(t.type){case Gt.start:if(void 0===t.payload)return e;n={start:t.payload>e.end?e.end:Math.max(t.payload,t.min),end:e.end};break;case Gt.end:if(void 0===t.payload)return e;n={start:e.start,end:t.payload<e.start?e.start:Math.min(t.payload,t.max)};break;case Gt.min:n="start"===t.key?Xt(Xt({},e),{start:t.min}):Xt(Xt({},e),{end:Math.max(t.min,e.start)});break;case Gt.max:n="start"===t.key?Xt(Xt({},e),{start:Math.min(t.max,e.end)}):Xt(Xt({},e),{end:t.max});break;case Gt.increase:if(void 0===t.step||void 0===t.key)return e;r=e[t.key]+t.step,n="start"===t.key?r<t.min?Xt(Xt({},e),{start:t.min}):Xt(Xt({},e),{start:Math.min(r,e.end)}):r>t.max?Xt(Xt({},e),{end:t.max}):Xt(Xt({},e),{end:Math.max(r,e.start)});break;case Gt.decrease:if(void 0===t.step||void 0===t.key)return e;r=e[t.key]-t.step,n="start"===t.key?r<t.min?Xt(Xt({},e),{start:t.min}):Xt(Xt({},e),{start:Math.min(r,e.end)}):r>t.max?Xt(Xt({},e),{end:t.max}):Xt(Xt({},e),{end:Math.max(r,e.start)});break;default:n=e}return n}(t.state||o,Jt(Jt({},e),t));n&&n(r,e.event),a(r)}),[t,n]);return[o,s]}(o.defaultValue||tn.defaultValue,{min:y,max:b,step:w,state:o.value},(function(e,t){o.onChange&&a.current&&o.onChange.call(void 0,{value:e,target:a.current,syntheticEvent:t})})),I=E[0],N=E[1],T=i.useMemo((function(){return o.value||I}),[o.value,I]),M=i.useRef(null),D=i.useRef(null),R=i.useMemo((function(){return(T.start-y)/(b-y)*100}),[T.start,y,b]),P=i.useMemo((function(){return(T.end-y)/(b-y)*100}),[T.end,y,b]),_=i.useMemo((function(){return o.vertical?{paddingTop:0,height:"100%"}:{}}),[o.vertical]),A=i.useMemo((function(){return o.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"}}),[o.vertical]),j=(0,v.useLocalization)(),F=i.useCallback((function(e){if(D.current){var t=D.current.getBoundingClientRect(),n=o.vertical?t.bottom-e.clientY:"rtl"===C?t.right-e.clientX:e.clientX-t.left,r=o.vertical?t.height:t.width;return y+n/r*(b-y)}}),[D,o.vertical,C,y,b,I.start,I.end,o.value&&o.value.start,o.value&&o.value.end]),z=i.useCallback((function(e){return e<=T.start?"start":e>=T.end?"end":2*e<T.end+T.start?"start":"end"}),[I.start,I.end,o.value&&o.value.start,o.value&&o.value.end]),L=i.useCallback((function(e){switch(e.keyCode){case m.R.right:e.preventDefault(),N({type:"rtl"===C?Gt.decrease:Gt.increase,key:"start",event:e});break;case m.R.up:e.preventDefault(),N({type:Gt.increase,key:"start",event:e});break;case m.R.left:e.preventDefault(),N({type:"rtl"===C?Gt.increase:Gt.decrease,key:"start",event:e});break;case m.R.down:e.preventDefault(),N({type:Gt.decrease,key:"start",event:e});break;case m.R.home:e.preventDefault(),N({type:Gt.min,key:"start",event:e});break;case m.R.end:e.preventDefault(),N({type:Gt.max,key:"start",event:e})}}),[N]),B=i.useCallback((function(e){switch(e.keyCode){case m.R.right:e.preventDefault(),N({type:"rtl"===C?Gt.decrease:Gt.increase,key:"end",event:e});break;case m.R.up:e.preventDefault(),N({type:Gt.increase,key:"end",event:e});break;case m.R.left:e.preventDefault(),N({type:"rtl"===C?Gt.increase:Gt.decrease,key:"end",event:e});break;case m.R.down:e.preventDefault(),N({type:Gt.decrease,key:"end",event:e});break;case m.R.home:e.preventDefault(),N({type:Gt.min,key:"end",event:e});break;case m.R.end:e.preventDefault(),N({type:Gt.max,key:"end",event:e})}}),[N,C]),K=i.useCallback((function(e){var t=F(e),n=z(t);S(n),"end"===n?p.current.focus():d.current.focus();var r="end"===n?Gt.end:Gt.start;N({type:r,payload:t,event:e})}),[o.vertical,y,b,N]);return(0,Yt.O)(D,{onPress:K,onDrag:function(e){var t=F(e),n="end"===O?Gt.end:Gt.start;N({type:n,payload:t,event:e})},onRelease:function(e){var t=F(e),n="end"===O?Gt.end:Gt.start;N({type:n,payload:t,event:e}),S("")}}),i.createElement("div",{id:o.id,style:o.style,ref:s,dir:C,className:(0,c.A)("k-widget k-slider",{"k-rtl":"rtl"===C,"k-disabled":o.disabled,"k-slider-vertical":o.vertical,"k-slider-horizontal":!o.vertical},o.className)},i.createElement("div",{ref:D,className:"k-slider-track-wrap",style:Jt({flexGrow:1,position:"relative",touchAction:"none"},A)},o.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:Jt({},_)},i.Children.map(o.children,(function(e){return e&&i.cloneElement(e,{position:100*(e.props.position-o.min)/(o.max-o.min),vertical:o.vertical},e.props.children)}))),i.createElement("div",{ref:M,className:"k-slider-track",style:o.vertical?{bottom:0,height:"100%"}:(n={},n["rtl"===C?"right":"left"]=0,n.width="100%",n)},null!==R&&null!==P&&i.createElement("div",{"data-selection":!0,ref:l,title:"".concat(T.start," - ").concat(T.end),className:"k-slider-selection",style:o.vertical?{height:P-R+"%",bottom:R+"%"}:(r={},r["rtl"===C?"right":"left"]=R+"%",r.width=P-R+"%",r)}),i.createElement("span",{ref:d,role:"slider",tabIndex:(0,u.p)(o.startTabIndex,o.disabled,void 0),"aria-valuemin":y,"aria-valuemax":Math.max(b,T.end),"aria-valuenow":T.start,"aria-disabled":o.disabled?"true":void 0,"aria-valuetext":"".concat(T.start," - ").concat(T.end),className:"k-draghandle",title:j.toLanguageString(k,V[k]),style:o.vertical?{bottom:"calc("+R+"%)",zIndex:1}:"rtl"===C?{right:"calc("+R+"% - 13px)",zIndex:1}:{left:"calc("+R+"%)",zIndex:1},onKeyDown:L}),i.createElement("span",{ref:p,role:"slider",tabIndex:(0,u.p)(o.endTabIndex,o.disabled,void 0),"aria-valuemin":Math.min(y,T.start),"aria-valuemax":b,"aria-valuenow":T.end,"aria-disabled":o.disabled?"true":void 0,"aria-valuetext":"".concat(T.start," - ").concat(T.end),className:"k-draghandle",title:j.toLanguageString(k,V[k]),style:o.vertical?{bottom:"calc("+P+"%)",zIndex:1}:"rtl"===C?{right:"calc("+P+"% - 13px)",zIndex:1}:{left:"calc("+P+"%)",zIndex:1},onKeyDown:B}))))})),en={value:function(e,t,n){if(e.value){var r=e.value.start,o=e.value.end,i=e.min,a=e.max;if(r>o||r>a||r<i||o>a||o<i||o<r)return new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n "))}return null},defaultValue:function(e,t,n){if(e.defaultValue){var r=e.defaultValue.start,o=e.defaultValue.end,i=e.min,a=e.max;if(r>o||r>a||r<i||o>a||o<i||o<r)return new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n "))}return null},onChange:a.func,step:a.number,min:function(e,t,n){var r=e[t],o=e.min,i=e.max;return void 0===o?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n ").concat(t," value can not be undefined.\n ")):r&&o>=i?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n ").concat(t," value can not be equal to or bigger than the max value.\n ")):null},max:function(e,t,n){var r=e[t],o=e.min,i=e.max;return void 0===i?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n ").concat(t," value can not be undefined.\n ")):r&&i<=o?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n ").concat(t," value can not be equal to or smaller than the min value.\n ")):null},vertical:a.bool,disabled:a.bool,dir:a.oneOf(["ltr","rtl"])},tn={step:1,defaultValue:{start:0,end:0},vertical:!1,disabled:!1};Qt.displayName="KendoReactRangeSlider",Qt.propTypes=en,Qt.defaultProps=tn;var nn=n(3228),rn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),on=function(){return on=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},on.apply(this,arguments)},an=function(e){function t(n){var r=e.call(this,n)||this;return r.setValidity=function(){r._input&&r._input.setCustomValidity&&r._input.setCustomValidity(r.validity.valid?"":r.props.validationMessage||r.defaultValidationMessage.toLanguageString(z,V[z]))},r.limit=function(e,t,n){var r=n.offsetWidth,o=t.offsetWidth;return e<0?0:e>r-o?r-o:e},r.toggle=function(e,t){r.setState({checked:e}),r.valueDuringOnChange=e,(0,g.N)(r.props.onChange,t,r,{value:e}),r.valueDuringOnChange=void 0},r._element=null,r._wrapper=null,r._input=null,r._id=(0,l.M)(),r.defaultValidationMessage=(0,v.provideLocalizationService)(r),r.focus=function(){r._element&&r._element.focus()},r.dummyInput=function(e){return i.createElement("input",{type:"checkbox",checked:r.props.checked,ref:function(e){r._input=e},tabIndex:-1,"aria-hidden":!0,value:e,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"},onChange:nn.Z})},r.handleClick=function(e){r.eventTimeStamp!==e.timeStamp&&(r.eventTimeStamp=e.timeStamp,r.toggle(!r.value,e))},r.handleKeyDown=function(e){if(!r.props.disabled){var t=e.keyCode;t!==m.R.space&&t!==m.R.enter||(r.toggle(!r.value,e),e.preventDefault())}},r.handleWrapperFocus=function(e){if(!r.props.disabled){r.setState({focused:!0});var t=r.props.onFocus;t&&t.call(void 0,e)}},r.handleWrapperBlur=function(e){if(!r.props.disabled){r.setState({focused:!1});var t=r.props.onBlur;t&&t.call(void 0,e)}},(0,f.s)(h),r.state={checked:n.defaultChecked||t.defaultProps.defaultChecked,focused:!1},r}return rn(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.checked?this.props.checked:this.state.checked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"actionElement",{get:function(){return this._wrapper},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=void 0!==this.props.valid?this.props.valid:!this.props.required||!!this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.setValidity(),this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.setValidity()},t.prototype.render=function(){var e,t,n,r=this,o=this.state.focused,a=this.props,s=a.dir,l=a.disabled,d=a.trackRounded,p=a.thumbRounded,f=a.size,h=a.id,m=a.offLabel,g=a.onLabel,v=a.tabIndex;this.dir=s||this._wrapper&&getComputedStyle(this._wrapper).direction||void 0;var y=!this.validityStyles||this.validity.valid,b=(0,c.A)("k-switch",((e={})["k-switch-".concat(de.G.sizeMap[f]||f)]=f,e["k-rounded-".concat(de.G.roundedMap[d]||d)]=d,e["k-switch-on"]=this.value,e["k-switch-off"]=!this.value,e["k-focus"]=o,e["k-disabled"]=l,e["k-invalid"]=!y,e),this.props.className),k={"aria-checked":this.value,"aria-disabled":l||void 0};return i.createElement("span",{ref:function(e){r._wrapper=e},className:b,dir:this.dir,onKeyDown:this.handleKeyDown,onClick:this.handleClick,onBlur:this.handleWrapperBlur,onFocus:this.handleWrapperFocus},i.createElement("span",on({className:(0,c.A)("k-switch-track",(t={},t["k-rounded-".concat(de.G.roundedMap[d]||d)]=d,t)),id:h||this._id,role:"switch"},k,{"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,ref:function(e){r._element=e},tabIndex:(0,u.p)(v,l,void 0),accessKey:this.props.accessKey}),this.dummyInput(this.value),i.createElement("span",{className:"k-switch-label-on"},g),i.createElement("span",{className:"k-switch-label-off"},m),i.createElement("span",{className:"k-switch-thumb-wrap"},i.createElement("span",{className:(0,c.A)("k-switch-thumb",(n={},n["k-rounded-".concat(p)]=p,n))}))))},t.displayName="Switch",t.propTypes={accessKey:a.string,checked:a.bool,className:a.string,disabled:a.bool,defaultChecked:a.bool,size:a.oneOf([null,"small","medium","large"]),trackRounded:a.oneOf([null,"small","medium","large","full"]),thumbRounded:a.oneOf([null,"small","medium","large","full"]),dir:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,offLabel:a.string,required:a.bool,tabIndex:a.number,valid:a.bool,validate:a.bool,validationMessage:a.string,onBlur:a.any,onChange:a.any,onFocus:a.any,onLabel:a.string},t.defaultProps={disabled:!1,defaultChecked:!1,size:"medium",trackRounded:"full",thumbRounded:"full",offLabel:"OFF",onBlur:nn.Z,onFocus:nn.Z,onLabel:"ON",required:!1,validityStyles:!0},t}(i.Component),sn=(0,p.Y)(),ln=(0,p.u)(sn,an);ln.displayName="KendoReactSwitch";var cn=function(){return cn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cn.apply(this,arguments)},un=(0,p.Y)(),dn=i.forwardRef((function(e,t){var n;(0,f.s)(h);var r=(0,ue.Y)(un,e),o=r,a=o.ariaDescribedBy,s=o.ariaLabelledBy,d=o.checked,p=o.className,y=o.children,b=o.defaultChecked,k=o.disabled,w=o.defaultValue,C=o.id,x=o.size,O=o.rounded,S=o.label,E=o.labelPlacement,I=o.name,N=o.labelOptional,T=o.onChange,M=o.onFocus,D=o.onBlur,R=o.tabIndex,P=o.value,_=o.required,A=o.valid,z=o.validationMessage,L=o.validityStyles,B=(o.visited,o.touched,o.modified,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(o,["ariaDescribedBy","ariaLabelledBy","checked","className","children","defaultChecked","disabled","defaultValue","id","size","rounded","label","labelPlacement","name","labelOptional","onChange","onFocus","onBlur","tabIndex","value","required","valid","validationMessage","validityStyles","visited","touched","modified"])),K=i.useRef(null),W=i.useCallback((function(){K.current&&K.current.focus()}),[]),$=i.useCallback((function(){return{element:K.current,focus:W,get name(){return K.current&&K.current.name}}}),[W]);i.useImperativeHandle(t,$);var q=i.useState(b),U=q[0],G=q[1],Y=i.useState(w),X=Y[0],J=Y[1],Z="boolean"==typeof P||null===P,Q=void 0!==d,ee=Z,te=ee?P:X,ne=Q?d:ee?void 0:U,re=void 0===ne&&te,oe=re?te:ne,ie=re||ee?null===P?P:void 0:P||te,ae=null===oe||null===ie,se=i.useMemo((function(){return(0,l.M)()}),[]),le=(0,v.useLocalization)(),ce=function(e){return le.toLanguageString(e,V[e])},pe=ce(j),fe=ce(F),he=void 0!==A?A:!_||!!ne;i.useEffect((function(){K.current&&K.current.setCustomValidity&&K.current.setCustomValidity(he?"":z||pe)}),[he,z,pe]);var me=i.useCallback((function(e,t){ee||k||(J(t),Q||k||G(t)),T&&!k&&(0,g.N)(T,e,cn(cn({},$()),{value:t}),{value:t})}),[Q,k,T,ee,$]),ge=i.useCallback((function(e){var t=e.target.checked;me(e,t)}),[me,P]),ve=i.useCallback((function(e){if(!k){var t=e.keyCode,n=e.currentTarget.checked;t===m.R.space&&(e.preventDefault(),e.stopPropagation(),me(e,!n))}}),[k,me]),ye=i.useCallback((function(e){k||e.keyCode===m.R.space&&e.preventDefault()}),[k]),be=i.useCallback((function(e){M&&!k&&(0,g.N)(M,e,$(),void 0)}),[M,k,$]),ke=i.useCallback((function(e){D&&!k&&(0,g.N)(D,e,$(),void 0)}),[D,k,$]),we=(0,H.n)(K,r.dir),Ce=(0,c.A)({"k-disabled":k},p),xe=cn(cn({type:"checkbox",className:(0,c.A)("k-checkbox",(n={},n["k-checkbox-".concat(de.G.sizeMap[x]||x)]=x,n["k-rounded-".concat(de.G.roundedMap[O]||O)]=O,n["k-indeterminate"]=ae,n["k-invalid k-invalid"]=!(he||void 0!==L||!0===L),n)),ref:K,name:I,id:C||se,"aria-labelledby":s,"aria-describedby":a,checked:Boolean(oe),disabled:k,tabIndex:(0,u.p)(R,k),role:"checkbox",required:void 0!==_&&_,"aria-checked":!(!ne&&!oe)||!!ae&&"mixed","aria-disabled":k||void 0},B),{onChange:ge,onKeyDown:ve,onKeyUp:ye,onFocus:be,onBlur:ke}),Oe=i.createElement(i.Fragment,null,void 0===ie?i.createElement("input",cn({},xe)):i.createElement("input",cn({},xe,{value:Z?void 0:null===ie?"":ie}))),Se=i.createElement(i.Fragment,null,void 0!==S?i.createElement("label",{className:"k-checkbox-label",htmlFor:C||se,style:{userSelect:"none"}},S,N&&i.createElement("span",{className:"k-label-optional"},fe)):null);return i.createElement(i.Fragment,null,"before"===E?i.createElement("span",{className:Ce,dir:"rtl"},Oe,Se,y):i.createElement("span",{className:Ce,dir:we},Oe,Se,y))}));dn.propTypes={checked:a.bool,className:a.string,defaultChecked:a.bool,defaultValue:a.any,dir:a.string,disabled:a.bool,id:a.string,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large"]),ariaLabelledBy:a.string,ariaDescribedBy:a.string,label:a.any,labelPlacement:a.string,labelOptional:a.bool,name:a.string,tabIndex:a.number,value:a.any,validationMessage:a.string,required:a.bool,validate:a.bool,valid:a.bool,onChange:a.func,onFocus:a.func,onBlur:a.func},dn.defaultProps={size:"medium",rounded:"medium"},dn.displayName="KendoCheckbox";var pn=function(){return pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pn.apply(this,arguments)},fn=(0,p.Y)(),hn=i.forwardRef((function(e,t){var n;(0,f.s)(h);var r=(0,ue.Y)(fn,e),o=r.ariaDescribedBy,a=r.checked,s=r.children,d=r.className,p=r.disabled,m=r.id,v=r.size,y=r.label,b=r.labelPlacement,k=r.name,w=r.style,C=r.tabIndex,x=r.value,O=r.valid,S=r.onChange,E=r.onFocus,I=r.onBlur,N=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(r,["ariaDescribedBy","checked","children","className","disabled","id","size","label","labelPlacement","name","style","tabIndex","value","valid","onChange","onFocus","onBlur"]),T=i.useRef(null),M=i.useCallback((function(){T.current&&T.current.focus()}),[]),D=i.useCallback((function(){return{element:T.current,focus:M}}),[M]);i.useImperativeHandle(t,D);var R=i.useMemo((function(){return(0,l.M)()}),[]),P=i.useCallback((function(e){(0,g.N)(S,e,D(),{value:x})}),[S,x,p]),_=i.useCallback((function(e){E&&!p&&(0,g.N)(E,e,D(),void 0)}),[E,p]),A=i.useCallback((function(e){I&&!p&&(0,g.N)(I,e,D(),void 0)}),[I,p]),j=pn({type:"radio",id:m||R,name:k,className:(0,c.A)("k-radio",(n={},n["k-radio-".concat(de.G.sizeMap[v]||v)]=v,n["k-invalid"]=!1===O,n),d),ref:T,disabled:p,tabIndex:(0,u.p)(C,p),checked:a,style:w,"aria-describedby":o,value:x,onChange:P,onFocus:_,onBlur:A},N),F=i.createElement(i.Fragment,null,void 0!==y?i.createElement("label",{className:"k-radio-label",htmlFor:m||R,style:{userSelect:"none"},"aria-label":y},y):null),z=i.createElement("input",pn({},j));return"before"===b?i.createElement(i.Fragment,null,F,z,s):i.createElement(i.Fragment,null,z,F,s)}));hn.propTypes={ariaDescribedBy:a.string,checked:a.bool,className:a.string,disabled:a.bool,id:a.string,size:a.oneOf([null,"small","medium","large"]),label:a.string,labelPlacement:a.string,name:a.string,style:a.object,tabIndex:a.number,value:a.any,valid:a.bool,onChange:a.func,onFocus:a.func,onBlur:a.func},hn.displayName="KendoRadioButton",hn.defaultProps={size:"medium"};var mn=n(1573),gn=function(){return gn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gn.apply(this,arguments)},vn=(0,p.Y)(),yn=i.forwardRef((function(e,t){(0,f.s)(h);var n=(0,ue.Y)(vn,e),r=n.ariaLabelledBy,o=n.ariaDescribedBy,a=n.className,u=n.data,d=n.defaultValue,p=n.disabled,m=n.name,v=n.labelPlacement,y=n.layout,b=n.style,k=n.value,w=n.valid,C=n.item,x=void 0===C?bn.item:C,O=n.onChange,S=n.onFocus,E=i.useRef(null),I=i.useCallback((function(){E.current&&(0,s.n)(E.current)}),[]),N=i.useCallback((function(){return{element:E.current,focus:I}}),[I]);i.useImperativeHandle(t,N);var T=i.useState(d),M=T[0],D=T[1],R=void 0!==k,P=R?k:M,_=i.useCallback((function(e){var t=e.value;R||p||D(t),O&&!p&&(0,g.N)(O,e.syntheticEvent,N(),{value:t})}),[D,O,p]),A=i.useCallback((function(e){S&&!p&&(0,g.N)(S,e.syntheticEvent,N(),void 0)}),[S,p]),j=i.useMemo((function(){return(0,l.M)()}),[]),F=(0,c.A)("k-radio-list",{"k-list-horizontal":"horizontal"===y,"k-list-vertical":"vertical"===y||void 0===y},a),z=(0,mn.V)(E,n.dir),L=u&&u.map((function(e,t){var n=P===e.value,r=null==P,o=gn(gn({},e),{valid:w,checked:n,disabled:!(!e.disabled&&!p),labelPlacement:e.labelPlacement?e.labelPlacement:v,tabIndex:e.tabIndex?e.tabIndex:r&&0===t||n?0:-1,index:t,name:m||j,onChange:_,onFocus:A});return i.createElement(x,{className:(0,c.A)("k-radio-item",{"k-disabled":o.disabled||p}),key:t,role:"radio"},i.createElement(hn,gn({},o)))}));return i.createElement("ul",{role:"radiogroup",className:F,ref:E,dir:z,style:b,"aria-labelledby":r,"aria-describedby":o},L)})),bn={item:function(e){return i.createElement("li",gn({},e))}};yn.propTypes={ariaLabelledBy:a.string,ariaDescribedBy:a.string,className:a.string,data:a.arrayOf(a.object),defaultValue:a.any,dir:a.string,disabled:a.bool,labelPlacement:a.string,layout:a.string,name:a.string,style:a.object,value:a.any,onChange:a.func,onFocus:a.func},yn.defaultProps=bn,yn.displayName="KendoRadioGroup";var kn=function(){return kn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},kn.apply(this,arguments)},wn=(0,p.Y)(),Cn=i.forwardRef((function(e,t){var n,r=(0,ue.Y)(wn,e),o=r,a=o.size,s=o.rounded,d=o.fillMode,p=o.ariaDescribedBy,f=o.ariaLabelledBy,h=o.autoSize,m=o.className,v=o.defaultValue,y=o.disabled,b=o.readOnly,k=o.required,w=o.rows,C=o.id,x=o.name,O=o.placeholder,S=o.style,E=o.tabIndex,I=o.value,N=o.valid,T=o.validationMessage,M=o.validityStyles,D=o.onChange,R=o.onFocus,P=o.onBlur,_=(o.visited,o.touched,o.modified,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(o,["size","rounded","fillMode","ariaDescribedBy","ariaLabelledBy","autoSize","className","defaultValue","disabled","readOnly","required","rows","id","name","placeholder","style","tabIndex","value","valid","validationMessage","validityStyles","onChange","onFocus","onBlur","visited","touched","modified"])),A=i.useRef(null),j=i.useCallback((function(){A.current&&A.current.focus()}),[]),F=i.useState(v),z=F[0],L=F[1],B=void 0!==I,V=B?I:z,K=i.useCallback((function(){return{element:A,focus:j,get value(){return V},get name(){return A.current&&A.current.name}}}),[j,V]);i.useImperativeHandle(t,K);var W=i.useState("auto"),$=W[0],q=W[1],U=i.useMemo((function(){return(0,l.M)()}),[]),G=(0,H.n)(A,r.dir),Y=void 0!==N?N:!k||!!V;i.useEffect((function(){A.current&&A.current.setCustomValidity&&A.current.setCustomValidity(Y?"":T||"")}),[Y,T]),i.useLayoutEffect((function(){A.current&&q("".concat(A.current.scrollHeight,"px"))}),[V]);var X=i.useCallback((function(e){var t=e.target.value;B||y||(q("auto"),L(t)),D&&!y&&(0,g.N)(D,e,kn(kn({},K()),{value:t}),{value:t})}),[L,D,y,B]),J=i.useCallback((function(e){R&&!y&&(0,g.N)(R,e,K(),void 0)}),[R,y]),Z=i.useCallback((function(e){P&&!y&&(0,g.N)(P,e,K(),void 0)}),[P,y]),Q=kn(kn({id:C||U,name:x,className:"k-input-inner !k-overflow-auto",ref:A,disabled:y,rows:w,placeholder:O,readOnly:b,required:k,tabIndex:(0,u.p)(E,y),style:h?{resize:"none",overflow:"hidden",height:$}:{},"aria-labelledby":f,"aria-describedby":p,"aria-multiline":!0,"aria-disabled":y||void 0,value:B?I:z},_),{onChange:X,onFocus:J,onBlur:Z});return i.createElement("span",{className:(0,c.A)("k-input","k-textarea",(n={},n["k-input-".concat(de.G.sizeMap[a]||a)]=a,n["k-input-".concat(d)]=d,n["k-rounded-".concat(de.G.roundedMap[s]||s)]=s,n["k-invalid"]=!(Y||void 0!==M||!0===M),n["k-required"]=k,n["k-disabled"]=y,n),m),style:S,dir:G},i.createElement("textarea",kn({},Q)))}));Cn.propTypes={ariaDescribedBy:a.string,ariaLabelledBy:a.string,autoSize:a.bool,className:a.string,defaultValue:a.string,dir:a.string,disabled:a.bool,readOnly:a.bool,rows:a.number,id:a.string,name:a.string,placeholder:a.string,style:a.object,tabIndex:a.number,value:a.oneOfType([a.string,a.arrayOf(a.string),a.number]),onChange:a.func,onFocus:a.func,onBlur:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])},Cn.displayName="KendoTextArea",Cn.defaultProps={size:"medium",rounded:"medium",fillMode:"solid"};var xn=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useRef(null),o=(0,H.n)(r,e.dir);i.useImperativeHandle(n,(function(){return{element:r.current,props:e,value:e.value}})),i.useImperativeHandle(t,(function(){return n.current}));var a=i.useCallback((function(t){e.onClick&&e.onClick.call(void 0,{value:e.value,target:n.current,syntheticEvent:t})}),[e.onClick,e.value]),s=i.useCallback((function(t){e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onKeyDown]),l=i.useCallback((function(t){e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onFocus]),u=i.useCallback((function(t){e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onBlur]),d=i.useCallback((function(t){e.onMouseMove&&e.onMouseMove.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseMove]),p=i.useCallback((function(t){e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseEnter]),f=i.useCallback((function(t){e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseLeave]);return i.createElement("span",{id:e.id,ref:r,dir:o,"data-half":e.half,tabIndex:e.tabIndex,title:e.title,style:e.style,className:(0,c.A)("k-rating-item",{"k-rtl":"rtl"===o,"k-selected":e.selected,"k-hover":e.hovered},e.className),onClick:a,onKeyDown:s,onFocus:l,onBlur:u,onMouseEnter:p,onMouseLeave:f,onMouseMove:d},e.children)})),On={id:a.string,icon:a.any,dir:a.oneOf(["ltr","rtl"]),title:a.string,value:a.number,half:a.bool,selected:a.bool,hovered:a.bool};xn.displayName="KendoReactRatingItem",xn.propTypes=On,xn.defaultProps={dir:"ltr"};var Sn,En=function(e,t){if(e%1){var n=Math.pow(10,(t.toString().split(".")[1]||t.toString().split(".")[0]).length);return Math.round(e*n)/n}return e},In=function(e,t,n){return En(e-n,n)<t&&t<e},Nn=function(e,t,n,r){return null!==t&&("continues"===r?In(e,t,n)?En(e-n/2,n/2)<=t:e<=t:"single"===r&&(In(e,t,n)?En(e-n/2,n/2)===t:e===t))},Tn=function(e,t,n){return"ltr"===e?n<t.x+t.width/2:n>t.x+t.width/2},Mn=function(e,t,n,r){for(var o=e;o<=t;o+=n)if(r===o)return!0;return!1};!function(e){e.select="select",e.deselect="deselect",e.increase="increase",e.decrease="decrease",e.min="min",e.max="max",e.reset="reset"}(Sn||(Sn={}));var Dn=function(){return Dn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Dn.apply(this,arguments)},Rn=function(e,t,n){var r=i.useState(e),o=r[0],a=r[1];return[o,function(e){var r=function(e,t){switch(t.type){case Sn.select:return void 0===t.payload||void 0===t.step?e:t.payload===e?null:t.payload>=t.min?t.payload<t.max?En(t.payload,t.step):t.max:t.min;case Sn.deselect:return null;case Sn.increase:return void 0===t.step?e:e<t.min?t.min:e+t.step<t.max?En(e+t.step,t.step):t.max;case Sn.decrease:return void 0===t.step?e:En(e-t.step,t.step)>=t.min?En(e-t.step,t.step):t.min;case Sn.min:return void 0===t.step?e:t.min;case Sn.max:return t.max;case Sn.reset:return null;default:return e}}(t.state||o,Dn(Dn({},e),t));n&&n(r,e.event),a(r)}]},Pn=(0,p.Y)(),_n=i.forwardRef((function(e,t){var n,r,o,a,s=(0,ue.Y)(Pn,e),l=(0,v.useLocalization)(),d=i.useRef(null),p=i.useRef(null),f=(0,H.n)(p,s.dir);i.useImperativeHandle(d,(function(){return{element:p.current,props:s}})),i.useImperativeHandle(t,(function(){return d.current}));for(var h,g,y=i.useCallback((function(e,t){s.onChange&&d.current&&s.onChange.call(void 0,{value:e,target:d.current,syntheticEvent:t})}),[s.onChange]),b=i.useMemo((function(){return void 0!==s.min?s.min:jn.min}),[s.min]),k=i.useMemo((function(){return void 0!==s.max?s.max:jn.max}),[s.max]),w=i.useMemo((function(){return s.precision||jn.precision}),[s.precision]),C=i.useMemo((function(){return void 0!==s.step?s.step:jn.step}),[s.step]),x=i.useMemo((function(){return s.readonly||jn.readonly}),[s.readonly]),O=i.useMemo((function(){return s.disabled||jn.disabled}),[s.disabled]),S=i.useMemo((function(){return s.item||jn.item}),[s.item]),E=Rn(s.defaultValue||jn.defaultValue,{state:s.value,min:b,max:k,step:"half"===w?C/2:C},y),I=E[0],N=E[1],T=Rn(null,{state:s.value,min:b,max:k,step:"half"===w?C/2:C,precision:w}),M=T[0],D=T[1],R=i.useMemo((function(){return s.value||I}),[s.value,I]),P=i.useMemo((function(){return M}),[M]),_=i.useMemo((function(){return s.selection||jn.selection}),[s.selection]),A=i.useMemo((function(){return C/("half"===w?2:1)}),[C,w]),j=i.useCallback((function(e){if(e.target&&e.target.element&&!x&&!O){if("half"===w){var t=e.target.element.getBoundingClientRect(),n=Tn(f||"ltr",t,e.syntheticEvent.clientX)?En(e.target.value-C/2,A):e.target.value;N({type:Sn.select,payload:n,event:e.syntheticEvent})}else N({type:Sn.select,payload:e.target.value,event:e.syntheticEvent});if(s.onClick){var r={value:R,target:d.current,syntheticEvent:e.syntheticEvent};s.onClick.call(void 0,r)}}}),[s.onClick,N,R]),F=i.useCallback((function(e){if(!x&&!O){switch(e.keyCode){case m.R.right:e.preventDefault(),N({type:"rtl"===f?Sn.decrease:Sn.increase,event:e});break;case m.R.left:e.preventDefault(),N({type:"rtl"===f?Sn.increase:Sn.decrease,event:e});break;case m.R.home:e.preventDefault(),N({type:"rtl"===f?Sn.min:Sn.max,event:e});break;case m.R.end:e.preventDefault(),N({type:"rtl"===f?Sn.max:Sn.min,event:e});break;case m.R.esc:e.preventDefault(),N({type:Sn.deselect,event:e})}s.onKeyDown&&s.onKeyDown.call(void 0,{value:R,target:d.current,syntheticEvent:e})}}),[s.onKeyDown,N,R]),z=i.useCallback((function(e){if(s.onFocus){var t={target:d.current,syntheticEvent:e};s.onFocus.call(void 0,t)}}),[s.onFocus]),L=i.useCallback((function(e){if(s.onBlur){var t={target:d.current,syntheticEvent:e};s.onBlur.call(void 0,t)}}),[s.onBlur]),K=i.useCallback((function(e){if(e.target&&e.target.element)if("half"===w){var t=e.target.element.getBoundingClientRect(),n=Tn(f||"ltr",t,e.syntheticEvent.clientX)?e.target.value-C/2:e.target.value;D({type:Sn.select,payload:n,event:e.syntheticEvent})}else D({type:Sn.select,payload:e.target.value,event:e.syntheticEvent})}),[w,C,f]),W=i.useCallback((function(e){D({type:Sn.reset,event:e.syntheticEvent})}),[]),$=[],q=(h=En(k-b,A))-(g=C)*Math.floor(h/g),U=b;U<=k;U=En(U+C,A)){var G=En(U+q,A),Y="half"===w&&In(G,null!==P?P:null!==R?R:0,C),X=Nn(G,R,C,_),J=Nn(G,null!==P?P:R,C,_),Z=Nn(G,P,C,_);$.push(i.createElement(S,{key:G,value:G,dir:f,title:String(Y?En(G-C/2,A):G),icon:s.icon,half:Y,selected:X||J,hovered:Z,onClick:j,onMouseMove:K,onMouseLeave:W},Y&&i.createElement("span",{className:"k-rating-precision-complement",style:(n={width:"12px"},n["rtl"===f?"right":"left"]="50%",n)},i.createElement("span",{className:(0,c.A)("k-icon",(r={"k-i-star-outline":!s.icon},r["".concat(s.icon,"-outline")]=s.icon,r))})),Y&&i.createElement("span",{className:"k-rating-precision-part",style:{width:"12px"}},i.createElement("span",{className:(0,c.A)("k-icon",(o={"k-i-star":!s.icon},o["".concat(s.icon)]=s.icon,o))})),Y&&i.createElement("span",{style:{width:"24px",height:"24px",display:"block"}}),!Y&&i.createElement("span",{className:(0,c.A)("k-icon",(a={"k-i-star":!s.icon&&(Z||J&&!Z),"k-i-star-outline":!s.icon&&!Z},a["".concat(s.icon)]=s.icon&&(Z||J&&!Z),a["".concat(s.icon,"-outline")]=s.icon&&!Z,a))})))}return i.createElement("span",{id:s.id,style:s.style,ref:p,role:"slider",dir:f,tabIndex:(0,u.p)(s.tabIndex,s.disabled,void 0),className:(0,c.A)("k-rating k-widget",{"k-rtl":"rtl"===f,"k-state-readonly":x,"k-disabled":O},s.className),onKeyDown:F,onFocus:z,onBlur:L,"aria-valuemin":b,"aria-valuemax":k,"aria-valuenow":null!==R?R:void 0,"aria-disabled":O?"true":void 0,"aria-label":l.toLanguageString(B,V[B]),"aria-labelledby":s.ariaLabelledBy,"aria-describedby":s.ariaDescribedBy},i.createElement("input",{id:"rating",className:"k-hidden",readOnly:x,disabled:O}),i.createElement("span",{className:"k-rating-container"},$),s.label&&i.createElement("span",{className:"k-rating-label"},s.label))})),An={id:a.string,dir:a.oneOf(["ltr","rtl"]),selection:a.oneOf(["continues","single"]),precision:a.oneOf(["item","half"]),value:function(e,t,n){return e.value&&e.min&&e.max&&e.step&&!("half"===e.precision?Mn(e.min,e.max,e.step/2,e.value):Mn(e.min,e.max,e.step,e.value))&&"half"===e.precision?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,".\n The value of the { value } property is not correct, please check your values.\n ")):null},defaultValue:a.number,min:a.number,max:a.number,step:function(e,t,n){return void 0!==e.step&&e.step<=0?new Error("Invalid prop + ".concat(t," supplied to ").concat(n,'.\n The value of the { step } property is cannot be equal or less than "0", please check your values.\n ')):null},hovered:a.number,label:a.string,readonly:a.bool,disabled:a.bool,half:a.bool,icon:a.string,ariaDescribedBy:a.string},jn={dir:"ltr",min:1,max:5,step:1,item:xn,defaultValue:null,readonly:!1,disabled:!1,selection:"continues",precision:"item"};_n.displayName="KendoReactRating",_n.propTypes=An,_n.defaultProps=jn},6097:(e,t,n)=>{n.d(t,{_:()=>p});var r,o=n(3899),i=n(189),a=n(8047),s=n(499),l=n(2609),c=n(4006),u=n(8011),d=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focused:!1},n.handleFocus=function(e){n.setState({focused:!0})},n.handleBlur=function(e){n.setState({focused:!1})},(0,c.s)(u.k),n}return d(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.editorId,r=e.className,i=e.editorValue,c=e.editorPlaceholder,u=e.editorValid,d=e.editorDisabled,p=e.style,f=e.id,h=e.optional,m=(0,s.provideLocalizationService)(this),g=h?m.toLanguageString(l.y,l.s[l.y]):"",v=g&&o.createElement("span",{className:"k-label-optional"},g),y=(0,a.A)({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!c&&!i&&0!==i,"k-text-disabled":d,"k-rtl":"rtl"===this.props.dir},r),b=(0,a.A)({"k-label":!0,"k-text-error":!1===u,"k-text-disabled":d});return o.createElement("span",{id:this.props.id,className:y,onFocus:this.handleFocus,onBlur:this.handleBlur,style:p,dir:this.props.dir},this.props.children,t?n?o.createElement("label",{id:f,htmlFor:n,className:b},t,v):o.createElement("span",{id:f,className:b},t,v):null)},t.propTypes={label:i.string,editorId:i.string,editorValue:i.oneOfType([i.string,i.bool,i.number]),editorPlaceholder:i.string,editorValid:i.bool,editorDisabled:i.bool,id:i.string,style:i.object,className:i.string,optional:i.bool},t}(o.Component);(0,s.registerForLocalization)(p)},2609:(e,t,n)=>{var r;n.d(t,{y:()=>o,s:()=>i});var o="labels.optional",i=((r={})[o]="(Optional)",r)},8011:(e,t,n)=>{n.d(t,{k:()=>r});var r={name:"@progress/kendo-react-labels",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660123618,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},3457:(e,t,n)=>{n.r(t),n.d(t,{AppBar:()=>Wt,AppBarSection:()=>qt,AppBarSpacer:()=>Ut,Avatar:()=>ht,BottomNavigation:()=>fn,BottomNavigationItem:()=>dn,Breadcrumb:()=>Pn,BreadcrumbDelimiter:()=>En,BreadcrumbLink:()=>Nn,BreadcrumbListItem:()=>On,BreadcrumbOrderedList:()=>Mn,Card:()=>it,CardActions:()=>ct,CardBody:()=>lt,CardFooter:()=>pt,CardHeader:()=>at,CardImage:()=>ut,CardSubtitle:()=>dt,CardTitle:()=>st,Drawer:()=>Ot,DrawerContent:()=>St,DrawerItem:()=>yt,DrawerNavigation:()=>Ct,ExpansionPanel:()=>Fn,ExpansionPanelContent:()=>Ln,GridLayout:()=>kn,GridLayoutItem:()=>xn,Menu:()=>Ge,MenuItem:()=>ue,MenuItemArrow:()=>Le,MenuItemLink:()=>_e,PanelBar:()=>Y,PanelBarItem:()=>R,PanelBarUtils:()=>H,Splitter:()=>rt,SplitterPane:()=>Xe,StackLayout:()=>vn,Step:()=>_t,Stepper:()=>Ht,TabStrip:()=>E,TabStripContent:()=>k,TabStripNavigation:()=>p,TabStripNavigationItem:()=>c,TabStripTab:()=>N,TileLayout:()=>an,downArrowClass:()=>je,flatChildren:()=>B,flatVisibleChildren:()=>V,flatVisibleItems:()=>L,getFirstId:()=>j,getInitialState:()=>F,isArrayEqual:()=>$,isPresent:()=>K,leftArrowClass:()=>ze,renderChildren:()=>A,rightArrowClass:()=>Fe});var r,o=n(3899),i=n(189),a=n(8047),s=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)},c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(){t.props.onSelect&&t.props.onSelect(t.props.index)},t}return s(t,e),t.prototype.render=function(){var e,t=this.props,n=t.id,r=t.active,i=t.disabled,s=t.title,c=void 0===s?"Untitled":s,u=t.first,d=t.last,p={id:n,"aria-selected":r,"aria-controls":n,"aria-disabled":i,"aria-hidden":i,role:"tab",onClick:i?void 0:this.onClick},f=(0,a.A)("k-item",((e={})["k-first"]=u,e["k-last"]=d,e["k-disabled"]=i,e["k-active"]=r,e));return o.createElement("li",l({},p,{className:f}),o.createElement("span",{className:"k-link"},c))},t.propTypes={active:i.bool,disabled:i.bool,index:i.number,onSelect:i.func,title:i.oneOfType([i.string,i.element]),first:i.bool,last:i.bool},t}(o.Component),u=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.selected,i=n.tabPosition,s=n.children,l=n.onSelect,u=n.onKeyDown,p=o.Children.count(s),f=o.Children.toArray(s);s&&(e=(t=p,Array.apply(null,Array(t))).map((function(e,t,n){var i={active:r===t,disabled:f[t].props.disabled,index:t,title:f[t].props.title,first:0===t,last:t===n.length-1,onSelect:l};return o.createElement(c,d({key:t},i))})));var h=(0,a.A)("k-tabstrip-items-wrapper",{"k-hstack":"top"===i||"bottom"===i,"k-vstack":"left"===i||"right"===i}),m=(0,a.A)("k-tabstrip-items","k-reset");return o.createElement("div",{className:h},o.createElement("ul",{className:m,role:"tablist",tabIndex:this.props.tabIndex,onKeyDown:u},e))},t.propTypes={children:i.oneOfType([i.element,i.arrayOf(i.element)]),onSelect:i.func,onKeyDown:i.func,selected:i.number,tabIndex:i.number},t}(o.Component),f=n(4343),h=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(){return m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},m.apply(this,arguments)},g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children"]);return o.createElement(f.f,m({},{transitionName:"fade"},n),t)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,component:i.string,id:i.string,style:i.any},t.defaultProps={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500},t}(o.Component),v=n(3198),y=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=function(){return b=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},b.apply(this,arguments)},k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.contentId=(0,v.M)(),t.childFactory=function(e){return o.cloneElement(e,b(b({},e.props),{in:e.props.children.props.id===String(t.contentId+t.props.selected)}))},t}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.selected,r=t&&"number"==typeof n&&o.Children.toArray(t)[n],i=(0,a.A)("k-content","k-active",r&&r.props.contentClassName);return o.createElement("div",{className:i,style:this.props.style},this.renderContent(t))},t.prototype.renderContent=function(e){var t=this;return this.props.keepTabsMounted?o.Children.map(this.props.children,(function(e,n){return t.renderChild(e,n)})):this.renderChild(o.Children.toArray(e)[this.props.selected],this.props.selected)},t.prototype.renderChild=function(e,t){var n=t===this.props.selected,r={role:"tabpanel","aria-expanded":!0,"aria-labelledby":t.toString(),style:{display:n?void 0:"none"}},i={position:"initial",display:n?void 0:"none"};return e.props.disabled?null:this.props.animation?o.createElement(g,{appear:!0,exit:this.props.keepTabsMounted,style:i,childFactory:this.props.keepTabsMounted?this.childFactory:void 0},o.createElement("div",b({},r,{id:String(this.contentId+t),key:t}),e.props.children)):o.createElement("div",b({},r,{key:t}),e.props.children)},t.propTypes={animation:i.bool,children:i.oneOfType([i.element,i.arrayOf(i.element)]),selected:i.number,style:i.object},t}(o.Component),w=n(3493),C=n(4006),x={name:"@progress/kendo-react-layout",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660123967,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},O=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(){return S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},S.apply(this,arguments)},E=function(e){function t(t){var n,r=e.call(this,t)||this;return r._element=null,r.keyBinding=((n={})[w.R.left]=function(){return r.prevNavigatableTab()},n[w.R.right]=function(){return r.nextNavigatableTab()},n[w.R.down]=function(){return r.nextNavigatableTab()},n[w.R.up]=function(){return r.prevNavigatableTab()},n[w.R.home]=function(){return 0},n[w.R.end]=function(){return o.Children.count(r.props.children)-1},n),r.onSelect=function(e){r.props.selected!==e&&r.props.onSelect&&r.props.onSelect({selected:e})},r.onKeyDown=function(e){var t;switch(e.keyCode){case w.R.left:t=r.keyBinding[r.invertKeys(w.R.left,w.R.right)];break;case w.R.right:t=r.keyBinding[r.invertKeys(w.R.right,w.R.left)];break;case w.R.up:t=r.keyBinding[w.R.up];break;case w.R.down:t=r.keyBinding[w.R.down];break;case w.R.home:t=r.keyBinding[w.R.home];break;case w.R.end:t=r.keyBinding[w.R.end]}t&&(e.preventDefault(),r.onSelect(t()))},r.renderContent=function(e){var t=e.selected,n=e.children,r=e.tabContentStyle;return t<o.Children.count(n)&&t>-1?o.createElement(k,S({index:t},e,{style:r})):null},r.firstNavigatableTab=function(){var e=r.children(),t=o.Children.count(e);if(e)for(var n=0;n<t;n++)if(!e[n].props.disabled)return n},r.lastNavigatableTab=function(){var e=r.children(),t=o.Children.count(e);if(e)for(var n=t-1;n>0;n--)if(!e[n].props.disabled)return n},r.prevNavigatableTab=function(){var e=r.children(),t=r.props.selected,n=t?t-1:-1;if(n<0)return r.lastNavigatableTab();if(e)for(var o=n;o>-1;o--){if(!e[o].props.disabled)return o;if(0===o)return r.lastNavigatableTab()}},r.nextNavigatableTab=function(){var e=r.children(),t=r.props.selected,n=t?t+1:1,i=o.Children.count(e);if(n>=i)return r.firstNavigatableTab();if(e)for(var a=n;a<i;a++){if(!e[a].props.disabled)return a;if(a+1===i)return r.firstNavigatableTab()}},(0,C.s)(x),r}return O(t,e),t.prototype.render=function(){var e=this,t=S(S({},this.props),{children:this.children(),onKeyDown:this.onKeyDown,onSelect:this.onSelect}),n=t.tabPosition,r=t.tabIndex,i=void 0===r?0:r,s="bottom"===n,l=(0,a.A)("k-tabstrip","k-floatwrap",{"k-tabstrip-left":"left"===n,"k-tabstrip-right":"right"===n,"k-tabstrip-bottom":"bottom"===n,"k-tabstrip-top":"top"===n},this.props.className);return o.createElement("div",{id:this.props.id,ref:function(t){return e._element=t},dir:this.props.dir,className:l,style:this.props.style},!s&&o.createElement(p,S({},t,{tabIndex:i})),this.renderContent(t),s&&o.createElement(p,S({},t,{tabIndex:i})))},t.prototype.invertKeys=function(e,t){return this._element&&"rtl"===getComputedStyle(this._element).direction?t:e},t.prototype.children=function(){return o.Children.toArray(this.props.children).filter((function(e){return e}))},t.propTypes={animation:i.bool,children:i.node,onSelect:i.func,selected:i.number,style:i.object,tabContentStyle:i.object,tabPosition:i.string,tabIndex:i.number,className:i.string,dir:i.string},t.defaultProps={animation:!0,tabPosition:"top",keepTabsMounted:!1},t}(o.Component),I=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t.prototype.render=function(){return null},t.propTypes={disabled:i.bool,contentClassName:i.string,children:i.oneOfType([i.element,i.node]),title:i.oneOfType([i.string,i.element,i.node])},t}(o.Component),T=n(8686),M=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(){return D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},D.apply(this,arguments)},R=function(e){function t(t){var n=e.call(this,t)||this;return n.handleItemClick=function(){var e=n.props,t=e.onSelect,r=e.disabled,o=e.id;t&&!r&&t.call(void 0,{uniquePrivateKey:n.props.uniquePrivateKey,id:o,target:n})},n.childFactory=function(e){return n.props.keepItemsMounted?o.cloneElement(e,D(D({},e.props),{in:n.props.expanded})):e},n.state={show:t.expanded||!1},n}return M(t,e),t.prototype.render=function(){var e,t=this,n=this.props,r=n.id,i=n.children,s=n.title,l=n.uniquePrivateKey,c=n.disabled,u=n.selected,d=n.focused,p=n.expanded,f=n.className,h=n.level,m=n.headerClassName,g=n.animation,v=n.keepItemsMounted,y={role:"treeitem","aria-disabled":c,"aria-hidden":!c&&!p,"aria-selected":!c&&u,"aria-expanded":!c&&p&&!!i},b=(0,a.A)("k-item",{"k-panelbar-header":0===h,"k-panelbar-item":0!==h,"k-state-expanded":p&&!!i},"k-level-".concat(h),f),k=(0,a.A)("k-link",{"k-selected":!c&&u,"k-focus":!c&&d,"k-disabled":c},m),w=(0,a.A)("k-panelbar-toggle","k-icon",((e={})["k-i-arrow-chevron-up"]=p&&!!i,e["k-panelbar-collapse"]=p&&!!i,e["k-i-arrow-chevron-down"]=!p&&!!i,e["k-panelbar-expand"]=!p&&!!i,e)),C=function(e){var t=e.imageUrl,n=e.icon,r=e.iconClass;if(t)return o.createElement("img",{role:"presentation",className:"k-panelbar-item-icon k-image",src:t});if(n){var i=(0,a.A)("k-panelbar-item-icon","k-icon","k-i-"+n);return o.createElement("span",{role:"presentation",className:i})}return r?o.createElement("span",{role:"presentation",className:"k-panelbar-item-icon "+r}):null}(this.props),x=!c&&i?o.createElement("span",{className:w}):null,O=!c&&p||v?o.createElement("ul",{role:"group",className:"k-panelbar-group k-panel k-group",style:{display:v?this.state.show?"block":"none":"block"}},i):null,S=void 0!==g&&!g||c||!i?O:o.createElement(T.U,{transitionEnterDuration:200,transitionExitDuration:200,key:l+"_animation",style:{display:"block"},children:O,childFactory:v&&this.childFactory,unmountOnExit:!v,onBeforeEnter:function(){return v&&t.setState({show:!0})},onAfterExited:function(){return v&&t.setState({show:!1})}});return o.createElement("li",D({id:r,className:b},y),o.createElement("span",{className:k,onClick:this.handleItemClick},C,o.createElement("span",{className:"k-panelbar-item-text"},s),x),S)},t.propTypes={animation:i.bool,children:i.any,className:i.string,expanded:i.bool,disabled:i.bool,onSelect:i.func,selected:i.bool,level:i.number,title:i.oneOfType([i.string,i.element]),id:i.oneOfType([i.string,i.number]),focused:i.bool,keepItemsMounted:i.bool},t.defaultProps={title:"Untitled"},t}(o.PureComponent),P=function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},P.apply(this,arguments)},_=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},A=function(e){var t=e.animation,n=void 0===t||t,r=e.keepItemsMounted,i=void 0!==r&&r,a=e.state,s=e.expanded,l=e.handleSelect,c=e.children,u=e.parentExpanded,d=void 0===u||u,p=e.level,f=void 0===p?0:p,h=e.parentPrivateKey,m=void 0===h?[]:h;return o.Children.map(c,(function(e,t){if(e&&e.type===R){var r=void 0,c=z(e,m,t);if(e.props.children){var u={animation:n,keepItemsMounted:i,state:a,expanded:s,handleSelect:l,children:e.props.children,parentExpanded:(s||[]).indexOf(c)>-1,level:f+1,parentPrivateKey:_(_([],m,!0),[c],!1)};r=A(u)}return o.cloneElement(e,P(P({},e.props),{animation:void 0!==e.props.animation?e.props.animation:n,keepItemsMounted:i,id:e.props.id||"k-panelbar-item-default-".concat(c),uniquePrivateKey:c,parentUniquePrivateKey:m,parentExpanded:d,level:f,expanded:(s||[]).indexOf(c)>-1,focused:a.focused===c&&a.wrapperFocused,selected:a.selected===c,children:r,onSelect:l}))}return o.createElement("div",{className:"k-panelbar-content k-content"},e)}))},j=function(e){var t=o.Children.toArray(e.children)[0];return t?z(t,[],0):""},F=function(e,t,n,r,i){return void 0===n&&(n={expanded:e.expanded||[],selected:e.selected||"",focused:e.focused||"",wrapperFocused:!1}),void 0===r&&(r=!0),void 0===i&&(i=[]),o.Children.map(e.children,(function(e,o){if(e&&e.type===R){var a=z(e,i,o);!e.props.disabled&&r&&(e.props.selected&&(n.selected=a),e.props.focused&&(n.focused=a),e.props.expanded&&("multiple"===t?n.expanded.push(a):"single"===t&&(n.expanded=[a])),e.props.children&&(n=F(e.props,t,n,!!e.props.expanded,_(_([],i,!0),[a],!1))))}})),n},z=function(e,t,n){return e&&e.props&&e.props.id?e.props.id:t.length?t[t.length-1]+".".concat(n):".".concat(n)};function L(e,t){return void 0===t&&(t=[]),(e||[]).forEach((function(e){e.disabled||(t.push(e),e.expanded&&e.children&&L(e.children,t))})),t}function B(e,t){return void 0===t&&(t=[]),o.Children.forEach(e,(function(e){e&&e.props&&!e.props.disabled&&(t.push(e),e.props.children&&B(e.props.children,t))})),t}function V(e,t){return void 0===t&&(t=[]),o.Children.forEach(e,(function(e){e&&e.props&&!e.props.disabled&&(e.props.expanded||e.props.parentExpanded)&&(t.push(e),e.props.children&&V(e.props.children,t))})),t}var H,K=function(e){return null!=e};!function(e){e.mapItemsToComponents=function e(t){return t.map((function(t,n){var r;return t.content&&(r=t.content),t.children&&(r=e(t.children)),o.createElement(R,P({},t,{children:r,key:t.id||n}))}))}}(H||(H={}));var W,$=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))};!function(e){e[e.Toggle=0]="Toggle",e[e.Next=1]="Next",e[e.Previous=2]="Previous"}(W||(W={}));var q=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},U.apply(this,arguments)},G=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Y=function(e){function t(t){var n=e.call(this,t)||this;n._element=null,n.handleSelect=function(e){n.onSelect(e),n.onFocus(e)},n.onSelect=function(e){var t,r;switch(B(o.Children.toArray(n.children)).forEach((function(r){r.props.uniquePrivateKey===(e.uniquePrivateKey||n.state.focused)&&(t=r)})),n.expandMode){case"single":r=G(G([],t.props.parentUniquePrivateKey,!0),[t.props.uniquePrivateKey],!1),$(n.expandedItems,r)&&(r=t.props.parentUniquePrivateKey?G([],t.props.parentUniquePrivateKey,!0):[]);break;case"multiple":var i=(r=n.expandedItems.slice()).indexOf(t.props.uniquePrivateKey);-1===i?r.push(t.props.uniquePrivateKey):r.splice(i,1);break;default:r=n.expandedItems.slice()}n.setState({selected:t.props.uniquePrivateKey,expanded:r}),n.props.onSelect&&n.props.onSelect.call(void 0,{target:t,expandedItems:r})},n.onFocus=function(e,t){void 0===t&&(t=0);var r,i=V(o.Children.toArray(n.children));i.forEach((function(o,a){if(o.props.uniquePrivateKey===(e.uniquePrivateKey||n.state.focused)){var s=a+t<0?0:a+t>i.length?i.length-1:a+t;r=i[s]}})),r&&(n.activeDescendant=r.props.id,n.setState({focused:r.props.uniquePrivateKey}))},n.onNavigate=function(e,t){var r;switch(t){case W.Previous:r=-1,n.onFocus(e,r);break;case W.Next:r=1,n.onFocus(e,r);break;case W.Toggle:n.onSelect(e)}},n.handleWrapperFocus=function(){clearTimeout(n.nextTickId),n.state.wrapperFocused||n.setState({wrapperFocused:!0})},n.handleWrapperBlur=function(){n.nextTick((function(){n.setState({wrapperFocused:!1})}))},n.handleKeyDown=function(e){var t=n._element&&"rtl"===getComputedStyle(n._element).direction||!1;if(e.target===e.currentTarget){var r=void 0;switch(e.keyCode){case w.R.left:r=t?W.Next:W.Previous;break;case w.R.up:r=W.Previous;break;case w.R.right:r=t?W.Previous:W.Next;break;case w.R.down:r=W.Next;break;case w.R.space:case w.R.enter:r=W.Toggle;break;default:r=null}null!==r&&(e.preventDefault(),n.onNavigate(e,r))}},(0,C.s)(x);var r=F(t,n.expandMode);return r.focused||(r.focused=j(t)),n.state=r,n}return q(t,e),Object.defineProperty(t.prototype,"expandMode",{get:function(){return this.props.expandMode||"multiple"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedItem",{get:function(){var e=this.props.selected;return void 0===e?this.state.selected:e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expandedItems",{get:function(){return this.props.isControlled?this.props.expanded||[]:this.state.expanded},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){var e=U(U({},this.state),{selected:this.selectedItem}),t={animation:this.props.animation,keepItemsMounted:this.props.keepItemsMounted,state:e,expanded:this.expandedItems,handleSelect:this.handleSelect,children:this.props.children};return A(t)},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t={"aria-activedescendant":this.activeDescendant},n=(0,a.A)("k-panelbar",this.props.className);return o.createElement("ul",U({ref:function(t){e._element=t},dir:this.props.dir,role:"tree",tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,className:n,style:this.props.style},t),this.children)},t.prototype.nextTick=function(e){this.nextTickId=window.setTimeout((function(){return e()}))},t.propTypes={animation:i.bool,children:function(e,t){var n=e[t];if(n){if(Array.isArray(n))for(var r=0,o=n;r<o.length;r++){var i=o[r];if(!i.type||i.type!==R)return new Error("PanelBar children should be either PanelBarItem or Array of PanelBarItem.")}else if(n.type!==R)return new Error("PanelBar child should be either PanelBarItem or Array of PanelBarItem.");return null}},dir:i.string,selected:i.string,expanded:i.arrayOf(i.string),focused:i.string,expandMode:i.oneOf(["single","multiple"]),className:i.string,keepItemsMounted:i.bool,onSelect:i.func,style:i.object},t.defaultProps={expandMode:"multiple",animation:!0,keepItemsMounted:!1},t}(o.Component),X=n(5407),J="",Z="0",Q="_";function ee(e,t){if(ae(e))return t[Number(e)];var n=t[Number(te(e))];return n.items?ee(function(e){if(ie(e))return e;var t=e.indexOf(Q);return e.substring(t+1)}(e),n.items):void 0}function te(e){return ie(e)?e:e.split(Q)[0]}function ne(e){return re("0",e)}function re(e,t){return t?t+Q+e:e}function oe(e){var t=e.lastIndexOf(Q);return t<0?J:e.substring(0,t)}function ie(e){return e===J||e.indexOf(Q)<0}function ae(e){return e!==J&&e.indexOf(Q)<0}function se(e){var t=e.lastIndexOf(Q);return t<0?e:e.substring(t+1)}function le(e,t,n){return ae(t)?e?Number(t)<n-1?(Number(t)+1).toString():"0":Number(t)>0?(Number(t)-1).toString():(n-1).toString():t}var ce=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ce(t,e),t.prototype.render=function(){return null},t.propTypes={text:i.string,url:i.string,icon:i.string,disabled:i.bool,cssClass:i.string,cssStyle:i.object,render:i.any,linkRender:i.any,contentRender:i.any,data:i.any},t}(o.Component);function de(e,t){if(e&&e.length>0)return{items:me(e),inputItems:e};if(fe(t).length>0){var n=he(fe(t));return{items:me(n),inputItems:n}}return{items:[],inputItems:[]}}function pe(e,t){var n={},r=e||t.props,o=r.text,i=r.url,a=r.icon,s=r.disabled,l=r.cssClass,c=r.cssStyle,u=r.render,d=r.linkRender,p=r.contentRender,f=r.data;return void 0!==o&&(n.text=o),void 0!==i&&(n.url=i),void 0!==a&&(n.icon=a),void 0!==s&&(n.disabled=s),void 0!==l&&(n.cssClass=l),void 0!==c&&(n.cssStyle=c),void 0!==u&&(n.render=u),void 0!==d&&(n.linkRender=d),void 0!==p&&(n.contentRender=p),void 0!==f&&(n.data=f),n}function fe(e){return o.Children.toArray(e).filter((function(e){return e&&e.type===ue}))}function he(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],o=pe(void 0,r),i=he(fe(r.props.children));i.length>0&&(o.items=i),t.push(o)}return t}function me(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=pe(o);i.id=re(r.toString(),t),i.isLastFromSiblings=r===e.length-1,i.items=ge(o,i),n.push(i)}return n}function ge(e,t){return e.contentRender?[{contentParentItemId:t.id,id:re(Z,t.id),isLastFromSiblings:!0,contentRender:e.contentRender,items:[]}]:e.items?me(e.items,t.id):[]}var ve=/\S/;function ye(e,t,n,r,o,i){var a,s=h();switch(n){case w.R.left:return o?i?d():c():i?u():l();case w.R.right:return o?i?c():d():i?l():u();case w.R.up:return o?g():ae(t)?f():g();case w.R.down:return o?v():ae(t)?p():v();case w.R.enter:case w.R.space:return s.disabled?t:m()?ne(t):te(t);case w.R.home:return y()[0].id;case w.R.end:return(a=y())[a.length-1].id;case w.R.esc:return ae(t)?t:oe(t);default:return 1===r.length&&ve.test(r)?function(){var e=r.toLowerCase(),n=y(),o=Number(se(t)),i=n.slice(o+1).concat(n.slice(0,o+1)).find((function(t){return(t.text||"").toLowerCase().startsWith(e)}));return i?i.id:t}():t}function l(){return ae(t)?g():1===function(e){return e.split(Q).length-1}(t)?p(g(te(t))):oe(t)}function c(){return ae(t)?f():oe(t)}function u(){return ae(t)?v():p(m()?t:v(te(t)))}function d(){return p(ae(t)||m()?t:v(te(t)))}function p(e){return b(!0,e)}function f(e){return b(!1,e)}function h(n,r){return void 0===n&&(n=t),void 0===r&&(r=e),ee(n,r)}function m(e){return h(e).items.length>0}function g(e){return k(!1,e)}function v(e){return k(!0,e)}function y(){return ae(t)?e:h(oe(t),e).items}function b(e,n){void 0===n&&(n=t);var r=h(n);return m(n)&&!r.disabled?e?ne(n):function(e){var t=h(e).items;return t[t.length-1].id}(n):n}function k(n,r){if(void 0===r&&(r=t),ae(r))return le(n,r,e.length);var o=oe(r);return re(le(n,se(r),h(o).items.length),o)}}var be=n(9222),ke={vertical:"top",horizontal:"left"},we={vertical:"top",horizontal:"right"},Ce={vertical:"flip",horizontal:"fit"},xe={vertical:"fit",horizontal:"flip"},Oe={downward:{anchorAlign:{vertical:"bottom",horizontal:"right"},popupAlign:we,collision:Ce},leftward:{anchorAlign:{vertical:"top",horizontal:"left"},popupAlign:we,collision:xe}},Se={downward:{anchorAlign:{vertical:"bottom",horizontal:"left"},popupAlign:ke,collision:Ce},rightward:{anchorAlign:{vertical:"top",horizontal:"right"},popupAlign:ke,collision:xe}};function Ee(e,t,n){return ae(e)?t?n?"leftward":"rightward":"downward":n?"leftward":"rightward"}function Ie(e){return e?"rtl":"ltr"}function Ne(e,t){return"".concat(e,"_").concat(t)}var Te,Me,De,Re,Pe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pe(t,e),t.prototype.render=function(){return this.props.url?o.createElement("a",{className:this.getMenuItemClassName(),role:"presentation",href:this.props.url,tabIndex:-1},this.props.children):o.createElement("span",{id:this.props.id,className:(0,a.A)(this.getMenuItemClassName(),this.props.className),style:this.props.style,role:"presentation"},this.props.children)},t.prototype.getMenuItemClassName=function(){return(0,a.A)("k-link","k-menu-link",{"k-active":this.props.opened})},t.propTypes={opened:i.bool,url:i.string},t}(o.Component),Ae=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),je="k-i-arrow-60-down",Fe="k-i-arrow-60-right",ze="k-i-arrow-60-left",Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ae(t,e),t.prototype.render=function(){return o.createElement("span",{className:"k-menu-expand-arrow",role:"presentation"},o.createElement("span",{className:this.getArrowClassName()}))},t.prototype.getArrowClassName=function(){var e,t=Ee(this.props.itemId,!0===this.props.verticalMenu,"rtl"===this.props.dir);return(0,a.A)("k-icon",((e={})[je]="downward"===t,e[Fe]="rightward"===t,e[ze]="leftward"===t,e))},t.propTypes={itemId:i.string,dir:i.string,verticalMenu:i.bool},t}(o.Component),Be=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ve=function(e){function t(t){var n=e.call(this,t)||this;return n.isFirstRender=!0,n.onMouseOver=function(e){n.props.onMouseOver(n.props.item.id),e.stopPropagation()},n.onMouseLeave=function(e){n.props.onMouseLeave(n.props.item.id),e.stopPropagation()},n.state={opened:!1},n}return Be(t,e),t.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.props.item.id;e&&e===t&&this.itemElement.focus(),this.isFirstRender=!1},t.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId,n=this.props.item.id;t?e.focusedItemId===t||t!==n||this.itemElement.contains(document.activeElement)||this.itemElement.focus():document.activeElement===this.itemElement&&this.itemElement.blur()},t.prototype.render=function(){var e=this,t=this.props.item,n=t.id;return o.createElement(o.Fragment,null,o.createElement("li",{className:this.getMenuItemClassName(t),style:t.cssStyle,tabIndex:n===this.props.tabbableItemId?0:-1,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,onMouseDown:function(t){return e.props.onMouseDown(t)},onBlur:function(){return e.props.onBlur(n)},onFocus:function(){return e.props.onFocus(n)},onClick:function(t){return e.props.onClick(t,n)},role:"menuitem","aria-disabled":!!t.disabled||void 0,"aria-haspopup":t.items.length>0||void 0,"aria-expanded":t.items.length>0?this.Opened:void 0,"aria-label":t.text,"aria-owns":this.Opened?Ne(this.props.menuGuid,n):void 0,ref:function(t){return e.itemElement=t},key:"0"},this.contentRender?this.renderContent():this.renderMenuItemLink()),this.renderPopupIfOpened())},t.prototype.renderContent=function(){var e=this.props.item.contentParentItemId;return o.createElement("div",{className:"k-content",role:"presentation"},o.createElement(this.contentRender,{item:this.props.onOriginalItemNeeded(e),itemId:e}))},t.prototype.renderMenuItemLink=function(){var e=this.props.item;if(this.linkRender)return o.createElement(this.linkRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,opened:this.Opened,dir:Ie(this.props.isDirectionRightToLeft)});var t=this.itemRender?o.createElement(this.itemRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,key:"1"}):o.createElement("span",{className:"k-menu-link-text"},e.text);return o.createElement(_e,{url:e.url,opened:this.Opened},this.renderMenuIconIfApplicable(),t,this.renderArrowIfApplicable())},t.prototype.renderPopupIfOpened=function(){if(this.Opened){var e=this.props.item.id,t=function(e,t,n){var r=Ee(e,t,n);return n?"downward"===r?Oe.downward:Oe.leftward:"downward"===r?Se.downward:Se.rightward}(e,this.props.isMenuVertical,this.props.isDirectionRightToLeft),n=t.anchorAlign,r=t.popupAlign,i=t.collision;return o.createElement(be.G,{anchor:this.itemElement,show:!0,popupClass:this.getPopupClassName(),anchorAlign:n,popupAlign:r,collision:i,animate:!1,key:"1"},o.createElement(Ke,{parentItemId:e,items:this.props.item.items,menuGuid:this.props.menuGuid,focusedItemId:this.props.focusedItemId,lastItemIdToBeOpened:this.props.lastItemIdToBeOpened,tabbableItemId:this.props.tabbableItemId,itemRender:this.props.itemRender,linkRender:this.props.linkRender,isMenuVertical:this.props.isMenuVertical,isDirectionRightToLeft:this.props.isDirectionRightToLeft,className:"k-group k-menu-group k-reset",onMouseOver:this.props.onMouseOver,onMouseLeave:this.props.onMouseLeave,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:this.props.onClick,onOriginalItemNeeded:this.props.onOriginalItemNeeded}))}return null},t.prototype.renderMenuIconIfApplicable=function(){return this.props.item.icon?o.createElement("span",{className:"k-icon k-i-".concat(this.props.item.icon),role:"presentation",key:"0"}):null},t.prototype.renderArrowIfApplicable=function(){return this.props.item.items.length>0?o.createElement(Le,{itemId:this.props.item.id,verticalMenu:this.props.isMenuVertical,dir:Ie(this.props.isDirectionRightToLeft),key:"2"}):null},Object.defineProperty(t.prototype,"itemRender",{get:function(){return this.props.item.render||this.props.itemRender},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"linkRender",{get:function(){return this.props.item.linkRender||this.props.linkRender},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentRender",{get:function(){return this.props.item.contentParentItemId?this.props.item.contentRender:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Opened",{get:function(){var e,t,n=this.props;return n.item.items.length>0&&(e=n.item.id,0===(t=n.lastItemIdToBeOpened).indexOf(e)&&(t.length===e.length||t.charAt(e.length)===Q))&&!this.isFirstRender},enumerable:!1,configurable:!0}),t.prototype.getPopupClassName=function(){return(0,a.A)("k-menu-popup",{"k-rtl":this.props.isDirectionRightToLeft})},t.prototype.getMenuItemClassName=function(e){return(0,a.A)("k-item","k-menu-item",{"k-first":(t=e.id,se(t)===Z),"k-last":e.isLastFromSiblings,"k-disabled":e.disabled},e.cssClass);var t},t}(o.Component),He=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ke=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseOver=function(e){t.props.onMouseOver(t.props.parentItemId),e.stopPropagation()},t.onMouseLeave=function(e){t.props.onMouseLeave(t.props.parentItemId),e.stopPropagation()},t}return He(t,e),t.prototype.render=function(){var e=this.props.parentItemId;return o.createElement("ul",{className:this.props.className,role:void 0!==e?"menu":"menubar",id:void 0!==e?Ne(this.props.menuGuid,e):void 0,onMouseOver:void 0!==e?this.onMouseOver:void 0,onMouseLeave:void 0!==e?this.onMouseLeave:void 0,"aria-orientation":this.props["aria-orientation"]},this.renderChildItems())},t.prototype.renderChildItems=function(){var e=this;return this.props.items.length>0?this.props.items.map((function(t,n){return o.createElement(Ve,{item:t,isMenuVertical:e.props.isMenuVertical,isDirectionRightToLeft:e.props.isDirectionRightToLeft,focusedItemId:e.props.focusedItemId,lastItemIdToBeOpened:e.props.lastItemIdToBeOpened,tabbableItemId:e.props.tabbableItemId,itemRender:e.props.itemRender,linkRender:e.props.linkRender,menuGuid:e.props.menuGuid,onMouseOver:e.props.onMouseOver,onMouseLeave:e.props.onMouseLeave,onMouseDown:e.props.onMouseDown,onBlur:e.props.onBlur,onFocus:e.props.onFocus,onClick:e.props.onClick,onOriginalItemNeeded:e.props.onOriginalItemNeeded,key:n})})):null},t}(o.Component),We=function(){function e(){this.phase="Initialized"}return e.prototype.getIsDirectionRightToLeft=function(){return this.isDirectionRightToLeft},e.prototype.setIsDirectionRightToLeft=function(e){this.phase="NotInitialized"===this.phase?"Initialized":"NewValueReceived",this.previousIsDirectionRightToLeft=this.isDirectionRightToLeft,this.isDirectionRightToLeft=e},e.prototype.hasDirectionChanged=function(){return"NewValueReceived"===this.phase&&this.previousIsDirectionRightToLeft!==this.isDirectionRightToLeft},e}(),$e=function(){function e(e,t,n){this.openOnClick=e,this.resetMenu=t,this.openItem=n,this.mouseDown=!1,this.openOnClick=e,this.isMouseOverEnabled=!e}return Object.defineProperty(e.prototype,"OpenOnClick",{set:function(e){Boolean(e)!==Boolean(this.openOnClick)&&(this.mouseDown=!1,this.isMouseOverEnabled=!e),this.openOnClick=e},enumerable:!1,configurable:!0}),e.prototype.handleItemSelectedViaKeyboard=function(){this.openOnClick&&(this.isMouseOverEnabled=!1,this.resetMenu())},Object.defineProperty(e.prototype,"IsMouseOverEnabled",{get:function(){return this.isMouseOverEnabled},enumerable:!1,configurable:!0}),e.prototype.handleItemMouseDown=function(){this.mouseDown=!0},e.prototype.handleItemFocus=function(){this.openOnClick&&!this.mouseDown&&(this.isMouseOverEnabled=!0),this.mouseDown=!1},e.prototype.handleItemClick=function(e,t){this.openOnClick&&(this.isMouseOverEnabled?t&&(this.isMouseOverEnabled=!1,this.resetMenu()):(this.isMouseOverEnabled=!0,this.openItem(e)))},e}(),qe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ue={focusedItemId:J,hoveredItemId:J,tabbableItemId:Z},Ge=function(e){function t(t){var n=e.call(this,t)||this;return n.guid=(0,v.M)(),n.directionHolder=new We,n.inputItems=[],n.items=[],n.reset=function(){n.clearItemHoverAndLeaveRequestsIfApplicable(),n.setState(Ue)},n.onKeyDown=function(e){if(n.state.focusedItemId!==J){var t=ee(n.state.focusedItemId,n.items),r=ye(n.items,t.id,e.keyCode,e.key,n.props.vertical,n.directionHolder.getIsDirectionRightToLeft());t.id!==r&&(e.preventDefault(),n.setFocusedItemId(r)),e.keyCode!==w.R.enter&&e.keyCode!==w.R.space||t.disabled||(n.mouseOverHandler.handleItemSelectedViaKeyboard(),n.dispatchSelectEventIfWired(e,t.id),!e.isDefaultPrevented()&&0===t.items.length&&t.url&&window.location.assign(t.url))}},n.onItemMouseOver=function(e){n.mouseOverHandler.IsMouseOverEnabled&&(n.clearItemHoverAndLeaveRequestsIfApplicable(),n.itemHoverRequest=window.setTimeout((function(){n.setHoveredItemId(e),n.itemHoverRequest=null}),function(e){return void 0!==e.hoverOpenDelay?e.hoverOpenDelay:e.openOnClick?0:100}(n.props)))},n.onItemMouseLeave=function(e){n.mouseOverHandler.IsMouseOverEnabled&&n.isItemWithDefaultClose(e)&&(n.clearItemHoverAndLeaveRequestsIfApplicable(),n.itemLeaveRequest=window.setTimeout((function(){n.setHoveredItemId(J),n.itemLeaveRequest=null}),function(e){return void 0!==e.hoverCloseDelay?e.hoverCloseDelay:100}(n.props)))},n.onItemMouseDown=function(){n.mouseOverHandler.handleItemMouseDown()},n.onItemFocus=function(e){n.setFocusedItemId(e),n.mouseOverHandler.handleItemFocus()},n.onItemClick=function(e,t){var r=ee(t,n.items);r.disabled||(n.setFocusedItemId(t),n.mouseOverHandler.handleItemClick(t,n.isItemWithDefaultClose(t)),n.dispatchSelectEventIfWired(e,t),!e.isDefaultPrevented()&&r.url&&window.location.assign(r.url))},n.onItemBlur=function(e){n.isItemWithDefaultClose(e)&&n.setFocusedItemId(J)},n.getInputItem=function(e){return ee(e,n.inputItems)},(0,C.s)(x),n.mouseOverHandler=new $e(n.props.openOnClick,n.reset,n.onItemMouseOver),n.state=Object.assign({},Ue,{isFirstRender:!0}),n}return qe(t,e),t.prototype.render=function(){var e=this;this.prepareItems(),this.state.isFirstRender||this.directionHolder.setIsDirectionRightToLeft(this.checkIsDirectionRightToLeft());var t=this.state.hoveredItemId?this.state.hoveredItemId:this.state.focusedItemId?oe(this.state.focusedItemId):J;return o.createElement("div",{onKeyDown:this.onKeyDown,style:this.props.style,className:this.getMenuWrapperClassName(),ref:function(t){return e.menuWrapperEl=t}},o.createElement(Ke,{className:this.getMenuClassName(),"aria-orientation":this.props.vertical?"vertical":void 0,items:this.items,isMenuVertical:this.props.vertical,isDirectionRightToLeft:this.directionHolder.getIsDirectionRightToLeft(),focusedItemId:this.state.focusedItemId,lastItemIdToBeOpened:t,tabbableItemId:this.state.tabbableItemId,itemRender:this.props.itemRender,linkRender:this.props.linkRender,menuGuid:this.guid,onMouseLeave:this.onItemMouseLeave,onMouseOver:this.onItemMouseOver,onMouseDown:this.onItemMouseDown,onFocus:this.onItemFocus,onClick:this.onItemClick,onBlur:this.onItemBlur,onOriginalItemNeeded:this.getInputItem}))},t.prototype.componentDidMount=function(){this.setState({isFirstRender:!1})},t.prototype.componentDidUpdate=function(e){(Boolean(e.vertical)!==Boolean(this.props.vertical)||this.directionHolder.hasDirectionChanged())&&this.reset(),this.mouseOverHandler.OpenOnClick=this.props.openOnClick},t.prototype.componentWillUnmount=function(){this.clearItemHoverAndLeaveRequestsIfApplicable()},t.prototype.setFocusedItemId=function(e){this.setState((function(t){var n=e===J?t.tabbableItemId:te(e);return{hoveredItemId:e===J||ie(t.hoveredItemId)&&ie(e)?t.hoveredItemId:J,focusedItemId:e,tabbableItemId:n}}))},t.prototype.setHoveredItemId=function(e){this.setState((function(t){return ie(e)&&ie(t.focusedItemId)?{hoveredItemId:e,focusedItemId:t.focusedItemId,tabbableItemId:t.tabbableItemId}:{hoveredItemId:e,focusedItemId:J,tabbableItemId:Z}}))},t.prototype.getMenuWrapperClassName=function(){return(0,a.A)({"k-rtl":this.directionHolder.getIsDirectionRightToLeft()},this.props.className)},t.prototype.getMenuClassName=function(){return(0,a.A)("k-widget","k-reset","k-header","k-menu",{"k-menu-horizontal":!this.props.vertical},{"k-menu-vertical":this.props.vertical})},t.prototype.clearItemHoverAndLeaveRequestsIfApplicable=function(){this.itemHoverRequest&&(clearTimeout(this.itemHoverRequest),this.itemHoverRequest=null),this.itemLeaveRequest&&(clearTimeout(this.itemLeaveRequest),this.itemLeaveRequest=null)},t.prototype.isItemWithDefaultClose=function(e){return!this.props.customCloseItemIds||-1===this.props.customCloseItemIds.indexOf(e)},t.prototype.checkIsDirectionRightToLeft=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:this.menuWrapperEl&&"rtl"===getComputedStyle(this.menuWrapperEl).direction},t.prototype.prepareItems=function(){var e=de(this.props.items,this.props.children),t=e.items,n=e.inputItems;this.items=t,this.inputItems=n},t.prototype.dispatchSelectEventIfWired=function(e,t){(0,X.N)(this.props.onSelect,e,this,{item:this.getInputItem(t),itemId:t})},t.propTypes={vertical:i.bool,items:i.arrayOf(i.object),style:i.object,dir:i.string,hoverOpenDelay:i.number,hoverCloseDelay:i.number,openOnClick:i.bool,itemRender:i.any,linkRender:i.any,customCloseItemIds:i.arrayOf(i.string),onSelect:i.func},t.defaultProps={vertical:!1},t}(o.Component),Ye=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ye(t,e),t.prototype.render=function(){var e,t=this.props,n=t.id,r=t.size,i=t.collapsed,s=t.overlay,l=t.containsSplitter,c=t.collapsible,u=t.resizable,d=t.scrollable,p=t.keepMounted,f=r&&r.length>0,h={flexBasis:r},m=(0,a.A)("k-pane",((e={})["k-state-hidden"]=i,e.hidden=i,e["k-pane-flex"]=l,e["k-pane-static"]=!u&&!c||f,e["k-scrollable"]=d,e));return o.createElement("div",{id:n,style:h,className:m},!i||p?this.props.children:void 0,s?o.createElement("div",{className:"k-splitter-overlay k-overlay"}):void 0)},t}(o.Component),Je=n(1779),Ze=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qe=function(e){function t(t){var n=e.call(this,t)||this;return n.draggable=null,n.onDrag=function(e,t,r){var o=e.event,i=n.props,a=i.onDrag,s=i.index,l=n.draggable&&n.draggable.element;!r&&o&&o.originalEvent.preventDefault(),l&&!n.isStatic&&n.isDraggable&&a(o,l,s,t,r)},n.onFocus=function(){n.setState({focused:!0})},n.onBlur=function(){n.setState({focused:!1})},n.onToggle=function(e){var t=n.props,r=t.onToggle,o=t.index,i=t.prev,a=t.next;(i.collapsible||a.collapsible)&&r(i.collapsible?o:o+1,e)},n.onPrevToggle=function(e){var t=n.props,r=t.onToggle,o=t.index;t.prev.collapsible&&r(o,e)},n.onNextToggle=function(e){var t=n.props,r=t.onToggle,o=t.index;t.next.collapsible&&r(o+1,e)},n.onKeyDown=function(e){var t=e&&e.keyCode,r=n.isHorizontal,o=n.props.index,i=n.draggable&&n.draggable.element,a=function(t,r,o){e.preventDefault(),n.props.onKeyboardResize(t,r,o,e)};i&&(t===w.R.enter?(e.preventDefault(),n.onToggle(e)):n.isDraggable&&(r&&t===w.R.left?a(i,o,-10):r&&t===w.R.right?a(i,o,10):r||t!==w.R.up?r||t!==w.R.down||a(i,o,10):a(i,o,-10)))},n.previousArrowClass=function(e){var t,r=n.props.prev,o=r.collapsible,i=r.collapsed;return(0,a.A)("k-icon",((t={})["k-hidden"]=!o,t["k-collapse-prev"]=o,t["k-i-arrow-60-left"]=o&&e&&!i,t["k-i-arrow-60-right"]=o&&e&&i,t["k-i-arrow-60-up"]=o&&!e&&!i,t["k-i-arrow-60-down"]=o&&!e&&i,t))},n.nextArrowClass=function(e){var t,r=n.props.next,o=r.collapsible,i=r.collapsed;return(0,a.A)("k-icon",((t={})["k-hidden"]=!o,t["k-collapse-next"]=o,t["k-i-arrow-60-right"]=o&&e&&!i,t["k-i-arrow-60-left"]=o&&e&&i,t["k-i-arrow-60-down"]=o&&!e&&!i,t["k-i-arrow-60-up"]=o&&!e&&i,t))},n.state={focused:!1},n}return Ze(t,e),Object.defineProperty(t.prototype,"isStatic",{get:function(){var e=this.props,t=e.prev,n=e.next,r=t.resizable&&n.resizable,o=t.collapsible||n.collapsible;return!r&&!o},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDraggable",{get:function(){var e=this.props,t=e.prev,n=e.next,r=t.resizable&&n.resizable,o=t.collapsed||n.collapsed;return!!r&&!o},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isHorizontal",{get:function(){return"horizontal"===this.props.orientation},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e,t=this,n=this.isDraggable,r=this.isStatic,i=this.isHorizontal,s=(0,a.A)("k-splitbar",((e={})["k-focus"]=this.state.focused,e["k-splitbar-horizontal"]=i,e["k-splitbar-vertical"]=!i,e["k-splitbar-draggable-horizontal"]=i&&n,e["k-splitbar-draggable-vertical"]=!i&&n,e["k-splitbar-static-horizontal"]=i&&r,e["k-splitbar-static-vertical"]=!i&&r,e)),l=this.previousArrowClass(i),c=this.nextArrowClass(i);return o.createElement(Je._,{onPress:function(e){return t.onDrag(e,!0,!1)},onDrag:function(e){return t.onDrag(e,!1,!1)},onRelease:function(e){return t.onDrag(e,!1,!0)},ref:function(e){t.draggable=e}},o.createElement("div",{tabIndex:r?-1:0,role:"separator",className:s,style:{touchAction:"none"},onFocus:this.onFocus,onBlur:this.onBlur,onDoubleClick:this.onToggle,onKeyDown:this.onKeyDown},o.createElement("div",{className:l,onClick:this.onPrevToggle}),o.createElement("div",{className:"k-resize-handle"}),o.createElement("div",{className:c,onClick:this.onNextToggle})))},t}(o.Component),et=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tt=function(){return tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tt.apply(this,arguments)},nt={collapsible:!1,collapsed:!1,resizable:!0,scrollable:!0},rt=function(e){function t(t){var n=e.call(this,t)||this;return n._container=null,n.validatePanes=function(e){if(!e.filter((function(e){return void 0===e.size})).length)throw new Error("The Splitter should have at least one pane without a set size.")},n.mapPaneOptions=function(e,t){for(var r=n.orientation,i=n.state,a=i.dragIndex,s=i.isDragging,l=[],c=0;c<t.length;c++){var u=!1,d=t[c];o.isValidElement(d)&&(u="Splitter"===d.type.displayName);var p=!1;s&&void 0!==a&&(p=a===c||a+1===c),l.push(tt(tt(tt({},nt),{orientation:r,containsSplitter:u,overlay:p}),(e||[])[c]))}return l},n.mapSplitterPanes=function(e,t){return e.map((function(r,i){var a,s=2*i,l=s+1;if(i+1<e.length){var c=e[i+1];a=o.createElement(Qe,{key:l,index:i,orientation:r.orientation,prev:r,next:c,onDrag:n.onBarDragResize,onToggle:n.onBarToggle,onKeyboardResize:n.onBarKeyboardResize})}return[o.createElement(Xe,tt({key:s},r),t[i]),a]}))},n.onBarToggle=function(e,t){var r=n.panesOptions(n.panesContent).map((function(t,r){var o=n.getPaneProps(t);return r===e?tt(tt({},o),{collapsed:!t.collapsed}):tt({},o)}));n.props.onChange&&n.props.onChange({newState:r,isLast:!0,nativeEvent:t})},n.onBarDragResize=function(e,t,r,o,i){var a=(new Date).getTime(),s=e.pageX,l=e.pageY,c=n.surroudingPanes(t),u=c.prevElement,d=c.nextElement;if(u&&d)if(o)n.setState({isDragging:!0,dragIndex:r,startTime:a,originalX:s,originalY:l,originalPrevSize:n.elementSize(u),originalNextSize:n.elementSize(d)});else{var p,f=n.state,h=f.originalPrevSize,m=f.originalNextSize,g=f.startTime,v=f.originalX,y=f.originalY;!o&&a-g<150||(p="vertical"===n.orientation?l-y:n.isRtl?v-s:s-v,n.resize(r,r+1,h,m,p,i,e)),i&&n.resetDragState()}},n.onBarKeyboardResize=function(e,t,r,o){var i=n.surroudingPanes(e),a=i.prevElement,s=i.nextElement,l=n.elementSize(a),c=n.elementSize(s);n.resize(t,t+1,l,c,r,!0,o)},n.containerSize=function(){return n._container?n.elementSize(n._container,!0):0},n.panesOptions=function(e){return n.mapPaneOptions(n.panes,e)},n.elementSize=function(e,t){var r=t?"client":"offset";return"vertical"===n.orientation?e["".concat(r,"Height")]:e["".concat(r,"Width")]},n.clamp=function(e,t,n){return Math.min(t,Math.max(e,n))},n.fixedSize=function(e){return e&&e.length>0},(0,C.s)(x),n.state={isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0,panes:t.defaultPanes||[]},n}return et(t,e),Object.defineProperty(t.prototype,"isControlledState",{get:function(){return void 0!==this.props.panes},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panes",{get:function(){return void 0!==this.panesDuringOnChange?this.panesDuringOnChange:this.isControlledState?this.props.panes:this.state.panes},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this.props.orientation||"horizontal"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRtl",{get:function(){return this._container&&"rtl"===getComputedStyle(this._container).direction||!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panesContent",{get:function(){return o.Children.toArray(this.props.children).filter((function(e){return e}))},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t=this.panesContent,n=this.panesOptions(t),r=(0,a.A)("k-widget","k-splitter","k-splitter-flex","k-splitter-".concat(this.orientation),this.props.className);return this.validatePanes(n),o.createElement("div",{style:this.props.style,ref:function(t){return e._container=t},className:r},this.mapSplitterPanes(n,t))},t.prototype.surroudingPanes=function(e){return{prevElement:e.previousElementSibling,nextElement:e.nextElementSibling}},t.prototype.isPercent=function(e){return/%$/.test(e)},t.prototype.toPixels=function(e,t){var n=parseInt(e,10);return this.isPercent(e)&&(n=t*n/100),n},t.prototype.resetDragState=function(){this.setState({isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0})},t.prototype.resize=function(e,t,n,r,o,i,a){var s,l,c=this,u=this.panesOptions(this.panesContent),d=u[e],p=u[t],f=n+r,h=this.containerSize(),m=function(e){return c.toPixels(e,h)},g={index:e,initialSize:n,min:m(d.min)||f-m(p.max)||0,max:m(d.max)||f-m(p.min)||f},v={index:t,initialSize:r,min:m(p.min)||f-m(d.max)||0,max:m(p.max)||f-m(d.min)||f},y=function(e,t){var n=u[e.index],r=c.clamp(e.min,e.max,e.initialSize+t);return c.isPercent(n.size||"")?100*r/h+"%":r+"px"};this.fixedSize(d.size)&&this.fixedSize(p.size)?(s=y(g,o),l=y(v,-o)):p.collapsible||this.fixedSize(p.size)?l=y(v,-o):s=y(g,o);var b=u.map((function(n,r){var o=c.getPaneProps(n);return r===e?tt(tt({},o),{size:s}):r===t?tt(tt({},o),{size:l}):tt({},o)}));this.panesDuringOnChange=b,this.isControlledState||this.setState({panes:b}),this.props.onChange&&this.props.onChange({newState:b,isLast:i,nativeEvent:a}),this.panesDuringOnChange=void 0},t.prototype.getPaneProps=function(e){return e.orientation,e.overlay,e.containsSplitter,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["orientation","overlay","containsSplitter"])},t.displayName="Splitter",t}(o.Component);!function(e){e.TEXT="text",e.IMAGE="image",e.ICON="icon"}(Te||(Te={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(Me||(Me={})),function(e){e.DEFAULT="default",e.primary="primary",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error"}(De||(De={})),function(e){e.START="start",e.CENTER="center",e.END="end",e.STRETCHED="stretched"}(Re||(Re={}));var ot=function(){return ot=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ot.apply(this,arguments)},it=o.forwardRef((function(e,t){var n;(0,C.s)(x);var r=e.children,i=e.dir,s=e.style,l=e.className,c=e.type,u=e.orientation,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children","dir","style","className","type","orientation"]),p=o.useRef(null),f=o.useRef(null);return o.useImperativeHandle(p,(function(){return{element:f.current,props:e}})),o.useImperativeHandle(t,(function(){return p.current})),o.createElement("div",ot({dir:i,style:s,ref:f,className:(0,a.A)("k-card",l,(n={},n["k-card-".concat(c)]=c!==De.DEFAULT,n),u!==Me.HORIZONTAL?"k-card-vertical":"k-card-horizontal")},d),r)}));it.displayName="KendoReactCard",it.propTypes={children:i.node,className:i.string,dir:i.string,orientation:i.oneOf(["horizontal","vertical"]),style:i.object,type:i.oneOf(["default","primary","info","success","warning","error"])},it.defaultProps={type:De.DEFAULT,orientation:Me.VERTICAL};var at=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-header",e.className)},e.children)};at.propTypes={className:i.string};var st=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-title",e.className)},e.children)};st.propTypes={className:i.string};var lt=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-body",e.className)},e.children)};lt.propTypes={className:i.string};var ct=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-actions",e.className,"k-card-actions-".concat(e.layout),e.orientation!==Me.VERTICAL?"k-card-actions-horizontal":"k-card-actions-vertical")},e.children)};ct.propTypes={layout:i.oneOf(["stretched","start","center","end"]),orientation:i.oneOf(["horizontal","vertical"])},ct.defaultProps={layout:Re.START,orientation:Me.HORIZONTAL};var ut=function(e){return o.createElement("img",{style:e.style,className:(0,a.A)("k-card-image",e.className),src:e.src})};ut.propTypes={className:i.string,src:i.string},ut.defaultProps={src:""};var dt=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-subtitle",e.className)},e.children)};dt.propTypes={className:i.string};var pt=function(e){return o.createElement("div",{style:e.style,className:(0,a.A)("k-card-footer",e.className)},e.children)};pt.propTypes={className:i.string};var ft=n(2697),ht=function(e){var t;return(0,C.s)(x),o.createElement("div",{style:e.style,className:(0,a.A)("k-avatar",(t={},t["k-avatar-bordered"]=e.border,t["k-rounded-".concat(ft.G.roundedMap[e.rounded]||e.rounded)]=e.rounded,t["k-avatar-".concat(ft.G.sizeMap[e.size]||e.size)]=e.size,t["k-avatar-".concat(e.fillMode)]=e.fillMode,t["k-avatar-".concat(e.fillMode,"-").concat(e.themeColor)]=Boolean(e.fillMode&&e.themeColor),t),e.className)},o.createElement("span",{className:"k-avatar-".concat(e.type)},e.children))};ht.propTypes={className:i.string,type:i.oneOf(["text","image","icon"]),size:i.oneOf([null,"small","medium","large"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"solid","outline"]),themeColor:i.oneOf([null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"])},ht.defaultProps={type:Te.TEXT,size:"medium",rounded:"full",fillMode:"solid",themeColor:"primary"};var mt=o.createContext({animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50}),gt=n(4703),vt=function(){return vt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},vt.apply(this,arguments)},yt=o.forwardRef((function(e,t){var n=e.className,r=e.style,i=e.text,s=e.icon,l=e.separator,c=e.disabled,u=e.selected,d=e.onSelect,p=e.index,f=e.tabIndex,h=e.children,m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["className","style","text","icon","separator","disabled","selected","onSelect","index","tabIndex","children"]),g=o.useContext(mt),v=g.expanded,y=g.mini,b=g.item,k=o.useRef(null),w=o.useCallback((function(){k.current&&k.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:k.current,focus:w,props:e}}));var C=(0,a.A)("k-drawer-item",{"k-selected":u,"k-disabled":c},n),x=o.useCallback((function(t){if(d&&!c){var n={element:k.current,focus:w,props:e};d(n,p,t)}}),[d,p,c]),O=o.createElement(o.Fragment,null,s&&o.createElement("span",{className:"k-icon "+s}),!v&&y?null:o.createElement("span",{className:"k-item-text"},i));return l?o.createElement("li",{className:"k-drawer-item k-drawer-separator",role:"presentation"}):o.createElement("li",vt({ref:k,className:C,style:r,role:"option","aria-selected":u,"aria-disabled":c,onClick:x,tabIndex:(0,gt.p)(f,c)},m),b?h:O)}));yt.propTypes={className:i.string,style:i.object,text:i.string,icon:i.string,separator:i.bool,selected:i.bool,disabled:i.bool,targetItem:i.any},yt.displayName="KendoDrawerItem";var bt=function(){return bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bt.apply(this,arguments)},kt={type:"slide",duration:200},wt={type:"slide",duration:0},Ct=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useContext(mt),l=s.animation,c=s.expanded,u=s.mode,d=s.position,p=s.onOverlayClick,f=s.mini,h=s.dir,m=s.width,g=s.miniWidth,v=s.items,y=s.item,b=s.onSelect,k=o.useRef(null),w=o.useCallback((function(){k.current&&k.current.focus()}),[]),C="boolean"!=typeof l?l:!1===l?wt:kt,x=m||240,O=g||50;o.useImperativeHandle(t,(function(){return{element:k.current,focus:w}}));var S=o.useMemo((function(){return"k-widget k-drawer "+(0,a.A)({"k-drawer-start":"start"===d,"k-drawer-end":"end"===d},r)}),[d]),E={opacity:1,flexBasis:x,WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},I={opacity:1,transform:"translateX(0px)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},N={opacity:f?1:0,flexBasis:f?O:0,WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},T={opacity:0,transform:"translateX(-100%)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},M={opacity:0,transform:"translateX(100%)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},D={transform:"translateX(0%)",WebkitTransitionDuration:(C&&C.duration)+"ms",transitionDuration:(C&&C.duration)+"ms"},R=c?"push"===u?E:I:"push"===u?N:"ltr"===h&&"start"===d||"rtl"===h&&"end"===d?f?D:T:f?D:M,P=v&&o.createElement("ul",{className:"k-drawer-items",role:"listbox","aria-label":"drawer-list","aria-expanded":c},v.map((function(e,t){var n=bt(bt({index:t},e),{onSelect:b}),r=y||yt;return o.createElement(r,bt({key:t},n))}))),_=o.createElement("div",{style:C?bt(bt({},R),i):i,className:S,ref:k},o.createElement("div",{className:"k-drawer-wrapper",style:!c&&f&&"overlay"===u?{width:O}:{width:x}},P||n));return"overlay"===u?o.createElement(o.Fragment,null,c&&o.createElement("div",{className:"k-overlay",onClick:p}),_):_}));Ct.propTypes={children:i.any,className:i.string,style:i.object,item:i.any,tabIndex:i.number},Ct.displayName="KendoDrawerNavigation";var xt=n(8199),Ot=o.forwardRef((function(e,t){(0,C.s)(x);var n=e.expanded,r=e.mode,i=e.position,s=e.className,l=e.children,c=e.style,u=e.animation,d=e.mini,p=e.width,f=e.miniWidth,h=e.items,m=e.item,g=e.tabIndex,v=e.onOverlayClick,y=e.onSelect,b=o.useRef(null),k=o.useCallback((function(){b.current&&b.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:b.current,focus:k}}));var w=o.useCallback((function(e,t,n){if(h&&y){var r={itemTarget:e,itemIndex:t,syntheticEvent:n,nativeEvent:n&&n.nativeEvent,target:void 0};y.call(void 0,r)}}),[h,y]),O=(0,xt.n)(b,e.dir),S=(0,a.A)({"k-drawer-container":!0,"k-drawer-expanded":n,"k-drawer-overlay":"overlay"===r,"k-drawer-push":"push"===r,"k-drawer-mini":d},s);return o.createElement(mt.Provider,{value:{animation:u,expanded:n,mode:r,position:i,mini:d,dir:O,items:h,item:m,width:p,miniWidth:f,onOverlayClick:v,onSelect:w}},o.createElement("div",{className:S,ref:b,dir:O,style:c,tabIndex:g},h&&o.createElement(Ct,null),l))}));Ot.propTypes={animation:i.any,expanded:i.bool,children:i.any,className:i.string,dir:i.string,mode:i.string,position:i.string,mini:i.bool,style:i.object,tabIndex:i.number,width:i.number,miniWidth:i.number,selected:i.number,onSelect:i.func,onOverlayClick:i.func},Ot.defaultProps={animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50},Ot.displayName="KendoDrawer";var St=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null);o.useImperativeHandle(t,(function(){return{element:s.current}}));var l=(0,a.A)({"k-drawer-content":!0},r);return o.createElement("div",{className:l,style:i,ref:s},n)}));St.propTypes={children:i.any,className:i.string,style:i.object},St.displayName="KendoDrawerContent";var Et,It=o.createContext({linear:!1,mode:"steps",value:0}),Nt=n(9124),Tt=n(1573),Mt=n(499),Dt="stepper.optionalText",Rt=((Et={})[Dt]="(Optional)",Et),Pt=function(){return Pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Pt.apply(this,arguments)},_t=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.current,s=e.disabled,l=e.focused,c=e.icon,u=e.index,d=e.isValid,p=e.label,f=e.optional,h=e.style,m=e.tabIndex,g=e.text,v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children","className","current","disabled","focused","icon","index","isValid","label","optional","style","tabIndex","text"]),y=o.useContext(It),b=y.animationDuration,k=y.isVertical,w=y.item,C=y.linear,x=y.mode,O=y.numOfSteps,S=y.value,E=y.successIcon,I=y.errorIcon,N=y.onChange,T=y.onFocus,M=o.useRef(null),D=o.useCallback((function(){M.current&&(0,Nt.n)(M.current)}),[]),R=o.useCallback((function(){return{element:M.current,focus:D}}),[D]);o.useImperativeHandle(t,R);var P,_=!C||u===S-1||u===S||u===S+1,A="labels"===x||Boolean(c)&&Boolean(p),j=(0,Mt.useLocalization)(),F=(P=Dt,j.toLanguageString(P,Rt[P])),z="number"==typeof b?b:!1!==b?400:0,L=o.useCallback((function(e){N&&!s&&(0,X.N)(N,e,R(),{value:u})}),[N,S,s]),B=o.useCallback((function(e){T&&!s&&(0,X.N)(T,e,R(),void 0)}),[T,s]),V=o.useMemo((function(){return(0,a.A)("k-step",{"k-step-first":0===u,"k-step-last":O&&u===O-1,"k-step-done":u<S,"k-step-current":i,"k-step-optional":f,"k-step-disabled":s,"k-step-focus":l,"k-step-error":void 0!==d&&!d,"k-step-success":d},r)}),[u,O,S,i,f,s,l,d,r]),H=o.useMemo((function(){return Pt({maxWidth:k?void 0:"calc(100% / ".concat(O,")"),maxHeight:k?"calc(100% / ".concat(O,")"):void 0,pointerEvents:_?void 0:"none"},h)}),[k,O,h,_]),K=d?E?"".concat(E):"k-icon k-i-check":I?"".concat(I):"k-icon k-i-warning",W=o.createElement("span",{className:"k-step-indicator-icon "+K,"aria-hidden":"true"}),$=o.createElement(o.Fragment,null,"labels"!==x?o.createElement("span",{className:"k-step-indicator","aria-hidden":!0,style:{transitionDuration:z+"ms"}},c?A||void 0===d?o.createElement("span",{className:"k-step-indicator-icon k-icon ".concat(c)}):W:void 0!==d?W:o.createElement("span",{className:"k-step-indicator-text"},g||u+1)):null),q=o.createElement("span",{className:"k-step-label"},p&&o.createElement("span",{className:"k-step-text"},p),A&&void 0!==d&&W,f&&o.createElement("span",{className:"k-step-label-optional"},F)),U=o.createElement(o.Fragment,null,$,q);return o.createElement("li",Pt({ref:M,className:V,style:H},v),o.createElement("a",{className:"k-step-link",title:p||void 0,onClick:L,onFocus:B,tabIndex:m||(l?0:-1),"aria-current":i?"step":void 0,"aria-disabled":s||!_||void 0,"aria-invalid":void 0!==d&&!d||void 0},w?n:U))}));_t.propTypes={children:i.any,className:i.string,current:i.bool,disabled:i.bool,icon:i.string,index:i.number,isValid:i.bool,label:i.string,optional:i.bool,style:i.object,tabIndex:i.number,text:i.string},_t.defaultProps={tabIndex:0},_t.displayName="KendoStep";var At=function(e,t,n){var r=Math.abs((t-e)/100);return Math.abs((n-e)/r)},jt=function(e,t,n,r){var o=Math.max(n,.01),i=100/o*100;e.current&&t.current&&(e.current.style.width=r?"100%":"".concat(o,"%"),t.current.style.width=r?"100%":"".concat(i,"%"),e.current.style.height=r?"".concat(o,"%"):"100%",t.current.style.height=r?"".concat(i,"%"):"100%")},Ft={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660123939,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},zt=function(){return zt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zt.apply(this,arguments)},Lt=o.forwardRef((function(e,t){(0,C.s)(Ft);var n=e.animation,r=e.disabled,i=e.reverse,s=void 0===i?Bt.reverse:i,l=e.orientation,c=e.labelVisible,u=e.labelPlacement,d=e.max,p=void 0===d?Bt.max:d,f=e.min,h=void 0===f?Bt.min:f,m=e.tabIndex,g=e.className,v=e.style,y=e.emptyStyle,b=e.emptyClassName,k=e.progressStyle,w=e.progressClassName,x=o.useRef(null),O=o.useRef(null),S=o.useRef(null),E=o.useCallback((function(){x.current&&x.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:x.current,progressStatusElement:O.current,progressStatusWrapElement:S.current,focus:E}}));var I,N,T,M,D,R=e.value||Bt.value,P=function(e){var t=o.useRef();return o.useEffect((function(){t.current=e})),t.current}(R),_=null===e.value,A=(0,Tt.V)(x,e.dir),j="vertical"===l,F=function(e){var t=e.toString().split(".");return 1===t.length?"".concat(t[0]):"".concat(t[0],".").concat(t[1].substr(0,3))}(R),z={value:R},L=c?e.label?o.createElement("span",{className:"k-progress-status"},o.createElement(e.label,zt({},z))):o.createElement("span",{className:"k-progress-status"},F):void 0,B={className:(0,a.A)("k-widget k-progressbar",{"k-progressbar-horizontal":!j,"k-progressbar-vertical":j,"k-progressbar-reverse":s,"k-progressbar-indeterminate":_,"k-disabled":r},g),ref:x,dir:A,tabIndex:(0,gt.p)(m,r),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":h,"aria-valuemax":p,"aria-valuenow":_?void 0:R,"aria-disabled":r,style:v},V=(0,a.A)("k-progress-status-wrap",{"k-progress-start":"start"===u,"k-progress-center":"center"===u,"k-progress-end":"end"===u||void 0===u}),H="boolean"!=typeof n&&void 0!==n?n.duration:n?400:0,K=o.useCallback((function(){var e=At(h,p,P);jt(O,S,e,j)}),[j,p,h,P]),W=o.useCallback((function(e){var t=At(h,p,P+(R-P)*e);jt(O,S,t,j)}),[h,p,P,R,j]),$=o.useCallback((function(){var e=At(h,p,R);jt(O,S,e,j)}),[j,p,h,R]);return I={duration:H,onStart:K,onUpdate:W,onEnd:$},N=[R,H],T=o.useRef(0),M=o.useRef(!1),D=o.useRef(),o.useEffect((function(){return function(e){var t,n=e.duration,r=T.current&&1-T.current;e.onStart&&e.onStart();var o=function(i){t||(t=i);var a=(i-t+1)/n+r;a<=1?(e.onUpdate&&e.onUpdate(a),D.current=window.requestAnimationFrame(o),T.current=a):(e.onEnd&&e.onEnd(1),T.current=0)};D.current=window.requestAnimationFrame(o)}(I),function(){D.current&&window.cancelAnimationFrame(D.current)}}),N),o.useEffect((function(){M.current=!0}),[]),o.createElement("div",zt({},B),o.createElement("span",{className:V+(b?" "+b:""),style:y},L),o.createElement("div",{className:"k-selected",style:k,ref:O},o.createElement("span",{className:V+(w?" "+w:""),ref:S},L)))}));Lt.propTypes={animation:i.any,ariaLabel:i.string,disabled:i.bool,reverse:i.bool,label:i.any,labelVisible:i.bool,labelPlacement:i.oneOf(["start","center","end"]),max:i.number,min:i.number,value:i.number,tabIndex:i.number,emptyStyle:i.object,emptyClassName:i.string,progressStyle:i.object,progressClassName:i.string};var Bt={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};Lt.defaultProps=Bt,Lt.displayName="KendoProgressBar";var Vt=function(){return Vt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Vt.apply(this,arguments)},Ht=o.forwardRef((function(e,t){(0,C.s)(x);var n=e.animationDuration,r=e.children,i=e.className,s=e.disabled,l=e.errorIcon,c=e.item,u=e.items,d=e.linear,p=e.mode,f=e.orientation,h=e.style,m=e.successIcon,g=e.onChange,v=e.onFocus,y=o.useRef(null),b=o.useCallback((function(){y.current&&(0,Nt.n)(y.current)}),[]),k=o.useCallback((function(){return{element:y.current,focus:b}}),[b]);o.useImperativeHandle(t,k);var O=e.value||Kt.value,S=o.useState(O),E=S[0],I=S[1],N=u?u.length:0,T="vertical"===f,M=(0,Tt.V)(y,e.dir),D="number"==typeof n?n:!1!==n?400:0,R=o.useCallback((function(e,t){O!==t&&g&&!s&&(!d||t===O-1||t===O||t===O+1)&&((0,X.N)(g,e,k(),{value:t}),I(t))}),[O,d,g,s,I]),P=o.useCallback((function(e){var t=e.value,n=e.syntheticEvent;R(n,t)}),[R]),_=o.useCallback((function(e){v&&!s&&(0,X.N)(v,e.syntheticEvent,k(),void 0)}),[v,s]),A=o.useCallback((function(e){R(e,E)}),[R,E]),j=o.useCallback((function(e){var t="rtl"===M,n=E,r=u.length-1;switch(e.keyCode){case w.R.left:e.preventDefault(),!t&&n>0&&I(n-1),t&&n<r&&I(n+1);break;case w.R.right:e.preventDefault(),!t&&n<r&&I(n+1),t&&n>0&&I(n-1);break;case w.R.up:e.preventDefault(),!t&&n>0&&I(n-1),t&&n>0&&I(n-1);break;case w.R.down:e.preventDefault(),!t&&n<r&&I(n+1),t&&n<r&&I(n+1);break;case w.R.home:e.preventDefault(),I(0);break;case w.R.end:e.preventDefault(),I(r);break;case w.R.space:e.preventDefault();break;case w.R.enter:e.preventDefault(),u[n].disabled||A(e)}}),[u,I,E,M,A]),F=o.useMemo((function(){return(0,a.A)("k-stepper",{"k-stepper-linear":d},i)}),[d,i]),z=o.useMemo((function(){return Vt({display:"grid",gridTemplateColumns:T?void 0:"repeat("+2*N+", 1fr)",gridTemplateRows:T?"repeat("+N+", 1fr)":void 0},h)}),[T,N,h]),L=o.useMemo((function(){return(0,a.A)("k-step-list",{"k-step-list-horizontal":!T,"k-step-list-vertical":T})}),[T]),B=o.useMemo((function(){return{gridColumnStart:T?void 0:1,gridColumnEnd:T?void 0:-1,gridRowStart:T?1:void 0,gridRowEnd:T?-1:void 0}}),[T]),V=o.useMemo((function(){return{gridColumnStart:T?void 0:2,gridColumnEnd:T?void 0:2*N,gridRowStart:T?1:void 0,gridRowEnd:T?N:void 0,top:T?17:void 0}}),[T,N]),H=u&&u.map((function(e,t){var n=Vt({index:t,disabled:s||e.disabled,focused:t===E,current:t===O},e),r=c||_t;return o.createElement(r,Vt({key:t},n))}));return o.createElement(It.Provider,{value:{animationDuration:n,isVertical:T,item:c,linear:d,mode:p,numOfSteps:N,value:O,successIcon:m,errorIcon:l,onChange:P,onFocus:_}},o.createElement("nav",{className:F,style:z,dir:M,onKeyDown:j},o.createElement("ol",{className:L,style:B},H||r),o.createElement(Lt,{style:V,animation:{duration:D},"aria-hidden":!0,max:N-1,labelVisible:!1,orientation:f,reverse:"vertical"===f,value:O,disabled:s,tabIndex:-1})))}));Ht.propTypes={animationDuration:i.oneOfType([i.bool,i.number]),children:i.any,className:i.string,dir:i.string,disabled:i.bool,errorIcon:i.string,item:i.any,items:i.any,linear:i.bool,mode:i.oneOf(["steps","labels"]),orientation:i.oneOf(["horizontal","vertical"]),style:i.object,successIcon:i.string,value:i.number.isRequired,onChange:i.func,onFocus:i.func};var Kt={value:0};Ht.defaultProps=Kt,Ht.displayName="KendoStepper";var Wt=o.forwardRef((function(e,t){(0,C.s)(x);var n=e.children,r=e.className,i=e.style,s=e.id,l=o.useRef(null),c=o.useCallback((function(){l.current&&(0,Nt.n)(l.current)}),[]),u=o.useCallback((function(){return{element:l.current,focus:c}}),[c]);o.useImperativeHandle(t,u);var d=o.useMemo((function(){return(0,v.M)()}),[]),p=o.useMemo((function(){return e.themeColor||$t.themeColor}),[e.themeColor]),f=o.useMemo((function(){return e.position||$t.position}),[e.position]),h=o.useMemo((function(){return e.positionMode||$t.positionMode}),[e.positionMode]),m=o.useMemo((function(){return(0,a.A)("k-appbar",{"k-appbar-top":"top"===f,"k-appbar-bottom":"bottom"===f,"k-appbar-static":"static"===h,"k-appbar-sticky":"sticky"===h,"k-appbar-fixed":"fixed"===h,"k-appbar-light":"light"===p,"k-appbar-dark":"dark"===p,"k-appbar-inherit":"inherit"===p},r)}),[f,h,p,r]);return o.createElement("div",{className:m,style:i,id:s||d},n)}));Wt.propTypes={children:i.any,className:i.string,style:i.object,id:i.string,themeColor:i.string,position:i.oneOf(["top","bottom"]),positionMode:i.oneOf(["static","sticky","fixed"])};var $t={themeColor:"light",position:"top",positionMode:"static"};Wt.displayName="KendoAppBar";var qt=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null),l=o.useCallback((function(){s.current&&(0,Nt.n)(s.current)}),[]),c=o.useCallback((function(){return{element:s.current,focus:l}}),[l]);o.useImperativeHandle(t,c);var u=o.useMemo((function(){return(0,a.A)("k-appbar-section",r)}),[r]);return o.createElement("div",{className:u,style:i},n)}));qt.propTypes={children:i.any,className:i.string,style:i.object},qt.displayName="KendoAppBarSection";var Ut=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null),l=o.useCallback((function(){s.current&&(0,Nt.n)(s.current)}),[]),c=o.useCallback((function(){return{element:s.current,focus:l}}),[l]);o.useImperativeHandle(t,c);var u=o.useMemo((function(){return(0,a.A)("k-appbar-spacer",{"k-appbar-spacer-sized":i&&i.width&&null!==i.width},r)}),[r,i]),d=o.useMemo((function(){return{flexBasis:i&&i.width?i.width:void 0}}),[i]);return o.createElement("span",{className:u,style:d},n)}));Ut.propTypes={children:i.any,className:i.string,style:i.object},Ut.displayName="KendoAppBarSpacer";var Gt=n(9659),Yt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xt=function(){return Xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Xt.apply(this,arguments)},Jt=function(e){return o.createElement(Je._,{onPress:e.onPress,onDrag:function(t){e.onResize(t.event,!1,e.d)},onRelease:function(t){e.onResize(t.event,!0,e.d)}},o.createElement("div",{className:"k-resize-handle k-cursor-"+e.d+"-resize",style:Xt({bottom:0,right:0},e.style)}))},Zt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleResize=function(e,n,r){e.originalEvent.preventDefault(),t.props.onResize(e,{end:n,direction:r})},t}return Yt(t,e),t.prototype.render=function(){var e=this.props,t=e.resizable,n=e.onPress,r=e.rtl;return t?o.createElement(o.Fragment,null,"vertical"!==t&&o.createElement(Jt,{onPress:n,onResize:this.handleResize,d:"ew",style:r?{top:0,width:9,left:0,right:""}:{top:0,width:9,right:0,left:""}}),"horizontal"!==t&&o.createElement(Jt,{onPress:n,onResize:this.handleResize,d:"ns",style:{left:0,height:9}}),!0===t&&o.createElement(Jt,{onPress:n,onResize:this.handleResize,d:r?"nesw":"nwse",style:r?{width:9,height:9,right:"",left:0}:{width:9,height:9,right:0,left:""}})):null},t}(o.Component),Qt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),en=function(){return en=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},en.apply(this,arguments)},tn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={rtl:!1},t.oldSize={},t.draggable=null,t.dragging=!1,t.resizing=!1,t.element=null,t.ignoreDrag=!1,t.pressOffset={x:0,y:0},t.pressXY={x:0,y:0},t.currentTranslate={x:0,y:0},t.preventDataOps=void 0,t.handleResize=function(e,n){if(n.end)t.handleRelease();else if(t.element){var r=e.clientX,o=e.clientY;t.resizing=!0;var i=("ns"!==n.direction?r-t.pressXY.x:0)*(t.state.rtl?-1:1),a="ew"!==n.direction?o-t.pressXY.y:0;if(t.dragElement&&(t.state.rtl?t.dragElement.style.marginLeft=-i+"px":t.dragElement.style.marginRight=-i+"px",t.dragElement.style.height="calc(100% + ".concat(a,"px)")),t.element.classList.add("k-layout-item-hint","k-layout-item-hint-resize"),!t.preventDataOps){var s=0,l=0,c=t.element.getBoundingClientRect();i>c.width/t.props.defaultPosition.colSpan/3&&(s=1),i<-c.width/t.props.defaultPosition.colSpan/1.25&&(s=-1),a>c.height/t.props.defaultPosition.rowSpan/3&&(l=1),a<-c.height/t.props.defaultPosition.rowSpan/1.25&&(l=-1),0===s&&0===l||t.props.update(t.props.index,0,0,l,s)}}},t.handlePress=function(e){if(t.dragElement)if(t.ignoreDrag=!1,t.props.ignoreDrag&&t.props.ignoreDrag(e.event.originalEvent))t.ignoreDrag=!0;else{t.element&&(t.element.style.zIndex="10",t.element.classList.add("k-layout-item-hint")),t.dragElement.classList.remove("k-cursor-grab"),t.dragElement.classList.add("k-cursor-grabbing");var n=t.dragElement.getBoundingClientRect();t.pressXY={x:e.event.clientX,y:e.event.clientY},t.pressOffset={x:e.event.clientX-n.x,y:e.event.clientY-n.y}}},t.handleDrag=function(e){if(!t.ignoreDrag){var n=t.dragElement;if(!e.event.originalEvent.defaultPrevented&&n){t.dragging=!0,e.event.originalEvent.preventDefault();var r=n.getBoundingClientRect();if(t.currentTranslate={x:e.event.clientX-r.x-t.pressOffset.x+t.currentTranslate.x,y:e.event.clientY-r.y-t.pressOffset.y+t.currentTranslate.y},n.style.transform="translate(".concat(t.currentTranslate.x,"px, ").concat(t.currentTranslate.y,"px)"),n.style.transition="transform 0s",!t.preventDataOps){var o=0,i=0;t.currentTranslate.y>.7*r.height/t.props.defaultPosition.rowSpan&&(i=1),t.currentTranslate.y<.7*-r.height/t.props.defaultPosition.rowSpan&&(i=-1),t.currentTranslate.x>.7*r.width/t.props.defaultPosition.colSpan&&(o=1),t.currentTranslate.x<.7*-r.width/t.props.defaultPosition.colSpan&&(o=-1),t.props.update(t.props.index,i,t.state.rtl?-o:o,0,0)}}}},t.handleRelease=function(){t.dragging=t.resizing=!1,t.currentTranslate={x:0,y:0},t.element&&(t.element.style.zIndex="1",t.element.classList.remove("k-layout-item-hint","k-layout-item-hint-resize"));var e=t.dragElement;e&&(e.style.transform="translate(0px, 0px)",e.style.transition="transform ".concat(200,"ms cubic-bezier(0.2, 0, 0, 1) 0s"),e.style.marginRight="0px",e.style.marginLeft="0px",e.style.height="100%",e.classList.remove("k-cursor-grabbing"),e.classList.add("k-cursor-grab"))},t}return Qt(t,e),Object.defineProperty(t.prototype,"reorderable",{get:function(){return void 0!==this.props.reorderable?this.props.reorderable:t.defaultProps.reorderable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragElement",{get:function(){return this.draggable?this.draggable.element:void 0},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.element&&"rtl"===getComputedStyle(this.element).direction&&this.setState({rtl:!0})},t.prototype.render=function(){var e=this;clearTimeout&&"function"==typeof clearTimeout&&(clearTimeout(this.preventDataOps),this.preventDataOps=window.setTimeout((function(){e.preventDataOps=void 0}),200));var n=this.props.defaultPosition,r=void 0!==this.props.resizable?this.props.resizable:t.defaultProps.resizable,i=en({gridColumnStart:n.col,gridColumnEnd:"span ".concat(n.colSpan),gridRowStart:n.row,gridRowEnd:"span ".concat(n.rowSpan),outline:"none",order:n.order},this.props.hintStyle),s=o.createElement("div",{ref:function(t){e.draggable=t?{element:t}:null},className:(0,a.A)("k-tilelayout-item k-card",{"k-cursor-grab":this.reorderable},this.props.className),style:en({height:"100%"},this.props.style)},this.props.children,o.createElement(Zt,{onPress:this.handlePress,onResize:this.handleResize,resizable:r,rtl:this.state.rtl}));return o.createElement("div",{ref:function(t){e.element=t},style:i,className:this.props.hintClassName},o.createElement(Je._,{ref:function(t){e.draggable=t},onDrag:this.props.reorderable?this.handleDrag:void 0,onRelease:this.props.reorderable?this.handleRelease:void 0,onPress:this.props.reorderable?this.handlePress:void 0},s))},t.prototype.getSnapshotBeforeUpdate=function(e){return this.oldSize={},this.dragElement&&(this.oldSize=this.dragElement.getBoundingClientRect()),null},t.prototype.componentDidUpdate=function(e){var t=this,n=this.dragElement;if(n){var r=n.getBoundingClientRect(),o=this.oldSize;if(this.resizing){var i=r.width-o.width;if(this.state.rtl){var a=parseFloat(n.style.marginLeft||"0");n.style.marginLeft=a-i+"px"}else a=parseFloat(n.style.marginRight||"0"),n.style.marginRight=a+i+"px";this.pressXY.x+=this.state.rtl?-i:i;var s=r.height-o.height,l=parseFloat(n.style.height.substring(12));n.style.height="calc(100% + ".concat(l+s,"px)"),this.pressXY.y+=s}var c=o.left-r.left,u=o.top-r.top;0===c&&0===u||(this.dragging?e.defaultPosition.order===this.props.defaultPosition.order&&e.defaultPosition.col===this.props.defaultPosition.col||(this.currentTranslate.x=0,this.currentTranslate.y=0,n.style.transform=""):Math.abs(u)<15&&Math.abs(c)<15||requestAnimationFrame((function(){var e=t.element;e&&(e.style.transform="translate(".concat(c,"px, ").concat(u,"px)"),e.style.transition="transform 0s",requestAnimationFrame((function(){e.style.transform="",e.style.transition="transform ".concat(200,"ms cubic-bezier(0.2, 0, 0, 1) 0s")})))})))}},t.propTypes={defaultPosition:i.object.isRequired,style:i.object,className:i.string,hintStyle:i.object,hintClassName:i.string,header:i.any,body:i.any,item:i.any,resizable:i.oneOf(["horizontal","vertical",!0,!1]),reorderable:i.bool},t.displayName="KendoTileLayoutItem",t.defaultProps={resizable:!0,reorderable:!0},t}(o.Component),nn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rn=function(){return rn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},rn.apply(this,arguments)},on={column:"k-grid-flow-col",row:"k-grid-flow-row","column dense":"k-grid-flow-col-dense","row dense":"k-grid-flow-row-dense",unset:"k-grid-flow-unset"},an=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t.state={positions:(t.props.items||[]).map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e.defaultPosition)}))},t.focus=function(){t._element&&t._element.focus()},t.update=function(e,n,r,o,i){if(void 0===o&&(o=0),void 0===i&&(i=0),0!==n||0!==r||i||o){var a=!1,s=t.state.positions.map((function(e){return Object.assign({},e)})),l=s[e],c=s.find((function(e){return e.order===l.order+n}));c&&c!==l&&(l.order+=n,c.order+=-n,a=!0);var u=l.col+r;0!==r&&u>=1&&u+l.colSpan<=(t.props.columns||3)+1&&(l.col=u,a=!0);var d=l.colSpan+i;i&&d>=1&&d+l.col<=(t.props.columns||3)+1&&(l.colSpan=d,a=!0);var p=l.rowSpan+o;o&&p>=1&&(l.rowSpan=p,a=!0),a&&(t.setState({positions:s}),(0,X.N)(t.props.onReposition,{},t,{value:s}))}},t}return nn(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),t.getDerivedStateFromProps=function(e,t){return e.positions?{positions:e.positions.map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e)}))}:!e.items||t.positions&&e.items.length===t.positions.length?null:{positions:e.items.map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e.defaultPosition)}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.columns,i=void 0===r?3:r,s=t.columnWidth,l=void 0===s?"1fr":s,c=t.gap,u=t.rowHeight,d=void 0===u?"1fr":u,p=t.style,f=t.autoFlow,h=void 0===f?"column":f,m=t.items,g=void 0===m?[]:m,v=c?"".concat("number"==typeof c.rows?c.rows+"px":c.rows)+" "+"".concat("number"==typeof c.columns?c.columns+"px":c.columns):16,y=rn({gridTemplateColumns:"repeat(".concat(i,", minmax(0px, ").concat("number"==typeof l?l+"px":l,"))"),gridAutoRows:"minmax(0px, ".concat("number"==typeof d?d+"px":d,")"),gap:v,padding:v},p);return o.createElement("div",{ref:function(t){e._element=t},dir:this.props.dir,className:(0,a.A)("k-tilelayout",on[h],n),style:y,id:this.props.id,children:g.map((function(t,n){return o.createElement(tn,{key:e.props.dataItemKey?(0,Gt.Y)(e.props.dataItemKey)(t):n,update:e.update,defaultPosition:e.state.positions[n],index:n,resizable:t.resizable,reorderable:t.reorderable,style:t.style,className:t.className,hintClassName:t.hintClassName,hintStyle:t.hintStyle,ignoreDrag:e.props.ignoreDrag},t.item?t.item:o.createElement(o.Fragment,null,o.createElement("div",{className:"k-tilelayout-item-header k-card-header"},o.isValidElement(t.header)?t.header:o.createElement("h5",{className:"k-card-title"},t.header)),o.createElement("div",{className:"k-tilelayout-item-body k-card-body"},t.body)))}))})},t.propTypes={id:i.string,style:i.object,className:i.string,dir:i.string,gap:i.object,columns:i.number,columnWidth:i.oneOfType([i.number,i.string]),rowHeight:i.oneOfType([i.number,i.string]),dataItemKey:i.string,items:i.array,positions:i.array,autoFlow:i.oneOf(["column","row","column dense","row dense","unset"]),onReposition:i.func,ignoreDrag:i.func},t.displayName="KendoTileLayout",t}(o.Component),sn={primary:"k-bottom-nav-primary",secondary:"k-bottom-nav-secondary",tertiary:"k-bottom-nav-tertiary",info:"k-bottom-nav-info",success:"k-bottom-nav-success",warning:"k-bottom-nav-warning",error:"k-bottom-nav-error",dark:"k-bottom-nav-dark",light:"k-bottom-nav-light",inverse:"k-bottom-nav-inverse"},ln={flat:"k-bottom-nav-flat",solid:"k-bottom-nav-solid"},cn={vertical:"k-bottom-nav-item-flow-vertical",horizontal:"k-bottom-nav-item-flow-horizontal"},un={fixed:"k-pos-fixed",sticky:"k-pos-sticky"},dn=o.forwardRef((function(e,t){(0,C.s)(x);var n=o.useRef(null);o.useImperativeHandle(t,(function(){return{element:n.current}}));var r=e.className,i=e.style,s=e.selected,l=e.disabled,c=e.item,u=e.render,d=e.dataItem,p=e.icon,f=e.text,h=e.id,m=e.onSelect,g=e.onKeyDown,v=e.index,y=e.tabIndex,b=o.useMemo((function(){return(0,a.A)("k-bottom-nav-item",{"k-selected":s,"k-disabled":l},r)}),[s,l,r]),k=o.useCallback((function(e){m&&void 0!==v&&!l&&m(e,v)}),[m,v,l]),w=o.useCallback((function(e){g&&void 0!==v&&!l&&g(e,v)}),[g,v,l]),O=u,S=c,E=o.createElement("span",{ref:n,className:b,style:i,role:"link",id:h,tabIndex:y,onClick:k,onKeyDown:w,"aria-selected":s,"aria-disabled":l},S?o.createElement(S,{itemIndex:v,item:d}):o.createElement(o.Fragment,null,p&&o.createElement("span",{className:"k-bottom-nav-item-icon k-icon k-i-".concat(p)}),f&&o.createElement("span",{className:"k-bottom-nav-item-text",style:{userSelect:"none"}},f)));return void 0!==O?O.call(void 0,E,e):E}));dn.propTypes={className:i.string,style:i.object,id:i.string,disabled:i.bool,selected:i.bool,icon:i.string,text:i.string,tabIndex:i.number},dn.defaultProps={tabIndex:0},dn.displayName="KendoReactBottomNavigationItem";var pn=function(){return pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pn.apply(this,arguments)},fn=o.forwardRef((function(e,t){(0,C.s)(x);var n=o.useRef(null),r=o.useCallback((function(){n.current&&(0,Nt.n)(n.current)}),[]),i=o.useCallback((function(){return{element:n.current,focus:r}}),[r]);o.useImperativeHandle(t,i);var s=e.themeColor,l=void 0===s?hn.themeColor:s,c=e.fill,u=void 0===c?hn.fill:c,d=e.positionMode,p=void 0===d?hn.positionMode:d,f=e.itemFlow,h=void 0===f?hn.itemFlow:f,m=e.border,g=void 0===m?hn.border:m,y=e.className,b=e.items,k=e.item,O=e.itemRender,S=e.disabled,E=e.style,I=e.id,N=e.onSelect,T=e.onKeyDown,M=o.useMemo((function(){return(0,v.M)()}),[]),D=(0,xt.n)(n,e.dir),R=o.useMemo((function(){return(0,a.A)("k-bottom-nav",un[p],sn[l],ln[u],cn[h],{"k-bottom-nav-border":g,"k-disabled":S},y)}),[p,l,u,h,g,S,y]),P=o.useCallback((function(e,t){b&&!b[t].disabled&&N&&(0,X.N)(N,e,i(),{itemTarget:b[t],itemIndex:t})}),[b,N]),_=o.useCallback((function(e,t){P(e,t)}),[P]),A=o.useCallback((function(e,t){switch(e.keyCode){case w.R.enter:case w.R.space:P(e,t),e.preventDefault()}(0,X.N)(T,e,i(),void 0)}),[P,T]);return o.createElement("nav",{ref:n,className:R,style:E,id:I||M,dir:D},b&&b.map((function(e,t){return o.createElement(dn,pn({},e,{key:t,index:t,id:"".concat(I||M,"-").concat(t),disabled:S||e.disabled,selected:e.selected,dataItem:e,item:k,render:O,onSelect:_,onKeyDown:A}))})))})),hn={themeColor:"primary",fill:"flat",itemFlow:"vertical",positionMode:"fixed",border:!0};fn.propTypes={className:i.string,style:i.object,id:i.string,dir:i.string,themeColor:i.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),fill:i.oneOf(["solid","flat"]),itemFlow:i.oneOf(["vertical","horizontal"]),border:i.bool,disabled:i.bool,selected:i.number,onSelect:i.func},fn.defaultProps=hn,fn.displayName="KendoReactBottomNavigation";var mn=n(9302),gn=function(){return gn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gn.apply(this,arguments)},vn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,s=e.style,l=e.id,c=e.children,u=o.useMemo((function(){return(0,v.M)()}),[]),d=o.useMemo((function(){return e.orientation||yn.orientation}),[e.orientation]),p="horizontal"===d,f=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:yn.hAlign}),[e.align]),h=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:yn.vAlign}),[e.align]),m=o.useMemo((function(){return(0,a.A)("k-stack-layout",{"k-hstack":"horizontal"===d,"k-vstack":"vertical"===d,"k-justify-content-start":p&&"start"===f||!p&&"top"===h,"k-justify-content-center":p&&"center"===f||!p&&"middle"===h,"k-justify-content-end":p&&"end"===f||!p&&"bottom"===h,"k-justify-content-stretch":p&&"stretch"===f||!p&&"stretch"===h,"k-align-items-start":!p&&"start"===f||p&&"top"===h,"k-align-items-center":!p&&"center"===f||p&&"middle"===h,"k-align-items-end":!p&&"end"===f||p&&"bottom"===h,"k-align-items-stretch":!p&&"stretch"===f||p&&"stretch"===h},i)}),[d,p,f,h,i]),g=gn({gap:"".concat("number"==typeof e.gap?e.gap+"px":e.gap)},s);return o.createElement("div",{ref:n,className:m,style:g,id:l||u},c)})),yn={orientation:"horizontal",hAlign:"stretch",vAlign:"stretch"};vn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string,orientation:i.oneOf(["horizontal","vertical"]),gap:i.oneOfType([i.string,i.number]),align:i.shape({vertical:i.oneOf(["top","middle","bottom","stretch"]),horizontal:i.oneOf(["start","center","end","stretch"])})},vn.defaultProps=yn,vn.displayName="KendoReactStackLayout";var bn=function(){return bn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bn.apply(this,arguments)},kn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,s=e.style,l=e.id,c=e.children,u=e.gap,d=o.useMemo((function(){return(0,v.M)()}),[]),p=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:wn.hAlign}),[e.align]),f=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:wn.vAlign}),[e.align]),h=o.useMemo((function(){return(0,a.A)("k-grid-layout",{"k-justify-items-start":"start"===p,"k-justify-items-center":"center"===p,"k-justify-items-end":"end"===p,"k-justify-items-stretch":"stretch"===p,"k-align-items-start":"top"===f,"k-align-items-center":"middle"===f,"k-align-items-end":"bottom"===f,"k-align-items-stretch":"stretch"===f},i)}),[p,f,i]),m=u?"".concat("number"==typeof u.rows?u.rows+"px":u.rows)+" "+"".concat("number"==typeof u.cols?u.cols+"px":u.cols):void 0,g=e.rows&&e.rows.map((function(e){return"".concat("number"==typeof e.height?e.height+"px":e.height)})).join(" "),y=e.cols&&e.cols.map((function(e){return"".concat("number"==typeof e.width?e.width+"px":e.width)})).join(" "),b=bn({gap:m,gridTemplateColumns:y,gridTemplateRows:g},s);return o.createElement("div",{ref:n,className:h,style:b,id:l||d},c)})),wn={hAlign:"stretch",vAlign:"stretch",gap:void 0};kn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string,gap:i.shape({rows:i.oneOfType([i.string,i.number]),columns:i.oneOfType([i.string,i.number])}),align:i.shape({vertical:i.oneOf(["top","middle","bottom","stretch"]),horizontal:i.oneOf(["start","center","end","stretch"])})},kn.defaultProps=wn,kn.displayName="KendoReactGridLayout";var Cn=function(){return Cn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Cn.apply(this,arguments)},xn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,a=e.style,s=e.id,l=e.children,c=e.row,u=e.col,d=e.rowSpan,p=e.colSpan,f=o.useMemo((function(){return(0,v.M)()}),[]),h=Cn({gridArea:"".concat(c||"auto"," / ").concat(u||"auto"," / ").concat(d?"span "+d:"auto"," / ").concat(p?"span "+p:"auto")},a);return o.createElement("div",{ref:n,className:i,style:h,id:s||f},l)}));xn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string},xn.displayName="KendoReactGridLayoutItem";var On=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useCallback((function(){r.current&&r.current.focus()}),[r]);return o.useImperativeHandle(n,(function(){return{element:r.current,focus:i,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("li",{ref:r,id:e.id,style:e.style,className:(0,a.A)("k-flex-none k-breadcrumb-item",e.className)},e.children)})),Sn={id:i.string,className:i.string,children:i.any,style:i.object};On.displayName="KendoReactBreadcrumbListItem",On.propTypes=Sn;var En=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null);return o.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("span",{ref:r,id:e.id,tabIndex:e.tabIndex,style:e.style,className:(0,a.A)("k-icon k-i-arrow-chevron-right k-breadcrumb-delimiter-icon",e.className)})})),In={id:i.string,className:i.string,style:i.object,tabIndex:i.number};En.displayName="KendoReactBreadcrumbDelimiter",En.propTypes=In;var Nn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useCallback((function(){r.current&&r.current.focus()}),[r]);o.useImperativeHandle(n,(function(){return{element:r.current,focus:i,props:e}})),o.useImperativeHandle(t,(function(){return n.current}));var s=o.useCallback((function(t){e.id&&(0,X.N)(e.onItemSelect,t,t.target,{id:e.id})}),[e.onItemSelect]),l=o.useCallback((function(t){e.id&&(0,X.N)(e.onKeyDown,t,t.target,{id:e.id})}),[e.onKeyDown]);return o.createElement("span",{"aria-current":e.ariaCurrent?e.ariaCurrent:e.isLast,id:e.id,ref:r,style:e.style,dir:(0,xt.n)(r,e.dir),tabIndex:(0,gt.p)(e.tabIndex,e.disabled),className:(0,a.A)("k-cursor-pointer k-flex-none k-breadcrumb-link k-breadcrumb-icontext-link",{"k-disabled":e.disabled}),onClick:s,onKeyDown:l},e.iconClass?o.createElement("span",{className:(0,a.A)("k-icon",e.iconClass)}):e.icon?e.icon:"",e.text)})),Tn={id:i.string,className:i.string,tabIndex:i.number,style:i.object,dir:i.string,disabled:i.bool,text:i.string,icon:i.node,iconClass:i.string,onClick:i.func,ariaCurrent:i.bool};Nn.displayName="KendoReactBreadcrumbLink",Nn.propTypes=Tn;var Mn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null);return o.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("ol",{id:e.id,ref:r,style:e.style,dir:(0,xt.n)(r,e.dir),tabIndex:(0,gt.p)(e.tabIndex,e.disabled),className:(0,a.A)("k-breadcrumb-container k-flex-wrap",{"k-disabled":e.disabled},e.className)},e.children)})),Dn={id:i.string,className:i.string,children:i.element,tabIndex:i.number,style:i.object,dir:i.string,disabled:i.bool};Mn.displayName="KendoReactBreadcrumbOrderedList",Mn.propTypes=Dn;var Rn=function(){return Rn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Rn.apply(this,arguments)},Pn=o.forwardRef((function(e,t){(0,mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useMemo((function(){return e.breadcrumbOrderedList||Mn}),[e.breadcrumbOrderedList]),s=o.useMemo((function(){return e.breadcrumbListItem||On}),[e.breadcrumbListItem]),l=o.useMemo((function(){return e.breadcrumbDelimiter||En}),[e.breadcrumbDelimiter]),c=o.useMemo((function(){return e.breadcrumbLink||Nn}),[e.breadcrumbLink]),u=o.useCallback((function(){r.current&&r.current.focus()}),[r]),d=o.useMemo((function(){return e.disabled||!1}),[e.disabled]);o.useImperativeHandle(n,(function(){return{element:r.current,focus:u,props:e}})),o.useImperativeHandle(t,(function(){return n.current}));var p=(0,xt.n)(r,e.dir),f=function(t){n.current&&(0,X.N)(e.onItemSelect,t,t.target,{id:t.target.id})},h=function(t){n.current&&(0,X.N)(e.onKeyDown,t,t.target,{id:t.target.id})},m=e.valueField||An.valueField,g=e.iconField||An.iconField,v=e.iconClassField||An.iconClassField,y=e.textField||An.textField;return o.createElement("nav",{"aria-label":e.ariaLabel,id:e.id,style:e.style,ref:r,dir:p,className:(0,a.A)("k-breadcrumb",{"k-rtl":"rtl"===p,"k-disabled":d},e.className)},o.createElement(i,null,o.createElement(o.Fragment,null,e.data.map((function(t,n,r){var i=t[m];return o.createElement(s,{key:i},0!==n&&o.createElement(l,null),o.createElement(c,Rn({isLast:r.length-1===n,id:String(i),icon:t[g]||void 0,iconClass:t[v]?String(t[v]):void 0,text:t[y]?String(t[y]):void 0,disabled:t.disabled||!1,onItemSelect:f,onKeyDown:h},e)))})))))})),_n={id:i.string,style:i.object,className:i.string,breadcrumbOrderedList:i.elementType,breadcrumbListItem:i.elementType,breadcrumbDelimiter:i.elementType,breadcrumbLink:i.elementType,data:i.arrayOf(i.shape({id:i.string,text:i.string,icon:i.any,iconClass:i.string})),dir:i.oneOf(["ltr","rtl"]),disabled:i.bool,valueField:i.string,textField:i.string,iconField:i.string,iconClassField:i.string,onItemSelect:i.func,ariaLabel:i.string},An={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass"};Pn.displayName="KendoReactBreadcrumb",Pn.propTypes=_n,Pn.defaultProps=An;var jn=n(6059),Fn=o.forwardRef((function(e,t){var n;(0,C.s)(x);var r=o.useRef(null),i=o.useState(!1),s=i[0],l=i[1],c=o.useCallback((function(){return{element:r.current}}),[]);o.useImperativeHandle(t,c);var u=e.expanded,d=void 0!==u&&u,p=e.disabled,f=e.title,h=e.subtitle,m=e.onAction,g=e.expandIcon,v=e.collapseIcon,y=o.useCallback((function(e){(0,X.N)(m,e,c(),{expanded:d})}),[m,d]),b=o.useCallback((function(e){e.keyCode!==w.R.enter&&e.keyCode!==w.R.space||(e.preventDefault(),(0,X.N)(m,e,c(),{expanded:d}))}),[m,d]),k=o.useCallback((function(){e.disabled||l(!0)}),[e.disabled]),O=o.useCallback((function(){e.disabled||l(!1)}),[e.disabled]),S=(0,jn.U)({onFocus:k,onBlur:O}),E=S.onFocus,I=S.onBlur;return o.createElement("div",{ref:r,className:(0,a.A)("k-expander",e.className,{"k-expanded":d,"k-focus":s&&!p,"k-disabled":p}),onFocus:E,onBlur:I,style:e.style,id:e.id,dir:(0,Tt.V)(r,e.dir),onKeyDown:p?void 0:b},o.createElement("div",{role:"button","aria-controls":e.ariaControls,"aria-expanded":d,"aria-disabled":p,tabIndex:(0,gt.p)(e.tabIndex,p),className:"k-expander-header",onClick:p?void 0:y},void 0!==f?o.createElement("div",{className:"k-expander-title"},f):void 0,o.createElement("span",{className:"k-spacer"}),void 0!==h?o.createElement("div",{className:"k-expander-sub-title"},h):void 0,o.createElement("span",{className:"k-expander-indicator"},o.createElement("span",{className:(0,a.A)((n={},n[String(g)]=Boolean(!d&&g),n["k-icon k-i-arrow-chevron-down"]=!d&&!g,n[String(v)]=Boolean(d&&v),n["k-icon k-i-arrow-chevron-up"]=d&&!v,n))}))),e.children)}));Fn.propTypes={children:i.node,className:i.string,style:i.object,dir:i.string,id:i.string,tabIndex:i.number,title:i.node,subtitle:i.node,expandIcon:i.string,collapseIcon:i.string,expanded:i.bool,disabled:i.bool,onAction:i.func},Fn.displayName="KendoReactExpansionPanel";var zn=function(){return zn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zn.apply(this,arguments)},Ln=o.forwardRef((function(e,t){return o.createElement("div",zn({ref:t},e,{className:(0,a.A)("k-expander-content-wrapper",e.className)}),o.createElement("div",{className:"k-expander-content"},e.children))}));Ln.displayName="KendoReactExpansionPanelContent"},5809:(e,t,n)=>{n.r(t),n.d(t,{GridPDFExport:()=>K,PDFExport:()=>x,PDFMargin:()=>h,TreeListPDFExport:()=>X,getPageMargin:()=>g,savePDF:()=>O});var r=n(3899),o=n(189),i=n(4407);function a(e,t,n){void 0===n&&(n={});var r=d;if(n.forceProxy&&!n.proxyURL)throw new Error("No proxyURL is set, but forceProxy is true");n.forceProxy||(l()&&(r=u),navigator.msSaveBlob&&(r=c)),r(e,t,n)}var s=function(){return document.createElement("a")},l=function(){return"download"in s()};function c(e,t){var n=e;if("string"==typeof e){for(var r=e.split(";base64,"),o=r[0],i=atob(r[1]),a=new Uint8Array(i.length),s=0;s<i.length;s++)a[s]=i.charCodeAt(s);n=new Blob([a.buffer],{type:o})}navigator.msSaveBlob(n,t)}function u(e,t){var n=e;window.Blob&&e instanceof Blob&&(n=URL.createObjectURL(e));var r=s();r.download=t,r.href=n;var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(o),setTimeout((function(){return URL.revokeObjectURL(n)}))}function d(e,t,n){if(n.proxyURL){var r=document.createElement("form");r.setAttribute("action",n.proxyURL),r.setAttribute("method","POST"),r.setAttribute("target",n.proxyTarget||"_self");var o=n.proxyData||{};o.fileName=t;var i=e.split(";base64,");for(var a in o.contentType=i[0].replace("data:",""),o.base64=i[1],o)if(o.hasOwnProperty(a)){var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name",a),s.setAttribute("value",o[a]),r.appendChild(s)}document.body.appendChild(r),r.submit(),document.body.removeChild(r)}}String.fromCharCode;var p,f=(p=function(e,t){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},p(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.render=function(){return null},t.propTypes={left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])},t}(r.Component),m=["bottom","left","right","top"];function g(e){var t=r.Children.toArray(e.children).find((function(e){return e&&e.type===h}));return t?function(e){for(var t={},n=0;n<m.length;n++){var r=m[n],o=e.props[r];void 0!==o&&(t[r]=o)}return t}(t):e.margin}var v=n(3209),y=function(){function e(e,t,n,o,i){void 0===i&&(i={});var a=this;this.drawDOM=e,this.exportPDF=t,this.saveAs=n,this.domElement=o,this.options=i,this.convertPageTemplateToHtml=function(e){var t=v.renderToStaticMarkup(r.createElement(a.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages}));return"<span>".concat(t,"</span>")}}return e.prototype.savePDF=function(e){var t=this,n=this.drawDOM(this.domElement,this.getDrawOptions()).then((function(e){return t.exportPDF(e,t.getPDFOptions())})).then((function(e){return t.saveAs(e,t.options.fileName||"export.pdf",t.getSaveOptions())}));e&&n.then(e,e)},e.prototype.getDrawOptions=function(){return{avoidLinks:this.options.avoidLinks,forcePageBreak:this.options.forcePageBreak,keepTogether:this.options.keepTogether,margin:this.options.margin,paperSize:this.options.paperSize,landscape:this.options.landscape,repeatHeaders:this.options.repeatHeaders,scale:this.options.scale,template:this.options.pageTemplate&&this.convertPageTemplateToHtml}},e.prototype.getPDFOptions=function(){return{author:this.options.author,creator:this.options.creator||"KendoReact PDF Generator",date:this.options.date,imgDPI:this.options.imageResolution,keywords:this.options.keywords,landscape:this.options.landscape,margin:this.options.margin,multiPage:!0,paperSize:this.options.paperSize,producer:this.options.producer,subject:this.options.subject,title:this.options.title}},e.prototype.getSaveOptions=function(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}},e}();const b=y;var k=n(9302),w={name:"@progress/kendo-react-pdf",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660124007,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},C=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(e){function t(t){var n=e.call(this,t)||this;if(n.rootElForPDF=null,void 0!==k)k.validatePackage(w);else{var r="License activation failed for ".concat(w.name,"\n");r+="The @progress/kendo-licensing script is not loaded.\n",r+="See ".concat(w.licensingDocsUrl," for more information.\n"),console.warn(r)}return n}return C(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",{ref:function(t){e.rootElForPDF=t}},this.props.children)},t.prototype.save=function(e){new b(i.drawDOM,i.exportPDF,a,this.rootElForPDF,this.getOptions()).savePDF(e)},t.prototype.getOptions=function(){return Object.assign({},this.props,{margin:g(this.props)})},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string},t}(r.Component);function O(e,t,n){void 0===t&&(t={}),new b(i.drawDOM,i.exportPDF,a,e,t).savePDF(n)}var S=n(994),E={},I=function(e){return String(e).trim().split(" ")},N=function(e){return function(t){return function(e,t){var n=I(t);return Boolean(I(e.className).find((function(e){return n.indexOf(e)>=0})))}(t,e)}},T=function(e){return E[e]||(E[e]=function(t){return String(t.nodeName).toLowerCase()===e.toLowerCase()}),E[e]},M=function(e,t,n){if(void 0===n&&(n=!0),e){if(n&&t(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){var r=M(e,t);if(r)return r}e=e.nextSibling}}},D="k-grid-header",R="k-grid-footer",P=T("TABLE"),_=function(e){return e?"locked":"wrap"},A=function(){function e(e){this.element=e,this.list=M(e,N("k-grid-container"))}return e.prototype.content=function(e){return M(this.list,N("k-grid-content".concat(e?"-locked":"")))},e.prototype.header=function(e){return this.headerWrap=this.headerWrap||M(this.element,N(D)),M(this.headerWrap,N("".concat(D,"-").concat(_(e))))},e.prototype.footer=function(e){return this.footerWrap=this.footerWrap||M(this.element,N(R)),M(this.footerWrap,N("".concat(R,"-").concat(_(e))))},e.prototype.table=function(){return M(this.element,P)},e}(),j="k-first",F=function(e,t){for(var n=t.length,r=0;r<n;r++)e.appendChild(t[r].cloneNode(!0))},z=function(e){var t=document.createElement("div");return t.className="k-widget k-grid",t.appendChild(e),t},L=function(e){var t=e.length,n=e[0].cloneNode(!0),r=n.rows.length;if(t>1)for(var o=0;o<r;o++)for(var i=1;i<t;i++)F(n.rows[o],e[i].rows[o].cells);return n},B=function(e,t,n,r){for(var o=document.createElement("table"),i=e[0].cloneNode(!0),a=1;a<e.length;a++)F(i,e[a].querySelectorAll("col"));var s=L(t),l=L(n);if(s.className="k-grid-header",function(e,t){if(t.length>1&&e.rows.length>1)for(var n=1;n<e.rows.length;n++){var r=t[0].rows[n].cells.length,o=e.rows[n].cells[r];-1===String(o.className).indexOf(j)&&(o.className+=" ".concat(j))}}(s,t),o.appendChild(i),o.appendChild(s),o.appendChild(l),r.length){var c=L(r);c.className="k-grid-footer",o.appendChild(c)}return z(o)};function V(e){return function(t,n,o,i,a){return void 0===n&&(n={}),function(e,t,n,o,i,a){var s,l,c;function u(){e(function(){(c=document.createElement("div")).className="k-grid-pdf-export-element";var e=function(e){var t,n=new A(e),r=n.content();if(r){var o=[r.querySelector("colgroup")],i=[n.header().querySelector("thead")],a=[r.querySelector("tbody")],s=n.footer(),l=s?[s.querySelector("tfoot")]:[];t=B(o,i,a,l)}else t=z(n.table().cloneNode(!0));return t}(l);return c.appendChild(e),document.body.appendChild(c),e}(),n,d)}function d(){document.body.removeChild(s),document.body.removeChild(c),s=c=void 0,o&&o()}void 0===n&&(n={}),(s=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),l=document.createElement("div"),s.appendChild(l),document.body.appendChild(s),S.render(function(){var e=i&&{data:i,total:i.length,pageSize:i.length,skip:0},n={style:Object.assign({},t.props.style,{width:"1000px"})},o=Object.assign({},e,n);if(a&&a.length>0){var s=function(e){return r.Children.toArray(e.props.children).filter((function(e){return e&&e.type&&"KendoReactGridColumn"!==e.type.displayName}))}(t);return r.cloneElement(t,o,a.concat(s))}return r.cloneElement(t,o)}(),l,u)}(e,t,n,o,i,a)}}var H=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=function(e){function t(t){var n=e.call(this,t)||this;return n.saveGridPDF=V(n.getSavePDF()),n}return H(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t){this.saveGridPDF(this.getGrid(),Object.assign({},this.props,{margin:g(this.props)}),t,e,this.getCustomColumns())},t.prototype.getSavePDF=function(){return O},t.prototype.getGrid=function(){return r.Children.toArray(this.props.children).find((function(e){return e&&"KendoReactGrid"===e.type.displayName}))},t.prototype.getCustomColumns=function(){return r.Children.toArray(this.props.children).filter((function(e){return e&&"KendoReactGridColumn"===e.type.displayName}))},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string},t}(r.Component),W="k-grid-header",$="k-grid-footer",q=T("TABLE"),U=function(){function e(e){this.element=e,this.list=M(e,N("k-grid"))}return e.prototype.content=function(){return M(this.list,N("k-grid"))},e.prototype.header=function(){return this.headerWrap=this.headerWrap||M(this.element,N(W)),M(this.headerWrap,N("".concat(W)))},e.prototype.footer=function(){return this.footerWrap=this.footerWrap||M(this.element,N($)),M(this.footerWrap,N("".concat($)))},e.prototype.table=function(){return M(this.element,q)},e}();function G(e){return function(t,n,o,i,a){return void 0===n&&(n={}),function(e,t,n,o,i,a){var s,l,c,u,d,p;function f(){e(function(){(c=document.createElement("div")).className="k-treelist-pdf-export-element";var e=function(e){var t,n=new U(e),r=n.content(),o=n.header();if(o.childNodes.length>1&&o.removeChild(o.childNodes[1]),o.childNodes[0].childNodes.forEach((function(e){return e.style.top=0})),r){var i=[r.querySelector("colgroup")],a=[o],s=[r.querySelector("tbody")],l=n.footer(),c=l?[l.querySelector("tfoot")]:[];t=B(i,a,s,c)}else t=z(n.table().cloneNode(!0));return t}(l);return c.appendChild(e),document.body.appendChild(c),c}(),n,h)}function h(){document.body.removeChild(s),document.body.removeChild(c),s=c=void 0,o&&o()}void 0===n&&(n={}),(s=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),l=document.createElement("div"),s.appendChild(l),document.body.appendChild(s),S.render((u=n.allPages&&i?{data:i,take:Number.MAX_VALUE,skip:0}:{},d={style:Object.assign({},t.props.style,{width:"1000px"})},p=Object.assign({},u,d),a&&a.length>0?r.cloneElement(t,Object.assign({},p,{columns:a})):r.cloneElement(t,p)),l,f)}(e,t,n,o,i,a)}}var Y=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),X=function(e){function t(t){var n=e.call(this,t)||this;return n.saveTreeListPDF=G(n.getSavePDF()),n}return Y(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t,n){this.saveTreeListPDF(this.getTreeList(),Object.assign({},this.props,{margin:g(this.props)}),n,e,t||[])},t.prototype.getSavePDF=function(){return O},t.prototype.getTreeList=function(){var e=this.props.children;if(e&&e.props.data&&e.props.columns)return this.props.children},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string,allPages:o.bool},t}(r.Component)},9222:(e,t,n)=>{n.d(t,{G:()=>se,v:()=>ae});var r=n(3899),o=n(994),i=n(189),a=function(e){e.style.transitionDuration="",Array.from(e.classList).forEach((function(t){t.startsWith("k-slide-")&&e.classList.remove(t)}))},s="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),l=n(4006),c=n(7827),u=n(8259),d=n(8047);const p="bottom",f="center",h="middle",m="left",g="right",v="top",y="fit",b="flip",k="none";var w,C,x,O=function(e,t,n){var r=0;return e+t>n&&(r=n-(e+t)),e<0&&(r=-e),r},S=function(e){var t=e.offset,n=e.size,r=e.anchorSize,o=e.viewPortSize,i=e.anchorAlignPoint,a=e.elementAlignPoint,s=0,l=2*e.margin;if(a!==i&&a!==f&&a!==h&&i!==f&&i!==h){var c=i===v||i===m;t<0&&c?t+(s=n+r+l)+n>o&&(s=0):t>=0&&!c&&(t+n>o&&(s+=-(r+n+l)),t+s<0&&(s=0))}return s},E=(w=function(e){if(!I())return!1;var t=e?e.ownerDocument:document;if(!t||!t.body)return!1;var n=t.createElement("div");n.style.transform="matrix(10, 0, 0, 10, 0, 0)",n.innerHTML='<div style="position: fixed; top: 10px;">child</div>',t.body.appendChild(n);var r=10!==n.children[0].getBoundingClientRect().top;return t.body.removeChild(n),r},x=!1,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return x||(C=w.apply(void 0,e),x=!0),C}),I=function(){return Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)};const N={eitherRect:function(e,t){return e||{height:0,left:t.left,top:t.top,width:0}},scaleRect:function(e,t){return e&&1!==t?{height:e.height/t,left:e.left/t,top:e.top/t,width:e.width/t}:e},removeStackingOffset:function(e,t){return t?{height:e.height,left:e.left-t.left,top:e.top-t.top,width:e.width}:e},hasRelativeStackingContext:E,canUseDOM:I};function T(e){return e.ownerDocument||e.document||e}const M=function(e){return T(e).defaultView},D=function(e){return T(e).documentElement};var R=0;function P(){if(!R&&"undefined"!=typeof document){var e=document.createElement("div");e.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML="&nbsp;",document.body.appendChild(e),R=e.offsetWidth-e.scrollWidth,document.body.removeChild(e)}return R}function _(e){var t=M(e),n=D(e),r={height:t.innerHeight,width:t.innerWidth};return n.scrollHeight-n.clientHeight>0&&(r.width-=P()),r}function A(e){var t=D(e),n=M(e);return{x:n.pageXOffset||t.scrollLeft||0,y:n.pageYOffset||t.scrollTop||0}}const j=function(e){var t=e.getBoundingClientRect(),n=t.left,r=t.top;return t.height||t.width||(t=function(e){var t=e.style,n=t.display,r=t.left,o=t.position;e.style.display="",e.style.left="-10000px",e.style.position="absolute";var i=e.getBoundingClientRect();return e.style.display=n,e.style.left=r,e.style.position=o,i}(e)),{top:r,left:n,height:t.height,width:t.width}};function F(e){return e===(e.ownerDocument||{}).body?A(e):{x:e.scrollLeft,y:e.scrollTop}}const z=function(e){for(var t=e.offsetParent;t&&"static"===t.style.position;)t=t.offsetParent;return t||D(e)};function L(e,t){for(var n=[],r=e.parentNode;r&&(n.push(r),r!==t);)r=r.parentNode;return n}function B(e){for(var t=[],n=e.parentNode.firstElementChild;n;)n!==e&&t.push(n),n=n.nextElementSibling;return t}var V=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],H=function(){return N.canUseDOM()?window:null},K=/auto|scroll/,W=function(e){return function(e){return""+e.style.overflow+e.style.overflowX+e.style.overflowY}(e)||function(e){var t=window.getComputedStyle(e);return""+t.overflow+t.overflowX+t.overflowY}(e)},$=function(e){if(!e||!N.hasRelativeStackingContext())return null;for(var t=e.parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null},q=function(){return N.canUseDOM()&&parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1},U={addOffset:function(e,t){return{left:e.left+t.left,top:e.top+t.top}},addScroll:function(e,t){return{top:e.top+t.y,left:e.left+t.x,height:e.height,width:e.width}},align:function(e){var t=e.anchorRect,n=e.anchorAlign,r=e.elementRect,o=e.elementAlign,i=e.margin;void 0===i&&(i={});var a=n.horizontal,s=n.vertical,l=o.horizontal,c=o.vertical,u=i.horizontal||0,d=i.vertical||0,m=t.top,v=t.left;return s===p&&(m+=t.height),s!==f&&s!==h||(m+=Math.round(t.height/2)),c===p&&(m-=r.height,d*=-1),c!==f&&c!==h||(m-=Math.round(r.height/2),d*=-1),a===g&&(v+=t.width),a!==f&&a!==h||(v+=Math.round(t.width/2)),l===g&&(v-=r.width,u*=-1),l!==f&&l!==h||(v-=Math.round(r.width/2),u*=-1),{top:m+d,left:v+u}},boundingOffset:function(e){if(!e.getBoundingClientRect){var t=_(e);return{bottom:t.height,left:0,right:t.width,top:0}}var n=e.getBoundingClientRect();return{bottom:n.bottom,left:n.left,right:n.right,top:n.top}},getFontStyles:function(e){var t=H();if(!t||!e)return[];var n=t.getComputedStyle(e);return V.map((function(e){return{key:e,value:n[e]}}))},getWindow:H,hasOffsetParent:function(e){return!!e&&Boolean(e.offsetParent)},offset:function(e){return e?j(e):null},offsetAtPoint:function(e,t){if(!e)return null;var n=e.style,r=n.left,o=n.top,i=n.transition;e.style.transition="none",e.style.left=t.left+"px",e.style.top=t.top+"px";var a=j(e);return e.style.left=r,e.style.top=o,e.offsetHeight,e.style.transition=i,a},position:function(e,t,n){return e&&t?function(e,t,n){void 0===n&&(n=1);var r=t?z(t):null,o=function(e,t){var n=M(e),r=n.getComputedStyle(e),o=j(e),i=t||z(e),a=e.ownerDocument,s=i!==a.body&&i!==a.documentElement,l={top:0,left:0};if("fixed"!==r.position&&s){var c=n.getComputedStyle(i);(l=j(i)).top+=parseInt(c.borderTopWidth,10),l.left+=parseInt(c.borderLeftWidth,10)}return{top:o.top-l.top,left:o.left-l.left,height:o.height,width:o.width}}(e,r),i=o.top,a=o.left,s=o.height,l=o.width,c=function(e,t){return e?F(e):function(e){var t=z(e);return t?F(t):{x:0,y:0}}(t)}(r,e),u=c.x,d=c.y,p=e.ownerDocument,f=r===p.body||r===p.documentElement?1:n;return{top:i+d*f,left:a+u*f,height:s,width:l}}(e,t,n||1):null},removeScroll:function(e,t){return{top:e.top-t.y,left:e.left-t.x,height:e.height,width:e.width}},restrictToView:function(e){var t=e.anchorRect,n=e.anchorAlign,r=e.elementRect,o=e.elementAlign,i=e.collisions,a=e.viewPort,s=e.margin;void 0===s&&(s={});var l=r.top,c=r.left,u=r.height,d=r.width,p=a.height,f=a.width,h=s.horizontal||0,m=s.vertical||0,g=0,v=0,k=i.vertical===y,w=i.horizontal===y,C=i.vertical===b,x=i.horizontal===b;k&&(v+=O(l,u,p)),w&&(g+=O(c,d,f)),C&&(v+=S({margin:m,offset:l,size:u,anchorSize:t.height,viewPortSize:p,anchorAlignPoint:n.vertical,elementAlignPoint:o.vertical})),x&&(g+=S({margin:h,offset:c,size:d,anchorSize:t.width,viewPortSize:f,anchorAlignPoint:n.horizontal,elementAlignPoint:o.horizontal}));var E=C&&0!==v,I=x&&0!==g,N=k&&0!==v,T=w&&0!==g;return{flipped:I||E,fitted:N||T,flip:{horizontal:I,vertical:E},fit:{horizontal:T,vertical:N},offset:{left:g,top:v}}},scrollPosition:A,scrollableParents:function(e){var t=[];if(!N.canUseDOM())return t;for(var n=e.parentElement;n;)(K.test(W(n))||n.hasAttribute("data-scrollable"))&&t.push(n),n=n.parentElement;return t.push(window),t},getRelativeContextElement:$,stackingElementOffset:function(e){var t=$(e);return t?j(t):null},stackingElementScroll:function(e){var t=$(e);return t?{x:t.scrollLeft,y:t.scrollTop}:{x:0,y:0}},stackingElementViewPort:function(e){var t=$(e);return t?{height:t.scrollHeight,width:t.scrollWidth}:null},useRelativePosition:function(e){return Boolean($(e))},windowViewPort:_,zoomLevel:q,isZoomed:function(){return q()>1},zIndex:function(e,t){if(!e||!N.canUseDOM())return null;var n=function(e,t){for(var n,r,o=L(e),i=t;i&&(n=B(i),!(r=o.reduce((function(e,t){return e.concat(n.filter((function(e){return e===t})))}),[])[0]));)i=i.parentElement;return r}(e,t);if(!n)return null;var r=[e].concat(L(e,n)).reduce((function(e,t){var n=t.style.zIndex||window.getComputedStyle(t).zIndex,r=parseInt(n,10);return r>e?r:e}),0);return r?r+1:null}};const G=U;const Y=function(e){var t=e.anchor,n=e.element,r=e.anchorAlign,o=e.elementAlign,i=e.margin,a=e.offset,s=e.positionMode,l=e.scale||1,c="fixed"!==s&&G.hasOffsetParent(n)?function(e,t,n,r){var o=N.eitherRect(G.position(e,t,r),n);return N.scaleRect(o,r)}(t,n,a,l):function(e,t,n,r){var o=function(e,t){return e?{x:0,y:0}:G.scrollPosition(t)}(e,t),i=N.eitherRect(G.offset(e),n),a=2*r,s=G.stackingElementScroll(t);1!==r&&s&&(s.x/=a,s.y/=a);var l=G.stackingElementOffset(t);return 1!==r&&l&&(l.left/=a,l.top/=a),G.removeScroll(G.addScroll(N.removeStackingOffset(N.scaleRect(i,r),l),s),o)}(t,n,a,l),u=N.scaleRect(G.offset(n),l);return G.align({anchorAlign:r,anchorRect:c,elementAlign:o,elementRect:u,margin:i})};var X,J={name:"@progress/kendo-react-popup",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660123480,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},Z=(X=function(e,t){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},X(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}X(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Q=function(){return Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Q.apply(this,arguments)};function ee(e,t){if(e===t)return!0;if(!!e!=!!t)return!1;var n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(e[i]!==t[i])return!1}return!0}var te,ne={left:-1e3,top:0};!function(e){e.hiding="hiding",e.hidden="hidden",e.showing="showing",e.shown="shown",e.reposition="reposition"}(te||(te={}));var re="k-animation-container-shown",oe=function(e){function t(t){var n=e.call(this,t)||this;return n.context=0,n.state={current:te.hidden,previous:te.hidden,props:{}},n._popup=null,n.show=function(e){n.setPosition(e),n.animate(e.firstChild,"enter",n.onOpened),n.setState({current:te.shown,previous:n.state.current})},n.setPosition=function(e){var t=n.props,r=t.anchorAlign,o=t.popupAlign,i=t.collision,a=t.offset,s=t.anchor,l=t.margin,c=t.scale,u=t.positionMode,d=function(e){var t=e.anchor,n=e.currentLocation,r=e.element,o=e.anchorAlign,i=e.elementAlign,a=e.collisions,s=e.margin,l=e.scale||1,c=G.offsetAtPoint(r,n),u=N.scaleRect(c,l),d=N.scaleRect(G.offset(t),l),p=N.eitherRect(d,n),f=e.viewPort||G.windowViewPort(r);f.width=f.width/l,f.height=f.height/l;var h=G.restrictToView({anchorAlign:o,anchorRect:p,collisions:a,elementAlign:i,elementRect:u,margin:s,viewPort:f}),m=G.addOffset(n,h.offset);return{flip:h.flip,flipped:h.flipped,offset:m}}({anchor:s,anchorAlign:r,element:e,elementAlign:o,collisions:i,currentLocation:Y({anchor:s,anchorAlign:r,element:e,elementAlign:o,offset:a,margin:l,positionMode:u,scale:c}),margin:n.props.margin});if(e.style.top=d.offset.top+"px",e.style.left=d.offset.left+"px",n._collisions={fit:d.fit,fitted:d.fitted,flip:d.flip,flipped:d.flipped},n.props.onPosition){var p={target:n,flipped:d.flipped,fitted:d.fitted};n.props.onPosition.call(void 0,p)}},n.onOpened=function(){var e=n._popup;e&&(n.props.show&&e.classList.add(re),n.attachRepositionHandlers(e),n.props.onOpen&&n.props.onOpen.call(void 0,{target:n}))},n.animate=function(e,t,r){if(n.props.popupAlign){var o,i=n.props.popupAlign,l=i.horizontal,c=i.vertical;o="left"===l&&"center"===c?"right":"right"===l&&"center"===c?"left":"top"===c?"down":"up",n._collisions&&n._collisions.flipped&&(o={down:"up",up:"down",left:"right",right:"left"}[o]),function(e,t,n,r,o){if(0===n)return o();var i="k-slide-"+t+"-"+r,l=i+"-active",c=function(t){t.target===e&&(e.removeEventListener("transitionend",c),a(e),"exit"===r&&(e.style.display="none"),o())};e.addEventListener("transitionend",c);var u=e.ownerDocument;if(u){var d=u.defaultView;if(d){var p=function(){a(e),e.classList.add(i),d.requestAnimationFrame((function(){e.style.transitionDuration=n+"ms",e.classList.add(l)}))};s?d.requestAnimationFrame(p):p()}}}(e,o,n.animationDuration[t],t,r)}},n.onClosing=function(e){n.props.show||e.classList.remove(re),n.detachRepositionHandlers()},n.onClosed=function(){n.state.current===te.hiding&&n.state.previous===te.shown&&n.setState({current:te.hidden,previous:n.state.current}),n.props.onClose&&n.props.onClose.call(void 0,{target:n})},n.getCurrentZIndex=function(){return n.context?n.context+1:100},(0,l.s)(J),n.reposition=function(e,t,n){var r,o,i,a;void 0===n&&(n={});var s=0;n=n||{};var l=function(){s=!1===n.leading?0:(new Date).getTime(),r=void 0,a=e.apply(o,i),r||(o=i=null)};return function(){var c=(new Date).getTime();s||!1!==n.leading||(s=c);var u=t-(c-s);return o=void 0,i=arguments,u<=0||u>t?(r&&(clearTimeout(r),r=void 0),s=c,a=e.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=window.setTimeout(l,u)),a}}(n.reposition.bind(n),16.666666666666668),n}return Z(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._popup},enumerable:!1,configurable:!0}),t.getDerivedStateFromProps=function(e,t){var n=e.show,r=e.anchor,o=e.anchorAlign,i=e.appendTo,a=e.collision,s=e.popupAlign,l=e.className,c=e.popupClass,u=e.style,d=e.offset,p=e.contentKey,f=Q(Q({},t),{props:{show:n,anchor:r,anchorAlign:o,appendTo:i,collision:a,popupAlign:s,className:l,popupClass:c,style:u,offset:d,contentKey:p}});return e.show?t.current===te.hidden||t.current===te.hiding?Q(Q({},f),{current:te.showing,previous:t.current}):t.current===te.showing?Q(Q({},f),{current:te.shown,previous:t.current}):t.current!==te.shown||ee(d,t.props.offset)&&ee(o,t.props.anchorAlign)&&ee(i,t.props.appendTo)&&ee(a,t.props.collision)&&ee(s,t.props.popupAlign)&&ee(u,t.props.style)&&r===t.props.anchor&&c===t.props.popupClass&&l===t.props.className?f:Q(Q({},f),{current:te.reposition,previous:t.current}):t.current===te.hiding||t.current===te.hidden?Q(Q({},f),{current:te.hidden,previous:t.current}):Q(Q({},f),{current:te.hiding,previous:t.current})},t.prototype.componentDidUpdate=function(e){this.state.current===te.showing&&this._popup?this.show(this._popup):this.state.current===te.hiding&&this._popup?(this.onClosing(this._popup),this.animate(this._popup.firstChild,"exit",this.onClosed)):this.state.current===te.reposition&&this.state.previous===te.shown?this.setState({current:te.shown,previous:this.state.current}):this.state.current===te.shown&&e.contentKey!==this.props.contentKey&&this._popup&&this.setPosition(this._popup)},t.prototype.componentDidMount=function(){this.state.current===te.showing&&this._popup&&this.show(this._popup)},t.prototype.componentWillUnmount=function(){this.detachRepositionHandlers()},t.prototype.render=function(){var e=this,t=this.props,n=t.children,i=t.className,a=t.popupClass,s=t.show,l=t.id,p=t.positionMode,f=this.props.appendTo?this.props.appendTo:c.N?this.props.anchor&&this.props.anchor.ownerDocument?this.props.anchor.ownerDocument.body:document.body:void 0;this.state.current===te.reposition&&this.state.previous===te.shown&&this._popup&&this.setPosition(this._popup);var h=Object.assign({},{position:p,top:0,left:-1e4},this.props.style||{}),m=this.state.current===te.hiding;if((s||m)&&f){var g=this.getCurrentZIndex(),v=r.createElement(u.$.Provider,{value:g},r.createElement("div",{className:(0,d.A)("k-animation-container","k-animation-container-relative",i),id:l,ref:function(t){return e._popup=t},style:Q({zIndex:g},h)},r.createElement("div",{className:(0,d.A)("k-popup",a,"k-child-animation-container"),style:{transitionDelay:"0ms"}},n)));return null!==this.props.appendTo?o.createPortal(v,f):v}return null},Object.defineProperty(t.prototype,"animationDuration",{get:function(){var e=this.props.animate,t=0,n=0;return e&&(!0===e?t=n=300:(t=e.openDuration||0,n=e.closeDuration||0)),{enter:t,exit:n}},enumerable:!1,configurable:!0}),t.prototype.attachRepositionHandlers=function(e){var t=this;this.detachRepositionHandlers(),this._scrollableParents=G.scrollableParents(this.props.anchor||e),this._scrollableParents&&this._scrollableParents.map((function(e){return e.addEventListener("scroll",t.reposition)})),window.addEventListener("resize",this.reposition)},t.prototype.detachRepositionHandlers=function(){var e=this;this._scrollableParents&&(this._scrollableParents.map((function(t){return t.removeEventListener("scroll",e.reposition)})),this._scrollableParents=void 0),window.removeEventListener("resize",this.reposition)},t.prototype.reposition=function(){this.setState({current:te.reposition,previous:this.state.current})},t.propTypes={anchor:function(e){var t=e.anchor;return t&&"number"!=typeof t.nodeType?new Error("Invalid prop `anchor` supplied to `Kendo React Popup`. Validation failed."):null},appendTo:function(e){var t=e.appendTo;return t&&"number"!=typeof t.nodeType?new Error("Invalid prop `appendTo` supplied to `Kendo React Popup`. Validation failed."):null},className:i.oneOfType([i.string,i.arrayOf(i.string),i.object]),id:i.string,popupClass:i.oneOfType([i.string,i.arrayOf(i.string),i.object]),collision:i.shape({horizontal:i.oneOf([y,b,k]),vertical:i.oneOf([y,b,k])}),anchorAlign:i.shape({horizontal:i.oneOf([m,f,g]),vertical:i.oneOf([v,f,p])}),popupAlign:i.shape({horizontal:i.oneOf([m,f,g]),vertical:i.oneOf([v,f,p])}),offset:i.shape({left:i.number,top:i.number}),children:i.oneOfType([i.element,i.node]),show:i.bool,animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),margin:i.shape({horizontal:i.number,vertical:i.number}),positionMode:i.oneOf(["fixed","absolute"]),scale:i.number,style:i.object,onClose:i.func,onPosition:i.func,onOpen:i.func},t.defaultProps={collision:{horizontal:y,vertical:b},anchorAlign:{horizontal:m,vertical:p},popupAlign:{horizontal:m,vertical:v},offset:ne,animate:!0,show:!1,margin:{horizontal:0,vertical:0},positionMode:"absolute"},t.contextType=u.$,t.displayName="PopupComponent",t}(r.Component),ie=function(){return ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ie.apply(this,arguments)},ae=r.createContext((function(e){return e})),se=r.forwardRef((function(e,t){var n=r.useContext(ae).call(void 0,e);return r.createElement(oe,ie({ref:t},n))}));se.displayName="Popup"},5362:(e,t,n)=>{n.r(t),n.d(t,{Popup:()=>r.G,PopupPropsContext:()=>r.v});var r=n(9222)},1779:(e,t,n)=>{n.d(t,{_:()=>i});var r=n(3899),o=n(9844),i=r.forwardRef((function(e,t){var n=r.useRef(null),i=r.useRef(null),a=r.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);r.useImperativeHandle(i,(function(){return{element:a()||null}})),r.useImperativeHandle(t,(function(){return i.current})),r.useImperativeHandle(e.childRef,(function(){return n.current}));var s=r.useCallback((function(t){e.onPress&&e.onPress({element:a(),target:i.current,event:t})}),[a,e.onPress]),l=r.useCallback((function(t){e.onRelease&&e.onRelease({element:a(),target:i.current,event:t})}),[a,e.onRelease]),c=r.useCallback((function(t){e.onDragStart&&e.onDragStart({element:a(),target:i.current,event:t})}),[e,a]),u=r.useCallback((function(t){e.onDrag&&e.onDrag({element:a(),target:i.current,event:t})}),[a,e.onDrag]),d=r.useCallback((function(t){e.onDragEnd&&e.onDragEnd({element:a(),target:i.current,event:t})}),[a,e.onDragEnd]);return(0,o.O)(n,{onPress:s,onRelease:l,onDragStart:c,onDrag:u,onDragEnd:d},{mouseOnly:e.mouseOnly,autoScroll:e.autoScroll,hint:e.hint,scrollContainer:e.scrollContainer}),e.children?r.cloneElement(r.Children.only(e.children),{ref:n}):null}));i.displayName="KendoReactDraggable"},3503:(e,t,n)=>{n.d(t,{O:()=>o});var r=function(){return"undefined"!=typeof document?document:{}},o=function(){function e(){this.scrollbar=0}return Object.defineProperty(e.prototype,"scrollbarWidth",{get:function(){var e=r();if(!this.scrollbar&&e&&e.createElement){var t=e.createElement("div");t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",t.innerHTML="&nbsp;",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!1,configurable:!0}),e}()},7827:(e,t,n)=>{n.d(t,{N:()=>r});var r=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)},8047:(e,t,n)=>{n.d(t,{A:()=>r});var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={},r=function(e){return"object"==typeof e?Object.keys(e).forEach((function(t){n[t]=e[t]})):n[e]=!0},o=function(e){return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?o(e):r(e)}))};return o(e),Object.keys(n).map((function(e){return n[e]&&e||null})).filter((function(e){return null!==e})).join(" ")}},8259:(e,t,n)=>{n.d(t,{$:()=>o,u:()=>i});var r=n(3899),o=r.createContext(0),i=function(){return r.useContext(o)};o.displayName="KendoReactZIndexContext"},2333:(e,t,n)=>{n.d(t,{Dg:()=>i,Gc:()=>a,Fg:()=>s,tk:()=>l});var r=n(3899),o=n(3228),i=r.createContext([void 0,o.Z]),a=r.createContext([void 0,o.Z]),s=r.createContext([[],o.Z,o.Z]),l=r.createContext([[],o.Z,o.Z])},5407:(e,t,n)=>{function r(e,t,n,r){if(e){var o={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(o,r))}}n.d(t,{N:()=>r})},4100:(e,t,n)=>{n.d(t,{E:()=>o});var r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function o(e){var t=[];return e.replace(r,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}},9124:(e,t,n)=>{n.d(t,{n:()=>r});var r=function(e){if(e){if((e instanceof HTMLInputElement||-1!==e.tabIndex)&&e.focus)return void e.focus();var t=e.querySelector('input, [tabindex]:not([tabindex="-1"])');t&&t.focus&&t.focus()}}},4703:(e,t,n)=>{n.d(t,{p:()=>r});var r=function(e,t,n){var r="string"==typeof e?parseInt(e,void 0):e;if(NaN!==r)return void 0!==r?r:t?n?void 0:-1:0}},9659:(e,t,n)=>{n.d(t,{Y:()=>i});var r=n(4100),o={};function i(e){if(o[e])return o[e];var t=(0,r.E)(e);return o[e]=function(e){for(var n=e,r=0;r<t.length&&n;r++)n=n[t[r]];return n},o[e]}o.undefined=function(){}},3198:(e,t,n)=>{n.d(t,{M:()=>r});var r=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n}},848:(e,t,n)=>{n.d(t,{Y:()=>a,u:()=>s});var r=n(3899),o=n(9656),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=function(){return r.createContext((function(e){return e}))},s=function(e,t){return r.forwardRef((function(n,a){var s=(0,o.Y)(e,n);return r.createElement(t,i({},s,{ref:a}))}))}},6059:(e,t,n)=>{n.d(t,{U:()=>i});var r=n(3899),o=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function i(e){var t=e.onFocus,n=e.onBlur,i=e.onSyncFocus,a=e.onSyncBlur,s=r.useRef(!1),l=r.useRef(0),c=r.useCallback((function(e){clearTimeout(l.current),l.current=window.setTimeout((function(){return e()}))}),[l]),u=r.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];clearTimeout(l.current),i&&i.call(void 0,e[0]),s.current||(s.current=!0,t&&t.call.apply(t,o([void 0],e,!1)))}),[s,t,i]),d=r.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a&&a.call(void 0,e[0]),c((function(){s.current&&n&&(s.current=!1,n.call.apply(n,o([void 0],e,!1)))}))}),[s,c,n,a]);return r.useEffect((function(){return function(){clearTimeout(l.current)}}),[]),{onFocus:u,onBlur:d}}},8199:(e,t,n)=>{n.d(t,{n:()=>o});var r=n(3899);function o(e,t,n){var o=r.useState(t),i=o[0],a=o[1];return r.useEffect((function(){if(!i&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&a(t)}}),n),i}},9844:(e,t,n)=>{n.d(t,{O:()=>g});var r,o=n(3899),i=function(){var e=window&&window.navigator.userAgent;if(!e)return!1;var t=!1,n=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var o in r)if(r.hasOwnProperty(o)&&(n=e.match(r[o]))){(t={})[o]=!0,t[n[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,t.version=parseInt(document.DOCUMENT_NODE||n[2],10);break}return t},a=function(e){return e&&e.ownerDocument||window.document},s=function(e){var t=i(),n=a(e);return t.edge||t.safari?n.body:n.documentElement},l=function(e){if(e&&e.className&&"string"==typeof e.className&&e.className.indexOf("k-auto-scrollable")>-1)return!0;var t=window.getComputedStyle(e,"overflow").overflow;return t.indexOf("auto")>-1||t.indexOf("scroll")>-1},c=function(e){var t=s(e);if(!e||e===document.body||e===document.documentElement)return t;for(var n=e;n&&n!==document.body&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&n.nodeType!==Node.DOCUMENT_NODE&&!l(n);)n=n.parentNode;return!n||n!==document.body&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?n:t};!function(e){e.POINTER_DOWN="pointerdown",e.POINTER_MOVE="pointermove",e.POINTER_UP="pointerup",e.POINTER_CANCEL="pointercancel",e.MOUSE_DOWN="mousedown",e.MOUSE_MOVE="mousemove",e.MOUSE_UP="mouseup",e.CONTEXT_MENU="contextmenu",e.TOUCH_START="touchstart",e.TOUCH_MOVE="touchmove",e.TOUCH_END="touchend",e.TOUCH_CANCEL="touchcancel",e.SCROLL="scroll",e.START="KENDO_DRAG_AND_DROP_START",e.MOVE="KENDO_DRAG_AND_DROP_MOVE",e.END="KENDO_DRAG_AND_DROP_END",e.CANCEL="KENDO_DRAG_AND_DROP_CANCEL"}(r||(r={}));var u=function(){},d=function(e,t,n){void 0===n&&(n={});var o,i,l,d,p,f=n.onIsPressedChange,h=void 0===f?u:f,m=n.onIsScrollingChange,g=void 0===m?u:m,v=n.onVelocityChange,y=void 0===v?u:v,b=n.onOffsetChange,k=void 0===b?u:b,w=n.onPageOffsetChange,C=void 0===w?u:w,x=n.onClientOffsetChange,O=void 0===x?u:x,S=n.onScrollOffsetChange,E=void 0===S?u:S,I=n.onInitialScrollOffsetChange,N=void 0===I?u:I,T=t.payload,M=T.element,D=T.hint,R=e.autoScrollDirection,P=e.scrollableParent,_=function(e,t){return function(e){return/^touch/.test(e.type)}(e)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,offsetX:t.offset.x,offsetY:t.offset.y,type:e.type,originalEvent:e,isTouch:!0,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:function(e){return/^(scroll)/.test(e.type)}(e)?{pageX:t.pageOffset.x,pageY:t.pageOffset.y,clientX:t.clientOffset.x,clientY:t.clientOffset.y,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,offsetX:t.offset.x,offsetY:t.offset.y,type:e.type,originalEvent:e,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,originalEvent:e}}(t.event,e);switch(_.type){case r.POINTER_DOWN:if(_.type===r.POINTER_DOWN&&(!_.originalEvent.isPrimary||0!==_.originalEvent.button))break;case r.MOUSE_DOWN:if(_.type===r.MOUSE_DOWN&&_.originalEvent.which&&_.originalEvent.which>1||e.ignoreMouse)break;case r.TOUCH_START:if(_.type===r.TOUCH_START&&1!==_.originalEvent.touches.length)break;case r.START:var A=P||c(t.payload.element);N(A instanceof Window?{x:A.scrollX,y:A.scrollY}:{x:A.scrollLeft,y:A.scrollTop}),O({x:_.clientX,y:_.clientY}),C({x:_.pageX,y:_.pageY}),k({x:_.offsetX,y:_.offsetY}),h(!0),T.onPress&&T.onPress(_);break;case r.SCROLL:if(_.type===r.SCROLL&&!e.pressed)break;var j=P||c(M),F=j instanceof Window?{x:j.scrollX,y:j.scrollY}:{x:j.scrollLeft,y:j.scrollTop};_.scrollX=F.x-e.initialScrollOffset.x,_.scrollY=F.y-e.initialScrollOffset.y,E({x:_.scrollX,y:_.scrollY});case r.POINTER_MOVE:if(_.type===r.POINTER_MOVE&&!_.originalEvent.isPrimary)break;case r.MOUSE_MOVE:case r.TOUCH_MOVE:if(_.type===r.TOUCH_MOVE&&1!==_.originalEvent.touches.length)break;case r.MOVE:if(e.pressed){if(e.autoScroll&&"scroll"!==_.originalEvent.type&&M){var z=a(M),L=P||c(z.elementFromPoint(_.clientX,_.clientY)),B=(o=_.clientX,i=_.clientY,l=function(e,t){var n=s(e);if(e===n)return{top:n.scrollTop,left:n.scrollLeft,bottom:n.scrollTop+t.innerHeight,right:n.scrollLeft+t.innerWidth};var r=e.getBoundingClientRect();return{bottom:r.top+r.height,right:r.left+r.width,left:r.left,top:r.top}}(L,function(e){var t=a(e);return t&&t.defaultView||window}(M)),d={x:0,y:0},p=50,o-l.left<p?d.x=-(p-(o-l.left)):l.right-o<p&&(d.x=p-(l.right-o)),i-l.top<p?d.y=-(p-(i-l.top)):l.bottom-i<p&&(d.y=p-(l.bottom-i)),d);y({x:R&&!1===R.horizontal?0:B.x,y:R&&!1===R.vertical?0:B.y}),g(0!==B.y||0!==B.x)}!e.drag&&T.onDragStart&&T.onDragStart(_),T.onDrag&&T.onDrag(_);var V=function(e,t){var n=0,r=null;return t.forEach((function(t){if(t&&e){var o=function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=Math.max(r.top,n.top),i=Math.max(r.left,n.left),a=Math.min(r.left+r.width,n.left+n.width),s=Math.min(r.top+r.height,n.top+n.height),l=a-i,c=s-o;if(i<a&&o<s){var u=r.width*r.height,d=n.width*n.height,p=l*c;return Number((p/(u+d-p)).toFixed(4))}return 0}(e,t);o>n&&(n=o,r=t)}})),r}(D||M,e.drops.map((function(e){return e&&e.element})).filter((function(e){return e!==(D||M)}))),H=e.drops.find((function(e){return e.element===V}));H&&V&&function(e,t,n){var r=n.getBoundingClientRect();return r.top<=t&&r.left<=e&&t<=r.bottom&&e<=r.right}(_.clientX,_.clientY,P||c(V))&&V!==M?(e.drop&&e.drop.element)!==V?(e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(_),H.onDragEnter&&H.onDragEnter(_)):H.onDragOver&&H.onDragOver(_):e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(_)}O({x:_.clientX,y:_.clientY}),C({x:_.pageX,y:_.pageY});break;case r.POINTER_UP:if(_.type===r.POINTER_UP&&!_.originalEvent.isPrimary)break;case r.MOUSE_UP:case r.TOUCH_END:if(_.type===r.TOUCH_END&&1!==_.originalEvent.touches.length)break;case r.END:h(!1),g(!1),E({x:0,y:0}),T.onRelease&&T.onRelease(_),e.drop&&e.drop.onDrop&&e.drop.onDrop(_),T.onDragEnd&&T.onDragEnd(_);break;case r.POINTER_CANCEL:case r.CONTEXT_MENU:case r.TOUCH_CANCEL:case r.CANCEL:h(!1),g(!1),E({x:0,y:0}),T.onDragEnd&&T.onDragEnd(_),e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(_)}},p=function(e,t){if(e){var n,r;e===s(e)?(n=document.body.scrollHeight>window.innerHeight,r=document.body.scrollWidth>window.innerWidth):(n=e.offsetHeight<=e.scrollHeight,r=e.offsetWidth<=e.scrollWidth);var o=e.scrollTop+t.y,i=n&&o>0&&o<e.scrollHeight,a=e.scrollLeft+t.x,l=r&&a>0&&a<e.scrollWidth;i?e.scrollTop+=t.y:n&&o<0&&(e.scrollTop=0),l?e.scrollLeft+=t.x:r&&a<0&&(e.scrollLeft=0)}},f=n(3228),h=n(4912),m=n(2333);function g(e,t,n){void 0===n&&(n={});var r=t.onPress,i=void 0===r?f.Z:r,a=t.onRelease,s=void 0===a?f.Z:a,l=t.onDragStart,u=void 0===l?f.Z:l,g=t.onDrag,v=void 0===g?f.Z:g,y=t.onDragEnd,b=void 0===y?f.Z:y,k=n.hint,w=void 0===k?null:k,C=n.mouseOnly,x=void 0!==C&&C,O=n.autoScroll,S=void 0===O||O,E=n.scrollContainer,I=void 0===E?null:E,N=o.useState(!1),T=N[0],M=N[1],D=o.useState(!1),R=D[0],P=D[1],_=(0,h.W)(m.Gc)[0],A=(0,h.W)(m.Dg),j=A[0],F=A[1],z=o.useContext(m.tk)[0],L=o.useContext(m.Fg),B=L[0],V=L[1],H=L[2],K=o.useRef({x:0,y:0}),W=o.useRef(),$=o.useRef(!1),q=o.useRef(),U=o.useRef(null),G=o.useRef(!1),Y=o.useRef({x:0,y:0}),X=o.useRef({x:0,y:0}),J=o.useRef({x:0,y:0}),Z=o.useRef({x:0,y:0}),Q=o.useRef({x:0,y:0}),ee=o.useRef({x:0,y:0}),te=Boolean("undefined"!=typeof window&&window.PointerEvent),ne=!x&&te,re=o.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),oe=o.useCallback((function(){return w&&w.current&&w.current.element?w.current.element:w?w.current:null}),[w]),ie=o.useCallback((function(){return I&&I.current&&I.current.element?I.current.element:I?I.current:null}),[I]),ae=o.useCallback((function(){return"object"==typeof S&&S.boundaryElementRef&&S.boundaryElementRef.current&&S.boundaryElementRef.current.element?S.boundaryElementRef.current.element:"object"==typeof S&&S.boundaryElementRef&&S.boundaryElementRef.current?S.boundaryElementRef.current:null}),[S]),se=o.useRef(null);o.useImperativeHandle(se,(function(){return{element:re(),hint:oe(),onPress:ke,onDragStart:Ce,onDrag:xe,onDragEnd:Oe,onRelease:we,data:e.current}}));var le=o.useCallback((function(){var e=re();return e&&e.ownerDocument||document}),[re]),ce=o.useCallback((function(){var e=le();return e&&e.defaultView||window}),[le]),ue=o.useCallback((function(){return{drag:j?j.current:null,drop:_?_.current:null,drags:B.map((function(e){return e.current})),drops:z.map((function(e){return e.current})),pressed:T,ignoreMouse:$.current,scrollOffset:Q.current,offset:Y.current,pageOffset:X.current,initialScrollOffset:ee.current,clientOffset:J.current,initialClientOffset:Z.current,velocity:K.current,autoScroll:Boolean("object"==typeof S?!1!==S.enabled:S),scrollableParent:ae(),autoScrollDirection:"object"==typeof S?S.direction:{horizontal:!0,vertical:!0},isScrolling:R}}),[j,_,B,z,T,S,ae,R]),de=o.useCallback((function(e){M(e)}),[]),pe=o.useCallback((function(e){P(e)}),[]),fe=o.useCallback((function(e){K.current=e}),[]),he=o.useCallback((function(e){Y.current=e}),[]),me=o.useCallback((function(e){J.current=e}),[]),ge=o.useCallback((function(e){X.current=e}),[]),ve=o.useCallback((function(e){Z.current=e}),[]),ye=o.useCallback((function(e){Q.current=e}),[]),be=o.useCallback((function(e){ee.current=e}),[]),ke=o.useCallback((function(e){i(e)}),[i]),we=o.useCallback((function(e){s(e)}),[s]),Ce=o.useCallback((function(t){F(se,{target:e.current,event:t}),u(t)}),[F,e,u]),xe=o.useCallback((function(e){v(e)}),[v]),Oe=o.useCallback((function(t){G.current||(F(null,{target:e.current,event:t}),b(t))}),[b,F,e]),Se=o.useCallback((function(e){d(ue(),{event:e,payload:se.current},{onVelocityChange:fe,onOffsetChange:he,onClientOffsetChange:me,onPageOffsetChange:ge,onInitialClientOffsetChange:ve,onScrollOffsetChange:ye,onInitialScrollOffsetChange:be,onIsPressedChange:de,onIsScrollingChange:pe})}),[ue,fe,he,ge,me,ve,be,de,ye,pe]),Ee=o.useCallback((function(e){Se(e)}),[Se]),Ie=o.useCallback((function(e){Se(e)}),[Se]),Ne=o.useCallback((function(e){Se(e)}),[Se]),Te=o.useCallback((function(e){Se(e)}),[Se]),Me=o.useCallback((function(e){Se(e)}),[Se]),De=o.useCallback((function(e){Se(e)}),[Se]),Re=o.useCallback((function(e){Se(e)}),[Se]),Pe=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),_e=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),Ae=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),je=o.useCallback((function(e){if(0===e.touches.length&&1===e.changedTouches.length){var t=ce();$.current=!0,q.current=t.setTimeout((function(){$.current=!1}),2e3)}Se(e)}),[Se,ce]),Fe=o.useCallback((function(e){Se(e)}),[Se]),ze=o.useCallback((function(){var e=re();if(e){var t=e.style.touchAction;return e.style.touchAction="none",function(){e.style.touchAction=t}}}),[re]),Le=o.useCallback((function(){return V(se),function(){H(se)}}),[H,V]);o.useEffect((function(){var e=ce();if(R){var t=ie()||c(document.elementFromPoint(J.current.x,J.current.y));e.clearInterval(W.current),W.current=e.setInterval((function(){p(t,{x:K.current.x,y:K.current.y})}),50)}return function(){e.clearInterval(W.current)}}),[re,ie,ce,R]),o.useEffect(ze,[ze]),o.useEffect((function(){var e=ce(),t=re(),n=le();return ne?(t&&(U.current=c(t),U.current&&U.current.addEventListener("scroll",Fe,{passive:!0}),t.addEventListener("pointerdown",Ee,{passive:!0})),T&&(n.addEventListener("pointermove",Ie),n.addEventListener("pointerup",Te,!0),n.addEventListener("contextmenu",Pe),n.addEventListener("pointercancel",Ne,{passive:!0}))):(e.addEventListener("touchmove",f.Z,{capture:!1,passive:!1}),t&&(t.addEventListener("mousedown",Me,{passive:!0}),x||(t.addEventListener("touchstart",_e,{passive:!0}),T&&(t.addEventListener("touchmove",Ae,{passive:!0}),t.addEventListener("touchend",je,{passive:!0})))),T&&(n.addEventListener("mousemove",De,{passive:!0}),n.addEventListener("mouseup",Re,{passive:!0}))),function(){U.current&&U.current.removeEventListener("scroll",Fe),t&&(t.removeEventListener("pointerdown",Ee),t.removeEventListener("mousedown",Me),t.removeEventListener("touchstart",_e),t.removeEventListener("touchmove",Ae),t.removeEventListener("touchend",je)),n.removeEventListener("pointermove",Ie),n.removeEventListener("pointerup",Te,!0),n.removeEventListener("contextmenu",Pe),n.removeEventListener("pointercancel",Ne),n.removeEventListener("mousemove",De),n.removeEventListener("mouseup",Re),e.removeEventListener("touchmove",f.Z),e.clearTimeout(q.current)}}),[T,ce,re,le,x,ne,Pe,Me,De,Re,Ne,Ee,Ie,Te,je,Ae,_e,Fe]),o.useEffect((function(){return function(){G.current=!0}}),[]),o.useLayoutEffect(Le,[Le])}},4912:(e,t,n)=>{n.d(t,{W:()=>o});var r=n(3899),o=function(e,t){var n=r.useContext(e),o=n[0],i=n[1],a=r.useState(t),s=a[0],l=a[1];return[void 0!==o?o:s,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];void 0!==o?i.apply(void 0,e):l(e[0])}]}},3322:(e,t,n)=>{n.d(t,{i:()=>o});var r=n(3899),o=function(e,t,n){void 0===n&&(n={});var o=r.useCallback((function(r){n.onMouseDown&&n.onMouseDown.call(void 0,r),e.onMouseDown&&e.onMouseDown.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseDown,e.onMouseDown,t]),i=r.useCallback((function(r){n.onMouseUp&&n.onMouseUp.call(void 0,r),e.onMouseUp&&e.onMouseUp.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseUp,e.onMouseUp,t]);return{onClick:r.useCallback((function(r){n.onClick&&n.onClick.call(void 0,r),e.onClick&&e.onClick.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onClick,e.onClick,t]),onMouseUp:i,onMouseDown:o,onDoubleClick:r.useCallback((function(r){n.onDoubleClick&&n.onDoubleClick.call(void 0,r),e.onDoubleClick&&e.onDoubleClick.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onDoubleClick,e.onDoubleClick,t]),onMouseEnter:r.useCallback((function(r){n.onMouseEnter&&n.onMouseEnter.call(void 0,r),e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseEnter,e.onMouseEnter,t]),onMouseLeave:r.useCallback((function(r){n.onMouseLeave&&n.onMouseLeave.call(void 0,r),e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseLeave,e.onMouseLeave,t]),onMouseMove:r.useCallback((function(r){n.onMouseMove&&n.onMouseMove.call(void 0,r),e.onMouseMove&&e.onMouseMove.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseMove,e.onMouseMove,t]),onMouseOut:r.useCallback((function(r){n.onMouseOut&&n.onMouseOut.call(void 0,r),e.onMouseOut&&e.onMouseOut.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseOut,e.onMouseOut,t]),onMouseOver:r.useCallback((function(r){n.onMouseOver&&n.onMouseOver.call(void 0,r),e.onMouseOver&&e.onMouseOver.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseOver,e.onMouseOver,t])}}},9656:(e,t,n)=>{n.d(t,{Y:()=>o});var r=n(3899),o=function(e,t){return r.useContext(e)(t)}},1573:(e,t,n)=>{n.d(t,{V:()=>o});var r=n(3899);function o(e,t,n){var o=r.useState(t),i=o[0],a=o[1];return r.useEffect((function(){if(!i&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&a(t)}}),n),i}},3493:(e,t,n)=>{n.d(t,{R:()=>r});var r={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46}},3808:(e,t,n)=>{n.r(t),n.d(t,{AsyncFocusBlur:()=>P,BrowserSupportService:()=>o.O,COLLECTION_ACTION:()=>E,DragAndDrop:()=>de,Draggable:()=>pe._,Droppable:()=>me,FormComponent:()=>m,Icon:()=>q,Keys:()=>b.R,SvgIcon:()=>Y,Typography:()=>se,ZIndexContext:()=>r.$,canUseDOM:()=>i.N,canUseRef:()=>a,classNames:()=>s.A,clone:()=>u,cloneArray:()=>f,cloneDate:()=>c,cloneObject:()=>d,cloneValue:()=>p,createPropsContext:()=>_.Y,dispatchEvent:()=>M.N,extendDataItem:()=>I.u5,focusFirstFocusableChild:()=>h.n,getItemPath:()=>I.ym,getScrollbarWidth:()=>w.n,getTabIndex:()=>g.p,getter:()=>v.Y,guid:()=>y.M,hasRelativeStackingContext:()=>T,kendoThemeMaps:()=>ve.G,mapTree:()=>I.Gy,mapTreeItem:()=>I.eY,noop:()=>k.Z,setScrollbarWidth:()=>w.p,setter:()=>S,useAsyncFocusBlur:()=>D.U,useCollection:()=>B,useCustomComponent:()=>z,useDir:()=>A.n,useDocument:()=>V,useDraggable:()=>ge.O,useDroppable:()=>he,useMouse:()=>F.i,usePropsContext:()=>L.Y,useRtl:()=>j.V,useWindow:()=>H,useZIndexContext:()=>r.u,validatePackage:()=>N.s,withPropsContext:()=>_.u});var r=n(8259),o=n(3503),i=n(7827),a=function(e){return"string"!=typeof Comment&&(function(e){return Boolean("function"==typeof e&&!!e.prototype.isReactComponent)}(e)||function(e){return Boolean(e.$$typeof&&"function"==typeof e.render)}(e))},s=n(8047),l=n(3899),c=function(e){return e?new Date(e.getTime()):null};function u(e){var t={};return d(e,t),t}function d(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[n]=p(r,t[n])}}function p(e,t){if(Array.isArray(e))return f(e);if(e instanceof Date)return c(e);if(l.isValidElement(e))return l.cloneElement(e,e.props);if(e&&"object"==typeof e){var n=t||{};return d(e,n),n}return e}function f(e){return e.map((function(e){return p(e,void 0)}))}var h=n(9124),m=function(){},g=n(4703),v=n(9659),y=n(3198),b=n(3493),k=n(3228),w=n(2665),C=n(4100),x={undefined:function(e){return e}},O=function(e,t){return t&&t.arrays&&!isNaN(Number(e))?[]:{}};function S(e){if(x[e])return x[e];var t=(0,C.E)(e);return x[e]=function(e,n,r){for(var o=e,i=t.length-1,a=0;a<i&&o;a++)o=o[t[a]]=o[t[a]]||O(t[a+1],r);o[t[i]]=n},x[e]}var E,I=n(8006),N=n(4006),T=function(e){if(!i.N)return!1;var t=e?e.ownerDocument:document;if(!t||!t.body)return!1;var n=t.createElement("div");n.style.transform="matrix(10, 0, 0, 10, 0, 0)";var r=t.createElement("div");r.appendChild(t.createTextNode("child")),r.style.position="fixed",r.style.top="10px",n.appendChild(r),t.body.appendChild(n);var o=10!==r.getBoundingClientRect().top;return t.body.removeChild(n),o},M=n(5407),D=n(6059),R=function(){return R=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},R.apply(this,arguments)},P=function(e){var t=e.children,n=e.onFocus,r=e.onBlur,o=e.onSyncFocus,i=e.onSyncBlur,a=(0,D.U)({onFocus:n,onBlur:r,onSyncFocus:o,onSyncBlur:i});return l.createElement(l.Fragment,null,t.call(void 0,R({},a)))},_=n(848),A=n(8199),j=n(1573),F=n(3322),z=function(e){return[e,{}]},L=n(9656);!function(e){e[e.add=0]="add",e[e.remove=1]="remove"}(E||(E={}));var B=function(e){void 0===e&&(e=[]);var t=l.useRef(e),n=l.useCallback((function(e){switch(e.type){case E.add:t.current.push(e.item);break;case E.remove:var n=t.current.indexOf(e.item);t.current.splice(n,1)}}),[]);return[t.current,n]},V=function(e){var t=l.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]);return l.useCallback((function(){var e=t();return e&&e.ownerDocument||document}),[t])},H=function(e){var t=V(e);return l.useCallback((function(){var e=t();return e&&e.defaultView||window}),[t])},K=n(189),W={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},$=function(){return $=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},$.apply(this,arguments)},q=l.forwardRef((function(e,t){var n=e.className,r=e.name,o=e.themeColor,i=e.size,a=e.flip,c=e.style,u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["className","name","themeColor","size","flip","style"]),d=l.useRef(null),p=l.useRef(null);l.useImperativeHandle(d,(function(){return{element:p.current}})),l.useImperativeHandle(t,(function(){return d.current}));var f=l.useMemo((function(){return o||U.themeColor}),[o]),h=l.useMemo((function(){return i||U.size}),[i]),m=l.useMemo((function(){return a||U.flip}),[a]),g=l.useMemo((function(){return(0,s.A)("k-icon","k-i-"+r,"k-color-"+f,{"k-flip-h":"horizontal"===m||"both"===m,"k-flip-v":"vertical"===m||"both"===m},W[h],n)}),[r,f,h,m,n]),v=(0,F.i)(e,d);return l.createElement("span",$({ref:p},u,v,{className:g,style:c,role:"presentation"}))}));q.propTypes={style:K.object,classNames:K.string,name:K.string,themeColor:K.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:K.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:K.oneOf(["default","horizontal","vertical","both"])};var U={size:"default",themeColor:"inherit",flip:"default"};q.displayName="KendoIcon";var G=function(){return G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},G.apply(this,arguments)},Y=l.forwardRef((function(e,t){var n=e.children,r=e.className,o=e.svgClassName,i=e.icon,a=e.flip,c=e.size,u=e.style,d=e.svgStyle,p=e.themeColor,f=e.viewBox,h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),m=l.useRef(null);l.useImperativeHandle(t,(function(){return{element:m.current}}));var g=l.useMemo((function(){return i?i.name:X.icon}),[i]),v=l.useMemo((function(){return p||X.themeColor}),[p]),y=l.useMemo((function(){return c||X.size}),[c]),b=l.useMemo((function(){return a||X.flip}),[a]),k=l.useMemo((function(){return f||X.viewBox}),[f]),w=l.useMemo((function(){return(0,s.A)("k-svg-icon","k-color-"+v,"k-svg-i-"+g,{"k-flip-h":"horizontal"===b||"both"===b,"k-flip-v":"vertical"===b||"both"===b},W[y],r)}),[g,v,y,b,r]),C=l.useMemo((function(){return e.width&&e.height?G({width:e.width,height:e.height},u):e.width?G({width:e.width,height:e.width},u):e.height?G({width:e.height,height:e.height},u):G({},u)}),[e.width,e.height,u]);return l.createElement("span",{className:w,style:C,ref:m},l.createElement("svg",G({className:o,style:d,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:i?i.viewBox:k,dangerouslySetInnerHTML:i?{__html:i.content}:void 0},h),i?void 0:n))}));Y.propTypes={style:K.object,classNames:K.string,children:K.any,icon:K.object,themeColor:K.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:K.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:K.oneOf(["default","horizontal","vertical","both"])};var X={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};Y.displayName="KendoSvgIcon";var J={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},Z={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},Q={xsmall:"k-m-xs",small:"k-m-sm",medium:"k-m-md",large:"k-m-lg",xlarge:"k-m-xl",thin:"k-m-thin",hair:"k-m-hair"},ee={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},te={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},ne={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},re={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},oe={inherit:"k-color-inherit",primary:"k-color-primary",secondary:"k-color-secondary",tertiary:"k-color-tertiary",info:"k-color-info",success:"k-color-success",warning:"k-color-warning",error:"k-color-error",dark:"k-color-dark",light:"k-color-light",inverse:"k-color-inverse"},ie=function(){return ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ie.apply(this,arguments)},ae=function(e){var t=l.forwardRef((function(t,n){var r=t.id,o=t.style,i=t.className,a=t.fontSize,s=t.fontWeight,c=t.textAlign,u=t.textTransform,d=t.themeColor,p=t.margin,f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["id","style","className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),h=l.useRef(null),m=l.useRef(null);l.useImperativeHandle(h,(function(){return{element:m.current,props:t}})),l.useImperativeHandle(n,(function(){return h.current}));var g=e;return l.createElement(g,ie({id:r,ref:m,className:["k-".concat("p"===e?"paragraph":e),J[a],Z[s],ne[c],re[u],oe[d],function(){if(void 0!==p){if("string"==typeof p)return[Q[p]];if("number"==typeof p&&p>=0&&p<=24)return["k-m-".concat(p)];if("object"==typeof p){var e=[];return Object.keys(p).forEach((function(t){var n,r,o;null!==p[t]&&void 0!==p[t]&&e.push((n=t,o="string"==typeof(r=p[t])?ee[r]:r,"".concat(te[n]).concat(o)))})),e.join(" ")}}}(),i].filter((function(e){return void 0!==e})).join(" "),style:o},f),t.children)}));return t.propTypes={style:K.object,className:K.string,fontSize:K.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:K.oneOf(["light","normal","bold"]),margin:K.oneOfType([K.number,K.object,K.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:K.oneOf(["left","right","center","justify"]),textTransform:K.oneOf(["lowercase","uppercase","capitalize"]),themeColor:K.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},t.displayName="KendoReactTypography".concat(e.toUpperCase()),t},se={h1:ae("h1"),h2:ae("h2"),h3:ae("h3"),h4:ae("h4"),h5:ae("h5"),h6:ae("h6"),p:ae("p"),code:ae("code"),pre:ae("pre")},le=function(){return le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},le.apply(this,arguments)},ce=function(e,t,n){var r=l.useState(t||e),o=r[0],i=r[1];return[void 0!==t?t:o,l.useCallback((function(e,t){i(e),n&&n.call(void 0,le(le({},t),{value:e}))}),[n,i])]},ue=n(2333),de=function(e){var t=ce(null,void 0),n=t[0],r=t[1],o=ce(null,void 0),i=o[0],a=o[1],s=B([]),c=s[0],u=s[1],d=B([]),p=d[0],f=d[1];return l.createElement(ue.Dg.Provider,{value:[n,r]},l.createElement(ue.Gc.Provider,{value:[i,a]},l.createElement(ue.Fg.Provider,{value:[c,function(e){u({type:E.add,item:e})},function(e){u({type:E.remove,item:e})}]},l.createElement(ue.tk.Provider,{value:[p,function(e){f({type:E.add,item:e})},function(e){f({type:E.remove,item:e})}]},e.children))))};de.displayName="KendoReactDragAndDrop";var pe=n(1779),fe=n(4912);function he(e,t){void 0===t&&(t={onDragEnter:k.Z,onDragOver:k.Z,onDragLeave:k.Z,onDrop:k.Z});var n=t.onDragEnter,r=void 0===n?k.Z:n,o=t.onDragOver,i=void 0===o?k.Z:o,a=t.onDragLeave,s=void 0===a?k.Z:a,c=t.onDrop,u=void 0===c?k.Z:c,d=(0,fe.W)(ue.Gc)[1],p=l.useContext(ue.tk),f=p[1],h=p[2],m=l.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),g=l.useRef(null);l.useImperativeHandle(g,(function(){return{element:m(),onDragEnter:v,onDragOver:y,onDragLeave:b,onDrop:w,data:e.current}}));var v=l.useCallback((function(t){d(g,{target:e.current,event:t}),r(t)}),[d,e,r]),y=l.useCallback((function(e){i(e)}),[i]),b=l.useCallback((function(t){d(null,{target:e.current,event:t}),s(t)}),[d,e,s]),w=l.useCallback((function(t){d(null,{target:e.current,event:t}),u(t)}),[d,e,u]),C=l.useCallback((function(){return f(g),function(){h(g)}}),[h,f]);l.useLayoutEffect(C,[C])}var me=l.forwardRef((function(e,t){var n=l.useRef(null),r=l.useRef(null),o=l.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);l.useImperativeHandle(r,(function(){return{element:o()||void 0}})),l.useImperativeHandle(t,(function(){return r.current})),l.useImperativeHandle(e.childRef,(function(){return n.current}));var i=l.useCallback((function(t){e.onDragEnter&&e.onDragEnter({element:o(),target:r.current,event:t})}),[e.onDragEnter,o]),a=l.useCallback((function(t){e.onDragOver&&e.onDragOver({element:o(),target:r.current,event:t})}),[o,e.onDragOver]),s=l.useCallback((function(t){e.onDragLeave&&e.onDragLeave({element:o(),target:r.current,event:t})}),[e.onDragLeave,o]),c=l.useCallback((function(t){e.onDrop&&e.onDrop({element:o(),target:r.current,event:t})}),[e.onDrop,o]);return he(n,{onDragEnter:i,onDragOver:a,onDragLeave:s,onDrop:c}),e.children?l.cloneElement(l.Children.only(e.children),{ref:n}):null}));me.displayName="KendoReactDroppable";var ge=n(9844),ve=n(2697)},3228:(e,t,n)=>{n.d(t,{Z:()=>r});var r=function(){}},2665:(e,t,n)=>{n.d(t,{n:()=>i,p:()=>a});var r=n(3503),o=n(7827),i=function(){return!(!o.N||!document.body)&&(new r.O).scrollbarWidth},a=function(){if(!o.N||!document.body)return!1;var e=(new r.O).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width","".concat(e,"px"))}},2697:(e,t,n)=>{n.d(t,{G:()=>r});var r={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg"}}},8006:(e,t,n)=>{n.d(t,{Gy:()=>s,eY:()=>l,u5:()=>c,ym:()=>u});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function i(e,t,n){var i;return n?r(r({},e),((i={})[t]=n.length?o([],n,!0):void 0,i)):e&&e[t]?o([],e[t],!0):[]}function a(e,t,n){if(e[t]){var r=i(e,t).map((function(e){return a(e,t,n)}));return n(i(e,t,r))}return n(e)}var s=function(e,t,n){return o([],e.map((function(e){return a(e,t,n)})),!0)},l=function(e,t,n,r){for(var o=e,i=[],a=0;a<t.length;a++)o=o[t[a]],o=Array.isArray(o)?o:o[n],i.push(o);var s=i.length>1?i[i.length-2]:e,l=t[t.length-1],c=r(s[l]);s.splice(l,1,c)},c=function(e,t,n){var r;return Object.assign({},e,e[t]?((r={})[t]=e[t].slice(),r):{},n||{})},u=function(e,t,n){var r=[],i=o([],t,!0);if(i.length){var a=e[i.shift()||0];for(r.push(a);i.length&&n;)a=a[n][i.shift()||0],r.push(a)}return r}},4006:(e,t,n)=>{n.d(t,{s:()=>o});var r=n(9302);function o(e){if(void 0!==r)r.validatePackage(e);else{var t="License activation failed for ".concat(e.name,"\n");t+="The @progress/kendo-licensing script is not loaded.\n",t+="See ".concat(e.licensingDocsUrl," for more information.\n"),console.warn(t)}}},4407:e=>{e.exports=a},9302:e=>{e.exports=n},499:e=>{e.exports=o},189:e=>{e.exports=t},3899:t=>{t.exports=e},994:e=>{e.exports=r},3209:e=>{e.exports=s},6144:e=>{e.exports=i}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return l[e].call(n.exports,n,n.exports,u),n.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return(()=>{var e=d;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDialogs=e.EditorUtils=e.EditorToolsSettings=e.EditorTools=e.Editor=e.ProseMirror=void 0;var t=u(1801);Object.defineProperty(e,"Editor",{enumerable:!0,get:function(){return t.Editor}});var n=u(8671);Object.defineProperty(e,"EditorTools",{enumerable:!0,get:function(){return n.EditorTools}});var r=u(2804);Object.defineProperty(e,"EditorToolsSettings",{enumerable:!0,get:function(){return r.EditorToolsSettings}});var o=u(5538);Object.defineProperty(e,"EditorUtils",{enumerable:!0,get:function(){return o.EditorUtils}});var i=u(3695);Object.defineProperty(e,"EditorDialogs",{enumerable:!0,get:function(){return i.EditorDialogs}});var a=u(431);e.ProseMirror={Selection:a.Selection,SelectionRange:a.SelectionRange,TextSelection:a.TextSelection,NodeSelection:a.NodeSelection,AllSelection:a.AllSelection,EditorState:a.EditorState,Plugin:a.Plugin,PluginKey:a.PluginKey,Transaction:a.Transaction,Decoration:a.Decoration,DecorationSet:a.DecorationSet,EditorView:a.EditorView,Node:a.Node,ResolvedPos:a.ResolvedPos,NodeRange:a.NodeRange,Fragment:a.Fragment,Slice:a.Slice,ReplaceError:a.ReplaceError,Mark:a.Mark,Schema:a.Schema,NodeType:a.NodeType,MarkType:a.MarkType,ContentMatch:a.ContentMatch,DOMParser:a.DOMParser,DOMSerializer:a.DOMSerializer,Transform:a.Transform,Step:a.Step,StepResult:a.StepResult,joinPoint:a.joinPoint,canJoin:a.canJoin,canSplit:a.canSplit,insertPoint:a.insertPoint,dropPoint:a.dropPoint,liftTarget:a.liftTarget,findWrapping:a.findWrapping,StepMap:a.StepMap,MapResult:a.MapResult,Mapping:a.Mapping,AddMarkStep:a.AddMarkStep,RemoveMarkStep:a.RemoveMarkStep,ReplaceStep:a.ReplaceStep,ReplaceAroundStep:a.ReplaceAroundStep,replaceStep:a.replaceStep,deleteSelection:a.deleteSelection,joinBackward:a.joinBackward,selectNodeBackward:a.selectNodeBackward,joinForward:a.joinForward,selectNodeForward:a.selectNodeForward,joinUp:a.joinUp,joinDown:a.joinDown,lift:a.lift,newlineInCode:a.newlineInCode,exitCode:a.exitCode,createParagraphNear:a.createParagraphNear,liftEmptyBlock:a.liftEmptyBlock,splitBlock:a.splitBlock,splitBlockKeepMarks:a.splitBlockKeepMarks,selectParentNode:a.selectParentNode,selectAll:a.selectAll,wrapIn:a.wrapIn,setBlockType:a.setBlockType,toggleMark:a.toggleMark,autoJoin:a.autoJoin,chainCommands:a.chainCommands,pcBaseKeymap:a.pcBaseKeymap,macBaseKeymap:a.macBaseKeymap,baseKeymap:a.baseKeymap,history:a.history,undo:a.undo,redo:a.redo,undoDepth:a.undoDepth,redoDepth:a.redoDepth,InputRule:a.InputRule,inputRules:a.inputRules,undoInputRule:a.undoInputRule,emDash:a.emDash,ellipsis:a.ellipsis,openDoubleQuote:a.openDoubleQuote,closeDoubleQuote:a.closeDoubleQuote,openSingleQuote:a.openSingleQuote,closeSingleQuote:a.closeSingleQuote,smartQuotes:a.smartQuotes,wrappingInputRule:a.wrappingInputRule,textblockTypeInputRule:a.textblockTypeInputRule,keymap:a.keymap,keydownHandler:a.keydownHandler,orderedList:a.orderedList,bulletList:a.bulletList,listItem:a.listItem,addListNodes:a.addListNodes,wrapInList:a.wrapInList,splitListItem:a.splitListItem,liftListItem:a.liftListItem,sinkListItem:a.sinkListItem,dropCursor:a.dropCursor,gapCursor:a.gapCursor,tableEditing:a.tableEditing,fixTables:a.fixTables,fixTablesKey:a.fixTablesKey,cellAround:a.cellAround,isInTable:a.isInTable,selectionCell:a.selectionCell,moveCellForward:a.moveCellForward,inSameTable:a.inSameTable,findCell:a.findCell,colCount:a.colCount,nextCell:a.nextCell,removeColSpan:a.removeColSpan,addColSpan:a.addColSpan,columnIsHeader:a.columnIsHeader,tableNodes:a.tableNodes,tableNodeTypes:a.tableNodeTypes,CellSelection:a.CellSelection,TableMap:a.TableMap,tableEditingKey:a.tableEditingKey,columnResizing:a.columnResizing,columnResizingPluginKey:a.columnResizingPluginKey,updateColumnsOnResize:a.updateColumnsOnResize,selectedRect:a.selectedRect,addColumn:a.addColumn,addColumnBefore:a.addColumnBefore,addColumnAfter:a.addColumnAfter,deleteColumn:a.deleteColumn,rowIsHeader:a.rowIsHeader,addRow:a.addRow,addRowBefore:a.addRowBefore,addRowAfter:a.addRowAfter,deleteRow:a.deleteRow,mergeCells:a.mergeCells,splitCell:a.splitCell,splitCellWithType:a.splitCellWithType,setCellAttr:a.setCellAttr,toggleHeader:a.toggleHeader,toggleHeaderRow:a.toggleHeaderRow,toggleHeaderColumn:a.toggleHeaderColumn,toggleHeaderCell:a.toggleHeaderCell,goToNextCell:a.goToNextCell,deleteTable:a.deleteTable}})(),d})()}));