New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@progress/kendo-editor-common

Package Overview
Dependencies
Maintainers
1
Versions
376
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@progress/kendo-editor-common - npm Package Compare versions

Comparing version 0.2.1-dev.201910251141 to 0.3.0-dev.201910300927

dist/es/listConvert.js

4

dist/cdn/js/kendo-editor-common.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-schema-list"),require("prosemirror-tables"),require("prosemirror-commands"),require("prosemirror-history"),require("prosemirror-inputrules")):"function"==typeof define&&define.amd?define(["prosemirror-state","prosemirror-model","prosemirror-transform","prosemirror-schema-list","prosemirror-tables","prosemirror-commands","prosemirror-history","prosemirror-inputrules"],t):"object"==typeof exports?exports.KendoEditorCommon=t(require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-schema-list"),require("prosemirror-tables"),require("prosemirror-commands"),require("prosemirror-history"),require("prosemirror-inputrules")):e.KendoEditorCommon=t(e["prosemirror-state"],e["prosemirror-model"],e["prosemirror-transform"],e["prosemirror-schema-list"],e["prosemirror-tables"],e["prosemirror-commands"],e["prosemirror-history"],e["prosemirror-inputrules"])}(window,(function(e,t,n,r,o,a,i,s){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return a})),n.d(t,"__rest",(function(){return i})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return l})),n.d(t,"__metadata",(function(){return u})),n.d(t,"__awaiter",(function(){return c})),n.d(t,"__generator",(function(){return d})),n.d(t,"__exportStar",(function(){return f})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return m})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return v})),n.d(t,"__asyncGenerator",(function(){return h})),n.d(t,"__asyncDelegator",(function(){return k})),n.d(t,"__asyncValues",(function(){return b})),n.d(t,"__makeTemplateObject",(function(){return M})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return S}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-tables"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-history"),require("prosemirror-inputrules")):"function"==typeof define&&define.amd?define(["prosemirror-state","prosemirror-model","prosemirror-transform","prosemirror-tables","prosemirror-schema-list","prosemirror-commands","prosemirror-history","prosemirror-inputrules"],t):"object"==typeof exports?exports.KendoEditorCommon=t(require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-tables"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-history"),require("prosemirror-inputrules")):e.KendoEditorCommon=t(e["prosemirror-state"],e["prosemirror-model"],e["prosemirror-transform"],e["prosemirror-tables"],e["prosemirror-schema-list"],e["prosemirror-commands"],e["prosemirror-history"],e["prosemirror-inputrules"])}(window,(function(e,t,n,r,o,a,i,s){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return a})),n.d(t,"__rest",(function(){return i})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return l})),n.d(t,"__metadata",(function(){return u})),n.d(t,"__awaiter",(function(){return c})),n.d(t,"__generator",(function(){return d})),n.d(t,"__exportStar",(function(){return f})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return m})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return v})),n.d(t,"__await",(function(){return y})),n.d(t,"__asyncGenerator",(function(){return h})),n.d(t,"__asyncDelegator",(function(){return k})),n.d(t,"__asyncValues",(function(){return b})),n.d(t,"__makeTemplateObject",(function(){return M})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return S}));
/*! *****************************************************************************

@@ -16,2 +16,2 @@ Copyright (c) Microsoft Corporation. All rights reserved.

***************************************************************************** */
var 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)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var 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}).apply(this,arguments)};function i(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}function s(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function l(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(i,s)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function f(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function h(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(l,u):c(a[0][2],n)}catch(e){c(a[0][3],e)}var n}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function k(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(0),a=n(6),i=n(9),s=n(4);t.changeStyles=function(e,t){var n=t.style,r=t.value,o=t.newValue,a=[];if(e){var i=e.split(/\s*;\s*/).filter((function(e){return e})),s=i.filter((function(e){if(!e.toLowerCase().trim().startsWith(n))return!0;var t=e.split(":")[1].trim();return!r.test(t)||(a.push(t),!1)}));return o&&s.push(n+": "+o),{style:s.join("; ")+(s.length?";":""),changed:!!o||s.length!==i.length,styleMatches:a}}return{changed:!1,styleMatches:a,style:null}},t.changeStyle=function(e,t){return function(n,r,o){var i=n.selection,l=i.empty,u=i.$cursor,c=i.ranges;if(l&&!u||!a.markApplies(n.doc,c,e))return!1;var d=!1;if(r)if(o=o||n.tr,u){var f=n.storedMarks||u.marks();if(e.isInSet(f)){var p=s.changeStyleFromMark(f,t);r(o.removeStoredMark(e)),r(o.addStoredMark(e.create({style:p.style}))),d=!0}}else{for(var m=0;m<c.length;m++){var g=c[m],y=g.$from,v=g.$to;d=s.changeStyleMark(o,y.pos,v.pos,t,e)}d&&(o.scrollIntoView(),r(o))}return d}},t.canInsert=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},t.getTypeName=function(e){return e instanceof r.Node?e.type.name:e.name},t.findParentNode=function(e){return function(t){for(var n=t.$from,r=n.depth;r>0;r--){var o=n.node(r);if(e(o))return{depth:r,node:o}}}},t.findNthParentNode=function(e,t){return void 0===t&&(t=1),function(n){for(var r=n.$from,o=r.depth;o>0;o--){var a=r.node(o);if(e(a)&&0===(t-=1))return{depth:o,node:a}}}},t.findNthParentNodeOfType=function(e,n){return void 0===n&&(n=1),function(r){return t.findNthParentNode((function(n){return t.getTypeName(n)===t.getTypeName(e)}),n)(r)}},t.insertNode=function(e,t){return function(n,r){var o=n.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),r(o)}},t.isNullOrUndefined=function(e){return null==e},t.safeString=function(e){return t.isNullOrUndefined(e)?"":e.toString()},t.createContentNode=function(e){var n=document.createElement("div");return n.innerHTML=t.safeString(e).trim(),r.DOMParser.fromSchema(new r.Schema({nodes:i.nodes,marks:i.marks})).parse(n)},t.hasSameMarkup=function(e,n){var o=r.Fragment.from(t.createContentNode(e)),a=r.Fragment.from(t.createContentNode(n));return o.eq(a)},t.first=function(e){return e[0]},t.last=function(e){return e[e.length-1]},t.split=function(e){return function(t){return t.split(e)}},t.trim=function(e){return e.trim()},t.filter=function(e){return function(t){return t.filter(e)}},t.getUniqueStyleValues=function(e,n){if(e.hasNodesWithoutMarks)return"";var r=e.marks.filter((function(e){return"style"===e.type.name})).map((function(e){return e.attrs.style})).map(t.split(";")).map(t.filter((function(e){return e.includes(n)}))).map((function(e){return 0!==e.length?e:[n+": INVALID"]})).map(t.first).map(t.split(":")).map(t.last).map(t.trim).reduce((function(e,t){return e.indexOf(t)>-1?e:e.concat([t])}),[]);return r.indexOf("INVALID")>-1||1!==r.length?"":r[0]},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var n=t.content().content;return n.textBetween(0,n.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(5),a=n(3),i=n(6);t.changeStyleFromMark=function(e,t){var n=e.find((function(e){return"style"===e.type.name})),r=n&&n.attrs.style;return a.changeStyles(r,t)},t.changeStyleMark=function(e,n,a,i,s){var l=s.create({style:i.style}),u=[],c=[],d=null,f=null;return e.doc.nodesBetween(n,a,(function(e,p,m){if(e.isInline){var g=e.marks;if(!l.isInSet(g)&&m.type.allowsMarkType(l.type)){var y=Math.max(p,n),v=Math.min(p+e.nodeSize,a),h=t.changeStyleFromMark(g,i);if(h.changed||i.newValue){for(var k=h.changed?{style:h.style||null}:{style:[i.style]+": "+i.newValue+";"},b=s.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,M=b?r.__assign({},b.attrs,k):k,_=s.create(M),S=_.addToSet(g),I=0;I<g.length;I++)g[I].isInSet(S)||(d&&d.to===y&&d.mark.eq(g[I])?d.to=v:(d=new o.RemoveMarkStep(y,v,g[I]),u.push(d)));var O=f&&f.to===y,w=O&&_.attrs.style===f.mark.attrs.style;O&&w?f.to=v:Object.keys(M).some((function(e){return null!==M[e]}))&&(f=new o.AddMarkStep(y,v,_),c.push(f))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0},t.hasStyle=function(e,n){var r=e.selection,o=r.from,a=r.$from,i=r.to,s=r.empty,l=!1,u={style:n.name,value:n.value};return s?l=t.changeStyleFromMark(e.storedMarks||a.marks(),u).changed:e.doc.nodesBetween(o,i,(function(e,n,r){!l&&e.isInline&&(l=t.changeStyleFromMark(e.marks,u).changed)})),l},t.getInlineStyles=function(e,n){var r,o=e.selection,a=o.from,i=o.$from,s=o.to,l=o.empty,u=[],c={style:n.name,value:n.value};return l?(r=t.changeStyleFromMark(e.storedMarks||i.marks(),c)).changed&&(u=r.styleMatches):e.doc.nodesBetween(a,s,(function(e,n,o){e.isInline&&((r=t.changeStyleFromMark(e.marks,c)).changed?u.push.apply(u,r.styleMatches):u.push(null))})),u.filter((function(e){return null!==e}))},t.changeStyle=function(e,n){return function(o,a,s){var l=o.selection,u=l.empty,c=l.$cursor,d=l.ranges;if(u&&!c||!i.markApplies(o.doc,d,e))return!1;var f=!1;if(a)if(s=s||o.tr,c){var p=o.storedMarks||c.marks();if(e.isInSet(p)){var m=t.changeStyleFromMark(p,n),g=p.find((function(e){return"style"===e.type.name})),y=r.__assign({},g?g.attrs:{},{style:m.style||null});a(s.removeStoredMark(e)),Object.keys(y).some((function(e){return null!==y[e]}))&&a(s.addStoredMark(e.create(y))),f=!0}}else{for(var v=0;v<d.length;v++){var h=d[v],k=h.$from,b=h.$to;f=t.changeStyleMark(s,k.pos,b.pos,n,e)}f&&(s.scrollIntoView(),a(s))}return f}},t.toggleInlineFormat=function(e,n,r){return function(o,a){var s=o.schema.marks,l=e.altStyle,u=e.altMarks,c=void 0===u?[]:u,d=e.mark;n=n||o.tr;var f=!1,p=!1,m=function(){return p=!0};if(l&&s.style){var g=s.style;f=t.changeStyle(g,{style:l.name,value:l.value})(o,m,n)}var y=[d].concat(c).filter((function(e){return s[e]})).map((function(e){return i.hasMark(o,{mark:e})&&s[e]})).filter((function(e){return e}));return y.length?i.removeMarks(y,o,m,n):f||i.toggleMark(s[d],r,n)(o,m),p&&a(n),p}},t.applyInlineStyle=function(e,n){return function(o,s){var l=o.schema.marks.style,u={style:e.style,value:/^.+$/,newValue:e.value},c=o.tr;n&&c.setMeta("commandName",n),c.setMeta("args",e);var d=o.selection,f=d.empty,p=d.$cursor,m=d.ranges;if(f&&!p||!i.markApplies(o.doc,m,l))return!1;if(p){var g=o.storedMarks||p.marks(),y=l.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,v={style:null};if(y&&y.attrs.style){var h=a.changeStyles(y.attrs.style,u);h.changed&&h.style&&(v.style=h.style)}else u.newValue&&(v.style=[u.style]+": "+u.newValue+";");var k=y?r.__assign({},y.attrs,v):v;return Object.keys(k).some((function(e){return null!==k[e]}))?s(c.addStoredMark(l.create(k))):s(c.removeStoredMark(l)),!0}return t.changeStyle(l,u)(o,s,c)}}},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(2),a=n(0),i=n(4);t.markApplies=function(e,t,n){for(var r=function(r){var o=t[r],a=o.$from,i=o.$to,s=0===a.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(a.pos,i.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 a=r(o);if(a)return a.v}return!1},t.toggleMark=function(e,n,r){return function(o,a){var i=o.selection,s=i.empty,l=i.$cursor,u=i.ranges;if(s&&!l||!t.markApplies(o.doc,u,e))return!1;if(a)if(l)e.isInSet(o.storedMarks||l.marks())?a(r.removeStoredMark(e)):a(r.addStoredMark(e.create(n)));else{for(var c=!1,d=0;!c&&d<u.length;d++){var f=u[d],p=f.$from,m=f.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(d=0;d<u.length;d++){var g=u[d];p=g.$from,m=g.$to;c?r.removeMark(p.pos,m.pos,e):r.addMark(p.pos,m.pos,e.create(n))}a(r.scrollIntoView())}return!0}},t.removeMark=function(e,t,n,a){void 0===a&&(a=null);var i=[],s=0;return e.doc.nodesBetween(t,n,(function(e,r){if(e.isInline){s++;var l=null;if(a instanceof o.MarkType){var u=a.isInSet(e.marks);u&&(l=[u])}else a?a.isInSet(e.marks)&&(l=[a]):l=e.marks;if(l&&l.length)for(var c=Math.min(r+e.nodeSize,n),d=0;d<l.length;d++){for(var f=l[d],p=void 0,m=0;m<i.length;m++){var g=i[m];g.step===s-1&&f.eq(g.style)&&(p=g)}p?(p.to=c,p.step=s):i.push({style:f,from:Math.max(r,t),to:c,step:s})}}})),i.forEach((function(t){return e.step(new r.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,n,r,o){var a=n.selection,i=a.$cursor,s=a.ranges;if(o=o||n.tr,i)e.forEach((function(e){e.isInSet(n.storedMarks||i.marks())&&r(o.removeStoredMark(e))}));else{for(var l=function(n){var r=s[n],a=r.$from,i=r.$to;e.forEach((function(e){t.removeMark(o,a.pos,i.pos,e)}))},u=0;u<s.length;u++)l(u);r(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,n=void 0===t?[]:t;return function(e,t){var r,o=e.schema,a=e.selection,i=a.$cursor,s=a.from,l=a.to,u=e.tr,c=(r=n,r instanceof Array?r:[r]).map((function(e){return e.name}));i||(Object.keys(o.marks).map((function(e){return o.marks[e]})).filter((function(e){return-1===c.indexOf(e.name)})).forEach((function(e){return u.removeMark(s,l,e)})),t(u))}},t.getParentMark=function(e,t){var n=e.selection,r=n.from,o=n.$from,a=n.to,i=n.empty,s=e.doc;if(i)return t.isInSet(e.storedMarks||o.marks())||null;var l=[];return s.nodesBetween(r,a,(function(e){e.isInline&&l.push(t.isInSet(e.marks))})),1===l.length&&l[0]?l[0]:null},t.hasMark=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return r[e]})),a=t.altStyle,s=e.selection,l=s.from,u=s.$from,c=s.to,d=s.empty,f=r[t.mark],p=e.doc,m=!1;return d?(n=e.storedMarks||u.marks(),m=f&&f.isInSet(n)||o.some((function(e){return r[e].isInSet(n)}))):m=f&&p.rangeHasMark(l,c,f)||o.some((function(e){return p.rangeHasMark(l,c,r[e])})),!m&&a?i.hasStyle(e,a):!!m},t.getMark=function(e,t){var n,r=e.selection,o=r.from,a=r.$from,i=r.to,s=r.empty,l=e.doc;return s?n=t.isInSet(e.storedMarks||a.marks()):l.nodesBetween(o,i,(function(e){e.isInline&&!n&&(n=t.isInSet(e.marks))})),n};t.getActiveMarks=function(e,t){var n=e.selection,r=!1;if(n instanceof a.TextSelection&&n.$cursor)return{hasNodesWithoutMarks:r,marks:n.$cursor.marks().filter((function(e){return!t||e.type.name===t.name}))};var o=[];return n.content().content.descendants((function(e){if("text"===e.type.name){var n=t?function(e,t){return t.marks.filter((function(t){return t.type.name===e.name}))}(t,e):e.marks;e.marks.length>0&&n.length>0?o.push.apply(o,n):r=!0}})),{hasNodesWithoutMarks:r,marks:o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(3),a=n(5),i=n(2),s=n(0);t.changeBlockNode=function(e,t,n,r,o,s){var l=e.selection,u=l.from,c=l.to,d=!1;if(e.doc.nodesBetween(u,c,(function(t,n){if(d)return!1;if(t.isTextblock&&!t.hasMarkup(o,s))if(t.type===o)d=!0;else{var r=e.doc.resolve(n),a=r.index();d=r.parent.canReplaceWith(a,a+1,o)}})),!d)return!1;if(t){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var f=n.steps.length;n.doc.nodesBetween(u,c,(function(e,t){if(e.eq(r)&&e.isTextblock&&!e.hasMarkup(o,s)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(n.doc,n.mapping.slice(f).map(t),o)){n.clearIncompatible(n.mapping.slice(f).map(t,1),o);var l=n.mapping.slice(f),u=l.map(t,1),c=l.map(t+e.nodeSize,1),d=new i.Slice(i.Fragment.from(o.create(s,null,e.marks)),0,0);return n.step(new a.ReplaceAroundStep(u,c,u+1,c-1,d,1,!0)),!1}}))}return!0},t.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},t.formatBlockElements=function(e,n){return function(o,a){var i=t.blockNodes(o),s=o.schema.nodes,l=!1,u=o.tr;return u.setMeta("commandName",n),u.setMeta("args",{value:e}),i.forEach((function(n){if(n.type.isTextblock)if("p"===e){var i=n.attrs,c=i.level,d=r.__rest(i,["level"]);l=t.changeBlockNode(o,a,u,n,s.paragraph,d)||l}else if(/^h[1-6]$/i.test(e)){c=parseInt(e.substr(1),10);l=t.changeBlockNode(o,a,u,n,s.heading,r.__assign({},n.attrs,{level:c}))||l}else if("blockquote"===e){var f=n.attrs;c=f.level,d=r.__rest(f,["level"]);l=t.changeBlockNode(o,a,u,n,s.blockquote,d)||l}})),l&&a(u.scrollIntoView()),l}},t.getBlockFormats=function(e){var n=t.blockNodes(e),r=e.schema.nodes,o=[];return n.forEach((function(e){if(e.type===r.paragraph)o.push("p");else if(e.type===r.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){o.push("h"+t);break}})),o},t.addStyles=function(e,t){var n=e.attrs.style,r=null,a=null;n&&t.forEach((function(e){a={style:e.name,value:/^.+$/,newValue:e.value},r=o.changeStyles(n,a),n=r.changed?r.style:n}));return n=n||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:n||null})},t.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};var l=function(e){return function(e,t){return Object.keys(e).filter((function(e){return t(e)})).reduce((function(t,n){var r;return Object.assign(t,((r={})[n]=e[n],r))}),{})}(e,(function(t){return null!==e[t]&&void 0!==e[t]&&""!==e[t]}))};t.getNodeTagName=function(e,t){var n,r=e.type.spec.parseDOM||[],o=e.attrs;return(n=1===r.length?r[0]:r.find((function(n){var r=i.DOMSerializer.fromSchema(t).serializeNode(e);return JSON.stringify(n.getAttrs(r))===JSON.stringify(l(o))})))?n.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},t.activeNode=function(e){var n,r=e.schema.nodes.doc;if(e.selection instanceof s.AllSelection)n=e.doc;else if(e.selection instanceof s.TextSelection){var a=e.selection.$anchor,i=a.node(a.blockRange().depth);n=o.getTypeName(i)===o.getTypeName(r)?a.node():i}else e.selection instanceof s.NodeSelection&&(n=e.selection.node);return{name:o.getTypeName(n),tag:t.getNodeTagName(n,e.schema)}}},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(10),a=["blockquote",0],i=["hr"],s=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],d=function(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n},f=function(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return!0;return!1},p=function(e,t){var n={};for(var r in e)r&&null!==e[r]&&r!==t&&(n[r]=e[r]);return n},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},g=r.__assign({link:{attrs:r.__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:d}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=g;var y=r.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return a}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return i}},heading:{attrs:r.__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 r.__assign({},d(e),{level:1})}},{tag:"h2",getAttrs:function(e){return r.__assign({},d(e),{level:2})}},{tag:"h3",getAttrs:function(e){return r.__assign({},d(e),{level:3})}},{tag:"h4",getAttrs:function(e){return r.__assign({},d(e),{level:4})}},{tag:"h5",getAttrs:function(e){return r.__assign({},d(e),{level:5})}},{tag:"h6",getAttrs:function(e){return r.__assign({},d(e),{level:6})}}],toDOM:function(e){return f(e.attrs,"level")?["h"+e.attrs.level,p(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 s}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:r.__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:d}],toDOM:function(e){return f(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return r.__assign({},d(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?f(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",r.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"block*",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=y},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(12);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,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(2),a=n(0),i=n(5),s=n(14),l=n(8),u=n(8),c=n(12);function d(e,n,r){var o=e.selection,a=o.from,i=o.to,s=e.schema.nodes,l=s.paragraph,u=s.heading,c=[];n.doc.nodesBetween(a,i,(function(e,t){e.type!==l&&e.type!==u||c.push({node:e,pos:t})}));for(var d=c.length-1;d>=0;d--){var f=c[d],p=n.doc.resolve(n.mapping.map(f.pos));if(p.depth>0){var m=void 0;m=f.node.textContent&&f.node.textContent.length>0?n.doc.resolve(n.mapping.map(f.pos+f.node.textContent.length)):n.doc.resolve(n.mapping.map(f.pos+1));var g=p.blockRange(m);g&&n.lift(g,t.getListLiftTarget(e.schema,p,r))}}return n}function f(e){return function(t,n,r){if(!r)return!1;var o=(t=r.state).schema.nodes[e.listType],a=t.selection,i=a.$from,s=a.$to,l=i.node(-2),u=i.node(-3),c=g(t.doc,i,s,o);return(l&&l.type===o||u&&u.type===o)&&c?h(e)(t,n):(c||(h(e)(t,n),t=r.state),k(o)(t,n))}}function p(e,t,n,r){r||(r=e.schema.nodes.listItem);var a=t.$from,s=t.$to,l=a.blockRange(s,(function(e){return e.childCount&&e.firstChild.type===r}));if(!l||l.depth<2||a.node(l.depth-1).type!==r)return n;var u=l.end,c=s.end(l.depth);return u<c&&(n.step(new i.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(r.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(n.doc.resolve(a.pos),n.doc.resolve(c),l.depth)),n.lift(l,i.liftTarget(l)).scrollIntoView()}function m(e,t,n,r,o,i){i||(i=e.schema.nodes.listItem);var s=!1;return o.doc.nodesBetween(t,n,(function(n,l){if(!s&&n.type===i&&l>t){s=!0;for(var u=r+3;u>r+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var d=o.doc.resolve(o.mapping.map(l+n.textContent.length)),f=new a.TextSelection(c,d);o=p(e,f,o,i)}}})),o}function g(e,t,n,r){return 0===y(e,t,n).filter((function(e){return e.type!==r})).length}function y(e,t,n){for(var r=Array(),o=v(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}function v(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}function h(e){return function(t,n){var r=t.tr,o=t.selection,s=o.$from,l=o.$to;return r.doc.nodesBetween(s.pos,l.pos,(function(n,o){if(n.isTextblock||"blockquote"===n.type.name||"div"===n.type.name){var s=new a.NodeSelection(r.doc.resolve(r.mapping.map(o))),l=s.$from.blockRange(s.$to);if(!l||s.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&i.liftTarget(l);if(null==u)return!1;r.lift(l,u)}})),n&&n(r),!0}}function k(e){return s.autoJoin(l.wrapInList(e),(function(t,n){return t.type===n.type&&t.type===e}))}t.rootListDepth=function(e,t){for(var n,r=t.bulletList,o=t.orderedList,a=t.listItem,i=e.depth-1;i>0;i--){var s=e.node(i);if(s.type!==r&&s.type!==o||(n=i),s.type!==r&&s.type!==o&&s.type!==a)break}return n},t.getListLiftTarget=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;s>0;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},t.liftSelectionList=d,t.toggleList=function(e,n,r,o,a){var i=o.listType,s=e.selection,l=s.$from.node(s.$from.depth-2),u=s.$to.node(s.$to.depth-2);if(l&&l.type.name===i&&u&&u.type.name===i){var c=r.state.schema.nodes,p={bulletList:c[o.bulletList],orderedList:c[o.orderedList],listItem:c[o.listItem]},g=t.rootListDepth(s.$to,p),y=m(e,s.$to.pos,s.$to.end(g),g,r.state.tr,p.listItem);return(y=d(e,y,o)).setMeta("commandName",a),n(y),!0}return f(o)(e,n,r)},t.toggleListCommand=f,t.liftFollowingList=m,t.isRangeOfType=g,t.getAncestorNodesBetween=y,t.findAncestorPosition=v,t.liftListItems=h,t.wrapInList=k,t.toggleUnorderedList=function(e,n,o){return t.toggleList(e,n,o,r.__assign({listType:c.bulletList.listType},c.bulletList.types))},t.toggleOrderedList=function(e,n,o){return t.toggleList(e,n,o,r.__assign({listType:c.orderedList.listType},c.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,n){return u.splitListItem(e)(t,(function(e){var r=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();r&&e.ensureMarks(r),n(e)}))}}},function(e,t){e.exports=a},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17);t.getHtml=r.getHtml,t.setHtml=r.setHtml;var o=n(4);t.applyInlineStyle=o.applyInlineStyle,t.toggleInlineFormat=o.toggleInlineFormat;var a=n(18);t.applyLink=a.applyLink,t.removeLink=a.removeLink;var i=n(19);t.insertText=i.insertText;var s=n(20);t.insertImage=s.insertImage;var l=n(21);t.alignBlocks=l.alignBlocks,t.isAligned=l.isAligned;var u=n(7);t.hasNode=u.hasNode,t.activeNode=u.activeNode,t.formatBlockElements=u.formatBlockElements;var c=n(6);t.hasMark=c.hasMark,t.getMark=c.getMark,t.getActiveMarks=c.getActiveMarks,t.removeAllMarks=c.removeAllMarks;var d=n(22);t.indent=d.indent,t.canIndentAsListItem=d.canIndentAsListItem,t.outdent=d.outdent,t.canOutdentAsListItem=d.canOutdentAsListItem,t.isIndented=d.isIndented,t.canBeIndented=d.canBeIndented;var f=n(13);t.toggleOrderedList=f.toggleOrderedList,t.toggleUnorderedList=f.toggleUnorderedList;var p=n(3);t.createContentNode=p.createContentNode,t.hasSameMarkup=p.hasSameMarkup,t.getUniqueStyleValues=p.getUniqueStyleValues,t.getSelectionText=p.getSelectionText,t.getNodeFromSelection=p.getNodeFromSelection,t.canInsert=p.canInsert,t.insertNode=p.insertNode;var m=n(15);t.redo=m.redo,t.undo=m.undo;var g=n(23);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignRemoveRules=g.alignRemoveRules;var y=n(11);t.indentRules=y.indentRules,t.outdentRules=y.outdentRules;var v=n(9);t.nodes=v.nodes,t.marks=v.marks;var h=n(24);t.buildKeymap=h.buildKeymap,t.buildListKeymap=h.buildListKeymap;var k=n(26);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 b=n(27);t.createTable=b.createTable;var M=n(10);t.addRowBefore=M.addRowBefore,t.addRowAfter=M.addRowAfter,t.addColumnBefore=M.addColumnBefore,t.addColumnAfter=M.addColumnAfter,t.deleteRow=M.deleteRow,t.deleteColumn=M.deleteColumn,t.deleteTable=M.deleteTable,t.mergeCells=M.mergeCells,t.splitCell=M.splitCell,t.selectionCell=M.selectionCell},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(0);t.createContentNode=function(e,t,n){var o=document.createElement("div");return o.innerHTML=e,r.DOMParser.fromSchema(t).parse(o,n)},t.getHtml=function(e){var t=r.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),n=document.createElement("div");return n.appendChild(t),n.innerHTML},t.setHtml=function(e,n,r){return void 0===n&&(n="setHTML"),void 0===r&&(r={preserveWhitespace:"full"}),function(a,i){return i(a.tr.setSelection(new o.AllSelection(a.doc)).replaceSelectionWith(t.createContentNode(e,a.schema,r)).setMeta("commandName",n))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),o=n(6),a=n(0);t.removeLink=function(e,t){return function(n,a){var i=n.selection.$cursor;if(i){var s=i.parent,l=i.index(),u=n.schema.marks[e.mark],c=s.child(l).marks.find((function(e){return e.type===u})),d=s.childCount,f=i.pos-i.textOffset,p=s.child(l).nodeSize,m=void 0,g=void 0;for(m=l-1;m>=0&&c.isInSet(s.child(m).marks);)p+=g=s.child(m).nodeSize,f-=g,m-=1;for(m=l+1;m<d&&c.isInSet(s.child(m).marks);)p+=s.child(m).nodeSize,m+=1;a(o.removeMark(t||n.tr,f,f+p,c))}else r.toggleInlineFormat(e,t)(n,a)}},t.applyLink=function(e,n){var i=e.mark,s=e.attrs;return function(e,l){var u=e.schema.marks,c=e.tr;n&&(c.setMeta("commandName",n),c.setMeta("args",s));var d=!1,f=function(){return d=!0};if(o.getParentMark(e,u[i]))!function(e,t){return function(n,r){var o=n.selection,a=o.$cursor,i=o.from,s=o.to,l=n.schema.marks[e.mark];if(a){var u=a.parent,c=a.index(),d=u.child(c).marks.find((function(e){return e.type===l})),f=u.childCount,p=a.pos-a.textOffset,m=u.child(c).nodeSize,g=void 0,y=void 0;for(g=c-1;g>=0&&d.isInSet(u.child(g).marks);)m+=y=u.child(g).nodeSize,p-=y,g-=1;for(g=c+1;g<f&&d.isInSet(u.child(g).marks);)m+=u.child(g).nodeSize,g+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),r(t)}else t.doc.nodesBetween(i,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:i,attrs:s},c)(e,f);else{var p=e;o.hasMark(e,{mark:i})&&(t.removeLink({mark:i,attrs:s},c)(e,f),p=a.EditorState.create({doc:c.doc,selection:c.selection})),d?o.toggleMark(u[i],s,c)(p,f):r.toggleInlineFormat({mark:i},c,s)(p,f)}return d&&l(c),d}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,n){n(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);t.insertImage=function(e){return function(t,n){var o=t.schema.nodes.image,a=o.createAndFill(e);r.insertNode(a)(t,(function(t){return n(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7);t.alignBlocks=function(e){return function(t,n){var o=r.blockNodes(t),a=t.tr,i=!1;return o.forEach((function(o){if(o.type.isTextblock){var s={},l=e.find((function(e){return e.node===o.type.name}));l&&(s=r.addStyles(o,l.style)),i=r.changeBlockNode(t,n,a,o,o.type,s)||i}})),i&&n(a.scrollIntoView()),i}},t.isAligned=function(e,t){var n=r.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));n&&(o=n.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),o=n(11),a=n(7),i=n(3);t.indentBlocks=function(e,t,n){return function(r,o){var i=a.blockNodes(r),s=r.tr,l=!1;return s.setMeta("commandName",t),i.forEach((function(t){if(t.type.isTextblock){var i=void 0,u=e.find((function(e){return e.node===t.type.name}));if(u){var c="rtl"===n?u.rtlStyle:u.style,d={name:c,value:u.step>0?""+u.step+u.unit:""};if(t.attrs.style){var f=new RegExp(c+":\\s?(\\d+)"+u.unit,"i"),p=t.attrs.style.match(f);if(p){var m=parseFloat(p[1])+u.step;m=m<=0?"":m,d.value=""+m+(m?u.unit:"")}}i=a.addStyles(t,[d])}i&&(l=a.changeBlockNode(r,o,s,t,t.type,i)||l)}})),l&&o(s.scrollIntoView()),l}},t.isIndented=function(e,t,n){var r=a.blockNodes(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 a="rtl"===n?r.rtlStyle:r.style,i=new RegExp(a+":\\s?\\d+"+r.unit,"i");o=i.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return r.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],a=e.schema.nodes[t.listsTypes.bulletList],s=!!i.findNthParentNodeOfType(o,2)(e.selection),l=!!i.findNthParentNodeOfType(a,2)(e.selection);return(s||l)&&r.liftListItem(n)(e)},t.canBeIndented=function(e,n){var r=e.schema.nodes,i=r[o.indentRules.listsTypes.listItem];return(t.isIndented(e,n.nodes)||o.indentRules.nodes.some((function(t){return r[t.node]&&a.hasNode(e,r[t.node])})))&&!a.hasNode(e,i)},t.indent=function(e,n){var a=e.schema.nodes[o.indentRules.listsTypes.listItem],i=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,a)?r.sinkListItem(a)(e,n):i&&t.indentBlocks(o.indentRules.nodes)(e,n)},t.outdent=function(e,n){var a=e.schema.nodes[o.outdentRules.listsTypes.listItem],i=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?r.liftListItem(a)(e,n):i&&t.indentBlocks(o.outdentRules.nodes)(e,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[r("text-align","left")]},{node:"heading",style:[r("text-align","left")]},{node:"listItem",style:[r("text-align","left"),r("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]},{node:"listItem",style:[r("text-align","right"),r("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]},{node:"listItem",style:[r("text-align","center"),r("list-style-position","inside")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]},{node:"listItem",style:[r("text-align",""),r("list-style-position","")]}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),o=n(15),a=n(25),i=n(13),s="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=r.chainCommands(a.undoInputRule,r.deleteSelection,r.joinBackward,r.selectNodeBackward),t.Enter=r.chainCommands(r.newlineInCode,r.createParagraphNear,r.liftEmptyBlock,r.splitBlockKeepMarks),s||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=r.toggleMark(e.marks.strong)),e.marks.em&&(t["Mod-i"]=r.toggleMark(e.marks.em)),e.marks.underline&&(t["Mod-u"]=r.toggleMark(e.marks.underline)),e.nodes.hardBreak){var n=e.nodes.hardBreak,i=r.chainCommands(r.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0}));t["Mod-Enter"]=i,t["Shift-Enter"]=i,s&&(t["Ctrl-Enter"]=i)}return t},t.buildListKeymap=function(e){var t={};return e.nodes.listItem&&(t.Enter=i.splitListItemKeepMarks(e.nodes.listItem)),t}},function(e,t){e.exports=s},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,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,n){for(var r=e.table,o=e.table_row,a=e.table_cell,i=[],s=[],l=0;l<t+1;l++){s.length=0;for(var u=0;u<n+1;u++)s.push(a.createAndFill());i.push(o.createAndFill(void 0,s))}return r.createAndFill(void 0,i)}}])}));
var 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)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var 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}).apply(this,arguments)};function i(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}function s(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function l(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(i,s)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function f(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function v(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function h(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof y?Promise.resolve(n.value.v).then(l,u):c(a[0][2],n)}catch(e){c(a[0][3],e)}var n}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function k(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(0),a=n(6),i=n(8),s=n(4);t.changeStyles=function(e,t){var n=t.style,r=t.value,o=t.newValue,a=[];if(e){var i=e.split(/\s*;\s*/).filter((function(e){return e})),s=i.filter((function(e){if(!e.toLowerCase().trim().startsWith(n))return!0;var t=e.split(":")[1].trim();return!r.test(t)||(a.push(t),!1)}));return o&&s.push(n+": "+o),{style:s.join("; ")+(s.length?";":""),changed:!!o||s.length!==i.length,styleMatches:a}}return{changed:!1,styleMatches:a,style:null}},t.changeStyle=function(e,t){return function(n,r,o){var i=n.selection,l=i.empty,u=i.$cursor,c=i.ranges;if(l&&!u||!a.markApplies(n.doc,c,e))return!1;var d=!1;if(r)if(o=o||n.tr,u){var f=n.storedMarks||u.marks();if(e.isInSet(f)){var p=s.changeStyleFromMark(f,t);r(o.removeStoredMark(e)),r(o.addStoredMark(e.create({style:p.style}))),d=!0}}else{for(var m=0;m<c.length;m++){var g=c[m],v=g.$from,y=g.$to;d=s.changeStyleMark(o,v.pos,y.pos,t,e)}d&&(o.scrollIntoView(),r(o))}return d}},t.canInsert=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},t.getTypeName=function(e){return e instanceof r.Node?e.type.name:e.name},t.findParentNode=function(e){return function(t){for(var n=t.$from,r=n.depth;r>0;r--){var o=n.node(r);if(e(o))return{depth:r,node:o}}}},t.findNthParentNode=function(e,t){return void 0===t&&(t=1),function(n){for(var r=n.$from,o=r.depth;o>0;o--){var a=r.node(o);if(e(a)&&0===(t-=1))return{depth:o,node:a}}}},t.findNthParentNodeOfType=function(e,n){return void 0===n&&(n=1),function(r){return t.findNthParentNode((function(n){return t.getTypeName(n)===t.getTypeName(e)}),n)(r)}},t.insertNode=function(e,t){return function(n,r){var o=n.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),r(o)}},t.isNullOrUndefined=function(e){return null==e},t.safeString=function(e){return t.isNullOrUndefined(e)?"":e.toString()},t.createContentNode=function(e){var n=document.createElement("div");return n.innerHTML=t.safeString(e).trim(),r.DOMParser.fromSchema(new r.Schema({nodes:i.nodes,marks:i.marks})).parse(n)},t.hasSameMarkup=function(e,n){var o=r.Fragment.from(t.createContentNode(e)),a=r.Fragment.from(t.createContentNode(n));return o.eq(a)},t.first=function(e){return e[0]},t.last=function(e){return e[e.length-1]},t.split=function(e){return function(t){return t.split(e)}},t.trim=function(e){return e.trim()},t.filter=function(e){return function(t){return t.filter(e)}},t.getUniqueStyleValues=function(e,n){if(e.hasNodesWithoutMarks)return"";var r=e.marks.filter((function(e){return"style"===e.type.name})).map((function(e){return e.attrs.style})).map(t.split(";")).map(t.filter((function(e){return e.includes(n)}))).map((function(e){return 0!==e.length?e:[n+": INVALID"]})).map(t.first).map(t.split(":")).map(t.last).map(t.trim).reduce((function(e,t){return e.indexOf(t)>-1?e:e.concat([t])}),[]);return r.indexOf("INVALID")>-1||1!==r.length?"":r[0]},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var n=t.content().content;return n.textBetween(0,n.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node},t.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,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(5),a=n(3),i=n(6);t.changeStyleFromMark=function(e,t){var n=e.find((function(e){return"style"===e.type.name})),r=n&&n.attrs.style;return a.changeStyles(r,t)},t.changeStyleMark=function(e,n,a,i,s){var l=s.create({style:i.style}),u=[],c=[],d=null,f=null;return e.doc.nodesBetween(n,a,(function(e,p,m){if(e.isInline){var g=e.marks;if(!l.isInSet(g)&&m.type.allowsMarkType(l.type)){var v=Math.max(p,n),y=Math.min(p+e.nodeSize,a),h=t.changeStyleFromMark(g,i);if(h.changed||i.newValue){for(var k=h.changed?{style:h.style||null}:{style:[i.style]+": "+i.newValue+";"},b=s.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,M=b?r.__assign({},b.attrs,k):k,_=s.create(M),S=_.addToSet(g),I=0;I<g.length;I++)g[I].isInSet(S)||(d&&d.to===v&&d.mark.eq(g[I])?d.to=y:(d=new o.RemoveMarkStep(v,y,g[I]),u.push(d)));var w=f&&f.to===v,O=w&&_.attrs.style===f.mark.attrs.style;w&&O?f.to=y:Object.keys(M).some((function(e){return null!==M[e]}))&&(f=new o.AddMarkStep(v,y,_),c.push(f))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0},t.hasStyle=function(e,n){var r=e.selection,o=r.from,a=r.$from,i=r.to,s=r.empty,l=!1,u={style:n.name,value:n.value};return s?l=t.changeStyleFromMark(e.storedMarks||a.marks(),u).changed:e.doc.nodesBetween(o,i,(function(e,n,r){!l&&e.isInline&&(l=t.changeStyleFromMark(e.marks,u).changed)})),l},t.getInlineStyles=function(e,n){var r,o=e.selection,a=o.from,i=o.$from,s=o.to,l=o.empty,u=[],c={style:n.name,value:n.value};return l?(r=t.changeStyleFromMark(e.storedMarks||i.marks(),c)).changed&&(u=r.styleMatches):e.doc.nodesBetween(a,s,(function(e,n,o){e.isInline&&((r=t.changeStyleFromMark(e.marks,c)).changed?u.push.apply(u,r.styleMatches):u.push(null))})),u.filter((function(e){return null!==e}))},t.changeStyle=function(e,n){return function(o,a,s){var l=o.selection,u=l.empty,c=l.$cursor,d=l.ranges;if(u&&!c||!i.markApplies(o.doc,d,e))return!1;var f=!1;if(a)if(s=s||o.tr,c){var p=o.storedMarks||c.marks();if(e.isInSet(p)){var m=t.changeStyleFromMark(p,n),g=p.find((function(e){return"style"===e.type.name})),v=r.__assign({},g?g.attrs:{},{style:m.style||null});a(s.removeStoredMark(e)),Object.keys(v).some((function(e){return null!==v[e]}))&&a(s.addStoredMark(e.create(v))),f=!0}}else{for(var y=0;y<d.length;y++){var h=d[y],k=h.$from,b=h.$to;f=t.changeStyleMark(s,k.pos,b.pos,n,e)}f&&(s.scrollIntoView(),a(s))}return f}},t.toggleInlineFormat=function(e,n,r){return function(o,a){var s=o.schema.marks,l=e.altStyle,u=e.altMarks,c=void 0===u?[]:u,d=e.mark;n=n||o.tr;var f=!1,p=!1,m=function(){return p=!0};if(l&&s.style){var g=s.style;f=t.changeStyle(g,{style:l.name,value:l.value})(o,m,n)}var v=[d].concat(c).filter((function(e){return s[e]})).map((function(e){return i.hasMark(o,{mark:e})&&s[e]})).filter((function(e){return e}));return v.length?i.removeMarks(v,o,m,n):f||i.toggleMark(s[d],r,n)(o,m),p&&a(n),p}},t.applyInlineStyle=function(e,n){return function(o,s){var l=o.schema.marks.style,u={style:e.style,value:/^.+$/,newValue:e.value},c=o.tr;n&&c.setMeta("commandName",n),c.setMeta("args",e);var d=o.selection,f=d.empty,p=d.$cursor,m=d.ranges;if(f&&!p||!i.markApplies(o.doc,m,l))return!1;if(p){var g=o.storedMarks||p.marks(),v=l.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,y={style:null};if(v&&v.attrs.style){var h=a.changeStyles(v.attrs.style,u);h.changed&&h.style&&(y.style=h.style)}else u.newValue&&(y.style=[u.style]+": "+u.newValue+";");var k=v?r.__assign({},v.attrs,y):y;return Object.keys(k).some((function(e){return null!==k[e]}))?s(c.addStoredMark(l.create(k))):s(c.removeStoredMark(l)),!0}return t.changeStyle(l,u)(o,s,c)}}},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(2),a=n(0),i=n(4);t.markApplies=function(e,t,n){for(var r=function(r){var o=t[r],a=o.$from,i=o.$to,s=0===a.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(a.pos,i.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 a=r(o);if(a)return a.v}return!1},t.toggleMark=function(e,n,r){return function(o,a){var i=o.selection,s=i.empty,l=i.$cursor,u=i.ranges;if(s&&!l||!t.markApplies(o.doc,u,e))return!1;if(a)if(l)e.isInSet(o.storedMarks||l.marks())?a(r.removeStoredMark(e)):a(r.addStoredMark(e.create(n)));else{for(var c=!1,d=0;!c&&d<u.length;d++){var f=u[d],p=f.$from,m=f.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(d=0;d<u.length;d++){var g=u[d];p=g.$from,m=g.$to;c?r.removeMark(p.pos,m.pos,e):r.addMark(p.pos,m.pos,e.create(n))}a(r.scrollIntoView())}return!0}},t.removeMark=function(e,t,n,a){void 0===a&&(a=null);var i=[],s=0;return e.doc.nodesBetween(t,n,(function(e,r){if(e.isInline){s++;var l=null;if(a instanceof o.MarkType){var u=a.isInSet(e.marks);u&&(l=[u])}else a?a.isInSet(e.marks)&&(l=[a]):l=e.marks;if(l&&l.length)for(var c=Math.min(r+e.nodeSize,n),d=0;d<l.length;d++){for(var f=l[d],p=void 0,m=0;m<i.length;m++){var g=i[m];g.step===s-1&&f.eq(g.style)&&(p=g)}p?(p.to=c,p.step=s):i.push({style:f,from:Math.max(r,t),to:c,step:s})}}})),i.forEach((function(t){return e.step(new r.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,n,r,o){var a=n.selection,i=a.$cursor,s=a.ranges;if(o=o||n.tr,i)e.forEach((function(e){e.isInSet(n.storedMarks||i.marks())&&r(o.removeStoredMark(e))}));else{for(var l=function(n){var r=s[n],a=r.$from,i=r.$to;e.forEach((function(e){t.removeMark(o,a.pos,i.pos,e)}))},u=0;u<s.length;u++)l(u);r(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,n=void 0===t?[]:t;return function(e,t){var r,o=e.schema,a=e.selection,i=a.$cursor,s=a.from,l=a.to,u=e.tr,c=(r=n,r instanceof Array?r:[r]).map((function(e){return e.name}));i||(Object.keys(o.marks).map((function(e){return o.marks[e]})).filter((function(e){return-1===c.indexOf(e.name)})).forEach((function(e){return u.removeMark(s,l,e)})),t(u))}},t.getParentMark=function(e,t){var n=e.selection,r=n.from,o=n.$from,a=n.to,i=n.empty,s=e.doc;if(i)return t.isInSet(e.storedMarks||o.marks())||null;var l=[];return s.nodesBetween(r,a,(function(e){e.isInline&&l.push(t.isInSet(e.marks))})),1===l.length&&l[0]?l[0]:null},t.hasMark=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return r[e]})),a=t.altStyle,s=e.selection,l=s.from,u=s.$from,c=s.to,d=s.empty,f=r[t.mark],p=e.doc,m=!1;return d?(n=e.storedMarks||u.marks(),m=f&&f.isInSet(n)||o.some((function(e){return r[e].isInSet(n)}))):m=f&&p.rangeHasMark(l,c,f)||o.some((function(e){return p.rangeHasMark(l,c,r[e])})),!m&&a?i.hasStyle(e,a):Boolean(m)},t.getMark=function(e,t){var n,r=e.selection,o=r.from,a=r.$from,i=r.to,s=r.empty,l=e.doc;if(s)n=t.isInSet(e.storedMarks||a.marks());else{var u=[];l.nodesBetween(o,i,(function(e){e.isInline&&u.push(t.isInSet(e.marks))})),u.some((function(e){return!e}))||(n=u[u.length-1])}return n};t.getActiveMarks=function(e,t){var n=e.selection,r=!1;if(n instanceof a.TextSelection&&n.$cursor)return{hasNodesWithoutMarks:r,marks:n.$cursor.marks().filter((function(e){return!t||e.type.name===t.name}))};var o=[];return n.content().content.descendants((function(e){if("text"===e.type.name){var n=t?function(e,t){return t.marks.filter((function(t){return t.type.name===e.name}))}(t,e):e.marks;e.marks.length>0&&n.length>0?o.push.apply(o,n):r=!0}})),{hasNodesWithoutMarks:r,marks:o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(3),a=n(5),i=n(2),s=n(0);t.changeBlockNode=function(e,t,n,r,o,s){var l=e.selection,u=l.from,c=l.to,d=!1;if(e.doc.nodesBetween(u,c,(function(t,n){if(d)return!1;if(t.isTextblock&&!t.hasMarkup(o,s))if(t.type===o)d=!0;else{var r=e.doc.resolve(n),a=r.index();d=r.parent.canReplaceWith(a,a+1,o)}})),!d)return!1;if(t){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var f=n.steps.length;n.doc.nodesBetween(u,c,(function(e,t){if(e.eq(r)&&e.isTextblock&&!e.hasMarkup(o,s)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(n.doc,n.mapping.slice(f).map(t),o)){n.clearIncompatible(n.mapping.slice(f).map(t,1),o);var l=n.mapping.slice(f),u=l.map(t,1),c=l.map(t+e.nodeSize,1),d=new i.Slice(i.Fragment.from(o.create(s,null,e.marks)),0,0);return n.step(new a.ReplaceAroundStep(u,c,u+1,c-1,d,1,!0)),!1}}))}return!0},t.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},t.formatBlockElements=function(e,n){return function(o,a){var i=t.blockNodes(o),s=o.schema.nodes,l=!1,u=o.tr;return u.setMeta("commandName",n),u.setMeta("args",{value:e}),i.forEach((function(n){if(n.type.isTextblock)if("p"===e){var i=n.attrs,c=i.level,d=r.__rest(i,["level"]);l=t.changeBlockNode(o,a,u,n,s.paragraph,d)||l}else if(/^h[1-6]$/i.test(e)){c=parseInt(e.substr(1),10);l=t.changeBlockNode(o,a,u,n,s.heading,r.__assign({},n.attrs,{level:c}))||l}else if("blockquote"===e){var f=n.attrs;c=f.level,d=r.__rest(f,["level"]);l=t.changeBlockNode(o,a,u,n,s.blockquote,d)||l}})),l&&a(u.scrollIntoView()),l}},t.getBlockFormats=function(e){var n=t.blockNodes(e),r=e.schema.nodes,o=[];return n.forEach((function(e){if(e.type===r.paragraph)o.push("p");else if(e.type===r.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){o.push("h"+t);break}})),o},t.addStyles=function(e,t){var n=e.attrs.style,r=null,a=null;n&&t.forEach((function(e){a={style:e.name,value:/^.+$/,newValue:e.value},r=o.changeStyles(n,a),n=r.changed?r.style:n}));return n=n||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:n||null})},t.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};var l=function(e){return function(e,t){return Object.keys(e).filter((function(e){return t(e)})).reduce((function(t,n){var r;return Object.assign(t,((r={})[n]=e[n],r))}),{})}(e,(function(t){return null!==e[t]&&void 0!==e[t]&&""!==e[t]}))};t.getNodeTagName=function(e,t){var n,r=e.type.spec.parseDOM||[],o=e.attrs;return(n=1===r.length?r[0]:r.find((function(n){var r=i.DOMSerializer.fromSchema(t).serializeNode(e);return JSON.stringify(n.getAttrs(r))===JSON.stringify(l(o))})))?n.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},t.activeNode=function(e){var n,r=e.schema.nodes.doc;if(e.selection instanceof s.AllSelection)n=e.doc;else if(e.selection instanceof s.TextSelection){var a=e.selection.$anchor,i=a.node(a.blockRange().depth);n=o.getTypeName(i)===o.getTypeName(r)?a.node():i}else e.selection instanceof s.NodeSelection&&(n=e.selection.node);return{name:o.getTypeName(n),tag:t.getNodeTagName(n,e.schema)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(9),a=["blockquote",0],i=["hr"],s=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],d=function(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n},f=function(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return!0;return!1},p=function(e,t){var n={};for(var r in e)r&&null!==e[r]&&r!==t&&(n[r]=e[r]);return n},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},g=r.__assign({link:{attrs:r.__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:d}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=g;var v=r.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return a}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return i}},heading:{attrs:r.__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 r.__assign({},d(e),{level:1})}},{tag:"h2",getAttrs:function(e){return r.__assign({},d(e),{level:2})}},{tag:"h3",getAttrs:function(e){return r.__assign({},d(e),{level:3})}},{tag:"h4",getAttrs:function(e){return r.__assign({},d(e),{level:4})}},{tag:"h5",getAttrs:function(e){return r.__assign({},d(e),{level:5})}},{tag:"h6",getAttrs:function(e){return r.__assign({},d(e),{level:6})}}],toDOM:function(e){return f(e.attrs,"level")?["h"+e.attrs.level,p(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 s}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:r.__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:d}],toDOM:function(e){return f(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return r.__assign({},d(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?f(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",r.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"block*",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(12);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,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(2),a=n(0),i=n(5),s=n(14),l=n(10),u=n(12);function c(e,n,r){var o=e.selection,a=o.from,i=o.to,s=e.schema.nodes,l=s.paragraph,u=s.heading,c=[];n.doc.nodesBetween(a,i,(function(e,t){e.type!==l&&e.type!==u||c.push({node:e,pos:t})}));for(var d=c.length-1;d>=0;d--){var f=c[d],p=n.doc.resolve(n.mapping.map(f.pos));if(p.depth>0){var m=void 0;m=f.node.textContent&&f.node.textContent.length>0?n.doc.resolve(n.mapping.map(f.pos+f.node.textContent.length)):n.doc.resolve(n.mapping.map(f.pos+1));var g=p.blockRange(m);g&&n.lift(g,t.getListLiftTarget(e.schema,p,r))}}return n}function d(e){return function(t,n,r){if(!r)return!1;var o=(t=r.state).schema.nodes[e.listType],a=t.selection,i=a.$from,s=a.$to,l=i.node(-2),u=i.node(-3),c=m(t.doc,i,s,o);return(l&&l.type===o||u&&u.type===o)&&c?y(e)(t,n):(c||(y(e)(t,n),t=r.state),h(o)(t,n))}}function f(e,t,n,r){r||(r=e.schema.nodes.listItem);var a=t.$from,s=t.$to,l=a.blockRange(s,(function(e){return e.childCount&&e.firstChild.type===r}));if(!l||l.depth<2||a.node(l.depth-1).type!==r)return n;var u=l.end,c=s.end(l.depth);return u<c&&(n.step(new i.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(r.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(n.doc.resolve(a.pos),n.doc.resolve(c),l.depth)),n.lift(l,i.liftTarget(l)).scrollIntoView()}function p(e,t,n,r,o,i){i||(i=e.schema.nodes.listItem);var s=!1;return o.doc.nodesBetween(t,n,(function(n,l){if(!s&&n.type===i&&l>t){s=!0;for(var u=r+3;u>r+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var d=o.doc.resolve(o.mapping.map(l+n.textContent.length)),p=new a.TextSelection(c,d);o=f(e,p,o,i)}}})),o}function m(e,t,n,r){return 0===g(e,t,n).filter((function(e){return e.type!==r})).length}function g(e,t,n){for(var r=Array(),o=v(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}function v(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}function y(e){return function(t,n){var r=t.tr,o=t.selection,s=o.$from,l=o.$to;return r.doc.nodesBetween(s.pos,l.pos,(function(n,o){if(n.isTextblock||"blockquote"===n.type.name||"div"===n.type.name){var s=new a.NodeSelection(r.doc.resolve(r.mapping.map(o))),l=s.$from.blockRange(s.$to);if(!l||s.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&i.liftTarget(l);if(null==u)return!1;r.lift(l,u)}})),n&&n(r),!0}}function h(e){return s.autoJoin(l.wrapInList(e),(function(t,n){return t.type===n.type&&t.type===e}))}t.rootListDepth=function(e,t){for(var n,r=t.bulletList,o=t.orderedList,a=t.listItem,i=e.depth-1;i>0;i--){var s=e.node(i);if(s.type!==r&&s.type!==o||(n=i),s.type!==r&&s.type!==o&&s.type!==a)break}return n},t.getListLiftTarget=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;s>0;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},t.liftSelectionList=c,t.toggleList=function(e,n,r,o,a){var i=o.listType,s=e.selection,l=s.$from.node(s.$from.depth-2),u=s.$to.node(s.$to.depth-2);if(l&&l.type.name===i&&u&&u.type.name===i){var f=r.state.schema.nodes,m={bulletList:f[o.bulletList],orderedList:f[o.orderedList],listItem:f[o.listItem]},g=t.rootListDepth(s.$to,m),v=p(e,s.$to.pos,s.$to.end(g),g,r.state.tr,m.listItem);return(v=c(e,v,o)).setMeta("commandName",a),n(v),!0}return d(o)(e,n,r)},t.toggleListCommand=d,t.liftFollowingList=p,t.isRangeOfType=m,t.getAncestorNodesBetween=g,t.findAncestorPosition=v,t.liftListItems=y,t.wrapInList=h,t.toggleUnorderedList=function(e,n,o){return t.toggleList(e,n,o,r.__assign({listType:u.bulletList.listType},u.bulletList.types))},t.toggleOrderedList=function(e,n,o){return t.toggleList(e,n,o,r.__assign({listType:u.orderedList.listType},u.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,n){return l.splitListItem(e)(t,(function(e){var r=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();r&&e.ensureMarks(r),n(e)}))}}},function(e,t){e.exports=a},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17);t.getHtml=r.getHtml,t.setHtml=r.setHtml,t.parseContent=r.parseContent;var o=n(4);t.applyInlineStyle=o.applyInlineStyle,t.getInlineStyles=o.getInlineStyles,t.toggleInlineFormat=o.toggleInlineFormat;var a=n(18);t.applyLink=a.applyLink,t.removeLink=a.removeLink;var i=n(19);t.insertText=i.insertText;var s=n(20);t.insertImage=s.insertImage;var l=n(21);t.alignBlocks=l.alignBlocks,t.isAligned=l.isAligned;var u=n(7);t.hasNode=u.hasNode,t.activeNode=u.activeNode,t.formatBlockElements=u.formatBlockElements,t.getBlockFormats=u.getBlockFormats;var c=n(6);t.hasMark=c.hasMark,t.getMark=c.getMark,t.getActiveMarks=c.getActiveMarks,t.removeAllMarks=c.removeAllMarks;var d=n(22);t.indent=d.indent,t.canIndentAsListItem=d.canIndentAsListItem,t.outdent=d.outdent,t.canOutdentAsListItem=d.canOutdentAsListItem,t.isIndented=d.isIndented,t.canBeIndented=d.canBeIndented,t.indentBlocks=d.indentBlocks;var f=n(13);t.toggleOrderedList=f.toggleOrderedList,t.toggleUnorderedList=f.toggleUnorderedList,t.toggleList=f.toggleList;var p=n(3);t.createContentNode=p.createContentNode,t.hasSameMarkup=p.hasSameMarkup,t.getUniqueStyleValues=p.getUniqueStyleValues,t.getSelectionText=p.getSelectionText,t.getNodeFromSelection=p.getNodeFromSelection,t.canInsert=p.canInsert,t.insertNode=p.insertNode,t.indentHtml=p.indentHtml;var m=n(15);t.redo=m.redo,t.undo=m.undo;var g=n(23);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignRemoveRules=g.alignRemoveRules;var v=n(11);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var y=n(8);t.nodes=y.nodes,t.marks=y.marks;var h=n(24);t.buildKeymap=h.buildKeymap,t.buildListKeymap=h.buildListKeymap;var k=n(26);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 b=n(27);t.sanitize=b.sanitize,t.removeComments=b.removeComments,t.removeTag=b.removeTag;var M=n(28);t.convertMsLists=M.convertMsLists;var _=n(29);t.createTable=_.createTable;var S=n(9);t.addRowBefore=S.addRowBefore,t.addRowAfter=S.addRowAfter,t.addColumnBefore=S.addColumnBefore,t.addColumnAfter=S.addColumnAfter,t.deleteRow=S.deleteRow,t.deleteColumn=S.deleteColumn,t.deleteTable=S.deleteTable,t.mergeCells=S.mergeCells,t.splitCell=S.splitCell,t.selectionCell=S.selectionCell},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(0);t.parseContent=function(e,t,n){var o=document.createElement("div");return o.innerHTML=e,r.DOMParser.fromSchema(t).parse(o,n)},t.getHtml=function(e){var t=r.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),n=document.createElement("div");return n.appendChild(t),n.innerHTML},t.setHtml=function(e,n,r){return void 0===n&&(n="setHTML"),void 0===r&&(r={preserveWhitespace:"full"}),function(a,i){return i(a.tr.setSelection(new o.AllSelection(a.doc)).replaceSelectionWith(t.parseContent(e,a.schema,r)).setMeta("commandName",n))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),o=n(6),a=n(0);t.removeLink=function(e,t){return function(n,a){var i=n.selection.$cursor;if(i){var s=i.parent,l=i.index(),u=n.schema.marks[e.mark],c=s.child(l).marks.find((function(e){return e.type===u})),d=s.childCount,f=i.pos-i.textOffset,p=s.child(l).nodeSize,m=void 0,g=void 0;for(m=l-1;m>=0&&c.isInSet(s.child(m).marks);)p+=g=s.child(m).nodeSize,f-=g,m-=1;for(m=l+1;m<d&&c.isInSet(s.child(m).marks);)p+=s.child(m).nodeSize,m+=1;a(o.removeMark(t||n.tr,f,f+p,c))}else r.toggleInlineFormat(e,t)(n,a)}},t.applyLink=function(e,n){var i=e.mark,s=e.attrs;return void 0===n&&(n="link"),function(e,l){var u=e.schema.marks,c=e.tr;n&&(c.setMeta("commandName",n),c.setMeta("args",s));var d=!1,f=function(){return d=!0};if(o.getParentMark(e,u[i]))!function(e,t){return function(n,r){var o=n.selection,a=o.$cursor,i=o.from,s=o.to,l=n.schema.marks[e.mark];if(a){var u=a.parent,c=a.index(),d=u.child(c).marks.find((function(e){return e.type===l})),f=u.childCount,p=a.pos-a.textOffset,m=u.child(c).nodeSize,g=void 0,v=void 0;for(g=c-1;g>=0&&d.isInSet(u.child(g).marks);)m+=v=u.child(g).nodeSize,p-=v,g-=1;for(g=c+1;g<f&&d.isInSet(u.child(g).marks);)m+=u.child(g).nodeSize,g+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),r(t)}else t.doc.nodesBetween(i,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:i,attrs:s},c)(e,f);else{var p=e;o.hasMark(e,{mark:i})&&(t.removeLink({mark:i,attrs:s},c)(e,f),p=a.EditorState.create({doc:c.doc,selection:c.selection})),d?o.toggleMark(u[i],s,c)(p,f):r.toggleInlineFormat({mark:i},c,s)(p,f)}return d&&l(c),d}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,n){n(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);t.insertImage=function(e){return function(t,n){var o=t.schema.nodes.image,a=o.createAndFill(e);r.insertNode(a)(t,(function(t){return n(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7);t.alignBlocks=function(e,t){return function(n,o){var a=r.blockNodes(n),i=n.tr;i.setMeta("commandName",t);var s=!1;return a.forEach((function(t){if(t.type.isTextblock){var a={},l=e.find((function(e){return e.node===t.type.name}));l&&(a=r.addStyles(t,l.style)),s=r.changeBlockNode(n,o,i,t,t.type,a)||s}})),s&&o(i.scrollIntoView()),s}},t.isAligned=function(e,t){var n=r.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));n&&(o=n.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),o=n(11),a=n(7),i=n(3);t.indentBlocks=function(e,t,n){return function(r,o){var i=a.blockNodes(r),s=r.tr,l=!1;return s.setMeta("commandName",t),i.forEach((function(t){if(t.type.isTextblock){var i=void 0,u=e.find((function(e){return e.node===t.type.name}));if(u){var c="rtl"===n?u.rtlStyle:u.style,d={name:c,value:u.step>0?""+u.step+u.unit:""};if(t.attrs.style){var f=new RegExp(c+":\\s?(\\d+)"+u.unit,"i"),p=t.attrs.style.match(f);if(p){var m=parseFloat(p[1])+u.step;m=m<=0?"":m,d.value=""+m+(m?u.unit:"")}}i=a.addStyles(t,[d])}i&&(l=a.changeBlockNode(r,o,s,t,t.type,i)||l)}})),l&&o(s.scrollIntoView()),l}},t.isIndented=function(e,t,n){var r=a.blockNodes(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 a="rtl"===n?r.rtlStyle:r.style,i=new RegExp(a+":\\s?\\d+"+r.unit,"i");o=i.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return r.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],a=e.schema.nodes[t.listsTypes.bulletList],s=!!i.findNthParentNodeOfType(o,2)(e.selection),l=!!i.findNthParentNodeOfType(a,2)(e.selection);return(s||l)&&r.liftListItem(n)(e)},t.canBeIndented=function(e,n){var r=e.schema.nodes,i=r[o.indentRules.listsTypes.listItem];return(t.isIndented(e,n.nodes)||o.indentRules.nodes.some((function(t){return r[t.node]&&a.hasNode(e,r[t.node])})))&&!a.hasNode(e,i)},t.indent=function(e,n){var a=e.schema.nodes[o.indentRules.listsTypes.listItem],i=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,a)?r.sinkListItem(a)(e,n):i&&t.indentBlocks(o.indentRules.nodes)(e,n)},t.outdent=function(e,n){var a=e.schema.nodes[o.outdentRules.listsTypes.listItem],i=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?r.liftListItem(a)(e,n):i&&t.indentBlocks(o.outdentRules.nodes)(e,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[r("text-align","left")]},{node:"heading",style:[r("text-align","left")]},{node:"listItem",style:[r("text-align","left"),r("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]},{node:"listItem",style:[r("text-align","right"),r("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]},{node:"listItem",style:[r("text-align","center"),r("list-style-position","inside")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]},{node:"listItem",style:[r("text-align",""),r("list-style-position","")]}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),o=n(15),a=n(25),i=n(13),s="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=r.chainCommands(a.undoInputRule,r.deleteSelection,r.joinBackward,r.selectNodeBackward),t.Enter=r.chainCommands(r.newlineInCode,r.createParagraphNear,r.liftEmptyBlock,r.splitBlockKeepMarks),s||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=r.toggleMark(e.marks.strong)),e.marks.em&&(t["Mod-i"]=r.toggleMark(e.marks.em)),e.marks.underline&&(t["Mod-u"]=r.toggleMark(e.marks.underline)),e.nodes.hardBreak){var n=e.nodes.hardBreak,i=r.chainCommands(r.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0}));t["Mod-Enter"]=i,t["Shift-Enter"]=i,s&&(t["Ctrl-Enter"]=i)}return t},t.buildListKeymap=function(e){var t={};return e.nodes.listItem&&(t.Enter=i.splitListItemKeepMarks(e.nodes.listItem)),t}},function(e,t){e.exports=s},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,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=function(e){return e=(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,"")},t.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},t.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e){return/^MsoListParagraph/.test(e.className)},a=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},i=function(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n},s=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},l=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)):o(r)&&n.length?n.push(e):(n=[],"DIV"===r.nodeName?l(r.children,t):"TABLE"===r.nodeName&&Array.from(r.querySelectorAll("td,th")).forEach((function(e){l(e.children,t)})))}}))},u=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(a(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(n)?{tag:"ol",style:s(r(a(e)))}:void 0},c=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?a(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};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(r,(function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e}))}(e);var n=new Set;return l(t.children,n),n.forEach((function(e){return function(e){var t,n,r,a,s,l,d,f,p,m,g,v,y,h=-1,k={};for(f=0;f<e.length;f++){var b=(y={datalist:(p=e[f]).getAttribute("datalist"),datalevel:p.getAttribute("datalevel")}).datalist,M=u(p);if(m=M&&M.tag){if(g=y.datalevel||parseFloat(p.style.marginLeft||0),y.datalevel||p.style.marginLeft){var _=m+b;k[g]||(k[g]={}),(!n||n<0)&&(n=g,r=b,a=(d=e.filter((function(e){return e.getAttribute("datalist")===String(r)})))[d.length-1],l=i(m,M&&M.style),p.parentNode.insertBefore(l,p),h=g,k[g][_]=l),s=a===p,v=k[g][_],(g>h||!v)&&(v=i(m,M&&M.style),k[g][_]=v,t.appendChild(v)),t=c(p),v.appendChild(t),s?n=h=-1:h=g}}else!t||s&&!o(p)||(p.style.marginLeft&&(p.style.marginLeft=""),p.style.marginLeft&&(p.style.margin=""),t.appendChild(p))}}(e)})),t.innerHTML}},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)}}])}));

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prosemirror-state"),require("tslib"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-schema-list"),require("prosemirror-tables"),require("prosemirror-commands"),require("prosemirror-history"),require("prosemirror-inputrules")):"function"==typeof define&&define.amd?define(["prosemirror-state","tslib","prosemirror-model","prosemirror-transform","prosemirror-schema-list","prosemirror-tables","prosemirror-commands","prosemirror-history","prosemirror-inputrules"],t):"object"==typeof exports?exports.KendoEditorCommon=t(require("prosemirror-state"),require("tslib"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-schema-list"),require("prosemirror-tables"),require("prosemirror-commands"),require("prosemirror-history"),require("prosemirror-inputrules")):e.KendoEditorCommon=t(e["prosemirror-state"],e.tslib,e["prosemirror-model"],e["prosemirror-transform"],e["prosemirror-schema-list"],e["prosemirror-tables"],e["prosemirror-commands"],e["prosemirror-history"],e["prosemirror-inputrules"])}(window,(function(e,t,n,r,o,s,a,i,l){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(0),s=n(6),a=n(9),i=n(4);t.changeStyles=function(e,t){var n=t.style,r=t.value,o=t.newValue,s=[];if(e){var a=e.split(/\s*;\s*/).filter((function(e){return e})),i=a.filter((function(e){if(!e.toLowerCase().trim().startsWith(n))return!0;var t=e.split(":")[1].trim();return!r.test(t)||(s.push(t),!1)}));return o&&i.push(n+": "+o),{style:i.join("; ")+(i.length?";":""),changed:!!o||i.length!==a.length,styleMatches:s}}return{changed:!1,styleMatches:s,style:null}},t.changeStyle=function(e,t){return function(n,r,o){var a=n.selection,l=a.empty,u=a.$cursor,c=a.ranges;if(l&&!u||!s.markApplies(n.doc,c,e))return!1;var d=!1;if(r)if(o=o||n.tr,u){var f=n.storedMarks||u.marks();if(e.isInSet(f)){var p=i.changeStyleFromMark(f,t);r(o.removeStoredMark(e)),r(o.addStoredMark(e.create({style:p.style}))),d=!0}}else{for(var m=0;m<c.length;m++){var g=c[m],v=g.$from,y=g.$to;d=i.changeStyleMark(o,v.pos,y.pos,t,e)}d&&(o.scrollIntoView(),r(o))}return d}},t.canInsert=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},t.getTypeName=function(e){return e instanceof r.Node?e.type.name:e.name},t.findParentNode=function(e){return function(t){for(var n=t.$from,r=n.depth;r>0;r--){var o=n.node(r);if(e(o))return{depth:r,node:o}}}},t.findNthParentNode=function(e,t){return void 0===t&&(t=1),function(n){for(var r=n.$from,o=r.depth;o>0;o--){var s=r.node(o);if(e(s)&&0===(t-=1))return{depth:o,node:s}}}},t.findNthParentNodeOfType=function(e,n){return void 0===n&&(n=1),function(r){return t.findNthParentNode((function(n){return t.getTypeName(n)===t.getTypeName(e)}),n)(r)}},t.insertNode=function(e,t){return function(n,r){var o=n.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),r(o)}},t.isNullOrUndefined=function(e){return null==e},t.safeString=function(e){return t.isNullOrUndefined(e)?"":e.toString()},t.createContentNode=function(e){var n=document.createElement("div");return n.innerHTML=t.safeString(e).trim(),r.DOMParser.fromSchema(new r.Schema({nodes:a.nodes,marks:a.marks})).parse(n)},t.hasSameMarkup=function(e,n){var o=r.Fragment.from(t.createContentNode(e)),s=r.Fragment.from(t.createContentNode(n));return o.eq(s)},t.first=function(e){return e[0]},t.last=function(e){return e[e.length-1]},t.split=function(e){return function(t){return t.split(e)}},t.trim=function(e){return e.trim()},t.filter=function(e){return function(t){return t.filter(e)}},t.getUniqueStyleValues=function(e,n){if(e.hasNodesWithoutMarks)return"";var r=e.marks.filter((function(e){return"style"===e.type.name})).map((function(e){return e.attrs.style})).map(t.split(";")).map(t.filter((function(e){return e.includes(n)}))).map((function(e){return 0!==e.length?e:[n+": INVALID"]})).map(t.first).map(t.split(":")).map(t.last).map(t.trim).reduce((function(e,t){return e.indexOf(t)>-1?e:e.concat([t])}),[]);return r.indexOf("INVALID")>-1||1!==r.length?"":r[0]},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var n=t.content().content;return n.textBetween(0,n.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(5),s=n(3),a=n(6);t.changeStyleFromMark=function(e,t){var n=e.find((function(e){return"style"===e.type.name})),r=n&&n.attrs.style;return s.changeStyles(r,t)},t.changeStyleMark=function(e,n,s,a,i){var l=i.create({style:a.style}),u=[],c=[],d=null,f=null;return e.doc.nodesBetween(n,s,(function(e,p,m){if(e.isInline){var g=e.marks;if(!l.isInSet(g)&&m.type.allowsMarkType(l.type)){var v=Math.max(p,n),y=Math.min(p+e.nodeSize,s),h=t.changeStyleFromMark(g,a);if(h.changed||a.newValue){for(var k=h.changed?{style:h.style||null}:{style:[a.style]+": "+a.newValue+";"},M=i.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,b=M?r.__assign({},M.attrs,k):k,S=i.create(b),_=S.addToSet(g),I=0;I<g.length;I++)g[I].isInSet(_)||(d&&d.to===v&&d.mark.eq(g[I])?d.to=y:(d=new o.RemoveMarkStep(v,y,g[I]),u.push(d)));var O=f&&f.to===v,x=O&&S.attrs.style===f.mark.attrs.style;O&&x?f.to=y:Object.keys(b).some((function(e){return null!==b[e]}))&&(f=new o.AddMarkStep(v,y,S),c.push(f))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0},t.hasStyle=function(e,n){var r=e.selection,o=r.from,s=r.$from,a=r.to,i=r.empty,l=!1,u={style:n.name,value:n.value};return i?l=t.changeStyleFromMark(e.storedMarks||s.marks(),u).changed:e.doc.nodesBetween(o,a,(function(e,n,r){!l&&e.isInline&&(l=t.changeStyleFromMark(e.marks,u).changed)})),l},t.getInlineStyles=function(e,n){var r,o=e.selection,s=o.from,a=o.$from,i=o.to,l=o.empty,u=[],c={style:n.name,value:n.value};return l?(r=t.changeStyleFromMark(e.storedMarks||a.marks(),c)).changed&&(u=r.styleMatches):e.doc.nodesBetween(s,i,(function(e,n,o){e.isInline&&((r=t.changeStyleFromMark(e.marks,c)).changed?u.push.apply(u,r.styleMatches):u.push(null))})),u.filter((function(e){return null!==e}))},t.changeStyle=function(e,n){return function(o,s,i){var l=o.selection,u=l.empty,c=l.$cursor,d=l.ranges;if(u&&!c||!a.markApplies(o.doc,d,e))return!1;var f=!1;if(s)if(i=i||o.tr,c){var p=o.storedMarks||c.marks();if(e.isInSet(p)){var m=t.changeStyleFromMark(p,n),g=p.find((function(e){return"style"===e.type.name})),v=r.__assign({},g?g.attrs:{},{style:m.style||null});s(i.removeStoredMark(e)),Object.keys(v).some((function(e){return null!==v[e]}))&&s(i.addStoredMark(e.create(v))),f=!0}}else{for(var y=0;y<d.length;y++){var h=d[y],k=h.$from,M=h.$to;f=t.changeStyleMark(i,k.pos,M.pos,n,e)}f&&(i.scrollIntoView(),s(i))}return f}},t.toggleInlineFormat=function(e,n,r){return function(o,s){var i=o.schema.marks,l=e.altStyle,u=e.altMarks,c=void 0===u?[]:u,d=e.mark;n=n||o.tr;var f=!1,p=!1,m=function(){return p=!0};if(l&&i.style){var g=i.style;f=t.changeStyle(g,{style:l.name,value:l.value})(o,m,n)}var v=[d].concat(c).filter((function(e){return i[e]})).map((function(e){return a.hasMark(o,{mark:e})&&i[e]})).filter((function(e){return e}));return v.length?a.removeMarks(v,o,m,n):f||a.toggleMark(i[d],r,n)(o,m),p&&s(n),p}},t.applyInlineStyle=function(e,n){return function(o,i){var l=o.schema.marks.style,u={style:e.style,value:/^.+$/,newValue:e.value},c=o.tr;n&&c.setMeta("commandName",n),c.setMeta("args",e);var d=o.selection,f=d.empty,p=d.$cursor,m=d.ranges;if(f&&!p||!a.markApplies(o.doc,m,l))return!1;if(p){var g=o.storedMarks||p.marks(),v=l.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,y={style:null};if(v&&v.attrs.style){var h=s.changeStyles(v.attrs.style,u);h.changed&&h.style&&(y.style=h.style)}else u.newValue&&(y.style=[u.style]+": "+u.newValue+";");var k=v?r.__assign({},v.attrs,y):y;return Object.keys(k).some((function(e){return null!==k[e]}))?i(c.addStoredMark(l.create(k))):i(c.removeStoredMark(l)),!0}return t.changeStyle(l,u)(o,i,c)}}},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(2),s=n(0),a=n(4);t.markApplies=function(e,t,n){for(var r=function(r){var o=t[r],s=o.$from,a=o.$to,i=0===s.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(s.pos,a.pos,(function(e){if(i)return!1;i=e.inlineContent&&e.type.allowsMarkType(n)})),i)return{v:!0}},o=0;o<t.length;o++){var s=r(o);if(s)return s.v}return!1},t.toggleMark=function(e,n,r){return function(o,s){var a=o.selection,i=a.empty,l=a.$cursor,u=a.ranges;if(i&&!l||!t.markApplies(o.doc,u,e))return!1;if(s)if(l)e.isInSet(o.storedMarks||l.marks())?s(r.removeStoredMark(e)):s(r.addStoredMark(e.create(n)));else{for(var c=!1,d=0;!c&&d<u.length;d++){var f=u[d],p=f.$from,m=f.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(d=0;d<u.length;d++){var g=u[d];p=g.$from,m=g.$to;c?r.removeMark(p.pos,m.pos,e):r.addMark(p.pos,m.pos,e.create(n))}s(r.scrollIntoView())}return!0}},t.removeMark=function(e,t,n,s){void 0===s&&(s=null);var a=[],i=0;return e.doc.nodesBetween(t,n,(function(e,r){if(e.isInline){i++;var l=null;if(s instanceof o.MarkType){var u=s.isInSet(e.marks);u&&(l=[u])}else s?s.isInSet(e.marks)&&(l=[s]):l=e.marks;if(l&&l.length)for(var c=Math.min(r+e.nodeSize,n),d=0;d<l.length;d++){for(var f=l[d],p=void 0,m=0;m<a.length;m++){var g=a[m];g.step===i-1&&f.eq(g.style)&&(p=g)}p?(p.to=c,p.step=i):a.push({style:f,from:Math.max(r,t),to:c,step:i})}}})),a.forEach((function(t){return e.step(new r.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,n,r,o){var s=n.selection,a=s.$cursor,i=s.ranges;if(o=o||n.tr,a)e.forEach((function(e){e.isInSet(n.storedMarks||a.marks())&&r(o.removeStoredMark(e))}));else{for(var l=function(n){var r=i[n],s=r.$from,a=r.$to;e.forEach((function(e){t.removeMark(o,s.pos,a.pos,e)}))},u=0;u<i.length;u++)l(u);r(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,n=void 0===t?[]:t;return function(e,t){var r,o=e.schema,s=e.selection,a=s.$cursor,i=s.from,l=s.to,u=e.tr,c=(r=n,r instanceof Array?r:[r]).map((function(e){return e.name}));a||(Object.keys(o.marks).map((function(e){return o.marks[e]})).filter((function(e){return-1===c.indexOf(e.name)})).forEach((function(e){return u.removeMark(i,l,e)})),t(u))}},t.getParentMark=function(e,t){var n=e.selection,r=n.from,o=n.$from,s=n.to,a=n.empty,i=e.doc;if(a)return t.isInSet(e.storedMarks||o.marks())||null;var l=[];return i.nodesBetween(r,s,(function(e){e.isInline&&l.push(t.isInSet(e.marks))})),1===l.length&&l[0]?l[0]:null},t.hasMark=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return r[e]})),s=t.altStyle,i=e.selection,l=i.from,u=i.$from,c=i.to,d=i.empty,f=r[t.mark],p=e.doc,m=!1;return d?(n=e.storedMarks||u.marks(),m=f&&f.isInSet(n)||o.some((function(e){return r[e].isInSet(n)}))):m=f&&p.rangeHasMark(l,c,f)||o.some((function(e){return p.rangeHasMark(l,c,r[e])})),!m&&s?a.hasStyle(e,s):!!m},t.getMark=function(e,t){var n,r=e.selection,o=r.from,s=r.$from,a=r.to,i=r.empty,l=e.doc;return i?n=t.isInSet(e.storedMarks||s.marks()):l.nodesBetween(o,a,(function(e){e.isInline&&!n&&(n=t.isInSet(e.marks))})),n};t.getActiveMarks=function(e,t){var n=e.selection,r=!1;if(n instanceof s.TextSelection&&n.$cursor)return{hasNodesWithoutMarks:r,marks:n.$cursor.marks().filter((function(e){return!t||e.type.name===t.name}))};var o=[];return n.content().content.descendants((function(e){if("text"===e.type.name){var n=t?function(e,t){return t.marks.filter((function(t){return t.type.name===e.name}))}(t,e):e.marks;e.marks.length>0&&n.length>0?o.push.apply(o,n):r=!0}})),{hasNodesWithoutMarks:r,marks:o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(3),s=n(5),a=n(2),i=n(0);t.changeBlockNode=function(e,t,n,r,o,i){var l=e.selection,u=l.from,c=l.to,d=!1;if(e.doc.nodesBetween(u,c,(function(t,n){if(d)return!1;if(t.isTextblock&&!t.hasMarkup(o,i))if(t.type===o)d=!0;else{var r=e.doc.resolve(n),s=r.index();d=r.parent.canReplaceWith(s,s+1,o)}})),!d)return!1;if(t){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var f=n.steps.length;n.doc.nodesBetween(u,c,(function(e,t){if(e.eq(r)&&e.isTextblock&&!e.hasMarkup(o,i)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(n.doc,n.mapping.slice(f).map(t),o)){n.clearIncompatible(n.mapping.slice(f).map(t,1),o);var l=n.mapping.slice(f),u=l.map(t,1),c=l.map(t+e.nodeSize,1),d=new a.Slice(a.Fragment.from(o.create(i,null,e.marks)),0,0);return n.step(new s.ReplaceAroundStep(u,c,u+1,c-1,d,1,!0)),!1}}))}return!0},t.blockNodes=function(e){var t=e.selection,n=t.from,r=t.to,o=t.$from,s=[];return t.node?t.node.isBlock?s.push(t.node):o.parent&&o.parent.isBlock&&s.push(o.parent):e.doc.nodesBetween(n,r,(function(e){e.isBlock&&s.push(e)})),s},t.formatBlockElements=function(e,n){return function(o,s){var a=t.blockNodes(o),i=o.schema.nodes,l=!1,u=o.tr;return u.setMeta("commandName",n),u.setMeta("args",{value:e}),a.forEach((function(n){if(n.type.isTextblock)if("p"===e){var a=n.attrs,c=a.level,d=r.__rest(a,["level"]);l=t.changeBlockNode(o,s,u,n,i.paragraph,d)||l}else if(/^h[1-6]$/i.test(e)){c=parseInt(e.substr(1),10);l=t.changeBlockNode(o,s,u,n,i.heading,r.__assign({},n.attrs,{level:c}))||l}else if("blockquote"===e){var f=n.attrs;c=f.level,d=r.__rest(f,["level"]);l=t.changeBlockNode(o,s,u,n,i.blockquote,d)||l}})),l&&s(u.scrollIntoView()),l}},t.getBlockFormats=function(e){var n=t.blockNodes(e),r=e.schema.nodes,o=[];return n.forEach((function(e){if(e.type===r.paragraph)o.push("p");else if(e.type===r.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){o.push("h"+t);break}})),o},t.addStyles=function(e,t){var n=e.attrs.style,r=null,s=null;n&&t.forEach((function(e){s={style:e.name,value:/^.+$/,newValue:e.value},r=o.changeStyles(n,s),n=r.changed?r.style:n}));return n=n||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:n||null})},t.hasNode=function(e,t){var n=e.selection,r=n.from,o=n.to,s=!1;return e.doc.nodesBetween(r,o,(function(e){return!(s=s||e.type===t)})),s};var l=function(e){return function(e,t){return Object.keys(e).filter((function(e){return t(e)})).reduce((function(t,n){var r;return Object.assign(t,((r={})[n]=e[n],r))}),{})}(e,(function(t){return null!==e[t]&&void 0!==e[t]&&""!==e[t]}))};t.getNodeTagName=function(e,t){var n,r=e.type.spec.parseDOM||[],o=e.attrs;return(n=1===r.length?r[0]:r.find((function(n){var r=a.DOMSerializer.fromSchema(t).serializeNode(e);return JSON.stringify(n.getAttrs(r))===JSON.stringify(l(o))})))?n.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},t.activeNode=function(e){var n,r=e.schema.nodes.doc;if(e.selection instanceof i.AllSelection)n=e.doc;else if(e.selection instanceof i.TextSelection){var s=e.selection.$anchor,a=s.node(s.blockRange().depth);n=o.getTypeName(a)===o.getTypeName(r)?s.node():a}else e.selection instanceof i.NodeSelection&&(n=e.selection.node);return{name:o.getTypeName(n),tag:t.getNodeTagName(n,e.schema)}}},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(10),s=["blockquote",0],a=["hr"],i=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],d=function(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n},f=function(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return!0;return!1},p=function(e,t){var n={};for(var r in e)r&&null!==e[r]&&r!==t&&(n[r]=e[r]);return n},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},g=r.__assign({link:{attrs:r.__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:d}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=g;var v=r.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return s}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return a}},heading:{attrs:r.__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 r.__assign({},d(e),{level:1})}},{tag:"h2",getAttrs:function(e){return r.__assign({},d(e),{level:2})}},{tag:"h3",getAttrs:function(e){return r.__assign({},d(e),{level:3})}},{tag:"h4",getAttrs:function(e){return r.__assign({},d(e),{level:4})}},{tag:"h5",getAttrs:function(e){return r.__assign({},d(e),{level:5})}},{tag:"h6",getAttrs:function(e){return r.__assign({},d(e),{level:6})}}],toDOM:function(e){return f(e.attrs,"level")?["h"+e.attrs.level,p(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 i}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:r.__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:d}],toDOM:function(e){return f(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return r.__assign({},d(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?f(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",r.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"block*",attrs:r.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(12);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,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(2),s=n(0),a=n(5),i=n(14),l=n(8),u=n(8),c=n(12);function d(e,n,r){var o=e.selection,s=o.from,a=o.to,i=e.schema.nodes,l=i.paragraph,u=i.heading,c=[];n.doc.nodesBetween(s,a,(function(e,t){e.type!==l&&e.type!==u||c.push({node:e,pos:t})}));for(var d=c.length-1;d>=0;d--){var f=c[d],p=n.doc.resolve(n.mapping.map(f.pos));if(p.depth>0){var m=void 0;m=f.node.textContent&&f.node.textContent.length>0?n.doc.resolve(n.mapping.map(f.pos+f.node.textContent.length)):n.doc.resolve(n.mapping.map(f.pos+1));var g=p.blockRange(m);g&&n.lift(g,t.getListLiftTarget(e.schema,p,r))}}return n}function f(e){return function(t,n,r){if(!r)return!1;var o=(t=r.state).schema.nodes[e.listType],s=t.selection,a=s.$from,i=s.$to,l=a.node(-2),u=a.node(-3),c=g(t.doc,a,i,o);return(l&&l.type===o||u&&u.type===o)&&c?h(e)(t,n):(c||(h(e)(t,n),t=r.state),k(o)(t,n))}}function p(e,t,n,r){r||(r=e.schema.nodes.listItem);var s=t.$from,i=t.$to,l=s.blockRange(i,(function(e){return e.childCount&&e.firstChild.type===r}));if(!l||l.depth<2||s.node(l.depth-1).type!==r)return n;var u=l.end,c=i.end(l.depth);return u<c&&(n.step(new a.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(r.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(n.doc.resolve(s.pos),n.doc.resolve(c),l.depth)),n.lift(l,a.liftTarget(l)).scrollIntoView()}function m(e,t,n,r,o,a){a||(a=e.schema.nodes.listItem);var i=!1;return o.doc.nodesBetween(t,n,(function(n,l){if(!i&&n.type===a&&l>t){i=!0;for(var u=r+3;u>r+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var d=o.doc.resolve(o.mapping.map(l+n.textContent.length)),f=new s.TextSelection(c,d);o=p(e,f,o,a)}}})),o}function g(e,t,n,r){return 0===v(e,t,n).filter((function(e){return e.type!==r})).length}function v(e,t,n){for(var r=Array(),o=y(e,t).depth,s=e.resolve(t.start(o));s.pos<=n.start(n.depth);){var a=Math.min(s.depth,o),i=s.node(a);if(i&&r.push(i),0===a)break;var l=e.resolve(s.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==s.depth&&(l=e.resolve(l.pos+2)),s=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return r}function y(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}function h(e){return function(t,n){var r=t.tr,o=t.selection,i=o.$from,l=o.$to;return r.doc.nodesBetween(i.pos,l.pos,(function(n,o){if(n.isTextblock||"blockquote"===n.type.name||"div"===n.type.name){var i=new s.NodeSelection(r.doc.resolve(r.mapping.map(o))),l=i.$from.blockRange(i.$to);if(!l||i.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&a.liftTarget(l);if(null==u)return!1;r.lift(l,u)}})),n&&n(r),!0}}function k(e){return i.autoJoin(l.wrapInList(e),(function(t,n){return t.type===n.type&&t.type===e}))}t.rootListDepth=function(e,t){for(var n,r=t.bulletList,o=t.orderedList,s=t.listItem,a=e.depth-1;a>0;a--){var i=e.node(a);if(i.type!==r&&i.type!==o||(n=a),i.type!==r&&i.type!==o&&i.type!==s)break}return n},t.getListLiftTarget=function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],s=e.nodes[n.orderedList],a=e.nodes[n.listItem],i=t.depth;i>0;i--){var l=t.node(i);if(l.type!==o&&l.type!==s||(r=i),l.type!==o&&l.type!==s&&l.type!==a)break}return r-1},t.liftSelectionList=d,t.toggleList=function(e,n,r,o,s){var a=o.listType,i=e.selection,l=i.$from.node(i.$from.depth-2),u=i.$to.node(i.$to.depth-2);if(l&&l.type.name===a&&u&&u.type.name===a){var c=r.state.schema.nodes,p={bulletList:c[o.bulletList],orderedList:c[o.orderedList],listItem:c[o.listItem]},g=t.rootListDepth(i.$to,p),v=m(e,i.$to.pos,i.$to.end(g),g,r.state.tr,p.listItem);return(v=d(e,v,o)).setMeta("commandName",s),n(v),!0}return f(o)(e,n,r)},t.toggleListCommand=f,t.liftFollowingList=m,t.isRangeOfType=g,t.getAncestorNodesBetween=v,t.findAncestorPosition=y,t.liftListItems=h,t.wrapInList=k,t.toggleUnorderedList=function(e,n,o){return t.toggleList(e,n,o,r.__assign({listType:c.bulletList.listType},c.bulletList.types))},t.toggleOrderedList=function(e,n,o){return t.toggleList(e,n,o,r.__assign({listType:c.orderedList.listType},c.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,n){return u.splitListItem(e)(t,(function(e){var r=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();r&&e.ensureMarks(r),n(e)}))}}},function(e,t){e.exports=a},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17);t.getHtml=r.getHtml,t.setHtml=r.setHtml;var o=n(4);t.applyInlineStyle=o.applyInlineStyle,t.toggleInlineFormat=o.toggleInlineFormat;var s=n(18);t.applyLink=s.applyLink,t.removeLink=s.removeLink;var a=n(19);t.insertText=a.insertText;var i=n(20);t.insertImage=i.insertImage;var l=n(21);t.alignBlocks=l.alignBlocks,t.isAligned=l.isAligned;var u=n(7);t.hasNode=u.hasNode,t.activeNode=u.activeNode,t.formatBlockElements=u.formatBlockElements;var c=n(6);t.hasMark=c.hasMark,t.getMark=c.getMark,t.getActiveMarks=c.getActiveMarks,t.removeAllMarks=c.removeAllMarks;var d=n(22);t.indent=d.indent,t.canIndentAsListItem=d.canIndentAsListItem,t.outdent=d.outdent,t.canOutdentAsListItem=d.canOutdentAsListItem,t.isIndented=d.isIndented,t.canBeIndented=d.canBeIndented;var f=n(13);t.toggleOrderedList=f.toggleOrderedList,t.toggleUnorderedList=f.toggleUnorderedList;var p=n(3);t.createContentNode=p.createContentNode,t.hasSameMarkup=p.hasSameMarkup,t.getUniqueStyleValues=p.getUniqueStyleValues,t.getSelectionText=p.getSelectionText,t.getNodeFromSelection=p.getNodeFromSelection,t.canInsert=p.canInsert,t.insertNode=p.insertNode;var m=n(15);t.redo=m.redo,t.undo=m.undo;var g=n(23);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignRemoveRules=g.alignRemoveRules;var v=n(11);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var y=n(9);t.nodes=y.nodes,t.marks=y.marks;var h=n(24);t.buildKeymap=h.buildKeymap,t.buildListKeymap=h.buildListKeymap;var k=n(26);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(27);t.createTable=M.createTable;var b=n(10);t.addRowBefore=b.addRowBefore,t.addRowAfter=b.addRowAfter,t.addColumnBefore=b.addColumnBefore,t.addColumnAfter=b.addColumnAfter,t.deleteRow=b.deleteRow,t.deleteColumn=b.deleteColumn,t.deleteTable=b.deleteTable,t.mergeCells=b.mergeCells,t.splitCell=b.splitCell,t.selectionCell=b.selectionCell},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(0);t.createContentNode=function(e,t,n){var o=document.createElement("div");return o.innerHTML=e,r.DOMParser.fromSchema(t).parse(o,n)},t.getHtml=function(e){var t=r.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),n=document.createElement("div");return n.appendChild(t),n.innerHTML},t.setHtml=function(e,n,r){return void 0===n&&(n="setHTML"),void 0===r&&(r={preserveWhitespace:"full"}),function(s,a){return a(s.tr.setSelection(new o.AllSelection(s.doc)).replaceSelectionWith(t.createContentNode(e,s.schema,r)).setMeta("commandName",n))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),o=n(6),s=n(0);t.removeLink=function(e,t){return function(n,s){var a=n.selection.$cursor;if(a){var i=a.parent,l=a.index(),u=n.schema.marks[e.mark],c=i.child(l).marks.find((function(e){return e.type===u})),d=i.childCount,f=a.pos-a.textOffset,p=i.child(l).nodeSize,m=void 0,g=void 0;for(m=l-1;m>=0&&c.isInSet(i.child(m).marks);)p+=g=i.child(m).nodeSize,f-=g,m-=1;for(m=l+1;m<d&&c.isInSet(i.child(m).marks);)p+=i.child(m).nodeSize,m+=1;s(o.removeMark(t||n.tr,f,f+p,c))}else r.toggleInlineFormat(e,t)(n,s)}},t.applyLink=function(e,n){var a=e.mark,i=e.attrs;return function(e,l){var u=e.schema.marks,c=e.tr;n&&(c.setMeta("commandName",n),c.setMeta("args",i));var d=!1,f=function(){return d=!0};if(o.getParentMark(e,u[a]))!function(e,t){return function(n,r){var o=n.selection,s=o.$cursor,a=o.from,i=o.to,l=n.schema.marks[e.mark];if(s){var u=s.parent,c=s.index(),d=u.child(c).marks.find((function(e){return e.type===l})),f=u.childCount,p=s.pos-s.textOffset,m=u.child(c).nodeSize,g=void 0,v=void 0;for(g=c-1;g>=0&&d.isInSet(u.child(g).marks);)m+=v=u.child(g).nodeSize,p-=v,g-=1;for(g=c+1;g<f&&d.isInSet(u.child(g).marks);)m+=u.child(g).nodeSize,g+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),r(t)}else t.doc.nodesBetween(a,i,(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:a,attrs:i},c)(e,f);else{var p=e;o.hasMark(e,{mark:a})&&(t.removeLink({mark:a,attrs:i},c)(e,f),p=s.EditorState.create({doc:c.doc,selection:c.selection})),d?o.toggleMark(u[a],i,c)(p,f):r.toggleInlineFormat({mark:a},c,i)(p,f)}return d&&l(c),d}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,n){n(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);t.insertImage=function(e){return function(t,n){var o=t.schema.nodes.image,s=o.createAndFill(e);r.insertNode(s)(t,(function(t){return n(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7);t.alignBlocks=function(e){return function(t,n){var o=r.blockNodes(t),s=t.tr,a=!1;return o.forEach((function(o){if(o.type.isTextblock){var i={},l=e.find((function(e){return e.node===o.type.name}));l&&(i=r.addStyles(o,l.style)),a=r.changeBlockNode(t,n,s,o,o.type,i)||a}})),a&&n(s.scrollIntoView()),a}},t.isAligned=function(e,t){var n=r.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));n&&(o=n.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),o=n(11),s=n(7),a=n(3);t.indentBlocks=function(e,t,n){return function(r,o){var a=s.blockNodes(r),i=r.tr,l=!1;return i.setMeta("commandName",t),a.forEach((function(t){if(t.type.isTextblock){var a=void 0,u=e.find((function(e){return e.node===t.type.name}));if(u){var c="rtl"===n?u.rtlStyle:u.style,d={name:c,value:u.step>0?""+u.step+u.unit:""};if(t.attrs.style){var f=new RegExp(c+":\\s?(\\d+)"+u.unit,"i"),p=t.attrs.style.match(f);if(p){var m=parseFloat(p[1])+u.step;m=m<=0?"":m,d.value=""+m+(m?u.unit:"")}}a=s.addStyles(t,[d])}a&&(l=s.changeBlockNode(r,o,i,t,t.type,a)||l)}})),l&&o(i.scrollIntoView()),l}},t.isIndented=function(e,t,n){var r=s.blockNodes(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 s="rtl"===n?r.rtlStyle:r.style,a=new RegExp(s+":\\s?\\d+"+r.unit,"i");o=a.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return r.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],s=e.schema.nodes[t.listsTypes.bulletList],i=!!a.findNthParentNodeOfType(o,2)(e.selection),l=!!a.findNthParentNodeOfType(s,2)(e.selection);return(i||l)&&r.liftListItem(n)(e)},t.canBeIndented=function(e,n){var r=e.schema.nodes,a=r[o.indentRules.listsTypes.listItem];return(t.isIndented(e,n.nodes)||o.indentRules.nodes.some((function(t){return r[t.node]&&s.hasNode(e,r[t.node])})))&&!s.hasNode(e,a)},t.indent=function(e,n){var s=e.schema.nodes[o.indentRules.listsTypes.listItem],a=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,s)?r.sinkListItem(s)(e,n):a&&t.indentBlocks(o.indentRules.nodes)(e,n)},t.outdent=function(e,n){var s=e.schema.nodes[o.outdentRules.listsTypes.listItem],a=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?r.liftListItem(s)(e,n):a&&t.indentBlocks(o.outdentRules.nodes)(e,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[r("text-align","left")]},{node:"heading",style:[r("text-align","left")]},{node:"listItem",style:[r("text-align","left"),r("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]},{node:"listItem",style:[r("text-align","right"),r("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]},{node:"listItem",style:[r("text-align","center"),r("list-style-position","inside")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]},{node:"listItem",style:[r("text-align",""),r("list-style-position","")]}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),o=n(15),s=n(25),a=n(13),i="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=r.chainCommands(s.undoInputRule,r.deleteSelection,r.joinBackward,r.selectNodeBackward),t.Enter=r.chainCommands(r.newlineInCode,r.createParagraphNear,r.liftEmptyBlock,r.splitBlockKeepMarks),i||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=r.toggleMark(e.marks.strong)),e.marks.em&&(t["Mod-i"]=r.toggleMark(e.marks.em)),e.marks.underline&&(t["Mod-u"]=r.toggleMark(e.marks.underline)),e.nodes.hardBreak){var n=e.nodes.hardBreak,a=r.chainCommands(r.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0}));t["Mod-Enter"]=a,t["Shift-Enter"]=a,i&&(t["Ctrl-Enter"]=a)}return t},t.buildListKeymap=function(e){var t={};return e.nodes.listItem&&(t.Enter=a.splitListItemKeepMarks(e.nodes.listItem)),t}},function(e,t){e.exports=l},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,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,n){for(var r=e.table,o=e.table_row,s=e.table_cell,a=[],i=[],l=0;l<t+1;l++){i.length=0;for(var u=0;u<n+1;u++)i.push(s.createAndFill());a.push(o.createAndFill(void 0,i))}return r.createAndFill(void 0,a)}}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prosemirror-state"),require("tslib"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-tables"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-history"),require("prosemirror-inputrules")):"function"==typeof define&&define.amd?define(["prosemirror-state","tslib","prosemirror-model","prosemirror-transform","prosemirror-tables","prosemirror-schema-list","prosemirror-commands","prosemirror-history","prosemirror-inputrules"],t):"object"==typeof exports?exports.KendoEditorCommon=t(require("prosemirror-state"),require("tslib"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-tables"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-history"),require("prosemirror-inputrules")):e.KendoEditorCommon=t(e["prosemirror-state"],e.tslib,e["prosemirror-model"],e["prosemirror-transform"],e["prosemirror-tables"],e["prosemirror-schema-list"],e["prosemirror-commands"],e["prosemirror-history"],e["prosemirror-inputrules"])}(window,(function(e,t,r,n,o,a,s,i,l){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},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=16)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(0),a=r(6),s=r(8),i=r(4);t.changeStyles=function(e,t){var r=t.style,n=t.value,o=t.newValue,a=[];if(e){var s=e.split(/\s*;\s*/).filter((function(e){return e})),i=s.filter((function(e){if(!e.toLowerCase().trim().startsWith(r))return!0;var t=e.split(":")[1].trim();return!n.test(t)||(a.push(t),!1)}));return o&&i.push(r+": "+o),{style:i.join("; ")+(i.length?";":""),changed:!!o||i.length!==s.length,styleMatches:a}}return{changed:!1,styleMatches:a,style:null}},t.changeStyle=function(e,t){return function(r,n,o){var s=r.selection,l=s.empty,u=s.$cursor,c=s.ranges;if(l&&!u||!a.markApplies(r.doc,c,e))return!1;var d=!1;if(n)if(o=o||r.tr,u){var f=r.storedMarks||u.marks();if(e.isInSet(f)){var p=i.changeStyleFromMark(f,t);n(o.removeStoredMark(e)),n(o.addStoredMark(e.create({style:p.style}))),d=!0}}else{for(var m=0;m<c.length;m++){var g=c[m],v=g.$from,h=g.$to;d=i.changeStyleMark(o,v.pos,h.pos,t,e)}d&&(o.scrollIntoView(),n(o))}return d}},t.canInsert=function(e,t){for(var r=e.selection.$from,n=r.depth;n>=0;n--){var o=r.index(n);if(r.node(n).canReplaceWith(o,o,t))return!0}return!1},t.getTypeName=function(e){return e instanceof n.Node?e.type.name:e.name},t.findParentNode=function(e){return function(t){for(var r=t.$from,n=r.depth;n>0;n--){var o=r.node(n);if(e(o))return{depth:n,node:o}}}},t.findNthParentNode=function(e,t){return void 0===t&&(t=1),function(r){for(var n=r.$from,o=n.depth;o>0;o--){var a=n.node(o);if(e(a)&&0===(t-=1))return{depth:o,node:a}}}},t.findNthParentNodeOfType=function(e,r){return void 0===r&&(r=1),function(n){return t.findNthParentNode((function(r){return t.getTypeName(r)===t.getTypeName(e)}),r)(n)}},t.insertNode=function(e,t){return function(r,n){var o=r.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),n(o)}},t.isNullOrUndefined=function(e){return null==e},t.safeString=function(e){return t.isNullOrUndefined(e)?"":e.toString()},t.createContentNode=function(e){var r=document.createElement("div");return r.innerHTML=t.safeString(e).trim(),n.DOMParser.fromSchema(new n.Schema({nodes:s.nodes,marks:s.marks})).parse(r)},t.hasSameMarkup=function(e,r){var o=n.Fragment.from(t.createContentNode(e)),a=n.Fragment.from(t.createContentNode(r));return o.eq(a)},t.first=function(e){return e[0]},t.last=function(e){return e[e.length-1]},t.split=function(e){return function(t){return t.split(e)}},t.trim=function(e){return e.trim()},t.filter=function(e){return function(t){return t.filter(e)}},t.getUniqueStyleValues=function(e,r){if(e.hasNodesWithoutMarks)return"";var n=e.marks.filter((function(e){return"style"===e.type.name})).map((function(e){return e.attrs.style})).map(t.split(";")).map(t.filter((function(e){return e.includes(r)}))).map((function(e){return 0!==e.length?e:[r+": INVALID"]})).map(t.first).map(t.split(":")).map(t.last).map(t.trim).reduce((function(e,t){return e.indexOf(t)>-1?e:e.concat([t])}),[]);return n.indexOf("INVALID")>-1||1!==n.length?"":n[0]},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var r=t.content().content;return r.textBetween(0,r.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node},t.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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(5),a=r(3),s=r(6);t.changeStyleFromMark=function(e,t){var r=e.find((function(e){return"style"===e.type.name})),n=r&&r.attrs.style;return a.changeStyles(n,t)},t.changeStyleMark=function(e,r,a,s,i){var l=i.create({style:s.style}),u=[],c=[],d=null,f=null;return e.doc.nodesBetween(r,a,(function(e,p,m){if(e.isInline){var g=e.marks;if(!l.isInSet(g)&&m.type.allowsMarkType(l.type)){var v=Math.max(p,r),h=Math.min(p+e.nodeSize,a),y=t.changeStyleFromMark(g,s);if(y.changed||s.newValue){for(var k=y.changed?{style:y.style||null}:{style:[s.style]+": "+s.newValue+";"},M=i.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,b=M?n.__assign({},M.attrs,k):k,S=i.create(b),_=S.addToSet(g),I=0;I<g.length;I++)g[I].isInSet(_)||(d&&d.to===v&&d.mark.eq(g[I])?d.to=h:(d=new o.RemoveMarkStep(v,h,g[I]),u.push(d)));var L=f&&f.to===v,T=L&&S.attrs.style===f.mark.attrs.style;L&&T?f.to=h:Object.keys(b).some((function(e){return null!==b[e]}))&&(f=new o.AddMarkStep(v,h,S),c.push(f))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0},t.hasStyle=function(e,r){var n=e.selection,o=n.from,a=n.$from,s=n.to,i=n.empty,l=!1,u={style:r.name,value:r.value};return i?l=t.changeStyleFromMark(e.storedMarks||a.marks(),u).changed:e.doc.nodesBetween(o,s,(function(e,r,n){!l&&e.isInline&&(l=t.changeStyleFromMark(e.marks,u).changed)})),l},t.getInlineStyles=function(e,r){var n,o=e.selection,a=o.from,s=o.$from,i=o.to,l=o.empty,u=[],c={style:r.name,value:r.value};return l?(n=t.changeStyleFromMark(e.storedMarks||s.marks(),c)).changed&&(u=n.styleMatches):e.doc.nodesBetween(a,i,(function(e,r,o){e.isInline&&((n=t.changeStyleFromMark(e.marks,c)).changed?u.push.apply(u,n.styleMatches):u.push(null))})),u.filter((function(e){return null!==e}))},t.changeStyle=function(e,r){return function(o,a,i){var l=o.selection,u=l.empty,c=l.$cursor,d=l.ranges;if(u&&!c||!s.markApplies(o.doc,d,e))return!1;var f=!1;if(a)if(i=i||o.tr,c){var p=o.storedMarks||c.marks();if(e.isInSet(p)){var m=t.changeStyleFromMark(p,r),g=p.find((function(e){return"style"===e.type.name})),v=n.__assign({},g?g.attrs:{},{style:m.style||null});a(i.removeStoredMark(e)),Object.keys(v).some((function(e){return null!==v[e]}))&&a(i.addStoredMark(e.create(v))),f=!0}}else{for(var h=0;h<d.length;h++){var y=d[h],k=y.$from,M=y.$to;f=t.changeStyleMark(i,k.pos,M.pos,r,e)}f&&(i.scrollIntoView(),a(i))}return f}},t.toggleInlineFormat=function(e,r,n){return function(o,a){var i=o.schema.marks,l=e.altStyle,u=e.altMarks,c=void 0===u?[]:u,d=e.mark;r=r||o.tr;var f=!1,p=!1,m=function(){return p=!0};if(l&&i.style){var g=i.style;f=t.changeStyle(g,{style:l.name,value:l.value})(o,m,r)}var v=[d].concat(c).filter((function(e){return i[e]})).map((function(e){return s.hasMark(o,{mark:e})&&i[e]})).filter((function(e){return e}));return v.length?s.removeMarks(v,o,m,r):f||s.toggleMark(i[d],n,r)(o,m),p&&a(r),p}},t.applyInlineStyle=function(e,r){return function(o,i){var l=o.schema.marks.style,u={style:e.style,value:/^.+$/,newValue:e.value},c=o.tr;r&&c.setMeta("commandName",r),c.setMeta("args",e);var d=o.selection,f=d.empty,p=d.$cursor,m=d.ranges;if(f&&!p||!s.markApplies(o.doc,m,l))return!1;if(p){var g=o.storedMarks||p.marks(),v=l.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,h={style:null};if(v&&v.attrs.style){var y=a.changeStyles(v.attrs.style,u);y.changed&&y.style&&(h.style=y.style)}else u.newValue&&(h.style=[u.style]+": "+u.newValue+";");var k=v?n.__assign({},v.attrs,h):h;return Object.keys(k).some((function(e){return null!==k[e]}))?i(c.addStoredMark(l.create(k))):i(c.removeStoredMark(l)),!0}return t.changeStyle(l,u)(o,i,c)}}},function(e,t){e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5),o=r(2),a=r(0),s=r(4);t.markApplies=function(e,t,r){for(var n=function(n){var o=t[n],a=o.$from,s=o.$to,i=0===a.depth&&e.type.allowsMarkType(r);if(e.nodesBetween(a.pos,s.pos,(function(e){if(i)return!1;i=e.inlineContent&&e.type.allowsMarkType(r)})),i)return{v:!0}},o=0;o<t.length;o++){var a=n(o);if(a)return a.v}return!1},t.toggleMark=function(e,r,n){return function(o,a){var s=o.selection,i=s.empty,l=s.$cursor,u=s.ranges;if(i&&!l||!t.markApplies(o.doc,u,e))return!1;if(a)if(l)e.isInSet(o.storedMarks||l.marks())?a(n.removeStoredMark(e)):a(n.addStoredMark(e.create(r)));else{for(var c=!1,d=0;!c&&d<u.length;d++){var f=u[d],p=f.$from,m=f.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(d=0;d<u.length;d++){var g=u[d];p=g.$from,m=g.$to;c?n.removeMark(p.pos,m.pos,e):n.addMark(p.pos,m.pos,e.create(r))}a(n.scrollIntoView())}return!0}},t.removeMark=function(e,t,r,a){void 0===a&&(a=null);var s=[],i=0;return e.doc.nodesBetween(t,r,(function(e,n){if(e.isInline){i++;var l=null;if(a instanceof o.MarkType){var u=a.isInSet(e.marks);u&&(l=[u])}else a?a.isInSet(e.marks)&&(l=[a]):l=e.marks;if(l&&l.length)for(var c=Math.min(n+e.nodeSize,r),d=0;d<l.length;d++){for(var f=l[d],p=void 0,m=0;m<s.length;m++){var g=s[m];g.step===i-1&&f.eq(g.style)&&(p=g)}p?(p.to=c,p.step=i):s.push({style:f,from:Math.max(n,t),to:c,step:i})}}})),s.forEach((function(t){return e.step(new n.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,r,n,o){var a=r.selection,s=a.$cursor,i=a.ranges;if(o=o||r.tr,s)e.forEach((function(e){e.isInSet(r.storedMarks||s.marks())&&n(o.removeStoredMark(e))}));else{for(var l=function(r){var n=i[r],a=n.$from,s=n.$to;e.forEach((function(e){t.removeMark(o,a.pos,s.pos,e)}))},u=0;u<i.length;u++)l(u);n(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,r=void 0===t?[]:t;return function(e,t){var n,o=e.schema,a=e.selection,s=a.$cursor,i=a.from,l=a.to,u=e.tr,c=(n=r,n instanceof Array?n:[n]).map((function(e){return e.name}));s||(Object.keys(o.marks).map((function(e){return o.marks[e]})).filter((function(e){return-1===c.indexOf(e.name)})).forEach((function(e){return u.removeMark(i,l,e)})),t(u))}},t.getParentMark=function(e,t){var r=e.selection,n=r.from,o=r.$from,a=r.to,s=r.empty,i=e.doc;if(s)return t.isInSet(e.storedMarks||o.marks())||null;var l=[];return i.nodesBetween(n,a,(function(e){e.isInline&&l.push(t.isInSet(e.marks))})),1===l.length&&l[0]?l[0]:null},t.hasMark=function(e,t){var r,n=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return n[e]})),a=t.altStyle,i=e.selection,l=i.from,u=i.$from,c=i.to,d=i.empty,f=n[t.mark],p=e.doc,m=!1;return d?(r=e.storedMarks||u.marks(),m=f&&f.isInSet(r)||o.some((function(e){return n[e].isInSet(r)}))):m=f&&p.rangeHasMark(l,c,f)||o.some((function(e){return p.rangeHasMark(l,c,n[e])})),!m&&a?s.hasStyle(e,a):Boolean(m)},t.getMark=function(e,t){var r,n=e.selection,o=n.from,a=n.$from,s=n.to,i=n.empty,l=e.doc;if(i)r=t.isInSet(e.storedMarks||a.marks());else{var u=[];l.nodesBetween(o,s,(function(e){e.isInline&&u.push(t.isInSet(e.marks))})),u.some((function(e){return!e}))||(r=u[u.length-1])}return r};t.getActiveMarks=function(e,t){var r=e.selection,n=!1;if(r instanceof a.TextSelection&&r.$cursor)return{hasNodesWithoutMarks:n,marks:r.$cursor.marks().filter((function(e){return!t||e.type.name===t.name}))};var o=[];return r.content().content.descendants((function(e){if("text"===e.type.name){var r=t?function(e,t){return t.marks.filter((function(t){return t.type.name===e.name}))}(t,e):e.marks;e.marks.length>0&&r.length>0?o.push.apply(o,r):n=!0}})),{hasNodesWithoutMarks:n,marks:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3),a=r(5),s=r(2),i=r(0);t.changeBlockNode=function(e,t,r,n,o,i){var l=e.selection,u=l.from,c=l.to,d=!1;if(e.doc.nodesBetween(u,c,(function(t,r){if(d)return!1;if(t.isTextblock&&!t.hasMarkup(o,i))if(t.type===o)d=!0;else{var n=e.doc.resolve(r),a=n.index();d=n.parent.canReplaceWith(a,a+1,o)}})),!d)return!1;if(t){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var f=r.steps.length;r.doc.nodesBetween(u,c,(function(e,t){if(e.eq(n)&&e.isTextblock&&!e.hasMarkup(o,i)&&function(e,t,r){var n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}(r.doc,r.mapping.slice(f).map(t),o)){r.clearIncompatible(r.mapping.slice(f).map(t,1),o);var l=r.mapping.slice(f),u=l.map(t,1),c=l.map(t+e.nodeSize,1),d=new s.Slice(s.Fragment.from(o.create(i,null,e.marks)),0,0);return r.step(new a.ReplaceAroundStep(u,c,u+1,c-1,d,1,!0)),!1}}))}return!0},t.blockNodes=function(e){var t=e.selection,r=t.from,n=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(r,n,(function(e){e.isBlock&&a.push(e)})),a},t.formatBlockElements=function(e,r){return function(o,a){var s=t.blockNodes(o),i=o.schema.nodes,l=!1,u=o.tr;return u.setMeta("commandName",r),u.setMeta("args",{value:e}),s.forEach((function(r){if(r.type.isTextblock)if("p"===e){var s=r.attrs,c=s.level,d=n.__rest(s,["level"]);l=t.changeBlockNode(o,a,u,r,i.paragraph,d)||l}else if(/^h[1-6]$/i.test(e)){c=parseInt(e.substr(1),10);l=t.changeBlockNode(o,a,u,r,i.heading,n.__assign({},r.attrs,{level:c}))||l}else if("blockquote"===e){var f=r.attrs;c=f.level,d=n.__rest(f,["level"]);l=t.changeBlockNode(o,a,u,r,i.blockquote,d)||l}})),l&&a(u.scrollIntoView()),l}},t.getBlockFormats=function(e){var r=t.blockNodes(e),n=e.schema.nodes,o=[];return r.forEach((function(e){if(e.type===n.paragraph)o.push("p");else if(e.type===n.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){o.push("h"+t);break}})),o},t.addStyles=function(e,t){var r=e.attrs.style,n=null,a=null;r&&t.forEach((function(e){a={style:e.name,value:/^.+$/,newValue:e.value},n=o.changeStyles(r,a),r=n.changed?n.style:r}));return r=r||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:r||null})},t.hasNode=function(e,t){var r=e.selection,n=r.from,o=r.to,a=!1;return e.doc.nodesBetween(n,o,(function(e){return!(a=a||e.type===t)})),a};var l=function(e){return function(e,t){return Object.keys(e).filter((function(e){return t(e)})).reduce((function(t,r){var n;return Object.assign(t,((n={})[r]=e[r],n))}),{})}(e,(function(t){return null!==e[t]&&void 0!==e[t]&&""!==e[t]}))};t.getNodeTagName=function(e,t){var r,n=e.type.spec.parseDOM||[],o=e.attrs;return(r=1===n.length?n[0]:n.find((function(r){var n=s.DOMSerializer.fromSchema(t).serializeNode(e);return JSON.stringify(r.getAttrs(n))===JSON.stringify(l(o))})))?r.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},t.activeNode=function(e){var r,n=e.schema.nodes.doc;if(e.selection instanceof i.AllSelection)r=e.doc;else if(e.selection instanceof i.TextSelection){var a=e.selection.$anchor,s=a.node(a.blockRange().depth);r=o.getTypeName(s)===o.getTypeName(n)?a.node():s}else e.selection instanceof i.NodeSelection&&(r=e.selection.node);return{name:o.getTypeName(r),tag:t.getNodeTagName(r,e.schema)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(9),a=["blockquote",0],s=["hr"],i=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],d=function(e){for(var t,r={},n=e.attributes,o=0;o<n.length;o++)r[(t=n[o]).name]=t.value;return r},f=function(e,t){for(var r in e)if(r&&null!==e[r]&&r!==t)return!0;return!1},p=function(e,t){var r={};for(var n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},g=n.__assign({link:{attrs:n.__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:d}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=g;var v=n.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return a}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return s}},heading:{attrs:n.__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 n.__assign({},d(e),{level:1})}},{tag:"h2",getAttrs:function(e){return n.__assign({},d(e),{level:2})}},{tag:"h3",getAttrs:function(e){return n.__assign({},d(e),{level:3})}},{tag:"h4",getAttrs:function(e){return n.__assign({},d(e),{level:4})}},{tag:"h5",getAttrs:function(e){return n.__assign({},d(e),{level:5})}},{tag:"h6",getAttrs:function(e){return n.__assign({},d(e),{level:6})}}],toDOM:function(e){return f(e.attrs,"level")?["h"+e.attrs.level,p(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 i}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:n.__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:d}],toDOM:function(e){return f(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return n.__assign({},d(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?f(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",n.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"block*",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},function(e,t){e.exports=o},function(e,t){e.exports=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(12);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:n.__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:n.__assign({},o.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:n.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:n.__assign({},t.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(2),a=r(0),s=r(5),i=r(14),l=r(10),u=r(12);function c(e,r,n){var o=e.selection,a=o.from,s=o.to,i=e.schema.nodes,l=i.paragraph,u=i.heading,c=[];r.doc.nodesBetween(a,s,(function(e,t){e.type!==l&&e.type!==u||c.push({node:e,pos:t})}));for(var d=c.length-1;d>=0;d--){var f=c[d],p=r.doc.resolve(r.mapping.map(f.pos));if(p.depth>0){var m=void 0;m=f.node.textContent&&f.node.textContent.length>0?r.doc.resolve(r.mapping.map(f.pos+f.node.textContent.length)):r.doc.resolve(r.mapping.map(f.pos+1));var g=p.blockRange(m);g&&r.lift(g,t.getListLiftTarget(e.schema,p,n))}}return r}function d(e){return function(t,r,n){if(!n)return!1;var o=(t=n.state).schema.nodes[e.listType],a=t.selection,s=a.$from,i=a.$to,l=s.node(-2),u=s.node(-3),c=m(t.doc,s,i,o);return(l&&l.type===o||u&&u.type===o)&&c?h(e)(t,r):(c||(h(e)(t,r),t=n.state),y(o)(t,r))}}function f(e,t,r,n){n||(n=e.schema.nodes.listItem);var a=t.$from,i=t.$to,l=a.blockRange(i,(function(e){return e.childCount&&e.firstChild.type===n}));if(!l||l.depth<2||a.node(l.depth-1).type!==n)return r;var u=l.end,c=i.end(l.depth);return u<c&&(r.step(new s.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(n.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(r.doc.resolve(a.pos),r.doc.resolve(c),l.depth)),r.lift(l,s.liftTarget(l)).scrollIntoView()}function p(e,t,r,n,o,s){s||(s=e.schema.nodes.listItem);var i=!1;return o.doc.nodesBetween(t,r,(function(r,l){if(!i&&r.type===s&&l>t){i=!0;for(var u=n+3;u>n+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var d=o.doc.resolve(o.mapping.map(l+r.textContent.length)),p=new a.TextSelection(c,d);o=f(e,p,o,s)}}})),o}function m(e,t,r,n){return 0===g(e,t,r).filter((function(e){return e.type!==n})).length}function g(e,t,r){for(var n=Array(),o=v(e,t).depth,a=e.resolve(t.start(o));a.pos<=r.start(r.depth);){var s=Math.min(a.depth,o),i=a.node(s);if(i&&n.push(i),0===s)break;var l=e.resolve(a.after(s));if(l.start(s)>=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 n}function v(e,t){var r=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var n=t.node(t.depth),o=t;t.depth>=1;)(n=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==r.indexOf(n.type.name)&&(o=t);return o}function h(e){return function(t,r){var n=t.tr,o=t.selection,i=o.$from,l=o.$to;return n.doc.nodesBetween(i.pos,l.pos,(function(r,o){if(r.isTextblock||"blockquote"===r.type.name||"div"===r.type.name){var i=new a.NodeSelection(n.doc.resolve(n.mapping.map(o))),l=i.$from.blockRange(i.$to);if(!l||i.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&s.liftTarget(l);if(null==u)return!1;n.lift(l,u)}})),r&&r(n),!0}}function y(e){return i.autoJoin(l.wrapInList(e),(function(t,r){return t.type===r.type&&t.type===e}))}t.rootListDepth=function(e,t){for(var r,n=t.bulletList,o=t.orderedList,a=t.listItem,s=e.depth-1;s>0;s--){var i=e.node(s);if(i.type!==n&&i.type!==o||(r=s),i.type!==n&&i.type!==o&&i.type!==a)break}return r},t.getListLiftTarget=function(e,t,r){for(var n=t.depth,o=e.nodes[r.bulletList],a=e.nodes[r.orderedList],s=e.nodes[r.listItem],i=t.depth;i>0;i--){var l=t.node(i);if(l.type!==o&&l.type!==a||(n=i),l.type!==o&&l.type!==a&&l.type!==s)break}return n-1},t.liftSelectionList=c,t.toggleList=function(e,r,n,o,a){var s=o.listType,i=e.selection,l=i.$from.node(i.$from.depth-2),u=i.$to.node(i.$to.depth-2);if(l&&l.type.name===s&&u&&u.type.name===s){var f=n.state.schema.nodes,m={bulletList:f[o.bulletList],orderedList:f[o.orderedList],listItem:f[o.listItem]},g=t.rootListDepth(i.$to,m),v=p(e,i.$to.pos,i.$to.end(g),g,n.state.tr,m.listItem);return(v=c(e,v,o)).setMeta("commandName",a),r(v),!0}return d(o)(e,r,n)},t.toggleListCommand=d,t.liftFollowingList=p,t.isRangeOfType=m,t.getAncestorNodesBetween=g,t.findAncestorPosition=v,t.liftListItems=h,t.wrapInList=y,t.toggleUnorderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.bulletList.listType},u.bulletList.types))},t.toggleOrderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.orderedList.listType},u.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,r){return l.splitListItem(e)(t,(function(e){var n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();n&&e.ensureMarks(n),r(e)}))}}},function(e,t){e.exports=s},function(e,t){e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17);t.getHtml=n.getHtml,t.setHtml=n.setHtml,t.parseContent=n.parseContent;var o=r(4);t.applyInlineStyle=o.applyInlineStyle,t.getInlineStyles=o.getInlineStyles,t.toggleInlineFormat=o.toggleInlineFormat;var a=r(18);t.applyLink=a.applyLink,t.removeLink=a.removeLink;var s=r(19);t.insertText=s.insertText;var i=r(20);t.insertImage=i.insertImage;var l=r(21);t.alignBlocks=l.alignBlocks,t.isAligned=l.isAligned;var u=r(7);t.hasNode=u.hasNode,t.activeNode=u.activeNode,t.formatBlockElements=u.formatBlockElements,t.getBlockFormats=u.getBlockFormats;var c=r(6);t.hasMark=c.hasMark,t.getMark=c.getMark,t.getActiveMarks=c.getActiveMarks,t.removeAllMarks=c.removeAllMarks;var d=r(22);t.indent=d.indent,t.canIndentAsListItem=d.canIndentAsListItem,t.outdent=d.outdent,t.canOutdentAsListItem=d.canOutdentAsListItem,t.isIndented=d.isIndented,t.canBeIndented=d.canBeIndented,t.indentBlocks=d.indentBlocks;var f=r(13);t.toggleOrderedList=f.toggleOrderedList,t.toggleUnorderedList=f.toggleUnorderedList,t.toggleList=f.toggleList;var p=r(3);t.createContentNode=p.createContentNode,t.hasSameMarkup=p.hasSameMarkup,t.getUniqueStyleValues=p.getUniqueStyleValues,t.getSelectionText=p.getSelectionText,t.getNodeFromSelection=p.getNodeFromSelection,t.canInsert=p.canInsert,t.insertNode=p.insertNode,t.indentHtml=p.indentHtml;var m=r(15);t.redo=m.redo,t.undo=m.undo;var g=r(23);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignRemoveRules=g.alignRemoveRules;var v=r(11);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var h=r(8);t.nodes=h.nodes,t.marks=h.marks;var y=r(24);t.buildKeymap=y.buildKeymap,t.buildListKeymap=y.buildListKeymap;var k=r(26);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=r(27);t.sanitize=M.sanitize,t.removeComments=M.removeComments,t.removeTag=M.removeTag;var b=r(28);t.convertMsLists=b.convertMsLists;var S=r(29);t.createTable=S.createTable;var _=r(9);t.addRowBefore=_.addRowBefore,t.addRowAfter=_.addRowAfter,t.addColumnBefore=_.addColumnBefore,t.addColumnAfter=_.addColumnAfter,t.deleteRow=_.deleteRow,t.deleteColumn=_.deleteColumn,t.deleteTable=_.deleteTable,t.mergeCells=_.mergeCells,t.splitCell=_.splitCell,t.selectionCell=_.selectionCell},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(0);t.parseContent=function(e,t,r){var o=document.createElement("div");return o.innerHTML=e,n.DOMParser.fromSchema(t).parse(o,r)},t.getHtml=function(e){var t=n.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),r=document.createElement("div");return r.appendChild(t),r.innerHTML},t.setHtml=function(e,r,n){return void 0===r&&(r="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(a,s){return s(a.tr.setSelection(new o.AllSelection(a.doc)).replaceSelectionWith(t.parseContent(e,a.schema,n)).setMeta("commandName",r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(6),a=r(0);t.removeLink=function(e,t){return function(r,a){var s=r.selection.$cursor;if(s){var i=s.parent,l=s.index(),u=r.schema.marks[e.mark],c=i.child(l).marks.find((function(e){return e.type===u})),d=i.childCount,f=s.pos-s.textOffset,p=i.child(l).nodeSize,m=void 0,g=void 0;for(m=l-1;m>=0&&c.isInSet(i.child(m).marks);)p+=g=i.child(m).nodeSize,f-=g,m-=1;for(m=l+1;m<d&&c.isInSet(i.child(m).marks);)p+=i.child(m).nodeSize,m+=1;a(o.removeMark(t||r.tr,f,f+p,c))}else n.toggleInlineFormat(e,t)(r,a)}},t.applyLink=function(e,r){var s=e.mark,i=e.attrs;return void 0===r&&(r="link"),function(e,l){var u=e.schema.marks,c=e.tr;r&&(c.setMeta("commandName",r),c.setMeta("args",i));var d=!1,f=function(){return d=!0};if(o.getParentMark(e,u[s]))!function(e,t){return function(r,n){var o=r.selection,a=o.$cursor,s=o.from,i=o.to,l=r.schema.marks[e.mark];if(a){var u=a.parent,c=a.index(),d=u.child(c).marks.find((function(e){return e.type===l})),f=u.childCount,p=a.pos-a.textOffset,m=u.child(c).nodeSize,g=void 0,v=void 0;for(g=c-1;g>=0&&d.isInSet(u.child(g).marks);)m+=v=u.child(g).nodeSize,p-=v,g-=1;for(g=c+1;g<f&&d.isInSet(u.child(g).marks);)m+=u.child(g).nodeSize,g+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),n(t)}else t.doc.nodesBetween(s,i,(function(r,o){r.isInline&&l.isInSet(r.marks)&&(t.removeMark(o,o+r.nodeSize,l),t.addMark(o,o+r.nodeSize,l.create(e.attrs)),n(t))}))}}({mark:s,attrs:i},c)(e,f);else{var p=e;o.hasMark(e,{mark:s})&&(t.removeLink({mark:s,attrs:i},c)(e,f),p=a.EditorState.create({doc:c.doc,selection:c.selection})),d?o.toggleMark(u[s],i,c)(p,f):n.toggleInlineFormat({mark:s},c,i)(p,f)}return d&&l(c),d}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,r){r(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3);t.insertImage=function(e){return function(t,r){var o=t.schema.nodes.image,a=o.createAndFill(e);n.insertNode(a)(t,(function(t){return r(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7);t.alignBlocks=function(e,t){return function(r,o){var a=n.blockNodes(r),s=r.tr;s.setMeta("commandName",t);var i=!1;return a.forEach((function(t){if(t.type.isTextblock){var a={},l=e.find((function(e){return e.node===t.type.name}));l&&(a=n.addStyles(t,l.style)),i=n.changeBlockNode(r,o,s,t,t.type,a)||i}})),i&&o(s.scrollIntoView()),i}},t.isAligned=function(e,t){var r=n.blockNodes(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}));r&&(o=r.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(10),o=r(11),a=r(7),s=r(3);t.indentBlocks=function(e,t,r){return function(n,o){var s=a.blockNodes(n),i=n.tr,l=!1;return i.setMeta("commandName",t),s.forEach((function(t){if(t.type.isTextblock){var s=void 0,u=e.find((function(e){return e.node===t.type.name}));if(u){var c="rtl"===r?u.rtlStyle:u.style,d={name:c,value:u.step>0?""+u.step+u.unit:""};if(t.attrs.style){var f=new RegExp(c+":\\s?(\\d+)"+u.unit,"i"),p=t.attrs.style.match(f);if(p){var m=parseFloat(p[1])+u.step;m=m<=0?"":m,d.value=""+m+(m?u.unit:"")}}s=a.addStyles(t,[d])}s&&(l=a.changeBlockNode(n,o,i,t,t.type,s)||l)}})),l&&o(i.scrollIntoView()),l}},t.isIndented=function(e,t,r){var n=a.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));if(n){var a="rtl"===r?n.rtlStyle:n.style,s=new RegExp(a+":\\s?\\d+"+n.unit,"i");o=s.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return n.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var r=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],a=e.schema.nodes[t.listsTypes.bulletList],i=!!s.findNthParentNodeOfType(o,2)(e.selection),l=!!s.findNthParentNodeOfType(a,2)(e.selection);return(i||l)&&n.liftListItem(r)(e)},t.canBeIndented=function(e,r){var n=e.schema.nodes,s=n[o.indentRules.listsTypes.listItem];return(t.isIndented(e,r.nodes)||o.indentRules.nodes.some((function(t){return n[t.node]&&a.hasNode(e,n[t.node])})))&&!a.hasNode(e,s)},t.indent=function(e,r){var a=e.schema.nodes[o.indentRules.listsTypes.listItem],s=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,a)?n.sinkListItem(a)(e,r):s&&t.indentBlocks(o.indentRules.nodes)(e,r)},t.outdent=function(e,r){var a=e.schema.nodes[o.outdentRules.listsTypes.listItem],s=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?n.liftListItem(a)(e,r):s&&t.indentBlocks(o.outdentRules.nodes)(e,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[n("text-align","left")]},{node:"heading",style:[n("text-align","left")]},{node:"listItem",style:[n("text-align","left"),n("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[n("text-align","right")]},{node:"heading",style:[n("text-align","right")]},{node:"listItem",style:[n("text-align","right"),n("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[n("text-align","center")]},{node:"heading",style:[n("text-align","center")]},{node:"listItem",style:[n("text-align","center"),n("list-style-position","inside")]}],t.alignRemoveRules=[{node:"paragraph",style:[n("text-align","")]},{node:"heading",style:[n("text-align","")]},{node:"listItem",style:[n("text-align",""),n("list-style-position","")]}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(14),o=r(15),a=r(25),s=r(13),i="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=n.chainCommands(a.undoInputRule,n.deleteSelection,n.joinBackward,n.selectNodeBackward),t.Enter=n.chainCommands(n.newlineInCode,n.createParagraphNear,n.liftEmptyBlock,n.splitBlockKeepMarks),i||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=n.toggleMark(e.marks.strong)),e.marks.em&&(t["Mod-i"]=n.toggleMark(e.marks.em)),e.marks.underline&&(t["Mod-u"]=n.toggleMark(e.marks.underline)),e.nodes.hardBreak){var r=e.nodes.hardBreak,s=n.chainCommands(n.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0}));t["Mod-Enter"]=s,t["Shift-Enter"]=s,i&&(t["Ctrl-Enter"]=s)}return t},t.buildListKeymap=function(e){var t={};return e.nodes.listItem&&(t.Enter=s.splitListItemKeepMarks(e.nodes.listItem)),t}},function(e,t){e.exports=l},function(e,t,r){"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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=function(e){return e=(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,"")},t.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},t.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e){return/^MsoListParagraph/.test(e.className)},a=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},s=function(e,t){var r=document.createElement(e);return r.style.listStyleType=t,r},i=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},l=function(e,t){var r=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var n=e;n.getAttribute("datalist")?(r.push(e),t.add(r)):o(n)&&r.length?r.push(e):(r=[],"DIV"===n.nodeName?l(n.children,t):"TABLE"===n.nodeName&&Array.from(n.querySelectorAll("td,th")).forEach((function(e){l(e.children,t)})))}}))},u=function(e){var t,r=e.innerHTML,n=function(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")};return r=r.replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(r)?{tag:"ul",style:(t=n(a(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:i(n(a(e)))}:void 0},c=function(e){var t,r=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?a(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"!==r?"<"+r+">"+e.innerHTML+"</"+r+">":e.innerHTML),e.parentNode.removeChild(e);var n=document.createElement("li");return n.innerHTML=t,n};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(n,(function(e,t,r){return'datalist="'+t+'" datalevel="'+r+'" '+e}))}(e);var r=new Set;return l(t.children,r),r.forEach((function(e){return function(e){var t,r,n,a,i,l,d,f,p,m,g,v,h,y=-1,k={};for(f=0;f<e.length;f++){var M=(h={datalist:(p=e[f]).getAttribute("datalist"),datalevel:p.getAttribute("datalevel")}).datalist,b=u(p);if(m=b&&b.tag){if(g=h.datalevel||parseFloat(p.style.marginLeft||0),h.datalevel||p.style.marginLeft){var S=m+M;k[g]||(k[g]={}),(!r||r<0)&&(r=g,n=M,a=(d=e.filter((function(e){return e.getAttribute("datalist")===String(n)})))[d.length-1],l=s(m,b&&b.style),p.parentNode.insertBefore(l,p),y=g,k[g][S]=l),i=a===p,v=k[g][S],(g>y||!v)&&(v=s(m,b&&b.style),k[g][S]=v,t.appendChild(v)),t=c(p),v.appendChild(t),i?r=y=-1:y=g}}else!t||i&&!o(p)||(p.style.marginLeft&&(p.style.marginLeft=""),p.style.marginLeft&&(p.style.margin=""),t.appendChild(p))}}(e)})),t.innerHTML}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,r){for(var n,o=e.table,a=e.table_row,s=e.table_cell,i=[],l=0;l<t+1;l++){n=[];for(var u=0;u<r+1;u++)n.push(s.createAndFill());i.push(a.createAndFill(void 0,n))}return o.createAndFill(void 0,i)}}])}));

@@ -8,5 +8,6 @@ import { blockNodes, addStyles, changeBlockNode } from './blockNode';

*/
export var alignBlocks = function (actions) { return function (state, dispatch) {
export var alignBlocks = function (actions, commandName) { return function (state, dispatch) {
var blocks = blockNodes(state);
var tr = state.tr;
tr.setMeta('commandName', commandName);
var result = false;

@@ -13,0 +14,0 @@ blocks.forEach(function (node) {

@@ -83,3 +83,3 @@ import * as tslib_1 from "tslib";

};
//react method used for chaning the formats
//react method used for changing the formats
/**

@@ -86,0 +86,0 @@ * @hidden

import { chainCommands, toggleMark, exitCode, newlineInCode, createParagraphNear, liftEmptyBlock, splitBlockKeepMarks, deleteSelection, joinBackward, selectNodeBackward } from 'prosemirror-commands';
import { undo, redo } from 'prosemirror-history';
import { undoInputRule } from 'prosemirror-inputrules';
// import { Keymap } from '../types/keymap';
import { splitListItemKeepMarks } from '../lists';

@@ -5,0 +6,0 @@ var mac = typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false;

@@ -75,9 +75,10 @@ import { toggleInlineFormat } from './inline-style';

*/
export var applyLink = function (_a, command) {
export var applyLink = function (_a, commandName) {
var mark = _a.mark, attrs = _a.attrs;
if (commandName === void 0) { commandName = 'link'; }
return function (state, dispatch) {
var marks = state.schema.marks;
var tr = state.tr;
if (command) {
tr.setMeta('commandName', command);
if (commandName) {
tr.setMeta('commandName', commandName);
tr.setMeta('args', attrs);

@@ -84,0 +85,0 @@ }

@@ -5,5 +5,4 @@ import * as tslib_1 from "tslib";

import { liftTarget, ReplaceAroundStep } from 'prosemirror-transform';
import * as pmCommands from 'prosemirror-commands';
import * as pmListCommands from 'prosemirror-schema-list';
import { splitListItem } from 'prosemirror-schema-list';
import { autoJoin } from 'prosemirror-commands';
import { wrapInList as pmWrapInList, splitListItem } from 'prosemirror-schema-list';
import { bulletList as bulletListSettings, orderedList as orderedListSettings } from './types/list-settings';

@@ -276,3 +275,3 @@ //exactly the same

export function wrapInList(nodeType) {
return pmCommands.autoJoin(pmListCommands.wrapInList(nodeType), function (before, after) { return before.type === after.type && before.type === nodeType; });
return autoJoin(pmWrapInList(nodeType), function (before, after) { return before.type === after.type && before.type === nodeType; });
}

@@ -279,0 +278,0 @@ /**

@@ -1,3 +0,3 @@

export { getHtml, setHtml } from './source';
export { applyInlineStyle, toggleInlineFormat } from './inline-style';
export { getHtml, setHtml, parseContent } from './source';
export { applyInlineStyle, getInlineStyles, toggleInlineFormat } from './inline-style';
export { applyLink, removeLink } from './link';

@@ -7,7 +7,7 @@ export { insertText } from './text';

export { alignBlocks, isAligned } from './align';
export { hasNode, activeNode, formatBlockElements } from './blockNode';
export { hasNode, activeNode, formatBlockElements, getBlockFormats } from './blockNode';
export { hasMark, getMark, getActiveMarks, removeAllMarks } from './mark';
export { indent, canIndentAsListItem, outdent, canOutdentAsListItem, isIndented, canBeIndented } from './indent';
export { toggleOrderedList, toggleUnorderedList } from './lists';
export { createContentNode, hasSameMarkup, getUniqueStyleValues, getSelectionText, getNodeFromSelection, canInsert, insertNode } from './utils';
export { indent, canIndentAsListItem, outdent, canOutdentAsListItem, isIndented, canBeIndented, indentBlocks } from './indent';
export { toggleOrderedList, toggleUnorderedList, toggleList } from './lists';
export { createContentNode, hasSameMarkup, getUniqueStyleValues, getSelectionText, getNodeFromSelection, canInsert, insertNode, indentHtml } from './utils';
export { redo, undo } from 'prosemirror-history';

@@ -19,3 +19,5 @@ export { alignLeftRules, alignCenterRules, alignRightRules, alignRemoveRules } from './types/align-rules';

export { bold, italic, underline, strikethrough, subscript, superscript, link } from './types/commands';
export { sanitize, removeComments, removeTag } from './paste';
export { convertMsLists } from './listConvert';
export { createTable } from './table';
export { addRowBefore, addRowAfter, addColumnBefore, addColumnAfter, deleteRow, deleteColumn, deleteTable, mergeCells, splitCell, selectionCell } from 'prosemirror-tables';

@@ -224,3 +224,3 @@ import { RemoveMarkStep } from 'prosemirror-transform';

}
return !!result;
return Boolean(result);
};

@@ -238,7 +238,11 @@ /**

else {
var marks_2 = [];
stateDoc.nodesBetween(from, to, function (node) {
if (node.isInline && !mark) {
mark = markType.isInSet(node.marks);
if (node.isInline) {
marks_2.push(markType.isInSet(node.marks));
}
});
if (!marks_2.some(function (m) { return !m; })) {
mark = marks_2[marks_2.length - 1];
}
}

@@ -245,0 +249,0 @@ return mark;

@@ -11,3 +11,3 @@ import { DOMSerializer, DOMParser } from 'prosemirror-model';

*/
export var createContentNode = function (content, schema, parseOptions) {
export var parseContent = function (content, schema, parseOptions) {
var element = document.createElement('div');

@@ -31,3 +31,3 @@ // when using ngModel with name attr, content is null and errors, default params dont help

/**
* Replases the content of the editor with a new one.
* Replaces the content of the editor with a new one.
*

@@ -45,5 +45,5 @@ * @param content - The new HTML content.

.setSelection(new AllSelection(state.doc))
.replaceSelectionWith(createContentNode(content, state.schema, parseOptions))
.replaceSelectionWith(parseContent(content, state.schema, parseOptions))
.setMeta('commandName', command));
};
};

@@ -8,5 +8,5 @@ /**

var tableRows = [];
var cells = [];
var cells;
for (var r = 0; r < rows + 1; r++) {
cells.length = 0;
cells = [];
for (var c = 0; c < columns + 1; c++) {

@@ -13,0 +13,0 @@ cells.push(table_cell.createAndFill());

@@ -242,1 +242,10 @@ import { Node, DOMParser, Schema, Fragment } from 'prosemirror-model';

};
/**
* @hidden
*/
export var indentHtml = function (content) {
return content.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/ig, '</$1>\n')
.replace(/<(ul|ol)([^>]*)><li/ig, '<$1$2>\n<li')
.replace(/<br \/>/ig, '<br />\n')
.replace(/\n$/, '');
};

@@ -8,5 +8,6 @@ import { blockNodes, addStyles, changeBlockNode } from './blockNode';

*/
export const alignBlocks = (actions) => (state, dispatch) => {
export const alignBlocks = (actions, commandName) => (state, dispatch) => {
const blocks = blockNodes(state);
const tr = state.tr;
tr.setMeta('commandName', commandName);
let result = false;

@@ -13,0 +14,0 @@ blocks.forEach(node => {

@@ -83,3 +83,3 @@ import * as tslib_1 from "tslib";

};
//react method used for chaning the formats
//react method used for changing the formats
/**

@@ -86,0 +86,0 @@ * @hidden

import { chainCommands, toggleMark, exitCode, newlineInCode, createParagraphNear, liftEmptyBlock, splitBlockKeepMarks, deleteSelection, joinBackward, selectNodeBackward } from 'prosemirror-commands';
import { undo, redo } from 'prosemirror-history';
import { undoInputRule } from 'prosemirror-inputrules';
// import { Keymap } from '../types/keymap';
import { splitListItemKeepMarks } from '../lists';

@@ -5,0 +6,0 @@ const mac = typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false;

@@ -75,7 +75,7 @@ import { toggleInlineFormat } from './inline-style';

*/
export const applyLink = ({ mark, attrs }, command) => (state, dispatch) => {
export const applyLink = ({ mark, attrs }, commandName = 'link') => (state, dispatch) => {
const marks = state.schema.marks;
const tr = state.tr;
if (command) {
tr.setMeta('commandName', command);
if (commandName) {
tr.setMeta('commandName', commandName);
tr.setMeta('args', attrs);

@@ -82,0 +82,0 @@ }

import { Fragment, Slice, NodeRange } from 'prosemirror-model';
import { TextSelection, NodeSelection } from 'prosemirror-state';
import { liftTarget, ReplaceAroundStep } from 'prosemirror-transform';
import * as pmCommands from 'prosemirror-commands';
import * as pmListCommands from 'prosemirror-schema-list';
import { splitListItem } from 'prosemirror-schema-list';
import { autoJoin } from 'prosemirror-commands';
import { wrapInList as pmWrapInList, splitListItem } from 'prosemirror-schema-list';
import { bulletList as bulletListSettings, orderedList as orderedListSettings } from './types/list-settings';

@@ -274,3 +273,3 @@ //exactly the same

export function wrapInList(nodeType) {
return pmCommands.autoJoin(pmListCommands.wrapInList(nodeType), (before, after) => before.type === after.type && before.type === nodeType);
return autoJoin(pmWrapInList(nodeType), (before, after) => before.type === after.type && before.type === nodeType);
}

@@ -277,0 +276,0 @@ /**

@@ -1,3 +0,3 @@

export { getHtml, setHtml } from './source';
export { applyInlineStyle, toggleInlineFormat } from './inline-style';
export { getHtml, setHtml, parseContent } from './source';
export { applyInlineStyle, getInlineStyles, toggleInlineFormat } from './inline-style';
export { applyLink, removeLink } from './link';

@@ -7,7 +7,7 @@ export { insertText } from './text';

export { alignBlocks, isAligned } from './align';
export { hasNode, activeNode, formatBlockElements } from './blockNode';
export { hasNode, activeNode, formatBlockElements, getBlockFormats } from './blockNode';
export { hasMark, getMark, getActiveMarks, removeAllMarks } from './mark';
export { indent, canIndentAsListItem, outdent, canOutdentAsListItem, isIndented, canBeIndented } from './indent';
export { toggleOrderedList, toggleUnorderedList } from './lists';
export { createContentNode, hasSameMarkup, getUniqueStyleValues, getSelectionText, getNodeFromSelection, canInsert, insertNode } from './utils';
export { indent, canIndentAsListItem, outdent, canOutdentAsListItem, isIndented, canBeIndented, indentBlocks } from './indent';
export { toggleOrderedList, toggleUnorderedList, toggleList } from './lists';
export { createContentNode, hasSameMarkup, getUniqueStyleValues, getSelectionText, getNodeFromSelection, canInsert, insertNode, indentHtml } from './utils';
export { redo, undo } from 'prosemirror-history';

@@ -19,3 +19,5 @@ export { alignLeftRules, alignCenterRules, alignRightRules, alignRemoveRules } from './types/align-rules';

export { bold, italic, underline, strikethrough, subscript, superscript, link } from './types/commands';
export { sanitize, removeComments, removeTag } from './paste';
export { convertMsLists } from './listConvert';
export { createTable } from './table';
export { addRowBefore, addRowAfter, addColumnBefore, addColumnAfter, deleteRow, deleteColumn, deleteTable, mergeCells, splitCell, selectionCell } from 'prosemirror-tables';

@@ -218,3 +218,3 @@ import { RemoveMarkStep } from 'prosemirror-transform';

}
return !!result;
return Boolean(result);
};

@@ -232,7 +232,11 @@ /**

else {
let marks = [];
stateDoc.nodesBetween(from, to, node => {
if (node.isInline && !mark) {
mark = markType.isInSet(node.marks);
if (node.isInline) {
marks.push(markType.isInSet(node.marks));
}
});
if (!marks.some(m => !m)) {
mark = marks[marks.length - 1];
}
}

@@ -239,0 +243,0 @@ return mark;

@@ -11,3 +11,3 @@ import { DOMSerializer, DOMParser } from 'prosemirror-model';

*/
export const createContentNode = (content, schema, parseOptions) => {
export const parseContent = (content, schema, parseOptions) => {
const element = document.createElement('div');

@@ -31,3 +31,3 @@ // when using ngModel with name attr, content is null and errors, default params dont help

/**
* Replases the content of the editor with a new one.
* Replaces the content of the editor with a new one.
*

@@ -41,3 +41,3 @@ * @param content - The new HTML content.

.setSelection(new AllSelection(state.doc))
.replaceSelectionWith(createContentNode(content, state.schema, parseOptions))
.replaceSelectionWith(parseContent(content, state.schema, parseOptions))
.setMeta('commandName', command));

@@ -8,5 +8,5 @@ /**

const tableRows = [];
const cells = [];
let cells;
for (let r = 0; r < rows + 1; r++) {
cells.length = 0;
cells = [];
for (let c = 0; c < columns + 1; c++) {

@@ -13,0 +13,0 @@ cells.push(table_cell.createAndFill());

@@ -240,1 +240,10 @@ import { Node, DOMParser, Schema, Fragment } from 'prosemirror-model';

};
/**
* @hidden
*/
export const indentHtml = (content) => {
return content.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/ig, '</$1>\n')
.replace(/<(ul|ol)([^>]*)><li/ig, '<$1$2>\n<li')
.replace(/<br \/>/ig, '<br />\n')
.replace(/\n$/, '');
};

@@ -9,3 +9,3 @@ import { AlignRule } from './types/align-rules';

*/
export declare const alignBlocks: (actions: AlignRule[]) => Command;
export declare const alignBlocks: (actions: AlignRule[], commandName?: string) => Command;
/**

@@ -12,0 +12,0 @@ * @hidden

@@ -10,5 +10,6 @@ "use strict";

*/
exports.alignBlocks = function (actions) { return function (state, dispatch) {
exports.alignBlocks = function (actions, commandName) { return function (state, dispatch) {
var blocks = blockNode_1.blockNodes(state);
var tr = state.tr;
tr.setMeta('commandName', commandName);
var result = false;

@@ -15,0 +16,0 @@ blocks.forEach(function (node) {

@@ -1,2 +0,1 @@

import { Command } from './types/command';
import { DispatchFn } from './types/dispatchFn';

@@ -14,3 +13,3 @@ /**

*/
export declare const formatBlockElements: (value: "blockquote" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p", commandName?: Command) => (state: any, dispatch: any) => boolean;
export declare const formatBlockElements: (value: "blockquote" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p", commandName?: string) => (state: any, dispatch: any) => boolean;
/**

@@ -17,0 +16,0 @@ * @hidden

@@ -85,3 +85,3 @@ "use strict";

};
//react method used for chaning the formats
//react method used for changing the formats
/**

@@ -88,0 +88,0 @@ * @hidden

/**
* @hidden
*/
export declare const buildKeymap: (schema: any) => Record<string, import("../types/command").Command>;
export declare const buildKeymap: (schema: any) => any;
/**
* @hidden
*/
export declare const buildListKeymap: (schema: any) => Record<string, import("../types/command").Command>;
export declare const buildListKeymap: (schema: any) => any;

@@ -6,2 +6,3 @@ "use strict";

var prosemirror_inputrules_1 = require("prosemirror-inputrules");
// import { Keymap } from '../types/keymap';
var lists_1 = require("../lists");

@@ -8,0 +9,0 @@ var mac = typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false;

@@ -8,3 +8,3 @@ import { IndentRule, IndentationRules } from './types/indent-rules';

*/
export declare const indentBlocks: (actions: IndentRule[], command?: Command, dir?: string) => Command;
export declare const indentBlocks: (actions: IndentRule[], command?: string, dir?: string) => Command;
/**

@@ -11,0 +11,0 @@ * @hidden

import { DispatchFn } from './types/dispatchFn';
import { Command } from './types/command';
import { InlineFormatOptions } from './types/commands';

@@ -41,2 +40,2 @@ /**

value: string;
}, command?: Command) => (state: any, dispatch: any) => boolean;
}, command?: string) => (state: any, dispatch: any) => boolean;

@@ -1,2 +0,1 @@

import { Command } from './types/command';
/**

@@ -12,2 +11,2 @@ * @hidden

attrs: any;
}, command?: Command) => (state: any, dispatch: any) => boolean;
}, commandName?: string) => (state: any, dispatch: any) => boolean;

@@ -77,9 +77,10 @@ "use strict";

*/
exports.applyLink = function (_a, command) {
exports.applyLink = function (_a, commandName) {
var mark = _a.mark, attrs = _a.attrs;
if (commandName === void 0) { commandName = 'link'; }
return function (state, dispatch) {
var marks = state.schema.marks;
var tr = state.tr;
if (command) {
tr.setMeta('commandName', command);
if (commandName) {
tr.setMeta('commandName', commandName);
tr.setMeta('args', attrs);

@@ -86,0 +87,0 @@ }

@@ -29,3 +29,3 @@ import { ResolvedPos, NodeType } from 'prosemirror-model';

*/
export declare const toggleList: (state: any, dispatch: (tr: any) => void, view: any, listNodeNames: ListNodeNames, command?: Command) => boolean;
export declare const toggleList: (state: any, dispatch: (tr: any) => void, view: any, listNodeNames: ListNodeNames, command?: string) => boolean;
/**

@@ -32,0 +32,0 @@ * @hidden

@@ -7,4 +7,3 @@ "use strict";

var prosemirror_transform_1 = require("prosemirror-transform");
var pmCommands = require("prosemirror-commands");
var pmListCommands = require("prosemirror-schema-list");
var prosemirror_commands_1 = require("prosemirror-commands");
var prosemirror_schema_list_1 = require("prosemirror-schema-list");

@@ -285,3 +284,3 @@ var list_settings_1 = require("./types/list-settings");

function wrapInList(nodeType) {
return pmCommands.autoJoin(pmListCommands.wrapInList(nodeType), function (before, after) { return before.type === after.type && before.type === nodeType; });
return prosemirror_commands_1.autoJoin(prosemirror_schema_list_1.wrapInList(nodeType), function (before, after) { return before.type === after.type && before.type === nodeType; });
}

@@ -288,0 +287,0 @@ exports.wrapInList = wrapInList;

@@ -1,3 +0,3 @@

export { getHtml, setHtml } from './source';
export { applyInlineStyle, toggleInlineFormat } from './inline-style';
export { getHtml, setHtml, parseContent } from './source';
export { applyInlineStyle, getInlineStyles, toggleInlineFormat } from './inline-style';
export { applyLink, removeLink } from './link';

@@ -7,7 +7,7 @@ export { insertText } from './text';

export { alignBlocks, isAligned } from './align';
export { hasNode, activeNode, formatBlockElements } from './blockNode';
export { hasNode, activeNode, formatBlockElements, getBlockFormats } from './blockNode';
export { hasMark, getMark, getActiveMarks, removeAllMarks } from './mark';
export { indent, canIndentAsListItem, outdent, canOutdentAsListItem, isIndented, canBeIndented } from './indent';
export { toggleOrderedList, toggleUnorderedList } from './lists';
export { createContentNode, hasSameMarkup, getUniqueStyleValues, getSelectionText, getNodeFromSelection, canInsert, insertNode } from './utils';
export { indent, canIndentAsListItem, outdent, canOutdentAsListItem, isIndented, canBeIndented, indentBlocks } from './indent';
export { toggleOrderedList, toggleUnorderedList, toggleList } from './lists';
export { createContentNode, hasSameMarkup, getUniqueStyleValues, getSelectionText, getNodeFromSelection, canInsert, insertNode, indentHtml } from './utils';
export { redo, undo } from 'prosemirror-history';

@@ -20,3 +20,5 @@ export { Command } from './types/command';

export { bold, italic, underline, strikethrough, subscript, superscript, link } from './types/commands';
export { sanitize, removeComments, removeTag } from './paste';
export { convertMsLists } from './listConvert';
export { createTable } from './table';
export { addRowBefore, addRowAfter, addColumnBefore, addColumnAfter, deleteRow, deleteColumn, deleteTable, mergeCells, splitCell, selectionCell } from 'prosemirror-tables';

@@ -6,4 +6,6 @@ "use strict";

exports.setHtml = source_1.setHtml;
exports.parseContent = source_1.parseContent;
var inline_style_1 = require("./inline-style");
exports.applyInlineStyle = inline_style_1.applyInlineStyle;
exports.getInlineStyles = inline_style_1.getInlineStyles;
exports.toggleInlineFormat = inline_style_1.toggleInlineFormat;

@@ -24,2 +26,3 @@ var link_1 = require("./link");

exports.formatBlockElements = blockNode_1.formatBlockElements;
exports.getBlockFormats = blockNode_1.getBlockFormats;
var mark_1 = require("./mark");

@@ -37,5 +40,7 @@ exports.hasMark = mark_1.hasMark;

exports.canBeIndented = indent_1.canBeIndented;
exports.indentBlocks = indent_1.indentBlocks;
var lists_1 = require("./lists");
exports.toggleOrderedList = lists_1.toggleOrderedList;
exports.toggleUnorderedList = lists_1.toggleUnorderedList;
exports.toggleList = lists_1.toggleList;
var utils_1 = require("./utils");

@@ -49,2 +54,3 @@ exports.createContentNode = utils_1.createContentNode;

exports.insertNode = utils_1.insertNode;
exports.indentHtml = utils_1.indentHtml;
var prosemirror_history_1 = require("prosemirror-history");

@@ -75,2 +81,8 @@ exports.redo = prosemirror_history_1.redo;

exports.link = commands_1.link;
var paste_1 = require("./paste");
exports.sanitize = paste_1.sanitize;
exports.removeComments = paste_1.removeComments;
exports.removeTag = paste_1.removeTag;
var listConvert_1 = require("./listConvert");
exports.convertMsLists = listConvert_1.convertMsLists;
var table_1 = require("./table");

@@ -77,0 +89,0 @@ exports.createTable = table_1.createTable;

@@ -226,3 +226,3 @@ "use strict";

}
return !!result;
return Boolean(result);
};

@@ -240,7 +240,11 @@ /**

else {
var marks_2 = [];
stateDoc.nodesBetween(from, to, function (node) {
if (node.isInline && !mark) {
mark = markType.isInSet(node.marks);
if (node.isInline) {
marks_2.push(markType.isInSet(node.marks));
}
});
if (!marks_2.some(function (m) { return !m; })) {
mark = marks_2[marks_2.length - 1];
}
}

@@ -247,0 +251,0 @@ return mark;

import { Command } from './types/command';
import { CommandName } from './types/commands';
/**

@@ -11,3 +10,3 @@ * Creates a Node from the given content.

*/
export declare const createContentNode: (content: string, schema: any, parseOptions: any) => Node;
export declare const parseContent: (content: string, schema: any, parseOptions?: any) => any;
/**

@@ -21,3 +20,3 @@ * A function that serializes the Editor State content as HTML string.

/**
* Replases the content of the editor with a new one.
* Replaces the content of the editor with a new one.
*

@@ -29,2 +28,2 @@ * @param content - The new HTML content.

*/
export declare const setHtml: (content: string, command?: CommandName, parseOptions?: any) => Command;
export declare const setHtml: (content: string, command?: string, parseOptions?: any) => Command;

@@ -13,3 +13,3 @@ "use strict";

*/
exports.createContentNode = function (content, schema, parseOptions) {
exports.parseContent = function (content, schema, parseOptions) {
var element = document.createElement('div');

@@ -33,3 +33,3 @@ // when using ngModel with name attr, content is null and errors, default params dont help

/**
* Replases the content of the editor with a new one.
* Replaces the content of the editor with a new one.
*

@@ -47,5 +47,5 @@ * @param content - The new HTML content.

.setSelection(new prosemirror_state_1.AllSelection(state.doc))
.replaceSelectionWith(exports.createContentNode(content, state.schema, parseOptions))
.replaceSelectionWith(exports.parseContent(content, state.schema, parseOptions))
.setMeta('commandName', command));
};
};

@@ -10,5 +10,5 @@ "use strict";

var tableRows = [];
var cells = [];
var cells;
for (var r = 0; r < rows + 1; r++) {
cells.length = 0;
cells = [];
for (var c = 0; c < columns + 1; c++) {

@@ -15,0 +15,0 @@ cells.push(table_cell.createAndFill());

@@ -101,1 +101,5 @@ import { Command } from './types/command';

export declare const getNodeFromSelection: (state: any) => any;
/**
* @hidden
*/
export declare const indentHtml: (content: string) => string;

@@ -244,1 +244,10 @@ "use strict";

};
/**
* @hidden
*/
exports.indentHtml = function (content) {
return content.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/ig, '</$1>\n')
.replace(/<(ul|ol)([^>]*)><li/ig, '<$1$2>\n<li')
.replace(/<br \/>/ig, '<br />\n')
.replace(/\n$/, '');
};

@@ -1,1 +0,1 @@

System.register("@progress/kendo-editor-common",["prosemirror-history","prosemirror-tables","prosemirror-model","prosemirror-state","prosemirror-schema-list","tslib","prosemirror-transform","prosemirror-commands","prosemirror-inputrules"],function(S){var a,s,i,l,u,c,d,f,p;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){a=t(e)},function(e){s=t(e)},function(e){i=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)}],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=c},function(e,t){e.exports=l},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=t(3),r=t(1),v=t(4),n=t(15),y=t(6);o.changeStyles=function(e,t){var n=t.style,r=t.value,o=t.newValue,a=[];if(e){var s=e.split(/\s*;\s*/).filter(function(e){return e}),i=s.filter(function(e){if(!e.toLowerCase().trim().startsWith(n))return!0;var t=e.split(":")[1].trim();return!r.test(t)||(a.push(t),!1)});return o&&i.push(n+": "+o),{style:i.join("; ")+(i.length?";":""),changed:!!o||i.length!==s.length,styleMatches:a}}return{changed:!1,styleMatches:a,style:null}},o.changeStyle=function(m,g){return function(e,t,n){var r=e.selection,o=r.empty,a=r.$cursor,s=r.ranges;if(o&&!a||!v.markApplies(e.doc,s,m))return!1;var i=!1;if(t)if(n=n||e.tr,a){var l=e.storedMarks||a.marks();if(m.isInSet(l)){var u=y.changeStyleFromMark(l,g);t(n.removeStoredMark(m)),t(n.addStoredMark(m.create({style:u.style}))),i=!0}}else{for(var c=0;c<s.length;c++){var d=s[c],f=d.$from,p=d.$to;i=y.changeStyleMark(n,f.pos,p.pos,g,m)}i&&(n.scrollIntoView(),t(n))}return i}},o.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},o.getTypeName=function(e){return e instanceof a.Node?e.type.name:e.name},o.findParentNode=function(o){return function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(o(r))return{depth:n,node:r}}}},o.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-=1))return{depth:n,node:r}}}},o.findNthParentNodeOfType=function(t,n){return void 0===n&&(n=1),function(e){return o.findNthParentNode(function(e){return o.getTypeName(e)===o.getTypeName(t)},n)(e)}},o.insertNode=function(r,o){return function(e,t){var n=e.tr.replaceSelectionWith(r);o&&n.scrollIntoView(),t(n)}},o.isNullOrUndefined=function(e){return null==e},o.safeString=function(e){return o.isNullOrUndefined(e)?"":e.toString()},o.createContentNode=function(e){var t=document.createElement("div");return t.innerHTML=o.safeString(e).trim(),a.DOMParser.fromSchema(new a.Schema({nodes:n.nodes,marks:n.marks})).parse(t)},o.hasSameMarkup=function(e,t){var n=a.Fragment.from(o.createContentNode(e)),r=a.Fragment.from(o.createContentNode(t));return n.eq(r)},o.first=function(e){return e[0]},o.last=function(e){return e[e.length-1]},o.split=function(t){return function(e){return e.split(t)}},o.trim=function(e){return e.trim()},o.filter=function(t){return function(e){return e.filter(t)}},o.getUniqueStyleValues=function(e,t){if(e.hasNodesWithoutMarks)return"";var n=e.marks.filter(function(e){return"style"===e.type.name}).map(function(e){return e.attrs.style}).map(o.split(";")).map(o.filter(function(e){return e.includes(t)})).map(function(e){return 0!==e.length?e:[t+": INVALID"]}).map(o.first).map(o.split(":")).map(o.last).map(o.trim).reduce(function(e,t){return-1<e.indexOf(t)?e:e.concat([t])},[]);return-1<n.indexOf("INVALID")||1!==n.length?"":n[0]},o.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""},o.getNodeFromSelection=function(e){if(e.selection instanceof r.NodeSelection)return e.selection.node}},function(e,t){e.exports=i},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var n=t(5),v=t(3),s=t(1),m=t(6);g.markApplies=function(a,s,i){for(var e=function(e){var t=s[e],n=t.$from,r=t.$to,o=0===n.depth&&a.type.allowsMarkType(i);if(a.nodesBetween(n.pos,r.pos,function(e){if(o)return!1;o=e.inlineContent&&e.type.allowsMarkType(i)}),o)return{v:!0}},t=0;t<s.length;t++){var n=e(t);if(n)return n.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 s=!1,i=0;!s&&i<a.length;i++){var l=a[i],u=l.$from,c=l.$to;s=e.doc.rangeHasMark(u.pos,c.pos,f)}for(i=0;i<a.length;i++){var d=a[i];u=d.$from,c=d.$to,s?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=null;if(f instanceof v.MarkType){var r=f.isInSet(e.marks);r&&(n=[r])}else f?f.isInSet(e.marks)&&(n=[f]):n=e.marks;if(n&&n.length)for(var o=Math.min(t+e.nodeSize,d),a=0;a<n.length;a++){for(var s=n[a],i=void 0,l=0;l<p.length;l++){var u=p[l];u.step===m-1&&s.eq(u.style)&&(i=u)}i?(i.to=o,i.step=m):p.push({style:s,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,s=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 i=function(e){var t=s[e],n=t.$from,r=t.$to;o.forEach(function(e){g.removeMark(a,n.pos,r.pos,e)})},l=0;l<s.length;l++)i(l);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 n=e.schema,r=e.selection,o=r.$cursor,a=r.from,s=r.to,i=e.tr,l=(u instanceof Array?u:[u]).map(function(e){return e.name});o||(Object.keys(n.marks).map(function(e){return n.marks[e]}).filter(function(e){return-1===l.indexOf(e.name)}).forEach(function(e){return i.removeMark(a,s,e)}),t(i))}},g.getParentMark=function(e,t){var n=e.selection,r=n.from,o=n.$from,a=n.to,s=n.empty,i=e.doc;if(s)return t.isInSet(e.storedMarks||o.marks())||null;var l=[];return i.nodesBetween(r,a,function(e){e.isInline&&l.push(t.isInSet(e.marks))}),1===l.length&&l[0]?l[0]:null},g.hasMark=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter(function(e){return r[e]}),a=t.altStyle,s=e.selection,i=s.from,l=s.$from,u=s.to,c=s.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(i,u,d)||o.some(function(e){return f.rangeHasMark(i,u,r[e])}))&&a?m.hasStyle(e,a):!!p},g.getMark=function(e,t){var n,r=e.selection,o=r.from,a=r.$from,s=r.to,i=r.empty,l=e.doc;return i?n=t.isInSet(e.storedMarks||a.marks()):l.nodesBetween(o,s,function(e){e.isInline&&!n&&(n=t.isInSet(e.marks))}),n},g.getActiveMarks=function(e,r){var t=e.selection,o=!1;if(t instanceof s.TextSelection&&t.$cursor)return{hasNodesWithoutMarks:o,marks:t.$cursor.marks().filter(function(e){return!r||e.type.name===r.name})};var a=[];return t.content().content.descendants(function(e){if("text"===e.type.name){var t=r?(n=r,e.marks.filter(function(e){return e.type.name===n.name})):e.marks;0<e.marks.length&&0<t.length?a.push.apply(a,t):o=!0}var n}),{hasNodesWithoutMarks:o,marks:a}}},function(e,t){e.exports=d},function(e,I,t){"use strict";Object.defineProperty(I,"__esModule",{value:!0});var O=t(0),N=t(5),v=t(2),h=t(4);I.changeStyleFromMark=function(e,t){var n=e.find(function(e){return"style"===e.type.name}),r=n&&n.attrs.style;return v.changeStyles(r,t)},I.changeStyleMark=function(t,g,v,y,h){var k=h.create({style:y.style}),M=[],b=[],S=null,_=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),s=I.changeStyleFromMark(r,y);if(s.changed||y.newValue){for(var i=s.changed?{style:s.style||null}:{style:[y.style]+": "+y.newValue+";"},l=h.isInSet(r)?r.find(function(e){return"style"===e.type.name}):null,u=l?O.__assign({},l.attrs,i):i,c=h.create(u),d=c.addToSet(r),f=0;f<r.length;f++)r[f].isInSet(d)||(S&&S.to===o&&S.mark.eq(r[f])?S.to=a:(S=new N.RemoveMarkStep(o,a,r[f]),M.push(S)));var p=_&&_.to===o,m=p&&c.attrs.style===_.mark.attrs.style;p&&m?_.to=a:Object.keys(u).some(function(e){return null!==u[e]})&&(_=new N.AddMarkStep(o,a,c),b.push(_))}}}}),M.forEach(function(e){return t.step(e)}),b.forEach(function(e){return t.step(e)}),0<M.length+b.length},I.hasStyle=function(e,t){var n=e.selection,r=n.from,o=n.$from,a=n.to,s=n.empty,i=!1,l={style:t.name,value:t.value};return s?i=I.changeStyleFromMark(e.storedMarks||o.marks(),l).changed:e.doc.nodesBetween(r,a,function(e,t,n){!i&&e.isInline&&(i=I.changeStyleFromMark(e.marks,l).changed)}),i},I.getInlineStyles=function(e,t){var r,n=e.selection,o=n.from,a=n.$from,s=n.to,i=n.empty,l=[],u={style:t.name,value:t.value};return i?(r=I.changeStyleFromMark(e.storedMarks||a.marks(),u)).changed&&(l=r.styleMatches):e.doc.nodesBetween(o,s,function(e,t,n){e.isInline&&((r=I.changeStyleFromMark(e.marks,u)).changed?l.push.apply(l,r.styleMatches):l.push(null))}),l.filter(function(e){return null!==e})},I.changeStyle=function(v,y){return function(e,t,n){var r=e.selection,o=r.empty,a=r.$cursor,s=r.ranges;if(o&&!a||!h.markApplies(e.doc,s,v))return!1;var i=!1;if(t)if(n=n||e.tr,a){var l=e.storedMarks||a.marks();if(v.isInSet(l)){var u=I.changeStyleFromMark(l,y),c=l.find(function(e){return"style"===e.type.name}),d=O.__assign({},c?c.attrs:{},{style:u.style||null});t(n.removeStoredMark(v)),Object.keys(d).some(function(e){return null!==d[e]})&&t(n.addStoredMark(v.create(d))),i=!0}}else{for(var f=0;f<s.length;f++){var p=s[f],m=p.$from,g=p.$to;i=I.changeStyleMark(n,m.pos,g.pos,y,v)}i&&(n.scrollIntoView(),t(n))}return i}},I.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,s=f.mark;p=p||t.tr;function i(){return u=!0}var l=!1,u=!1;if(r&&n.style){var c=n.style;l=I.changeStyle(c,{style:r.name,value:r.value})(t,i,p)}var d=[s].concat(a).filter(function(e){return n[e]}).map(function(e){return h.hasMark(t,{mark:e})&&n[e]}).filter(function(e){return e});return d.length?h.removeMarks(d,t,i,p):l||h.toggleMark(n[s],m,p)(t,i),u&&e(p),u}},I.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,s=a.empty,i=a.$cursor,l=a.ranges;if(s&&!i||!h.markApplies(e.doc,l,n))return!1;if(i){var u=e.storedMarks||i.marks(),c=n.isInSet(u)?u.find(function(e){return"style"===e.type.name}):null,d={style:null};if(c&&c.attrs.style){var f=v.changeStyles(c.attrs.style,r);f.changed&&f.style&&(d.style=f.style)}else r.newValue&&(d.style=[r.style]+": "+r.newValue+";");var p=c?O.__assign({},c.attrs,d):d;return Object.keys(p).some(function(e){return null!==p[e]})?t(o.addStoredMark(n.create(p))):t(o.removeStoredMark(n)),!0}return I.changeStyle(n,r)(e,t,o)}}},function(e,t){e.exports=u},function(e,d,t){"use strict";Object.defineProperty(d,"__esModule",{value:!0});var f=t(0),a=t(2),v=t(5),y=t(3),s=t(1);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){if(a)return!1;if(e.isTextblock&&!e.hasMarkup(p,m))if(e.type===p)a=!0;else{var n=o.doc.resolve(t),r=n.index();a=n.parent.canReplaceWith(r,r+1,p)}}),!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)&&(s=d.doc,i=d.mapping.slice(g).map(t),l=p,u=s.resolve(i),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 y.Slice(y.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 s,i,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,s){var e=d.blockNodes(a),i=a.schema.nodes,l=!1,u=a.tr;return u.setMeta("commandName",t),u.setMeta("args",{value:c}),e.forEach(function(e){if(e.type.isTextblock)if("p"===c){var t=e.attrs,n=t.level,r=f.__rest(t,["level"]);l=d.changeBlockNode(a,s,u,e,i.paragraph,r)||l}else if(/^h[1-6]$/i.test(c))n=parseInt(c.substr(1),10),l=d.changeBlockNode(a,s,u,e,i.heading,f.__assign({},e.attrs,{level:n}))||l;else if("blockquote"===c){var o=e.attrs;n=o.level,r=f.__rest(o,["level"]),l=d.changeBlockNode(a,s,u,e,i.blockquote,r)||l}}),l&&s(u.scrollIntoView()),l}},d.getBlockFormats=function(e){var t=d.blockNodes(e),n=e.schema.nodes,r=[];return t.forEach(function(e){if(e.type===n.paragraph)r.push("p");else if(e.type===n.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){r.push("h"+t);break}}),r},d.addStyles=function(e,t){var n=e.attrs.style,r=null,o=null;return n&&t.forEach(function(e){o={style:e.name,value:/^.+$/,newValue:e.value},r=a.changeStyles(n,o),n=r.changed?r.style:n}),n=n||t.reduce(function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""},""),Object.assign({},e.attrs,{style:n||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};function i(t){return r=t,Object.keys(r).filter(function(e){return function(e){return null!==t[e]&&void 0!==t[e]&&""!==t[e]}(e)}).reduce(function(e,t){var n;return Object.assign(e,((n={})[t]=r[t],n))},{});var r}d.getNodeTagName=function(n,r){var e,t=n.type.spec.parseDOM||[],o=n.attrs;return(e=1===t.length?t[0]:t.find(function(e){var t=y.DOMSerializer.fromSchema(r).serializeNode(n);return JSON.stringify(e.getAttrs(t))===JSON.stringify(i(o))}))?e.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},d.activeNode=function(e){var t,n=e.schema.nodes.doc;if(e.selection instanceof s.AllSelection)t=e.doc;else if(e.selection instanceof s.TextSelection){var r=e.selection.$anchor,o=r.node(r.blockRange().depth);t=a.getTypeName(o)===a.getTypeName(n)?r.node():o}else e.selection instanceof s.NodeSelection&&(t=e.selection.node);return{name:a.getTypeName(t),tag:d.getNodeTagName(t,e.schema)}}},function(e,t){e.exports=a},function(e,t){e.exports=f},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var r=t(0),u=t(3),f=t(1),c=t(5),o=t(10),a=t(7),s=t(7),i=t(12);function p(e,t,n){var r=e.selection,o=r.from,a=r.to,s=e.schema.nodes,i=s.paragraph,l=s.heading,u=[];t.doc.nodesBetween(o,a,function(e,t){e.type!==i&&e.type!==l||u.push({node:e,pos:t})});for(var c=u.length-1;0<=c;c--){var d=u[c],f=t.doc.resolve(t.mapping.map(d.pos));if(0<f.depth){var p;p=d.node.textContent&&0<d.node.textContent.length?t.doc.resolve(t.mapping.map(d.pos+d.node.textContent.length)):t.doc.resolve(t.mapping.map(d.pos+1));var m=f.blockRange(p);m&&t.lift(m,g.getListLiftTarget(e.schema,f,n))}}return t}function m(c){return function(e,t,n){if(!n)return!1;var r=(e=n.state).schema.nodes[c.listType],o=e.selection,a=o.$from,s=o.$to,i=a.node(-2),l=a.node(-3),u=d(e.doc,a,s,r);return(i&&i.type===r||l&&l.type===r)&&u?k(c)(e,t):(u||(k(c)(e,t),e=n.state),M(r)(e,t))}}function v(e,t,n,r){r=r||e.schema.nodes.listItem;var o=t.$from,a=t.$to,s=o.blockRange(a,function(e){return e.childCount&&e.firstChild.type===r});if(!s||s.depth<2||o.node(s.depth-1).type!==r)return n;var i=s.end,l=a.end(s.depth);return i<l&&(n.step(new c.ReplaceAroundStep(i-1,l,i,l,new u.Slice(u.Fragment.from(r.create(void 0,s.parent.copy())),1,0),1,!0)),s=new u.NodeRange(n.doc.resolve(o.pos),n.doc.resolve(l),s.depth)),n.lift(s,c.liftTarget(s)).scrollIntoView()}function y(s,i,e,l,u,c){c=c||s.schema.nodes.listItem;var d=!1;return u.doc.nodesBetween(i,e,function(e,t){if(!d&&e.type===c&&i<t){d=!0;for(var n=l+3;l+2<n;){var r=u.doc.resolve(u.mapping.map(t));n=r.depth;var o=u.doc.resolve(u.mapping.map(t+e.textContent.length)),a=new f.TextSelection(r,o);u=v(s,a,u,c)}}}),u}function d(e,t,n,r){return 0===l(e,t,n).filter(function(e){return e.type!==r}).length}function l(e,t,n){for(var r=Array(),o=h(e,t).depth,a=e.resolve(t.start(o));a.pos<=n.start(n.depth);){var s=Math.min(a.depth,o),i=a.node(s);if(i&&r.push(i),0===s)break;var l=e.resolve(a.after(s));if(l.start(s)>=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}function h(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}function k(i){return function(a,e){var s=a.tr,t=a.selection,n=t.$from,r=t.$to;return s.doc.nodesBetween(n.pos,r.pos,function(e,t){if(e.isTextblock||"blockquote"===e.type.name||"div"===e.type.name){var n=new f.NodeSelection(s.doc.resolve(s.mapping.map(t))),r=n.$from.blockRange(n.$to);if(!r||n.$from.parent.type!==a.schema.nodes[i.listItem])return!1;var o=r&&c.liftTarget(r);if(null==o)return!1;s.lift(r,o)}}),e&&e(s),!0}}function M(n){return o.autoJoin(a.wrapInList(n),function(e,t){return e.type===t.type&&e.type===n})}g.rootListDepth=function(e,t){for(var n,r=t.bulletList,o=t.orderedList,a=t.listItem,s=e.depth-1;0<s;s--){var i=e.node(s);if(i.type!==r&&i.type!==o||(n=s),i.type!==r&&i.type!==o&&i.type!==a)break}return n},g.getListLiftTarget=function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],a=e.nodes[n.orderedList],s=e.nodes[n.listItem],i=t.depth;0<i;i--){var l=t.node(i);if(l.type!==o&&l.type!==a||(r=i),l.type!==o&&l.type!==a&&l.type!==s)break}return r-1},g.liftSelectionList=p,g.toggleList=function(e,t,n,r,o){var a=r.listType,s=e.selection,i=s.$from.node(s.$from.depth-2),l=s.$to.node(s.$to.depth-2);if(i&&i.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=g.rootListDepth(s.$to,c),f=y(e,s.$to.pos,s.$to.end(d),d,n.state.tr,c.listItem);return(f=p(e,f,r)).setMeta("commandName",o),t(f),!0}return m(r)(e,t,n)},g.toggleListCommand=m,g.liftFollowingList=y,g.isRangeOfType=d,g.getAncestorNodesBetween=l,g.findAncestorPosition=h,g.liftListItems=k,g.wrapInList=M,g.toggleUnorderedList=function(e,t,n){return g.toggleList(e,t,n,r.__assign({listType:i.bulletList.listType},i.bulletList.types))},g.toggleOrderedList=function(e,t,n){return g.toggleList(e,t,n,r.__assign({listType:i.orderedList.listType},i.orderedList.types))},g.splitListItemKeepMarks=function(e){return function(n,r){return s.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(0);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(0),o=n(12);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,t){e.exports=s},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!0;return!1}function a(e,t){var n={};for(var r in e)r&&null!==e[r]&&r!==t&&(n[r]=e[r]);return n}function s(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t}var i=n(0),l=n(14),u=["blockquote",0],c=["hr"],d=["pre",["code",0]],f=["ol",0],p=["ul",0],m=["li",0],g=i.__assign({link:{attrs:i.__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]}}},s("strong"),s("b"),s("em"),s("i"),s("u"),s("del"),s("sub"),s("sup"),s("code"),{style:{attrs:i.__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=i.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:i.__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:i.__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:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return u}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return c}},heading:{attrs:i.__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 i.__assign({},r(e),{level:1})}},{tag:"h2",getAttrs:function(e){return i.__assign({},r(e),{level:2})}},{tag:"h3",getAttrs:function(e){return i.__assign({},r(e),{level:3})}},{tag:"h4",getAttrs:function(e){return i.__assign({},r(e),{level:4})}},{tag:"h5",getAttrs:function(e){return i.__assign({},r(e),{level:5})}},{tag:"h6",getAttrs:function(e){return i.__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:i.__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:i.__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:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return i.__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",i.__assign({},a(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:i.__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:i.__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}),t.createTable=function(e,t,n){for(var r=e.table,o=e.table_row,a=e.table_cell,s=[],i=[],l=0;l<t+1;l++){for(var u=i.length=0;u<n+1;u++)i.push(a.createAndFill());s.push(o.createAndFill(void 0,i))}return r.createAndFill(void 0,s)}},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=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),a=n(9),s=n(18),r=n(11),i="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=a.undo,t["Shift-Mod-z"]=a.redo,t.Backspace=o.chainCommands(s.undoInputRule,o.deleteSelection,o.joinBackward,o.selectNodeBackward),t.Enter=o.chainCommands(o.newlineInCode,o.createParagraphNear,o.liftEmptyBlock,o.splitBlockKeepMarks),i||(t["Mod-y"]=a.redo),e.marks.strong&&(t["Mod-b"]=o.toggleMark(e.marks.strong)),e.marks.em&&(t["Mod-i"]=o.toggleMark(e.marks.em)),e.marks.underline&&(t["Mod-u"]=o.toggleMark(e.marks.underline)),e.nodes.hardBreak){var n=e.nodes.hardBreak,r=o.chainCommands(o.exitCode,function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0});t["Mod-Enter"]=r,t["Shift-Enter"]=r,i&&(t["Ctrl-Enter"]=r)}return t},t.buildListKeymap=function(e){var t={};return e.nodes.listItem&&(t.Enter=r.splitListItemKeepMarks(e.nodes.listItem)),t}},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")]},{node:"listItem",style:[r("text-align","left"),r("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]},{node:"listItem",style:[r("text-align","right"),r("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]},{node:"listItem",style:[r("text-align","center"),r("list-style-position","inside")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]},{node:"listItem",style:[r("text-align",""),r("list-style-position","")]}]},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var i=t(7),a=t(13),m=t(8),l=t(2);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){if(t.type.isTextblock){var e=void 0,n=f.find(function(e){return e.node===t.type.name});if(n){var r="rtl"===p?n.rtlStyle:n.style,o={name:r,value:0<n.step?""+n.step+n.unit:""};if(t.attrs.style){var a=new RegExp(r+":\\s?(\\d+)"+n.unit,"i"),s=t.attrs.style.match(a);if(s){var i=parseFloat(s[1])+n.step;i=i<=0?"":i,o.value=""+i+(i?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 s=!1;return m.blockNodes(e).forEach(function(t){if(!s&&t.type.isTextblock&&t.attrs.style){var e=o.find(function(e){return e.node===t.type.name});if(e){var n="rtl"===a?e.rtlStyle:e.style,r=new RegExp(n+":\\s?\\d+"+e.unit,"i");s=r.test(t.attrs.style)}}}),s},o.canIndentAsListItem=function(e,t){return i.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),s=!!l.findNthParentNodeOfType(o,2)(e.selection);return(a||s)&&i.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)?i.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)?i.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(8);t.alignBlocks=function(i){return function(r,o){var e=l.blockNodes(r),a=r.tr,s=!1;return e.forEach(function(t){if(t.type.isTextblock){var e={},n=i.find(function(e){return e.node===t.type.name});n&&(e=l.addStyles(t,n.style)),s=l.changeBlockNode(r,o,a,t,t.type,e)||s}}),s&&o(a.scrollIntoView()),s}},t.isAligned=function(e,n){var r=!1;return l.blockNodes(e).forEach(function(t){if(!r&&t.type.isTextblock&&t.attrs.style){var e=n.find(function(e){return e.node===t.type.name});e&&(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(2);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,c,t){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var m=t(6),y=t(4),d=t(1);c.removeLink=function(f,p){return function(e,t){var n=e.selection.$cursor;if(n){var r=n.parent,o=n.index(),a=e.schema.marks[f.mark],s=r.child(o).marks.find(function(e){return e.type===a}),i=r.childCount,l=n.pos-n.textOffset,u=r.child(o).nodeSize,c=void 0,d=void 0;for(c=o-1;0<=c&&s.isInSet(r.child(c).marks);)u+=d=r.child(c).nodeSize,l-=d,c-=1;for(c=o+1;c<i&&s.isInSet(r.child(c).marks);)u+=r.child(c).nodeSize,c+=1;t(y.removeMark(p||e.tr,l,l+u,s))}else m.toggleInlineFormat(f,p)(e,t)}},c.applyLink=function(e,i){var l=e.mark,u=e.attrs;return function(e,t){var n=e.schema.marks,r=e.tr;i&&(r.setMeta("commandName",i),r.setMeta("args",u));function o(){return a=!0}var g,v,a=!1;if(y.getParentMark(e,n[l]))g={mark:l,attrs:u},v=r,function(e,n){var t=e.selection,r=t.$cursor,o=t.from,a=t.to,s=e.schema.marks[g.mark];if(r){var i=r.parent,l=r.index(),u=i.child(l).marks.find(function(e){return e.type===s}),c=i.childCount,d=r.pos-r.textOffset,f=i.child(l).nodeSize,p=void 0,m=void 0;for(p=l-1;0<=p&&u.isInSet(i.child(p).marks);)f+=m=i.child(p).nodeSize,d-=m,p-=1;for(p=l+1;p<c&&u.isInSet(i.child(p).marks);)f+=i.child(p).nodeSize,p+=1;v.removeMark(d,d+f,s),v.addMark(d,d+f,s.create(g.attrs)),n(v)}else v.doc.nodesBetween(o,a,function(e,t){e.isInline&&s.isInSet(e.marks)&&(v.removeMark(t,t+e.nodeSize,s),v.addMark(t,t+e.nodeSize,s.create(g.attrs)),n(v))})}(e,o);else{var s=e;y.hasMark(e,{mark:l})&&(c.removeLink({mark:l,attrs:u},r)(e,o),s=d.EditorState.create({doc:r.doc,selection:r.selection})),a?y.toggleMark(n[l],u,r)(s,o):m.toggleInlineFormat({mark:l},r,u)(s,o)}return a&&t(r),a}}},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var o=t(3),s=t(1);a.createContentNode=function(e,t,n){var r=document.createElement("div");return r.innerHTML=e,o.DOMParser.fromSchema(t).parse(r,n)},a.getHtml=function(e){var t=o.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.createContentNode(n,e.schema,o)).setMeta("commandName",r))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26);t.getHtml=r.getHtml,t.setHtml=r.setHtml;var o=n(6);t.applyInlineStyle=o.applyInlineStyle,t.toggleInlineFormat=o.toggleInlineFormat;var a=n(25);t.applyLink=a.applyLink,t.removeLink=a.removeLink;var s=n(24);t.insertText=s.insertText;var i=n(23);t.insertImage=i.insertImage;var l=n(22);t.alignBlocks=l.alignBlocks,t.isAligned=l.isAligned;var u=n(8);t.hasNode=u.hasNode,t.activeNode=u.activeNode,t.formatBlockElements=u.formatBlockElements;var c=n(4);t.hasMark=c.hasMark,t.getMark=c.getMark,t.getActiveMarks=c.getActiveMarks,t.removeAllMarks=c.removeAllMarks;var d=n(21);t.indent=d.indent,t.canIndentAsListItem=d.canIndentAsListItem,t.outdent=d.outdent,t.canOutdentAsListItem=d.canOutdentAsListItem,t.isIndented=d.isIndented,t.canBeIndented=d.canBeIndented;var f=n(11);t.toggleOrderedList=f.toggleOrderedList,t.toggleUnorderedList=f.toggleUnorderedList;var p=n(2);t.createContentNode=p.createContentNode,t.hasSameMarkup=p.hasSameMarkup,t.getUniqueStyleValues=p.getUniqueStyleValues,t.getSelectionText=p.getSelectionText,t.getNodeFromSelection=p.getNodeFromSelection,t.canInsert=p.canInsert,t.insertNode=p.insertNode;var m=n(9);t.redo=m.redo,t.undo=m.undo;var g=n(20);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignRemoveRules=g.alignRemoveRules;var v=n(13);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var y=n(15);t.nodes=y.nodes,t.marks=y.marks;var h=n(19);t.buildKeymap=h.buildKeymap,t.buildListKeymap=h.buildListKeymap;var k=n(17);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(16);t.createTable=M.createTable;var b=n(14);t.addRowBefore=b.addRowBefore,t.addRowAfter=b.addRowAfter,t.addColumnBefore=b.addColumnBefore,t.addColumnAfter=b.addColumnAfter,t.deleteRow=b.deleteRow,t.deleteColumn=b.deleteColumn,t.deleteTable=b.deleteTable,t.mergeCells=b.mergeCells,t.splitCell=b.splitCell,t.selectionCell=b.selectionCell,function(e){for(var t in e)S(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=27)}}});
System.register("@progress/kendo-editor-common",["prosemirror-history","prosemirror-tables","prosemirror-model","prosemirror-state","prosemirror-schema-list","tslib","prosemirror-transform","prosemirror-commands","prosemirror-inputrules"],function(I){var o,s,i,l,u,c,d,f,p;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){o=t(e)},function(e){s=t(e)},function(e){i=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)}],execute:function(){function r(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,a;a={},r.m=n=[function(e,t){e.exports=c},function(e,t){e.exports=l},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var o=t(3),r=t(1),v=t(4),n=t(15),h=t(6);a.changeStyles=function(e,t){var n=t.style,r=t.value,a=t.newValue,o=[];if(e){var s=e.split(/\s*;\s*/).filter(function(e){return e}),i=s.filter(function(e){if(!e.toLowerCase().trim().startsWith(n))return!0;var t=e.split(":")[1].trim();return!r.test(t)||(o.push(t),!1)});return a&&i.push(n+": "+a),{style:i.join("; ")+(i.length?";":""),changed:!!a||i.length!==s.length,styleMatches:o}}return{changed:!1,styleMatches:o,style:null}},a.changeStyle=function(m,g){return function(e,t,n){var r=e.selection,a=r.empty,o=r.$cursor,s=r.ranges;if(a&&!o||!v.markApplies(e.doc,s,m))return!1;var i=!1;if(t)if(n=n||e.tr,o){var l=e.storedMarks||o.marks();if(m.isInSet(l)){var u=h.changeStyleFromMark(l,g);t(n.removeStoredMark(m)),t(n.addStoredMark(m.create({style:u.style}))),i=!0}}else{for(var c=0;c<s.length;c++){var d=s[c],f=d.$from,p=d.$to;i=h.changeStyleMark(n,f.pos,p.pos,g,m)}i&&(n.scrollIntoView(),t(n))}return i}},a.canInsert=function(e,t){for(var n=e.selection.$from,r=n.depth;0<=r;r--){var a=n.index(r);if(n.node(r).canReplaceWith(a,a,t))return!0}return!1},a.getTypeName=function(e){return e instanceof o.Node?e.type.name:e.name},a.findParentNode=function(a){return function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(a(r))return{depth:n,node:r}}}},a.findNthParentNode=function(a,o){return void 0===o&&(o=1),function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(a(r)&&0==(o-=1))return{depth:n,node:r}}}},a.findNthParentNodeOfType=function(t,n){return void 0===n&&(n=1),function(e){return a.findNthParentNode(function(e){return a.getTypeName(e)===a.getTypeName(t)},n)(e)}},a.insertNode=function(r,a){return function(e,t){var n=e.tr.replaceSelectionWith(r);a&&n.scrollIntoView(),t(n)}},a.isNullOrUndefined=function(e){return null==e},a.safeString=function(e){return a.isNullOrUndefined(e)?"":e.toString()},a.createContentNode=function(e){var t=document.createElement("div");return t.innerHTML=a.safeString(e).trim(),o.DOMParser.fromSchema(new o.Schema({nodes:n.nodes,marks:n.marks})).parse(t)},a.hasSameMarkup=function(e,t){var n=o.Fragment.from(a.createContentNode(e)),r=o.Fragment.from(a.createContentNode(t));return n.eq(r)},a.first=function(e){return e[0]},a.last=function(e){return e[e.length-1]},a.split=function(t){return function(e){return e.split(t)}},a.trim=function(e){return e.trim()},a.filter=function(t){return function(e){return e.filter(t)}},a.getUniqueStyleValues=function(e,t){if(e.hasNodesWithoutMarks)return"";var n=e.marks.filter(function(e){return"style"===e.type.name}).map(function(e){return e.attrs.style}).map(a.split(";")).map(a.filter(function(e){return e.includes(t)})).map(function(e){return 0!==e.length?e:[t+": INVALID"]}).map(a.first).map(a.split(":")).map(a.last).map(a.trim).reduce(function(e,t){return-1<e.indexOf(t)?e:e.concat([t])},[]);return-1<n.indexOf("INVALID")||1!==n.length?"":n[0]},a.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""},a.getNodeFromSelection=function(e){if(e.selection instanceof r.NodeSelection)return e.selection.node},a.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=i},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var n=t(5),v=t(3),s=t(1),m=t(6);g.markApplies=function(o,s,i){for(var e=function(e){var t=s[e],n=t.$from,r=t.$to,a=0===n.depth&&o.type.allowsMarkType(i);if(o.nodesBetween(n.pos,r.pos,function(e){if(a)return!1;a=e.inlineContent&&e.type.allowsMarkType(i)}),a)return{v:!0}},t=0;t<s.length;t++){var n=e(t);if(n)return n.v}return!1},g.toggleMark=function(f,p,m){return function(e,t){var n=e.selection,r=n.empty,a=n.$cursor,o=n.ranges;if(r&&!a||!g.markApplies(e.doc,o,f))return!1;if(t)if(a)f.isInSet(e.storedMarks||a.marks())?t(m.removeStoredMark(f)):t(m.addStoredMark(f.create(p)));else{for(var s=!1,i=0;!s&&i<o.length;i++){var l=o[i],u=l.$from,c=l.$to;s=e.doc.rangeHasMark(u.pos,c.pos,f)}for(i=0;i<o.length;i++){var d=o[i];u=d.$from,c=d.$to,s?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=null;if(f instanceof v.MarkType){var r=f.isInSet(e.marks);r&&(n=[r])}else f?f.isInSet(e.marks)&&(n=[f]):n=e.marks;if(n&&n.length)for(var a=Math.min(t+e.nodeSize,d),o=0;o<n.length;o++){for(var s=n[o],i=void 0,l=0;l<p.length;l++){var u=p[l];u.step===m-1&&s.eq(u.style)&&(i=u)}i?(i.to=a,i.step=m):p.push({style:s,from:Math.max(t,c),to:a,step:m})}}}),p.forEach(function(e){return t.step(new n.RemoveMarkStep(e.from,e.to,e.style))}),t},g.removeMarks=function(a,t,n,o){var e=t.selection,r=e.$cursor,s=e.ranges;if(o=o||t.tr,r)a.forEach(function(e){e.isInSet(t.storedMarks||r.marks())&&n(o.removeStoredMark(e))});else{for(var i=function(e){var t=s[e],n=t.$from,r=t.$to;a.forEach(function(e){g.removeMark(o,n.pos,r.pos,e)})},l=0;l<s.length;l++)i(l);n(o.scrollIntoView())}return!0},g.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,u=void 0===t?[]:t;return function(e,t){var n=e.schema,r=e.selection,a=r.$cursor,o=r.from,s=r.to,i=e.tr,l=(u instanceof Array?u:[u]).map(function(e){return e.name});a||(Object.keys(n.marks).map(function(e){return n.marks[e]}).filter(function(e){return-1===l.indexOf(e.name)}).forEach(function(e){return i.removeMark(o,s,e)}),t(i))}},g.getParentMark=function(e,t){var n=e.selection,r=n.from,a=n.$from,o=n.to,s=n.empty,i=e.doc;if(s)return t.isInSet(e.storedMarks||a.marks())||null;var l=[];return i.nodesBetween(r,o,function(e){e.isInline&&l.push(t.isInSet(e.marks))}),1===l.length&&l[0]?l[0]:null},g.hasMark=function(e,t){var n,r=e.schema.marks,a=(t.altMarks||[]).filter(function(e){return r[e]}),o=t.altStyle,s=e.selection,i=s.from,l=s.$from,u=s.to,c=s.empty,d=r[t.mark],f=e.doc,p=!1;return!(p=c?(n=e.storedMarks||l.marks(),d&&d.isInSet(n)||a.some(function(e){return r[e].isInSet(n)})):d&&f.rangeHasMark(i,u,d)||a.some(function(e){return f.rangeHasMark(i,u,r[e])}))&&o?m.hasStyle(e,o):Boolean(p)},g.getMark=function(e,t){var n,r=e.selection,a=r.from,o=r.$from,s=r.to,i=r.empty,l=e.doc;if(i)n=t.isInSet(e.storedMarks||o.marks());else{var u=[];l.nodesBetween(a,s,function(e){e.isInline&&u.push(t.isInSet(e.marks))}),u.some(function(e){return!e})||(n=u[u.length-1])}return n},g.getActiveMarks=function(e,r){var t=e.selection,a=!1;if(t instanceof s.TextSelection&&t.$cursor)return{hasNodesWithoutMarks:a,marks:t.$cursor.marks().filter(function(e){return!r||e.type.name===r.name})};var o=[];return t.content().content.descendants(function(e){if("text"===e.type.name){var t=r?(n=r,e.marks.filter(function(e){return e.type.name===n.name})):e.marks;0<e.marks.length&&0<t.length?o.push.apply(o,t):a=!0}var n}),{hasNodesWithoutMarks:a,marks:o}}},function(e,t){e.exports=d},function(e,I,t){"use strict";Object.defineProperty(I,"__esModule",{value:!0});var L=t(0),T=t(5),v=t(2),y=t(4);I.changeStyleFromMark=function(e,t){var n=e.find(function(e){return"style"===e.type.name}),r=n&&n.attrs.style;return v.changeStyles(r,t)},I.changeStyleMark=function(t,g,v,h,y){var k=y.create({style:h.style}),M=[],b=[],S=null,_=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 a=Math.max(t,g),o=Math.min(t+e.nodeSize,v),s=I.changeStyleFromMark(r,h);if(s.changed||h.newValue){for(var i=s.changed?{style:s.style||null}:{style:[h.style]+": "+h.newValue+";"},l=y.isInSet(r)?r.find(function(e){return"style"===e.type.name}):null,u=l?L.__assign({},l.attrs,i):i,c=y.create(u),d=c.addToSet(r),f=0;f<r.length;f++)r[f].isInSet(d)||(S&&S.to===a&&S.mark.eq(r[f])?S.to=o:(S=new T.RemoveMarkStep(a,o,r[f]),M.push(S)));var p=_&&_.to===a,m=p&&c.attrs.style===_.mark.attrs.style;p&&m?_.to=o:Object.keys(u).some(function(e){return null!==u[e]})&&(_=new T.AddMarkStep(a,o,c),b.push(_))}}}}),M.forEach(function(e){return t.step(e)}),b.forEach(function(e){return t.step(e)}),0<M.length+b.length},I.hasStyle=function(e,t){var n=e.selection,r=n.from,a=n.$from,o=n.to,s=n.empty,i=!1,l={style:t.name,value:t.value};return s?i=I.changeStyleFromMark(e.storedMarks||a.marks(),l).changed:e.doc.nodesBetween(r,o,function(e,t,n){!i&&e.isInline&&(i=I.changeStyleFromMark(e.marks,l).changed)}),i},I.getInlineStyles=function(e,t){var r,n=e.selection,a=n.from,o=n.$from,s=n.to,i=n.empty,l=[],u={style:t.name,value:t.value};return i?(r=I.changeStyleFromMark(e.storedMarks||o.marks(),u)).changed&&(l=r.styleMatches):e.doc.nodesBetween(a,s,function(e,t,n){e.isInline&&((r=I.changeStyleFromMark(e.marks,u)).changed?l.push.apply(l,r.styleMatches):l.push(null))}),l.filter(function(e){return null!==e})},I.changeStyle=function(v,h){return function(e,t,n){var r=e.selection,a=r.empty,o=r.$cursor,s=r.ranges;if(a&&!o||!y.markApplies(e.doc,s,v))return!1;var i=!1;if(t)if(n=n||e.tr,o){var l=e.storedMarks||o.marks();if(v.isInSet(l)){var u=I.changeStyleFromMark(l,h),c=l.find(function(e){return"style"===e.type.name}),d=L.__assign({},c?c.attrs:{},{style:u.style||null});t(n.removeStoredMark(v)),Object.keys(d).some(function(e){return null!==d[e]})&&t(n.addStoredMark(v.create(d))),i=!0}}else{for(var f=0;f<s.length;f++){var p=s[f],m=p.$from,g=p.$to;i=I.changeStyleMark(n,m.pos,g.pos,h,v)}i&&(n.scrollIntoView(),t(n))}return i}},I.toggleInlineFormat=function(f,p,m){return function(t,e){var n=t.schema.marks,r=f.altStyle,a=f.altMarks,o=void 0===a?[]:a,s=f.mark;p=p||t.tr;function i(){return u=!0}var l=!1,u=!1;if(r&&n.style){var c=n.style;l=I.changeStyle(c,{style:r.name,value:r.value})(t,i,p)}var d=[s].concat(o).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,i,p):l||y.toggleMark(n[s],m,p)(t,i),u&&e(p),u}},I.applyInlineStyle=function(m,g){return function(e,t){var n=e.schema.marks.style,r={style:m.style,value:/^.+$/,newValue:m.value},a=e.tr;g&&a.setMeta("commandName",g),a.setMeta("args",m);var o=e.selection,s=o.empty,i=o.$cursor,l=o.ranges;if(s&&!i||!y.markApplies(e.doc,l,n))return!1;if(i){var u=e.storedMarks||i.marks(),c=n.isInSet(u)?u.find(function(e){return"style"===e.type.name}):null,d={style:null};if(c&&c.attrs.style){var f=v.changeStyles(c.attrs.style,r);f.changed&&f.style&&(d.style=f.style)}else r.newValue&&(d.style=[r.style]+": "+r.newValue+";");var p=c?L.__assign({},c.attrs,d):d;return Object.keys(p).some(function(e){return null!==p[e]})?t(a.addStoredMark(n.create(p))):t(a.removeStoredMark(n)),!0}return I.changeStyle(n,r)(e,t,a)}}},function(e,d,t){"use strict";Object.defineProperty(d,"__esModule",{value:!0});var f=t(0),o=t(2),v=t(5),h=t(3),s=t(1);d.changeBlockNode=function(a,e,d,f,p,m){var t=a.selection,n=t.from,r=t.to,o=!1;if(a.doc.nodesBetween(n,r,function(e,t){if(o)return!1;if(e.isTextblock&&!e.hasMarkup(p,m))if(e.type===p)o=!0;else{var n=a.doc.resolve(t),r=n.index();o=n.parent.canReplaceWith(r,r+1,p)}}),!o)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)&&(s=d.doc,i=d.mapping.slice(g).map(t),l=p,u=s.resolve(i),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),a=n.map(t+e.nodeSize,1),o=new h.Slice(h.Fragment.from(p.create(m,null,e.marks)),0,0);return d.step(new v.ReplaceAroundStep(r,a,r+1,a-1,o,1,!0)),!1}var s,i,l,u,c})}return!0},d.blockNodes=function(e){var t=e.selection,n=t.from,r=t.to,a=t.$from,o=[];return t.node?t.node.isBlock?o.push(t.node):a.parent&&a.parent.isBlock&&o.push(a.parent):e.doc.nodesBetween(n,r,function(e){e.isBlock&&o.push(e)}),o},d.formatBlockElements=function(c,t){return function(o,s){var e=d.blockNodes(o),i=o.schema.nodes,l=!1,u=o.tr;return u.setMeta("commandName",t),u.setMeta("args",{value:c}),e.forEach(function(e){if(e.type.isTextblock)if("p"===c){var t=e.attrs,n=t.level,r=f.__rest(t,["level"]);l=d.changeBlockNode(o,s,u,e,i.paragraph,r)||l}else if(/^h[1-6]$/i.test(c))n=parseInt(c.substr(1),10),l=d.changeBlockNode(o,s,u,e,i.heading,f.__assign({},e.attrs,{level:n}))||l;else if("blockquote"===c){var a=e.attrs;n=a.level,r=f.__rest(a,["level"]),l=d.changeBlockNode(o,s,u,e,i.blockquote,r)||l}}),l&&s(u.scrollIntoView()),l}},d.getBlockFormats=function(e){var t=d.blockNodes(e),n=e.schema.nodes,r=[];return t.forEach(function(e){if(e.type===n.paragraph)r.push("p");else if(e.type===n.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){r.push("h"+t);break}}),r},d.addStyles=function(e,t){var n=e.attrs.style,r=null,a=null;return n&&t.forEach(function(e){a={style:e.name,value:/^.+$/,newValue:e.value},r=o.changeStyles(n,a),n=r.changed?r.style:n}),n=n||t.reduce(function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""},""),Object.assign({},e.attrs,{style:n||null})},d.hasNode=function(e,t){var n=e.selection,r=n.from,a=n.to,o=!1;return e.doc.nodesBetween(r,a,function(e){return!(o=o||e.type===t)}),o};function i(t){return r=t,Object.keys(r).filter(function(e){return function(e){return null!==t[e]&&void 0!==t[e]&&""!==t[e]}(e)}).reduce(function(e,t){var n;return Object.assign(e,((n={})[t]=r[t],n))},{});var r}d.getNodeTagName=function(n,r){var e,t=n.type.spec.parseDOM||[],a=n.attrs;return(e=1===t.length?t[0]:t.find(function(e){var t=h.DOMSerializer.fromSchema(r).serializeNode(n);return JSON.stringify(e.getAttrs(t))===JSON.stringify(i(a))}))?e.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},d.activeNode=function(e){var t,n=e.schema.nodes.doc;if(e.selection instanceof s.AllSelection)t=e.doc;else if(e.selection instanceof s.TextSelection){var r=e.selection.$anchor,a=r.node(r.blockRange().depth);t=o.getTypeName(a)===o.getTypeName(n)?r.node():a}else e.selection instanceof s.NodeSelection&&(t=e.selection.node);return{name:o.getTypeName(t),tag:d.getNodeTagName(t,e.schema)}}},function(e,t){e.exports=o},function(e,t){e.exports=f},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var r=t(0),u=t(3),f=t(1),c=t(5),a=t(9),o=t(13),s=t(11);function p(e,t,n){var r=e.selection,a=r.from,o=r.to,s=e.schema.nodes,i=s.paragraph,l=s.heading,u=[];t.doc.nodesBetween(a,o,function(e,t){e.type!==i&&e.type!==l||u.push({node:e,pos:t})});for(var c=u.length-1;0<=c;c--){var d=u[c],f=t.doc.resolve(t.mapping.map(d.pos));if(0<f.depth){var p;p=d.node.textContent&&0<d.node.textContent.length?t.doc.resolve(t.mapping.map(d.pos+d.node.textContent.length)):t.doc.resolve(t.mapping.map(d.pos+1));var m=f.blockRange(p);m&&t.lift(m,g.getListLiftTarget(e.schema,f,n))}}return t}function m(c){return function(e,t,n){if(!n)return!1;var r=(e=n.state).schema.nodes[c.listType],a=e.selection,o=a.$from,s=a.$to,i=o.node(-2),l=o.node(-3),u=d(e.doc,o,s,r);return(i&&i.type===r||l&&l.type===r)&&u?k(c)(e,t):(u||(k(c)(e,t),e=n.state),M(r)(e,t))}}function v(e,t,n,r){r=r||e.schema.nodes.listItem;var a=t.$from,o=t.$to,s=a.blockRange(o,function(e){return e.childCount&&e.firstChild.type===r});if(!s||s.depth<2||a.node(s.depth-1).type!==r)return n;var i=s.end,l=o.end(s.depth);return i<l&&(n.step(new c.ReplaceAroundStep(i-1,l,i,l,new u.Slice(u.Fragment.from(r.create(void 0,s.parent.copy())),1,0),1,!0)),s=new u.NodeRange(n.doc.resolve(a.pos),n.doc.resolve(l),s.depth)),n.lift(s,c.liftTarget(s)).scrollIntoView()}function h(s,i,e,l,u,c){c=c||s.schema.nodes.listItem;var d=!1;return u.doc.nodesBetween(i,e,function(e,t){if(!d&&e.type===c&&i<t){d=!0;for(var n=l+3;l+2<n;){var r=u.doc.resolve(u.mapping.map(t));n=r.depth;var a=u.doc.resolve(u.mapping.map(t+e.textContent.length)),o=new f.TextSelection(r,a);u=v(s,o,u,c)}}}),u}function d(e,t,n,r){return 0===i(e,t,n).filter(function(e){return e.type!==r}).length}function i(e,t,n){for(var r=Array(),a=y(e,t).depth,o=e.resolve(t.start(a));o.pos<=n.start(n.depth);){var s=Math.min(o.depth,a),i=o.node(s);if(i&&r.push(i),0===s)break;var l=e.resolve(o.after(s));if(l.start(s)>=e.nodeSize-2)break;l.depth!==o.depth&&(l=e.resolve(l.pos+2)),o=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return r}function y(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var r=t.node(t.depth),a=t;1<=t.depth;)(r=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==n.indexOf(r.type.name)&&(a=t);return a}function k(i){return function(o,e){var s=o.tr,t=o.selection,n=t.$from,r=t.$to;return s.doc.nodesBetween(n.pos,r.pos,function(e,t){if(e.isTextblock||"blockquote"===e.type.name||"div"===e.type.name){var n=new f.NodeSelection(s.doc.resolve(s.mapping.map(t))),r=n.$from.blockRange(n.$to);if(!r||n.$from.parent.type!==o.schema.nodes[i.listItem])return!1;var a=r&&c.liftTarget(r);if(null==a)return!1;s.lift(r,a)}}),e&&e(s),!0}}function M(n){return a.autoJoin(o.wrapInList(n),function(e,t){return e.type===t.type&&e.type===n})}g.rootListDepth=function(e,t){for(var n,r=t.bulletList,a=t.orderedList,o=t.listItem,s=e.depth-1;0<s;s--){var i=e.node(s);if(i.type!==r&&i.type!==a||(n=s),i.type!==r&&i.type!==a&&i.type!==o)break}return n},g.getListLiftTarget=function(e,t,n){for(var r=t.depth,a=e.nodes[n.bulletList],o=e.nodes[n.orderedList],s=e.nodes[n.listItem],i=t.depth;0<i;i--){var l=t.node(i);if(l.type!==a&&l.type!==o||(r=i),l.type!==a&&l.type!==o&&l.type!==s)break}return r-1},g.liftSelectionList=p,g.toggleList=function(e,t,n,r,a){var o=r.listType,s=e.selection,i=s.$from.node(s.$from.depth-2),l=s.$to.node(s.$to.depth-2);if(i&&i.type.name===o&&l&&l.type.name===o){var u=n.state.schema.nodes,c={bulletList:u[r.bulletList],orderedList:u[r.orderedList],listItem:u[r.listItem]},d=g.rootListDepth(s.$to,c),f=h(e,s.$to.pos,s.$to.end(d),d,n.state.tr,c.listItem);return(f=p(e,f,r)).setMeta("commandName",a),t(f),!0}return m(r)(e,t,n)},g.toggleListCommand=m,g.liftFollowingList=h,g.isRangeOfType=d,g.getAncestorNodesBetween=i,g.findAncestorPosition=y,g.liftListItems=k,g.wrapInList=M,g.toggleUnorderedList=function(e,t,n){return g.toggleList(e,t,n,r.__assign({listType:s.bulletList.listType},s.bulletList.types))},g.toggleOrderedList=function(e,t,n){return g.toggleList(e,t,n,r.__assign({listType:s.orderedList.listType},s.orderedList.types))},g.splitListItemKeepMarks=function(e){return function(n,r){return o.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(0);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(0),a=n(11);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({},a.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({},a.listsTypes)}},function(e,t){e.exports=u},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){for(var t,n={},r=e.attributes,a=0;a<r.length;a++)n[(t=r[a]).name]=t.value;return n}function a(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return!0;return!1}function o(e,t){var n={};for(var r in e)r&&null!==e[r]&&r!==t&&(n[r]=e[r]);return n}function s(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t}var i=n(0),l=n(14),u=["blockquote",0],c=["hr"],d=["pre",["code",0]],f=["ol",0],p=["ul",0],m=["li",0],g=i.__assign({link:{attrs:i.__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",o(e.attrs),0]}}},s("strong"),s("b"),s("em"),s("i"),s("u"),s("del"),s("sub"),s("sup"),s("code"),{style:{attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["span",o(e.attrs),0]:["span",0]}}});t.marks=g;var v=i.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["p",o(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["div",o(e.attrs),0]:["div",0]}},blockquote:{attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return u}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return c}},heading:{attrs:i.__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 i.__assign({},r(e),{level:1})}},{tag:"h2",getAttrs:function(e){return i.__assign({},r(e),{level:2})}},{tag:"h3",getAttrs:function(e){return i.__assign({},r(e),{level:3})}},{tag:"h4",getAttrs:function(e){return i.__assign({},r(e),{level:4})}},{tag:"h5",getAttrs:function(e){return i.__assign({},r(e),{level:5})}},{tag:"h6",getAttrs:function(e){return i.__assign({},r(e),{level:6})}}],toDOM:function(e){return a(e.attrs,"level")?["h"+e.attrs.level,o(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:i.__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 a(e.attrs)?["img",o(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["br",o(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return i.__assign({},r(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?a(e.attrs,"order")?["ol",o(e.attrs,"order"),0]:f:["ol",i.__assign({},o(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["ul",o(e.attrs),0]:p}},list_item:{content:"block*",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["li",o(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}),t.createTable=function(e,t,n){for(var r,a=e.table,o=e.table_row,s=e.table_cell,i=[],l=0;l<t+1;l++){r=[];for(var u=0;u<n+1;u++)r.push(s.createAndFill());i.push(o.createAndFill(void 0,r))}return a.createAndFill(void 0,i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function k(e){return/^MsoListParagraph/.test(e.className)}function s(e){var t=e.innerHTML;return(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")}function M(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n}function b(e){function t(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")}var n,r,a,o=e.innerHTML;return o=o.replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(o)?{tag:"ul",style:(a=t(s(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(a)?null:/^o/.test(a)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(o)?{tag:"ol",style:(n=t(s(e)),r=null,/^\d/.test(n)||(r=(/^[a-z]/.test(n)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(n)?"roman":"alpha")),r)}:void 0}function S(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?s(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),"p"!==n?"<"+n+">"+e.innerHTML+"</"+n+">":e.innerHTML),e.parentNode.removeChild(e);var r=document.createElement("li");return r.innerHTML=t,r}var r=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,a=function(e,n){var r=[];Array.from(e).forEach(function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e;t.getAttribute("datalist")?(r.push(e),n.add(r)):k(t)&&r.length?r.push(e):(r=[],"DIV"===t.nodeName?a(t.children,n):"TABLE"===t.nodeName&&Array.from(t.querySelectorAll("td,th")).forEach(function(e){a(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 a(t.children,n),n.forEach(function(e){return function(e){var t,n,r,a,o,s,i,l,u,c,d,f,p,m=-1,g={};for(l=0;l<e.length;l++){var v=(p={datalist:(u=e[l]).getAttribute("datalist"),datalevel:u.getAttribute("datalevel")}).datalist,h=b(u);if(c=h&&h.tag){if(d=p.datalevel||parseFloat(u.style.marginLeft||0),p.datalevel||u.style.marginLeft){var y=c+v;g[d]||(g[d]={}),(!n||n<0)&&(n=d,r=v,a=(i=e.filter(function(e){return e.getAttribute("datalist")===String(r)}))[i.length-1],s=M(c,h&&h.style),u.parentNode.insertBefore(s,u),g[m=d][y]=s),o=a===u,f=g[d][y],(m<d||!f)&&(f=M(c,h&&h.style),g[d][y]=f,t.appendChild(f)),t=S(u),f.appendChild(t),o?n=m=-1:m=d}}else!t||o&&!k(u)||(u.style.marginLeft&&(u.style.marginLeft=""),u.style.marginLeft&&(u.style.margin=""),t.appendChild(u))}}(e)}),t.innerHTML}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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,"")},t.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},t.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")}},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=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(9),o=n(8),s=n(20),r=n(10),i="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=a.chainCommands(s.undoInputRule,a.deleteSelection,a.joinBackward,a.selectNodeBackward),t.Enter=a.chainCommands(a.newlineInCode,a.createParagraphNear,a.liftEmptyBlock,a.splitBlockKeepMarks),i||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=a.toggleMark(e.marks.strong)),e.marks.em&&(t["Mod-i"]=a.toggleMark(e.marks.em)),e.marks.underline&&(t["Mod-u"]=a.toggleMark(e.marks.underline)),e.nodes.hardBreak){var n=e.nodes.hardBreak,r=a.chainCommands(a.exitCode,function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0});t["Mod-Enter"]=r,t["Shift-Enter"]=r,i&&(t["Ctrl-Enter"]=r)}return t},t.buildListKeymap=function(e){var t={};return e.nodes.listItem&&(t.Enter=r.splitListItemKeepMarks(e.nodes.listItem)),t}},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")]},{node:"listItem",style:[r("text-align","left"),r("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]},{node:"listItem",style:[r("text-align","right"),r("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]},{node:"listItem",style:[r("text-align","center"),r("list-style-position","inside")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]},{node:"listItem",style:[r("text-align",""),r("list-style-position","")]}]},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var i=t(13),o=t(12),m=t(7),l=t(2);a.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){if(t.type.isTextblock){var e=void 0,n=f.find(function(e){return e.node===t.type.name});if(n){var r="rtl"===p?n.rtlStyle:n.style,a={name:r,value:0<n.step?""+n.step+n.unit:""};if(t.attrs.style){var o=new RegExp(r+":\\s?(\\d+)"+n.unit,"i"),s=t.attrs.style.match(o);if(s){var i=parseFloat(s[1])+n.step;i=i<=0?"":i,a.value=""+i+(i?n.unit:"")}}e=m.addStyles(t,[a])}e&&(d=m.changeBlockNode(l,u,c,t,t.type,e)||d)}}),d&&u(c.scrollIntoView()),d}},a.isIndented=function(e,a,o){var s=!1;return m.blockNodes(e).forEach(function(t){if(!s&&t.type.isTextblock&&t.attrs.style){var e=a.find(function(e){return e.node===t.type.name});if(e){var n="rtl"===o?e.rtlStyle:e.style,r=new RegExp(n+":\\s?\\d+"+e.unit,"i");s=r.test(t.attrs.style)}}}),s},a.canIndentAsListItem=function(e,t){return i.sinkListItem(t)(e)},a.canOutdentAsListItem=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],a=e.schema.nodes[t.listsTypes.bulletList],o=!!l.findNthParentNodeOfType(r,2)(e.selection),s=!!l.findNthParentNodeOfType(a,2)(e.selection);return(o||s)&&i.liftListItem(n)(e)},a.canBeIndented=function(t,e){var n=t.schema.nodes,r=n[o.indentRules.listsTypes.listItem];return(a.isIndented(t,e.nodes)||o.indentRules.nodes.some(function(e){return n[e.node]&&m.hasNode(t,n[e.node])}))&&!m.hasNode(t,r)},a.indent=function(e,t){var n=e.schema.nodes[o.indentRules.listsTypes.listItem],r=a.canBeIndented(e,o.indentRules);a.canIndentAsListItem(e,n)?i.sinkListItem(n)(e,t):r&&a.indentBlocks(o.indentRules.nodes)(e,t)},a.outdent=function(e,t){var n=e.schema.nodes[o.outdentRules.listsTypes.listItem],r=a.canBeIndented(e,o.outdentRules);a.canOutdentAsListItem(e,o.outdentRules)?i.liftListItem(n)(e,t):r&&a.indentBlocks(o.outdentRules.nodes)(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=n(7);t.alignBlocks=function(i,t){return function(r,a){var e=l.blockNodes(r),o=r.tr;o.setMeta("commandName",t);var s=!1;return e.forEach(function(t){if(t.type.isTextblock){var e={},n=i.find(function(e){return e.node===t.type.name});n&&(e=l.addStyles(t,n.style)),s=l.changeBlockNode(r,a,o,t,t.type,e)||s}}),s&&a(o.scrollIntoView()),s}},t.isAligned=function(e,n){var r=!1;return l.blockNodes(e).forEach(function(t){if(!r&&t.type.isTextblock&&t.attrs.style){var e=n.find(function(e){return e.node===t.type.name});e&&(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 a=n(2);t.insertImage=function(r){return function(e,t){var n=e.schema.nodes.image.createAndFill(r);a.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,c,t){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var m=t(6),h=t(4),d=t(1);c.removeLink=function(f,p){return function(e,t){var n=e.selection.$cursor;if(n){var r=n.parent,a=n.index(),o=e.schema.marks[f.mark],s=r.child(a).marks.find(function(e){return e.type===o}),i=r.childCount,l=n.pos-n.textOffset,u=r.child(a).nodeSize,c=void 0,d=void 0;for(c=a-1;0<=c&&s.isInSet(r.child(c).marks);)u+=d=r.child(c).nodeSize,l-=d,c-=1;for(c=a+1;c<i&&s.isInSet(r.child(c).marks);)u+=r.child(c).nodeSize,c+=1;t(h.removeMark(p||e.tr,l,l+u,s))}else m.toggleInlineFormat(f,p)(e,t)}},c.applyLink=function(e,i){var l=e.mark,u=e.attrs;return void 0===i&&(i="link"),function(e,t){var n=e.schema.marks,r=e.tr;i&&(r.setMeta("commandName",i),r.setMeta("args",u));function a(){return o=!0}var g,v,o=!1;if(h.getParentMark(e,n[l]))g={mark:l,attrs:u},v=r,function(e,n){var t=e.selection,r=t.$cursor,a=t.from,o=t.to,s=e.schema.marks[g.mark];if(r){var i=r.parent,l=r.index(),u=i.child(l).marks.find(function(e){return e.type===s}),c=i.childCount,d=r.pos-r.textOffset,f=i.child(l).nodeSize,p=void 0,m=void 0;for(p=l-1;0<=p&&u.isInSet(i.child(p).marks);)f+=m=i.child(p).nodeSize,d-=m,p-=1;for(p=l+1;p<c&&u.isInSet(i.child(p).marks);)f+=i.child(p).nodeSize,p+=1;v.removeMark(d,d+f,s),v.addMark(d,d+f,s.create(g.attrs)),n(v)}else v.doc.nodesBetween(a,o,function(e,t){e.isInline&&s.isInSet(e.marks)&&(v.removeMark(t,t+e.nodeSize,s),v.addMark(t,t+e.nodeSize,s.create(g.attrs)),n(v))})}(e,a);else{var s=e;h.hasMark(e,{mark:l})&&(c.removeLink({mark:l,attrs:u},r)(e,a),s=d.EditorState.create({doc:r.doc,selection:r.selection})),o?h.toggleMark(n[l],u,r)(s,a):m.toggleInlineFormat({mark:l},r,u)(s,a)}return o&&t(r),o}}},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=t(3),s=t(1);o.parseContent=function(e,t,n){var r=document.createElement("div");return r.innerHTML=e,a.DOMParser.fromSchema(t).parse(r,n)},o.getHtml=function(e){var t=a.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),n=document.createElement("div");return n.appendChild(t),n.innerHTML},o.setHtml=function(n,r,a){return void 0===r&&(r="setHTML"),void 0===a&&(a={preserveWhitespace:"full"}),function(e,t){return t(e.tr.setSelection(new s.AllSelection(e.doc)).replaceSelectionWith(o.parseContent(n,e.schema,a)).setMeta("commandName",r))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28);t.getHtml=r.getHtml,t.setHtml=r.setHtml,t.parseContent=r.parseContent;var a=n(6);t.applyInlineStyle=a.applyInlineStyle,t.getInlineStyles=a.getInlineStyles,t.toggleInlineFormat=a.toggleInlineFormat;var o=n(27);t.applyLink=o.applyLink,t.removeLink=o.removeLink;var s=n(26);t.insertText=s.insertText;var i=n(25);t.insertImage=i.insertImage;var l=n(24);t.alignBlocks=l.alignBlocks,t.isAligned=l.isAligned;var u=n(7);t.hasNode=u.hasNode,t.activeNode=u.activeNode,t.formatBlockElements=u.formatBlockElements,t.getBlockFormats=u.getBlockFormats;var c=n(4);t.hasMark=c.hasMark,t.getMark=c.getMark,t.getActiveMarks=c.getActiveMarks,t.removeAllMarks=c.removeAllMarks;var d=n(23);t.indent=d.indent,t.canIndentAsListItem=d.canIndentAsListItem,t.outdent=d.outdent,t.canOutdentAsListItem=d.canOutdentAsListItem,t.isIndented=d.isIndented,t.canBeIndented=d.canBeIndented,t.indentBlocks=d.indentBlocks;var f=n(10);t.toggleOrderedList=f.toggleOrderedList,t.toggleUnorderedList=f.toggleUnorderedList,t.toggleList=f.toggleList;var p=n(2);t.createContentNode=p.createContentNode,t.hasSameMarkup=p.hasSameMarkup,t.getUniqueStyleValues=p.getUniqueStyleValues,t.getSelectionText=p.getSelectionText,t.getNodeFromSelection=p.getNodeFromSelection,t.canInsert=p.canInsert,t.insertNode=p.insertNode,t.indentHtml=p.indentHtml;var m=n(8);t.redo=m.redo,t.undo=m.undo;var g=n(22);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignRemoveRules=g.alignRemoveRules;var v=n(12);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var h=n(15);t.nodes=h.nodes,t.marks=h.marks;var y=n(21);t.buildKeymap=y.buildKeymap,t.buildListKeymap=y.buildListKeymap;var k=n(19);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(18);t.sanitize=M.sanitize,t.removeComments=M.removeComments,t.removeTag=M.removeTag;var b=n(17);t.convertMsLists=b.convertMsLists;var S=n(16);t.createTable=S.createTable;var _=n(14);t.addRowBefore=_.addRowBefore,t.addRowAfter=_.addRowAfter,t.addColumnBefore=_.addColumnBefore,t.addColumnAfter=_.addColumnAfter,t.deleteRow=_.deleteRow,t.deleteColumn=_.deleteColumn,t.deleteTable=_.deleteTable,t.mergeCells=_.mergeCells,t.splitCell=_.splitCell,t.selectionCell=_.selectionCell,function(e){for(var t in e)I(t,e[t])}(t)}],r.c=a,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=29)}}});
{
"name": "@progress/kendo-editor-common",
"description": "Kendo UI TypeScript package exporting functions for Editor component",
"version": "0.2.1-dev.201910251141",
"version": "0.3.0-dev.201910300927",
"keywords": [

@@ -6,0 +6,0 @@ "Kendo UI"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc