text: 
      /*!
      * tiptap-commands v1.14.6
      * (c) 2020 überdosis GbR (limited liability)
      * @license MIT
      */
  
  
  /*!
      * tiptap-commands v1.14.6
      * (c) 2020 überdosis GbR (limited liability)
      * @license MIT
      */
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("prosemirror-commands"),require("prosemirror-schema-list"),require("prosemirror-inputrules"),require("prosemirror-state"),require("prosemirror-model"),require("tiptap-utils"),require("prosemirror-utils")):"function"==typeof define&&define.amd?define(["exports","prosemirror-commands","prosemirror-schema-list","prosemirror-inputrules","prosemirror-state","prosemirror-model","tiptap-utils","prosemirror-utils"],t):t((e=e||self).tiptapCommands={},e.prosemirrorCommands,e.prosemirrorSchemaList,e.prosemirrorInputrules,e.prosemirrorState,e.prosemirrorModel,e.tiptapUtils,e.prosemirrorUtils)}(this,(function(e,t,n,r,o,i,c,u){"use strict";function a(e,t){return e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list||e.type===t.nodes.todo_list}Object.defineProperty(e,"autoJoin",{enumerable:!0,get:function(){return t.autoJoin}}),Object.defineProperty(e,"baseKeymap",{enumerable:!0,get:function(){return t.baseKeymap}}),Object.defineProperty(e,"chainCommands",{enumerable:!0,get:function(){return t.chainCommands}}),Object.defineProperty(e,"createParagraphNear",{enumerable:!0,get:function(){return t.createParagraphNear}}),Object.defineProperty(e,"deleteSelection",{enumerable:!0,get:function(){return t.deleteSelection}}),Object.defineProperty(e,"exitCode",{enumerable:!0,get:function(){return t.exitCode}}),Object.defineProperty(e,"joinBackward",{enumerable:!0,get:function(){return t.joinBackward}}),Object.defineProperty(e,"joinDown",{enumerable:!0,get:function(){return t.joinDown}}),Object.defineProperty(e,"joinForward",{enumerable:!0,get:function(){return t.joinForward}}),Object.defineProperty(e,"joinUp",{enumerable:!0,get:function(){return t.joinUp}}),Object.defineProperty(e,"lift",{enumerable:!0,get:function(){return t.lift}}),Object.defineProperty(e,"liftEmptyBlock",{enumerable:!0,get:function(){return t.liftEmptyBlock}}),Object.defineProperty(e,"macBaseKeymap",{enumerable:!0,get:function(){return t.macBaseKeymap}}),Object.defineProperty(e,"newlineInCode",{enumerable:!0,get:function(){return t.newlineInCode}}),Object.defineProperty(e,"pcBaseKeymap",{enumerable:!0,get:function(){return t.pcBaseKeymap}}),Object.defineProperty(e,"selectAll",{enumerable:!0,get:function(){return t.selectAll}}),Object.defineProperty(e,"selectNodeBackward",{enumerable:!0,get:function(){return t.selectNodeBackward}}),Object.defineProperty(e,"selectNodeForward",{enumerable:!0,get:function(){return t.selectNodeForward}}),Object.defineProperty(e,"selectParentNode",{enumerable:!0,get:function(){return t.selectParentNode}}),Object.defineProperty(e,"setBlockType",{enumerable:!0,get:function(){return t.setBlockType}}),Object.defineProperty(e,"splitBlock",{enumerable:!0,get:function(){return t.splitBlock}}),Object.defineProperty(e,"splitBlockKeepMarks",{enumerable:!0,get:function(){return t.splitBlockKeepMarks}}),Object.defineProperty(e,"toggleMark",{enumerable:!0,get:function(){return t.toggleMark}}),Object.defineProperty(e,"wrapIn",{enumerable:!0,get:function(){return t.wrapIn}}),Object.defineProperty(e,"addListNodes",{enumerable:!0,get:function(){return n.addListNodes}}),Object.defineProperty(e,"liftListItem",{enumerable:!0,get:function(){return n.liftListItem}}),Object.defineProperty(e,"sinkListItem",{enumerable:!0,get:function(){return n.sinkListItem}}),Object.defineProperty(e,"splitListItem",{enumerable:!0,get:function(){return n.splitListItem}}),Object.defineProperty(e,"wrapInList",{enumerable:!0,get:function(){return n.wrapInList}}),Object.defineProperty(e,"textblockTypeInputRule",{enumerable:!0,get:function(){return r.textblockTypeInputRule}}),Object.defineProperty(e,"wrappingInputRule",{enumerable:!0,get:function(){return r.wrappingInputRule}}),e.insertText=function(e=""){return(t,n)=>{const{$from:r}=t.selection,{pos:o}=r.pos;return n(t.tr.insertText(e,o)),!0}},e.markInputRule=function(e,t,n){return new r.InputRule(e,(e,r,o,i)=>{const c=n instanceof Function?n(r):n,{tr:u}=e,a=r.length-1;let s=i,p=o;if(r[a]){const n=o+r[0].indexOf(r[a-1]),c=n+r[a-1].length-1,l=n+r[a-1].lastIndexOf(r[a]),d=l+r[a].length;if(function(e,t,n){let r=[];return n.doc.nodesBetween(e,t,(e,t)=>{r=[...r,...e.marks.map(n=>({start:t,end:t+e.nodeSize,mark:n}))]}),r}(o,i,e).filter(e=>{const{excluded:n}=e.mark.type;return n.find(e=>e.name===t.name)}).filter(e=>e.end>n).length)return!1;d<c&&u.delete(d,c),l>n&&u.delete(n,l),p=n,s=p+r[a].length}return u.addMark(p,s,t.create(c)),u.removeStoredMark(t),u})},e.markPasteRule=function(e,t,n){const r=(o,c)=>{const u=[];return o.forEach(o=>{if(o.isText){const{text:r,marks:i}=o;let a,s=0;const p=!!i.filter(e=>"link"===e.type.name)[0];for(;!p&&null!==(a=e.exec(r));)if(c&&c.type.allowsMarkType(t)&&a[1]){const e=a.index,r=e+a[0].length,i=e+a[0].indexOf(a[1]),c=i+a[1].length,p=n instanceof Function?n(a):n;e>0&&u.push(o.cut(s,e)),u.push(o.cut(i,c).mark(t.create(p).addToSet(o.marks))),s=r}s<r.length&&u.push(o.cut(s))}else u.push(o.copy(r(o.content,o)))}),i.Fragment.fromArray(u)};return new o.Plugin({props:{transformPasted:e=>new i.Slice(r(e.content),e.openStart,e.openEnd)}})},e.nodeInputRule=function(e,t,n){return new r.InputRule(e,(e,r,o,i)=>{const c=n instanceof Function?n(r):n,{tr:u}=e;return r[0]&&u.replaceWith(o-1,i,t.create(c)),u})},e.pasteRule=function(e,t,n){const r=o=>{const c=[];return o.forEach(o=>{if(o.isText){const{text:r}=o;let i,u=0;do{if(i=e.exec(r),i){const e=i.index,r=e+i[0].length,a=n instanceof Function?n(i[0]):n;e>0&&c.push(o.cut(u,e)),c.push(o.cut(e,r).mark(t.create(a).addToSet(o.marks))),u=r}}while(i);u<r.length&&c.push(o.cut(u))}else c.push(o.copy(r(o.content)))}),i.Fragment.fromArray(c)};return new o.Plugin({props:{transformPasted:e=>new i.Slice(r(e.content),e.openStart,e.openEnd)}})},e.removeMark=function(e){return(t,n)=>{const{tr:r,selection:o}=t;let{from:i,to:u}=o;const{$from:a,empty:s}=o;if(s){const t=c.getMarkRange(a,e);i=t.from,u=t.to}return r.removeMark(i,u,e),n(r)}},e.replaceText=function(e=null,t,n={}){return(r,o)=>{const{$from:i,$to:c}=r.selection,u=i.index(),a=e?e.from:i.pos,s=e?e.to:c.pos;return!!i.parent.canReplaceWith(u,u,t)&&(o&&o(r.tr.replaceWith(a,s,t.create(n))),!0)}},e.setInlineBlockType=function(e,t={}){return(n,r)=>{const{$from:o}=n.selection,i=o.index();return!!o.parent.canReplaceWith(i,i,e)&&(r&&r(n.tr.replaceSelectionWith(e.create(t))),!0)}},e.splitToDefaultListItem=function(e){return function(t,n){const{$from:r,$to:o,node:c}=t.selection;if(c&&c.isBlock||r.depth<2||!r.sameParent(o))return!1;const u=r.node(-1);if(u.type!=e)return!1;if(0==r.parent.content.size){if(2==r.depth||r.node(-3).type!=e||r.index(-2)!=r.node(-2).childCount-1)return!1;if(n){let o=i.Fragment.empty;const c=r.index(-1)>0;for(let e=r.depth-(c?1:2);e>=r.depth-3;e--)o=i.Fragment.from(r.node(e).copy(o));o=o.append(i.Fragment.from(e.createAndFill()));const u=t.tr.replace(r.before(c?null:-1),r.after(-3),new i.Slice(o,c?3:2,2));u.setSelection(t.selection.constructor.near(u.doc.resolve(r.pos+(c?3:2)))),n(u.scrollIntoView())}return!0}const a=o.pos==r.end()?u.contentMatchAt(r.indexAfter(-1)).defaultType:null,s=t.tr.delete(r.pos,o.pos);let p=a&&[{type:e},{type:a}];return p||(p=[{type:e},null]),!!function(e,t,n=1,r){const o=e.resolve(t),i=o.depth-n,c=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!c.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let e=o.depth-1,t=n-2;e>i;e--,t--){const n=o.node(e),i=o.index(e);if(n.type.spec.isolating)return!1;let c=n.content.cutByIndex(i,n.childCount);const u=r&&r[t]||n;if(u!=n&&(c=c.replaceChild(0,u.type.create(u.attrs))),!n.canReplace(i+1,n.childCount))return!1}const u=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(u,u,a?a.type:o.node(i+1).type)}(s.doc,r.pos,2,p)&&(n&&n(s.split(r.pos,2,p).scrollIntoView()),!0)}},e.toggleBlockType=function(e,n,r={}){return(o,i,u)=>c.nodeIsActive(o,e,r)?t.setBlockType(n)(o,i,u):t.setBlockType(e,r)(o,i,u)},e.toggleList=function(e,t){return(r,o,i)=>{const{schema:c,selection:s}=r,{$from:p,$to:l}=s,d=p.blockRange(l);if(!d)return!1;const f=u.findParentNode(e=>a(e,c))(s);if(d.depth>=1&&f&&d.depth-f.depth<=1){if(f.node.type===e)return n.liftListItem(t)(r,o,i);if(a(f.node,c)&&e.validContent(f.node.content)){const{tr:t}=r;return t.setNodeMarkup(f.pos,e),o&&o(t),!1}}return n.wrapInList(e)(r,o,i)}},e.toggleWrap=function(e,n={}){return(r,o,i)=>c.nodeIsActive(r,e,n)?t.lift(r,o):t.wrapIn(e,n)(r,o,i)},e.updateMark=function(e,t){return(n,r)=>{const{tr:o,selection:i,doc:u}=n,{ranges:a,empty:s}=i;if(s){const{from:n,to:r}=c.getMarkRange(i.$from,e);u.rangeHasMark(n,r,e)&&o.removeMark(n,r,e),o.addMark(n,r,e.create(t))}else a.forEach(n=>{const{$to:r,$from:i}=n;u.rangeHasMark(i.pos,r.pos,e)&&o.removeMark(i.pos,r.pos,e),o.addMark(i.pos,r.pos,e.create(t))});return r(o)}},Object.defineProperty(e,"__esModule",{value:!0})}));