1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,612757,e=>{"use strict";var t=e.i(231082).Placeholder;e.s(["default",0,t])},231082,e=>{"use strict";var t=e.i(33882),n=e.i(768133),i=e.i(664532);class o{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=null!=(n=t.width)?n:1,this.color=!1===t.color?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){if(null!=this.cursorPos&&t.doc!=e.state.doc)if(this.lastDragEvent){let e=this.computeTarget(this.lastDragEvent);e==this.cursorPos?this.updateOverlay():this.setCursor(e)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),i=!n.parent.inlineContent,o,r=this.editorView.dom,s=r.getBoundingClientRect(),l=s.width/r.offsetWidth,a=s.height/r.offsetHeight;if(i){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let i=n.getBoundingClientRect(),r=e?i.bottom:i.top;e&&t&&(r=(r+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*a;o={left:i.left,right:i.right,top:r-s,bottom:r+s}}}}if(!o){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*l;o={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let p=this.editorView.dom.offsetParent;if(!this.element&&(this.element=p.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",i),this.element.classList.toggle("prosemirror-dropcursor-inline",!i),p&&(p!=document.body||"static"!=getComputedStyle(p).position)){let n=p.getBoundingClientRect(),i=n.width/p.offsetWidth,o=n.height/p.offsetHeight;e=n.left-p.scrollLeft*i,t=n.top-p.scrollTop*o}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(o.left-e)/l+"px",this.element.style.top=(o.top-t)/a+"px",this.element.style.width=(o.right-o.left)/l+"px",this.element.style.height=(o.bottom-o.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),o=n&&n.type.spec.disableDropCursor,r="function"==typeof o?o(this.editorView,t,e):o;if(!t||r)return null;let s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=(0,i.dropPoint)(this.editorView.state.doc,s,this.editorView.dragging.slice);null!=e&&(s=e)}return s}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);null!=t&&(this.setCursor(t),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}var r=e.i(533393),s=e.i(766386),l=n,a=e.i(398019);class p extends l.Selection{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return p.valid(n)?new p(n):l.Selection.near(n)}content(){return a.Slice.empty}eq(e){return e instanceof p&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new p(e.resolve(t.pos))}getBookmark(){return new h(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),i=e.node(t);if(0==n){if(i.type.spec.isolating)return!0;continue}for(let e=i.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||d(e.type))return!0;
1if(e.inlineContent)return!1}}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),i=e.node(t);if(n==i.childCount){if(i.type.spec.isolating)return!0;continue}for(let e=i.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||d(e.type))return!0;if(e.inlineContent)return!1}}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&p.valid(e))return e;let i=e.pos,o=null;for(let n=e.depth;;n--){let r=e.node(n);if(t>0?e.indexAfter(n)<r.childCount:e.index(n)>0){o=r.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;i+=t;let s=e.doc.resolve(i);if(p.valid(s))return s}for(;;){let r=t>0?o.firstChild:o.lastChild;if(!r){if(o.isAtom&&!o.isText&&!l.NodeSelection.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*t),n=!1;continue e}break}o=r,i+=t;let s=e.doc.resolve(i);if(p.valid(s))return s}return null}}}p.prototype.visible=!1,p.findFrom=p.findGapCursorFrom,l.Selection.jsonID("gapcursor",p);class h{constructor(e){this.pos=e}map(e){return new h(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return p.valid(t)?new p(t):l.Selection.near(t)}}function d(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}let u=(0,s.keydownHandler)({ArrowLeft:c("horiz",-1),ArrowRight:c("horiz",1),ArrowUp:c("vert",-1),ArrowDown:c("vert",1)});function c(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,i,o){let r=e.selection,s=t>0?r.$to:r.$from,a=r.empty;if(r instanceof l.TextSelection){if(!o.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let h=p.findGapCursorFrom(s,t,a);return!!h&&(i&&i(e.tr.setSelection(new p(h))),!0)}}function f(e,t,n){if(!e||!e.editable)return!1;let i=e.state.doc.resolve(t);if(!p.valid(i))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&l.NodeSelection.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new p(i))),!0)}function m(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof p))return!1;let{$from:n}=e.state.selection,i=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!i)return!1;let o=a.Fragment.empty;for(let e=i.length-1;e>=0;e--)o=a.Fragment.from(i[e].createAndFill(null,o));let r=e.state.tr.replace(n.pos,n.pos,new a.Slice(o,0,0));return r.setSelection(l.TextSelection.near(r.doc.resolve(n.pos+1))),e.dispatch(r),!1}function g(e){if(!(e.selection instanceof p))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",r.DecorationSet.create(e.doc,[r.Decoration.widget(e.selection.head,t,{key:"gapcursor"})])}var v=function(){};v.prototype.append=function(e){return e.length?(e=v.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},v.prototype.prepend=function(e){return e.length?v.from(e).append(this):this},v.prototype.appendInner=function(e){return new w(this,e)},v.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?v.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},v.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},v.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},v.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var i=[];return this.forEach(function(t,n){return i.push(e(t,n))},t,n),i},v.from=function(e){return e instanceof v?e:e&&e.length?new y(e):v.empty};var y=function(e){function t(t){e.call(this),this.values=t}t.__proto__=e,t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,i){for(var o=t;o<n;o++)if(!1===e(this.values[o],i+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,i){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],i+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)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}(v);v.empty=new y([]);var w=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 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,i){var o=this.left.length;if(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),i)||n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,i+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,i){var o=this.left.length;if(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,i+o)||n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,i))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(v);class C{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,i,o,r;if(0==this.eventCount)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}t&&(i=(n=this.remapping(s,this.items.length)).maps.length);let l=e.tr,a=[],p=[];
1return this.items.forEach((e,t)=>{if(!e.step){n||(i=(n=this.remapping(s,t+1)).maps.length),i--,p.push(e);return}if(n){p.push(new M(e.map));let t=e.step.map(n.slice(i)),o;t&&l.maybeStep(t).doc&&(o=l.mapping.maps[l.mapping.maps.length-1],a.push(new M(o,void 0,void 0,a.length+p.length))),i--,o&&n.appendMap(o,i)}else l.maybeStep(e.step);if(e.selection)return o=n?e.selection.map(n.slice(i)):e.selection,r=new C(this.items.slice(0,s).append(p.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:r,transform:l,selection:o}}addTransform(e,t,n,i){var o,r;let s,l=[],a=this.eventCount,p=this.items,h=!i&&p.length?p.get(p.length-1):null;for(let n=0;n<e.steps.length;n++){let o=e.steps[n].invert(e.docs[n]),r=new M(e.mapping.maps[n],o,t),s;(s=h&&h.merge(r))&&(r=s,n?l.pop():p=p.slice(0,p.length-1)),l.push(r),t&&(a++,t=void 0),i||(h=r)}let d=a-n.depth;return d>E&&(o=p,r=d,o.forEach((e,t)=>{if(e.selection&&0==r--)return s=t,!1}),p=o.slice(s),a-=d),new C(p.append(l),a)}remapping(e,t){let n=new i.Mapping;return this.items.forEach((t,i)=>{let o=null!=t.mirrorOffset&&i-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)},e,t),n}addMaps(e){return 0==this.eventCount?this:new C(this.items.append(e.map(e=>new M(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-t),o=e.mapping,r=e.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let l=t;this.items.forEach(t=>{let i=o.getMirror(--l);if(null==i)return;r=Math.min(r,i);let a=o.maps[i];if(t.step){let r=e.steps[i].invert(e.docs[i]),p=t.selection&&t.selection.map(o.slice(l+1,i));p&&s++,n.push(new M(a,r,p))}else n.push(new M(a))},i);let a=[];for(let e=t;e<r;e++)a.push(new M(o.maps[e]));let p=new C(this.items.slice(0,i).append(a).append(n),s);return p.emptyItemCount()>500&&(p=p.compress(this.items.length-n.length)),p}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,i=[],o=0;return this.items.forEach((r,s)=>{if(s>=e)i.push(r),r.selection&&o++;else if(r.step){let e=r.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let l=r.selection&&r.selection.map(t.slice(n));l&&o++;let a=new M(s.invert(),e,l),p,h=i.length-1;(p=i.length&&i[h].merge(a))?i[h]=p:i.push(a)}}else r.map&&n--},this.items.length,0),new C(v.from(i.reverse()),o)}}C.empty=new C(v.empty,0);class M{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new M(t.getMap().invert(),t,this.selection)}}}class b{constructor(e,t,n,i,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i,this.prevComposition=o}}let E=20;function S(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,i,o)=>t.push(i,o));return t}function x(e,t){if(!e)return null;let n=[];for(let i=0;i<e.length;i+=2){let o=t.map(e[i],1),r=t.map(e[i+1],-1);o<=r&&n.push(o,r)}return n}let P=!1,T=null;function k(e){let t=e.plugins;if(T!=t){P=!1,T=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){P=!0;break}}return P}let O=new n.PluginKey("history"),A=new n.PluginKey("closeHistory");function I(e,t){return(n,i)=>{let o=O.getState(n);if(!o||0==(e?o.undone:o.done).eventCount)return!1;if(i){let r=function(e,t,n){let i=k(t),o=O.get(t).spec.config,r=(n?e.undone:e.done).popEvent(t,i);if(!r)return null;let s=r.selection.resolve(r.transform.doc),l=(n?e.done:e.undone).addTransform(r.transform,t.selection.getBookmark(),o,i),a=new b(n?l:r.remaining,n?r.remaining:l,null,0,-1);return r.transform.setSelection(s).setMeta(O,{redo:n,historyState:a})}(o,n,e);r&&i(t?r.scrollIntoView():r)}return!0}}let z=I(!1,!0),D=I(!0,!0);I(!1,!1),I(!0,!1),t.Extension.create({name:"characterCount",addOptions:()=>({limit:null,autoTrim:!0,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){let e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new n.Plugin({key:new n.PluginKey("characterCount"),appendTransaction:(t,n,i)=>{if(e)return;let o=this.options.limit,r=this.options.autoTrim;if(null==o||0===o||!1===r){e=!0;return}let s=this.storage.characters({node:i.doc});if(s>o){console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);let t=i.tr.deleteRange(0,s-o);return e=!0,t}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;let i=this.storage.characters({node:t.doc}),o=this.storage.characters({node:e.doc});if(o<=n||i>n&&o>n&&o<=i)return!0;
1if(i>n&&o>n&&o>i||!e.getMeta("paste"))return!1;let r=e.selection.$head.pos;return e.deleteRange(r-(o-n),r),!(this.storage.characters({node:e.doc})>n)}})]}});let R=t.Extension.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(e={}){return new n.Plugin({view:t=>new o(t,e)})}(this.options)]}});t.Extension.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new n.Plugin({key:new n.PluginKey("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:i}=this.editor,{anchor:o}=t,s=[];if(!n||!i)return r.DecorationSet.create(e,[]);let l=0;"deepest"===this.options.mode&&e.descendants((e,t)=>{if(!e.isText){if(!(o>=t&&o<=t+e.nodeSize-1))return!1;l+=1}});let a=0;return e.descendants((e,t)=>!e.isText&&!!(o>=t&&o<=t+e.nodeSize-1)&&((a+=1,"deepest"===this.options.mode&&l-a>0||"shallowest"===this.options.mode&&a>1)?"deepest"===this.options.mode:void s.push(r.Decoration.node(t,t+e.nodeSize,{class:this.options.className})))),r.DecorationSet.create(e,s)}}})]}});let N=t.Extension.create({name:"gapCursor",addProseMirrorPlugins:()=>[new l.Plugin({props:{decorations:g,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&p.valid(n)?new p(n):null,handleClick:f,handleKeyDown:u,handleDOMEvents:{beforeinput
1:m}}})],extendNodeSchema(e){var n;let i={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(n=(0,t.callOrReturn)((0,t.getExtensionField)(e,"allowGapCursor",i)))?n:null}}}),B="placeholder",L=new n.PluginKey("tiptap__placeholder");function V(e){let{editor:t,placeholder:n,dataAttribute:i,pos:o,node:s,isEmptyDoc:l,hasAnchor:a,classes:{emptyNode:p,emptyEditor:h}}=e,d=[p];return l&&d.push(h),r.Decoration.node(o,o+s.nodeSize,{class:d.join(" "),[i]:"function"==typeof n?n({editor:t,node:s,pos:o,hasAnchor:a}):n})}function G(e,t){return"function"==typeof e?e(t):e}function K({editor:e,options:n,dataAttribute:i,doc:o,selection:r,from:s,to:l}){let{anchor:a}=r,p=[],h=e.isEmpty;return o.nodesBetween(s,l,(o,r)=>{let s=a>=r&&a<=r+o.nodeSize,l=!o.isLeaf&&(0,t.isNodeEmpty)(o);return o.type.isTextblock&&(s||!n.showOnlyCurrent)&&l&&p.push(V({editor:e,isEmptyDoc:h,dataAttribute:i,hasAnchor:s,placeholder:n.placeholder,classes:{emptyEditor:n.emptyEditorClass,emptyNode:G(n.emptyNodeClass,{editor:e,node:o,pos:r,hasAnchor:s})},node:o,pos:r})),n.includeChildren}),p}function _({editor:e,options:n,dataAttribute:i,doc:o,selection:s}){if(!(e.isEditable||!n.showOnlyWhenEditable))return null;let{anchor:l}=s,a=[],p=e.isEmpty;if(n.showOnlyCurrent&&!n.includeChildren){let r=o.resolve(l),s=r.depth>0?r.node(1):r.nodeAfter,h=r.depth>0?r.before(1):l;if(s&&s.type.isTextblock&&(0,t.isNodeEmpty)(s)){let t=l>=h&&l<=h+s.nodeSize;a.push(V({editor:e,isEmptyDoc:p,dataAttribute:i,hasAnchor:t,placeholder:n.placeholder,classes:{emptyEditor:n.emptyEditorClass,emptyNode:G(n.emptyNodeClass,{editor:e,node:s,pos:h,hasAnchor:t})},node:s,pos:h}))}}else a.push(...K({editor:e,options:n,dataAttribute:i,doc:o,selection:s,from:0,to:o.content.size}));return r.DecorationSet.create(o,a)}function F(e,t){let n=e.resolve(t);if(0===n.depth){var i;let e=null!=(i=n.nodeAfter)?i:n.nodeBefore;if(!e)return{from:t,to:t};let o=n.nodeAfter?t:t-e.nodeSize;return{from:o,to:o+e.nodeSize}}let o=n.before(1);return{from:o,to:o+n.node(1).nodeSize}}function H(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}let U=t.Extension.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:B,placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[function({editor:e,options:i}){let o=i.dataAttribute?`data-${i.dataAttribute.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}`:`data-${B}`,s=i.showOnlyCurrent&&!i.includeChildren;return new n.Plugin({key:L,...s?{}:{state:function({editor:e,options:n,dataAttribute:i}){return{init(t,o){let s=_({editor:e,options:n,dataAttribute:i,doc:o.doc,selection:o.selection});return null!=s?s:r.DecorationSet.empty},apply:(o,r,s,l)=>o.docChanged||o.selectionSet?function({decorations:e,ranges:t,editor:n,options:i,dataAttribute:o,doc:r,selection:s}){let l=e;for(let e of t){let{from:t,to:a}=function(e,t,n){let i=Math.max(0,Math.min(e,n.content.size));return{from:i,to:Math.max(i,Math.min(t,n.content.size))}}(e.from,e.to,r),p=l.find(t,a).filter(e=>e.from>=t&&e.to<=a);p.length&&(l=l.remove(p));let h=K({editor:n,options:i,dataAttribute:o,doc:r,selection:s,from:t,to:a});h.length&&(l=l.add(r,h))}return l}({decorations:r.map(o.mapping,o.doc),ranges:function(e,n,i){let o=[];if(e.docChanged)for(let n of(0,t.getChangedRanges)(e))o.push(...function(e,t){var n,i;let o,r=(n=t.from,i=t.to,o=[],e.forEach((e,t)=>{let r=t+e.nodeSize,s=r+1;t+1<i&&s>n&&o.push({from:t,to:r})}),o);return r.push(H(e,F(e,t.from))),t.to>t.from?r.push(H(e,F(e,Math.min(t.to,e.content.size+1)-1))):t.from<e.content.size+1&&r.push(H(e,F(e,Math.min(t.from+1,e.content.size)))),r}(i.doc,n.newRange));return e.selectionSet&&(o.push(H(i.doc,F(i.doc,e.mapping.map(n.selection.anchor)))),o.push(H(i.doc,F(i.doc,i.selection.anchor)))),function(e){if(0===e.length)return[];let t=[...e].sort((e,t)=>e.from-t.from),n=[{...t[0]}];for(let e=1;e<t.length;e+=1){let i=n[n.length-1],o=t[e];o.from<=i.to?i.to=Math.max(i.to,o.to):n.push({...o})}return n}(o)}(o,s,l),editor:e,options:n,dataAttribute:i,doc:l.doc,selection:l.selection}):r}}({editor:e,options:i,dataAttribute:o})},props:{decorations:s?({doc:t,selection:n})=>_({editor:e,options:i,dataAttribute:o,doc:t,selection:n}):t=>{var n;return i.showOnlyWhenEditable&&!e.isEditable?r.DecorationSet.empty:null!=(n=L.getState(t))?n:r.DecorationSet.empty}}})}({editor:this.editor,options:this.options})]}});function j(e,n){return!e.selection.empty&&!(0,t.isNodeSelection)(e.selection)&&n.isEditable}function W({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(null==t?void 0:t.type)===e}t.Extension.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new n.Plugin({key:new n.PluginKey("selection"),props:{decorations:n=>!j(n,e)||e.isFocused||e.view.dragging?null:r.DecorationSet.create(n.doc,[r.Decoration.inline(n.selection.from,n.selection.to,{class:t.className})]),handleDOMEvents:{blur(t){var n;return!!j(t.state,e)&&(null==(n=window.getSelection())||n.removeAllRanges(),!1)},focus:t=>!!j(t.state,e)&&(requestAnimationFrame(()=>
1{!e.isDestroyed&&t.hasFocus()&&t.focus()}),!1)}}})]}});let q=t.Extension.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;let t=new n.PluginKey(this.name),i=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",o=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(i).includes(e.name));return[new n.Plugin({key:t,appendTransaction:(e,n,o)=>{let{doc:r,tr:s,schema:l}=o,a=t.getState(o),p=r.content.size,h=l.nodes[i];if(!e.some(e=>e.getMeta("skipTrailingNode"))&&a)return s.insert(p,h.create())},state:{init:(e,t)=>!W({node:t.tr.doc.lastChild,types:o}),apply:(e,t)=>!e.docChanged||e.getMeta("__uniqueIDTransaction")?t:!W({node:e.doc.lastChild,types:o})}})]}}),$=t.Extension.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>z(e,t),redo:()=>({state:e,dispatch:t})=>D(e,t)}),addProseMirrorPlugins(){return[function(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new n.Plugin({key:O,state:{init:()=>new b(C.empty,C.empty,null,0,-1),apply:(t,n,i)=>(function(e,t,n,i){let o=n.getMeta(O),r;if(o)return o.historyState;n.getMeta(A)&&(e=new b(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(O))if(s.getMeta(O).redo)return new b(e.done.addTransform(n,void 0,i,k(t)),e.undone,S(n.mapping.maps),e.prevTime,e.prevComposition);else return new b(e.done,e.undone.addTransform(n,void 0,i,k(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))if(r=n.getMeta("rebased"))return new b(e.done.rebased(n,r),e.undone.rebased(n,r),x(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new b(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),x(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let o=n.getMeta("composition"),r=0==e.prevTime||!s&&e.prevComposition!=o&&(e.prevTime<(n.time||0)-i.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,i)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&i>=t[o]&&(n=!0)}),n}(n,e.prevRanges)),l=s?x(e.prevRanges,n.mapping):S(n.mapping.maps);return new b(e.done.addTransform(n,r?t.selection.getBookmark():void 0,i,k(t)),C.empty,l,n.time,null==o?e.prevComposition:o)}})(n,i,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i="historyUndo"==n?z:"historyRedo"==n?D:null;return!!i&&!!e.editable&&(t.preventDefault(),i(e.state,e.dispatch))}}}})}(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()}}});e.s(["Dropcursor",0,R,"Gapcursor",0,N,"Placeholder",0,U,"TrailingNode",0,q,"UndoRedo",0,$],231082)},396145,e=>{"use strict";var t=e.i(33882),n=e.i(533306),i=e.i(268354),o=e.i(325668),r=e.i(956372),s=e.i(347539),l=e.i(96899),a=e.i(498724),p=e.i(123791),h=e.i(636965),d=e.i(583579),u=e.i(425060),c=e.i(778259),f=e.i(943176),m=e.i(579346),g=e.i(427279),v=e.i(231082);let y=t.Extension.create({name:"starterKit",addExtensions(){var e,t,y,w;let C=[];return!1!==this.options.bold&&C.push(i.Bold.configure(this.options.bold)),!1!==this.options.blockquote&&C.push(n.Blockquote.configure(this.options.blockquote)),!1!==this.options.bulletList&&C.push(u.BulletList.configure(this.options.bulletList)),!1!==this.options.code&&C.push(o.Code.configure(this.options.code)),!1!==this.options.codeBlock&&C.push(r.CodeBlock.configure(this.options.codeBlock)),!1!==this.options.document&&C.push(s.Document.configure(this.options.document)),!1!==this.options.dropcursor&&C.push(v.Dropcursor.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&C.push(v.Gapcursor.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&C.push(l.HardBreak.configure(this.options.hardBreak)),!1!==this.options.heading&&C.push(a.Heading.configure(this.options.heading)),!1!==this.options.undoRedo&&C.push(v.UndoRedo.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&C.push(p.HorizontalRule.configure(this.options.horizontalRule)),!1!==this.options.italic&&C.push(h.Italic.configure(this.options.italic)),!1!==this.options.listItem&&C.push(u.ListItem.configure(this.options.listItem)),!1!==this.options.listKeymap&&C.push(u.ListKeymap.configure(null==(e=this.options)?void 0:e.listKeymap)),!1!==this.options.link&&C.push(d.Link.configure(null==(t=this.options)?void 0:t.link)),!1!==this.options.orderedList&&C.push(u.OrderedList.configure(this.options.orderedList)),!1!==this.options.paragraph&&C.push(c.Paragraph.configure(this.options.paragraph)),!1!==this.options.strike&&C.push(f.Strike.configure(this.options.strike)),!1!==this.options.text&&C.push(m.Text.configure(this.options.text)),!1!==this.options.underline&&C.push(g.Underline.configure(null==(y=this.options)?void 0:y.underline)),!1!==this.options.trailingNode&&C.push(v.TrailingNode.configure(null==(w=this.options)?void 0:w.trailingNode)),C}});e.s(["default",0,y])},697143,826372,e=>{"use strict";var t=e.i(174975);e.s(["Bold",()=>t.default],697143);var n=e.i(272867);e.s(["Italic",()=>n.default],826372)},330912,e=>{"use strict";var t=e.i(551622);e.s(["List",()=>t.default])},236269,e=>{"use strict";var t=e.i(521615);e.s(["Underline",()=>t.default])}]);
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.