@progress/kendo-editor-common
Advanced tools
Comparing version 0.7.0-dev.202009091415 to 1.0.0-dev.202009101248
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-editor-common",["tslib","prosemirror-commands","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-history","prosemirror-inputrules","prosemirror-keymap","prosemirror-tables","prosemirror-transform","prosemirror-model","prosemirror-schema-list","prosemirror-view","prosemirror-state"],function(L){var a,i,s,l,u,c,d,f,p,m,g,v,h;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){a=t(e)},function(e){i=t(e)},function(e){s=t(e)},function(e){l=t(e)},function(e){u=t(e)},function(e){c=t(e)},function(e){d=t(e)},function(e){f=t(e)},function(e){p=t(e)},function(e){m=t(e)},function(e){g=t(e)},function(e){v=t(e)},function(e){h=t(e)}],execute:function(){function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,o;o={},r.m=n=[function(e,t){e.exports=h},function(e,t){e.exports=a},function(e,t){e.exports=m},function(e,u,t){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var i=t(2),r=t(0),v=t(6),h=t(7),s=t(19);u.changeStylesString=function(e,t){var n=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};var a=e.split(/\s*;\s*/).filter(function(e){return Boolean(e)}),i=a.filter(function(e){var t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===n&&r.test(t[1]))});return o&&i.push(n+": "+o),{style:i.join("; ")+(i.length?";":""),changed:Boolean(o)||i.length!==a.length}},u.changeStyle=function(m,g){return function(e,t,n){var r=e.selection,o=r.empty,a=r.$cursor,i=r.ranges;if(o&&!a||!v.markApplies(e.doc,i,m))return!1;var s=!1;if(t)if(n=n||e.tr,a){var l,u=e.storedMarks||a.marks();m.isInSet(u)&&(l=h.changeStyleFromMark(u,g),t(n.removeStoredMark(m)),t(n.addStoredMark(m.create({style:l.style}))),s=!0)}else{for(var c=0;c<i.length;c++)var d=i[c],f=d.$from,p=d.$to,s=h.changeStyleMark(n,f.pos,p.pos,g,m);s&&(n.scrollIntoView(),t(n))}return s}},u.canInsert=function(e,t){for(var n=e.selection.$from,r=n.depth;0<=r;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1},u.getTypeName=function(e){return e instanceof i.Node?e.type.name:e.name},u.findNthParentNode=function(o,a){return void 0===a&&(a=1),function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(o(r)&&0==--a)return{depth:n,node:r}}}},u.findNthParentNodeOfType=function(t,n){return void 0===n&&(n=1),function(e){return u.findNthParentNode(function(e){return u.getTypeName(e)===u.getTypeName(t)},n)(e)}},u.insertNode=function(r,o){return function(e,t){var n=e.tr.replaceSelectionWith(r);o&&n.scrollIntoView(),t(n)}},u.hasSameMarkup=function(e,t,n,r){var o=i.Fragment.from(s.parseContent(e,n,r)),a=i.Fragment.from(s.parseContent(t,n,r));return o.eq(a)},u.getSelectionText=function(e){var t=e.selection;if(t instanceof r.TextSelection||t instanceof r.AllSelection){var n=t.content().content;return n.textBetween(0,n.size)}return""},u.getNodeFromSelection=function(e){if(e.selection instanceof r.NodeSelection)return e.selection.node},u.selectedLineTextOnly=function(e){var t="",n=!1,r=e.selection,o=e.doc,a=r.$from,i=r.$to,s=r.from,l=r.to;return a.sameParent(i)&&(o.nodesBetween(s,l,function(e){n=n||e.isLeaf&&!e.isText}),n||(t=u.getSelectionText(e))),t},u.indentHtml=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$/,"")}},function(e,t){e.exports=p},function(e,t){e.exports=v},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var n=t(4),v=t(2);g.markApplies=function(a,i,s){for(var e=0;e<i.length;e++){var t=function(e){var t=i[e],n=t.$from,r=t.$to,o=0===n.depth&&a.type.allowsMarkType(s);if(a.nodesBetween(n.pos,r.pos,function(e){return!o&&void(o=e.inlineContent&&e.type.allowsMarkType(s))}),o)return{v:!0}}(e);if(t)return t.v}return!1},g.toggleMark=function(f,p,m){return function(e,t){var n=e.selection,r=n.empty,o=n.$cursor,a=n.ranges;if(r&&!o||!g.markApplies(e.doc,a,f))return!1;if(t)if(o)f.isInSet(e.storedMarks||o.marks())?t(m.removeStoredMark(f)):t(m.addStoredMark(f.create(p)));else{for(var i=!1,s=0;!i&&s<a.length;s++)var l=a[s],u=l.$from,c=l.$to,i=e.doc.rangeHasMark(u.pos,c.pos,f);for(s=0;s<a.length;s++){var d=a[s],u=d.$from,c=d.$to;i?m.removeMark(u.pos,c.pos,f):m.addMark(u.pos,c.pos,f.create(p))}t(m.scrollIntoView())}return!0}},g.removeMark=function(t,c,d,f){void 0===f&&(f=null);var p=[],m=0;return t.doc.nodesBetween(c,d,function(e,t){if(e.isInline){m++;var n,r=null;if(f instanceof v.MarkType?(n=f.isInSet(e.marks))&&(r=[n]):f?f.isInSet(e.marks)&&(r=[f]):r=e.marks,r&&r.length)for(var o=Math.min(t+e.nodeSize,d),a=0;a<r.length;a++){for(var i=r[a],s=void 0,l=0;l<p.length;l++){var u=p[l];u.step===m-1&&i.eq(u.style)&&(s=u)}s?(s.to=o,s.step=m):p.push({style:i,from:Math.max(t,c),to:o,step:m})}}}),p.forEach(function(e){return t.step(new n.RemoveMarkStep(e.from,e.to,e.style))}),t},g.removeMarks=function(o,t,n,a){var e=t.selection,r=e.$cursor,i=e.ranges;if(a=a||t.tr,r)o.forEach(function(e){e.isInSet(t.storedMarks||r.marks())&&n(a.removeStoredMark(e))});else{for(var s=0;s<i.length;s++)!function(e){var t=i[e],n=t.$from,r=t.$to;o.forEach(function(e){g.removeMark(a,n.pos,r.pos,e)})}(s);n(a.scrollIntoView())}return!0},g.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,u=void 0===t?[]:t;return function(e,t){var r,n=e.schema,o=e.selection,a=o.empty,i=o.ranges,s=e.tr,l=(u instanceof Array?u:[u]).map(function(e){return e.name});a||(r=Object.keys(n.marks).map(function(e){return n.marks[e]}).filter(function(e){return-1===l.indexOf(e.name)}),i.forEach(function(e){var t=e.$from,n=e.$to;r.forEach(function(e){return s.removeMark(t.pos,n.pos,e)})}),t(s))}},g.hasMark=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter(function(e){return r[e]}),a=t.altStyle,i=e.selection,s=i.from,l=i.$from,u=i.to,c=i.empty,d=r[t.mark],f=e.doc,p=!1;return!(p=c?(n=e.storedMarks||l.marks(),d&&d.isInSet(n)||o.some(function(e){return r[e].isInSet(n)})):d&&f.rangeHasMark(s,u,d)||o.some(function(e){return f.rangeHasMark(s,u,r[e])}))&&a?g.selectionMarks(e,e.schema.marks.style).some(function(e){return null!==g.styleValue(e,a)}):Boolean(p)},g.styleValue=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},g.selectionMarks=function(e,t){var n=e.selection,r=n.from,o=n.$from,a=n.to,i=[];return n.empty?i.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(r,a,function(e){e.isInline&&i.push(t.isInSet(e.marks))}),i},g.getMark=function(e,t){var n=g.selectionMarks(e,t),r=n.filter(function(e){return Boolean(e)});return n.length===r.length?n[0]:void 0},g.getActiveMarks=function(e,t){var n=g.selectionMarks(e,t),r=n.filter(function(e){return Boolean(e)});return{hasNodesWithoutMarks:n.length!==r.length,marks:r}}},function(e,x,t){"use strict";Object.defineProperty(x,"__esModule",{value:!0});var T=t(1),I=t(4),v=t(3),y=t(6);x.changeStyleFromMark=function(e,t){var n=e.find(function(e){return"style"===e.type.name}),r=n&&n.attrs.style;return v.changeStylesString(r,t)},x.changeStyleMark=function(t,g,v,h,y){var k=y.create({style:h.style}),M=[],_=[],b=null,S=null;return t.doc.nodesBetween(g,v,function(e,t,n){if(e.isInline){var r=e.marks;if(!k.isInSet(r)&&n.type.allowsMarkType(k.type)){var o=Math.max(t,g),a=Math.min(t+e.nodeSize,v),i=x.changeStyleFromMark(r,h);if(i.changed||h.newValue){for(var s=i.changed?{style:i.style||null}:{style:[h.style]+": "+h.newValue+";"},l=y.isInSet(r)?r.find(function(e){return"style"===e.type.name}):null,u=l?T.__assign({},l.attrs,s):s,c=y.create(u),d=c.addToSet(r),f=0;f<r.length;f++)r[f].isInSet(d)||(b&&b.to===o&&b.mark.eq(r[f])?b.to=a:(b=new I.RemoveMarkStep(o,a,r[f]),M.push(b)));var p=S&&S.to===o,m=p&&c.attrs.style===S.mark.attrs.style;p&&m?S.to=a:Object.keys(u).some(function(e){return null!==u[e]})&&(S=new I.AddMarkStep(o,a,c),_.push(S))}}}}),M.forEach(function(e){return t.step(e)}),_.forEach(function(e){return t.step(e)}),0<M.length+_.length},x.getInlineStyles=function(e,t){return y.selectionMarks(e,e.schema.marks.style).map(function(e){return y.styleValue(e,t)}).filter(function(e){return null!==e})},x.changeStyle=function(v,h){return function(e,t,n){var r=e.selection,o=r.empty,a=r.$cursor,i=r.ranges;if(o&&!a||!y.markApplies(e.doc,i,v))return!1;var s=!1;if(t)if(n=n||e.tr,a){var l,u,c,d=e.storedMarks||a.marks();v.isInSet(d)&&(l=x.changeStyleFromMark(d,h),u=d.find(function(e){return"style"===e.type.name}),c=T.__assign({},u?u.attrs:{},{style:l.style||null}),t(n.removeStoredMark(v)),Object.keys(c).some(function(e){return null!==c[e]})&&t(n.addStoredMark(v.create(c))),s=!0)}else{for(var f=0;f<i.length;f++)var p=i[f],m=p.$from,g=p.$to,s=x.changeStyleMark(n,m.pos,g.pos,h,v);s&&(n.scrollIntoView(),t(n))}return s}},x.toggleInlineFormat=function(f,p,m){return function(t,e){var n=t.schema.marks,r=f.altStyle,o=f.altMarks,a=void 0===o?[]:o,i=f.mark;p=p||t.tr;function s(){return c=!0}var l,u=!1,c=!1;r&&n.style&&(l=n.style,u=x.changeStyle(l,{style:r.name,value:r.value})(t,s,p));var d=[i].concat(a).filter(function(e){return n[e]}).map(function(e){return y.hasMark(t,{mark:e})&&n[e]}).filter(function(e){return e});return d.length?y.removeMarks(d,t,s,p):u||y.toggleMark(n[i],m,p)(t,s),c&&e(p),c}},x.applyInlineStyle=function(m,g){return function(e,t){var n=e.schema.marks.style,r={style:m.style,value:/^.+$/,newValue:m.value},o=e.tr;g&&o.setMeta("commandName",g),o.setMeta("args",m);var a=e.selection,i=a.empty,s=a.$cursor,l=a.ranges;if(i&&!s||!y.markApplies(e.doc,l,n))return!1;if(s){var u,c=e.storedMarks||s.marks(),d=n.isInSet(c)?c.find(function(e){return"style"===e.type.name}):null,f={style:null};d&&d.attrs.style?(u=v.changeStylesString(d.attrs.style,r)).changed&&u.style&&(f.style=u.style):r.newValue&&(f.style=[r.style]+": "+r.newValue+";");var p=d?T.__assign({},d.attrs,f):f;return Object.keys(p).some(function(e){return null!==p[e]})?t(o.addStoredMark(n.create(p))):t(o.removeStoredMark(n)),!0}return x.changeStyle(n,r)(e,t,o)}}},function(e,t){e.exports=i},function(e,t){e.exports=g},function(e,d,t){"use strict";Object.defineProperty(d,"__esModule",{value:!0});var f=t(1),a=t(3),v=t(4),h=t(2);d.changeBlockNode=function(o,e,d,f,p,m){var t=o.selection,n=t.from,r=t.to,a=!1;if(o.doc.nodesBetween(n,r,function(e,t){return!a&&void(e.isTextblock&&!e.hasMarkup(p,m)&&(a=e.type===p||(r=(n=o.doc.resolve(t)).index(),n.parent.canReplaceWith(r,r+1,p))));var n,r}),!a)return!1;if(e){if(!p.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var g=d.steps.length;d.doc.nodesBetween(n,r,function(e,t){if(e.eq(f)&&e.isTextblock&&!e.hasMarkup(p,m)&&(i=d.doc,s=d.mapping.slice(g).map(t),l=p,u=i.resolve(s),c=u.index(),u.parent.canReplaceWith(c,c+1,l))){d.clearIncompatible(d.mapping.slice(g).map(t,1),p);var n=d.mapping.slice(g),r=n.map(t,1),o=n.map(t+e.nodeSize,1),a=new h.Slice(h.Fragment.from(p.create(m,null,e.marks)),0,0);return d.step(new v.ReplaceAroundStep(r,o,r+1,o-1,a,1,!0)),!1}var i,s,l,u,c})}return!0},d.blockNodes=function(e){var t=e.selection,n=t.from,r=t.to,o=t.$from,a=[];return t.node?t.node.isBlock?a.push(t.node):o.parent&&o.parent.isBlock&&a.push(o.parent):e.doc.nodesBetween(n,r,function(e){e.isBlock&&a.push(e)}),a},d.formatBlockElements=function(c,t){return function(a,i){var e=d.blockNodes(a),s=a.schema.nodes,l=!1,u=a.tr;return u.setMeta("commandName",t),u.setMeta("args",{value:c}),e.forEach(function(e){var t,n,r,o;e.type.isTextblock&&("p"===c?(r=(t=e.attrs).level,o=f.__rest(t,["level"]),l=d.changeBlockNode(a,i,u,e,s.paragraph,o)||l):/^h[1-6]$/i.test(c)?(r=parseInt(c.substr(1),10),l=d.changeBlockNode(a,i,u,e,s.heading,f.__assign({},e.attrs,{level:r}))||l):"blockquote"===c&&(r=(n=e.attrs).level,o=f.__rest(n,["level"]),l=d.changeBlockNode(a,i,u,e,s.blockquote,o)||l))}),l&&i(u.scrollIntoView()),l}},d.getBlockFormats=function(e){var t=d.blockNodes(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&&r.push("blockquote")}),r},d.addStyles=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=a.changeStylesString(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})},d.hasNode=function(e,t){var n=e.selection,r=n.from,o=n.to,a=!1;return e.doc.nodesBetween(r,o,function(e){return!(a=a||e.type===t)}),a},d.parentBlockFormat=function(e){var t=d.getBlockFormats(e);return 1===new Set(t).size?t[0]:null},d.activeNode=function(e){return{tag:d.parentBlockFormat(e)||""}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function k(e){return/^MsoListParagraph/.test(e.className)}function M(e){var t=e.innerHTML;return(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")}function _(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n}function b(e){function t(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")}var n,r,o,a=(a=e.innerHTML).replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," ");return/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(a)?{tag:"ul",style:(o=t(M(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(o)?null:/^o/.test(o)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(a)?{tag:"ol",style:(n=t(M(e)),r=null,/^\d/.test(n)||(r=(/^[a-z]/.test(n)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(n)?"roman":"alpha")),r)}:void 0}var r=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e,n){var r=[];Array.from(e).forEach(function(e){var t;e.nodeType===Node.ELEMENT_NODE&&((t=e).getAttribute("datalist")?(r.push(e),n.add(r)):k(t)&&r.length?r.push(e):(r=[],"DIV"===t.nodeName?o(t.children,n):"TABLE"===t.nodeName&&Array.from(t.querySelectorAll("td,th")).forEach(function(e){o(e.children,n)})))})};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=e.replace(r,function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e});var n=new Set;return o(t.children,n),n.forEach(function(e){for(var t,n,r,o,a,i,s,l,u,c,d,f=-1,p={},m=0;m<e.length;m++){var g,v,h=(d={datalist:(l=e[m]).getAttribute("datalist"),datalevel:l.getAttribute("datalevel")}).datalist,y=b(l);(u=y&&y.tag)?(v=d.datalevel||parseFloat(l.style.marginLeft||0),(d.datalevel||l.style.marginLeft)&&(g=u+h,p[v]||(p[v]={}),(!n||n<0)&&(n=v,r=h,o=(s=e.filter(function(e){return e.getAttribute("datalist")===String(r)}))[s.length-1],i=_(u,y&&y.style),l.parentNode.insertBefore(i,l),p[f=v][g]=i),a=o===l,c=p[v][g],(f<v||!c)&&(c=_(u,y&&y.style),p[v][g]=c,t.appendChild(c)),t=function(e){var t,n=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),t=1===e.childNodes.length?e.firstChild.nodeType===Node.TEXT_NODE?M(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),"p"!==n?"<"+n+">"+e.innerHTML+"</"+n+">":e.innerHTML),e.parentNode.removeChild(e);var r=document.createElement("li");return r.innerHTML=t,r}(l),c.appendChild(t),a?n=f=-1:f=v)):!t||a&&!k(l)||(l.style.marginLeft&&(l.style.marginLeft=""),l.style.marginLeft&&(l.style.margin=""),t.appendChild(l))}}),t.innerHTML}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bold={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},t.italic={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},t.underline={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},t.strikethrough={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},t.subscript={mark:"sub"},t.superscript={mark:"sup"},t.link={mark:"link"},t.unlink={mark:"link"}},function(e,t){e.exports=c},function(e,t){e.exports=u},function(e,t){e.exports=f},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t(1),p=t(2),m=t(0),g=t(4),v=t(8),h=t(9),a=t(17);function y(p){return function(e,t,n){if(!n)return!1;var r,o,a,i=(e=n.state).schema.nodes[p.listType],s=e.selection,l=s.$from,u=s.$to,c=l.node(-2),d=l.node(-3),f=(r=e.doc,o=i,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;1<=t.depth;)(r=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==n.indexOf(r.type.name)&&(o=t);return o}(e,t).depth,a=e.resolve(t.start(o));a.pos<=n.start(n.depth);){var i=Math.min(a.depth,o),s=a.node(i);if(s&&r.push(s),0===i)break;var l=e.resolve(a.after(i));if(l.start(i)>=e.nodeSize-2)break;l.depth!==a.depth&&(l=e.resolve(l.pos+2)),a=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return r}(r,l,u).filter(function(e){return e.type!==o}).length);return(c&&c.type===i||d&&d.type===i)&&f?k(p)(e,t):(f||(k(p)(e,t),e=n.state),a=i,v.autoJoin(h.wrapInList(a),function(e,t){return e.type===t.type&&e.type===a})(e,t))}}function k(s){return function(a,e){var i=a.tr,t=a.selection,n=t.$from,r=t.$to;return i.doc.nodesBetween(n.pos,r.pos,function(e,t){if(e.isTextblock||"blockquote"===e.type.name||"div"===e.type.name){var n=new m.NodeSelection(i.doc.resolve(i.mapping.map(t))),r=n.$from.blockRange(n.$to);if(!r||n.$from.parent.type!==a.schema.nodes[s.listItem])return!1;var o=r&&g.liftTarget(r);if(null==o)return!1;i.lift(r,o)}}),e&&e(i),!0}}r.toggleList=function(e,t,n,r,o){var a=r.listType,i=e.selection,s=i.$from.node(i.$from.depth-2),l=i.$to.node(i.$to.depth-2);if(s&&s.type.name===a&&l&&l.type.name===a){var u=n.state.schema.nodes,c={bulletList:u[r.bulletList],orderedList:u[r.orderedList],listItem:u[r.listItem]},d=function(e){for(var t,n=c.bulletList,r=c.orderedList,o=c.listItem,a=e.depth-1;0<a;a--){var i=e.node(a);if(i.type!==n&&i.type!==r||(t=a),i.type!==n&&i.type!==r&&i.type!==o)break}return t}(i.$to),f=function(i,s,e,l,u,c){c=c||i.schema.nodes.listItem;var d=!1;return u.doc.nodesBetween(s,e,function(e,t){if(!d&&e.type===c&&s<t){d=!0;for(var n=l+3;l+2<n;){var r=u.doc.resolve(u.mapping.map(t)),n=r.depth,o=u.doc.resolve(u.mapping.map(t+e.textContent.length)),a=new m.TextSelection(r,o);u=function(e,t,n,r){r=r||e.schema.nodes.listItem;var o=t.$from,a=t.$to,i=o.blockRange(a,function(e){return e.childCount&&e.firstChild.type===r});if(!i||i.depth<2||o.node(i.depth-1).type!==r)return n;var s=i.end,l=a.end(i.depth);return s<l&&(n.step(new g.ReplaceAroundStep(s-1,l,s,l,new p.Slice(p.Fragment.from(r.create(void 0,i.parent.copy())),1,0),1,!0)),i=new p.NodeRange(n.doc.resolve(o.pos),n.doc.resolve(l),i.depth)),n.lift(i,g.liftTarget(i)).scrollIntoView()}(i,a,u,c)}}}),u}(e,i.$to.pos,i.$to.end(d),d,n.state.tr,c.listItem);return(f=function(e,t,n){var r=e.selection,o=r.from,a=r.to,i=e.schema.nodes,s=i.paragraph,l=i.heading,u=[];t.doc.nodesBetween(o,a,function(e,t){e.type!==s&&e.type!==l||u.push({node:e,pos:t})});for(var c=u.length-1;0<=c;c--){var d,f,p=u[c],m=t.doc.resolve(t.mapping.map(p.pos));0<m.depth&&(d=void 0,d=p.node.textContent&&0<p.node.textContent.length?t.doc.resolve(t.mapping.map(p.pos+p.node.textContent.length)):t.doc.resolve(t.mapping.map(p.pos+1)),(f=m.blockRange(d))&&t.lift(f,function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],a=e.nodes[n.orderedList],i=e.nodes[n.listItem],s=t.depth;0<s;s--){var l=t.node(s);if(l.type!==o&&l.type!==a||(r=s),l.type!==o&&l.type!==a&&l.type!==i)break}return r-1}(e.schema,m,n)))}return t}(e,f,r)).setMeta("commandName",o),t(f),!0}return y(r)(e,t,n)},r.toggleUnorderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:a.bulletList.listType},a.bulletList.types))},r.toggleOrderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:a.orderedList.listType},a.orderedList.types))},r.splitListItemKeepMarks=function(e){return function(n,r){return h.splitListItem(e)(n,function(e){var t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();t&&e.ensureMarks(t),r(e)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:r.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:r.__assign({},t.listsTypes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(17);t.indentRules={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:r.__assign({},o.listsTypes)},t.outdentRules={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:r.__assign({},o.listsTypes)}},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var i=t(2),s=t(0);a.parseContent=function(e,t,n){var r=document.createElement("template"),o="content"in r?(r.innerHTML=e,r.content):(new DOMParser).parseFromString(e,"text/html").body||document.createDocumentFragment();return i.DOMParser.fromSchema(t).parse(o,n)},a.getHtml=function(e){var t=i.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),n=document.createElement("div");return n.appendChild(t),n.innerHTML},a.setHtml=function(n,r,o){return void 0===r&&(r="setHTML"),void 0===o&&(o={preserveWhitespace:"full"}),function(e,t){return t(e.tr.setSelection(new s.AllSelection(e.doc)).replaceSelectionWith(a.parseContent(n,e.schema,o)).setMeta("commandName",r))}}},function(e,t){e.exports=d},function(e,t){e.exports=l},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(5);t.textHighlightKey=new r.PluginKey("highlight"),t.textHighlight=function(e){return void 0===e&&(e=t.textHighlightKey),new r.Plugin({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 o.Decoration.inline(e.from,e.to,e.attrs)});return o.DecorationSet.create(e.doc,t)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),l=n(5),u=/\s+/g,c=/text-align/;t.spacesFix=function(){return new r.Plugin({key:new r.PluginKey("spaces-fix"),props:{decorations:function(e){var r,o,a,i,s=[],t=e.doc;return t.nodesBetween(0,t.content.size,function(e,t,n){if(e.type.isText&&c.test(n&&n.attrs&&n.attrs.style||""))for(o=u.exec(e.text||"");null!==o;){if(r=t+o.index,a=o[0].length,o.index+a<o.input.length)for(i=0;i<=a-1;i+=2)s.push(l.Decoration.inline(r+i,r+i+1,{style:"white-space: normal"}));o=u.exec(e.text||"")}}),l.DecorationSet.create(t,s)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=n(5);t.placeholder=function(e){var o={class:"k-placeholder","data-placeholder":e};return new r.Plugin({key:new r.PluginKey("placeholder"),props:{decorations:function(e){var t=e.doc,n=t.content.firstChild;if(!(0===t.childCount||1===t.childCount&&n.inlineContent&&0===n.childCount))return a.DecorationSet.empty;var r=[];return t.descendants(function(e,t){r.push(a.Decoration.node(t,t+e.nodeSize,o))}),a.DecorationSet.create(t,r)}}})}},function(e,u,t){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var c=t(1),M=t(0);u.findAt=function(i,e,s,l,u){var c,d,f,p,m,g,v=[],h=[],t=e.matchCase,y=e.matchWord,n=e.useRegExp,r=e.text;if(n&&(/^\\$/.test(r)||/[^\\]\\$/.test(r))&&(r=r.substring(0,r.length-1)),!r)return v;var o=t?"g":"gi",k=n?new RegExp(r,o):b(r,o);return i.nodesBetween(s,l,function(e,a,t){return!u(v)&&void(e.inlineContent&&a+e.content.size>=s&&(h.length=0,e.nodesBetween(0,e.content.size,function(e,t,n,r){if(u(v))return!1;var o=1+a+t;if(e.isText&&o+e.nodeSize>=s){if(m=e.text||"",g=n.childCount-1>=r+1&&n.child(r+1),h.push(s<=o?{text:m,start:o}:{text:m.slice(s-o),start:s}),g&&g.isText)return;for(d=h.map(function(e){return e.text}).join(""),c=k.exec(d);null!==c&&(f=h[0].start+c.index,p=f+c[0].length,s<=f&&p<=l&&_(c,y)&&v.push(M.TextSelection.create(i,f,p)),!u(v));)c=k.exec(d)}else h.length=0})))}),v},u.find=function(e,t){var n=t.backward,r=t.matchCyclic,o=c.__rest(t,["backward","matchCyclic"]),a=n?function(){return!1}:function(e){return 0<e.length},i=e.doc,s=e.selection,l=[];return n?!(l=u.findAt(i,o,0,s.from,a)).length&&r&&(l=u.findAt(i,o,s.from,i.content.size,a)):!(l=u.findAt(i,o,s.to,i.content.size,a)).length&&r&&(l=u.findAt(i,o,0,s.to,a)),l.length?l[l.length-1]:null},u.findAll=function(e,t){return u.findAt(e,t,0,e.content.size,function(){return!1})},u.replace=function(e,t,n){var r=e.from,o=e.to;return n.insertText(t,r,o).setSelection(M.TextSelection.create(n.doc,r,r+t.length)),n},u.replaceAll=function(e,t,n){var r=u.findAll(e.doc,n);if(0===r.length)return null;for(var o=e.tr,a=r.length-1;0<=a;a--)o.insertText(t,r[a].from,r[a].to);return o};var a=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,_=function(e,t){if(t){if(!0!==t)return t(e);var n=e.input,r=n.charAt(e.index-1),o=n.charAt(e.index+e[0].length);return a.test(r)&&a.test(o)}return!0},b=function(e,t){var n=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(n,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,n){for(var r,o=e.table,a=e.table_row,i=e.table_cell,s=[],l=0;l<t+1;l++){r=[];for(var u=0;u<n+1;u++)r.push(i.createAndFill());s.push(a.createAndFill(void 0,r))}return o.createAndFill(void 0,s)}},function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=t(11);i.sanitize=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,"")},i.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},i.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},i.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},i.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&i.removeAttribute(e)};var s=/\s*;\s*/,l=/\s*:\s*/;i.sanitizeStyleAttr=function(e){var n,r,t=e.value.split(s).filter(function(e){return Boolean(e)}),o=e.ownerElement.style,a="";t.forEach(function(e){var t=e.split(l);n=t[0],r=t[1],void 0!==o[n]&&(a+=n+": "+r+"; ")}),(a=a.trim())?e.value=a:i.removeAttribute(e)},i.pasteCleanup=function(e,t){var n,r=e;return t.convertMsLists&&(r=o.convertMsLists(r)),t.stripTags&&(r=i.removeTag(r,t.stripTags)),t.attributes&&((n=document.createElement("div")).innerHTML=r,Array.from(n.querySelectorAll("*")).forEach(function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e.attributes.length-1;0<=n;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)}),r=n.innerHTML),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),a=n(14),i=n(13),r=n(16),s=n(12),l=n(7),u="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var n,t,r={};return r["Mod-z"]=a.undo,r["Shift-Mod-z"]=a.redo,r.Backspace=o.chainCommands(i.undoInputRule,o.deleteSelection,o.joinBackward,o.selectNodeBackward),r.Enter=o.chainCommands(o.newlineInCode,o.createParagraphNear,o.liftEmptyBlock,o.splitBlockKeepMarks),u||(r["Mod-y"]=a.redo),e.marks.strong&&(r["Mod-b"]=l.toggleInlineFormat(s.bold)),e.marks.em&&(r["Mod-i"]=l.toggleInlineFormat(s.italic)),e.marks.underline&&(r["Mod-u"]=l.toggleInlineFormat(s.underline)),e.nodes.hard_break&&(n=e.nodes.hard_break,t=o.chainCommands(o.exitCode,function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0}),r["Shift-Enter"]=t),r},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=r.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n}function o(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return 1}function a(e,t){var n,r={};for(n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r}function i(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t}var s=n(1),l=n(15),u=["blockquote",0],c=["hr"],d=["pre",["code",0]],f=["ol",0],p=["ul",0],m=["li",0],g=s.__assign({link:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:r}],toDOM:function(e){return["a",a(e.attrs),0]}}},i("strong"),i("b"),i("em"),i("i"),i("u"),i("del"),i("sub"),i("sup"),i("code"),{style:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["span",a(e.attrs),0]:["span",0]}}});t.marks=g;var v=s.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["p",a(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["div",a(e.attrs),0]:["div",0]}},blockquote:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return u}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return c}},heading:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return s.__assign({},r(e),{level:1})}},{tag:"h2",getAttrs:function(e){return s.__assign({},r(e),{level:2})}},{tag:"h3",getAttrs:function(e){return s.__assign({},r(e),{level:3})}},{tag:"h4",getAttrs:function(e){return s.__assign({},r(e),{level:4})}},{tag:"h5",getAttrs:function(e){return s.__assign({},r(e),{level:5})}},{tag:"h6",getAttrs:function(e){return s.__assign({},r(e),{level:6})}}],toDOM:function(e){return o(e.attrs,"level")?["h"+e.attrs.level,a(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 d}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:s.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["img",a(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["br",a(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return s.__assign({},r(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?o(e.attrs,"order")?["ol",a(e.attrs,"order"),0]:f:["ol",s.__assign({},a(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["ul",a(e.attrs),0]:p}},list_item:{content:"block*",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["li",a(e.attrs),0]:m},defining:!0}},l.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){return{name:e,value:t}}t.alignLeftRules=[{node:"paragraph",style:[r("text-align","left")]},{node:"heading",style:[r("text-align","left")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]}],t.alignJustifyRules=[{node:"paragraph",style:[r("text-align","justify")]},{node:"heading",style:[r("text-align","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]}]},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var s=t(9),a=t(18),m=t(10),l=t(3);o.indentBlocks=function(f,t,p){return function(l,u){var e=m.blockNodes(l),c=l.tr,d=!1;return c.setMeta("commandName",t),e.forEach(function(t){var e,n,r,o,a,i,s;t.type.isTextblock&&(e=void 0,(n=f.find(function(e){return e.node===t.type.name}))&&(o={name:r="rtl"===p?n.rtlStyle:n.style,value:0<n.step?""+n.step+n.unit:""},t.attrs.style&&(a=new RegExp(r+":\\s?(\\d+)"+n.unit,"i"),(i=t.attrs.style.match(a))&&(s=(s=parseFloat(i[1])+n.step)<=0?"":s,o.value=""+s+(s?n.unit:""))),e=m.addStyles(t,[o])),e&&(d=m.changeBlockNode(l,u,c,t,t.type,e)||d))}),d&&u(c.scrollIntoView()),d}},o.isIndented=function(e,o,a){var i=!1;return m.blockNodes(e).forEach(function(t){var e,n,r;i||!t.type.isTextblock||!t.attrs.style||(e=o.find(function(e){return e.node===t.type.name}))&&(n="rtl"===a?e.rtlStyle:e.style,r=new RegExp(n+":\\s?\\d+"+e.unit,"i"),i=r.test(t.attrs.style))}),i},o.canIndentAsListItem=function(e,t){return s.sinkListItem(t)(e)},o.canOutdentAsListItem=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],a=!!l.findNthParentNodeOfType(r,2)(e.selection),i=!!l.findNthParentNodeOfType(o,2)(e.selection);return(a||i)&&s.liftListItem(n)(e)},o.canBeIndented=function(t,e){var n=t.schema.nodes,r=n[a.indentRules.listsTypes.listItem];return(o.isIndented(t,e.nodes)||a.indentRules.nodes.some(function(e){return n[e.node]&&m.hasNode(t,n[e.node])}))&&!m.hasNode(t,r)},o.indent=function(e,t){var n=e.schema.nodes[a.indentRules.listsTypes.listItem],r=o.canBeIndented(e,a.indentRules);o.canIndentAsListItem(e,n)?s.sinkListItem(n)(e,t):r&&o.indentBlocks(a.indentRules.nodes)(e,t)},o.outdent=function(e,t){var n=e.schema.nodes[a.outdentRules.listsTypes.listItem],r=o.canBeIndented(e,a.outdentRules);o.canOutdentAsListItem(e,a.outdentRules)?s.liftListItem(n)(e,t):r&&o.indentBlocks(a.outdentRules.nodes)(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=n(10);t.alignBlocks=function(s,t){return function(r,o){var e=l.blockNodes(r),a=r.tr;a.setMeta("commandName",t);var i=!1;return e.forEach(function(t){var e,n;t.type.isTextblock&&(e={},(n=s.find(function(e){return e.node===t.type.name}))&&(e=l.addStyles(t,n.style)),i=l.changeBlockNode(r,o,a,t,t.type,e)||i)}),i&&o(a.scrollIntoView()),i}},t.isAligned=function(e,n){var r=!1;return l.blockNodes(e).forEach(function(t){var e;r||!t.type.isTextblock||!t.attrs.style||(e=n.find(function(e){return e.node===t.type.name}))&&(r=e.style.every(function(e){return!!e.value&&new RegExp(e.name+":\\s?"+e.value,"i").test(t.attrs.style)}))}),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(3);t.insertImage=function(r){return function(e,t){var n=e.schema.nodes.image.createAndFill(r);o.insertNode(n)(e,function(e){return t(e.setMeta("commandName","insertImage").setMeta("args",r))})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(n){return function(e,t){t(e.tr.insertText(n.text,n.from,n.to))}}},function(e,f,t){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var m=t(7),h=t(6),p=t(0);f.removeLink=function(f,p){return function(e,t){var n=e.selection.$cursor;if(n){for(var r,o=n.parent,a=n.index(),i=e.schema.marks[f.mark],s=o.child(a).marks.find(function(e){return e.type===i}),l=o.childCount,u=n.pos-n.textOffset,c=o.child(a).nodeSize,d=void 0,d=a-1;0<=d&&s.isInSet(o.child(d).marks);)c+=r=o.child(d).nodeSize,u-=r,--d;for(d=a+1;d<l&&s.isInSet(o.child(d).marks);)c+=o.child(d).nodeSize,d+=1;t(h.removeMark(p||e.tr,u,u+c,s))}else m.toggleInlineFormat(f,p)(e,t)}},f.applyLink=function(e,u){var c=e.mark,d=e.attrs;return void 0===u&&(u="link"),function(e,t){var n=e.schema.marks,r=e.tr;u&&(r.setMeta("commandName",u),r.setMeta("args",d));function o(){return l=!0}var a,g,v,i,s,l=!1;return i=n[c],1===(s=h.selectionMarks(e,i)).length&&s[0]&&s[0]?(g={mark:c,attrs:d},v=r,function(e,n){var t=e.selection,r=t.$cursor,o=t.from,a=t.to,i=e.schema.marks[g.mark];if(r){for(var s,l=r.parent,u=r.index(),c=l.child(u).marks.find(function(e){return e.type===i}),d=l.childCount,f=r.pos-r.textOffset,p=l.child(u).nodeSize,m=void 0,m=u-1;0<=m&&c.isInSet(l.child(m).marks);)p+=s=l.child(m).nodeSize,f-=s,--m;for(m=u+1;m<d&&c.isInSet(l.child(m).marks);)p+=l.child(m).nodeSize,m+=1;v.removeMark(f,f+p,i),v.addMark(f,f+p,i.create(g.attrs)),n(v)}else v.doc.nodesBetween(o,a,function(e,t){e.isInline&&i.isInSet(e.marks)&&(v.removeMark(t,t+e.nodeSize,i),v.addMark(t,t+e.nodeSize,i.create(g.attrs)),n(v))})}(e,o)):(a=e,h.hasMark(e,{mark:c})&&(f.removeLink({mark:c,attrs:d},r)(e,o),a=p.EditorState.create({doc:r.doc,selection:r.selection})),(l?h.toggleMark(n[c],d,r):m.toggleInlineFormat({mark:c},r,d))(a,o)),l&&t(r),l}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(19);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;var a=n(7);t.applyInlineStyle=a.applyInlineStyle,t.getInlineStyles=a.getInlineStyles,t.toggleInlineFormat=a.toggleInlineFormat;var i=n(36);t.applyLink=i.applyLink,t.removeLink=i.removeLink;var s=n(35);t.insertText=s.insertText;var l=n(34);t.insertImage=l.insertImage;var u=n(33);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=n(10);t.hasNode=c.hasNode,t.activeNode=c.activeNode,t.formatBlockElements=c.formatBlockElements,t.getBlockFormats=c.getBlockFormats,t.parentBlockFormat=c.parentBlockFormat;var d=n(6);t.hasMark=d.hasMark,t.getMark=d.getMark,t.getActiveMarks=d.getActiveMarks,t.removeAllMarks=d.removeAllMarks,t.selectionMarks=d.selectionMarks;var f=n(32);t.indent=f.indent,t.canIndentAsListItem=f.canIndentAsListItem,t.outdent=f.outdent,t.canOutdentAsListItem=f.canOutdentAsListItem,t.isIndented=f.isIndented,t.canBeIndented=f.canBeIndented,t.indentBlocks=f.indentBlocks;var p=n(16);t.toggleOrderedList=p.toggleOrderedList,t.toggleUnorderedList=p.toggleUnorderedList,t.toggleList=p.toggleList;var m=n(3);t.hasSameMarkup=m.hasSameMarkup,t.getSelectionText=m.getSelectionText,t.getNodeFromSelection=m.getNodeFromSelection,t.selectedLineTextOnly=m.selectedLineTextOnly,t.canInsert=m.canInsert,t.insertNode=m.insertNode,t.indentHtml=m.indentHtml;var g=n(31);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignJustifyRules=g.alignJustifyRules,t.alignRemoveRules=g.alignRemoveRules;var v=n(18);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var h=n(30);t.nodes=h.nodes,t.marks=h.marks;var y=n(29);t.buildKeymap=y.buildKeymap,t.buildListKeymap=y.buildListKeymap;var k=n(12);t.bold=k.bold,t.italic=k.italic,t.underline=k.underline,t.strikethrough=k.strikethrough,t.subscript=k.subscript,t.superscript=k.superscript,t.link=k.link;var M=n(28);t.sanitize=M.sanitize,t.removeComments=M.removeComments,t.removeTag=M.removeTag,t.pasteCleanup=M.pasteCleanup,t.sanitizeClassAttr=M.sanitizeClassAttr,t.sanitizeStyleAttr=M.sanitizeStyleAttr,t.removeAttribute=M.removeAttribute;var _=n(11);t.convertMsLists=_.convertMsLists;var b=n(27);t.createTable=b.createTable;var S=n(26);t.find=S.find,t.findAt=S.findAt,t.findAll=S.findAll,t.replace=S.replace,t.replaceAll=S.replaceAll;var x=n(25);t.placeholder=x.placeholder;var T=n(24);t.spacesFix=T.spacesFix;var I=n(23);t.textHighlight=I.textHighlight,t.textHighlightKey=I.textHighlightKey,r.__exportStar(n(8),t),r.__exportStar(n(22),t),r.__exportStar(n(21),t),r.__exportStar(n(14),t),r.__exportStar(n(13),t),r.__exportStar(n(20),t),r.__exportStar(n(2),t),r.__exportStar(n(9),t),r.__exportStar(n(0),t),r.__exportStar(n(15),t),r.__exportStar(n(4),t),r.__exportStar(n(5),t),function(e){for(var t in e)L(t,e[t])}(t)}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=37)}}}); | ||
System.register("@progress/kendo-editor-common",["prosemirror-commands","tslib","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-history","prosemirror-inputrules","prosemirror-keymap","prosemirror-model","prosemirror-schema-list","prosemirror-state","prosemirror-tables","prosemirror-transform","prosemirror-view"],function(L){var a,i,s,l,u,c,d,f,p,m,g,v,h;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){a=t(e)},function(e){i=t(e)},function(e){s=t(e)},function(e){l=t(e)},function(e){u=t(e)},function(e){c=t(e)},function(e){d=t(e)},function(e){f=t(e)},function(e){p=t(e)},function(e){m=t(e)},function(e){g=t(e)},function(e){v=t(e)},function(e){h=t(e)}],execute:function(){function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,o;o={},r.m=n=[function(e,t){e.exports=m},function(e,t){e.exports=i},function(e,t){e.exports=f},function(e,u,t){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var i=t(2),r=t(0),v=t(6),h=t(7),s=t(19);u.changeStylesString=function(e,t){var n=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};var a=e.split(/\s*;\s*/).filter(function(e){return Boolean(e)}),i=a.filter(function(e){var t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===n&&r.test(t[1]))});return o&&i.push(n+": "+o),{style:i.join("; ")+(i.length?";":""),changed:Boolean(o)||i.length!==a.length}},u.changeStyle=function(m,g){return function(e,t,n){var r=e.selection,o=r.empty,a=r.$cursor,i=r.ranges;if(o&&!a||!v.markApplies(e.doc,i,m))return!1;var s=!1;if(t)if(n=n||e.tr,a){var l,u=e.storedMarks||a.marks();m.isInSet(u)&&(l=h.changeStyleFromMark(u,g),t(n.removeStoredMark(m)),t(n.addStoredMark(m.create({style:l.style}))),s=!0)}else{for(var c=0;c<i.length;c++)var d=i[c],f=d.$from,p=d.$to,s=h.changeStyleMark(n,f.pos,p.pos,g,m);s&&(n.scrollIntoView(),t(n))}return s}},u.canInsert=function(e,t){for(var n=e.selection.$from,r=n.depth;0<=r;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1},u.getTypeName=function(e){return e instanceof i.Node?e.type.name:e.name},u.findNthParentNode=function(o,a){return void 0===a&&(a=1),function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(o(r)&&0==--a)return{depth:n,node:r}}}},u.findNthParentNodeOfType=function(t,n){return void 0===n&&(n=1),function(e){return u.findNthParentNode(function(e){return u.getTypeName(e)===u.getTypeName(t)},n)(e)}},u.insertNode=function(r,o){return function(e,t){var n=e.tr.replaceSelectionWith(r);o&&n.scrollIntoView(),t(n)}},u.hasSameMarkup=function(e,t,n,r){var o=i.Fragment.from(s.parseContent(e,n,r)),a=i.Fragment.from(s.parseContent(t,n,r));return o.eq(a)},u.getSelectionText=function(e){var t=e.selection;if(t instanceof r.TextSelection||t instanceof r.AllSelection){var n=t.content().content;return n.textBetween(0,n.size)}return""},u.getNodeFromSelection=function(e){if(e.selection instanceof r.NodeSelection)return e.selection.node},u.selectedLineTextOnly=function(e){var t="",n=!1,r=e.selection,o=e.doc,a=r.$from,i=r.$to,s=r.from,l=r.to;return a.sameParent(i)&&(o.nodesBetween(s,l,function(e){n=n||e.isLeaf&&!e.isText}),n||(t=u.getSelectionText(e))),t},u.indentHtml=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$/,"")}},function(e,t){e.exports=v},function(e,t){e.exports=h},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var n=t(4),v=t(2);g.markApplies=function(a,i,s){for(var e=0;e<i.length;e++){var t=function(e){var t=i[e],n=t.$from,r=t.$to,o=0===n.depth&&a.type.allowsMarkType(s);if(a.nodesBetween(n.pos,r.pos,function(e){return!o&&void(o=e.inlineContent&&e.type.allowsMarkType(s))}),o)return{v:!0}}(e);if(t)return t.v}return!1},g.toggleMark=function(f,p,m){return function(e,t){var n=e.selection,r=n.empty,o=n.$cursor,a=n.ranges;if(r&&!o||!g.markApplies(e.doc,a,f))return!1;if(t)if(o)f.isInSet(e.storedMarks||o.marks())?t(m.removeStoredMark(f)):t(m.addStoredMark(f.create(p)));else{for(var i=!1,s=0;!i&&s<a.length;s++)var l=a[s],u=l.$from,c=l.$to,i=e.doc.rangeHasMark(u.pos,c.pos,f);for(s=0;s<a.length;s++){var d=a[s],u=d.$from,c=d.$to;i?m.removeMark(u.pos,c.pos,f):m.addMark(u.pos,c.pos,f.create(p))}t(m.scrollIntoView())}return!0}},g.removeMark=function(t,c,d,f){void 0===f&&(f=null);var p=[],m=0;return t.doc.nodesBetween(c,d,function(e,t){if(e.isInline){m++;var n,r=null;if(f instanceof v.MarkType?(n=f.isInSet(e.marks))&&(r=[n]):f?f.isInSet(e.marks)&&(r=[f]):r=e.marks,r&&r.length)for(var o=Math.min(t+e.nodeSize,d),a=0;a<r.length;a++){for(var i=r[a],s=void 0,l=0;l<p.length;l++){var u=p[l];u.step===m-1&&i.eq(u.style)&&(s=u)}s?(s.to=o,s.step=m):p.push({style:i,from:Math.max(t,c),to:o,step:m})}}}),p.forEach(function(e){return t.step(new n.RemoveMarkStep(e.from,e.to,e.style))}),t},g.removeMarks=function(o,t,n,a){var e=t.selection,r=e.$cursor,i=e.ranges;if(a=a||t.tr,r)o.forEach(function(e){e.isInSet(t.storedMarks||r.marks())&&n(a.removeStoredMark(e))});else{for(var s=0;s<i.length;s++)!function(e){var t=i[e],n=t.$from,r=t.$to;o.forEach(function(e){g.removeMark(a,n.pos,r.pos,e)})}(s);n(a.scrollIntoView())}return!0},g.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,u=void 0===t?[]:t;return function(e,t){var r,n=e.schema,o=e.selection,a=o.empty,i=o.ranges,s=e.tr,l=(u instanceof Array?u:[u]).map(function(e){return e.name});a||(r=Object.keys(n.marks).map(function(e){return n.marks[e]}).filter(function(e){return-1===l.indexOf(e.name)}),i.forEach(function(e){var t=e.$from,n=e.$to;r.forEach(function(e){return s.removeMark(t.pos,n.pos,e)})}),t(s))}},g.hasMark=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter(function(e){return r[e]}),a=t.altStyle,i=e.selection,s=i.from,l=i.$from,u=i.to,c=i.empty,d=r[t.mark],f=e.doc,p=!1;return!(p=c?(n=e.storedMarks||l.marks(),d&&d.isInSet(n)||o.some(function(e){return r[e].isInSet(n)})):d&&f.rangeHasMark(s,u,d)||o.some(function(e){return f.rangeHasMark(s,u,r[e])}))&&a?g.selectionMarks(e,e.schema.marks.style).some(function(e){return null!==g.styleValue(e,a)}):Boolean(p)},g.styleValue=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},g.selectionMarks=function(e,t){var n=e.selection,r=n.from,o=n.$from,a=n.to,i=[];return n.empty?i.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(r,a,function(e){e.isInline&&i.push(t.isInSet(e.marks))}),i},g.getMark=function(e,t){var n=g.selectionMarks(e,t),r=n.filter(function(e){return Boolean(e)});return n.length===r.length?n[0]:void 0},g.getActiveMarks=function(e,t){var n=g.selectionMarks(e,t),r=n.filter(function(e){return Boolean(e)});return{hasNodesWithoutMarks:n.length!==r.length,marks:r}}},function(e,x,t){"use strict";Object.defineProperty(x,"__esModule",{value:!0});var T=t(1),I=t(4),v=t(3),y=t(6);x.changeStyleFromMark=function(e,t){var n=e.find(function(e){return"style"===e.type.name}),r=n&&n.attrs.style;return v.changeStylesString(r,t)},x.changeStyleMark=function(t,g,v,h,y){var k=y.create({style:h.style}),M=[],_=[],b=null,S=null;return t.doc.nodesBetween(g,v,function(e,t,n){if(e.isInline){var r=e.marks;if(!k.isInSet(r)&&n.type.allowsMarkType(k.type)){var o=Math.max(t,g),a=Math.min(t+e.nodeSize,v),i=x.changeStyleFromMark(r,h);if(i.changed||h.newValue){for(var s=i.changed?{style:i.style||null}:{style:[h.style]+": "+h.newValue+";"},l=y.isInSet(r)?r.find(function(e){return"style"===e.type.name}):null,u=l?T.__assign({},l.attrs,s):s,c=y.create(u),d=c.addToSet(r),f=0;f<r.length;f++)r[f].isInSet(d)||(b&&b.to===o&&b.mark.eq(r[f])?b.to=a:(b=new I.RemoveMarkStep(o,a,r[f]),M.push(b)));var p=S&&S.to===o,m=p&&c.attrs.style===S.mark.attrs.style;p&&m?S.to=a:Object.keys(u).some(function(e){return null!==u[e]})&&(S=new I.AddMarkStep(o,a,c),_.push(S))}}}}),M.forEach(function(e){return t.step(e)}),_.forEach(function(e){return t.step(e)}),0<M.length+_.length},x.getInlineStyles=function(e,t){return y.selectionMarks(e,e.schema.marks.style).map(function(e){return y.styleValue(e,t)}).filter(function(e){return null!==e})},x.changeStyle=function(v,h){return function(e,t,n){var r=e.selection,o=r.empty,a=r.$cursor,i=r.ranges;if(o&&!a||!y.markApplies(e.doc,i,v))return!1;var s=!1;if(t)if(n=n||e.tr,a){var l,u,c,d=e.storedMarks||a.marks();v.isInSet(d)&&(l=x.changeStyleFromMark(d,h),u=d.find(function(e){return"style"===e.type.name}),c=T.__assign({},u?u.attrs:{},{style:l.style||null}),t(n.removeStoredMark(v)),Object.keys(c).some(function(e){return null!==c[e]})&&t(n.addStoredMark(v.create(c))),s=!0)}else{for(var f=0;f<i.length;f++)var p=i[f],m=p.$from,g=p.$to,s=x.changeStyleMark(n,m.pos,g.pos,h,v);s&&(n.scrollIntoView(),t(n))}return s}},x.toggleInlineFormat=function(f,p,m){return function(t,e){var n=t.schema.marks,r=f.altStyle,o=f.altMarks,a=void 0===o?[]:o,i=f.mark;p=p||t.tr;function s(){return c=!0}var l,u=!1,c=!1;r&&n.style&&(l=n.style,u=x.changeStyle(l,{style:r.name,value:r.value})(t,s,p));var d=[i].concat(a).filter(function(e){return n[e]}).map(function(e){return y.hasMark(t,{mark:e})&&n[e]}).filter(function(e){return e});return d.length?y.removeMarks(d,t,s,p):u||y.toggleMark(n[i],m,p)(t,s),c&&e(p),c}},x.applyInlineStyle=function(m,g){return function(e,t){var n=e.schema.marks.style,r={style:m.style,value:/^.+$/,newValue:m.value},o=e.tr;g&&o.setMeta("commandName",g),o.setMeta("args",m);var a=e.selection,i=a.empty,s=a.$cursor,l=a.ranges;if(i&&!s||!y.markApplies(e.doc,l,n))return!1;if(s){var u,c=e.storedMarks||s.marks(),d=n.isInSet(c)?c.find(function(e){return"style"===e.type.name}):null,f={style:null};d&&d.attrs.style?(u=v.changeStylesString(d.attrs.style,r)).changed&&u.style&&(f.style=u.style):r.newValue&&(f.style=[r.style]+": "+r.newValue+";");var p=d?T.__assign({},d.attrs,f):f;return Object.keys(p).some(function(e){return null!==p[e]})?t(o.addStoredMark(n.create(p))):t(o.removeStoredMark(n)),!0}return x.changeStyle(n,r)(e,t,o)}}},function(e,t){e.exports=a},function(e,t){e.exports=p},function(e,d,t){"use strict";Object.defineProperty(d,"__esModule",{value:!0});var f=t(1),a=t(3),v=t(4),h=t(2);d.changeBlockNode=function(o,e,d,f,p,m){var t=o.selection,n=t.from,r=t.to,a=!1;if(o.doc.nodesBetween(n,r,function(e,t){return!a&&void(e.isTextblock&&!e.hasMarkup(p,m)&&(a=e.type===p||(r=(n=o.doc.resolve(t)).index(),n.parent.canReplaceWith(r,r+1,p))));var n,r}),!a)return!1;if(e){if(!p.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var g=d.steps.length;d.doc.nodesBetween(n,r,function(e,t){if(e.eq(f)&&e.isTextblock&&!e.hasMarkup(p,m)&&(i=d.doc,s=d.mapping.slice(g).map(t),l=p,u=i.resolve(s),c=u.index(),u.parent.canReplaceWith(c,c+1,l))){d.clearIncompatible(d.mapping.slice(g).map(t,1),p);var n=d.mapping.slice(g),r=n.map(t,1),o=n.map(t+e.nodeSize,1),a=new h.Slice(h.Fragment.from(p.create(m,null,e.marks)),0,0);return d.step(new v.ReplaceAroundStep(r,o,r+1,o-1,a,1,!0)),!1}var i,s,l,u,c})}return!0},d.blockNodes=function(e){var t=e.selection,n=t.from,r=t.to,o=t.$from,a=[];return t.node?t.node.isBlock?a.push(t.node):o.parent&&o.parent.isBlock&&a.push(o.parent):e.doc.nodesBetween(n,r,function(e){e.isBlock&&a.push(e)}),a},d.formatBlockElements=function(c,t){return function(a,i){var e=d.blockNodes(a),s=a.schema.nodes,l=!1,u=a.tr;return u.setMeta("commandName",t),u.setMeta("args",{value:c}),e.forEach(function(e){var t,n,r,o;e.type.isTextblock&&("p"===c?(r=(t=e.attrs).level,o=f.__rest(t,["level"]),l=d.changeBlockNode(a,i,u,e,s.paragraph,o)||l):/^h[1-6]$/i.test(c)?(r=parseInt(c.substr(1),10),l=d.changeBlockNode(a,i,u,e,s.heading,f.__assign({},e.attrs,{level:r}))||l):"blockquote"===c&&(r=(n=e.attrs).level,o=f.__rest(n,["level"]),l=d.changeBlockNode(a,i,u,e,s.blockquote,o)||l))}),l&&i(u.scrollIntoView()),l}},d.getBlockFormats=function(e){var t=d.blockNodes(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&&r.push("blockquote")}),r},d.addStyles=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=a.changeStylesString(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})},d.hasNode=function(e,t){var n=e.selection,r=n.from,o=n.to,a=!1;return e.doc.nodesBetween(r,o,function(e){return!(a=a||e.type===t)}),a},d.parentBlockFormat=function(e){var t=d.getBlockFormats(e);return 1===new Set(t).size?t[0]:null},d.activeNode=function(e){return{tag:d.parentBlockFormat(e)||""}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function k(e){return/^MsoListParagraph/.test(e.className)}function M(e){var t=e.innerHTML;return(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")}function _(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n}function b(e){function t(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")}var n,r,o,a=(a=e.innerHTML).replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," ");return/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(a)?{tag:"ul",style:(o=t(M(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(o)?null:/^o/.test(o)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(a)?{tag:"ol",style:(n=t(M(e)),r=null,/^\d/.test(n)||(r=(/^[a-z]/.test(n)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(n)?"roman":"alpha")),r)}:void 0}var r=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e,n){var r=[];Array.from(e).forEach(function(e){var t;e.nodeType===Node.ELEMENT_NODE&&((t=e).getAttribute("datalist")?(r.push(e),n.add(r)):k(t)&&r.length?r.push(e):(r=[],"DIV"===t.nodeName?o(t.children,n):"TABLE"===t.nodeName&&Array.from(t.querySelectorAll("td,th")).forEach(function(e){o(e.children,n)})))})};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=e.replace(r,function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e});var n=new Set;return o(t.children,n),n.forEach(function(e){for(var t,n,r,o,a,i,s,l,u,c,d,f=-1,p={},m=0;m<e.length;m++){var g,v,h=(d={datalist:(l=e[m]).getAttribute("datalist"),datalevel:l.getAttribute("datalevel")}).datalist,y=b(l);(u=y&&y.tag)?(v=d.datalevel||parseFloat(l.style.marginLeft||0),(d.datalevel||l.style.marginLeft)&&(g=u+h,p[v]||(p[v]={}),(!n||n<0)&&(n=v,r=h,o=(s=e.filter(function(e){return e.getAttribute("datalist")===String(r)}))[s.length-1],i=_(u,y&&y.style),l.parentNode.insertBefore(i,l),p[f=v][g]=i),a=o===l,c=p[v][g],(f<v||!c)&&(c=_(u,y&&y.style),p[v][g]=c,t.appendChild(c)),t=function(e){var t,n=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),t=1===e.childNodes.length?e.firstChild.nodeType===Node.TEXT_NODE?M(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),"p"!==n?"<"+n+">"+e.innerHTML+"</"+n+">":e.innerHTML),e.parentNode.removeChild(e);var r=document.createElement("li");return r.innerHTML=t,r}(l),c.appendChild(t),a?n=f=-1:f=v)):!t||a&&!k(l)||(l.style.marginLeft&&(l.style.marginLeft=""),l.style.marginLeft&&(l.style.margin=""),t.appendChild(l))}}),t.innerHTML}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bold={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},t.italic={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},t.underline={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},t.strikethrough={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},t.subscript={mark:"sub"},t.superscript={mark:"sup"},t.link={mark:"link"},t.unlink={mark:"link"}},function(e,t){e.exports=c},function(e,t){e.exports=u},function(e,t){e.exports=g},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t(1),p=t(2),m=t(0),g=t(4),v=t(8),h=t(9),a=t(17);function y(p){return function(e,t,n){if(!n)return!1;var r,o,a,i=(e=n.state).schema.nodes[p.listType],s=e.selection,l=s.$from,u=s.$to,c=l.node(-2),d=l.node(-3),f=(r=e.doc,o=i,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;1<=t.depth;)(r=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==n.indexOf(r.type.name)&&(o=t);return o}(e,t).depth,a=e.resolve(t.start(o));a.pos<=n.start(n.depth);){var i=Math.min(a.depth,o),s=a.node(i);if(s&&r.push(s),0===i)break;var l=e.resolve(a.after(i));if(l.start(i)>=e.nodeSize-2)break;l.depth!==a.depth&&(l=e.resolve(l.pos+2)),a=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return r}(r,l,u).filter(function(e){return e.type!==o}).length);return(c&&c.type===i||d&&d.type===i)&&f?k(p)(e,t):(f||(k(p)(e,t),e=n.state),a=i,v.autoJoin(h.wrapInList(a),function(e,t){return e.type===t.type&&e.type===a})(e,t))}}function k(s){return function(a,e){var i=a.tr,t=a.selection,n=t.$from,r=t.$to;return i.doc.nodesBetween(n.pos,r.pos,function(e,t){if(e.isTextblock||"blockquote"===e.type.name||"div"===e.type.name){var n=new m.NodeSelection(i.doc.resolve(i.mapping.map(t))),r=n.$from.blockRange(n.$to);if(!r||n.$from.parent.type!==a.schema.nodes[s.listItem])return!1;var o=r&&g.liftTarget(r);if(null==o)return!1;i.lift(r,o)}}),e&&e(i),!0}}r.toggleList=function(e,t,n,r,o){var a=r.listType,i=e.selection,s=i.$from.node(i.$from.depth-2),l=i.$to.node(i.$to.depth-2);if(s&&s.type.name===a&&l&&l.type.name===a){var u=n.state.schema.nodes,c={bulletList:u[r.bulletList],orderedList:u[r.orderedList],listItem:u[r.listItem]},d=function(e){for(var t,n=c.bulletList,r=c.orderedList,o=c.listItem,a=e.depth-1;0<a;a--){var i=e.node(a);if(i.type!==n&&i.type!==r||(t=a),i.type!==n&&i.type!==r&&i.type!==o)break}return t}(i.$to),f=function(i,s,e,l,u,c){c=c||i.schema.nodes.listItem;var d=!1;return u.doc.nodesBetween(s,e,function(e,t){if(!d&&e.type===c&&s<t){d=!0;for(var n=l+3;l+2<n;){var r=u.doc.resolve(u.mapping.map(t)),n=r.depth,o=u.doc.resolve(u.mapping.map(t+e.textContent.length)),a=new m.TextSelection(r,o);u=function(e,t,n,r){r=r||e.schema.nodes.listItem;var o=t.$from,a=t.$to,i=o.blockRange(a,function(e){return e.childCount&&e.firstChild.type===r});if(!i||i.depth<2||o.node(i.depth-1).type!==r)return n;var s=i.end,l=a.end(i.depth);return s<l&&(n.step(new g.ReplaceAroundStep(s-1,l,s,l,new p.Slice(p.Fragment.from(r.create(void 0,i.parent.copy())),1,0),1,!0)),i=new p.NodeRange(n.doc.resolve(o.pos),n.doc.resolve(l),i.depth)),n.lift(i,g.liftTarget(i)).scrollIntoView()}(i,a,u,c)}}}),u}(e,i.$to.pos,i.$to.end(d),d,n.state.tr,c.listItem);return(f=function(e,t,n){var r=e.selection,o=r.from,a=r.to,i=e.schema.nodes,s=i.paragraph,l=i.heading,u=[];t.doc.nodesBetween(o,a,function(e,t){e.type!==s&&e.type!==l||u.push({node:e,pos:t})});for(var c=u.length-1;0<=c;c--){var d,f,p=u[c],m=t.doc.resolve(t.mapping.map(p.pos));0<m.depth&&(d=void 0,d=p.node.textContent&&0<p.node.textContent.length?t.doc.resolve(t.mapping.map(p.pos+p.node.textContent.length)):t.doc.resolve(t.mapping.map(p.pos+1)),(f=m.blockRange(d))&&t.lift(f,function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],a=e.nodes[n.orderedList],i=e.nodes[n.listItem],s=t.depth;0<s;s--){var l=t.node(s);if(l.type!==o&&l.type!==a||(r=s),l.type!==o&&l.type!==a&&l.type!==i)break}return r-1}(e.schema,m,n)))}return t}(e,f,r)).setMeta("commandName",o),t(f),!0}return y(r)(e,t,n)},r.toggleUnorderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:a.bulletList.listType},a.bulletList.types))},r.toggleOrderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:a.orderedList.listType},a.orderedList.types))},r.splitListItemKeepMarks=function(e){return function(n,r){return h.splitListItem(e)(n,function(e){var t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();t&&e.ensureMarks(t),r(e)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:r.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:r.__assign({},t.listsTypes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(17);t.indentRules={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:r.__assign({},o.listsTypes)},t.outdentRules={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:r.__assign({},o.listsTypes)}},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var i=t(2),s=t(0);a.parseContent=function(e,t,n){var r=document.createElement("template"),o="content"in r?(r.innerHTML=e,r.content):(new DOMParser).parseFromString(e,"text/html").body||document.createDocumentFragment();return i.DOMParser.fromSchema(t).parse(o,n)},a.getHtml=function(e){var t=i.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),n=document.createElement("div");return n.appendChild(t),n.innerHTML},a.setHtml=function(n,r,o){return void 0===r&&(r="setHTML"),void 0===o&&(o={preserveWhitespace:"full"}),function(e,t){return t(e.tr.setSelection(new s.AllSelection(e.doc)).replaceSelectionWith(a.parseContent(n,e.schema,o)).setMeta("commandName",r))}}},function(e,t){e.exports=d},function(e,t){e.exports=l},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(5);t.textHighlightKey=new r.PluginKey("highlight"),t.textHighlight=function(e){return void 0===e&&(e=t.textHighlightKey),new r.Plugin({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 o.Decoration.inline(e.from,e.to,e.attrs)});return o.DecorationSet.create(e.doc,t)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),l=n(5),u=/\s+/g,c=/text-align/;t.spacesFix=function(){return new r.Plugin({key:new r.PluginKey("spaces-fix"),props:{decorations:function(e){var r,o,a,i,s=[],t=e.doc;return t.nodesBetween(0,t.content.size,function(e,t,n){if(e.type.isText&&c.test(n&&n.attrs&&n.attrs.style||""))for(o=u.exec(e.text||"");null!==o;){if(r=t+o.index,a=o[0].length,o.index+a<o.input.length)for(i=0;i<=a-1;i+=2)s.push(l.Decoration.inline(r+i,r+i+1,{style:"white-space: normal"}));o=u.exec(e.text||"")}}),l.DecorationSet.create(t,s)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=n(5);t.placeholder=function(e){var o={class:"k-placeholder","data-placeholder":e};return new r.Plugin({key:new r.PluginKey("placeholder"),props:{decorations:function(e){var t=e.doc,n=t.content.firstChild;if(!(0===t.childCount||1===t.childCount&&n.inlineContent&&0===n.childCount))return a.DecorationSet.empty;var r=[];return t.descendants(function(e,t){r.push(a.Decoration.node(t,t+e.nodeSize,o))}),a.DecorationSet.create(t,r)}}})}},function(e,u,t){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var c=t(1),M=t(0);u.findAt=function(i,e,s,l,u){var c,d,f,p,m,g,v=[],h=[],t=e.matchCase,y=e.matchWord,n=e.useRegExp,r=e.text;if(n&&(/^\\$/.test(r)||/[^\\]\\$/.test(r))&&(r=r.substring(0,r.length-1)),!r)return v;var o=t?"g":"gi",k=n?new RegExp(r,o):b(r,o);return i.nodesBetween(s,l,function(e,a,t){return!u(v)&&void(e.inlineContent&&a+e.content.size>=s&&(h.length=0,e.nodesBetween(0,e.content.size,function(e,t,n,r){if(u(v))return!1;var o=1+a+t;if(e.isText&&o+e.nodeSize>=s){if(m=e.text||"",g=n.childCount-1>=r+1&&n.child(r+1),h.push(s<=o?{text:m,start:o}:{text:m.slice(s-o),start:s}),g&&g.isText)return;for(d=h.map(function(e){return e.text}).join(""),c=k.exec(d);null!==c&&(f=h[0].start+c.index,p=f+c[0].length,s<=f&&p<=l&&_(c,y)&&v.push(M.TextSelection.create(i,f,p)),!u(v));)c=k.exec(d)}else h.length=0})))}),v},u.find=function(e,t){var n=t.backward,r=t.matchCyclic,o=c.__rest(t,["backward","matchCyclic"]),a=n?function(){return!1}:function(e){return 0<e.length},i=e.doc,s=e.selection,l=[];return n?!(l=u.findAt(i,o,0,s.from,a)).length&&r&&(l=u.findAt(i,o,s.from,i.content.size,a)):!(l=u.findAt(i,o,s.to,i.content.size,a)).length&&r&&(l=u.findAt(i,o,0,s.to,a)),l.length?l[l.length-1]:null},u.findAll=function(e,t){return u.findAt(e,t,0,e.content.size,function(){return!1})},u.replace=function(e,t,n){var r=e.from,o=e.to;return n.insertText(t,r,o).setSelection(M.TextSelection.create(n.doc,r,r+t.length)),n},u.replaceAll=function(e,t,n){var r=u.findAll(e.doc,n);if(0===r.length)return null;for(var o=e.tr,a=r.length-1;0<=a;a--)o.insertText(t,r[a].from,r[a].to);return o};var a=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,_=function(e,t){if(t){if(!0!==t)return t(e);var n=e.input,r=n.charAt(e.index-1),o=n.charAt(e.index+e[0].length);return a.test(r)&&a.test(o)}return!0},b=function(e,t){var n=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(n,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,n){for(var r,o=e.table,a=e.table_row,i=e.table_cell,s=[],l=0;l<t+1;l++){r=[];for(var u=0;u<n+1;u++)r.push(i.createAndFill());s.push(a.createAndFill(void 0,r))}return o.createAndFill(void 0,s)}},function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=t(11);i.sanitize=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,"")},i.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},i.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},i.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},i.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&i.removeAttribute(e)};var s=/\s*;\s*/,l=/\s*:\s*/;i.sanitizeStyleAttr=function(e){var n,r,t=e.value.split(s).filter(function(e){return Boolean(e)}),o=e.ownerElement.style,a="";t.forEach(function(e){var t=e.split(l);n=t[0],r=t[1],void 0!==o[n]&&(a+=n+": "+r+"; ")}),(a=a.trim())?e.value=a:i.removeAttribute(e)},i.pasteCleanup=function(e,t){var n,r=e;return t.convertMsLists&&(r=o.convertMsLists(r)),t.stripTags&&(r=i.removeTag(r,t.stripTags)),t.attributes&&((n=document.createElement("div")).innerHTML=r,Array.from(n.querySelectorAll("*")).forEach(function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e.attributes.length-1;0<=n;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)}),r=n.innerHTML),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),a=n(14),i=n(13),r=n(16),s=n(12),l=n(7),u="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var n,t,r={};return r["Mod-z"]=a.undo,r["Shift-Mod-z"]=a.redo,r.Backspace=o.chainCommands(i.undoInputRule,o.deleteSelection,o.joinBackward,o.selectNodeBackward),r.Enter=o.chainCommands(o.newlineInCode,o.createParagraphNear,o.liftEmptyBlock,o.splitBlockKeepMarks),u||(r["Mod-y"]=a.redo),e.marks.strong&&(r["Mod-b"]=l.toggleInlineFormat(s.bold)),e.marks.em&&(r["Mod-i"]=l.toggleInlineFormat(s.italic)),e.marks.underline&&(r["Mod-u"]=l.toggleInlineFormat(s.underline)),e.nodes.hard_break&&(n=e.nodes.hard_break,t=o.chainCommands(o.exitCode,function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0}),r["Shift-Enter"]=t),r},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=r.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n}function o(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return 1}function a(e,t){var n,r={};for(n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r}function i(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t}var s=n(1),l=n(15),u=["blockquote",0],c=["hr"],d=["pre",["code",0]],f=["ol",0],p=["ul",0],m=["li",0],g=s.__assign({link:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:r}],toDOM:function(e){return["a",a(e.attrs),0]}}},i("strong"),i("b"),i("em"),i("i"),i("u"),i("del"),i("sub"),i("sup"),i("code"),{style:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["span",a(e.attrs),0]:["span",0]}}});t.marks=g;var v=s.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["p",a(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["div",a(e.attrs),0]:["div",0]}},blockquote:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return u}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return c}},heading:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return s.__assign({},r(e),{level:1})}},{tag:"h2",getAttrs:function(e){return s.__assign({},r(e),{level:2})}},{tag:"h3",getAttrs:function(e){return s.__assign({},r(e),{level:3})}},{tag:"h4",getAttrs:function(e){return s.__assign({},r(e),{level:4})}},{tag:"h5",getAttrs:function(e){return s.__assign({},r(e),{level:5})}},{tag:"h6",getAttrs:function(e){return s.__assign({},r(e),{level:6})}}],toDOM:function(e){return o(e.attrs,"level")?["h"+e.attrs.level,a(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 d}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:s.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["img",a(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["br",a(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return s.__assign({},r(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?o(e.attrs,"order")?["ol",a(e.attrs,"order"),0]:f:["ol",s.__assign({},a(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["ul",a(e.attrs),0]:p}},list_item:{content:"block*",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["li",a(e.attrs),0]:m},defining:!0}},l.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){return{name:e,value:t}}t.alignLeftRules=[{node:"paragraph",style:[r("text-align","left")]},{node:"heading",style:[r("text-align","left")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]}],t.alignJustifyRules=[{node:"paragraph",style:[r("text-align","justify")]},{node:"heading",style:[r("text-align","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]}]},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var s=t(9),a=t(18),m=t(10),l=t(3);o.indentBlocks=function(f,t,p){return function(l,u){var e=m.blockNodes(l),c=l.tr,d=!1;return c.setMeta("commandName",t),e.forEach(function(t){var e,n,r,o,a,i,s;t.type.isTextblock&&(e=void 0,(n=f.find(function(e){return e.node===t.type.name}))&&(o={name:r="rtl"===p?n.rtlStyle:n.style,value:0<n.step?""+n.step+n.unit:""},t.attrs.style&&(a=new RegExp(r+":\\s?(\\d+)"+n.unit,"i"),(i=t.attrs.style.match(a))&&(s=(s=parseFloat(i[1])+n.step)<=0?"":s,o.value=""+s+(s?n.unit:""))),e=m.addStyles(t,[o])),e&&(d=m.changeBlockNode(l,u,c,t,t.type,e)||d))}),d&&u(c.scrollIntoView()),d}},o.isIndented=function(e,o,a){var i=!1;return m.blockNodes(e).forEach(function(t){var e,n,r;i||!t.type.isTextblock||!t.attrs.style||(e=o.find(function(e){return e.node===t.type.name}))&&(n="rtl"===a?e.rtlStyle:e.style,r=new RegExp(n+":\\s?\\d+"+e.unit,"i"),i=r.test(t.attrs.style))}),i},o.canIndentAsListItem=function(e,t){return s.sinkListItem(t)(e)},o.canOutdentAsListItem=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],a=!!l.findNthParentNodeOfType(r,2)(e.selection),i=!!l.findNthParentNodeOfType(o,2)(e.selection);return(a||i)&&s.liftListItem(n)(e)},o.canBeIndented=function(t,e){var n=t.schema.nodes,r=n[a.indentRules.listsTypes.listItem];return(o.isIndented(t,e.nodes)||a.indentRules.nodes.some(function(e){return n[e.node]&&m.hasNode(t,n[e.node])}))&&!m.hasNode(t,r)},o.indent=function(e,t){var n=e.schema.nodes[a.indentRules.listsTypes.listItem],r=o.canBeIndented(e,a.indentRules);o.canIndentAsListItem(e,n)?s.sinkListItem(n)(e,t):r&&o.indentBlocks(a.indentRules.nodes)(e,t)},o.outdent=function(e,t){var n=e.schema.nodes[a.outdentRules.listsTypes.listItem],r=o.canBeIndented(e,a.outdentRules);o.canOutdentAsListItem(e,a.outdentRules)?s.liftListItem(n)(e,t):r&&o.indentBlocks(a.outdentRules.nodes)(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=n(10);t.alignBlocks=function(s,t){return function(r,o){var e=l.blockNodes(r),a=r.tr;a.setMeta("commandName",t);var i=!1;return e.forEach(function(t){var e,n;t.type.isTextblock&&(e={},(n=s.find(function(e){return e.node===t.type.name}))&&(e=l.addStyles(t,n.style)),i=l.changeBlockNode(r,o,a,t,t.type,e)||i)}),i&&o(a.scrollIntoView()),i}},t.isAligned=function(e,n){var r=!1;return l.blockNodes(e).forEach(function(t){var e;r||!t.type.isTextblock||!t.attrs.style||(e=n.find(function(e){return e.node===t.type.name}))&&(r=e.style.every(function(e){return!!e.value&&new RegExp(e.name+":\\s?"+e.value,"i").test(t.attrs.style)}))}),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(3);t.insertImage=function(r){return function(e,t){var n=e.schema.nodes.image.createAndFill(r);o.insertNode(n)(e,function(e){return t(e.setMeta("commandName","insertImage").setMeta("args",r))})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(n){return function(e,t){t(e.tr.insertText(n.text,n.from,n.to))}}},function(e,f,t){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var m=t(7),h=t(6),p=t(0);f.removeLink=function(f,p){return function(e,t){var n=e.selection.$cursor;if(n){for(var r,o=n.parent,a=n.index(),i=e.schema.marks[f.mark],s=o.child(a).marks.find(function(e){return e.type===i}),l=o.childCount,u=n.pos-n.textOffset,c=o.child(a).nodeSize,d=void 0,d=a-1;0<=d&&s.isInSet(o.child(d).marks);)c+=r=o.child(d).nodeSize,u-=r,--d;for(d=a+1;d<l&&s.isInSet(o.child(d).marks);)c+=o.child(d).nodeSize,d+=1;t(h.removeMark(p||e.tr,u,u+c,s))}else m.toggleInlineFormat(f,p)(e,t)}},f.applyLink=function(e,u){var c=e.mark,d=e.attrs;return void 0===u&&(u="link"),function(e,t){var n=e.schema.marks,r=e.tr;u&&(r.setMeta("commandName",u),r.setMeta("args",d));function o(){return l=!0}var a,g,v,i,s,l=!1;return i=n[c],1===(s=h.selectionMarks(e,i)).length&&s[0]&&s[0]?(g={mark:c,attrs:d},v=r,function(e,n){var t=e.selection,r=t.$cursor,o=t.from,a=t.to,i=e.schema.marks[g.mark];if(r){for(var s,l=r.parent,u=r.index(),c=l.child(u).marks.find(function(e){return e.type===i}),d=l.childCount,f=r.pos-r.textOffset,p=l.child(u).nodeSize,m=void 0,m=u-1;0<=m&&c.isInSet(l.child(m).marks);)p+=s=l.child(m).nodeSize,f-=s,--m;for(m=u+1;m<d&&c.isInSet(l.child(m).marks);)p+=l.child(m).nodeSize,m+=1;v.removeMark(f,f+p,i),v.addMark(f,f+p,i.create(g.attrs)),n(v)}else v.doc.nodesBetween(o,a,function(e,t){e.isInline&&i.isInSet(e.marks)&&(v.removeMark(t,t+e.nodeSize,i),v.addMark(t,t+e.nodeSize,i.create(g.attrs)),n(v))})}(e,o)):(a=e,h.hasMark(e,{mark:c})&&(f.removeLink({mark:c,attrs:d},r)(e,o),a=p.EditorState.create({doc:r.doc,selection:r.selection})),(l?h.toggleMark(n[c],d,r):m.toggleInlineFormat({mark:c},r,d))(a,o)),l&&t(r),l}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(19);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;var a=n(7);t.applyInlineStyle=a.applyInlineStyle,t.getInlineStyles=a.getInlineStyles,t.toggleInlineFormat=a.toggleInlineFormat;var i=n(36);t.applyLink=i.applyLink,t.removeLink=i.removeLink;var s=n(35);t.insertText=s.insertText;var l=n(34);t.insertImage=l.insertImage;var u=n(33);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=n(10);t.hasNode=c.hasNode,t.activeNode=c.activeNode,t.formatBlockElements=c.formatBlockElements,t.getBlockFormats=c.getBlockFormats,t.parentBlockFormat=c.parentBlockFormat;var d=n(6);t.hasMark=d.hasMark,t.getMark=d.getMark,t.getActiveMarks=d.getActiveMarks,t.removeAllMarks=d.removeAllMarks,t.selectionMarks=d.selectionMarks;var f=n(32);t.indent=f.indent,t.canIndentAsListItem=f.canIndentAsListItem,t.outdent=f.outdent,t.canOutdentAsListItem=f.canOutdentAsListItem,t.isIndented=f.isIndented,t.canBeIndented=f.canBeIndented,t.indentBlocks=f.indentBlocks;var p=n(16);t.toggleOrderedList=p.toggleOrderedList,t.toggleUnorderedList=p.toggleUnorderedList,t.toggleList=p.toggleList;var m=n(3);t.hasSameMarkup=m.hasSameMarkup,t.getSelectionText=m.getSelectionText,t.getNodeFromSelection=m.getNodeFromSelection,t.selectedLineTextOnly=m.selectedLineTextOnly,t.canInsert=m.canInsert,t.insertNode=m.insertNode,t.indentHtml=m.indentHtml;var g=n(31);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignJustifyRules=g.alignJustifyRules,t.alignRemoveRules=g.alignRemoveRules;var v=n(18);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var h=n(30);t.nodes=h.nodes,t.marks=h.marks;var y=n(29);t.buildKeymap=y.buildKeymap,t.buildListKeymap=y.buildListKeymap;var k=n(12);t.bold=k.bold,t.italic=k.italic,t.underline=k.underline,t.strikethrough=k.strikethrough,t.subscript=k.subscript,t.superscript=k.superscript,t.link=k.link;var M=n(28);t.sanitize=M.sanitize,t.removeComments=M.removeComments,t.removeTag=M.removeTag,t.pasteCleanup=M.pasteCleanup,t.sanitizeClassAttr=M.sanitizeClassAttr,t.sanitizeStyleAttr=M.sanitizeStyleAttr,t.removeAttribute=M.removeAttribute;var _=n(11);t.convertMsLists=_.convertMsLists;var b=n(27);t.createTable=b.createTable;var S=n(26);t.find=S.find,t.findAt=S.findAt,t.findAll=S.findAll,t.replace=S.replace,t.replaceAll=S.replaceAll;var x=n(25);t.placeholder=x.placeholder;var T=n(24);t.spacesFix=T.spacesFix;var I=n(23);t.textHighlight=I.textHighlight,t.textHighlightKey=I.textHighlightKey,r.__exportStar(n(8),t),r.__exportStar(n(22),t),r.__exportStar(n(21),t),r.__exportStar(n(14),t),r.__exportStar(n(13),t),r.__exportStar(n(20),t),r.__exportStar(n(2),t),r.__exportStar(n(9),t),r.__exportStar(n(0),t),r.__exportStar(n(15),t),r.__exportStar(n(4),t),r.__exportStar(n(5),t),function(e){for(var t in e)L(t,e[t])}(t)}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=37)}}}); |
{ | ||
"name": "@progress/kendo-editor-common", | ||
"description": "Kendo UI TypeScript package exporting functions for Editor component", | ||
"version": "0.7.0-dev.202009091415", | ||
"version": "1.0.0-dev.202009101248", | ||
"keywords": [ | ||
@@ -114,5 +114,4 @@ "Kendo UI" | ||
"files": [ | ||
"dist", | ||
"prosemirror" | ||
"dist" | ||
] | ||
} |
449875