1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`20260924-39003-d97a9715`},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:textmagic-web-app":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`c06a9865-fae3-44a1-8fca-11fcd9390b9a`,e._sentryDebugIdIdentifier=`sentry-dbid-c06a9865-fae3-44a1-8fca-11fcd9390b9a`)}catch{}})();import{G as e,H as t,K as n,O as r,Q as i,R as a,U as o,W as s,X as c,Y as l,c as u,et as d,k as f,n as p,q as m,tt as h,y as g}from"./CjlEYjhI.js";function _(t={}){return new e({view(e){return new v(e,t)}})}var v=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),n={left:i.left,right:i.right,top:a-this.width/2,bottom:a+this.width/2}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos);n={left:e.left-this.width/2,right:e.left+this.width/2,top:e.top,bottom:e.bottom}}let r=this.editorView.dom.offsetParent;this.element||(this.element=r.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let i,a;if(!r||r==document.body&&getComputedStyle(r).position==`static`)i=-pageXOffset,a=-pageYOffset;else{let e=r.getBoundingClientRect();i=e.left-r.scrollLeft,a=e.top-r.scrollTop}this.element.style.left=n.left-i+`px`,this.element.style.top=n.top-a+`px`,this.element.style.width=n.right-n.left+`px`,this.element.style.height=n.bottom-n.top+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,a=typeof r==`function`?r(this.editorView,t,e):r;if(t&&!a){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=i(this.editorView.state.doc,e,this.editorView.dragging.slice);t!=null&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}},y=class e extends m{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):m.near(r)}content(){return h.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new ee(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!b(e)||!x(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!s.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let c=t.doc.resolve(i);if(e.valid(c))return c}return null}}};y.prototype.visible=!1,y.findFrom=y.findGapCursorFrom,m.jsonID(`gapcursor`,y
vendor: 10,012 bytes, line 1
1);var ee=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return y.valid(t)?new y(t):m.near(t)}};function b(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}}return!0}function x(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}}return!0}function S(){return new e({props:{decorations:D,createSelectionBetween(e,t,n){return t.pos==n.pos&&y.valid(n)?new y(n):null},handleClick:T,handleKeyDown:C,handleDOMEvents:{beforeinput:E}}})}var C=a({ArrowLeft:w(`horiz`,-1),ArrowRight:w(`horiz`,1),ArrowUp:w(`vert`,-1),ArrowDown:w(`vert`,1)});function w(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof l){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=y.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new y(c))),!0):!1}}function T(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!y.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&s.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new y(r))),!0)}function E(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof y))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=d.empty;for(let e=r.length-1;e>=0;e--)i=d.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new h(i,0,0));return a.setSelection(l.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function D(e){if(!(e.selection instanceof y))return null;let n=document.createElement(`div`);return n.className=`ProseMirror-gapcursor`,o.create(e.doc,[t.widget(e.selection.head,n,{key:`gapcursor`})])}var O=200,k=function(){};k.prototype.append=function(e){return e.length?(e=k.from(e),!this.length&&e||e.length<O&&this.leafAppend(e)||this.length<O&&e.leafPrepend(this)||this.appendInner(e)):this},k.prototype.prepend=function(e){return e.length?k.from(e).append(this):this},k.prototype.appendInner=function(e){return new j(this,e)},k.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?k.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},k.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},k.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},k.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},k.from=function(e){return e instanceof k?e:e&&e.length?new A(e):k.empty};var A=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=O)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=O)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(k);k.empty=new A([]);var j=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(k),te=500,M=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new P(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new P(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new P(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&(o++,n=void 0),i||(c=l)}let l=o-r.depth;return l>I&&(s=N(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new c;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new P(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new P(i,o,l))}else r.push(new P(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new P(a.maps[e]));let u=new e(this.items.slice(0,i).append(l).append(r),s);return u.emptyItemCount()>te&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new P(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(k.from(i.reverse()),a)}};M.empty=new M(k.empty,0);function N(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var P=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},F=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},I=20;function L(e,t,n,r){let i=n.getMeta(G),a;if(i)return i.historyState;n.getMeta(K)&&(e=new F(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(G))return o.getMeta(G).redo?new F(e.done.addTransform(n,void 0,r,W(t)),e.undone,z(n.mapping.maps),e.prevTime,e.prevComposition):new F(e.done,e.undone.addTransform(n,void 0,r,W(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!R(n,e.prevRanges)),s=o?B(e.prevRanges,n.mapping):z(n.mapping.maps);return new F(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,W(t)),M.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new F(e.done.rebased(n,a),e.undone.rebased(n,a),B(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new F(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),B(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function R(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function z(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;
1n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function B(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function V(e,t,n){let r=W(t),i=G.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new F(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(G,{redo:n,historyState:c})}var H=!1,U=null;function W(e){let t=e.plugins;if(U!=t){H=!1,U=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){H=!0;break}}return H}var G=new n(`history`),K=new n(`closeHistory`);function q(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new e({key:G,state:{init(){return new F(M.empty,M.empty,null,0,-1)},apply(e,n,r){return L(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?Y:n==`historyRedo`?X:null;return r?(t.preventDefault(),r(e.state,e.dispatch)):!1}}}})}function J(e,t){return(n,r)=>{let i=G.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=V(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var Y=J(!1,!0),X=J(!0,!0),Z=p.create({name:`characterCount`,addOptions(){return{limit:null,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new e({key:new n(`characterCount`),appendTransaction:(e,n,r)=>{if(t)return;let i=this.options.limit;if(i==null||i===0){t=!0;return}let a=this.storage.characters({node:r.doc});if(a>i){let e=a-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,e);return t=!0,n}t=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});p.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[_(this.options)]}}),p.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new e({key:new n(`focus`),props:{decorations:({doc:e,selection:n})=>{let{isEditable:r,isFocused:i}=this.editor,{anchor:a}=n,s=[];if(!r||!i)return o.create(e,[]);let c=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(a>=t&&a<=t+e.nodeSize-1))return!1;c+=1}});let l=0;return e.descendants((e,n)=>{if(e.isText||!(a>=n&&a<=n+e.nodeSize-1))return!1;if(l+=1,this.options.mode===`deepest`&&c-l>0||this.options.mode===`shallowest`&&l>1)return this.options.mode===`deepest`;s.push(t.node(n,n+e.nodeSize,{class:this.options.className}))}),o.create(e,s)}}})]}});var ne=p.create({name:`gapCursor`,addProseMirrorPlugins(){return[S()]},extendNodeSchema(e){return{allowGapCursor:u(g(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),Q=`placeholder`;function re(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}var ie=p.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:Q,placeholder:`Write something â¦`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let i=this.options.dataAttribute?`data-${re(this.options.dataAttribute)}`:`data-${Q}`;return[new e({key:new n(`placeholder`),props:{decorations:({doc:e,selection:n})=>{let a=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:s}=n,c=[];if(!a)return null;let l=this.editor.isEmpty;return e.descendants((e,n)=>{let a=s>=n&&s<=n+e.nodeSize,o=!e.isLeaf&&r(e);if(!e.type.isTextblock)return this.options.includeChildren;if((a||!this.options.showOnlyCurrent)&&o){let r=[this.options.emptyNodeClass];l&&r.push(this.options.emptyEditorClass);let o=t.node(n,n+e.nodeSize,{class:r.join(` `),[i]:typeof this.options.placeholder==`function`?this.options.placeholder({editor:this.editor,node:e,pos:n,hasAnchor:a}):this.options.placeholder});c.push(o)}return this.options.includeChildren}),o.create(e,c)}}})]}});p.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:r,options:i}=this;return[new e({key:new n(`selection`),props:{decorations(e){return e.selection.empty||r.isFocused||!r.isEditable||f(e.selection)||r.view.dragging?null:o.create(e.doc,[t.inline(e.selection.from,e.selection.to,{class:i.className})])}}})]}});function $({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}p.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let t=new n(this.name),r=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,i=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(r).includes(e.name));return[new e({key:t,appendTransaction:(e,n,i)=>{let{doc:a,tr:o,schema:s}=i,c=t.getState(i),l=a.content.size,u=s.nodes[r];if(!e.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>
vendor: 746 bytes, lines 1-2
1{let n=t.tr.doc.lastChild;return!$({node:n,types:i})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let n=e.doc.lastChild;return!$({node:n,types:i})}}})]}});var ae=p.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Y(e,t),redo:()=>({state:e,dispatch:t})=>X(e,t)}},addProseMirrorPlugins(){return[q(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Ñ":()=>this.editor.commands.undo(),"Shift-Mod-Ñ":()=>this.editor.commands.redo()}}});export{ae as i,ne as n,ie as r,Z as t}; 2//# sourceMappingURL=CwGcM7li.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.