"use strict";(self["webpackChunkmiriamgemeinde"]=self["webpackChunkmiriamgemeinde"]||[]).push([[93],{116:function(t,e,n){var r=n(6518),o=n(9565),s=n(2652),i=n(9306),l=n(8551),a=n(1767),p=n(9539),c=n(4549),u=c("find",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{find:function(t){l(this);try{i(t)}catch(r){p(this,"throw",r)}if(u)return o(u,this,t);var e=a(this),n=0;return s(e,function(e,r){if(t(e,n++))return r(e)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},513:function(t,e,n){n.d(e,{A:function(){return y}});var r=n(641),o=n(33);const s={key:0,class:"dialog-overlay"},i={class:"dialog-content"},l={class:"images-container"},a=["onClick"],p=["src"],c=["title"],u={key:1},d={class:"button-container"};function h(t,e,n,h,f,m){return(0,r.uX)(),(0,r.CE)("div",null,[h.isOpen?((0,r.uX)(),(0,r.CE)("div",s,[(0,r.Lk)("div",i,[e[2]||(e[2]=(0,r.Lk)("h3",null,"Bild auswählen",-1)),(0,r.Lk)("div",l,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(h.images,t=>((0,r.uX)(),(0,r.CE)("div",{key:t.id,class:(0,o.C4)(["image-block",{selected:t.id===h.selectedImage?.id}]),onClick:e=>h.selectImage(t)},[(0,r.Lk)("img",{src:"/images/uploads/"+t.filename},null,8,p),t.description?((0,r.uX)(),(0,r.CE)("span",{key:0,title:t.description},(0,o.v_)(t.title),9,c)):((0,r.uX)(),(0,r.CE)("span",u,(0,o.v_)(t.title),1))],10,a))),128))]),(0,r.Lk)("div",d,[(0,r.Lk)("button",{onClick:e[0]||(e[0]=(...t)=>h.confirmAddImageConfiguration&&h.confirmAddImageConfiguration(...t))},"Bestätigen"),(0,r.Lk)("button",{onClick:e[1]||(e[1]=(...t)=>h.closeAddImageDialog&&h.closeAddImageDialog(...t))},"Schließen")])])])):(0,r.Q3)("",!0)])}var f=n(953),m=n(6296),g={name:"AddImageDialog",emits:["confirm"],setup(t,{emit:e}){const n=(0,f.KR)(!1),r=(0,f.KR)([]),o=(0,f.KR)(null),s=()=>{n.value=!0,a()},i=()=>{n.value=!1},l=()=>{o.value&&e("confirm",`${o.value.id}`),i()},a=async()=>{try{const t=await m.A.get("/image");r.value=t.data}catch(t){console.error("Fehler beim Laden der Bilder:",t),r.value=[]}},p=t=>{console.log(t),o.value=t};return{isOpen:n,images:r,selectedImage:o,openAddImageDialog:s,closeAddImageDialog:i,confirmAddImageConfiguration:l,selectImage:p}}},x=n(6262);const M=(0,x.A)(g,[["render",h],["__scopeId","data-v-59dc7db8"]]);var y=M},5093:function(t,e,n){n.r(e),n.d(e,{default:function(){return ab}});var r=n(33),o=n(641),s=n(3751);const i={class:"edit-pages"},l=["value"],a={class:"toolbar"},p={class:"table-toolbar"},c={class:"additional-toolbar"},u={class:(0,r.C4)(["htmleditor"])};function d(t,e,n,d,h,f){const m=(0,o.g2)("BoldIcon"),g=(0,o.g2)("ItalicIcon"),x=(0,o.g2)("UnderlineIcon"),M=(0,o.g2)("StrikethroughIcon"),y=(0,o.g2)("TableIcon"),v=(0,o.g2)("ListIcon"),w=(0,o.g2)("NumberedListLeftIcon"),b=(0,o.g2)("StatsReportIcon"),W=(0,o.g2)("OpenInWindowIcon"),k=(0,o.g2)("DownloadIcon"),Q=(0,o.g2)("ArrowDownIcon"),C=(0,o.g2)("Table2ColumnsIcon"),S=(0,o.g2)("ArrowRightIcon"),O=(0,o.g2)("TableRowsIcon"),A=(0,o.g2)("AlignTopBoxIcon"),T=(0,o.g2)("AlignLeftBoxIcon"),E=(0,o.g2)("EditorContent"),L=(0,o.g2)("WorshipDialog"),D=(0,o.g2)("AddImageDialog"),N=(0,o.g2)("AddContactDialog"),R=(0,o.g2)("AddEventDialog"),I=(0,o.g2)("AddLinkDialog"),P=(0,o.g2)("AddDownloadDialog"),$=(0,o.g2)("AddInstitutionDialog");return(0,o.uX)(),(0,o.CE)("div",i,[e[33]||(e[33]=(0,o.Lk)("h2",null,"Webseiten bearbeiten",-1)),(0,o.Lk)("div",null,[e[32]||(e[32]=(0,o.Lk)("label",{for:"page-select"},"Wähle eine Seite:",-1)),(0,o.bo)((0,o.Lk)("select",{id:"page-select","onUpdate:modelValue":e[0]||(e[0]=t=>d.selectedPage=t),onChange:e[1]||(e[1]=(...t)=>d.loadPageContent&&d.loadPageContent(...t))},[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(d.sortedPages,t=>((0,o.uX)(),(0,o.CE)("option",{key:t.link,value:t.link},(0,r.v_)(t.name),9,l))),128))],544),[[s.u1,d.selectedPage]])]),(0,o.Lk)("div",a,[(0,o.Lk)("button",{onClick:e[2]||(e[2]=t=>d.toggleHeading(3)),class:(0,r.C4)({"is-active":d.editor&&d.editor.isActive("heading",{level:3})})},"H3",2),(0,o.Lk)("button",{onClick:e[3]||(e[3]=t=>d.toggleHeading(4)),class:(0,r.C4)({"is-active":d.editor&&d.editor.isActive("heading",{level:4})})},"H4",2),(0,o.Lk)("button",{onClick:e[4]||(e[4]=t=>d.toggleHeading(5)),class:(0,r.C4)({"is-active":d.editor&&d.editor.isActive("heading",{level:5})})},"H5",2),(0,o.Lk)("button",{onClick:e[5]||(e[5]=t=>d.toggleHeading(6)),class:(0,r.C4)({"is-active":d.editor&&d.editor.isActive("heading",{level:6})})},"H6",2),(0,o.Lk)("button",{onClick:e[6]||(e[6]=t=>d.toggleBold()),class:(0,r.C4)({"is-active":d.editor&&d.editor.isActive("bold")}),width:"24",height:"24"},[(0,o.bF)(m,{width:"24",height:"24"})],2),(0,o.Lk)("button",{onClick:e[7]||(e[7]=t=>d.toggleItalic()),class:(0,r.C4)({"is-active":d.editor&&d.editor.isActive("italic")})},[(0,o.bF)(g,{width:"24",height:"24"})],2),(0,o.Lk)("button",{onClick:e[8]||(e[8]=t=>d.toggleUnderline()),class:(0,r.C4)({"is-active":d.editor&&d.editor.isActive("underline")})},[(0,o.bF)(x,{width:"24",height:"24"})],2),(0,o.Lk)("button",{onClick:e[9]||(e[9]=t=>d.toggleStrike()),class:(0,r.C4)({"is-active":d.editor&&d.editor.isActive("strike")})},[(0,o.bF)(M,{width:"24",height:"24"})],2),(0,o.Lk)("button",{onClick:e[10]||(e[10]=t=>d.insertTable())},[(0,o.bF)(y,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[11]||(e[11]=t=>d.toggleBulletList()),class:(0,r.C4)({"is-active":d.editor&&d.editor.isActive("bulletList")})},[(0,o.bF)(v,{width:"24",height:"24"})],2),(0,o.Lk)("button",{onClick:e[12]||(e[12]=t=>d.toggleOrderedList()),class:(0,r.C4)({"is-active":d.editor&&d.editor.isActive("orderedList")})},[(0,o.bF)(w,{width:"24",height:"24"})],2),(0,o.Lk)("button",{onClick:e[13]||(e[13]=(...t)=>d.openAddImageDialog&&d.openAddImageDialog(...t))},[(0,o.bF)(b,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[14]||(e[14]=(...t)=>d.openAddLinkDialog&&d.openAddLinkDialog(...t))},[(0,o.bF)(W,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[15]||(e[15]=(...t)=>d.openAddDownloadDialog&&d.openAddDownloadDialog(...t))},[(0,o.bF)(k,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[16]||(e[16]=(...t)=>d.openColorPicker&&d.openColorPicker(...t))},"Schriftfarbe"),(0,o.Lk)("input",{type:"color",ref:"colorPicker",onInput:e[17]||(e[17]=(...t)=>d.setColor&&d.setColor(...t)),style:{display:"none"}},null,544)]),(0,o.Lk)("div",p,[(0,o.Lk)("button",{onClick:e[18]||(e[18]=e=>t.addColumnBefore())},[(0,o.bF)(Q,{width:"10",height:"10",class:"align-top"}),(0,o.bF)(C,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[19]||(e[19]=e=>t.addColumnAfter())},[(0,o.bF)(C,{width:"24",height:"24"}),(0,o.bF)(Q,{width:"10",height:"10",class:"align-top"})]),(0,o.Lk)("button",{onClick:e[20]||(e[20]=e=>t.addRowBefore())},[(0,o.bF)(S,{width:"10",height:"10",class:"align-top"}),(0,o.bF)(O,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[21]||(e[21]=e=>t.addRowAfter())},[(0,o.bF)(S,{width:"10",height:"10"}),(0,o.bF)(O,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[22]||(e[22]=e=>t.deleteColumn())},[(0,o.bF)(C,{width:"24",height:"24",class:"delete-icon"})]),(0,o.Lk)("button",{onClick:e[23]||(e[23]=e=>t.deleteRow())},[(0,o.bF)(O,{width:"24",height:"24",class:"delete-icon"})]),(0,o.Lk)("button",{onClick:e[24]||(e[24]=e=>t.toggleHeaderColumn())},[(0,o.bF)(A,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[25]||(e[25]=e=>t.toggleHeaderRow())},[(0,o.bF)(T,{width:"24",height:"24"})])]),(0,o.Lk)("div",c,[(0,o.Lk)("button",{onClick:e[26]||(e[26]=(...t)=>d.openAddEventsDialog&&d.openAddEventsDialog(...t))},"Events"),(0,o.Lk)("button",{onClick:e[27]||(e[27]=(...t)=>d.openAddContactDialog&&d.openAddContactDialog(...t))},"Kontaktpersonen"),(0,o.Lk)("button",{onClick:e[28]||(e[28]=(...t)=>d.openAddInstitutionDialog&&d.openAddInstitutionDialog(...t))},"Institutionen"),(0,o.Lk)("button",{onClick:e[29]||(e[29]=(...t)=>d.openWorshipDialog&&d.openWorshipDialog(...t))},"Gottesdienste")]),(0,o.Lk)("div",u,[(0,o.bF)(E,{editor:d.editor},null,8,["editor"])]),(0,o.Lk)("button",{onClick:e[30]||(e[30]=(...t)=>d.savePageContent&&d.savePageContent(...t))},"Speichern"),(0,o.bF)(L,{ref:"worshipDialog",onConfirm:d.insertWorshipList},null,8,["onConfirm"]),(0,o.bF)(D,{ref:"addImageDialog",onConfirm:d.insertImage},null,8,["onConfirm"]),(0,o.bF)(N,{ref:"addContactDialog",onConfirm:d.insertContact},null,8,["onConfirm"]),(0,o.bF)(R,{ref:"addEventDialog",onConfirm:d.insertEvent},null,8,["onConfirm"]),(0,o.bF)(I,{ref:"addLinkDialog",onConfirm:d.insertLink},null,8,["onConfirm"]),(0,o.bF)(P,{ref:"addDownloadDialog",onConfirm:d.insertDownload},null,8,["onConfirm"]),(0,o.bF)($,{ref:"addInstitutionDialog",onConfirm:d.insertInstitution},null,8,["onConfirm"]),(0,o.Lk)("input",{type:"color",ref:"colorPicker",onInput:e[31]||(e[31]=(...t)=>d.setColor&&d.setColor(...t)),style:{display:"none"}},null,544)])}n(4114),n(8111),n(116),n(7588),n(3110);var h=n(953),f=n(6278),m=n(6296);function g(t){this.content=t}g.prototype={constructor:g,find:function(t){for(var e=0;e>1}},g.from=function(t){if(t instanceof g)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new g(e)};var x=g;function M(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),s=e.child(r);if(o!=s){if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let t=0;o.text[t]==s.text[t];t++)n++;return n}if(o.content.size||s.content.size){let t=M(o.content,s.content,n+1);if(null!=t)return t}n+=o.nodeSize}else n+=o.nodeSize}}function y(t,e,n,r){for(let o=t.childCount,s=e.childCount;;){if(0==o||0==s)return o==s?null:{a:n,b:r};let i=t.child(--o),l=e.child(--s),a=i.nodeSize;if(i!=l){if(!i.sameMarkup(l))return{a:n,b:r};if(i.isText&&i.text!=l.text){let t=0,e=Math.min(i.text.length,l.text.length);while(tt&&!1!==n(l,r+i,o||null,s)&&l.content.size){let o=i+1;l.nodesBetween(Math.max(0,t-o),Math.min(l.content.size,e-o),n,r+o)}i=a}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let o="",s=!0;return this.nodesBetween(t,e,(i,l)=>{let a=i.isText?i.text.slice(Math.max(t,l)-l,e-l):i.isLeaf?r?"function"===typeof r?r(i):r:i.type.spec.leafText?i.type.spec.leafText(i):"":"";i.isBlock&&(i.isLeaf&&a||i.isTextblock)&&n&&(s?s=!1:o+=n),o+=a},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);ot)for(let o=0,s=0;st&&((se)&&(i=i.isText?i.cut(Math.max(0,t-s),Math.min(i.text.length,e-s)):i.cut(Math.max(0,t-s-1),Math.min(i.content.size,e-s-1))),n.push(i),r+=i.nodeSize),s=l}return new v(n,r)}cutByIndex(t,e){return t==e?v.empty:0==t&&e==this.content.length?this:new v(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new v(r,o)}addToStart(t){return new v([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new v(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;ethis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let e=0,n=0;;e++){let r=this.child(e),o=n+r.nodeSize;if(o>=t)return o==t?b(e+1,o):b(e,n);n=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return v.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new v(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return v.empty;let e,n=0;for(let r=0;rthis.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(o)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;et.type.rank-e.type.rank),e}}k.none=[];class Q extends Error{}class C{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=O(this.content,t+this.openStart,e);return n&&new C(n,this.openStart,this.openEnd)}removeBetween(t,e){return new C(S(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return C.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new C(v.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)n++;for(let o=t.lastChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.lastChild)r++;return new C(t,n,r)}}function S(t,e,n){let{index:r,offset:o}=t.findIndex(e),s=t.maybeChild(r),{index:i,offset:l}=t.findIndex(n);if(o==e||s.isText){if(l!=n&&!t.child(i).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(S(s.content,e-o-1,n-o-1)))}function O(t,e,n,r){let{index:o,offset:s}=t.findIndex(e),i=t.maybeChild(o);if(s==e||i.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=O(i.content,e-s-1,n,i);return l&&t.replaceChild(o,i.copy(l))}function A(t,e,n){if(n.openStart>t.depth)throw new Q("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Q("Inconsistent open depths");return T(t,e,n,0)}function T(t,e,n,r){let o=t.index(r),s=t.node(r);if(o==e.index(r)&&r=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function N(t,e,n,r){let o=(e||t).node(n),s=0,i=e?e.index(n):o.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(D(t.nodeAfter,r),s++));for(let l=s;lo&&L(t,e,o+1),i=r.depth>o&&L(n,r,o+1),l=[];return N(null,t,o,l),s&&i&&e.index(o)==n.index(o)?(E(s,i),D(R(s,I(t,e,n,r,o+1)),l)):(s&&D(R(s,P(t,e,o+1)),l),N(e,n,o,l),i&&D(R(i,P(n,r,o+1)),l)),N(r,null,o,l),new v(l)}function P(t,e,n){let r=[];if(N(null,t,n,r),t.depth>n){let o=L(t,e,n+1);D(R(o,P(t,e,n+1)),r)}return N(e,null,n,r),new v(r)}function $(t,e){let n=e.depth-t.openStart,r=e.node(n),o=r.copy(t.content);for(let s=n-1;s>=0;s--)o=e.node(s).copy(v.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}C.empty=new C(v.empty,0,0);class H{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return t=this.resolveDepth(t),0==t?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let o=0;o0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new F(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,o=e;for(let s=t;;){let{index:t,offset:e}=s.content.findIndex(o),i=o-e;if(n.push(s,t,r+e),!i)break;if(s=s.child(t),s.isText)break;o=i-1,r+=e+1}return new H(e,n,o)}static resolveCached(t,e){let n=V.get(t);if(n)for(let o=0;ot&&this.nodesBetween(t,e,t=>(n.isInSet(t.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),U(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=v.empty,r=0,o=n.childCount){let s=this.contentMatchAt(t).matchFragment(n,r,o),i=s&&s.matchFragment(this.content,e);if(!i||!i.validEnd)return!1;for(let l=r;lt.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(t=>t.toJSON())),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=v.fromJSON(t,e.content),o=t.nodeType(e.type).create(e.attrs,r,n);return o.type.checkAttrs(o.attrs),o}}K.prototype.text=void 0;class _ extends K{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):U(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new _(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new _(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function U(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class q{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new J(t,e);if(null==n.next)return q.empty;let r=X(n);n.next&&n.err("Unexpected trailing text");let o=it(rt(r));return lt(o,n),o}matchType(t){for(let e=0;et.createAndFill()));for(let t=0;t=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function e(n){t.push(n);for(let r=0;r{let r=n+(e.validEnd?"*":" ")+" ";for(let o=0;o"+t.indexOf(e.next[o].next);return r}).join("\n")}}q.empty=new q(!0);class J{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function X(t){let e=[];do{e.push(G(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function G(t){let e=[];do{e.push(Y(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function Y(t){let e=nt(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=tt(t,e)}return e}function Z(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function tt(t,e){let n=Z(t),r=n;return t.eat(",")&&(r="}"!=t.next?Z(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function et(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let s in n){let t=n[s];t.isInGroup(e)&&o.push(t)}return 0==o.length&&t.err("No node type or group '"+e+"' found"),o}function nt(t){if(t.eat("(")){let e=X(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=et(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}function rt(t){let e=[[]];return o(s(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let o={term:r,to:n};return e[t].push(o),o}function o(t,e){t.forEach(t=>t.to=e)}function s(t,e){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(s(n,e)),[]);if("seq"!=t.type){if("star"==t.type){let i=n();return r(e,i),o(s(t.expr,i),i),[r(i)]}if("plus"==t.type){let i=n();return o(s(t.expr,e),i),o(s(t.expr,i),i),[r(i)]}if("opt"==t.type)return[r(e)].concat(s(t.expr,e));if("range"==t.type){let i=e;for(let e=0;e{t[e].forEach(({term:e,to:n})=>{if(!e)return;let r;for(let t=0;t{r||o.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})})});let s=e[r.join(",")]=new q(r.indexOf(t.length-1)>-1);for(let t=0;t-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:pt(this.attrs,t)}create(t=null,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new K(this,this.computeAttrs(t),v.from(e),k.setFrom(n))}createChecked(t=null,e,n){return e=v.from(e),this.checkContent(e),new K(this,this.computeAttrs(t),e,k.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),e=v.from(e),e.size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),o=r&&r.fillBefore(v.empty,!0);return o?new K(this,t,e.append(o),k.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let n=0;n-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;en[t]=new dt(t,e,r));let r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}function ht(t,e,n){let r=n.split("|");return n=>{let o=null===n?"null":typeof n;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}}class ft{constructor(t,e,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?ht(t,e,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class mt{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=ut(t,r.attrs),this.excluded=null;let o=at(this.attrs);this.instance=o?new k(this,o):null}create(t=null){return!t&&this.instance?this.instance:new k(this,pt(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach((t,o)=>n[t]=new mt(t,r++,e,o)),n}removeFromSet(t){for(var e=0;e-1}}class gt{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let r in t)e[r]=t[r];e.nodes=x.from(t.nodes),e.marks=x.from(t.marks||{}),this.nodes=dt.compile(this.spec.nodes,this),this.marks=mt.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let t=this.nodes[r],e=t.spec.content||"",o=t.spec.marks;if(t.contentMatch=n[e]||(n[e]=q.parse(e,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==o?null:o?xt(this,o.split(" ")):""!=o&&t.inlineContent?null:[]}for(let r in this.marks){let t=this.marks[r],e=t.spec.excludes;t.excluded=null==e?[t]:""==e?[]:xt(this,e.split(" "))}this.nodeFromJSON=t=>K.fromJSON(this,t),this.markFromJSON=t=>k.fromJSON(this,t),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof dt))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new _(n,n.defaultAttrs,t,k.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function xt(t,e){let n=[];for(let r=0;r-1)&&n.push(i=r)}if(!i)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Mt(t){return null!=t.tag}function yt(t){return null!=t.style}class vt{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[];let n=this.matchedStyles=[];e.forEach(t=>{if(Mt(t))this.tags.push(t);else if(yt(t)){let e=/[^=]*/.exec(t.style)[0];n.indexOf(e)<0&&n.push(e),this.styles.push(t)}}),this.normalizeLists=!this.tags.some(e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)})}parse(t,e={}){let n=new At(this,e,!1);return n.addAll(t,k.none,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new At(this,e,!0);return n.addAll(t,k.none,e.from,e.to),C.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;rt.length&&(61!=s.charCodeAt(t.length)||s.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r{n(t=Lt(t)),t.mark||t.ignore||t.clearMark||(t.mark=r)})}for(let r in t.nodes){let e=t.nodes[r].spec.parseDOM;e&&e.forEach(t=>{n(t=Lt(t)),t.node||t.ignore||t.mark||(t.node=r)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new vt(t,vt.schemaRules(t)))}}const wt={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},bt={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Wt={ol:!0,ul:!0},kt=1,Qt=2,Ct=4;function St(t,e,n){return null!=e?(e?kt:0)|("full"===e?Qt:0):t&&"pre"==t.whitespace?kt|Qt:n&~Ct}class Ot{constructor(t,e,n,r,o,s){this.type=t,this.attrs=e,this.marks=n,this.solid=r,this.options=s,this.content=[],this.activeMarks=k.none,this.match=o||(s&Ct?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(v.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&kt)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=v.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(v.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!wt.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class At{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r,o=e.topNode,s=St(null,e.preserveWhitespace,0)|(n?Ct:0);r=o?new Ot(o.type,o.attrs,k.none,!0,e.topMatch||o.type.contentMatch,s):new Ot(n?null:t.schema.topNodeType,null,k.none,!0,null,s),this.nodes=[r],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,e){3==t.nodeType?this.addTextNode(t,e):1==t.nodeType&&this.addElement(t,e)}addTextNode(t,e){let n=t.nodeValue,r=this.top,o=r.options&Qt?"full":this.localPreserveWS||(r.options&kt)>0,{schema:s}=this.parser;if("full"===o||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(o)if("full"===o)n=n.replace(/\r\n?/g,"\n");else if(s.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(s.linebreakReplacement.create())){let t=n.split(/\r?\n|\r/);for(let n=0;n!r.clearMark(t)):e.concat(this.parser.schema.marks[r.mark].create(r.attrs)),!1!==r.consuming)break;n=r}}return e}addElementByRule(t,e,n,r){let o,s;if(e.node)if(s=this.parser.schema.nodes[e.node],s.isLeaf)this.insertNode(s.create(e.attrs),n,"BR"==t.nodeName)||this.leafFallback(t,n);else{let t=this.enter(s,e.attrs||null,n,e.preserveWhitespace);t&&(o=!0,n=t)}else{let t=this.parser.schema.marks[e.mark];n=n.concat(t.create(e.attrs))}let i=this.top;if(s&&s.isLeaf)this.findInside(t);else if(r)this.addElement(t,n,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(t=>this.insertNode(t,n,!1));else{let r=t;"string"==typeof e.contentElement?r=t.querySelector(e.contentElement):"function"==typeof e.contentElement?r=e.contentElement(t):e.contentElement&&(r=e.contentElement),this.findAround(t,r,!0),this.addAll(r,n),this.findAround(t,r,!1)}o&&this.sync(i)&&this.open--}addAll(t,e,n,r){let o=n||0;for(let s=n?t.childNodes[n]:t.firstChild,i=null==r?null:t.childNodes[r];s!=i;s=s.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(s,e);this.findAtPoint(t,o)}findPlace(t,e,n){let r,o;for(let s=this.open,i=0;s>=0;s--){let e=this.nodes[s],l=e.findWrapping(t);if(l&&(!r||r.length>l.length+i)&&(r=l,o=e,!l.length))break;if(e.solid){if(n)break;i+=2}}if(!r)return null;this.sync(o);for(let s=0;s!(s.type?s.type.allowsMarkType(e.type):Dt(e.type,t))||(l=e.addToSet(l),!1)),this.nodes.push(new Ot(t,e,l,r,null,i)),this.open++,n}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen))}sync(t){for(let e=this.open;e>=0;e--){if(this.nodes[e]==t)return this.open=e,!0;this.localPreserveWS&&(this.nodes[e].options|=kt)}return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),s=(t,i)=>{for(;t>=0;t--){let l=e[t];if(""==l){if(t==e.length-1||0==t)continue;for(;i>=o;i--)if(s(t-1,i))return!0;return!1}{let t=i>0||0==i&&r?this.nodes[i].type:n&&i>=o?n.node(i-o).type:null;if(!t||t.name!=l&&!t.isInGroup(l))return!1;i--}}return!0};return s(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}}function Tt(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&Wt.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}function Et(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Lt(t){let e={};for(let n in t)e[n]=t[n];return e}function Dt(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let s=[],i=t=>{s.push(t);for(let n=0;n{if(o.length||t.marks.length){let n=0,s=0;while(n=0;r--){let o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&Bt(It(n),r(t,e),null,t.attrs)}static renderSpec(t,e,n=null,r){return Bt(t,e,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Nt(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=Rt(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return Rt(t.marks)}}function Rt(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function It(t){return t.document||window.document}const Pt=new WeakMap;function $t(t){let e=Pt.get(t);return void 0===e&&Pt.set(t,e=Ht(t)),e}function Ht(t){let e=null;function n(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])e||(e=[]),e.push(t);else for(let e=0;e-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i,l=s.indexOf(" ");l>0&&(n=s.slice(0,l),s=s.slice(l+1));let a=n?t.createElementNS(n,s):t.createElement(s),p=e[1],c=1;if(p&&"object"==typeof p&&null==p.nodeType&&!Array.isArray(p)){c=2;for(let t in p)if(null!=p[t]){let e=t.indexOf(" ");e>0?a.setAttributeNS(t.slice(0,e),t.slice(e+1),p[t]):"style"==t&&a.style?a.style.cssText=p[t]:a.setAttribute(t,p[t])}}for(let u=c;uc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:e,contentDOM:s}=Bt(t,o,n,r);if(a.appendChild(e),s){if(i)throw new RangeError("Multiple content holes");i=s}}}return{dom:a,contentDOM:i}}const zt=65535,Vt=Math.pow(2,16);function Ft(t,e){return t+e*Vt}function jt(t){return t&zt}function Kt(t){return(t-(t&zt))/Vt}const _t=1,Ut=2,qt=4,Jt=8;class Xt{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(this.delInfo&Jt)>0}get deletedBefore(){return(this.delInfo&(_t|qt))>0}get deletedAfter(){return(this.delInfo&(Ut|qt))>0}get deletedAcross(){return(this.delInfo&qt)>0}}class Gt{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&Gt.empty)return Gt.empty}recover(t){let e=0,n=jt(t);if(!this.inverted)for(let r=0;rt)break;let a=this.ranges[i+o],p=this.ranges[i+s],c=l+a;if(t<=c){let o=a?t==l?-1:t==c?1:e:e,s=l+r+(o<0?0:p);if(n)return s;let u=t==(e<0?l:c)?null:Ft(i/3,t-l),d=t==l?Ut:t==c?_t:qt;return(e<0?t!=l:t!=c)&&(d|=Jt),new Xt(s,d,u)}r+=p-a}return n?t+r:new Xt(t+r,0,null)}touches(t,e){let n=0,r=jt(e),o=this.inverted?2:1,s=this.inverted?1:2;for(let i=0;it)break;let l=this.ranges[i+o],a=e+l;if(t<=a&&i==3*r)return!0;n+=this.ranges[i+s]-l}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r=0;e--){let r=t.getMirror(e);this.appendMap(t._maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new Yt;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;no&&et.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t,r),e.openStart,e.openEnd);return ee.fromReplace(t,this.from,this.to,o)}invert(){return new oe(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new re(e.pos,n.pos,this.mark)}merge(t){return t instanceof re&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new re(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new re(e.from,e.to,t.markFromJSON(e.mark))}}te.jsonID("addMark",re);class oe extends te{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new C(ne(e.content,t=>t.mark(this.mark.removeFromSet(t.marks)),t),e.openStart,e.openEnd);return ee.fromReplace(t,this.from,this.to,n)}invert(){return new re(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new oe(e.pos,n.pos,this.mark)}merge(t){return t instanceof oe&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new oe(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new oe(e.from,e.to,t.markFromJSON(e.mark))}}te.jsonID("removeMark",oe);class se extends te{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return ee.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return ee.fromReplace(t,this.pos,this.pos+1,new C(v.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;nn.pos?null:new ae(e.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ae(e.from,e.to,e.gapFrom,e.gapTo,C.fromJSON(t,e.slice),e.insert,!!e.structure)}}function pe(t,e,n){let r=t.resolve(e),o=n-e,s=r.depth;while(o>0&&s>0&&r.indexAfter(s)==r.node(s).childCount)s--,o--;if(o>0){let t=r.node(s).maybeChild(r.indexAfter(s));while(o>0){if(!t||t.isLeaf)return!0;t=t.firstChild,o--}}return!1}function ce(t,e,n,r){let o,s,i=[],l=[];t.doc.nodesBetween(e,n,(t,a,p)=>{if(!t.isInline)return;let c=t.marks;if(!r.isInSet(c)&&p.type.allowsMarkType(r.type)){let p=Math.max(a,e),u=Math.min(a+t.nodeSize,n),d=r.addToSet(c);for(let t=0;tt.step(e)),l.forEach(e=>t.step(e))}function ue(t,e,n,r){let o=[],s=0;t.doc.nodesBetween(e,n,(t,i)=>{if(!t.isInline)return;s++;let l=null;if(r instanceof mt){let e,n=t.marks;while(e=r.isInSet(n))(l||(l=[])).push(e),n=e.removeFromSet(n)}else r?r.isInSet(t.marks)&&(l=[r]):l=t.marks;if(l&&l.length){let r=Math.min(i+t.nodeSize,n);for(let t=0;tt.step(new oe(e.from,e.to,e.style)))}function de(t,e,n,r=n.contentMatch,o=!0){let s=t.doc.nodeAt(e),i=[],l=e+1;for(let a=0;a=0;a--)t.step(i[a])}function he(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function fe(t){let e=t.parent,n=e.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,o=0,s=0;;--r){let e=t.$from.node(r),i=t.$from.index(r)+o,l=t.$to.indexAfter(r)-s;if(rn;f--)m||r.index(f)>0?(m=!0,c=v.from(r.node(f).copy(c)),u++):a--;let d=v.empty,h=0;for(let f=s,m=!1;f>n;f--)m||o.after(f+1)=0;i--){if(r.size){let t=n[i].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=v.from(n[i].type.create(n[i].attrs,r))}let o=e.start,s=e.end;t.step(new ae(o,s,o,s,new C(r,0,0),n.length,!0))}function we(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(e,n)=>{let i="function"==typeof o?o(e):o;if(e.isTextblock&&!e.hasMarkup(r,i)&&ke(t.doc,t.mapping.slice(s).map(n),r)){let o=null;if(r.schema.linebreakReplacement){let t="pre"==r.whitespace,e=!!r.contentMatch.matchType(r.schema.linebreakReplacement);t&&!e?o=!1:!t&&e&&(o=!0)}!1===o&&We(t,e,n,s),de(t,t.mapping.slice(s).map(n,1),r,void 0,null===o);let l=t.mapping.slice(s),a=l.map(n,1),p=l.map(n+e.nodeSize,1);return t.step(new ae(a,p,a+1,p-1,new C(v.from(r.create(i,null,e.marks)),0,0),1,!0)),!0===o&&be(t,e,n,s),!1}})}function be(t,e,n,r){e.forEach((o,s)=>{if(o.isText){let i,l=/\r?\n|\r/g;while(i=l.exec(o.text)){let o=t.mapping.slice(r).map(n+1+s+i.index);t.replaceWith(o,o+1,e.type.schema.linebreakReplacement.create())}}})}function We(t,e,n,r){e.forEach((o,s)=>{if(o.type==o.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+s);t.replaceWith(o,o+1,e.type.schema.text("\n"))}})}function ke(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function Qe(t,e,n,r,o){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let i=n.create(r,null,o||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,i);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new ae(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new C(v.from(i),0,0),1,!0))}function Ce(t,e,n=1,r){let o=t.resolve(e),s=o.depth-n,i=r&&r[r.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let p=o.depth-1,c=n-2;p>s;p--,c--){let t=o.node(p),e=o.index(p);if(t.type.spec.isolating)return!1;let n=t.content.cutByIndex(e,t.childCount),s=r&&r[c+1];s&&(n=n.replaceChild(0,s.type.create(s.attrs)));let i=r&&r[c]||t;if(!t.canReplace(e+1,t.childCount)||!i.type.validContent(n))return!1}let l=o.indexAfter(s),a=r&&r[0];return o.node(s).canReplaceWith(l,l,a?a.type:o.node(s+1).type)}function Se(t,e,n=1,r){let o=t.doc.resolve(e),s=v.empty,i=v.empty;for(let l=o.depth,a=o.depth-n,p=n-1;l>a;l--,p--){s=v.from(o.node(l).copy(s));let t=r&&r[p];i=v.from(t?t.type.create(t.attrs,i):o.node(l).copy(i))}t.step(new le(e,e,new C(s.append(i),n,n),!0))}function Oe(t,e){let n=t.resolve(e),r=n.index();return Te(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Ae(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o0?(t=r.node(o+1),i++,s=r.node(o).maybeChild(i)):(t=r.node(o).maybeChild(i-1),s=r.node(o+1)),t&&!t.isTextblock&&Te(t,s)&&r.node(o).canReplace(i,i+1))return e;if(0==o)break;e=n<0?r.before(o):r.after(o)}}function Le(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,s=t.doc.resolve(e-n),i=s.node().type;if(o&&i.inlineContent){let t="pre"==i.whitespace,e=!!i.contentMatch.matchType(o);t&&!e?r=!1:!t&&e&&(r=!0)}let l=t.steps.length;if(!1===r){let r=t.doc.resolve(e+n);We(t,r.node(),r.before(),l)}i.inlineContent&&de(t,e+n-1,i,s.node().contentMatchAt(s.index()),null==r);let a=t.mapping.slice(l),p=a.map(e-n);if(t.step(new le(p,a.map(e+n,-1),C.empty,!0)),!0===r){let e=t.doc.resolve(p);be(t,e.node(),e.before(),t.steps.length)}return t}function De(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let o=r.depth-1;o>=0;o--){let t=r.index(o);if(r.node(o).canReplaceWith(t,t,n))return r.before(o+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let t=r.indexAfter(o);if(r.node(o).canReplaceWith(t,t,n))return r.after(o+1);if(t=0;t--){let e=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,n=r.index(t)+(e>0?1:0),i=r.node(t),l=!1;if(1==s)l=i.canReplace(n,n,o);else{let t=i.contentMatchAt(n).findWrapping(o.firstChild.type);l=t&&i.canReplaceWith(n,n,t[0])}if(l)return 0==e?r.pos:e<0?r.before(t+1):r.after(t+1)}return null}function Re(t,e,n=e,r=C.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),s=t.resolve(n);return Ie(o,s,r)?new le(e,n,r):new Pe(o,s,r).fit()}function Ie(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}te.jsonID("replaceAround",ae);class Pe{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=v.empty;for(let r=0;r<=t.depth;r++){let e=t.node(r);this.frontier.push({type:e.type,match:e.contentMatchAt(t.indexAfter(r))})}for(let r=t.depth;r>0;r--)this.placed=v.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){while(this.unplaced.size){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(t<0?this.$to:n.doc.resolve(t));if(!r)return null;let o=this.placed,s=n.depth,i=r.depth;while(s&&i&&1==o.childCount)o=o.firstChild.content,s--,i--;let l=new C(o,s,i);return t>-1?new ae(n.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||n.pos!=this.$to.pos?new le(n.pos,r.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,r=this.unplaced.openEnd;n1&&(r=0),o.type.spec.isolating&&r<=n){t=n;break}e=o.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t,r=null;n?(r=Be(this.unplaced.content,n-1).firstChild,t=r.content):t=this.unplaced.content;let o=t.firstChild;for(let s=this.depth;s>=0;s--){let t,{type:i,match:l}=this.frontier[s],a=null;if(1==e&&(o?l.matchType(o.type)||(a=l.fillBefore(v.from(o),!1)):r&&i.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:s,parent:r,inject:a};if(2==e&&o&&(t=l.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:s,parent:r,wrap:t};if(r&&l.matchType(r.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=Be(t,e);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new C(t,e+1,Math.max(n,r.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=Be(t,e);if(r.childCount<=1&&e>0){let o=t.size-e<=e+r.size;this.unplaced=new C($e(t,e-1,1),e-1,o?e-1:n)}else this.unplaced=new C($e(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:r,wrap:o}){while(this.depth>e)this.closeFrontierNode();if(o)for(let f=0;f1||0==l||t.content.size)&&(c=e,p.push(ze(t.mark(u.allowedMarks(t.marks)),1==a?l:0,a==i.childCount?d:-1)))}let h=a==i.childCount;h||(d=-1),this.placed=He(this.placed,e,v.from(p)),this.frontier[e].match=c,h&&d<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let f=0,m=i;f1&&r==this.$to.end(--n))++r;return r}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],o=e=0;n--){let{match:e,type:r}=this.frontier[n],o=Ve(t,n,r,e,!0);if(!o||o.childCount)continue t}return{depth:e,fit:s,move:o?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;while(this.depth>e.depth)this.closeFrontierNode();e.fit.childCount&&(this.placed=He(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=He(this.placed,this.depth,v.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop(),e=t.match.fillBefore(v.empty,!0);e.childCount&&(this.placed=He(this.placed,this.frontier.length,e))}}function $e(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy($e(t.firstChild.content,e-1,n)))}function He(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(He(t.lastChild.content,e-1,n)))}function Be(t,e){for(let n=0;n1&&(r=r.replaceChild(0,ze(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(v.empty,!0)))),t.copy(r)}function Ve(t,e,n,r,o){let s=t.node(e),i=o?t.indexAfter(e):t.index(e);if(i==s.childCount&&!n.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,i);return l&&!Fe(n,s.content,i)?l:null}function Fe(t,e,n){for(let r=n;r0;d--,h--){let t=o.node(d).type.spec;if(t.defining||t.definingAsContext||t.isolating)break;i.indexOf(d)>-1?l=d:o.before(d)==h&&i.splice(1,0,-d)}let a=i.indexOf(l),p=[],c=r.openStart;for(let d=r.content,h=0;;h++){let t=d.firstChild;if(p.push(t),h==r.openStart)break;d=t.content}for(let d=c-1;d>=0;d--){let t=p[d],e=je(t.type);if(e&&!t.sameMarkup(o.node(Math.abs(l)-1)))c=d;else if(e||!t.type.isTextblock)break}for(let d=r.openStart;d>=0;d--){let e=(d+c+1)%(r.openStart+1),l=p[e];if(l)for(let p=0;p=0;d--){if(t.replace(e,n,r),t.steps.length>u)break;let l=i[d];l<0||(e=o.before(l),n=s.after(l))}}function _e(t,e,n,r,o){if(er){let e=o.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(v.empty,!0))}return t}function Ue(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=De(t.doc,e,r.type);null!=o&&(e=n=o)}t.replaceRange(e,n,new C(v.from(r),0,0))}function qe(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),s=Je(r,o);for(let i=0;i0&&(n||r.node(e-1).canReplace(r.index(e-1),o.indexAfter(e-1))))return t.delete(r.before(e),o.after(e))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(e-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i&&r.start(i-1)==o.start(i-1)&&r.node(i-1).canReplace(r.index(i-1),o.index(i-1)))return t.delete(r.before(i),n);t.delete(e,n)}function Je(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let r=t.start(o);if(re.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(r==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==r-1)&&n.push(o)}return n}class Xe extends te{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return ee.fail("No node at attribute step's position");let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,null,e.marks);return ee.fromReplace(t,this.pos,this.pos+1,new C(v.from(r),0,e.isLeaf?0:1))}getMap(){return Gt.empty}invert(t){return new Xe(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Xe(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new Xe(e.pos,e.attr,e.value)}}te.jsonID("attr",Xe);class Ge extends te{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let r in t.attrs)e[r]=t.attrs[r];e[this.attr]=this.value;let n=t.type.create(e,t.content,t.marks);return ee.ok(n)}getMap(){return Gt.empty}invert(t){return new Ge(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ge(e.attr,e.value)}}te.jsonID("docAttr",Ge);let Ye=class extends Error{};Ye=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},Ye.prototype=Object.create(Error.prototype),Ye.prototype.constructor=Ye,Ye.prototype.name="TransformError";class Ze{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Yt}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new Ye(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=C.empty){let r=Re(this.doc,t,e,n);return r&&this.step(r),this}replaceWith(t,e,n){return this.replace(t,e,new C(v.from(n),0,0))}delete(t,e){return this.replace(t,e,C.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return Ke(this,t,e,n),this}replaceRangeWith(t,e,n){return Ue(this,t,e,n),this}deleteRange(t,e){return qe(this,t,e),this}lift(t,e){return me(this,t,e),this}join(t,e=1){return Le(this,t,e),this}wrap(t,e){return ve(this,t,e),this}setBlockType(t,e=t,n,r=null){return we(this,t,e,n,r),this}setNodeMarkup(t,e,n=null,r){return Qe(this,t,e,n,r),this}setNodeAttribute(t,e,n){return this.step(new Xe(t,e,n)),this}setDocAttribute(t,e){return this.step(new Ge(t,e)),this}addNodeMark(t,e){return this.step(new se(t,e)),this}removeNodeMark(t,e){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(e instanceof k)e.isInSet(n.marks)&&this.step(new ie(t,e));else{let r,o=n.marks,s=[];while(r=e.isInSet(o))s.push(new ie(t,r)),o=r.removeFromSet(o);for(let t=s.length-1;t>=0;t--)this.step(s[t])}return this}split(t,e=1,n){return Se(this,t,e,n),this}addMark(t,e,n){return ce(this,t,e,n),this}removeMark(t,e,n){return ue(this,t,e,n),this}clearIncompatible(t,e,n){return de(this,t,e,n),this}}const tn=Object.create(null);class en{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new nn(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e=0;o--){let r=e<0?dn(t.node(0),t.node(o),t.before(o+1),t.index(o),e,n):dn(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,n);if(r)return r}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new cn(t.node(0))}static atStart(t){return dn(t,t,0,0,1)||new cn(t)}static atEnd(t){return dn(t,t,t.content.size,t.childCount,-1)||new cn(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=tn[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in tn)throw new RangeError("Duplicate use of selection JSON ID "+t);return tn[t]=e,e.prototype.jsonID=t,e}getBookmark(){return sn.between(this.$anchor,this.$head).getBookmark()}}en.prototype.visible=!0;class nn{constructor(t,e){this.$from=t,this.$to=e}}let rn=!1;function on(t){rn||t.parent.inlineContent||(rn=!0,console["warn"]("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class sn extends en{constructor(t,e=t){on(t),on(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return en.near(n);let r=t.resolve(e.map(this.anchor));return new sn(r.parent.inlineContent?r:n,n)}replace(t,e=C.empty){if(super.replace(t,e),e==C.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof sn&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new ln(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new sn(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if(n&&!r||(n=r>=0?1:-1),!e.parent.inlineContent){let t=en.findFrom(e,n,!0)||en.findFrom(e,-n,!0);if(!t)return en.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r?t=e:(t=(en.findFrom(t,-n,!0)||en.findFrom(t,n,!0)).$anchor,t.pos0?0:1);o>0?i=0;i+=o){let r=e.child(i);if(r.isAtom){if(!s&&an.isSelectable(r))return an.create(t,n-(o<0?r.nodeSize:0))}else{let e=dn(t,r,n+o,o<0?r.childCount:0,o,s);if(e)return e}n+=r.nodeSize*o}return null}function hn(t,e,n){let r=t.steps.length-1;if(r{null==s&&(s=r)}),t.setSelection(en.near(t.doc.resolve(s),n))}const fn=1,mn=2,gn=4;class xn extends Ze{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=mn,this}ensureMarks(t){return k.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&mn)>0}addStep(t,e){super.addStep(t,e),this.updated=this.updated&~mn,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||k.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),!t)return this.deleteRange(e,n);let o=this.storedMarks;if(!o){let t=this.doc.resolve(e);o=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,o)),this.selection.empty||this.selection.to!=e+t.length||this.setSelection(en.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=gn,this}get scrolledIntoView(){return(this.updated&gn)>0}}function Mn(t,e){return e&&t?t.bind(e):t}class yn{constructor(t,e,n){this.name=t,this.init=Mn(e.init,n),this.apply=Mn(e.apply,n)}}const vn=[new yn("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new yn("selection",{init(t,e){return t.selection||en.atStart(e.doc)},apply(t){return t.selection}}),new yn("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new yn("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class wn{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=vn.slice(),e&&e.forEach(t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new yn(t.key,t.spec.state,t))})}}class bn{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;nt.toJSON())),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],o=r.spec.state;o&&o.toJSON&&(e[n]=o.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new wn(t.schema,t.plugins),o=new bn(r);return r.fields.forEach(r=>{if("doc"==r.name)o.doc=K.fromJSON(t.schema,e.doc);else if("selection"==r.name)o.selection=en.fromJSON(o.doc,e.selection);else if("storedMarks"==r.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let s in n){let i=n[s],l=i.spec.state;if(i.key==r.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,s))return void(o[r.name]=l.fromJSON.call(i,t,e[s],o))}o[r.name]=r.init(t,o)}}),o}}function Wn(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=Wn(o,e,{})),n[r]=o}return n}class kn{constructor(t){this.spec=t,this.props={},t.props&&Wn(t.props,this,this.props),this.key=t.key?t.key.key:Cn("plugin")}getState(t){return t[this.key]}}const Qn=Object.create(null);function Cn(t){return t in Qn?t+"$"+ ++Qn[t]:(Qn[t]=0,t+"$")}class Sn{constructor(t="key"){this.key=Cn(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const On=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},An=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let Tn=null;const En=function(t,e,n){let r=Tn||(Tn=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},Ln=function(){Tn=null},Dn=function(t,e,n,r){return n&&(Rn(t,e,n,r,-1)||Rn(t,e,n,r,1))},Nn=/^(img|br|input|textarea|hr)$/i;function Rn(t,e,n,r,o){for(var s;;){if(t==n&&e==r)return!0;if(e==(o<0?0:In(t))){let n=t.parentNode;if(!n||1!=n.nodeType||Bn(t)||Nn.test(t.nodeName)||"false"==t.contentEditable)return!1;e=On(t)+(o<0?0:1),t=n}else{if(1!=t.nodeType)return!1;{let n=t.childNodes[e+(o<0?-1:0)];if(1==n.nodeType&&"false"==n.contentEditable){if(!(null===(s=n.pmViewDesc)||void 0===s?void 0:s.ignoreForSelection))return!1;e+=o}else t=n,e=o<0?In(t):0}}}}function In(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Pn(t,e){for(;;){if(3==t.nodeType&&e)return t;if(1==t.nodeType&&e>0){if("false"==t.contentEditable)return null;t=t.childNodes[e-1],e=In(t)}else{if(!t.parentNode||Bn(t))return null;e=On(t),t=t.parentNode}}}function $n(t,e){for(;;){if(3==t.nodeType&&e2),sr=or||!!Kn&&/Mac/.test(Kn.platform),ir=!!Kn&&/Win/.test(Kn.platform),lr=/Android \d/.test(Un),ar=!!_n&&"webkitFontSmoothing"in _n.documentElement.style,pr=ar?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function cr(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function ur(t,e){return"number"==typeof t?t:t[e]}function dr(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function hr(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let i=n||t.dom;;){if(!i)break;if(1!=i.nodeType){i=An(i);continue}let t=i,n=t==s.body,l=n?cr(s):dr(t),a=0,p=0;if(e.topl.bottom-ur(r,"bottom")&&(p=e.bottom-e.top>l.bottom-l.top?e.top+ur(o,"top")-l.top:e.bottom-l.bottom+ur(o,"bottom")),e.leftl.right-ur(r,"right")&&(a=e.right-l.right+ur(o,"right")),a||p)if(n)s.defaultView.scrollBy(a,p);else{let n=t.scrollLeft,r=t.scrollTop;p&&(t.scrollTop+=p),a&&(t.scrollLeft+=a);let o=t.scrollLeft-n,s=t.scrollTop-r;e={left:e.left-o,top:e.top-s,right:e.right-o,bottom:e.bottom-s}}let c=n?"fixed":getComputedStyle(i).position;if(/^(fixed|sticky)$/.test(c))break;i="absolute"==c?i.offsetParent:An(i)}}function fr(t){let e,n,r=t.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let s=(r.left+r.right)/2,i=o+1;i=o-20){e=r,n=l.top;break}}return{refDOM:e,refTop:n,stack:mr(t.dom)}}function mr(t){let e=[],n=t.ownerDocument;for(let r=t;r;r=An(r))if(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t==n)break;return e}function gr({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;xr(n,0==r?0:r-e)}function xr(t,e){for(let n=0;n=p){a=Math.max(h.bottom,a),p=Math.min(h.top,p);let t=h.left>e.left?h.left-e.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>e.top&&!o&&h.left<=e.left&&h.right>=e.left&&(o=c,s={left:Math.max(h.left,Math.min(h.right,e.left)),top:h.top});!n&&(e.left>=h.right&&e.top>=h.top||e.left>=h.left&&e.top>=h.bottom)&&(l=u+1)}}return!n&&o&&(n=o,r=s,i=0),n&&3==n.nodeType?wr(n,r):!n||i&&1==n.nodeType?{node:t,offset:l}:vr(n,r)}function wr(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o=(n.left+n.right)/2?1:0)}}return{node:t,offset:0}}function br(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Wr(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(r,o,s)}function Qr(t,e,n,r){let o=-1;for(let s=e,i=!1;;){if(s==t.dom)break;let e,n=t.docView.nearestDesc(s,!0);if(!n)return null;if(1==n.dom.nodeType&&(n.node.isBlock&&n.parent||!n.contentDOM)&&((e=n.dom.getBoundingClientRect()).width||e.height)&&(n.node.isBlock&&n.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(n.dom.nodeName)&&(!i&&e.left>r.left||e.top>r.top?o=n.posBefore:(!i&&e.right-1?o:t.docView.posFromDOM(e,n,-1)}function Cr(t,e,n){let r=t.childNodes.length;if(r&&n.tope.top&&o++}let r;ar&&o&&1==n.nodeType&&1==(r=n.childNodes[o-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=e.top&&o--,n==t.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?i=t.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(i=Qr(t,n,o,e))}null==i&&(i=kr(t,l,e));let a=t.docView.nearestDesc(l,!0);return{pos:i,inside:a?a.posAtStart-a.border:-1}}function Or(t){return t.top=0&&o==r.nodeValue.length?(t--,s=1):n<0?t--:e++,Lr(Ar(En(r,t,e),s),s<0)}{let t=Ar(En(r,o,o),n);if(Zn&&o&&/\s/.test(r.nodeValue[o-1])&&o=0)}if(null==s&&o&&(n<0||o==In(r))){let t=r.childNodes[o-1],e=3==t.nodeType?En(t,In(t)-(i?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return Lr(Ar(e,1),!1)}if(null==s&&o=0)}function Lr(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Dr(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Nr(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function Rr(t,e,n){let r=e.selection,o="up"==n?r.$from:r.$to;return Nr(t,e,()=>{let{node:e}=t.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.contentDOM||n.dom;break}e=n.dom.parentNode}let r=Er(t,o.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=En(t,0,t.nodeValue.length).getClientRects()}for(let t=0;to.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0})}const Ir=/[\u0590-\u08ac]/;function Pr(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,s=!o,i=o==r.parent.content.size,l=t.domSelection();return l?Ir.test(r.parent.textContent)&&l.modify?Nr(t,e,()=>{let{focusNode:e,focusOffset:o,anchorNode:s,anchorOffset:i}=t.domSelectionRange(),a=l.caretBidiLevel;l.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:c,focusOffset:u}=t.domSelectionRange(),d=c&&!p.contains(1==c.nodeType?c:c.parentNode)||e==c&&o==u;try{l.collapse(s,i),e&&(e!=s||o!=i)&&l.extend&&l.extend(e,o)}catch(h){}return null!=a&&(l.caretBidiLevel=a),d}):"left"==n||"backward"==n?s:i:r.pos==r.start()||r.pos==r.end()}let $r=null,Hr=null,Br=!1;function zr(t,e,n){return $r==e&&Hr==n?Br:($r=e,Hr=n,Br="up"==n||"down"==n?Rr(t,e,n):Pr(t,e,n))}const Vr=0,Fr=1,jr=2,Kr=3;class _r{constructor(t,e,n,r){this.parent=t,this.children=e,this.dom=n,this.contentDOM=r,this.dirty=Vr,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;eOn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!1;break}if(e.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!0;break}if(e.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,r=t;r;r=r.parentNode){let o,s=this.getDesc(r);if(s&&(!e||s.node)){if(!n||!(o=s.nodeDOM)||(1==o.nodeType?o.contains(1==t.nodeType?t:t.parentNode):o==t))return s;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let n=e;n;n=n.parent)if(n==this)return e}posFromDOM(t,e,n){for(let r=t;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}return-1}descAt(t){for(let e=0,n=0;et||e instanceof Zr){r=t-o;break}o=s}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(let o;n&&!(o=this.children[n-1]).size&&o instanceof Ur&&o.side>=0;n--);if(e<=0){let t,r=!0;for(;;n--,r=!1)if(t=n?this.children[n-1]:null,!t||t.dom.parentNode==this.contentDOM)break;return t&&e&&r&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?On(t.dom)+1:0}}{let t,r=!0;for(;;n++,r=!1)if(t=n=o&&e<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,o);t=s;for(let e=i;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=On(n.dom)+1;break}t-=n.size}-1==r&&(r=0)}if(r>-1&&(l>e||i==this.children.length-1)){e=l;for(let t=i+1;tf&&se){let t=i;i=l,l=t}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(i.node,i.offset),a.removeAllRanges(),a.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,r=0;r=n:tn){let r=n+o.border,i=s-o.border;if(t>=r&&e<=i)return this.dirty=t==n||e==s?jr:Fr,void(t!=r||e!=i||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-r,e-r):o.dirty=Kr);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?Kr:jr}n=s}this.dirty=jr}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?jr:Fr;e.dirtyo?o.parent?o.parent.posBeforeChild(o):void 0:r)),!e.type.spec.raw){if(1!=s.nodeType){let t=document.createElement("span");t.appendChild(s),s=t}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=e,this.widget=e,o=this}matchesWidget(t){return this.dirty==Vr&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class qr extends _r{constructor(t,e,n,r){super(t,[],e,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class Jr extends _r{constructor(t,e,n,r,o){super(t,[],n,r),this.mark=e,this.spec=o}static create(t,e,n,r){let o=r.nodeViews[e.type.name],s=o&&o(e,r,n);return s&&s.dom||(s=Nt.renderSpec(document,e.type.spec.toDOM(e,n),null,e.attrs)),new Jr(t,e,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Kr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Kr&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),this.dirty!=Vr){let t=this.parent;while(!t.node)t=t.parent;t.dirty0&&(o=xo(o,0,t,n));for(let i=0;ii?i.parent?i.parent.posBeforeChild(i):void 0:s,n,r),p=a&&a.dom,c=a&&a.contentDOM;if(e.isText)if(p){if(3!=p.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else p=document.createTextNode(e.text);else if(!p){let t=Nt.renderSpec(document,e.type.spec.toDOM(e),null,e.attrs);({dom:p,contentDOM:c}=t)}c||e.isText||"BR"==p.nodeName||(p.hasAttribute("contenteditable")||(p.contentEditable="false"),e.type.spec.draggable&&(p.draggable=!0));let u=p;return p=lo(p,n,e),a?i=new to(t,e,n,r,p,c||null,u,a,o,s+1):e.isText?new Yr(t,e,n,r,p,u,o):new Xr(t,e,n,r,p,c||null,u,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>v.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return this.dirty==Vr&&t.eq(this.node)&&ao(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,r=e,o=t.composing?this.localCompositionInfo(t,e):null,s=o&&o.pos>-1?o:null,i=o&&o.pos<0,l=new co(this,s&&s.node,t);fo(this.node,this.innerDeco,(e,o,s)=>{e.spec.marks?l.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!s&&l.syncToMarks(o==this.node.childCount?k.none:this.node.child(o).marks,n,t),l.placeWidget(e,t,r)},(e,s,a,p)=>{let c;l.syncToMarks(e.marks,n,t),l.findNodeMatch(e,s,a,p)||i&&t.state.selection.from>r&&t.state.selection.to-1&&l.updateNodeAt(e,s,a,c,t)||l.updateNextNode(e,s,a,t,p,r)||l.addNode(e,s,a,t,r),r+=e.nodeSize}),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==jr)&&(s&&this.protectLocalComposition(t,s),eo(this.contentDOM,this.children,t),or&&mo(this.dom))}localCompositionInfo(t,e){let{from:n,to:r}=t.state.selection;if(!(t.state.selection instanceof sn)||ne+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let t=o.nodeValue,s=go(this.node.content,t,n-e,r-e);return s<0?null:{node:o,pos:s,text:t}}return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:n,text:r}){if(this.getDesc(e))return;let o=e;for(;;o=o.parentNode){if(o.parentNode==this.contentDOM)break;while(o.previousSibling)o.parentNode.removeChild(o.previousSibling);while(o.nextSibling)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new qr(this,o,e,r);t.input.compositionNodes.push(s),this.children=xo(this.children,n,n+r.length,t,s)}update(t,e,n,r){return!(this.dirty==Kr||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)}updateInner(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=Vr}updateOuterDeco(t){if(ao(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=so(this.dom,this.nodeDOM,oo(this.outerDeco,this.node,e),oo(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.nodeDOM.draggable=!0))}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Gr(t,e,n,r,o){lo(r,e,t);let s=new Xr(void 0,t,e,n,r,r,r,o,0);return s.contentDOM&&s.updateChildren(o,0),s}class Yr extends Xr{constructor(t,e,n,r,o,s,i){super(t,e,n,r,o,null,s,i,0)}parseRule(){let t=this.nodeDOM.parentNode;while(t&&t!=this.dom&&!t.pmIsDeco)t=t.parentNode;return{skip:t||!0}}update(t,e,n,r){return!(this.dirty==Kr||this.dirty!=Vr&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),this.dirty==Vr&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=Vr,!0)}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let r=this.node.cut(t,e),o=document.createTextNode(r.text);return new Yr(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(t,e){super.markDirty(t,e),this.dom==this.nodeDOM||0!=t&&e!=this.nodeDOM.nodeValue.length||(this.dirty=Kr)}get domAtom(){return!1}isText(t){return this.node.text==t}}class Zr extends _r{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Vr&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class to extends Xr{constructor(t,e,n,r,o,s,i,l,a,p){super(t,e,n,r,o,s,i,a,p),this.spec=l}update(t,e,n,r){if(this.dirty==Kr)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let o=this.spec.update(t,e,n);return o&&this.updateInner(t,e,n,r),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,r){this.spec.setSelection?this.spec.setSelection(t,e,n.root):super.setSelection(t,e,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function eo(t,e,n){let r=t.firstChild,o=!1;for(let s=0;s>1,s=Math.min(o,t.length);while(r-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=Jr.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(t,e,n,r){let o,s=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(t,e,n))s=this.top.children.indexOf(o,this.index);else for(let i=this.index,l=Math.min(this.top.children.length,i+5);i0){let l;for(;;)if(r){let t=n.children[r-1];if(!(t instanceof Jr)){l=t,r--;break}n=t,r=t.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=t.child(o-1))break;--o,s.set(l,o),i.push(l)}}return{index:o,matched:s,matches:i.reverse()}}function ho(t,e){return t.type.side-e.type.side}function fo(t,e,n,r){let o=e.locals(t),s=0;if(0==o.length){for(let n=0;ns)l.push(o[i++]);let f=s+d.nodeSize;if(d.isText){let t=f;i!t.inline):l.slice();r(d,m,e.forChild(s,d),h),s=f}}function mo(t){if("UL"==t.nodeName||"OL"==t.nodeName){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function go(t,e,n,r){for(let o=0,s=0;o=n){if(s>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let t=l=0&&t+e.length+l>=n)return l+t;if(n==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function xo(t,e,n,r,o){let s=[];for(let i=0,l=0;i=n||c<=e?s.push(a):(pn&&s.push(a.slice(n-p,a.size,r)))}return s}function Mo(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),s=o&&0==o.size,i=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let l,a,p=r.resolve(i);if(zn(n)){l=i;while(o&&!o.node)o=o.parent;let t=o.node;if(o&&t.isAtom&&an.isSelectable(t)&&o.parent&&(!t.isInline||!Hn(n.focusNode,n.focusOffset,o.dom))){let t=o.posBefore;a=new an(i==t?p:r.resolve(t))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let e=i,o=i;for(let r=0;r{n.anchorNode==r&&n.anchorOffset==o||(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{yo(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")},20))})}function Co(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r="IMG"==n.nodeName;r?e.collapse(n.parentNode,On(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Gn&&Yn<=11&&(n.disabled=!0,n.disabled=!1)}function So(t,e){if(e instanceof an){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Oo(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Oo(t)}function Oo(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Ao(t,e,n,r){return t.someProp("createSelectionBetween",r=>r(t,e,n))||sn.between(e,n,r)}function To(t){return!(t.editable&&!t.hasFocus())&&Eo(t)}function Eo(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function Lo(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Dn(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Do(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),s=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return s&&en.findFrom(s,e)}function No(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Ro(t,e,n){let r=t.state.selection;if(!(r instanceof sn)){if(r instanceof an&&r.node.isInline)return No(t,new sn(e>0?r.$to:r.$from));{let n=Do(t.state,e);return!!n&&No(t,n)}}if(n.indexOf("s")>-1){let{$head:n}=r,o=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(n.pos+o.nodeSize*(e<0?-1:1));return No(t,new sn(r.$anchor,s))}if(!r.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let n=Do(t.state,e);return!!(n&&n instanceof an)&&No(t,n)}if(!(sr&&n.indexOf("m")>-1)){let n,o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let i=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(n=t.docView.descAt(i))&&!n.contentDOM)&&(an.isSelectable(s)?No(t,new an(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):!!ar&&No(t,new sn(t.state.doc.resolve(e<0?i:i+s.nodeSize))))}}function Io(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Po(t,e){let n=t.pmViewDesc;return n&&0==n.size&&(e<0||t.nextSibling||"BR"!=t.nodeName)}function $o(t,e){return e<0?Ho(t):Bo(t)}function Ho(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,s,i=!1;for(Zn&&1==n.nodeType&&r0){if(1!=n.nodeType)break;{let t=n.childNodes[r-1];if(Po(t,-1))o=n,s=--r;else{if(3!=t.nodeType)break;n=t,r=n.nodeValue.length}}}else{if(zo(n))break;{let e=n.previousSibling;while(e&&Po(e,-1))o=n.parentNode,s=On(e),e=e.previousSibling;if(e)n=e,r=Io(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}i?jo(t,n,r):o&&jo(t,o,s)}function Bo(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,s,i=Io(n);for(;;)if(r{t.state==o&&vo(t)},50)}function Ko(t,e){let n=t.state.doc.resolve(e);if(!er&&!ir&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let n=t.coordsAtPos(e-1),o=(n.top+n.bottom)/2;if(o>r.top&&o1)return n.leftr.top&&o1)return n.left>r.left?"ltr":"rtl"}}let r=getComputedStyle(t.dom).direction;return"rtl"==r?"rtl":"ltr"}function _o(t,e,n){let r=t.state.selection;if(r instanceof sn&&!r.empty||n.indexOf("s")>-1)return!1;if(sr&&n.indexOf("m")>-1)return!1;let{$from:o,$to:s}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=Do(t.state,e);if(n&&n instanceof an)return No(t,n)}if(!o.parent.inlineContent){let n=e<0?o:s,i=r instanceof cn?en.near(n,e):en.findFrom(n,e);return!!i&&No(t,i)}return!1}function Uo(t,e){if(!(t.state.selection instanceof sn))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let r=t.state.tr;return e<0?r.delete(n.pos-s.nodeSize,n.pos):r.delete(n.pos,n.pos+s.nodeSize),t.dispatch(r),!0}return!1}function qo(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Jo(t){if(!rr||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;qo(t,n,"true"),setTimeout(()=>qo(t,n,"false"),20)}return!1}function Xo(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function Go(t,e){let n=e.keyCode,r=Xo(e);if(8==n||sr&&72==n&&"c"==r)return Uo(t,-1)||$o(t,-1);if(46==n&&!e.shiftKey||sr&&68==n&&"c"==r)return Uo(t,1)||$o(t,1);if(13==n||27==n)return!0;if(37==n||sr&&66==n&&"c"==r){let e=37==n?"ltr"==Ko(t,t.state.selection.from)?-1:1:-1;return Ro(t,e,r)||$o(t,e)}if(39==n||sr&&70==n&&"c"==r){let e=39==n?"ltr"==Ko(t,t.state.selection.from)?1:-1:1;return Ro(t,e,r)||$o(t,e)}return 38==n||sr&&80==n&&"c"==r?_o(t,-1,r)||$o(t,-1):40==n||sr&&78==n&&"c"==r?Jo(t)||_o(t,1,r)||$o(t,1):r==(sr?"m":"c")&&(66==n||73==n||89==n||90==n)}function Yo(t,e){t.someProp("transformCopied",n=>{e=n(e,t)});let n=[],{content:r,openStart:o,openEnd:s}=e;while(o>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount){o--,s--;let t=r.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),r=t.content}let i=t.someProp("clipboardSerializer")||Nt.fromSchema(t.state.schema),l=cs(),a=l.createElement("div");a.appendChild(i.serializeFragment(r,{document:l}));let p,c=a.firstChild,u=0;while(c&&1==c.nodeType&&(p=as[c.nodeName.toLowerCase()])){for(let t=p.length-1;t>=0;t--){let e=l.createElement(p[t]);while(a.firstChild)e.appendChild(a.firstChild);a.appendChild(e),u++}c=a.firstChild}c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${o} ${s}${u?` -${u}`:""} ${JSON.stringify(n)}`);let d=t.someProp("clipboardTextSerializer",n=>n(e,t))||e.content.textBetween(0,e.content.size,"\n\n");return{dom:a,text:d,slice:e}}function Zo(t,e,n,r,o){let s,i,l=o.parent.type.spec.code;if(!n&&!e)return null;let a=!!e&&(r||l||!n);if(a){if(t.someProp("transformPastedText",n=>{e=n(e,l||r,t)}),l)return i=new C(v.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0),t.someProp("transformPasted",e=>{i=e(i,t,!0)}),i;let n=t.someProp("clipboardTextParser",n=>n(e,o,r,t));if(n)i=n;else{let n=o.marks(),{schema:r}=t.state,i=Nt.fromSchema(r);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(t=>{let e=s.appendChild(document.createElement("p"));t&&e.appendChild(i.serializeNode(r.text(t,n)))})}}else t.someProp("transformPastedHTML",e=>{n=e(n,t)}),s=hs(n),ar&&fs(s);let p=s&&s.querySelector("[data-pm-slice]"),c=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let u=+c[3];u>0;u--){let t=s.firstChild;while(t&&1!=t.nodeType)t=t.nextSibling;if(!t)break;s=t}if(!i){let e=t.someProp("clipboardParser")||t.someProp("domParser")||vt.fromSchema(t.state.schema);i=e.parseSlice(s,{preserveWhitespace:!(!a&&!c),context:o,ruleFromNode(t){return"BR"!=t.nodeName||t.nextSibling||!t.parentNode||ts.test(t.parentNode.nodeName)?null:{ignore:!0}}})}if(c)i=ms(ls(i,+c[1],+c[2]),c[4]);else if(i=C.maxOpen(es(i.content,o),!0),i.openStart||i.openEnd){let t=0,e=0;for(let n=i.content.firstChild;t{i=e(i,t,a)}),i}const ts=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function es(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r,o=e.node(n),s=o.contentMatchAt(e.index(n)),i=[];if(t.forEach(t=>{if(!i)return;let e,n=s.findWrapping(t.type);if(!n)return i=null;if(e=i.length&&r.length&&rs(n,r,t,i[i.length-1],0))i[i.length-1]=e;else{i.length&&(i[i.length-1]=ss(i[i.length-1],r.length));let e=ns(t,n);i.push(e),s=s.matchType(e.type),r=n}}),i)return v.from(i)}return t}function ns(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,v.from(t));return t}function rs(t,e,n,r,o){if(o1&&(s=0),o=n&&(l=e<0?i.contentMatchAt(0).fillBefore(l,s<=o).append(l):l.append(i.contentMatchAt(i.childCount).fillBefore(v.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,i.copy(l))}function ls(t,e,n){return et})),us.createHTML(t)):t}function hs(t){let e=/^(\s*]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,r=cs().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t);if((n=o&&as[o[1].toLowerCase()])&&(t=n.map(t=>"<"+t+">").join("")+t+n.map(t=>"").reverse().join("")),r.innerHTML=ds(t),n)for(let s=0;s=0;a-=2){let t=r.nodes[n[a]];if(!t||t.hasRequiredAttrs())break;o=v.from(t.create(n[a+1],o)),s++,i++}return new C(o,s,i)}const gs={},xs={},Ms={touchstart:!0,touchmove:!0};class ys{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function vs(t){for(let e in gs){let n=gs[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=e=>{!Qs(t,e)||ks(t,e)||!t.editable&&e.type in xs||n(t,e)},Ms[e]?{passive:!0}:void 0)}rr&&t.dom.addEventListener("input",()=>null),Ws(t)}function ws(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function bs(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Ws(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>ks(t,e))})}function ks(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)})}function Qs(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function Cs(t,e){ks(t,e)||!gs[e.type]||!t.editable&&e.type in xs||gs[e.type](t,e)}function Ss(t){return{left:t.clientX,top:t.clientY}}function Os(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function As(t,e,n,r,o){if(-1==r)return!1;let s=t.state.doc.resolve(r);for(let i=s.depth+1;i>0;i--)if(t.someProp(e,e=>i>s.depth?e(t,n,s.nodeAfter,s.before(i),o,!0):e(t,n,s.node(i),s.before(i),o,!1)))return!0;return!1}function Ts(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function Es(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&an.isSelectable(r))&&(Ts(t,new an(n),"pointer"),!0)}function Ls(t,e){if(-1==e)return!1;let n,r,o=t.state.selection;o instanceof an&&(n=o.node);let s=t.state.doc.resolve(e);for(let i=s.depth+1;i>0;i--){let t=i>s.depth?s.nodeAfter:s.node(i);if(an.isSelectable(t)){r=n&&o.$from.depth>0&&i>=o.$from.depth&&s.before(o.$from.depth+1)==o.$from.pos?s.before(o.$from.depth):s.before(i);break}}return null!=r&&(Ts(t,an.create(t.state.doc,r),"pointer"),!0)}function Ds(t,e,n,r,o){return As(t,"handleClickOn",e,n,r)||t.someProp("handleClick",n=>n(t,e,r))||(o?Ls(t,n):Es(t,n))}function Ns(t,e,n,r){return As(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",n=>n(t,e,r))}function Rs(t,e,n,r){return As(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",n=>n(t,e,r))||Is(t,n,r)}function Is(t,e,n){if(0!=n.button)return!1;let r=t.state.doc;if(-1==e)return!!r.inlineContent&&(Ts(t,sn.create(r,0,r.content.size),"pointer"),!0);let o=r.resolve(e);for(let s=o.depth+1;s>0;s--){let e=s>o.depth?o.nodeAfter:o.node(s),n=o.before(s);if(e.inlineContent)Ts(t,sn.create(r,n+1,n+1+e.content.size),"pointer");else{if(!an.isSelectable(e))continue;Ts(t,an.create(r,n),"pointer")}return!0}}function Ps(t){return _s(t)}xs.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!Bs(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!lr||!er||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!or||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",e=>e(t,n))||Go(t,n)?n.preventDefault():ws(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",e=>e(t,Vn(13,"Enter"))),t.input.lastIOSEnter=0)},200)}},xs.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},xs.keypress=(t,e)=>{let n=e;if(Bs(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||sr&&n.metaKey)return;if(t.someProp("handleKeyPress",e=>e(t,n)))return void n.preventDefault();let r=t.state.selection;if(!(r instanceof sn)||!r.$from.sameParent(r.$to)){let e=String.fromCharCode(n.charCode),o=()=>t.state.tr.insertText(e).scrollIntoView();/[\r\n]/.test(e)||t.someProp("handleTextInput",n=>n(t,r.$from.pos,r.$to.pos,e,o))||t.dispatch(o()),n.preventDefault()}};const $s=sr?"metaKey":"ctrlKey";gs.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Ps(t),o=Date.now(),s="singleClick";o-t.input.lastClick.time<500&&Os(n,t.input.lastClick)&&!n[$s]&&t.input.lastClick.button==n.button&&("singleClick"==t.input.lastClick.type?s="doubleClick":"doubleClick"==t.input.lastClick.type&&(s="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:s,button:n.button};let i=t.posAtCoords(Ss(n));i&&("singleClick"==s?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Hs(t,i,n,!!r)):("doubleClick"==s?Ns:Rs)(t,i.pos,i.inside,n)?n.preventDefault():ws(t,"pointer"))};class Hs{constructor(t,e,n,r){let o,s;if(this.view=t,this.pos=e,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[$s],this.allowDefault=n.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),s=e.inside;else{let n=t.state.doc.resolve(e.pos);o=n.parent,s=n.depth?n.before():0}const i=r?null:n.target,l=i?t.docView.nearestDesc(i,!0):null;this.target=l&&1==l.nodeDOM.nodeType?l.nodeDOM:null;let{selection:a}=t.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||a instanceof an&&a.from<=s&&a.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Zn||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),ws(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>vo(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(Ss(t))),this.updateAllowDefault(t),this.allowDefault||!e?ws(this.view,"pointer"):Ds(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||rr&&this.mightDrag&&!this.mightDrag.node.isAtom||er&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(Ts(this.view,en.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):ws(this.view,"pointer")}move(t){this.updateAllowDefault(t),ws(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function Bs(t,e){return!!t.composing||!!(rr&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}gs.touchstart=t=>{t.input.lastTouch=Date.now(),Ps(t),ws(t,"pointer")},gs.touchmove=t=>{t.input.lastTouch=Date.now(),ws(t,"pointer")},gs.contextmenu=t=>Ps(t);const zs=lr?5e3:-1;function Vs(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>_s(t),e))}function Fs(t){t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Ks());while(t.input.compositionNodes.length>0)t.input.compositionNodes.pop().markParentsDirty()}function js(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Pn(e.focusNode,e.focusOffset),r=$n(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let e=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!e||!e.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let t=n.pmViewDesc;if(t&&t.isText(n.nodeValue))return r}}return n||r}function Ks(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function _s(t,e=!1){if(!(lr&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Fs(t),e||t.docView&&t.docView.dirty){let n=Mo(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):!t.markCursor&&!e||r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.updateState(t.state):t.dispatch(t.state.tr.deleteSelection()),!0}return!1}}function Us(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}xs.compositionstart=xs.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof sn&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(t=>!1===t.type.spec.inclusive)))t.markCursor=t.state.storedMarks||n.marks(),_s(t,!0),t.markCursor=null;else if(_s(t,!e.selection.empty),Zn&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelectionRange();for(let n=e.focusNode,r=e.focusOffset;n&&1==n.nodeType&&0!=r;){let e=r<0?n.lastChild:n.childNodes[r-1];if(!e)break;if(3==e.nodeType){let n=t.domSelection();n&&n.collapse(e,e.nodeValue.length);break}n=e,r=-1}}t.input.composing=!0}Vs(t,zs)},xs.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Vs(t,20))};const qs=Gn&&Yn<15||or&&pr<604;function Js(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}function Xs(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&45!=t.input.lastKeyCode;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Gs(t,r.value,null,o,e):Gs(t,r.textContent,r.innerHTML,o,e)},50)}function Gs(t,e,n,r,o){let s=Zo(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",e=>e(t,o,s||C.empty)))return!0;if(!s)return!1;let i=Js(s),l=i?t.state.tr.replaceSelectionWith(i,r):t.state.tr.replaceSelection(s);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Ys(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}gs.copy=xs.cut=(t,e)=>{let n=e,r=t.state.selection,o="cut"==n.type;if(r.empty)return;let s=qs?null:n.clipboardData,i=r.content(),{dom:l,text:a}=Yo(t,i);s?(n.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):Us(t,l),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},xs.paste=(t,e)=>{let n=e;if(t.composing&&!lr)return;let r=qs?null:n.clipboardData,o=t.input.shiftKey&&45!=t.input.lastKeyCode;r&&Gs(t,Ys(r),r.getData("text/html"),o,n)?n.preventDefault():Xs(t,n)};class Zs{constructor(t,e,n){this.slice=t,this.move=e,this.node=n}}const ti=sr?"altKey":"ctrlKey";function ei(t,e){let n=t.someProp("dragCopies",t=>!t(e));return null!=n?n:!e[ti]}gs.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o,s=t.state.selection,i=s.empty?null:t.posAtCoords(Ss(n));if(i&&i.pos>=s.from&&i.pos<=(s instanceof an?s.to-1:s.to));else if(r&&r.mightDrag)o=an.create(t.state.doc,r.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&(o=an.create(t.state.doc,e.posBefore))}let l=(o||t.state.selection).content(),{dom:a,text:p,slice:c}=Yo(t,l);(!n.dataTransfer.files.length||!er||nr>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(qs?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",qs||n.dataTransfer.setData("text/plain",p),t.dragging=new Zs(c,ei(t,n),o)},gs.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},xs.dragover=xs.dragenter=(t,e)=>e.preventDefault(),xs.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(Ss(n));if(!o)return;let s=t.state.doc.resolve(o.pos),i=r&&r.slice;i?t.someProp("transformPasted",e=>{i=e(i,t,!1)}):i=Zo(t,Ys(n.dataTransfer),qs?null:n.dataTransfer.getData("text/html"),!1,s);let l=!(!r||!ei(t,n));if(t.someProp("handleDrop",e=>e(t,n,i||C.empty,l)))return void n.preventDefault();if(!i)return;n.preventDefault();let a=i?Ne(t.state.doc,s.pos,i):s.pos;null==a&&(a=s.pos);let p=t.state.tr;if(l){let{node:t}=r;t?t.replace(p):p.deleteSelection()}let c=p.mapping.map(a),u=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,d=p.doc;if(u?p.replaceRangeWith(c,c,i.content.firstChild):p.replaceRange(c,c,i),p.doc.eq(d))return;let h=p.doc.resolve(c);if(u&&an.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))p.setSelection(new an(h));else{let e=p.mapping.map(a);p.mapping.maps[p.mapping.maps.length-1].forEach((t,n,r,o)=>e=o),p.setSelection(Ao(t,h,p.doc.resolve(e)))}t.focus(),t.dispatch(p.setMeta("uiEvent","drop"))},gs.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&vo(t)},20))},gs.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},gs.beforeinput=(t,e)=>{let n=e;if(er&&lr&&"deleteContentBackward"==n.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=e)return;if(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",e=>e(t,Vn(8,"Backspace"))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let os in xs)gs[os]=xs[os];function ni(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class ri{constructor(t,e){this.toDOM=t,this.spec=e||ai,this.side=this.spec.side||0}map(t,e,n,r){let{pos:o,deleted:s}=t.mapResult(e.from+r,this.side<0?-1:1);return s?null:new ii(o-n,o-n,this)}valid(){return!0}eq(t){return this==t||t instanceof ri&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ni(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class oi{constructor(t,e){this.attrs=t,this.spec=e||ai}map(t,e,n,r){let o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,s=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=s?null:new ii(o,s,this)}valid(t,e){return e.from=t&&(!o||o(i.spec))&&n.push(i.copy(i.from+r,i.to+r))}for(let s=0;st){let i=this.children[s]+1;this.children[s+2].findInner(t-i,e-i,n,r+i,o)}}map(t,e,n){return this==ci||0==t.maps.length?this:this.mapInner(t,e,0,0,n||ai)}mapInner(t,e,n,r,o){let s;for(let i=0;i{let i,l=s+n;if(i=mi(e,t,l)){r||(r=this.children.slice());while(os&&e.to=t){this.children[i]==t&&(n=this.children[i+2]);break}let o=t+1,s=o+e.content.size;for(let i=0;io&&t.type instanceof oi){let e=Math.max(o,t.from)-o,n=Math.min(s,t.to)-o;en.map(t,e,ai));return ui.from(n)}forChild(t,e){if(e.isLeaf)return pi.empty;let n=[];for(let r=0;rt instanceof pi)?t:t.reduce((t,e)=>t.concat(e instanceof pi?e:e.members),[]))}}forEachSet(t){for(let e=0;e{let s=o-r-(n-e);for(let i=0;ir+c-t)continue;let o=l[i]+c-t;n>=o?l[i+1]=e<=o?-2:-1:e>=c&&s&&(l[i]+=s,l[i+1]+=s)}t+=s}),c=n.maps[p].map(c,-1)}let a=!1;for(let p=0;p=r.content.size){a=!0;continue}let u=n.map(t[p+1]+s,-1),d=u-o,{index:h,offset:f}=r.content.findIndex(c),m=r.maybeChild(h);if(m&&f==c&&f+m.nodeSize==d){let r=l[p+2].mapInner(n,m,e+1,t[p]+s+1,i);r!=ci?(l[p]=c,l[p+1]=d,l[p+2]=r):(l[p+1]=-2,a=!0)}else a=!0}if(a){let a=fi(l,t,e,n,o,s,i),p=xi(a,r,0,i);e=p.local;for(let t=0;tn&&s.to{let l=mi(t,e,i+n);if(l){s=!0;let t=xi(l,e,n+i+1,r);t!=ci&&o.push(i,i+e.nodeSize,t)}});let i=hi(s?gi(t):t,-n).sort(Mi);for(let l=0;l0)e++;t.splice(e,0,n)}function wi(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=ci&&e.push(r)}),t.cursorWrapper&&e.push(pi.create(t.state.doc,[t.cursorWrapper.deco])),ui.from(e)}const bi={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Wi=Gn&&Yn<=11;class ki{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class Qi{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new ki,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length)?this.flushSoon():this.flush()}),Wi&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,bi)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;ethis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(To(this.view)){if(this.suppressingSelectionUpdates)return vo(this.view);if(Gn&&Yn<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Dn(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e,n=new Set;for(let o=t.focusNode;o;o=An(o))n.add(o);for(let o=t.anchorNode;o;o=An(o))if(n.has(o)){e=o;break}let r=e&&this.view.docView.nearestDesc(e);return r&&r.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.pendingRecords();e.length&&(this.queue=[]);let n=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&To(t)&&!this.ignoreSelectionChange(n),o=-1,s=-1,i=!1,l=[];if(t.editable)for(let p=0;p"BR"==t.nodeName);if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of e){let e=r.parentNode;!e||"LI"!=e.nodeName||n&&Ei(t,n)==e||r.remove()}}}let a=null;o<0&&r&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||r)&&(o>-1&&(t.docView.markDirty(o,s),Oi(t)),this.handleDOMChange(o,s,i,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||vo(t),this.currentSelection.set(n))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(let n=0;ns;g--){let t=o.childNodes[g-1],e=t.pmViewDesc;if("BR"==t.nodeName&&!e){i=g;break}if(!e||e.size)break}let u=t.state.doc,d=t.someProp("domParser")||vt.fromSchema(t.state.schema),h=u.resolve(l),f=null,m=d.parse(o,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:s,to:i,preserveWhitespace:"pre"!=h.parent.type.whitespace||"full",findPositions:r,ruleFromNode:Di,context:h});if(r&&null!=r[0].pos){let t=r[0].pos,e=r[1]&&r[1].pos;null==e&&(e=t),f={anchor:t+l,head:e+l}}return{doc:m,sel:f,from:l,to:a}}function Di(t){let e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(rr&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(t.parentNode.lastChild==t||rr&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Ni=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Ri(t,e,n,r,o){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let e=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,n=Mo(t,e);if(n&&!t.state.selection.eq(n)){if(er&&lr&&13===t.input.lastKeyCode&&Date.now()-100e(t,Vn(13,"Enter"))))return;let r=t.state.tr.setSelection(n);"pointer"==e?r.setMeta("pointer",!0):"key"==e&&r.scrollIntoView(),s&&r.setMeta("composition",s),t.dispatch(r)}return}let i=t.state.doc.resolve(e),l=i.sharedDepth(n);e=i.before(l+1),n=t.state.doc.resolve(n).after(l+1);let a,p,c=t.state.selection,u=Li(t,e,n),d=t.state.doc,h=d.slice(u.from,u.to);8===t.input.lastKeyCode&&Date.now()-100Date.now()-225||lr)&&o.some(t=>1==t.nodeType&&!Ni.test(t.nodeName))&&(!f||f.endA>=f.endB)&&t.someProp("handleKeyDown",e=>e(t,Vn(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(!f){if(!(r&&c instanceof sn&&!c.empty&&c.$head.sameParent(c.$anchor))||t.composing||u.sel&&u.sel.anchor!=u.sel.head){if(u.sel){let e=Ii(t,t.state.doc,u.sel);if(e&&!e.eq(t.state.selection)){let n=t.state.tr.setSelection(e);s&&n.setMeta("composition",s),t.dispatch(n)}}return}f={start:c.from,endA:c.to,endB:c.to}}t.state.selection.fromt.state.selection.from&&f.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?f.start=t.state.selection.from:f.endA=t.state.selection.to-2&&t.state.selection.to<=u.to&&(f.endB+=t.state.selection.to-f.endA,f.endA=t.state.selection.to)),Gn&&Yn<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>u.from&&"  "==u.doc.textBetween(f.start-u.from-1,f.start-u.from+1)&&(f.start--,f.endA--,f.endB--);let m=u.doc.resolveNoCache(f.start-u.from),g=u.doc.resolveNoCache(f.endB-u.from),x=d.resolve(f.start),M=m.sameParent(g)&&m.parent.inlineContent&&x.end()>=f.endA;if((or&&t.input.lastIOSEnter>Date.now()-225&&(!M||o.some(t=>"DIV"==t.nodeName||"P"==t.nodeName))||!M&&m.pose(t,Vn(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>f.start&&$i(d,f.start,f.endA,m,g)&&t.someProp("handleKeyDown",e=>e(t,Vn(8,"Backspace"))))return void(lr&&er&&t.domObserver.suppressSelectionUpdates());er&&f.endB==f.start&&(t.input.lastChromeDelete=Date.now()),lr&&!M&&m.start()!=g.start()&&0==g.parentOffset&&m.depth==g.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==f.endA&&(f.endB-=2,g=u.doc.resolveNoCache(f.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(e){return e(t,Vn(13,"Enter"))})},20));let y,v=f.start,w=f.endA,b=e=>{let n=e||t.state.tr.replace(v,w,u.doc.slice(f.start-u.from,f.endB-u.from));if(u.sel){let e=Ii(t,n.doc,u.sel);e&&!(er&&t.composing&&e.empty&&(f.start!=f.endB||t.input.lastChromeDeletevo(t),20));let e=b(t.state.tr.delete(v,w)),n=d.resolve(f.start).marksAcross(d.resolve(f.endA));n&&e.ensureMarks(n),t.dispatch(e)}else if(f.endA==f.endB&&(y=Pi(m.parent.content.cut(m.parentOffset,g.parentOffset),x.parent.content.cut(x.parentOffset,f.endA-x.start())))){let e=b(t.state.tr);"add"==y.type?e.addMark(v,w,y.mark):e.removeMark(v,w,y.mark),t.dispatch(e)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let e=m.parent.textBetween(m.parentOffset,g.parentOffset),n=()=>b(t.state.tr.insertText(e,v,w));t.someProp("handleTextInput",r=>r(t,v,w,e,n))||t.dispatch(n())}else t.dispatch(b());else t.dispatch(b())}function Ii(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Ao(t,e.resolve(n.anchor),e.resolve(n.head))}function Pi(t,e){let n,r,o,s=t.firstChild.marks,i=e.firstChild.marks,l=s,a=i;for(let c=0;ct.mark(r.addToSet(t.marks));else{if(0!=l.length||1!=a.length)return null;r=a[0],n="remove",o=t=>t.mark(r.removeFromSet(t.marks))}let p=[];for(let c=0;cn||Hi(i,!0,!1)0&&(e||t.indexAfter(r)==t.node(r).childCount))r--,o++,e=!1;if(n){let e=t.node(r).maybeChild(t.indexAfter(r));while(e&&!e.isLeaf)e=e.firstChild,o++}return o}function Bi(t,e,n,r,o){let s=t.findDiffStart(e,n);if(null==s)return null;let{a:i,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if("end"==o){let t=Math.max(0,s-Math.min(i,l));r-=i+t-s}if(i=i?s-r:0;s-=t,s&&s=l?s-r:0;s-=e,s&&s=56320&&e<=57343&&n>=55296&&n<=56319}class Vi{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ys,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(Ji),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=Ki(this),ji(this),this.nodeViews=Ui(this),this.docView=Gr(this.state.doc,Fi(this),wi(this),this.dom,this),this.domObserver=new Qi(this,(t,e,n,r)=>Ri(this,t,e,n,r)),this.domObserver.start(),vs(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Ws(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(Ji),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let n in this._props)e[n]=this._props[n];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){var n;let r=this.state,o=!1,s=!1;t.storedMarks&&this.composing&&(Fs(this),s=!0),this.state=t;let i=r.plugins!=t.plugins||this._props.plugins!=e.plugins;if(i||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let t=Ui(this);qi(t,this.nodeViews)&&(this.nodeViews=t,o=!0)}(i||e.handleDOMEvents!=this._props.handleDOMEvents)&&Ws(this),this.editable=Ki(this),ji(this);let l=wi(this),a=Fi(this),p=r.plugins==t.plugins||r.doc.eq(t.doc)?t.scrollToSelection>r.scrollToSelection?"to selection":"preserve":"reset",c=o||!this.docView.matchesNode(t.doc,a,l);!c&&t.selection.eq(r.selection)||(s=!0);let u="preserve"==p&&s&&null==this.dom.style.overflowAnchor&&fr(this);if(s){this.domObserver.stop();let e=c&&(Gn||er)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&_i(r.selection,t.selection);if(c){let n=er?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=js(this)),!o&&this.docView.update(t.doc,a,l,this)||(this.docView.updateOuterDeco(a),this.docView.destroy(),this.docView=Gr(t.doc,a,l,this.dom,this)),n&&!this.trackWrites&&(e=!0)}e||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Lo(this))?vo(this,e):(So(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!r.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,r),"reset"==p?this.dom.scrollTop=0:"to selection"==p?this.scrollToSelection():u&&gr(u)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(t&&this.dom.contains(1==t.nodeType?t:t.parentNode))if(this.someProp("handleScrollToSelection",t=>t(this)));else if(this.state.selection instanceof an){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&hr(this,e.getBoundingClientRect(),t)}else hr(this,this.coordsAtPos(this.state.selection.head,1),t);else;}destroyPluginViews(){let t;while(t=this.pluginViews.pop())t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e0&&this.state.doc.nodeAt(t);o==n.node&&(r=t)}this.dragging=new Zs(t.slice,t.move,r<0?void 0:an.create(this.state.doc,r))}someProp(t,e){let n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;for(let s=0;se.ownerDocument.getSelection()),this._root=e;return t||document}updateRoot(){this._root=null}posAtCoords(t){return Sr(this,t)}coordsAtPos(t,e=1){return Er(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return zr(this,e||this.state,t)}pasteHTML(t,e){return Gs(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return Gs(this,t,null,!0,e||new ClipboardEvent("paste"))}serializeForClipboard(t){return Yo(this,t)}destroy(){this.docView&&(bs(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],wi(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Ln())}get isDestroyed(){return null==this.docView}dispatchEvent(t){return Cs(this,t)}domSelectionRange(){let t=this.domSelection();return t?rr&&11===this.root.nodeType&&Fn(this.dom.ownerDocument)==this.dom&&Ti(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Fi(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t?e.class+=" "+n[t]:"style"==t?e.style=(e.style?e.style+";":"")+n[t]:e[t]||"contenteditable"==t||"nodeName"==t||(e[t]=String(n[t]))}),e.translate||(e.translate="no"),[ii.node(0,t.state.doc.content.size,e)]}function ji(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:ii.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Ki(t){return!t.someProp("editable",e=>!1===e(t.state))}function _i(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function Ui(t){let e=Object.create(null);function n(t){for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function qi(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function Ji(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}Vi.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};for(var Xi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Gi={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Yi="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Zi="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),tl=0;tl<10;tl++)Xi[48+tl]=Xi[96+tl]=String(tl);for(tl=1;tl<=24;tl++)Xi[tl+111]="F"+tl;for(tl=65;tl<=90;tl++)Xi[tl]=String.fromCharCode(tl+32),Gi[tl]=String.fromCharCode(tl);for(var el in Xi)Gi.hasOwnProperty(el)||(Gi[el]=Xi[el]);function nl(t){var e=Yi&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Zi&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key,n=!e&&t.key||(t.shiftKey?Gi:Xi)[t.keyCode]||t.key||"Unidentified";return"Esc"==n&&(n="Escape"),"Del"==n&&(n="Delete"),"Left"==n&&(n="ArrowLeft"),"Up"==n&&(n="ArrowUp"),"Right"==n&&(n="ArrowRight"),"Down"==n&&(n="ArrowDown"),n}const rl="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),ol="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function sl(t){let e,n,r,o,s=t.split(/-(?!$)/),i=s[s.length-1];"Space"==i&&(i=" ");for(let l=0;l!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function ul(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const dl=(t,e,n)=>{let r=ul(t,n);if(!r)return!1;let o=Ml(r);if(!o){let n=r.blockRange(),o=n&&fe(n);return null!=o&&(e&&e(t.tr.lift(n,o).scrollIntoView()),!0)}let s=o.nodeBefore;if(Il(t,o,e,-1))return!0;if(0==r.parent.content.size&&(gl(s,"end")||an.isSelectable(s)))for(let i=r.depth;;i--){let n=Re(t.doc,r.before(i),r.after(i),C.empty);if(n&&n.slice.size1)break}return!(!s.isAtom||o.depth!=r.depth-1)&&(e&&e(t.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0)},hl=(t,e,n)=>{let r=ul(t,n);if(!r)return!1;let o=Ml(r);return!!o&&ml(t,o,e)},fl=(t,e,n)=>{let r=yl(t,n);if(!r)return!1;let o=bl(r);return!!o&&ml(t,o,e)};function ml(t,e,n){let r=e.nodeBefore,o=r,s=e.pos-1;for(;!o.isTextblock;s--){if(o.type.spec.isolating)return!1;let t=o.lastChild;if(!t)return!1;o=t}let i=e.nodeAfter,l=i,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let t=l.firstChild;if(!t)return!1;l=t}let p=Re(t.doc,s,a,C.empty);if(!p||p.from!=s||p instanceof le&&p.slice.size>=a-s)return!1;if(n){let e=t.tr.step(p);e.setSelection(sn.create(e.doc,s)),n(e.scrollIntoView())}return!0}function gl(t,e,n=!1){for(let r=t;r;r="start"==e?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}const xl=(t,e,n)=>{let{$head:r,empty:o}=t.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;s=Ml(r)}let i=s&&s.nodeBefore;return!(!i||!an.isSelectable(i))&&(e&&e(t.tr.setSelection(an.create(t.doc,s.pos-i.nodeSize)).scrollIntoView()),!0)};function Ml(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function yl(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset{let r=yl(t,n);if(!r)return!1;let o=bl(r);if(!o)return!1;let s=o.nodeAfter;if(Il(t,o,e,1))return!0;if(0==r.parent.content.size&&(gl(s,"start")||an.isSelectable(s))){let n=Re(t.doc,r.before(),r.after(),C.empty);if(n&&n.slice.size{let{$head:r,empty:o}=t.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset=0;e--){let n=t.node(e);if(t.index(e)+1{let n,r=t.selection,o=r instanceof an;if(o){if(r.node.isTextblock||!Oe(t.doc,r.from))return!1;n=r.from}else if(n=Ee(t.doc,r.from,-1),null==n)return!1;if(e){let r=t.tr.join(n);o&&r.setSelection(an.create(r.doc,n-t.doc.resolve(n).nodeBefore.nodeSize)),e(r.scrollIntoView())}return!0},kl=(t,e)=>{let n,r=t.selection;if(r instanceof an){if(r.node.isTextblock||!Oe(t.doc,r.to))return!1;n=r.to}else if(n=Ee(t.doc,r.to,1),null==n)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0},Ql=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),s=o&&fe(o);return null!=s&&(e&&e(t.tr.lift(o,s).scrollIntoView()),!0)},Cl=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)};function Sl(t){for(let e=0;e{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),s=n.indexAfter(-1),i=Sl(o.contentMatchAt(s));if(!i||!o.canReplaceWith(s,s,i))return!1;if(e){let r=n.after(),o=t.tr.replaceWith(r,r,i.createAndFill());o.setSelection(en.near(o.doc.resolve(r),1)),e(o.scrollIntoView())}return!0},Al=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof cn||r.parent.inlineContent||o.parent.inlineContent)return!1;let s=Sl(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let n=(!r.parentOffset&&o.index(){let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(Ce(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&fe(r);return null!=o&&(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function El(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof an&&e.selection.node.isBlock)return!(!r.parentOffset||!Ce(e.doc,r.pos))&&(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s,i,l=[],a=!1,p=!1;for(let h=r.depth;;h--){let e=r.node(h);if(e.isBlock){a=r.end(h)==r.pos+(r.depth-h),p=r.start(h)==r.pos-(r.depth-h),i=Sl(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let e=t&&t(o.parent,a,r);l.unshift(e||(a&&i?{type:i}:null)),s=h;break}if(1==h)return!1;l.unshift(null)}let c=e.tr;(e.selection instanceof sn||e.selection instanceof cn)&&c.deleteSelection();let u=c.mapping.map(r.pos),d=Ce(c.doc,u,l.length,l);if(d||(l[0]=i?{type:i}:null,d=Ce(c.doc,u,l.length,l)),!d)return!1;if(c.split(u,l.length,l),!a&&p&&r.node(s).type!=i){let t=c.mapping.map(r.before(s)),e=c.doc.resolve(t);i&&r.node(s-1).canReplaceWith(e.index(),e.index()+1,i)&&c.setNodeMarkup(c.mapping.map(r.before(s)),i)}return n&&n(c.scrollIntoView()),!0}}const Ll=El(),Dl=(t,e)=>{let n,{$from:r,to:o}=t.selection,s=r.sharedDepth(o);return 0!=s&&(n=r.before(s),e&&e(t.tr.setSelection(an.create(t.doc,n))),!0)},Nl=(t,e)=>(e&&e(t.tr.setSelection(new cn(t.doc))),!0);function Rl(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,s=e.index();return!!(r&&o&&r.type.compatibleContent(o.type))&&(!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!(!e.parent.canReplace(s,s+1)||!o.isTextblock&&!Oe(t.doc,e.pos))&&(n&&n(t.tr.join(e.pos).scrollIntoView()),!0))}function Il(t,e,n,r){let o,s,i=e.nodeBefore,l=e.nodeAfter,a=i.type.spec.isolating||l.type.spec.isolating;if(!a&&Rl(t,e,n))return!0;let p=!a&&e.parent.canReplace(e.index(),e.index()+1);if(p&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(l.type))&&s.matchType(o[0]||l.type).validEnd){if(n){let r=e.pos+l.nodeSize,s=v.empty;for(let t=o.length-1;t>=0;t--)s=v.from(o[t].create(null,s));s=v.from(i.copy(s));let a=t.tr.step(new ae(e.pos-1,r,e.pos,r,new C(s,1,0),o.length,!0)),p=a.doc.resolve(r+2*o.length);p.nodeAfter&&p.nodeAfter.type==i.type&&Oe(a.doc,p.pos)&&a.join(p.pos),n(a.scrollIntoView())}return!0}let c=l.type.spec.isolating||r>0&&a?null:en.findFrom(e,1),u=c&&c.$from.blockRange(c.$to),d=u&&fe(u);if(null!=d&&d>=e.depth)return n&&n(t.tr.lift(u,d).scrollIntoView()),!0;if(p&&gl(l,"start",!0)&&gl(i,"end")){let r=i,o=[];for(;;){if(o.push(r),r.isTextblock)break;r=r.lastChild}let s=l,a=1;for(;!s.isTextblock;s=s.firstChild)a++;if(r.canReplace(r.childCount,r.childCount,s.content)){if(n){let r=v.empty;for(let t=o.length-1;t>=0;t--)r=v.from(o[t].copy(r));let s=t.tr.step(new ae(e.pos-o.length,e.pos+l.nodeSize,e.pos+a,e.pos+l.nodeSize-a,new C(r,o.length,0),0,!0));n(s.scrollIntoView())}return!0}}return!1}function Pl(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,s=o.depth;while(o.node(s).isInline){if(!s)return!1;s--}return!!o.node(s).isTextblock&&(n&&n(e.tr.setSelection(sn.create(e.doc,t<0?o.start(s):o.end(s)))),!0)}}const $l=Pl(-1),Hl=Pl(1);function Bl(t,e=null){return function(n,r){let{$from:o,$to:s}=n.selection,i=o.blockRange(s),l=i&&ge(i,t,e);return!!l&&(r&&r(n.tr.wrap(i,l).scrollIntoView()),!0)}}function zl(t,e=null){return function(n,r){let o=!1;for(let s=0;s{if(o)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)o=!0;else{let e=n.doc.resolve(s),r=e.index();o=e.parent.canReplaceWith(r,r+1,t)}})}if(!o)return!1;if(r){let o=n.tr;for(let r=0;r=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&0==e.startIndex){if(0==e.$from.index(e.depth-1))return!1;let t=i.resolve(e.start-2);s=new F(t,t,e.depth),e.endIndex=0;c--)s=v.from(n[c].type.create(n[c].attrs,s));t.step(new ae(e.start-(r?2:0),e.end,e.start,e.end,new C(s,0,0),n.length,!0));let i=0;for(let c=0;ce.childCount>0&&e.firstChild.type==t);return!!s&&(!n||(r.node(s.depth-1).type==t?Gl(e,n,t,s):Yl(e,n,s)))}}function Gl(t,e,n,r){let o=t.tr,s=r.end,i=r.$to.end(r.depth);sm;f--)h-=o.child(f).nodeSize,r.delete(h-1,h+1);let s=r.doc.resolve(n.start),i=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,a=n.endIndex==o.childCount,p=s.node(-1),c=s.index(-1);if(!p.canReplace(c+(l?0:1),c+1,i.content.append(a?v.empty:v.from(o))))return!1;let u=s.pos,d=u+i.nodeSize;return r.step(new ae(u-(l?1:0),d+(a?1:0),u+1,d-1,new C((l?v.empty:v.from(o.copy(v.empty))).append(a?v.empty:v.from(o.copy(v.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Zl(t){return function(e,n){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,e=>e.childCount>0&&e.firstChild.type==t);if(!s)return!1;let i=s.startIndex;if(0==i)return!1;let l=s.parent,a=l.child(i-1);if(a.type!=t)return!1;if(n){let r=a.lastChild&&a.lastChild.type==l.type,o=v.from(r?t.create():null),i=new C(v.from(t.create(null,v.from(l.type.create(null,o)))),r?3:1,0),p=s.start,c=s.end;n(e.tr.step(new ae(p-(r?3:1),c,p,c,i,1,!0)).scrollIntoView())}return!0}}function ta(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:s}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,s=n.storedMarks,n}}}class ea{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:o}=n,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([t,e])=>{const n=(...t)=>{const n=e(...t)(s);return o.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(o),n};return[t,n]}))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:s}=r,i=[],l=!!t,a=t||o.tr,p=()=>(l||!e||a.getMeta("preventDispatch")||this.hasCustomState||s.dispatch(a),i.every(t=>!0===t)),c={...Object.fromEntries(Object.entries(n).map(([t,n])=>{const r=(...t)=>{const r=this.buildProps(a,e),o=n(...t)(r);return i.push(o),c};return[t,r]})),run:p};return c}createCan(t){const{rawCommands:e,state:n}=this,r=!1,o=t||n.tr,s=this.buildProps(o,r),i=Object.fromEntries(Object.entries(e).map(([t,e])=>[t,(...t)=>e(...t)({...s,dispatch:void 0})]));return{...i,chain:()=>this.createChain(o,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:s}=r,i={tr:t,editor:r,view:s,state:ta({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([t,e])=>[t,(...t)=>e(...t)(i)]))}};return i}}class na{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(t=>t.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(t=>t!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}}function ra(t,e,n){if(void 0===t.config[e]&&t.parent)return ra(t.parent,e,n);if("function"===typeof t.config[e]){const r=t.config[e].bind({...n,parent:t.parent?ra(t.parent,e,n):null});return r}return t.config[e]}function oa(t){const e=t.filter(t=>"extension"===t.type),n=t.filter(t=>"node"===t.type),r=t.filter(t=>"mark"===t.type);return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function sa(t){const e=[],{nodeExtensions:n,markExtensions:r}=oa(t),o=[...n,...r],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(t=>{const n={name:t.name,options:t.options,storage:t.storage,extensions:o},r=ra(t,"addGlobalAttributes",n);if(!r)return;const i=r();i.forEach(t=>{t.types.forEach(n=>{Object.entries(t.attributes).forEach(([t,r])=>{e.push({type:n,name:t,attribute:{...s,...r}})})})})}),o.forEach(t=>{const n={name:t.name,options:t.options,storage:t.storage},r=ra(t,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach(([n,r])=>{const o={...s,...r};"function"===typeof(null===o||void 0===o?void 0:o.default)&&(o.default=o.default()),(null===o||void 0===o?void 0:o.isRequired)&&void 0===(null===o||void 0===o?void 0:o.default)&&delete o.default,e.push({type:t.name,name:n,attribute:o})})}),e}function ia(t,e){if("string"===typeof t){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function la(...t){return t.filter(t=>!!t).reduce((t,e)=>{const n={...t};return Object.entries(e).forEach(([t,e])=>{const r=n[t];if(r)if("class"===t){const r=e?String(e).split(" "):[],o=n[t]?n[t].split(" "):[],s=r.filter(t=>!o.includes(t));n[t]=[...o,...s].join(" ")}else if("style"===t){const r=e?e.split(";").map(t=>t.trim()).filter(Boolean):[],o=n[t]?n[t].split(";").map(t=>t.trim()).filter(Boolean):[],s=new Map;o.forEach(t=>{const[e,n]=t.split(":").map(t=>t.trim());s.set(e,n)}),r.forEach(t=>{const[e,n]=t.split(":").map(t=>t.trim());s.set(e,n)}),n[t]=Array.from(s.entries()).map(([t,e])=>`${t}: ${e}`).join("; ")}else n[t]=e;else n[t]=e}),n},{})}function aa(t,e){return e.filter(e=>e.type===t.type.name).filter(t=>t.attribute.rendered).map(e=>e.attribute.renderHTML?e.attribute.renderHTML(t.attrs)||{}:{[e.name]:t.attrs[e.name]}).reduce((t,e)=>la(t,e),{})}function pa(t){return"function"===typeof t}function ca(t,e=void 0,...n){return pa(t)?e?t.bind(e)(...n):t(...n):t}function ua(t={}){return 0===Object.keys(t).length&&t.constructor===Object}function da(t){return"string"!==typeof t?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):"true"===t||"false"!==t&&t}function ha(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(!1===r)return!1;const o=e.reduce((t,e)=>{const r=e.attribute.parseHTML?e.attribute.parseHTML(n):da(n.getAttribute(e.name));return null===r||void 0===r?t:{...t,[e.name]:r}},{});return{...r,...o}}}}function fa(t){return Object.fromEntries(Object.entries(t).filter(([t,e])=>("attrs"!==t||!ua(e))&&(null!==e&&void 0!==e)))}function ma(t,e){var n;const r=sa(t),{nodeExtensions:o,markExtensions:s}=oa(t),i=null===(n=o.find(t=>ra(t,"topNode")))||void 0===n?void 0:n.name,l=Object.fromEntries(o.map(n=>{const o=r.filter(t=>t.type===n.name),s={name:n.name,options:n.options,storage:n.storage,editor:e},i=t.reduce((t,e)=>{const r=ra(e,"extendNodeSchema",s);return{...t,...r?r(n):{}}},{}),l=fa({...i,content:ca(ra(n,"content",s)),marks:ca(ra(n,"marks",s)),group:ca(ra(n,"group",s)),inline:ca(ra(n,"inline",s)),atom:ca(ra(n,"atom",s)),selectable:ca(ra(n,"selectable",s)),draggable:ca(ra(n,"draggable",s)),code:ca(ra(n,"code",s)),whitespace:ca(ra(n,"whitespace",s)),linebreakReplacement:ca(ra(n,"linebreakReplacement",s)),defining:ca(ra(n,"defining",s)),isolating:ca(ra(n,"isolating",s)),attrs:Object.fromEntries(o.map(t=>{var e;return[t.name,{default:null===(e=null===t||void 0===t?void 0:t.attribute)||void 0===e?void 0:e.default}]}))}),a=ca(ra(n,"parseHTML",s));a&&(l.parseDOM=a.map(t=>ha(t,o)));const p=ra(n,"renderHTML",s);p&&(l.toDOM=t=>p({node:t,HTMLAttributes:aa(t,o)}));const c=ra(n,"renderText",s);return c&&(l.toText=c),[n.name,l]})),a=Object.fromEntries(s.map(n=>{const o=r.filter(t=>t.type===n.name),s={name:n.name,options:n.options,storage:n.storage,editor:e},i=t.reduce((t,e)=>{const r=ra(e,"extendMarkSchema",s);return{...t,...r?r(n):{}}},{}),l=fa({...i,inclusive:ca(ra(n,"inclusive",s)),excludes:ca(ra(n,"excludes",s)),group:ca(ra(n,"group",s)),spanning:ca(ra(n,"spanning",s)),code:ca(ra(n,"code",s)),attrs:Object.fromEntries(o.map(t=>{var e;return[t.name,{default:null===(e=null===t||void 0===t?void 0:t.attribute)||void 0===e?void 0:e.default}]}))}),a=ca(ra(n,"parseHTML",s));a&&(l.parseDOM=a.map(t=>ha(t,o)));const p=ra(n,"renderHTML",s);return p&&(l.toDOM=t=>p({mark:t,HTMLAttributes:aa(t,o)})),[n.name,l]}));return new gt({topNode:i,nodes:l,marks:a})}function ga(t,e){return e.nodes[t]||e.marks[t]||null}function xa(t,e){return Array.isArray(e)?e.some(e=>{const n="string"===typeof e?e:e.name;return n===t.name}):e}function Ma(t,e){const n=Nt.fromSchema(e).serializeFragment(t),r=document.implementation.createHTMLDocument(),o=r.createElement("div");return o.appendChild(n),o.innerHTML}const ya=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(t,e,o,s)=>{var i,l;const a=(null===(l=(i=t.type.spec).toText)||void 0===l?void 0:l.call(i,{node:t,pos:e,parent:o,index:s}))||t.textContent||"%leaf%";n+=t.isAtom&&!t.isText?a:a.slice(0,Math.max(0,r-e))}),n};function va(t){return"[object RegExp]"===Object.prototype.toString.call(t)}class wa{constructor(t){this.find=t.find,this.handler=t.handler}}const ba=(t,e)=>{if(va(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Wa(t){var e;const{editor:n,from:r,to:o,text:s,rules:i,plugin:l}=t,{view:a}=n;if(a.composing)return!1;const p=a.state.doc.resolve(r);if(p.parent.type.spec.code||(null===(e=p.nodeBefore||p.nodeAfter)||void 0===e?void 0:e.marks.find(t=>t.type.spec.code)))return!1;let c=!1;const u=ya(p)+s;return i.forEach(t=>{if(c)return;const e=ba(u,t.find);if(!e)return;const i=a.state.tr,p=ta({state:a.state,transaction:i}),d={from:r-(e[0].length-s.length),to:o},{commands:h,chain:f,can:m}=new ea({editor:n,state:p}),g=t.handler({state:p,range:d,match:e,commands:h,chain:f,can:m});null!==g&&i.steps.length&&(i.setMeta(l,{transform:i,from:r,to:o,text:s}),a.dispatch(i),c=!0)}),c}function ka(t){const{editor:e,rules:n}=t,r=new kn({state:{init(){return null},apply(t,o,s){const i=t.getMeta(r);if(i)return i;const l=t.getMeta("applyInputRules"),a=!!l;return a&&setTimeout(()=>{let{text:t}=l;"string"===typeof t||(t=Ma(v.from(t),s.schema));const{from:o}=l,i=o+t.length;Wa({editor:e,from:o,to:i,text:t,rules:n,plugin:r})}),t.selectionSet||t.docChanged?null:o}},props:{handleTextInput(t,o,s,i){return Wa({editor:e,from:o,to:s,text:i,rules:n,plugin:r})},handleDOMEvents:{compositionend:t=>(setTimeout(()=>{const{$cursor:o}=t.state.selection;o&&Wa({editor:e,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(t,o){if("Enter"!==o.key)return!1;const{$cursor:s}=t.state.selection;return!!s&&Wa({editor:e,from:s.pos,to:s.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}function Qa(t){return Object.prototype.toString.call(t).slice(8,-1)}function Ca(t){return"Object"===Qa(t)&&(t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype)}function Sa(t,e){const n={...t};return Ca(t)&&Ca(e)&&Object.keys(e).forEach(r=>{Ca(e[r])&&Ca(t[r])?n[r]=Sa(t[r],e[r]):n[r]=e[r]}),n}class Oa{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ca(ra(this,"addOptions",{name:this.name}))),this.storage=ca(ra(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Oa(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>Sa(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new Oa(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=ca(ra(e,"addOptions",{name:e.name})),e.storage=ca(ra(e,"addStorage",{name:e.name,options:e.options})),e}static handleExit({editor:t,mark:e}){const{tr:n}=t.state,r=t.state.selection.$from,o=r.pos===r.end();if(o){const o=r.marks(),s=!!o.find(t=>(null===t||void 0===t?void 0:t.type.name)===e.name);if(!s)return!1;const i=o.find(t=>(null===t||void 0===t?void 0:t.type.name)===e.name);return i&&n.removeStoredMark(i),n.insertText(" ",r.pos),t.view.dispatch(n),!0}return!1}}function Aa(t){return"number"===typeof t}class Ta{constructor(t){this.find=t.find,this.handler=t.handler}}const Ea=(t,e,n)=>{if(va(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(e=>{const n=[e.text];return n.index=e.index,n.input=t,n.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(e.replaceWith)),n}):[]};function La(t){const{editor:e,state:n,from:r,to:o,rule:s,pasteEvent:i,dropEvent:l}=t,{commands:a,chain:p,can:c}=new ea({editor:e,state:n}),u=[];n.doc.nodesBetween(r,o,(t,e)=>{if(!t.isTextblock||t.type.spec.code)return;const d=Math.max(r,e),h=Math.min(o,e+t.content.size),f=t.textBetween(d-e,h-e,void 0,""),m=Ea(f,s.find,i);m.forEach(t=>{if(void 0===t.index)return;const e=d+t.index+1,r=e+t[0].length,o={from:n.tr.mapping.map(e),to:n.tr.mapping.map(r)},h=s.handler({state:n,range:o,match:t,commands:a,chain:p,can:c,pasteEvent:i,dropEvent:l});u.push(h)})});const d=u.every(t=>null!==t);return d}let Da=null;const Na=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null===(e=n.clipboardData)||void 0===e||e.setData("text/html",t),n};function Ra(t){const{editor:e,rules:n}=t;let r,o=null,s=!1,i=!1,l="undefined"!==typeof ClipboardEvent?new ClipboardEvent("paste"):null;try{r="undefined"!==typeof DragEvent?new DragEvent("drop"):null}catch{r=null}const a=({state:t,from:n,to:o,rule:s,pasteEvt:i})=>{const a=t.tr,p=ta({state:t,transaction:a}),c=La({editor:e,state:p,from:Math.max(n-1,0),to:o.b-1,rule:s,pasteEvent:i,dropEvent:r});if(c&&a.steps.length){try{r="undefined"!==typeof DragEvent?new DragEvent("drop"):null}catch{r=null}return l="undefined"!==typeof ClipboardEvent?new ClipboardEvent("paste"):null,a}},p=n.map(t=>new kn({view(t){const n=n=>{var r;o=(null===(r=t.dom.parentElement)||void 0===r?void 0:r.contains(n.target))?t.dom.parentElement:null,o&&(Da=e)},r=()=>{Da&&(Da=null)};return window.addEventListener("dragstart",n),window.addEventListener("dragend",r),{destroy(){window.removeEventListener("dragstart",n),window.removeEventListener("dragend",r)}}},props:{handleDOMEvents:{drop:(t,e)=>{if(i=o===t.dom.parentElement,r=e,!i){const t=Da;(null===t||void 0===t?void 0:t.isEditable)&&setTimeout(()=>{const e=t.state.selection;e&&t.commands.deleteRange({from:e.from,to:e.to})},10)}return!1},paste:(t,e)=>{var n;const r=null===(n=e.clipboardData)||void 0===n?void 0:n.getData("text/html");return l=e,s=!!(null===r||void 0===r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(e,n,r)=>{const o=e[0],p="paste"===o.getMeta("uiEvent")&&!s,c="drop"===o.getMeta("uiEvent")&&!i,u=o.getMeta("applyPasteRules"),d=!!u;if(!p&&!c&&!d)return;if(d){let{text:e}=u;"string"===typeof e||(e=Ma(v.from(e),r.schema));const{from:n}=u,o=n+e.length,s=Na(e);return a({rule:t,state:r,from:n,to:{b:o},pasteEvt:s})}const h=n.doc.content.findDiffStart(r.doc.content),f=n.doc.content.findDiffEnd(r.doc.content);return Aa(h)&&f&&h!==f.b?a({rule:t,state:r,from:h,to:f,pasteEvt:l}):void 0}}));return p}function Ia(t){const e=t.filter((e,n)=>t.indexOf(e)!==n);return Array.from(new Set(e))}class Pa{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=Pa.resolve(t),this.schema=ma(this.extensions,e),this.setupExtensions()}static resolve(t){const e=Pa.sort(Pa.flatten(t)),n=Ia(e.map(t=>t.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(t=>`'${t}'`).join(", ")}]. This can lead to issues.`),e}static flatten(t){return t.map(t=>{const e={name:t.name,options:t.options,storage:t.storage},n=ra(t,"addExtensions",e);return n?[t,...this.flatten(n())]:t}).flat(10)}static sort(t){const e=100;return t.sort((t,n)=>{const r=ra(t,"priority")||e,o=ra(n,"priority")||e;return r>o?-1:r{const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:ga(e.name,this.schema)},r=ra(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this,e=Pa.sort([...this.extensions].reverse()),n=[],r=[],o=e.map(e=>{const o={name:e.name,options:e.options,storage:e.storage,editor:t,type:ga(e.name,this.schema)},s=[],i=ra(e,"addKeyboardShortcuts",o);let l={};if("mark"===e.type&&ra(e,"exitable",o)&&(l.ArrowRight=()=>Oa.handleExit({editor:t,mark:e})),i){const e=Object.fromEntries(Object.entries(i()).map(([e,n])=>[e,()=>n({editor:t})]));l={...l,...e}}const a=al(l);s.push(a);const p=ra(e,"addInputRules",o);xa(e,t.options.enableInputRules)&&p&&n.push(...p());const c=ra(e,"addPasteRules",o);xa(e,t.options.enablePasteRules)&&c&&r.push(...c());const u=ra(e,"addProseMirrorPlugins",o);if(u){const t=u();s.push(...t)}return s}).flat();return[ka({editor:t,rules:n}),...Ra({editor:t,rules:r}),...o]}get attributes(){return sa(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=oa(this.extensions);return Object.fromEntries(e.filter(t=>!!ra(t,"addNodeView")).map(e=>{const n=this.attributes.filter(t=>t.type===e.name),r={name:e.name,options:e.options,storage:e.storage,editor:t,type:ia(e.name,this.schema)},o=ra(e,"addNodeView",r);if(!o)return[];const s=(r,s,i,l,a)=>{const p=aa(r,n);return o()({node:r,view:s,getPos:i,decorations:l,innerDecorations:a,editor:t,extension:e,HTMLAttributes:p})};return[e.name,s]}))}setupExtensions(){this.extensions.forEach(t=>{var e;this.editor.extensionStorage[t.name]=t.storage;const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:ga(t.name,this.schema)};if("mark"===t.type){const r=null===(e=ca(ra(t,"keepOnSplit",n)))||void 0===e||e;r&&this.splittableMarks.push(t.name)}const r=ra(t,"onBeforeCreate",n),o=ra(t,"onCreate",n),s=ra(t,"onUpdate",n),i=ra(t,"onSelectionUpdate",n),l=ra(t,"onTransaction",n),a=ra(t,"onFocus",n),p=ra(t,"onBlur",n),c=ra(t,"onDestroy",n);r&&this.editor.on("beforeCreate",r),o&&this.editor.on("create",o),s&&this.editor.on("update",s),i&&this.editor.on("selectionUpdate",i),l&&this.editor.on("transaction",l),a&&this.editor.on("focus",a),p&&this.editor.on("blur",p),c&&this.editor.on("destroy",c)})}}class $a{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ca(ra(this,"addOptions",{name:this.name}))),this.storage=ca(ra(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new $a(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>Sa(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new $a({...this.config,...t});return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=ca(ra(e,"addOptions",{name:e.name})),e.storage=ca(ra(e,"addStorage",{name:e.name,options:e.options})),e}}function Ha(t,e,n){const{from:r,to:o}=e,{blockSeparator:s="\n\n",textSerializers:i={}}=n||{};let l="";return t.nodesBetween(r,o,(t,n,a,p)=>{var c;t.isBlock&&n>r&&(l+=s);const u=null===i||void 0===i?void 0:i[t.type.name];if(u)return a&&(l+=u({node:t,pos:n,parent:a,index:p,range:e})),!1;t.isText&&(l+=null===(c=null===t||void 0===t?void 0:t.text)||void 0===c?void 0:c.slice(Math.max(r,n)-n,o-n))}),l}function Ba(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,t])=>t.spec.toText).map(([t,e])=>[t,e.spec.toText]))}const za=$a.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new kn({key:new Sn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:s}=o,i=Math.min(...s.map(t=>t.$from.pos)),l=Math.max(...s.map(t=>t.$to.pos)),a=Ba(n),p={from:i,to:l};return Ha(r,p,{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),Va=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())}),!0),Fa=(t=!1)=>({commands:e})=>e.setContent("",t),ja=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return!n||(o.forEach(({$from:n,$to:r})=>{t.doc.nodesBetween(n.pos,r.pos,(t,n)=>{if(t.type.isText)return;const{doc:r,mapping:o}=e,s=r.resolve(o.map(n)),i=r.resolve(o.map(n+t.nodeSize)),l=s.blockRange(i);if(!l)return;const a=fe(l);if(t.type.isTextblock){const{defaultType:t}=s.parent.contentMatchAt(s.index());e.setNodeMarkup(l.start,t)}(a||0===a)&&e.lift(l,a)})}),!0)},Ka=t=>e=>t(e),_a=()=>({state:t,dispatch:e})=>Al(t,e),Ua=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,s=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const i=r.mapping.map(e);return r.insert(i,s.content),r.setSelection(new sn(r.doc.resolve(Math.max(i-1,0)))),!0},qa=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1){const n=o.node(s);if(n.type===r.type){if(e){const e=o.before(s),n=o.after(s);t.delete(e,n).scrollIntoView()}return!0}}return!1},Ja=t=>({tr:e,state:n,dispatch:r})=>{const o=ia(t,n.schema),s=e.selection.$anchor;for(let t=s.depth;t>0;t-=1){const n=s.node(t);if(n.type===o){if(r){const n=s.before(t),r=s.after(t);e.delete(n,r).scrollIntoView()}return!0}}return!1},Xa=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},Ga=()=>({state:t,dispatch:e})=>cl(t,e),Ya=()=>({commands:t})=>t.keyboardShortcut("Enter"),Za=()=>({state:t,dispatch:e})=>Ol(t,e);function tp(t,e,n={strict:!0}){const r=Object.keys(e);return!r.length||r.every(r=>n.strict?e[r]===t[r]:va(e[r])?e[r].test(t[r]):e[r]===t[r])}function ep(t,e,n={}){return t.find(t=>t.type===e&&tp(Object.fromEntries(Object.keys(n).map(e=>[e,t.attrs[e]])),n))}function np(t,e,n={}){return!!ep(t,e,n)}function rp(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if(o.node&&o.node.marks.some(t=>t.type===e)||(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(t=>t.type===e))return;n=n||(null===(r=o.node.marks[0])||void 0===r?void 0:r.attrs);const s=ep([...o.node.marks],e,n);if(!s)return;let i=o.index,l=t.start()+o.offset,a=i+1,p=l+o.node.nodeSize;while(i>0&&np([...t.parent.child(i-1).marks],e,n))i-=1,l-=t.parent.child(i).nodeSize;while(a({tr:n,state:r,dispatch:o})=>{const s=op(t,r.schema),{doc:i,selection:l}=n,{$from:a,from:p,to:c}=l;if(o){const t=rp(a,s,e);if(t&&t.from<=p&&t.to>=c){const e=sn.create(i,t.from,t.to);n.setSelection(e)}}return!0},ip=t=>e=>{const n="function"===typeof t?t(e):t;for(let t=0;t({editor:n,view:r,tr:o,dispatch:s})=>{e={scrollIntoView:!0,...e};const i=()=>{(up()||cp())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),(null===e||void 0===e?void 0:e.scrollIntoView)&&n.commands.scrollIntoView())})};if(r.hasFocus()&&null===t||!1===t)return!0;if(s&&null===t&&!lp(n.state.selection))return i(),!0;const l=pp(o.doc,t)||n.state.selection,a=n.state.selection.eq(l);return s&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},hp=(t,e)=>n=>t.every((t,r)=>e(t,{...n,index:r})),fp=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),mp=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):1===r.nodeType&&mp(r)}return t};function gp(t){const e=`${t}`,n=(new window.DOMParser).parseFromString(e,"text/html").body;return mp(n)}function xp(t,e,n){if(t instanceof K||t instanceof v)return t;n={slice:!0,parseOptions:{},...n};const r="object"===typeof t&&null!==t,o="string"===typeof t;if(r)try{const r=Array.isArray(t)&&t.length>0;if(r)return v.fromArray(t.map(t=>e.nodeFromJSON(t)));const o=e.nodeFromJSON(t);return n.errorOnInvalidContent&&o.check(),o}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),xp("",e,n)}if(o){if(n.errorOnInvalidContent){let r=!1,o="";const s=new gt({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:t=>(r=!0,o="string"===typeof t?t:t.outerHTML,null)}]}})});if(n.slice?vt.fromSchema(s).parseSlice(gp(t),n.parseOptions):vt.fromSchema(s).parse(gp(t),n.parseOptions),n.errorOnInvalidContent&&r)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${o}`)})}const r=vt.fromSchema(e);return n.slice?r.parseSlice(gp(t),n.parseOptions).content:r.parse(gp(t),n.parseOptions)}return xp("",e,n)}function Mp(t,e,n){const r=t.steps.length-1;if(r{0===i&&(i=r)}),t.setSelection(en.near(t.doc.resolve(i),n))}const yp=t=>!("type"in t),vp=(t,e,n)=>({tr:r,dispatch:o,editor:s})=>{var i;if(o){let o;n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};const a=t=>{s.emit("contentError",{editor:s,error:t,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},p={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{xp(e,s.schema,{parseOptions:p,errorOnInvalidContent:!0})}catch(l){a(l)}try{o=xp(e,s.schema,{parseOptions:p,errorOnInvalidContent:null!==(i=n.errorOnInvalidContent)&&void 0!==i?i:s.options.enableContentCheck})}catch(l){return a(l),!1}let{from:c,to:u}="number"===typeof t?{from:t,to:t}:{from:t.from,to:t.to},d=!0,h=!0;const f=yp(o)?o:[o];if(f.forEach(t=>{t.check(),d=!!d&&(t.isText&&0===t.marks.length),h=!!h&&t.isBlock}),c===u&&h){const{parent:t}=r.doc.resolve(c),e=t.isTextblock&&!t.type.spec.code&&!t.childCount;e&&(c-=1,u+=1)}let m;if(d){if(Array.isArray(e))m=e.map(t=>t.text||"").join("");else if(e instanceof v){let t="";e.forEach(e=>{e.text&&(t+=e.text)}),m=t}else m="object"===typeof e&&e&&e.text?e.text:e;r.insertText(m,c,u)}else m=o,r.replaceWith(c,u,m);n.updateSelection&&Mp(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:m})}return!0},wp=()=>({state:t,dispatch:e})=>Wl(t,e),bp=()=>({state:t,dispatch:e})=>kl(t,e),Wp=()=>({state:t,dispatch:e})=>dl(t,e),kp=()=>({state:t,dispatch:e})=>vl(t,e),Qp=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Ee(t.doc,t.selection.$from.pos,-1);return null!==r&&void 0!==r&&(n.join(r,2),e&&e(n),!0)}catch{return!1}},Cp=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Ee(t.doc,t.selection.$from.pos,1);return null!==r&&void 0!==r&&(n.join(r,2),e&&e(n),!0)}catch{return!1}},Sp=()=>({state:t,dispatch:e})=>hl(t,e),Op=()=>({state:t,dispatch:e})=>fl(t,e);function Ap(){return"undefined"!==typeof navigator&&/Mac/.test(navigator.platform)}function Tp(t){const e=t.split(/-(?!$)/);let n,r,o,s,i=e[e.length-1];"Space"===i&&(i=" ");for(let l=0;l({editor:e,view:n,tr:r,dispatch:o})=>{const s=Tp(t).split(/-(?!$)/),i=s.find(t=>!["Alt","Ctrl","Meta","Shift"].includes(t)),l=new KeyboardEvent("keydown",{key:"Space"===i?" ":i,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{n.someProp("handleKeyDown",t=>t(n,l))});return null===a||void 0===a||a.steps.forEach(t=>{const e=t.map(r.mapping);e&&o&&r.maybeStep(e)}),!0};function Lp(t,e,n={}){const{from:r,to:o,empty:s}=t.selection,i=e?ia(e,t.schema):null,l=[];t.doc.nodesBetween(r,o,(t,e)=>{if(t.isText)return;const n=Math.max(r,e),s=Math.min(o,e+t.nodeSize);l.push({node:t,from:n,to:s})});const a=o-r,p=l.filter(t=>!i||i.name===t.node.type.name).filter(t=>tp(t.node.attrs,n,{strict:!1}));if(s)return!!p.length;const c=p.reduce((t,e)=>t+e.to-e.from,0);return c>=a}const Dp=(t,e={})=>({state:n,dispatch:r})=>{const o=ia(t,n.schema),s=Lp(n,o,e);return!!s&&Ql(n,r)},Np=()=>({state:t,dispatch:e})=>Tl(t,e),Rp=t=>({state:e,dispatch:n})=>{const r=ia(t,e.schema);return Xl(r)(e,n)},Ip=()=>({state:t,dispatch:e})=>Cl(t,e);function Pp(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function $p(t,e){const n="string"===typeof e?[e]:e;return Object.keys(t).reduce((e,r)=>(n.includes(r)||(e[r]=t[r]),e),{})}const Hp=(t,e)=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const l=Pp("string"===typeof t?t:t.name,r.schema);return!!l&&("node"===l&&(s=ia(t,r.schema)),"mark"===l&&(i=op(t,r.schema)),o&&n.selection.ranges.forEach(t=>{r.doc.nodesBetween(t.$from.pos,t.$to.pos,(t,r)=>{s&&s===t.type&&n.setNodeMarkup(r,void 0,$p(t.attrs,e)),i&&t.marks.length&&t.marks.forEach(o=>{i===o.type&&n.addMark(r,r+t.nodeSize,i.create($p(o.attrs,e)))})})}),!0)},Bp=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),zp=()=>({tr:t,dispatch:e})=>{if(e){const e=new cn(t.doc);t.setSelection(e)}return!0},Vp=()=>({state:t,dispatch:e})=>xl(t,e),Fp=()=>({state:t,dispatch:e})=>wl(t,e),jp=()=>({state:t,dispatch:e})=>Dl(t,e),Kp=()=>({state:t,dispatch:e})=>Hl(t,e),_p=()=>({state:t,dispatch:e})=>$l(t,e);function Up(t,e,n={},r={}){return xp(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const qp=(t,e=!1,n={},r={})=>({editor:o,tr:s,dispatch:i,commands:l})=>{var a,p;const{doc:c}=s;if("full"!==n.preserveWhitespace){const l=Up(t,o.schema,n,{errorOnInvalidContent:null!==(a=r.errorOnInvalidContent)&&void 0!==a?a:o.options.enableContentCheck});return i&&s.replaceWith(0,c.content.size,l).setMeta("preventUpdate",!e),!0}return i&&s.setMeta("preventUpdate",!e),l.insertContentAt({from:0,to:c.content.size},t,{parseOptions:n,errorOnInvalidContent:null!==(p=r.errorOnInvalidContent)&&void 0!==p?p:o.options.enableContentCheck})};function Jp(t,e){const n=op(e,t.schema),{from:r,to:o,empty:s}=t.selection,i=[];s?(t.storedMarks&&i.push(...t.storedMarks),i.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,t=>{i.push(...t.marks)});const l=i.find(t=>t.type.name===n.name);return l?{...l.attrs}:{}}function Xp(t,e){const n=new Ze(t);return e.forEach(t=>{t.steps.forEach(t=>{n.step(t)})}),n}function Gp(t){for(let e=0;e{n(t)&&r.push({node:t,pos:e})}),r}function Zp(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function tc(t){return e=>Zp(e.$from,t)}function ec(t,e){const n={from:0,to:t.content.size};return Ha(t,n,e)}function nc(t,e){const n=ia(e,t.schema),{from:r,to:o}=t.selection,s=[];t.doc.nodesBetween(r,o,t=>{s.push(t)});const i=s.reverse().find(t=>t.type.name===n.name);return i?{...i.attrs}:{}}function rc(t,e){const n=Pp("string"===typeof e?e:e.name,t.schema);return"node"===n?nc(t,e):"mark"===n?Jp(t,e):{}}function oc(t,e=JSON.stringify){const n={};return t.filter(t=>{const r=e(t);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)})}function sc(t){const e=oc(t);return 1===e.length?e:e.filter((t,n)=>{const r=e.filter((t,e)=>e!==n);return!r.some(e=>t.oldRange.from>=e.oldRange.from&&t.oldRange.to<=e.oldRange.to&&t.newRange.from>=e.newRange.from&&t.newRange.to<=e.newRange.to)})}function ic(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((t,o)=>{const s=[];if(t.ranges.length)t.forEach((t,e)=>{s.push({from:t,to:e})});else{const{from:t,to:e}=n[o];if(void 0===t||void 0===e)return;s.push({from:t,to:e})}s.forEach(({from:t,to:n})=>{const s=e.slice(o).map(t,-1),i=e.slice(o).map(n),l=e.invert().map(s,-1),a=e.invert().map(i);r.push({oldRange:{from:l,to:a},newRange:{from:s,to:i}})})}),sc(r)}function lc(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(e=>{const o=n.resolve(t),s=rp(o,e.type);s&&r.push({mark:e,...s})}):n.nodesBetween(t,e,(t,e)=>{t&&void 0!==(null===t||void 0===t?void 0:t.nodeSize)&&r.push(...t.marks.map(n=>({from:e,to:e+t.nodeSize,mark:n})))}),r}function ac(t,e,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{const r=t.find(t=>t.type===e&&t.name===n);return!!r&&r.attribute.keepOnSplit}))}function pc(t,e,n={}){const{empty:r,ranges:o}=t.selection,s=e?op(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(t=>!s||s.name===t.type.name).find(t=>tp(t.attrs,n,{strict:!1}));let i=0;const l=[];if(o.forEach(({$from:e,$to:n})=>{const r=e.pos,o=n.pos;t.doc.nodesBetween(r,o,(t,e)=>{if(!t.isText&&!t.marks.length)return;const n=Math.max(r,e),s=Math.min(o,e+t.nodeSize),a=s-n;i+=a,l.push(...t.marks.map(t=>({mark:t,from:n,to:s})))})}),0===i)return!1;const a=l.filter(t=>!s||s.name===t.mark.type.name).filter(t=>tp(t.mark.attrs,n,{strict:!1})).reduce((t,e)=>t+e.to-e.from,0),p=l.filter(t=>!s||t.mark.type!==s&&t.mark.type.excludes(s)).reduce((t,e)=>t+e.to-e.from,0),c=a>0?a+p:a;return c>=i}function cc(t,e,n={}){if(!e)return Lp(t,null,n)||pc(t,null,n);const r=Pp(e,t.schema);return"node"===r?Lp(t,e,n):"mark"===r&&pc(t,e,n)}function uc(t,e){const{nodeExtensions:n}=oa(e),r=n.find(e=>e.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},s=ca(ra(r,"group",o));return"string"===typeof s&&s.split(" ").includes("list")}function dc(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if("hardBreak"===t.type.name)return!0;if(t.isText)return/^\s*$/m.test(null!==(r=t.text)&&void 0!==r?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(0===t.content.childCount)return!0;if(e){let r=!0;return t.content.forEach(t=>{!1!==r&&(dc(t,{ignoreWhitespace:n,checkChildren:e})||(r=!1))}),r}return!1}function hc(t){return t instanceof an}function fc(t,e,n){const r=0,o=t.state.doc.content.size,s=ap(e,r,o),i=ap(n,r,o),l=t.coordsAtPos(s),a=t.coordsAtPos(i,-1),p=Math.min(l.top,a.top),c=Math.max(l.bottom,a.bottom),u=Math.min(l.left,a.left),d=Math.max(l.right,a.right),h=d-u,f=c-p,m=u,g=p,x={top:p,bottom:c,left:u,right:d,width:h,height:f,x:m,y:g};return{...x,toJSON:()=>x}}function mc(t,e,n){var r;const{selection:o}=e;let s=null;if(lp(o)&&(s=o.$cursor),s){const e=null!==(r=t.storedMarks)&&void 0!==r?r:s.marks();return!!n.isInSet(e)||!e.some(t=>t.type.excludes(n))}const{ranges:i}=o;return i.some(({$from:e,$to:r})=>{let o=0===e.depth&&(t.doc.inlineContent&&t.doc.type.allowsMarkType(n));return t.doc.nodesBetween(e.pos,r.pos,(t,e,r)=>{if(o)return!1;if(t.isInline){const e=!r||r.type.allowsMarkType(n),s=!!n.isInSet(t.marks)||!t.marks.some(t=>t.type.excludes(n));o=e&&s}return!o}),o})}const gc=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:s}=n,{empty:i,ranges:l}=s,a=op(t,r.schema);if(o)if(i){const t=Jp(r,a);n.addStoredMark(a.create({...t,...e}))}else l.forEach(t=>{const o=t.$from.pos,s=t.$to.pos;r.doc.nodesBetween(o,s,(t,r)=>{const i=Math.max(r,o),l=Math.min(r+t.nodeSize,s),p=t.marks.find(t=>t.type===a);p?t.marks.forEach(t=>{a===t.type&&n.addMark(i,l,a.create({...t.attrs,...e}))}):n.addMark(i,l,a.create(e))})});return mc(r,n,a)},xc=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),Mc=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const s=ia(t,n.schema);let i;return n.selection.$anchor.sameParent(n.selection.$head)&&(i=n.selection.$anchor.parent.attrs),s.isTextblock?o().command(({commands:t})=>{const r=zl(s,{...i,...e})(n);return!!r||t.clearNodes()}).command(({state:t})=>zl(s,{...i,...e})(t,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},yc=t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,r=ap(t,0,n.content.size),o=an.create(n,r);e.setSelection(o)}return!0},vc=t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,{from:r,to:o}="number"===typeof t?{from:t,to:t}:t,s=sn.atStart(n).from,i=sn.atEnd(n).to,l=ap(r,s,i),a=ap(o,s,i),p=sn.create(n,l,a);e.setSelection(p)}return!0},wc=t=>({state:e,dispatch:n})=>{const r=ia(t,e.schema);return Zl(r)(e,n)};function bc(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(t=>null===e||void 0===e?void 0:e.includes(t.type.name));t.tr.ensureMarks(r)}}const Wc=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:s,doc:i}=e,{$from:l,$to:a}=s,p=o.extensionManager.attributes,c=ac(p,l.node().type.name,l.node().attrs);if(s instanceof an&&s.node.isBlock)return!(!l.parentOffset||!Ce(i,l.pos))&&(r&&(t&&bc(n,o.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const u=a.parentOffset===a.parent.content.size,d=0===l.depth?void 0:Gp(l.node(-1).contentMatchAt(l.indexAfter(-1)));let h=u&&d?[{type:d,attrs:c}]:void 0,f=Ce(e.doc,e.mapping.map(l.pos),1,h);if(h||f||!Ce(e.doc,e.mapping.map(l.pos),1,d?[{type:d}]:void 0)||(f=!0,h=d?[{type:d,attrs:c}]:void 0),r){if(f&&(s instanceof sn&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,h),d&&!u&&!l.parentOffset&&l.parent.type!==d)){const t=e.mapping.map(l.before()),n=e.doc.resolve(t);l.node(-1).canReplaceWith(n.index(),n.index()+1,d)&&e.setNodeMarkup(e.mapping.map(l.before()),d)}t&&bc(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return f},kc=(t,e={})=>({tr:n,state:r,dispatch:o,editor:s})=>{var i;const l=ia(t,r.schema),{$from:a,$to:p}=r.selection,c=r.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(p))return!1;const u=a.node(-1);if(u.type!==l)return!1;const d=s.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(o){let t=v.empty;const r=a.index(-1)?1:a.index(-2)?2:3;for(let e=a.depth-r;e>=a.depth-3;e-=1)t=v.from(a.node(e).copy(t));const o=a.indexAfter(-1){if(u>-1)return!1;t.isTextblock&&0===t.content.size&&(u=e+1)}),u>-1&&n.setSelection(sn.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}const h=p.pos===a.end()?u.contentMatchAt(0).defaultType:null,f={...ac(d,u.type.name,u.attrs),...e},m={...ac(d,a.node().type.name,a.node().attrs),...e};n.delete(a.pos,p.pos);const g=h?[{type:l,attrs:f},{type:h,attrs:m}]:[{type:l,attrs:f}];if(!Ce(n.doc,a.pos,2))return!1;if(o){const{selection:t,storedMarks:e}=r,{splittableMarks:i}=s.extensionManager,l=e||t.$to.parentOffset&&t.$from.marks();if(n.split(a.pos,2,g).scrollIntoView(),!l||!o)return!0;const p=l.filter(t=>i.includes(t.type.name));n.ensureMarks(p)}return!0},Qc=(t,e)=>{const n=tc(t=>t.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const o=t.doc.nodeAt(r),s=n.node.type===(null===o||void 0===o?void 0:o.type)&&Oe(t.doc,n.pos);return!s||(t.join(n.pos),!0)},Cc=(t,e)=>{const n=tc(t=>t.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const o=t.doc.nodeAt(r),s=n.node.type===(null===o||void 0===o?void 0:o.type)&&Oe(t.doc,r);return!s||(t.join(r),!0)},Sc=(t,e,n,r={})=>({editor:o,tr:s,state:i,dispatch:l,chain:a,commands:p,can:c})=>{const{extensions:u,splittableMarks:d}=o.extensionManager,h=ia(t,i.schema),f=ia(e,i.schema),{selection:m,storedMarks:g}=i,{$from:x,$to:M}=m,y=x.blockRange(M),v=g||m.$to.parentOffset&&m.$from.marks();if(!y)return!1;const w=tc(t=>uc(t.type.name,u))(m);if(y.depth>=1&&w&&y.depth-w.depth<=1){if(w.node.type===h)return p.liftListItem(f);if(uc(w.node.type.name,u)&&h.validContent(w.node.content)&&l)return a().command(()=>(s.setNodeMarkup(w.pos,h),!0)).command(()=>Qc(s,h)).command(()=>Cc(s,h)).run()}return n&&v&&l?a().command(()=>{const t=c().wrapInList(h,r),e=v.filter(t=>d.includes(t.type.name));return s.ensureMarks(e),!!t||p.clearNodes()}).wrapInList(h,r).command(()=>Qc(s,h)).command(()=>Cc(s,h)).run():a().command(()=>{const t=c().wrapInList(h,r);return!!t||p.clearNodes()}).wrapInList(h,r).command(()=>Qc(s,h)).command(()=>Cc(s,h)).run()},Oc=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:s=!1}=n,i=op(t,r.schema),l=pc(r,i,e);return l?o.unsetMark(i,{extendEmptyMarkRange:s}):o.setMark(i,e)},Ac=(t,e,n={})=>({state:r,commands:o})=>{const s=ia(t,r.schema),i=ia(e,r.schema),l=Lp(r,s,n);let a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?o.setNode(i,a):o.setNode(s,{...a,...n})},Tc=(t,e={})=>({state:n,commands:r})=>{const o=ia(t,n.schema),s=Lp(n,o,e);return s?r.lift(o):r.wrapIn(o,e)},Ec=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r=0;t-=1)e.step(n.steps[t].invert(n.docs[t]));if(s.text){const n=e.doc.resolve(s.from).marks();e.replaceWith(s.from,s.to,t.schema.text(s.text,n))}else e.delete(s.from,s.to)}return!0}}return!1},Lc=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(e=>{t.removeMark(e.$from.pos,e.$to.pos)}),!0},Dc=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var s;const{extendEmptyMarkRange:i=!1}=e,{selection:l}=n,a=op(t,r.schema),{$from:p,empty:c,ranges:u}=l;if(!o)return!0;if(c&&i){let{from:t,to:e}=l;const r=null===(s=p.marks().find(t=>t.type===a))||void 0===s?void 0:s.attrs,o=rp(p,a,r);o&&(t=o.from,e=o.to),n.removeMark(t,e,a)}else u.forEach(t=>{n.removeMark(t.$from.pos,t.$to.pos,a)});return n.removeStoredMark(a),!0},Nc=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const l=Pp("string"===typeof t?t:t.name,r.schema);return!!l&&("node"===l&&(s=ia(t,r.schema)),"mark"===l&&(i=op(t,r.schema)),o&&n.selection.ranges.forEach(t=>{const o=t.$from.pos,l=t.$to.pos;let a,p,c,u;n.selection.empty?r.doc.nodesBetween(o,l,(t,e)=>{s&&s===t.type&&(c=Math.max(e,o),u=Math.min(e+t.nodeSize,l),a=e,p=t)}):r.doc.nodesBetween(o,l,(t,r)=>{r=o&&r<=l&&(s&&s===t.type&&n.setNodeMarkup(r,void 0,{...t.attrs,...e}),i&&t.marks.length&&t.marks.forEach(s=>{if(i===s.type){const a=Math.max(r,o),p=Math.min(r+t.nodeSize,l);n.addMark(a,p,i.create({...s.attrs,...e}))}}))}),p&&(void 0!==a&&n.setNodeMarkup(a,void 0,{...p.attrs,...e}),i&&p.marks.length&&p.marks.forEach(t=>{i===t.type&&n.addMark(c,u,i.create({...t.attrs,...e}))}))}),!0)},Rc=(t,e={})=>({state:n,dispatch:r})=>{const o=ia(t,n.schema);return Bl(o,e)(n,r)},Ic=(t,e={})=>({state:n,dispatch:r})=>{const o=ia(t,n.schema);return Ul(o,e)(n,r)};var Pc=Object.freeze({__proto__:null,blur:Va,clearContent:Fa,clearNodes:ja,command:Ka,createParagraphNear:_a,cut:Ua,deleteCurrentNode:qa,deleteNode:Ja,deleteRange:Xa,deleteSelection:Ga,enter:Ya,exitCode:Za,extendMarkRange:sp,first:ip,focus:dp,forEach:hp,insertContent:fp,insertContentAt:vp,joinBackward:Wp,joinDown:bp,joinForward:kp,joinItemBackward:Qp,joinItemForward:Cp,joinTextblockBackward:Sp,joinTextblockForward:Op,joinUp:wp,keyboardShortcut:Ep,lift:Dp,liftEmptyBlock:Np,liftListItem:Rp,newlineInCode:Ip,resetAttributes:Hp,scrollIntoView:Bp,selectAll:zp,selectNodeBackward:Vp,selectNodeForward:Fp,selectParentNode:jp,selectTextblockEnd:Kp,selectTextblockStart:_p,setContent:qp,setMark:gc,setMeta:xc,setNode:Mc,setNodeSelection:yc,setTextSelection:vc,sinkListItem:wc,splitBlock:Wc,splitListItem:kc,toggleList:Sc,toggleMark:Oc,toggleNode:Ac,toggleWrap:Tc,undoInputRule:Ec,unsetAllMarks:Lc,unsetMark:Dc,updateAttributes:Nc,wrapIn:Rc,wrapInList:Ic});const $c=$a.create({name:"commands",addCommands(){return{...Pc}}}),Hc=$a.create({name:"drop",addProseMirrorPlugins(){return[new kn({key:new Sn("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),Bc=$a.create({name:"editable",addProseMirrorPlugins(){return[new kn({key:new Sn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),zc=new Sn("focusEvents"),Vc=$a.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new kn({key:zc,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),Fc=$a.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:t})=>[()=>t.undoInputRule(),()=>t.command(({tr:e})=>{const{selection:n,doc:r}=e,{empty:o,$anchor:s}=n,{pos:i,parent:l}=s,a=s.parent.isTextblock&&i>0?e.doc.resolve(i-1):s,p=a.parent.type.spec.isolating,c=s.pos-s.parentOffset,u=p&&1===a.parent.childCount?c===s.pos:en.atStart(r).from===i;return!(!o||!l.type.isTextblock||l.textContent.length||!u||u&&"paragraph"===s.parent.type.name)&&t.clearNodes()}),()=>t.deleteSelection(),()=>t.joinBackward(),()=>t.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:t})=>[()=>t.deleteSelection(),()=>t.deleteCurrentNode(),()=>t.joinForward(),()=>t.selectNodeForward()]),n=()=>this.editor.commands.first(({commands:t})=>[()=>t.newlineInCode(),()=>t.createParagraphNear(),()=>t.liftEmptyBlock(),()=>t.splitBlock()]),r={Enter:n,"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},s={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return up()||Ap()?s:o},addProseMirrorPlugins(){return[new kn({key:new Sn("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(t=>t.getMeta("composition")))return;const r=t.some(t=>t.docChanged)&&!e.doc.eq(n.doc),o=t.some(t=>t.getMeta("preventClearDocument"));if(!r||o)return;const{empty:s,from:i,to:l}=e.selection,a=en.atStart(e.doc).from,p=en.atEnd(e.doc).to,c=i===a&&l===p;if(s||!c)return;const u=dc(n.doc);if(!u)return;const d=n.tr,h=ta({state:n,transaction:d}),{commands:f}=new ea({editor:this.editor,state:h});return f.clearNodes(),d.steps.length?d:void 0}})]}}),jc=$a.create({name:"paste",addProseMirrorPlugins(){return[new kn({key:new Sn("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),Kc=$a.create({name:"tabindex",addProseMirrorPlugins(){return[new kn({key:new Sn("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class _c{get name(){return this.node.type.name}constructor(t,e,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=t,this.editor=e,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return null!==(t=this.actualDepth)&&void 0!==t?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let e=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);e=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:e,to:n},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),e=this.resolvedPos.doc.resolve(t);return new _c(e,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new _c(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new _c(t,this.editor)}get children(){const t=[];return this.node.content.forEach((e,n)=>{const r=e.isBlock&&!e.isTextblock,o=e.isAtom&&!e.isText,s=this.pos+n+(o?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;const i=this.resolvedPos.doc.resolve(s);if(!r&&i.depth<=this.depth)return;const l=new _c(i,this.editor,r,r?e:null);r&&(l.actualDepth=this.depth+1),t.push(new _c(i,this.editor,r,r?e:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,e={}){let n=null,r=this.parent;while(r&&!n){if(r.node.type.name===t)if(Object.keys(e).length>0){const t=r.node.attrs,n=Object.keys(e);for(let r=0;r{if(!(n&&r.length>0)){if(s.node.type.name===t){const t=o.every(t=>e[t]===s.node.attrs[t]);t&&r.push(s)}n&&r.length>0||(r=r.concat(s.querySelectorAll(t,e,n)))}}),r}setAttribute(t){const{tr:e}=this.editor.state;e.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(e)}}const Uc='.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}';function qc(t,e,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(null!==r)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style"+(n?`-${n}`:""),""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}class Jc extends na{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:t,slice:e,moved:n})=>this.options.onDrop(t,e,n)),this.on("paste",({event:t,slice:e})=>this.options.onPaste(t,e)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=qc(Uc,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,e){const n=pa(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(t=>{const e="string"===typeof t?`${t}$`:t.key;n=n.filter(t=>!t.key.startsWith(e))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const n=this.options.enableCoreExtensions?[Bc,za.configure({blockSeparator:null===(e=null===(t=this.options.coreExtensionOptions)||void 0===t?void 0:t.clipboardTextSerializer)||void 0===e?void 0:e.blockSeparator}),$c,Vc,Fc,Kc,Hc,jc].filter(t=>"object"!==typeof this.options.enableCoreExtensions||!1!==this.options.enableCoreExtensions[t.name]):[],r=[...n,...this.options.extensions].filter(t=>["extension","node","mark"].includes(null===t||void 0===t?void 0:t.type));this.extensionManager=new Pa(r,this)}createCommandManager(){this.commandManager=new ea({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let e;try{e=Up(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(t=>"collaboration"!==t.name),this.createExtensionManager()}}),e=Up(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=pp(e,this.options.autofocus);this.view=new Vi(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...null===(t=this.options.editorProps)||void 0===t?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:bn.create({doc:e,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach(t=>{var e;return null===(e=this.capturedTransaction)||void 0===e?void 0:e.step(t)}):void(this.capturedTransaction=t);const e=this.state.apply(t),n=!this.state.selection.eq(e.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const r=t.getMeta("focus"),o=t.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:t}),o&&this.emit("blur",{editor:this,event:o.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return rc(this.state,t)}isActive(t,e){const n="string"===typeof t?t:null,r="string"===typeof t?e:t;return cc(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ma(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:n={}}=t||{};return ec(this.state.doc,{blockSeparator:e,textSerializers:{...Ba(this.schema),...n}})}get isEmpty(){return dc(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(null===(t=this.view)||void 0===t?void 0:t.docView)}$node(t,e){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new _c(e,this)}get $doc(){return this.$pos(0)}}function Xc(t){return new wa({find:t.find,handler:({state:e,range:n,match:r})=>{const o=ca(t.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:s}=e,i=r[r.length-1],l=r[0];if(i){const r=l.search(/\S/),a=n.from+l.indexOf(i),p=a+i.length,c=lc(n.from,n.to,e.doc).filter(e=>{const n=e.mark.type.excluded;return n.find(n=>n===t.type&&n!==e.mark.type)}).filter(t=>t.to>a);if(c.length)return null;pn.from&&s.delete(n.from+r,a);const u=n.from+r+i.length;s.addMark(n.from+r,u,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}function Gc(t){return new wa({find:t.find,handler:({state:e,range:n,match:r})=>{const o=ca(t.getAttributes,void 0,r)||{},{tr:s}=e,i=n.from;let l=n.to;const a=t.type.create(o);if(r[1]){const t=r[0].lastIndexOf(r[1]);let e=i+t;e>l?e=l:l=e+r[1].length;const n=r[0][r[0].length-1];s.insertText(n,i+r[0].length-1),s.replaceWith(e,l,a)}else if(r[0]){const e=t.type.isInline?i:i-1;s.insert(e,t.type.create(o)).delete(s.mapping.map(i),s.mapping.map(l))}s.scrollIntoView()}})}function Yc(t){return new wa({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),s=ca(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,s)}})}function Zc(t){return new wa({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const s=ca(t.getAttributes,void 0,r)||{},i=e.tr.delete(n.from,n.to),l=i.doc.resolve(n.from),a=l.blockRange(),p=a&&ge(a,t.type,s);if(!p)return null;if(i.wrap(a,p),t.keepMarks&&t.editor){const{selection:n,storedMarks:r}=e,{splittableMarks:o}=t.editor.extensionManager,s=r||n.$to.parentOffset&&n.$from.marks();if(s){const t=s.filter(t=>o.includes(t.type.name));i.ensureMarks(t)}}if(t.keepAttributes){const e="bulletList"===t.type.name||"orderedList"===t.type.name?"listItem":"taskList";o().updateAttributes(e,s).run()}const c=i.doc.resolve(n.from-1).nodeBefore;c&&c.type===t.type&&Oe(i.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,c))&&i.join(n.from-1)}})}class tu{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ca(ra(this,"addOptions",{name:this.name}))),this.storage=ca(ra(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new tu(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>Sa(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new tu(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=ca(ra(e,"addOptions",{name:e.name})),e.storage=ca(ra(e,"addStorage",{name:e.name,options:e.options})),e}}function eu(t){return new Ta({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const s=ca(t.getAttributes,void 0,r,o);if(!1===s||null===s)return null;const{tr:i}=e,l=r[r.length-1],a=r[0];let p=n.to;if(l){const r=a.search(/\S/),o=n.from+a.indexOf(l),c=o+l.length,u=lc(n.from,n.to,e.doc).filter(e=>{const n=e.mark.type.excluded;return n.find(n=>n===t.type&&n!==e.mark.type)}).filter(t=>t.to>o);if(u.length)return null;cn.from&&i.delete(n.from+r,o),p=n.from+r+l.length,i.addMark(n.from+r,p,t.type.create(s||{})),i.removeStoredMark(t.type)}}})}function nu(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof an){const t=r.index(),n=r.parent;return n.canReplaceWith(t,t+1,e)}let o=r.depth;while(o>=0){const t=r.index(o),n=r.node(o),s=n.contentMatchAt(t);if(s.matchType(e))return!0;o-=1}return!1}function ru(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ou(t){var e=ru(t).Element;return t instanceof e||t instanceof Element}function su(t){var e=ru(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function iu(t){if("undefined"===typeof ShadowRoot)return!1;var e=ru(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}var lu=Math.max,au=Math.min,pu=Math.round;function cu(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function uu(){return!/^((?!chrome|android).)*safari/i.test(cu())}function du(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var r=t.getBoundingClientRect(),o=1,s=1;e&&su(t)&&(o=t.offsetWidth>0&&pu(r.width)/t.offsetWidth||1,s=t.offsetHeight>0&&pu(r.height)/t.offsetHeight||1);var i=ou(t)?ru(t):window,l=i.visualViewport,a=!uu()&&n,p=(r.left+(a&&l?l.offsetLeft:0))/o,c=(r.top+(a&&l?l.offsetTop:0))/s,u=r.width/o,d=r.height/s;return{width:u,height:d,top:c,right:p+u,bottom:c+d,left:p,x:p,y:c}}function hu(t){var e=ru(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function fu(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function mu(t){return t!==ru(t)&&su(t)?fu(t):hu(t)}function gu(t){return t?(t.nodeName||"").toLowerCase():null}function xu(t){return((ou(t)?t.ownerDocument:t.document)||window.document).documentElement}function Mu(t){return du(xu(t)).left+hu(t).scrollLeft}function yu(t){return ru(t).getComputedStyle(t)}function vu(t){var e=yu(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function wu(t){var e=t.getBoundingClientRect(),n=pu(e.width)/t.offsetWidth||1,r=pu(e.height)/t.offsetHeight||1;return 1!==n||1!==r}function bu(t,e,n){void 0===n&&(n=!1);var r=su(e),o=su(e)&&wu(e),s=xu(e),i=du(t,o,n),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!n)&&(("body"!==gu(e)||vu(s))&&(l=mu(e)),su(e)?(a=du(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):s&&(a.x=Mu(s))),{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function Wu(t){var e=du(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function ku(t){return"html"===gu(t)?t:t.assignedSlot||t.parentNode||(iu(t)?t.host:null)||xu(t)}function Qu(t){return["html","body","#document"].indexOf(gu(t))>=0?t.ownerDocument.body:su(t)&&vu(t)?t:Qu(ku(t))}function Cu(t,e){var n;void 0===e&&(e=[]);var r=Qu(t),o=r===(null==(n=t.ownerDocument)?void 0:n.body),s=ru(r),i=o?[s].concat(s.visualViewport||[],vu(r)?r:[]):r,l=e.concat(i);return o?l:l.concat(Cu(ku(i)))}function Su(t){return["table","td","th"].indexOf(gu(t))>=0}function Ou(t){return su(t)&&"fixed"!==yu(t).position?t.offsetParent:null}function Au(t){var e=/firefox/i.test(cu()),n=/Trident/i.test(cu());if(n&&su(t)){var r=yu(t);if("fixed"===r.position)return null}var o=ku(t);iu(o)&&(o=o.host);while(su(o)&&["html","body"].indexOf(gu(o))<0){var s=yu(o);if("none"!==s.transform||"none"!==s.perspective||"paint"===s.contain||-1!==["transform","perspective"].indexOf(s.willChange)||e&&"filter"===s.willChange||e&&s.filter&&"none"!==s.filter)return o;o=o.parentNode}return null}function Tu(t){var e=ru(t),n=Ou(t);while(n&&Su(n)&&"static"===yu(n).position)n=Ou(n);return n&&("html"===gu(n)||"body"===gu(n)&&"static"===yu(n).position)?e:n||Au(t)||e}var Eu="top",Lu="bottom",Du="right",Nu="left",Ru="auto",Iu=[Eu,Lu,Du,Nu],Pu="start",$u="end",Hu="clippingParents",Bu="viewport",zu="popper",Vu="reference",Fu=Iu.reduce(function(t,e){return t.concat([e+"-"+Pu,e+"-"+$u])},[]),ju=[].concat(Iu,[Ru]).reduce(function(t,e){return t.concat([e,e+"-"+Pu,e+"-"+$u])},[]),Ku="beforeRead",_u="read",Uu="afterRead",qu="beforeMain",Ju="main",Xu="afterMain",Gu="beforeWrite",Yu="write",Zu="afterWrite",td=[Ku,_u,Uu,qu,Ju,Xu,Gu,Yu,Zu];function ed(t){var e=new Map,n=new Set,r=[];function o(t){n.add(t.name);var s=[].concat(t.requires||[],t.requiresIfExists||[]);s.forEach(function(t){if(!n.has(t)){var r=e.get(t);r&&o(r)}}),r.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||o(t)}),r}function nd(t){var e=ed(t);return td.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}function rd(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function od(t){var e=t.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{});return Object.keys(e).map(function(t){return e[t]})}var sd={placement:"bottom",modifiers:[],strategy:"absolute"};function id(){for(var t=arguments.length,e=new Array(t),n=0;n=0?"x":"y"}function fd(t){var e,n=t.reference,r=t.element,o=t.placement,s=o?ud(o):null,i=o?dd(o):null,l=n.x+n.width/2-r.width/2,a=n.y+n.height/2-r.height/2;switch(s){case Eu:e={x:l,y:n.y-r.height};break;case Lu:e={x:l,y:n.y+n.height};break;case Du:e={x:n.x+n.width,y:a};break;case Nu:e={x:n.x-r.width,y:a};break;default:e={x:n.x,y:n.y}}var p=s?hd(s):null;if(null!=p){var c="y"===p?"height":"width";switch(i){case Pu:e[p]=e[p]-(n[c]/2-r[c]/2);break;case $u:e[p]=e[p]+(n[c]/2-r[c]/2);break;default:}}return e}function md(t){var e=t.state,n=t.name;e.modifiersData[n]=fd({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var gd={name:"popperOffsets",enabled:!0,phase:"read",fn:md,data:{}},xd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Md(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:pu(n*o)/o||0,y:pu(r*o)/o||0}}function yd(t){var e,n=t.popper,r=t.popperRect,o=t.placement,s=t.variation,i=t.offsets,l=t.position,a=t.gpuAcceleration,p=t.adaptive,c=t.roundOffsets,u=t.isFixed,d=i.x,h=void 0===d?0:d,f=i.y,m=void 0===f?0:f,g="function"===typeof c?c({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var x=i.hasOwnProperty("x"),M=i.hasOwnProperty("y"),y=Nu,v=Eu,w=window;if(p){var b=Tu(n),W="clientHeight",k="clientWidth";if(b===ru(n)&&(b=xu(n),"static"!==yu(b).position&&"absolute"===l&&(W="scrollHeight",k="scrollWidth")),o===Eu||(o===Nu||o===Du)&&s===$u){v=Lu;var Q=u&&b===w&&w.visualViewport?w.visualViewport.height:b[W];m-=Q-r.height,m*=a?1:-1}if(o===Nu||(o===Eu||o===Lu)&&s===$u){y=Du;var C=u&&b===w&&w.visualViewport?w.visualViewport.width:b[k];h-=C-r.width,h*=a?1:-1}}var S,O=Object.assign({position:l},p&&xd),A=!0===c?Md({x:h,y:m},ru(n)):{x:h,y:m};return h=A.x,m=A.y,a?Object.assign({},O,(S={},S[v]=M?"0":"",S[y]=x?"0":"",S.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",S)):Object.assign({},O,(e={},e[v]=M?m+"px":"",e[y]=x?h+"px":"",e.transform="",e))}function vd(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=void 0===r||r,s=n.adaptive,i=void 0===s||s,l=n.roundOffsets,a=void 0===l||l,p={placement:ud(e.placement),variation:dd(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,yd(Object.assign({},p,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:i,roundOffsets:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,yd(Object.assign({},p,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var wd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:vd,data:{}};function bd(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},o=e.elements[t];su(o)&&gu(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(t){var e=r[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)}))})}function Wd(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var r=e.elements[t],o=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]),i=s.reduce(function(t,e){return t[e]="",t},{});su(r)&&gu(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(t){r.removeAttribute(t)}))})}}var kd={name:"applyStyles",enabled:!0,phase:"write",fn:bd,effect:Wd,requires:["computeStyles"]};function Qd(t,e,n){var r=ud(t),o=[Nu,Eu].indexOf(r)>=0?-1:1,s="function"===typeof n?n(Object.assign({},e,{placement:t})):n,i=s[0],l=s[1];return i=i||0,l=(l||0)*o,[Nu,Du].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function Cd(t){var e=t.state,n=t.options,r=t.name,o=n.offset,s=void 0===o?[0,0]:o,i=ju.reduce(function(t,n){return t[n]=Qd(n,e.rects,s),t},{}),l=i[e.placement],a=l.x,p=l.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=p),e.modifiersData[r]=i}var Sd={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Cd},Od={left:"right",right:"left",bottom:"top",top:"bottom"};function Ad(t){return t.replace(/left|right|bottom|top/g,function(t){return Od[t]})}var Td={start:"end",end:"start"};function Ed(t){return t.replace(/start|end/g,function(t){return Td[t]})}function Ld(t,e){var n=ru(t),r=xu(t),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,l=0,a=0;if(o){s=o.width,i=o.height;var p=uu();(p||!p&&"fixed"===e)&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:i,x:l+Mu(t),y:a}}function Dd(t){var e,n=xu(t),r=hu(t),o=null==(e=t.ownerDocument)?void 0:e.body,s=lu(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=lu(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+Mu(t),a=-r.scrollTop;return"rtl"===yu(o||n).direction&&(l+=lu(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:a}}function Nd(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&iu(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Rd(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Id(t,e){var n=du(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Pd(t,e,n){return e===Bu?Rd(Ld(t,n)):ou(e)?Id(e,n):Rd(Dd(xu(t)))}function $d(t){var e=Cu(ku(t)),n=["absolute","fixed"].indexOf(yu(t).position)>=0,r=n&&su(t)?Tu(t):t;return ou(r)?e.filter(function(t){return ou(t)&&Nd(t,r)&&"body"!==gu(t)}):[]}function Hd(t,e,n,r){var o="clippingParents"===e?$d(t):[].concat(e),s=[].concat(o,[n]),i=s[0],l=s.reduce(function(e,n){var o=Pd(t,n,r);return e.top=lu(o.top,e.top),e.right=au(o.right,e.right),e.bottom=au(o.bottom,e.bottom),e.left=lu(o.left,e.left),e},Pd(t,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Bd(){return{top:0,right:0,bottom:0,left:0}}function zd(t){return Object.assign({},Bd(),t)}function Vd(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function Fd(t,e){void 0===e&&(e={});var n=e,r=n.placement,o=void 0===r?t.placement:r,s=n.strategy,i=void 0===s?t.strategy:s,l=n.boundary,a=void 0===l?Hu:l,p=n.rootBoundary,c=void 0===p?Bu:p,u=n.elementContext,d=void 0===u?zu:u,h=n.altBoundary,f=void 0!==h&&h,m=n.padding,g=void 0===m?0:m,x=zd("number"!==typeof g?g:Vd(g,Iu)),M=d===zu?Vu:zu,y=t.rects.popper,v=t.elements[f?M:d],w=Hd(ou(v)?v:v.contextElement||xu(t.elements.popper),a,c,i),b=du(t.elements.reference),W=fd({reference:b,element:y,strategy:"absolute",placement:o}),k=Rd(Object.assign({},y,W)),Q=d===zu?k:b,C={top:w.top-Q.top+x.top,bottom:Q.bottom-w.bottom+x.bottom,left:w.left-Q.left+x.left,right:Q.right-w.right+x.right},S=t.modifiersData.offset;if(d===zu&&S){var O=S[o];Object.keys(C).forEach(function(t){var e=[Du,Lu].indexOf(t)>=0?1:-1,n=[Eu,Lu].indexOf(t)>=0?"y":"x";C[t]+=O[n]*e})}return C}function jd(t,e){void 0===e&&(e={});var n=e,r=n.placement,o=n.boundary,s=n.rootBoundary,i=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,p=void 0===a?ju:a,c=dd(r),u=c?l?Fu:Fu.filter(function(t){return dd(t)===c}):Iu,d=u.filter(function(t){return p.indexOf(t)>=0});0===d.length&&(d=u);var h=d.reduce(function(e,n){return e[n]=Fd(t,{placement:n,boundary:o,rootBoundary:s,padding:i})[ud(n)],e},{});return Object.keys(h).sort(function(t,e){return h[t]-h[e]})}function Kd(t){if(ud(t)===Ru)return[];var e=Ad(t);return[Ed(t),e,Ed(e)]}function _d(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,s=void 0===o||o,i=n.altAxis,l=void 0===i||i,a=n.fallbackPlacements,p=n.padding,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,f=void 0===h||h,m=n.allowedAutoPlacements,g=e.options.placement,x=ud(g),M=x===g,y=a||(M||!f?[Ad(g)]:Kd(g)),v=[g].concat(y).reduce(function(t,n){return t.concat(ud(n)===Ru?jd(e,{placement:n,boundary:c,rootBoundary:u,padding:p,flipVariations:f,allowedAutoPlacements:m}):n)},[]),w=e.rects.reference,b=e.rects.popper,W=new Map,k=!0,Q=v[0],C=0;C=0,E=T?"width":"height",L=Fd(e,{placement:S,boundary:c,rootBoundary:u,altBoundary:d,padding:p}),D=T?A?Du:Nu:A?Lu:Eu;w[E]>b[E]&&(D=Ad(D));var N=Ad(D),R=[];if(s&&R.push(L[O]<=0),l&&R.push(L[D]<=0,L[N]<=0),R.every(function(t){return t})){Q=S,k=!1;break}W.set(S,R)}if(k)for(var I=f?3:1,P=function(t){var e=v.find(function(e){var n=W.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return Q=e,"break"},$=I;$>0;$--){var H=P($);if("break"===H)break}e.placement!==Q&&(e.modifiersData[r]._skip=!0,e.placement=Q,e.reset=!0)}}var Ud={name:"flip",enabled:!0,phase:"main",fn:_d,requiresIfExists:["offset"],data:{_skip:!1}};function qd(t){return"x"===t?"y":"x"}function Jd(t,e,n){return lu(t,au(e,n))}function Xd(t,e,n){var r=Jd(t,e,n);return r>n?n:r}function Gd(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,s=void 0===o||o,i=n.altAxis,l=void 0!==i&&i,a=n.boundary,p=n.rootBoundary,c=n.altBoundary,u=n.padding,d=n.tether,h=void 0===d||d,f=n.tetherOffset,m=void 0===f?0:f,g=Fd(e,{boundary:a,rootBoundary:p,padding:u,altBoundary:c}),x=ud(e.placement),M=dd(e.placement),y=!M,v=hd(x),w=qd(v),b=e.modifiersData.popperOffsets,W=e.rects.reference,k=e.rects.popper,Q="function"===typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,C="number"===typeof Q?{mainAxis:Q,altAxis:Q}:Object.assign({mainAxis:0,altAxis:0},Q),S=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,O={x:0,y:0};if(b){if(s){var A,T="y"===v?Eu:Nu,E="y"===v?Lu:Du,L="y"===v?"height":"width",D=b[v],N=D+g[T],R=D-g[E],I=h?-k[L]/2:0,P=M===Pu?W[L]:k[L],$=M===Pu?-k[L]:-W[L],H=e.elements.arrow,B=h&&H?Wu(H):{width:0,height:0},z=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Bd(),V=z[T],F=z[E],j=Jd(0,W[L],B[L]),K=y?W[L]/2-I-j-V-C.mainAxis:P-j-V-C.mainAxis,_=y?-W[L]/2+I+j+F+C.mainAxis:$+j+F+C.mainAxis,U=e.elements.arrow&&Tu(e.elements.arrow),q=U?"y"===v?U.clientTop||0:U.clientLeft||0:0,J=null!=(A=null==S?void 0:S[v])?A:0,X=D+K-J-q,G=D+_-J,Y=Jd(h?au(N,X):N,D,h?lu(R,G):R);b[v]=Y,O[v]=Y-D}if(l){var Z,tt="x"===v?Eu:Nu,et="x"===v?Lu:Du,nt=b[w],rt="y"===w?"height":"width",ot=nt+g[tt],st=nt-g[et],it=-1!==[Eu,Nu].indexOf(x),lt=null!=(Z=null==S?void 0:S[w])?Z:0,at=it?ot:nt-W[rt]-k[rt]-lt+C.altAxis,pt=it?nt+W[rt]+k[rt]-lt-C.altAxis:st,ct=h&&it?Xd(at,nt,pt):Jd(h?at:ot,nt,h?pt:st);b[w]=ct,O[w]=ct-nt}e.modifiersData[r]=O}}var Yd={name:"preventOverflow",enabled:!0,phase:"main",fn:Gd,requiresIfExists:["offset"]},Zd=function(t,e){return t="function"===typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t,zd("number"!==typeof t?t:Vd(t,Iu))};function th(t){var e,n=t.state,r=t.name,o=t.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=ud(n.placement),a=hd(l),p=[Nu,Du].indexOf(l)>=0,c=p?"height":"width";if(s&&i){var u=Zd(o.padding,n),d=Wu(s),h="y"===a?Eu:Nu,f="y"===a?Lu:Du,m=n.rects.reference[c]+n.rects.reference[a]-i[a]-n.rects.popper[c],g=i[a]-n.rects.reference[a],x=Tu(s),M=x?"y"===a?x.clientHeight||0:x.clientWidth||0:0,y=m/2-g/2,v=u[h],w=M-d[c]-u[f],b=M/2-d[c]/2+y,W=Jd(v,b,w),k=a;n.modifiersData[r]=(e={},e[k]=W,e.centerOffset=W-b,e)}}function eh(t){var e=t.state,n=t.options,r=n.element,o=void 0===r?"[data-popper-arrow]":r;null!=o&&("string"!==typeof o||(o=e.elements.popper.querySelector(o),o))&&Nd(e.elements.popper,o)&&(e.elements.arrow=o)}var nh={name:"arrow",enabled:!0,phase:"main",fn:th,effect:eh,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rh(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function oh(t){return[Eu,Du,Lu,Nu].some(function(e){return t[e]>=0})}function sh(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,s=e.modifiersData.preventOverflow,i=Fd(e,{elementContext:"reference"}),l=Fd(e,{altBoundary:!0}),a=rh(i,r),p=rh(l,o,s),c=oh(a),u=oh(p);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:p,isReferenceHidden:c,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":u})}var ih={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sh},lh=[cd,gd,wd,kd,Sd,Ud,Yd,nh,ih],ah=ld({defaultModifiers:lh}),ph="tippy-box",ch="tippy-content",uh="tippy-backdrop",dh="tippy-arrow",hh="tippy-svg-arrow",fh={passive:!0,capture:!0},mh=function(){return document.body};function gh(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function xh(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function Mh(t,e){return"function"===typeof t?t.apply(void 0,e):t}function yh(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)};var n}function vh(t){return t.split(/\s+/).filter(Boolean)}function wh(t){return[].concat(t)}function bh(t,e){-1===t.indexOf(e)&&t.push(e)}function Wh(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function kh(t){return t.split("-")[0]}function Qh(t){return[].slice.call(t)}function Ch(t){return Object.keys(t).reduce(function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e},{})}function Sh(){return document.createElement("div")}function Oh(t){return["Element","Fragment"].some(function(e){return xh(t,e)})}function Ah(t){return xh(t,"NodeList")}function Th(t){return xh(t,"MouseEvent")}function Eh(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Lh(t){return Oh(t)?[t]:Ah(t)?Qh(t):Array.isArray(t)?t:Qh(document.querySelectorAll(t))}function Dh(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Nh(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function Rh(t){var e,n=wh(t),r=n[0];return null!=r&&null!=(e=r.ownerDocument)&&e.body?r.ownerDocument:document}function Ih(t,e){var n=e.clientX,r=e.clientY;return t.every(function(t){var e=t.popperRect,o=t.popperState,s=t.props,i=s.interactiveBorder,l=kh(o.placement),a=o.modifiersData.offset;if(!a)return!0;var p="bottom"===l?a.top.y:0,c="top"===l?a.bottom.y:0,u="right"===l?a.left.x:0,d="left"===l?a.right.x:0,h=e.top-r+p>i,f=r-e.bottom-c>i,m=e.left-n+u>i,g=n-e.right-d>i;return h||f||m||g})}function Ph(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(e){t[r](e,n)})}function $h(t,e){var n=e;while(n){var r;if(t.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Hh={isTouch:!1},Bh=0;function zh(){Hh.isTouch||(Hh.isTouch=!0,window.performance&&document.addEventListener("mousemove",Vh))}function Vh(){var t=performance.now();t-Bh<20&&(Hh.isTouch=!1,document.removeEventListener("mousemove",Vh)),Bh=t}function Fh(){var t=document.activeElement;if(Eh(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function jh(){document.addEventListener("touchstart",zh,fh),window.addEventListener("blur",Fh)}var Kh="undefined"!==typeof window&&"undefined"!==typeof document,_h=!!Kh&&!!window.msCrypto;var Uh={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},qh={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Jh=Object.assign({appendTo:mh,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Uh,qh),Xh=Object.keys(Jh),Gh=function(t){var e=Object.keys(t);e.forEach(function(e){Jh[e]=t[e]})};function Yh(t){var e=t.plugins||[],n=e.reduce(function(e,n){var r,o=n.name,s=n.defaultValue;o&&(e[o]=void 0!==t[o]?t[o]:null!=(r=Jh[o])?r:s);return e},{});return Object.assign({},t,n)}function Zh(t,e){var n=e?Object.keys(Yh(Object.assign({},Jh,{plugins:e}))):Xh,r=n.reduce(function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(o){e[n]=r}return e},{});return r}function tf(t,e){var n=Object.assign({},e,{content:Mh(e.content,[t])},e.ignoreAttributes?{}:Zh(t,e.plugins));return n.aria=Object.assign({},Jh.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}var ef=function(){return"innerHTML"};function nf(t,e){t[ef()]=e}function rf(t){var e=Sh();return!0===t?e.className=dh:(e.className=hh,Oh(t)?e.appendChild(t):nf(e,t)),e}function of(t,e){Oh(e.content)?(nf(t,""),t.appendChild(e.content)):"function"!==typeof e.content&&(e.allowHTML?nf(t,e.content):t.textContent=e.content)}function sf(t){var e=t.firstElementChild,n=Qh(e.children);return{box:e,content:n.find(function(t){return t.classList.contains(ch)}),arrow:n.find(function(t){return t.classList.contains(dh)||t.classList.contains(hh)}),backdrop:n.find(function(t){return t.classList.contains(uh)})}}function lf(t){var e=Sh(),n=Sh();n.className=ph,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Sh();function o(n,r){var o=sf(e),s=o.box,i=o.content,l=o.arrow;r.theme?s.setAttribute("data-theme",r.theme):s.removeAttribute("data-theme"),"string"===typeof r.animation?s.setAttribute("data-animation",r.animation):s.removeAttribute("data-animation"),r.inertia?s.setAttribute("data-inertia",""):s.removeAttribute("data-inertia"),s.style.maxWidth="number"===typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?s.setAttribute("role",r.role):s.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||of(i,t.props),r.arrow?l?n.arrow!==r.arrow&&(s.removeChild(l),s.appendChild(rf(r.arrow))):s.appendChild(rf(r.arrow)):l&&s.removeChild(l)}return r.className=ch,r.setAttribute("data-state","hidden"),of(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props),{popper:e,onUpdate:o}}lf.$$tippy=!0;var af=1,pf=[],cf=[];function uf(t,e){var n,r,o,s,i,l,a,p=tf(t,Object.assign({},Jh,Yh(Ch(e)))),c=!1,u=!1,d=!1,h=!1,f=[],m=yh(X,p.interactiveDebounce),g=af++,x=null,M=Wh(p.plugins),y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},v={id:g,reference:t,popper:Sh(),popperInstance:x,props:p,state:y,plugins:M,clearDelayTimeouts:at,setProps:pt,setContent:ct,show:ut,hide:dt,hideWithInteractivity:ht,enable:it,disable:lt,unmount:ft,destroy:mt};if(!p.render)return v;var w=p.render(v),b=w.popper,W=w.onUpdate;b.setAttribute("data-tippy-root",""),b.id="tippy-"+v.id,v.popper=b,t._tippy=v,b._tippy=v;var k=M.map(function(t){return t.fn(v)}),Q=t.hasAttribute("aria-expanded");return U(),I(),D(),N("onCreate",[v]),p.showOnCreate&&ot(),b.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),b.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&T().addEventListener("mousemove",m)}),v;function C(){var t=v.props.touch;return Array.isArray(t)?t:[t,0]}function S(){return"hold"===C()[0]}function O(){var t;return!(null==(t=v.props.render)||!t.$$tippy)}function A(){return a||t}function T(){var t=A().parentNode;return t?Rh(t):document}function E(){return sf(b)}function L(t){return v.state.isMounted&&!v.state.isVisible||Hh.isTouch||s&&"focus"===s.type?0:gh(v.props.delay,t?0:1,Jh.delay)}function D(t){void 0===t&&(t=!1),b.style.pointerEvents=v.props.interactive&&!t?"":"none",b.style.zIndex=""+v.props.zIndex}function N(t,e,n){var r;(void 0===n&&(n=!0),k.forEach(function(n){n[t]&&n[t].apply(n,e)}),n)&&(r=v.props)[t].apply(r,e)}function R(){var e=v.props.aria;if(e.content){var n="aria-"+e.content,r=b.id,o=wh(v.props.triggerTarget||t);o.forEach(function(t){var e=t.getAttribute(n);if(v.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var o=e&&e.replace(r,"").trim();o?t.setAttribute(n,o):t.removeAttribute(n)}})}}function I(){if(!Q&&v.props.aria.expanded){var e=wh(v.props.triggerTarget||t);e.forEach(function(t){v.props.interactive?t.setAttribute("aria-expanded",v.state.isVisible&&t===A()?"true":"false"):t.removeAttribute("aria-expanded")})}}function P(){T().removeEventListener("mousemove",m),pf=pf.filter(function(t){return t!==m})}function $(e){if(!Hh.isTouch||!d&&"mousedown"!==e.type){var n=e.composedPath&&e.composedPath()[0]||e.target;if(!v.props.interactive||!$h(b,n)){if(wh(v.props.triggerTarget||t).some(function(t){return $h(t,n)})){if(Hh.isTouch)return;if(v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else N("onClickOutside",[v,e]);!0===v.props.hideOnClick&&(v.clearDelayTimeouts(),v.hide(),u=!0,setTimeout(function(){u=!1}),v.state.isMounted||V())}}}function H(){d=!0}function B(){d=!1}function z(){var t=T();t.addEventListener("mousedown",$,!0),t.addEventListener("touchend",$,fh),t.addEventListener("touchstart",B,fh),t.addEventListener("touchmove",H,fh)}function V(){var t=T();t.removeEventListener("mousedown",$,!0),t.removeEventListener("touchend",$,fh),t.removeEventListener("touchstart",B,fh),t.removeEventListener("touchmove",H,fh)}function F(t,e){K(t,function(){!v.state.isVisible&&b.parentNode&&b.parentNode.contains(b)&&e()})}function j(t,e){K(t,e)}function K(t,e){var n=E().box;function r(t){t.target===n&&(Ph(n,"remove",r),e())}if(0===t)return e();Ph(n,"remove",i),Ph(n,"add",r),i=r}function _(e,n,r){void 0===r&&(r=!1);var o=wh(v.props.triggerTarget||t);o.forEach(function(t){t.addEventListener(e,n,r),f.push({node:t,eventType:e,handler:n,options:r})})}function U(){S()&&(_("touchstart",J,{passive:!0}),_("touchend",G,{passive:!0})),vh(v.props.trigger).forEach(function(t){if("manual"!==t)switch(_(t,J),t){case"mouseenter":_("mouseleave",G);break;case"focus":_(_h?"focusout":"blur",Y);break;case"focusin":_("focusout",Y);break}})}function q(){f.forEach(function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)}),f=[]}function J(t){var e,n=!1;if(v.state.isEnabled&&!Z(t)&&!u){var r="focus"===(null==(e=s)?void 0:e.type);s=t,a=t.currentTarget,I(),!v.state.isVisible&&Th(t)&&pf.forEach(function(e){return e(t)}),"click"===t.type&&(v.props.trigger.indexOf("mouseenter")<0||c)&&!1!==v.props.hideOnClick&&v.state.isVisible?n=!0:ot(t),"click"===t.type&&(c=!n),n&&!r&&st(t)}}function X(t){var e=t.target,n=A().contains(e)||b.contains(e);if("mousemove"!==t.type||!n){var r=rt().concat(b).map(function(t){var e,n=t._tippy,r=null==(e=n.popperInstance)?void 0:e.state;return r?{popperRect:t.getBoundingClientRect(),popperState:r,props:p}:null}).filter(Boolean);Ih(r,t)&&(P(),st(t))}}function G(t){var e=Z(t)||v.props.trigger.indexOf("click")>=0&&c;e||(v.props.interactive?v.hideWithInteractivity(t):st(t))}function Y(t){v.props.trigger.indexOf("focusin")<0&&t.target!==A()||v.props.interactive&&t.relatedTarget&&b.contains(t.relatedTarget)||st(t)}function Z(t){return!!Hh.isTouch&&S()!==t.type.indexOf("touch")>=0}function tt(){et();var e=v.props,n=e.popperOptions,r=e.placement,o=e.offset,s=e.getReferenceClientRect,i=e.moveTransition,a=O()?sf(b).arrow:null,p=s?{getBoundingClientRect:s,contextElement:s.contextElement||A()}:t,c={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(O()){var n=E(),r=n.box;["placement","reference-hidden","escaped"].forEach(function(t){"placement"===t?r.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?r.setAttribute("data-"+t,""):r.removeAttribute("data-"+t)}),e.attributes.popper={}}}},u=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},c];O()&&a&&u.push({name:"arrow",options:{element:a,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),v.popperInstance=ah(p,b,Object.assign({},n,{placement:r,onFirstUpdate:l,modifiers:u}))}function et(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function nt(){var t,e=v.props.appendTo,n=A();t=v.props.interactive&&e===mh||"parent"===e?n.parentNode:Mh(e,[n]),t.contains(b)||t.appendChild(b),v.state.isMounted=!0,tt()}function rt(){return Qh(b.querySelectorAll("[data-tippy-root]"))}function ot(t){v.clearDelayTimeouts(),t&&N("onTrigger",[v,t]),z();var e=L(!0),r=C(),o=r[0],s=r[1];Hh.isTouch&&"hold"===o&&s&&(e=s),e?n=setTimeout(function(){v.show()},e):v.show()}function st(t){if(v.clearDelayTimeouts(),N("onUntrigger",[v,t]),v.state.isVisible){if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&c)){var e=L(!1);e?r=setTimeout(function(){v.state.isVisible&&v.hide()},e):o=requestAnimationFrame(function(){v.hide()})}}else V()}function it(){v.state.isEnabled=!0}function lt(){v.hide(),v.state.isEnabled=!1}function at(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)}function pt(e){if(!v.state.isDestroyed){N("onBeforeUpdate",[v,e]),q();var n=v.props,r=tf(t,Object.assign({},n,Ch(e),{ignoreAttributes:!0}));v.props=r,U(),n.interactiveDebounce!==r.interactiveDebounce&&(P(),m=yh(X,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?wh(n.triggerTarget).forEach(function(t){t.removeAttribute("aria-expanded")}):r.triggerTarget&&t.removeAttribute("aria-expanded"),I(),D(),W&&W(n,r),v.popperInstance&&(tt(),rt().forEach(function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})),N("onAfterUpdate",[v,e])}}function ct(t){v.setProps({content:t})}function ut(){var t=v.state.isVisible,e=v.state.isDestroyed,n=!v.state.isEnabled,r=Hh.isTouch&&!v.props.touch,o=gh(v.props.duration,0,Jh.duration);if(!(t||e||n||r)&&!A().hasAttribute("disabled")&&(N("onShow",[v],!1),!1!==v.props.onShow(v))){if(v.state.isVisible=!0,O()&&(b.style.visibility="visible"),D(),z(),v.state.isMounted||(b.style.transition="none"),O()){var s=E(),i=s.box,a=s.content;Dh([i,a],0)}l=function(){var t;if(v.state.isVisible&&!h){if(h=!0,b.offsetHeight,b.style.transition=v.props.moveTransition,O()&&v.props.animation){var e=E(),n=e.box,r=e.content;Dh([n,r],o),Nh([n,r],"visible")}R(),I(),bh(cf,v),null==(t=v.popperInstance)||t.forceUpdate(),N("onMount",[v]),v.props.animation&&O()&&j(o,function(){v.state.isShown=!0,N("onShown",[v])})}},nt()}}function dt(){var t=!v.state.isVisible,e=v.state.isDestroyed,n=!v.state.isEnabled,r=gh(v.props.duration,1,Jh.duration);if(!(t||e||n)&&(N("onHide",[v],!1),!1!==v.props.onHide(v))){if(v.state.isVisible=!1,v.state.isShown=!1,h=!1,c=!1,O()&&(b.style.visibility="hidden"),P(),V(),D(!0),O()){var o=E(),s=o.box,i=o.content;v.props.animation&&(Dh([s,i],r),Nh([s,i],"hidden"))}R(),I(),v.props.animation?O()&&F(r,v.unmount):v.unmount()}}function ht(t){T().addEventListener("mousemove",m),bh(pf,m),m(t)}function ft(){v.state.isVisible&&v.hide(),v.state.isMounted&&(et(),rt().forEach(function(t){t._tippy.unmount()}),b.parentNode&&b.parentNode.removeChild(b),cf=cf.filter(function(t){return t!==v}),v.state.isMounted=!1,N("onHidden",[v]))}function mt(){v.state.isDestroyed||(v.clearDelayTimeouts(),v.unmount(),q(),delete t._tippy,v.state.isDestroyed=!0,N("onDestroy",[v]))}}function df(t,e){void 0===e&&(e={});var n=Jh.plugins.concat(e.plugins||[]);jh();var r=Object.assign({},e,{plugins:n}),o=Lh(t),s=o.reduce(function(t,e){var n=e&&uf(e,r);return n&&t.push(n),t},[]);return Oh(t)?s[0]:s}df.defaultProps=Jh,df.setDefaultProps=Gh,df.currentInput=Hh;Object.assign({},kd,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}});df.setDefaultProps({render:lf});var hf=df;class ff{constructor({editor:t,element:e,view:n,tippyOptions:r={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:t,state:e,from:n,to:r})=>{const{doc:o,selection:s}=e,{empty:i}=s,l=!o.textBetween(n,r).length&&lp(e.selection),a=this.element.contains(document.activeElement),p=t.hasFocus()||a;return!(!p||i||l||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:t})=>{var e;this.preventHide?this.preventHide=!1:(null===t||void 0===t?void 0:t.relatedTarget)&&(null===(e=this.element.parentNode)||void 0===e?void 0:e.contains(t.relatedTarget))||(null===t||void 0===t?void 0:t.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=t=>{this.blurHandler({event:t})},this.handleDebouncedUpdate=(t,e)=>{const n=!(null===e||void 0===e?void 0:e.selection.eq(t.state.selection)),r=!(null===e||void 0===e?void 0:e.doc.eq(t.state.doc));(n||r)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(t,n,r,e)},this.updateDelay))},this.updateHandler=(t,e,n,r)=>{var o,s,i;const{state:l,composing:a}=t,{selection:p}=l,c=!e&&!n;if(a||c)return;this.createTooltip();const{ranges:u}=p,d=Math.min(...u.map(t=>t.$from.pos)),h=Math.max(...u.map(t=>t.$to.pos)),f=null===(o=this.shouldShow)||void 0===o?void 0:o.call(this,{editor:this.editor,element:this.element,view:t,state:l,oldState:r,from:d,to:h});f?(null===(s=this.tippy)||void 0===s||s.setProps({getReferenceClientRect:(null===(i=this.tippyOptions)||void 0===i?void 0:i.getReferenceClientRect)||(()=>{if(hc(l.selection)){let e=t.nodeDOM(d);if(e){const t=e.dataset.nodeViewWrapper?e:e.querySelector("[data-node-view-wrapper]");if(t&&(e=t.firstChild),e)return e.getBoundingClientRect()}}return fc(t,d,h)})}),this.show()):this.hide()},this.editor=t,this.element=e,this.view=n,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,e=!!t.parentElement;this.element.tabIndex=0,!this.tippy&&e&&(this.tippy=hf(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,e){const{state:n}=t,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r)return void this.handleDebouncedUpdate(t,e);const o=!(null===e||void 0===e?void 0:e.selection.eq(t.state.selection)),s=!(null===e||void 0===e?void 0:e.doc.eq(t.state.doc));this.updateHandler(t,o,s,e)}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;(null===(t=this.tippy)||void 0===t?void 0:t.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const mf=t=>new kn({key:"string"===typeof t.pluginKey?new Sn(t.pluginKey):t.pluginKey,view:e=>new ff({view:e,...t})});$a.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[mf({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class gf{getTextContent(t){return ec(t,{textSerializers:Ba(this.editor.schema)})}constructor({editor:t,element:e,view:n,tippyOptions:r={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:t,state:e})=>{const{selection:n}=e,{$anchor:r,empty:o}=n,s=1===r.depth,i=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent&&0===r.parent.childCount&&!this.getTextContent(r.parent);return!!(t.hasFocus()&&o&&s&&i&&this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:t})=>{var e;this.preventHide?this.preventHide=!1:(null===t||void 0===t?void 0:t.relatedTarget)&&(null===(e=this.element.parentNode)||void 0===e?void 0:e.contains(t.relatedTarget))||(null===t||void 0===t?void 0:t.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=t=>{this.blurHandler({event:t})},this.editor=t,this.element=e,this.view=n,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,e=!!t.parentElement;this.element.tabIndex=0,!this.tippy&&e&&(this.tippy=hf(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,e){var n,r,o;const{state:s}=t,{doc:i,selection:l}=s,{from:a,to:p}=l,c=e&&e.doc.eq(i)&&e.selection.eq(l);if(c)return;this.createTooltip();const u=null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:t,state:s,oldState:e});u?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>fc(t,a,p))}),this.show()):this.hide()}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;(null===(t=this.tippy)||void 0===t?void 0:t.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const xf=t=>new kn({key:"string"===typeof t.pluginKey?new Sn(t.pluginKey):t.pluginKey,view:e=>new gf({view:e,...t})});$a.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[xf({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),(0,o.pM)({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=(0,h.KR)(null);return(0,o.sV)(()=>{const{updateDelay:e,editor:r,pluginKey:o,shouldShow:s,tippyOptions:i}=t;r.registerPlugin(mf({updateDelay:e,editor:r,element:n.value,pluginKey:o,shouldShow:s,tippyOptions:i}))}),(0,o.xo)(()=>{const{pluginKey:e,editor:n}=t;n.unregisterPlugin(e)}),()=>{var t;return(0,o.h)("div",{ref:n},null===(t=e.default)||void 0===t?void 0:t.call(e))}}});function Mf(t){return(0,h.rY)((e,n)=>({get(){return e(),t},set(e){t=e,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class yf extends Jc{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=Mf(this.view.state),this.reactiveExtensionStorage=Mf(this.extensionStorage),this.on("beforeTransaction",({nextState:t})=>{this.reactiveState.value=t,this.reactiveExtensionStorage.value=this.extensionStorage}),(0,h.IG)(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,e){const n=super.registerPlugin(t,e);return this.reactiveState&&(this.reactiveState.value=n),n}unregisterPlugin(t){const e=super.unregisterPlugin(t);return this.reactiveState&&e&&(this.reactiveState.value=e),e}}const vf=(0,o.pM)({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=(0,h.KR)(),n=(0,o.nI)();return(0,o.nT)(()=>{const r=t.editor;r&&r.options.element&&e.value&&(0,o.dY)(()=>{if(!e.value||!r.options.element.firstChild)return;const t=(0,h.R1)(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=n.ctx._,n&&(r.appContext={...n.appContext,provides:n.provides}),r.setOptions({element:t}),r.createNodeViews()})}),(0,o.xo)(()=>{const e=t.editor;e&&(e.contentComponent=null,e.appContext=null)}),{rootEl:e}},render(){return(0,o.h)("div",{ref:t=>{this.rootEl=t}})}}),wf=((0,o.pM)({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=(0,h.KR)(null);return(0,o.sV)(()=>{const{pluginKey:e,editor:r,tippyOptions:o,shouldShow:s}=t;r.registerPlugin(xf({pluginKey:e,editor:r,element:n.value,tippyOptions:o,shouldShow:s}))}),(0,o.xo)(()=>{const{pluginKey:e,editor:n}=t;n.unregisterPlugin(e)}),()=>{var t;return(0,o.h)("div",{ref:n},null===(t=e.default)||void 0===t?void 0:t.call(e))}}}),(0,o.pM)({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return(0,o.h)(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),(0,o.pM)({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var t,e;return(0,o.h)(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))}}),(t={})=>{const e=(0,h.IJ)();return(0,o.sV)(()=>{e.value=new yf(t)}),(0,o.xo)(()=>{var t,n,r;const o=null===(t=e.value)||void 0===t?void 0:t.options.element,s=null===o||void 0===o?void 0:o.cloneNode(!0);null===(n=null===o||void 0===o?void 0:o.parentNode)||void 0===n||n.replaceChild(s,o),null===(r=e.value)||void 0===r||r.destroy()}),e});Boolean;const bf=/^\s*>\s$/,Wf=tu.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",la(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Zc({find:bf,type:this.type})]}}),kf=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Qf=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Cf=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Sf=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Of=Oa.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",la(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Xc({find:kf,type:this.type}),Xc({find:Cf,type:this.type})]},addPasteRules(){return[eu({find:Qf,type:this.type}),eu({find:Sf,type:this.type})]}}),Af="listItem",Tf="textStyle",Ef=/^\s*([-+*])\s$/,Lf=tu.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",la(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Af,this.editor.getAttributes(Tf)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Zc({find:Ef,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Zc({find:Ef,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Tf),editor:this.editor})),[t]}}),Df=/(^|[^`])`([^`]+)`(?!`)/,Nf=/(^|[^`])`([^`]+)`(?!`)/g,Rf=Oa.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",la(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Xc({find:Df,type:this.type})]},addPasteRules(){return[eu({find:Nf,type:this.type})]}}),If=/^```([a-z]+)?[\s\n]$/,Pf=/^~~~([a-z]+)?[\s\n]$/,$f=tu.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,r=[...(null===(e=t.firstElementChild)||void 0===e?void 0:e.classList)||[]],o=r.filter(t=>t.startsWith(n)).map(t=>t.replace(n,"")),s=o[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",la(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!(!t||e.parent.type.name!==this.name)&&(!(!n&&e.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith("\n\n");return!(!s||!i)&&t.chain().command(({tr:t})=>(t.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:s}=n;if(!s||o.parent.type!==this.type)return!1;const i=o.parentOffset===o.parent.nodeSize-2;if(!i)return!1;const l=o.after();if(void 0===l)return!1;const a=r.nodeAt(l);return a?t.commands.command(({tr:t})=>(t.setSelection(en.near(r.resolve(l))),!0)):t.commands.exitCode()}}},addInputRules(){return[Yc({find:If,type:this.type,getAttributes:t=>({language:t[1]})}),Yc({find:Pf,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new kn({key:new Sn("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,s=null===o||void 0===o?void 0:o.mode;if(!n||!s)return!1;const{tr:i,schema:l}=t.state,a=l.text(n.replace(/\r\n?/g,"\n"));return i.replaceSelectionWith(this.type.create({language:s},a)),i.selection.$from.parent.type!==this.type&&i.setSelection(sn.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),t.dispatch(i),!0}}})]}}),Hf=tu.create({name:"doc",topNode:!0,content:"block+"});function Bf(t={}){return new kn({view(e){return new zf(e,t)}})}class zf{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=e.width)&&void 0!==n?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map(e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}})}destroy(){this.handlers.forEach(({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r=this.editorView.dom,o=r.getBoundingClientRect(),s=o.width/r.offsetWidth,i=o.height/r.offsetHeight;if(n){let n=e.nodeBefore,r=e.nodeAfter;if(n||r){let e=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(e){let o=e.getBoundingClientRect(),s=n?o.bottom:o.top;n&&r&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let l=this.width/2*i;t={left:o.left,right:o.right,top:s-l,bottom:s+l}}}}if(!t){let e=this.editorView.coordsAtPos(this.cursorPos),n=this.width/2*s;t={left:e.left-n,right:e.left+n,top:e.top,bottom:e.bottom}}let l,a,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",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n),!p||p==document.body&&"static"==getComputedStyle(p).position)l=-pageXOffset,a=-pageYOffset;else{let t=p.getBoundingClientRect(),e=t.width/p.offsetWidth,n=t.height/p.offsetHeight;l=t.left-p.scrollLeft*e,a=t.top-p.scrollTop*n}this.element.style.left=(t.left-l)/s+"px",this.element.style.top=(t.top-a)/i+"px",this.element.style.width=(t.right-t.left)/s+"px",this.element.style.height=(t.bottom-t.top)/i+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,e,t):r;if(e&&!o){let t=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=Ne(this.editorView.state.doc,t,this.editorView.dragging.slice);null!=e&&(t=e)}this.setCursor(t),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}const Vf=$a.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Bf(this.options)]}});class Ff extends en{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return Ff.valid(n)?new Ff(n):en.near(n)}content(){return C.empty}eq(t){return t instanceof Ff&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new Ff(t.resolve(e.pos))}getBookmark(){return new jf(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!_f(t)||!Uf(t))return!1;let n=e.type.spec.allowGapCursor;if(null!=n)return n;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,n=!1){t:for(;;){if(!n&&Ff.valid(t))return t;let r=t.pos,o=null;for(let n=t.depth;;n--){let s=t.node(n);if(e>0?t.indexAfter(n)0){o=s.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;r+=e;let i=t.doc.resolve(r);if(Ff.valid(i))return i}for(;;){let s=e>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!an.isSelectable(o)){t=t.doc.resolve(r+o.nodeSize*e),n=!1;continue t}break}o=s,r+=e;let i=t.doc.resolve(r);if(Ff.valid(i))return i}return null}}}Ff.prototype.visible=!1,Ff.findFrom=Ff.findGapCursorFrom,en.jsonID("gapcursor",Ff);class jf{constructor(t){this.pos=t}map(t){return new jf(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return Ff.valid(e)?new Ff(e):en.near(e)}}function Kf(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function _f(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(0!=n)for(let t=r.child(n-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||Kf(t.type))return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}function Uf(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n!=r.childCount)for(let t=r.child(n);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||Kf(t.type))return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}function qf(){return new kn({props:{decorations:Zf,createSelectionBetween(t,e,n){return e.pos==n.pos&&Ff.valid(n)?new Ff(n):null},handleClick:Gf,handleKeyDown:Jf,handleDOMEvents:{beforeinput:Yf}}})}const Jf=pl({ArrowLeft:Xf("horiz",-1),ArrowRight:Xf("horiz",1),ArrowUp:Xf("vert",-1),ArrowDown:Xf("vert",1)});function Xf(t,e){const n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,o){let s=t.selection,i=e>0?s.$to:s.$from,l=s.empty;if(s instanceof sn){if(!o.endOfTextblock(n)||0==i.depth)return!1;l=!1,i=t.doc.resolve(e>0?i.after():i.before())}let a=Ff.findGapCursorFrom(i,e,l);return!!a&&(r&&r(t.tr.setSelection(new Ff(a))),!0)}}function Gf(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Ff.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&an.isSelectable(t.state.doc.nodeAt(o.inside)))&&(t.dispatch(t.state.tr.setSelection(new Ff(r))),!0)}function Yf(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof Ff))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=v.empty;for(let i=r.length-1;i>=0;i--)o=v.from(r[i].createAndFill(null,o));let s=t.state.tr.replace(n.pos,n.pos,new C(o,0,0));return s.setSelection(sn.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function Zf(t){if(!(t.selection instanceof Ff))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",pi.create(t.doc,[ii.widget(t.selection.head,e,{key:"gapcursor"})])}const tm=$a.create({name:"gapCursor",addProseMirrorPlugins(){return[qf()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!==(e=ca(ra(t,"allowGapCursor",n)))&&void 0!==e?e:null}}}),em=tu.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",la(this.options.HTMLAttributes,t)]},renderText(){return"\n"},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:t,storedMarks:o}=n;if(t.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:i}=r.extensionManager,l=o||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{if(e&&l&&s){const e=l.filter(t=>i.includes(t.type.name));t.ensureMarks(e)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),nm=tu.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){const n=this.options.levels.includes(t.attrs.level),r=n?t.attrs.level:this.options.levels[0];return[`h${r}`,la(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Yc({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var rm=200,om=function(){};om.prototype.append=function(t){return t.length?(t=om.from(t),!this.length&&t||t.length=e?om.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},om.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},om.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},om.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(e,n){return r.push(t(e,n))},e,n),r},om.from=function(t){return t instanceof om?t:t&&t.length?new sm(t):om.empty};var sm=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var o=e;o=n;o--)if(!1===t(this.values[o],r+o))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=rm)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=rm)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(om);om.empty=new sm([]);var im=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return to&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var o=this.left.length;return!(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(n,o)-o,r+o))&&(!(n=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(om),lm=om;const am=500;class pm{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--){let t=this.items.get(o-1);if(t.selection){--o;break}}e&&(n=this.remapping(o,this.items.length),r=n.maps.length);let s,i,l=t.tr,a=[],p=[];return this.items.forEach((t,e)=>{if(!t.step)return n||(n=this.remapping(o,e+1),r=n.maps.length),r--,void p.push(t);if(n){p.push(new um(t.map));let e,o=t.step.map(n.slice(r));o&&l.maybeStep(o).doc&&(e=l.mapping.maps[l.mapping.maps.length-1],a.push(new um(e,void 0,void 0,a.length+p.length))),r--,e&&n.appendMap(e,r)}else l.maybeStep(t.step);return t.selection?(s=n?t.selection.map(n.slice(r)):t.selection,i=new pm(this.items.slice(0,o).append(p.reverse().concat(a)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:i,transform:l,selection:s}}addTransform(t,e,n,r){let o=[],s=this.eventCount,i=this.items,l=!r&&i.length?i.get(i.length-1):null;for(let p=0;phm&&(i=cm(i,a),s-=a),new pm(i.append(o),s)}remapping(t,e){let n=new Yt;return this.items.forEach((e,r)=>{let o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,o)},t,e),n}addMaps(t){return 0==this.eventCount?this:new pm(this.items.append(t.map(t=>new um(t))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),o=t.mapping,s=t.steps.length,i=this.eventCount;this.items.forEach(t=>{t.selection&&i--},r);let l=e;this.items.forEach(e=>{let r=o.getMirror(--l);if(null==r)return;s=Math.min(s,r);let a=o.maps[r];if(e.step){let s=t.steps[r].invert(t.docs[r]),p=e.selection&&e.selection.map(o.slice(l+1,r));p&&i++,n.push(new um(a,s,p))}else n.push(new um(a))},r);let a=[];for(let u=e;uam&&(c=c.compress(this.items.length-n.length)),c}emptyItemCount(){let t=0;return this.items.forEach(e=>{e.step||t++}),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,r=[],o=0;return this.items.forEach((s,i)=>{if(i>=t)r.push(s),s.selection&&o++;else if(s.step){let t=s.step.map(e.slice(n)),i=t&&t.getMap();if(n--,i&&e.appendMap(i,n),t){let l=s.selection&&s.selection.map(e.slice(n));l&&o++;let a,p=new um(i.invert(),t,l),c=r.length-1;(a=r.length&&r[c].merge(p))?r[c]=a:r.push(p)}}else s.map&&n--},this.items.length,0),new pm(lm.from(r.reverse()),o)}}function cm(t,e){let n;return t.forEach((t,r)=>{if(t.selection&&0==e--)return n=r,!1}),t.slice(n)}pm.empty=new pm(lm.empty,0);class um{constructor(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new um(e.getMap().invert(),e,this.selection)}}}class dm{constructor(t,e,n,r,o){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}const hm=20;function fm(t,e,n,r){let o,s=n.getMeta(bm);if(s)return s.historyState;n.getMeta(Wm)&&(t=new dm(t.done,t.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(i&&i.getMeta(bm))return i.getMeta(bm).redo?new dm(t.done.addTransform(n,void 0,r,wm(e)),t.undone,gm(n.mapping.maps),t.prevTime,t.prevComposition):new dm(t.done,t.undone.addTransform(n,void 0,r,wm(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||i&&!1===i.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new dm(t.done.rebased(n,o),t.undone.rebased(n,o),xm(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new dm(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),xm(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);{let o=n.getMeta("composition"),s=0==t.prevTime||!i&&t.prevComposition!=o&&(t.prevTime<(n.time||0)-r.newGroupDelay||!mm(n,t.prevRanges)),l=i?xm(t.prevRanges,n.mapping):gm(n.mapping.maps);return new dm(t.done.addTransform(n,s?e.selection.getBookmark():void 0,r,wm(e)),pm.empty,l,n.time,null==o?t.prevComposition:o)}}function mm(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((t,r)=>{for(let o=0;o=e[o]&&(n=!0)}),n}function gm(t){let e=[];for(let n=t.length-1;n>=0&&0==e.length;n--)t[n].forEach((t,n,r,o)=>e.push(r,o));return e}function xm(t,e){if(!t)return null;let n=[];for(let r=0;r{let o=bm.getState(n);if(!o||0==(t?o.undone:o.done).eventCount)return!1;if(r){let s=Mm(o,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const Cm=Qm(!1,!0),Sm=Qm(!0,!0);Qm(!1,!1),Qm(!0,!1);const Om=$a.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Cm(t,e),redo:()=>({state:t,dispatch:e})=>Sm(t,e)}},addProseMirrorPlugins(){return[km(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()}}}),Am=tu.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",la(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!nu(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$from:r,$to:o}=n,s=t();return 0===r.parentOffset?s.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):hc(n)?s.insertContentAt(o.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:t,dispatch:e})=>{var n;if(e){const{$to:e}=t.selection,r=e.end();if(e.nodeAfter)e.nodeAfter.isTextblock?t.setSelection(sn.create(t.doc,e.pos+1)):e.nodeAfter.isBlock?t.setSelection(an.create(t.doc,e.pos)):t.setSelection(sn.create(t.doc,e.pos));else{const o=null===(n=e.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();o&&(t.insert(r,o),t.setSelection(sn.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Gc({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Tm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Em=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Lm=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Dm=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Nm=Oa.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",la(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Xc({find:Tm,type:this.type}),Xc({find:Lm,type:this.type})]},addPasteRules(){return[eu({find:Em,type:this.type}),eu({find:Dm,type:this.type})]}}),Rm=tu.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",la(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Im="listItem",Pm="textStyle",$m=/^(\d+)\.\s$/,Hm=tu.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return 1===e?["ol",la(this.options.HTMLAttributes,n),0]:["ol",la(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Im,this.editor.getAttributes(Pm)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Zc({find:$m,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Zc({find:$m,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(Pm)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[t]}}),Bm=tu.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",la(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),zm=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Vm=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Fm=Oa.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}]},renderHTML({HTMLAttributes:t}){return["s",la(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Xc({find:zm,type:this.type})]},addPasteRules(){return[eu({find:Vm,type:this.type})]}}),jm=tu.create({name:"text",group:"inline"}),Km=$a.create({name:"starterKit",addExtensions(){const t=[];return!1!==this.options.bold&&t.push(Of.configure(this.options.bold)),!1!==this.options.blockquote&&t.push(Wf.configure(this.options.blockquote)),!1!==this.options.bulletList&&t.push(Lf.configure(this.options.bulletList)),!1!==this.options.code&&t.push(Rf.configure(this.options.code)),!1!==this.options.codeBlock&&t.push($f.configure(this.options.codeBlock)),!1!==this.options.document&&t.push(Hf.configure(this.options.document)),!1!==this.options.dropcursor&&t.push(Vf.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&t.push(tm.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&t.push(em.configure(this.options.hardBreak)),!1!==this.options.heading&&t.push(nm.configure(this.options.heading)),!1!==this.options.history&&t.push(Om.configure(this.options.history)),!1!==this.options.horizontalRule&&t.push(Am.configure(this.options.horizontalRule)),!1!==this.options.italic&&t.push(Nm.configure(this.options.italic)),!1!==this.options.listItem&&t.push(Rm.configure(this.options.listItem)),!1!==this.options.orderedList&&t.push(Hm.configure(this.options.orderedList)),!1!==this.options.paragraph&&t.push(Bm.configure(this.options.paragraph)),!1!==this.options.strike&&t.push(Fm.configure(this.options.strike)),!1!==this.options.text&&t.push(jm.configure(this.options.text)),t}});var _m,Um;if("undefined"!=typeof WeakMap){let t=new WeakMap;_m=e=>t.get(e),Um=(e,n)=>(t.set(e,n),n)}else{const t=[],e=10;let n=0;_m=e=>{for(let n=0;n(n==e&&(n=0),t[n++]=r,t[n++]=o)}var qm=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e=n){(s||(s=[])).push({type:"overlong_rowspan",pos:c,n:d-t});break}const l=o+t*e;for(let t=0;tr&&(s+=o.attrs.colspan)}}for(let t=0;t1&&(n=!0)}-1==e?e=s:e!=s&&(e=Math.max(e,s))}return e}function Gm(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function ng(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if("cell"===n||"header_cell"===n)return t.node(e)}return null}function rg(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if("row"==e.node(n).type.spec.tableRole)return!0;return!1}function og(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&"cell"==e.node.type.spec.tableRole)return e.$anchor;const n=eg(e.$head)||sg(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function sg(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n-e.nodeSize)}}function ig(t){return"row"==t.parent.type.spec.tableRole&&!!t.nodeAfter}function lg(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function ag(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function pg(t,e,n){const r=t.node(-1),o=qm.get(r),s=t.start(-1),i=o.nextCell(t.pos-s,e,n);return null==i?null:t.node(0).resolve(s+i)}function cg(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(t=>t>0)||(r.colwidth=null)),r}function ug(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let t=0;tt!=e.pos-o);l.unshift(e.pos-o);const a=l.map(t=>{const e=n.nodeAt(t);if(!e)throw RangeError(`No cell with offset ${t} found`);const r=o+t+1;return new nn(i.resolve(r),i.resolve(r+e.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=e}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(ig(r)&&ig(o)&&ag(r,o)){const e=this.$anchorCell.node(-1)!=r.node(-1);return e&&this.isRowSelection()?t.rowSelection(r,o):e&&this.isColSelection()?t.colSelection(r,o):new t(r,o)}return sn.between(r,o)}content(){const t=this.$anchorCell.node(-1),e=qm.get(t),n=this.$anchorCell.start(-1),r=e.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},s=[];for(let l=r.top;l0||c>0){let t=a.attrs;if(p>0&&(t=cg(t,0,p)),c>0&&(t=cg(t,t.colspan-c,c)),l.leftr.bottom){const t={...a.attrs,rowspan:Math.min(l.bottom,r.bottom)-Math.max(l.top,r.top)};a=l.top0)return!1;const n=t+this.$anchorCell.nodeAfter.attrs.rowspan,r=e+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=qm.get(r),s=e.start(-1),i=o.findCell(e.pos-s),l=o.findCell(n.pos-s),a=e.node(0);return i.top<=l.top?(i.top>0&&(e=a.resolve(s+o.map[i.left])),l.bottom0&&(n=a.resolve(s+o.map[l.left])),i.bottom0)return!1;const s=r+this.$anchorCell.nodeAfter.attrs.colspan,i=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,i)==e.width}eq(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=qm.get(r),s=e.start(-1),i=o.findCell(e.pos-s),l=o.findCell(n.pos-s),a=e.node(0);return i.left<=l.left?(i.left>0&&(e=a.resolve(s+o.map[i.top*o.width])),l.right0&&(n=a.resolve(s+o.map[l.top*o.width])),i.right{e.push(ii.node(n,n+t.nodeSize,{class:"selectedCell"}))}),pi.create(t.doc,e)}function gg({$from:t,$to:e}){if(t.pos==e.pos||t.pos=0;o--,n++)if(t.after(o+1)=0;s--,r--)if(e.before(s+1)>e.start(s))break;return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}function xg({$from:t,$to:e}){let n,r;for(let o=t.depth;o>0;o--){const e=t.node(o);if("cell"===e.type.spec.tableRole||"header_cell"===e.type.spec.tableRole){n=e;break}}for(let o=e.depth;o>0;o--){const t=e.node(o);if("cell"===t.type.spec.tableRole||"header_cell"===t.type.spec.tableRole){r=t;break}}return n!==r&&0===e.parentOffset}function Mg(t,e,n){const r=(e||t).selection,o=(e||t).doc;let s,i;if(r instanceof an&&(i=r.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)s=hg.create(o,r.from);else if("row"==i){const t=o.resolve(r.from+1);s=hg.rowSelection(t,t)}else if(!n){const t=qm.get(r.node),e=r.from+1,n=e+t.map[t.width*t.height-1];s=hg.create(o,e+1,n)}}else r instanceof sn&&gg(r)?s=sn.create(o,r.from):r instanceof sn&&xg(r)&&(s=sn.create(o,r.$from.start(),r.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}var yg=new Sn("fix-tables");function vg(t,e,n,r){const o=t.childCount,s=e.childCount;t:for(let i=0,l=0;i{"table"==e.type.spec.tableRole&&(n=bg(t,e,r,n))};return e?e.doc!=t.doc&&vg(e.doc,t.doc,0,r):t.doc.descendants(r),n}function bg(t,e,n,r){const o=qm.get(e);if(!o.problems)return r;r||(r=t.tr);const s=[];for(let a=0;a0){let e="cell";n.firstChild&&(e=n.firstChild.type.spec.tableRole);const s=[];for(let n=0;n0?-1:0;dg(e,r,o+s)&&(s=0==o||o==e.width?null:0);for(let i=0;i0&&o0&&e.map[l-1]==a||o0?-1:0;Ag(e,r,o+a)&&(a=0==o||o==e.height?null:0);for(let p=0,c=e.width*o;p0&&o0&&s==e.map[c-e.width]){const e=n.nodeAt(s).attrs;t.setNodeMarkup(t.mapping.slice(l).map(s+r),null,{...e,rowspan:e.rowspan-1}),p+=e.colspan-1}else if(o0&&n[s]==n[s-1]||r.right0&&n[o]==n[o-t]||r.bottomn[t.type.spec.tableRole])(t,e)}function Hg(t){return(e,n)=>{var r;const o=e.selection;let s,i;if(o instanceof hg){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;s=o.$anchorCell.nodeAfter,i=o.$anchorCell.pos}else{if(s=ng(o.$from),!s)return!1;i=null==(r=eg(o.$from))?void 0:r.pos}if(null==s||null==i)return!1;if(1==s.attrs.colspan&&1==s.attrs.rowspan)return!1;if(n){let r=s.attrs;const l=[],a=r.colwidth;r.rowspan>1&&(r={...r,rowspan:1}),r.colspan>1&&(r={...r,colspan:1});const p=Wg(e),c=e.tr;for(let t=0;t{n.attrs[t]!==e&&s.setNodeMarkup(r,null,{...n.attrs,[t]:e})}):s.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(s)}return!0}}function zg(t){return function(e,n){if(!rg(e))return!1;if(n){const r=Zm(e.schema),o=Wg(e),s=e.tr,i=o.map.cellsInRect("column"==t?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==t?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=i.map(t=>o.table.nodeAt(t));for(let t=0;t{const e=t+o.tableStart,n=s.doc.nodeAt(e);n&&s.setNodeMarkup(e,u,n.attrs)}),n(s)}return!0}}Fg("row",{useDeprecatedLogic:!0}),Fg("column",{useDeprecatedLogic:!0});var jg=Fg("cell",{useDeprecatedLogic:!0});function Kg(t,e){if(e<0){const e=t.nodeBefore;if(e)return t.pos-e.nodeSize;for(let n=t.index(-1)-1,r=t.before();n>=0;n--){const e=t.node(-1).child(n),o=e.lastChild;if(o)return r-1-o.nodeSize;r-=e.nodeSize}}else{if(t.index()0;r--){const o=n.node(r);if("table"==o.type.spec.tableRole)return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}function qg(t,e){const n=t.selection;if(!(n instanceof hg))return!1;if(e){const r=t.tr,o=Zm(t.schema).cell.createAndFill().content;n.forEachCell((t,e)=>{t.content.eq(o)||r.replace(r.mapping.map(e+1),r.mapping.map(e+t.nodeSize-1),new C(o,0,0))}),r.docChanged&&e(r)}return!0}function Jg(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;while(1==e.childCount&&(n>0&&r>0||"table"==e.child(0).type.spec.tableRole))n--,r--,e=e.child(0).content;const o=e.child(0),s=o.type.spec.tableRole,i=o.type.schema,l=[];if("row"==s)for(let a=0;a=0;e--){const{rowspan:r,colspan:s}=t.child(e).attrs;for(let t=o;t=e.length&&e.push(v.empty),n[o]r&&(l=l.type.createChecked(cg(l.attrs,l.attrs.colspan,n+l.attrs.colspan-r),l.content)),i.push(l),n+=l.attrs.colspan;for(let n=1;no&&(e=e.type.create({...e.attrs,rowspan:Math.max(1,o-e.attrs.rowspan)},e.content)),i.push(e)}t.push(v.from(i))}n=t,e=o}return{width:t,height:e,rows:n}}function Zg(t,e,n,r,o,s,i){const l=t.doc.type.schema,a=Zm(l);let p,c;if(o>e.width)for(let u=0,d=0;ue.height){const l=[];for(let t=0,r=(e.height-1)*e.width;t=e.width)&&n.nodeAt(e.map[r+t]).type==a.header_cell;l.push(o?c||(c=a.header_cell.createAndFill()):p||(p=a.cell.createAndFill()))}const u=a.row.create(null,v.from(l)),d=[];for(let t=e.height;t{if(!o)return!1;const s=n.selection;if(s instanceof hg)return ox(n,r,en.near(s.$headCell,e));if("horiz"!=t&&!s.empty)return!1;const i=cx(o,t,e);if(null==i)return!1;if("horiz"==t)return ox(n,r,en.near(n.doc.resolve(s.head+e),e));{const o=n.doc.resolve(i),s=pg(o,t,e);let l;return l=s?en.near(s,1):e<0?en.near(n.doc.resolve(o.before(-1)),-1):en.near(n.doc.resolve(o.after(-1)),1),ox(n,r,l)}}}function ix(t,e){return(n,r,o)=>{if(!o)return!1;const s=n.selection;let i;if(s instanceof hg)i=s;else{const r=cx(o,t,e);if(null==r)return!1;i=new hg(n.doc.resolve(r))}const l=pg(i.$headCell,t,e);return!!l&&ox(n,r,new hg(i.$anchorCell,l))}}function lx(t,e){const n=t.state.doc,r=eg(n.resolve(e));return!!r&&(t.dispatch(t.state.tr.setSelection(new hg(r))),!0)}function ax(t,e,n){if(!rg(t.state))return!1;let r=Jg(n);const o=t.state.selection;if(o instanceof hg){r||(r={width:1,height:1,rows:[v.from(Gg(Zm(t.state.schema).cell,n))]});const e=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),i=qm.get(e).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=Yg(r,i.right-i.left,i.bottom-i.top),nx(t.state,t.dispatch,s,i,r),!0}if(r){const e=og(t.state),n=e.start(-1);return nx(t.state,t.dispatch,n,qm.get(e.node(-1)).findCell(e.pos-n),r),!0}return!1}function px(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=ux(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof hg)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&null!=(o=eg(t.state.selection.$anchor))&&(null==(n=dx(t,e))?void 0:n.pos)!=o.pos)s(o,e),e.preventDefault();else if(!r)return;function s(e,n){let r=dx(t,n);const o=null==tg.getState(t.state);if(!r||!ag(e,r)){if(!o)return;r=e}const s=new hg(e,r);if(o||!t.state.selection.eq(s)){const n=t.state.tr.setSelection(s);o&&n.setMeta(tg,e.pos),t.dispatch(n)}}function i(){t.root.removeEventListener("mouseup",i),t.root.removeEventListener("dragstart",i),t.root.removeEventListener("mousemove",l),null!=tg.getState(t.state)&&t.dispatch(t.state.tr.setMeta(tg,-1))}function l(n){const o=n,l=tg.getState(t.state);let a;if(null!=l)a=t.state.doc.resolve(l);else if(ux(t,o.target)!=r&&(a=dx(t,e),!a))return i();a&&s(a,o)}t.root.addEventListener("mouseup",i),t.root.addEventListener("dragstart",i),t.root.addEventListener("mousemove",l)}function cx(t,e,n){if(!(t.state.selection instanceof sn))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const s=r.node(o),i=n<0?r.index(o):r.indexAfter(o);if(i!=(n<0?0:s.childCount))return null;if("cell"==s.type.spec.tableRole||"header_cell"==s.type.spec.tableRole){const s=r.before(o),i="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(i)?s:null}}return null}function ux(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e;return null}function dx(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?eg(t.state.doc.resolve(n.pos)):null}var hx=class{constructor(t,e){this.node=t,this.defaultCellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${e}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),fx(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type==this.node.type&&(this.node=t,fx(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return"attributes"==t.type&&(t.target==this.table||this.colgroup.contains(t.target))}};function fx(t,e,n,r,o,s){var i;let l=0,a=!0,p=e.firstChild;const c=t.firstChild;if(c){for(let t=0,n=0;tnew r(t,n,e)),new xx(-1,!1)},apply(t,e){return e.apply(t)}},props:{attributes:t=>{const e=mx.getState(t);return e&&e.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(e,n)=>{Mx(e,n,t,o)},mouseleave:t=>{yx(t)},mousedown:(t,r)=>{vx(t,r,e,n)}},decorations:t=>{const e=mx.getState(t);if(e&&e.activeHandle>-1)return Ax(t,e.activeHandle)},nodeViews:{}}});return s}var xx=class t{constructor(t,e){this.activeHandle=t,this.dragging=e}apply(e){const n=this,r=e.getMeta(mx);if(r&&null!=r.setHandle)return new t(r.setHandle,!1);if(r&&void 0!==r.setDragging)return new t(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let r=e.mapping.map(n.activeHandle,-1);return ig(e.doc.resolve(r))||(r=-1),new t(r,n.dragging)}return n}};function Mx(t,e,n,r){if(!t.editable)return;const o=mx.getState(t.state);if(o&&!o.dragging){const s=bx(e.target);let i=-1;if(s){const{left:r,right:o}=s.getBoundingClientRect();e.clientX-r<=n?i=Wx(t,e,"left",n):o-e.clientX<=n&&(i=Wx(t,e,"right",n))}if(i!=o.activeHandle){if(!r&&-1!==i){const e=t.state.doc.resolve(i),n=e.node(-1),r=qm.get(n),o=e.start(-1),s=r.colCount(e.pos-o)+e.nodeAfter.attrs.colspan-1;if(s==r.width-1)return}Qx(t,i)}}}function yx(t){if(!t.editable)return;const e=mx.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Qx(t,-1)}function vx(t,e,n,r){var o;if(!t.editable)return!1;const s=null!=(o=t.dom.ownerDocument.defaultView)?o:window,i=mx.getState(t.state);if(!i||-1==i.activeHandle||i.dragging)return!1;const l=t.state.doc.nodeAt(i.activeHandle),a=wx(t,i.activeHandle,l.attrs);function p(e){s.removeEventListener("mouseup",p),s.removeEventListener("mousemove",c);const r=mx.getState(t.state);(null==r?void 0:r.dragging)&&(Cx(t,r.activeHandle,kx(r.dragging,e,n)),t.dispatch(t.state.tr.setMeta(mx,{setDragging:null})))}function c(e){if(!e.which)return p(e);const o=mx.getState(t.state);if(o&&o.dragging){const s=kx(o.dragging,e,n);Sx(t,o.activeHandle,s,r)}}return t.dispatch(t.state.tr.setMeta(mx,{setDragging:{startX:e.clientX,startWidth:a}})),Sx(t,i.activeHandle,a,r),s.addEventListener("mouseup",p),s.addEventListener("mousemove",c),e.preventDefault(),!0}function wx(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const s=t.domAtPos(e),i=s.node.childNodes[s.offset];let l=i.offsetWidth,a=n;if(r)for(let p=0;p{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function Px(t,e,n,r,o){const s=Ix(t),i=[],l=[];for(let p=0;p{const{selection:e}=t.state;if(!$x(e))return!1;let n=0;const r=Zp(e.ranges[0].$from,t=>"table"===t.type.name);null===r||void 0===r||r.node.descendants(t=>{if("table"===t.type.name)return!1;["tableCell","tableHeader"].includes(t.type.name)&&(n+=1)});const o=n===e.ranges.length;return!!o&&(t.commands.deleteTable(),!0)},Bx=tu.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Dx,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=Nx(t,this.options.cellMinWidth),s=["table",la(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},s]:s},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:s})=>{const i=Px(s.schema,t,e,n);if(o){const t=r.selection.from+1;r.replaceSelectionWith(i).scrollIntoView().setSelection(sn.near(r.doc.resolve(t)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>Qg(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>Cg(t,e),deleteColumn:()=>({state:t,dispatch:e})=>Og(t,e),addRowBefore:()=>({state:t,dispatch:e})=>Eg(t,e),addRowAfter:()=>({state:t,dispatch:e})=>Lg(t,e),deleteRow:()=>({state:t,dispatch:e})=>Ng(t,e),deleteTable:()=>({state:t,dispatch:e})=>Ug(t,e),mergeCells:()=>({state:t,dispatch:e})=>Pg(t,e),splitCell:()=>({state:t,dispatch:e})=>$g(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Fg("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Fg("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>jg(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>!!Pg(t,e)||$g(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>Bg(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>_g(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>_g(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&wg(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const n=hg.create(e.doc,t.anchorCell,t.headCell);e.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Hx,"Mod-Backspace":Hx,Delete:Hx,"Mod-Delete":Hx}},addProseMirrorPlugins(){const t=this.options.resizable&&this.editor.isEditable;return[...t?[gx({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Tx({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:ca(ra(t,"tableRole",e))}}}),zx=tu.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",la(this.options.HTMLAttributes,t),0]}}),Vx=Oa.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("underline")&&{}}]},renderHTML({HTMLAttributes:t}){return["u",la(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Fx="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",jx="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Kx="numeric",_x="ascii",Ux="alpha",qx="asciinumeric",Jx="alphanumeric",Xx="domain",Gx="emoji",Yx="scheme",Zx="slashscheme",tM="whitespace";function eM(t,e){return t in e||(e[t]=[]),e[t]}function nM(t,e,n){e[Kx]&&(e[qx]=!0,e[Jx]=!0),e[_x]&&(e[qx]=!0,e[Ux]=!0),e[qx]&&(e[Jx]=!0),e[Ux]&&(e[Jx]=!0),e[Jx]&&(e[Xx]=!0),e[Gx]&&(e[Xx]=!0);for(const r in e){const e=eM(r,n);e.indexOf(t)<0&&e.push(t)}}function rM(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function oM(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}oM.groups={},oM.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;rt.ta(e,n,r,o),iM=(t,e,n,r,o)=>t.tr(e,n,r,o),lM=(t,e,n,r,o)=>t.ts(e,n,r,o),aM=(t,e,n,r,o)=>t.tt(e,n,r,o),pM="WORD",cM="UWORD",uM="ASCIINUMERICAL",dM="ALPHANUMERICAL",hM="LOCALHOST",fM="TLD",mM="UTLD",gM="SCHEME",xM="SLASH_SCHEME",MM="NUM",yM="WS",vM="NL",wM="OPENBRACE",bM="CLOSEBRACE",WM="OPENBRACKET",kM="CLOSEBRACKET",QM="OPENPAREN",CM="CLOSEPAREN",SM="OPENANGLEBRACKET",OM="CLOSEANGLEBRACKET",AM="FULLWIDTHLEFTPAREN",TM="FULLWIDTHRIGHTPAREN",EM="LEFTCORNERBRACKET",LM="RIGHTCORNERBRACKET",DM="LEFTWHITECORNERBRACKET",NM="RIGHTWHITECORNERBRACKET",RM="FULLWIDTHLESSTHAN",IM="FULLWIDTHGREATERTHAN",PM="AMPERSAND",$M="APOSTROPHE",HM="ASTERISK",BM="AT",zM="BACKSLASH",VM="BACKTICK",FM="CARET",jM="COLON",KM="COMMA",_M="DOLLAR",UM="DOT",qM="EQUALS",JM="EXCLAMATION",XM="HYPHEN",GM="PERCENT",YM="PIPE",ZM="PLUS",ty="POUND",ey="QUERY",ny="QUOTE",ry="FULLWIDTHMIDDLEDOT",oy="SEMI",sy="SLASH",iy="TILDE",ly="UNDERSCORE",ay="EMOJI",py="SYM";var cy=Object.freeze({__proto__:null,ALPHANUMERICAL:dM,AMPERSAND:PM,APOSTROPHE:$M,ASCIINUMERICAL:uM,ASTERISK:HM,AT:BM,BACKSLASH:zM,BACKTICK:VM,CARET:FM,CLOSEANGLEBRACKET:OM,CLOSEBRACE:bM,CLOSEBRACKET:kM,CLOSEPAREN:CM,COLON:jM,COMMA:KM,DOLLAR:_M,DOT:UM,EMOJI:ay,EQUALS:qM,EXCLAMATION:JM,FULLWIDTHGREATERTHAN:IM,FULLWIDTHLEFTPAREN:AM,FULLWIDTHLESSTHAN:RM,FULLWIDTHMIDDLEDOT:ry,FULLWIDTHRIGHTPAREN:TM,HYPHEN:XM,LEFTCORNERBRACKET:EM,LEFTWHITECORNERBRACKET:DM,LOCALHOST:hM,NL:vM,NUM:MM,OPENANGLEBRACKET:SM,OPENBRACE:wM,OPENBRACKET:WM,OPENPAREN:QM,PERCENT:GM,PIPE:YM,PLUS:ZM,POUND:ty,QUERY:ey,QUOTE:ny,RIGHTCORNERBRACKET:LM,RIGHTWHITECORNERBRACKET:NM,SCHEME:gM,SEMI:oy,SLASH:sy,SLASH_SCHEME:xM,SYM:py,TILDE:iy,TLD:fM,UNDERSCORE:ly,UTLD:mM,UWORD:cM,WORD:pM,WS:yM});const uy=/[a-z]/,dy=/\p{L}/u,hy=/\p{Emoji}/u,fy=/\d/,my=/\s/;const gy="\r",xy="\n",My="️",yy="‍",vy="";let wy=null,by=null;function Wy(t=[]){const e={};oM.groups=e;const n=new oM;null==wy&&(wy=Sy(Fx)),null==by&&(by=Sy(jx)),aM(n,"'",$M),aM(n,"{",wM),aM(n,"}",bM),aM(n,"[",WM),aM(n,"]",kM),aM(n,"(",QM),aM(n,")",CM),aM(n,"<",SM),aM(n,">",OM),aM(n,"(",AM),aM(n,")",TM),aM(n,"「",EM),aM(n,"」",LM),aM(n,"『",DM),aM(n,"』",NM),aM(n,"<",RM),aM(n,">",IM),aM(n,"&",PM),aM(n,"*",HM),aM(n,"@",BM),aM(n,"`",VM),aM(n,"^",FM),aM(n,":",jM),aM(n,",",KM),aM(n,"$",_M),aM(n,".",UM),aM(n,"=",qM),aM(n,"!",JM),aM(n,"-",XM),aM(n,"%",GM),aM(n,"|",YM),aM(n,"+",ZM),aM(n,"#",ty),aM(n,"?",ey),aM(n,'"',ny),aM(n,"/",sy),aM(n,";",oy),aM(n,"~",iy),aM(n,"_",ly),aM(n,"\\",zM),aM(n,"・",ry);const r=iM(n,fy,MM,{[Kx]:!0});iM(r,fy,r);const o=iM(r,uy,uM,{[qx]:!0}),s=iM(r,dy,dM,{[Jx]:!0}),i=iM(n,uy,pM,{[_x]:!0});iM(i,fy,o),iM(i,uy,i),iM(o,fy,o),iM(o,uy,o);const l=iM(n,dy,cM,{[Ux]:!0});iM(l,uy),iM(l,fy,s),iM(l,dy,l),iM(s,fy,s),iM(s,uy),iM(s,dy,s);const a=aM(n,xy,vM,{[tM]:!0}),p=aM(n,gy,yM,{[tM]:!0}),c=iM(n,my,yM,{[tM]:!0});aM(n,vy,c),aM(p,xy,a),aM(p,vy,c),iM(p,my,c),aM(c,gy),aM(c,xy),iM(c,my,c),aM(c,vy,c);const u=iM(n,hy,ay,{[Gx]:!0});aM(u,"#"),iM(u,hy,u),aM(u,My,u);const d=aM(u,yy);aM(d,"#"),iM(d,hy,u);const h=[[uy,i],[fy,o]],f=[[uy,null],[dy,l],[fy,s]];for(let m=0;mt[0]>e[0]?1:-1);for(let m=0;m=0?o[Xx]=!0:uy.test(e)?fy.test(e)?o[qx]=!0:o[_x]=!0:o[Kx]=!0,lM(n,e,e,o)}return lM(n,"localhost",hM,{ascii:!0}),n.jd=new oM(py),{start:n,tokens:Object.assign({groups:e},cy)}}function ky(t,e){const n=Qy(e.replace(/[A-Z]/g,t=>t.toLowerCase())),r=n.length,o=[];let s=0,i=0;while(i=0&&(u+=n[i].length,d++),p+=n[i].length,s+=n[i].length,i++;s-=u,i-=d,p-=u,o.push({t:c.t,v:e.slice(s-p,s),s:s-p,e:s})}return o}function Qy(t){const e=[],n=t.length;let r=0;while(r56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?t[r]:t.slice(r,r+2);e.push(i),r+=i.length}return e}function Cy(t,e,n,r,o){let s;const i=e.length;for(let l=0;l=0)s++;if(s>0){e.push(n.join(""));for(let e=parseInt(t.substring(r,r+s),10);e>0;e--)n.pop();r+=s}else n.push(t[r]),r++}return e}const Oy={defaultProtocol:"http",events:null,format:Ty,formatHref:Ty,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ay(t,e=null){let n=Object.assign({},Oy);t&&(n=Object.assign(n,t instanceof Ay?t.o:t));const r=n.ignoreTags,o=[];for(let s=0;sn?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Oy.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),s=this.toFormattedString(t),i={},l=t.get("className",n,e),a=t.get("target",n,e),p=t.get("rel",n,e),c=t.getObj("attributes",n,e),u=t.getObj("events",n,e);return i.href=r,l&&(i.class=l),a&&(i.target=a),p&&(i.rel=p),c&&Object.assign(i,c),{tagName:o,attributes:i,content:s,eventListeners:u}}};const Dy=Ly("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Ny=Ly("text"),Ry=Ly("nl"),Iy=Ly("url",{isLink:!0,toHref(t=Oy.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==hM&&t[1].t===jM}});const Py=t=>new oM(t);function $y({groups:t}){const e=t.domain.concat([PM,HM,BM,zM,VM,FM,_M,qM,XM,MM,GM,YM,ZM,ty,sy,py,iy,ly]),n=[$M,jM,KM,UM,JM,GM,ey,ny,oy,SM,OM,wM,bM,kM,WM,QM,CM,AM,TM,EM,LM,DM,NM,RM,IM],r=[PM,$M,HM,zM,VM,FM,_M,qM,XM,wM,bM,GM,YM,ZM,ty,ey,sy,py,iy,ly],o=Py(),s=aM(o,iy);sM(s,r,s),sM(s,t.domain,s);const i=Py(),l=Py(),a=Py();sM(o,t.domain,i),sM(o,t.scheme,l),sM(o,t.slashscheme,a),sM(i,r,s),sM(i,t.domain,i);const p=aM(i,BM);aM(s,BM,p),aM(l,BM,p),aM(a,BM,p);const c=aM(s,UM);sM(c,r,s),sM(c,t.domain,s);const u=Py();sM(p,t.domain,u),sM(u,t.domain,u);const d=aM(u,UM);sM(d,t.domain,u);const h=Py(Dy);sM(d,t.tld,h),sM(d,t.utld,h),aM(p,hM,h);const f=aM(u,XM);aM(f,XM,f),sM(f,t.domain,u),sM(h,t.domain,u),aM(h,UM,d),aM(h,XM,f);const m=aM(h,jM);sM(m,t.numeric,Dy);const g=aM(i,XM),x=aM(i,UM);aM(g,XM,g),sM(g,t.domain,i),sM(x,r,s),sM(x,t.domain,i);const M=Py(Iy);sM(x,t.tld,M),sM(x,t.utld,M),sM(M,t.domain,i),sM(M,r,s),aM(M,UM,x),aM(M,XM,g),aM(M,BM,p);const y=aM(M,jM),v=Py(Iy);sM(y,t.numeric,v);const w=Py(Iy),b=Py();sM(w,e,w),sM(w,n,b),sM(b,e,w),sM(b,n,b),aM(M,sy,w),aM(v,sy,w);const W=aM(l,jM),k=aM(a,jM),Q=aM(k,sy),C=aM(Q,sy);sM(l,t.domain,i),aM(l,UM,x),aM(l,XM,g),sM(a,t.domain,i),aM(a,UM,x),aM(a,XM,g),sM(W,t.domain,w),aM(W,sy,w),aM(W,ey,w),sM(C,t.domain,w),sM(C,e,w),aM(C,sy,w);const S=[[wM,bM],[WM,kM],[QM,CM],[SM,OM],[AM,TM],[EM,LM],[DM,NM],[RM,IM]];for(let O=0;O=0&&d++,o++,c++;if(d<0)o-=c,o0&&(s.push(By(Ny,e,i)),i=[]),o-=d,c-=d;const t=u.t,r=n.slice(o-c,o);s.push(By(t,e,r))}}return i.length>0&&s.push(By(Ny,e,i)),s}function By(t,e,n){const r=n[0].s,o=n[n.length-1].e,s=e.slice(r,o);return new t(s,n)}const zy="undefined"!==typeof console&&console&&console.warn||(()=>{}),Vy="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Fy={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function jy(){return oM.groups={},Fy.scanner=null,Fy.parser=null,Fy.tokenQueue=[],Fy.pluginQueue=[],Fy.customSchemes=[],Fy.initialized=!1,Fy}function Ky(t,e=!1){if(Fy.initialized&&zy(`linkifyjs: already initialized - will not register custom scheme "${t}" ${Vy}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error('linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat');Fy.customSchemes.push([t,e])}function _y(){Fy.scanner=Wy(Fy.customSchemes);for(let t=0;t{const o=e.some(t=>t.docChanged)&&!n.doc.eq(r.doc),s=e.some(t=>t.getMeta("preventAutolink"));if(!o||s)return;const{tr:i}=r,l=Xp(n.doc,[...e]),a=ic(l);return a.forEach(({newRange:e})=>{const n=Yp(r.doc,e,t=>t.isTextblock);let o,s;if(n.length>1)o=n[0],s=r.doc.textBetween(o.pos,o.pos+o.node.nodeSize,void 0," ");else if(n.length){const t=r.doc.textBetween(e.from,e.to," "," ");if(!Gy.test(t))return;o=n[0],s=r.doc.textBetween(o.pos,e.to,void 0," ")}if(o&&s){const e=s.split(Xy).filter(Boolean);if(e.length<=0)return!1;const n=e[e.length-1],l=o.pos+s.lastIndexOf(n);if(!n)return!1;const a=Uy(n).map(e=>e.toObject(t.defaultProtocol));if(!Zy(a))return!1;a.filter(t=>t.isLink).map(t=>({...t,from:l+t.start+1,to:l+t.end+1})).filter(t=>!r.schema.marks.code||!r.doc.rangeHasMark(t.from,t.to,r.schema.marks.code)).filter(e=>t.validate(e.value)).filter(e=>t.shouldAutoLink(e.value)).forEach(e=>{lc(e.from,e.to,r.doc).some(e=>e.mark.type===t.type)||i.addMark(e.from,e.to,t.type.create({href:e.href}))})}}),i.steps.length?i:void 0}})}function ev(t){return new kn({key:new Sn("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,s;if(0!==r.button)return!1;if(!e.editable)return!1;let i=r.target;const l=[];while("DIV"!==i.nodeName)l.push(i),i=i.parentNode;if(!l.find(t=>"A"===t.nodeName))return!1;const a=rc(e.state,t.type.name),p=r.target,c=null!==(o=null===p||void 0===p?void 0:p.href)&&void 0!==o?o:a.href,u=null!==(s=null===p||void 0===p?void 0:p.target)&&void 0!==s?s:a.target;return!(!p||!c)&&(window.open(c,u),!0)}}})}function nv(t){return new kn({key:new Sn("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:s}=o,{empty:i}=s;if(i)return!1;let l="";r.content.forEach(t=>{l+=t.textContent});const a=qy(l,{defaultProtocol:t.defaultProtocol}).find(t=>t.isLink&&t.value===l);return!(!l||!a)&&t.editor.commands.setMark(t.type,{href:a.href})}}})}function rv(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(t=>{const e="string"===typeof t?t:t.scheme;e&&n.push(e)}),!t||t.replace(Yy,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const ov=Oa.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{"string"!==typeof t?Ky(t.scheme,t.optionalSlashes):Ky(t)})},onDestroy(){jy()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!rv(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!(!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!rv(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:t=>!!rv(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",la(this.options.HTMLAttributes,t),0]:["a",la(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return!!this.options.isAllowedUri(n,{defaultValidate:t=>!!rv(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&e().setMark(this.name,t).setMeta("preventAutolink",!0).run()},toggleLink:t=>({chain:e})=>{const{href:n}=t;return!!this.options.isAllowedUri(n,{defaultValidate:t=>!!rv(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[eu({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=qy(t).filter(t=>t.isLink&&this.options.isAllowedUri(t.value,{defaultValidate:t=>!!rv(t,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(t=>e.push({text:t.value,data:{href:t.href},index:t.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(tv({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!rv(t,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),!0===this.options.openOnClick&&t.push(ev({type:this.type})),this.options.linkOnPaste&&t.push(nv({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),sv=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(t=>{var e,n;const r=t.getAttribute("style"),o=null===(n=null===(e=t.parentElement)||void 0===e?void 0:e.closest("span"))||void 0===n?void 0:n.getAttribute("style");t.setAttribute("style",`${o};${r}`)})},iv=Oa.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>{const e=t.hasAttribute("style");return!!e&&(this.options.mergeNestedSpanStyles&&sv(t),{})}}]},renderHTML({HTMLAttributes:t}){return["span",la(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(e,n)=>{if(e.isTextblock)return!0;e.marks.filter(t=>t.type===this.type).some(t=>Object.values(t.attrs).some(t=>!!t))||t.removeMark(n,n+e.nodeSize,this.type)}),!0}}}}),lv=$a.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return null===(e=t.style.color)||void 0===e?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),av=tu.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth"),n=e?e.split(",").map(t=>parseInt(t,10)):null;return n}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",la(this.options.HTMLAttributes,t),0]}}),pv=tu.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth"),n=e?e.split(",").map(t=>parseInt(t,10)):null;return n}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",la(this.options.HTMLAttributes,t),0]}}),cv=av.extend({content:"inline*",parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",t,0]}}),uv=pv.extend({content:"inline*",parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",t,0]}}),dv={key:0,class:"dialog-overlay"},hv={class:"dialog-content"};function fv(t,e,n,r,s,i){const l=(0,o.g2)("multiselect");return(0,o.uX)(),(0,o.CE)("div",null,[r.isOpen?((0,o.uX)(),(0,o.CE)("div",dv,[(0,o.Lk)("div",hv,[e[3]||(e[3]=(0,o.Lk)("h3",null,"Gottesdienst-Konfiguration",-1)),e[4]||(e[4]=(0,o.Lk)("div",null,[(0,o.Lk)("label",{for:"location-select"},"Bitte wählen Sie den Ort für den Gottestdienst aus:")],-1)),(0,o.Lk)("div",null,[(0,o.bF)(l,{modelValue:r.selectedLocations,"onUpdate:modelValue":e[0]||(e[0]=t=>r.selectedLocations=t),options:r.locations,multiple:!0,"close-on-select":!1,"clear-on-select":!1,"preserve-search":!0,"preselect-first":!1,label:"name","track-by":"id",placeholder:"Orte auswählen"},null,8,["modelValue","options"])]),(0,o.Lk)("div",null,[(0,o.Lk)("button",{onClick:e[1]||(e[1]=(...t)=>r.confirmWorshipConfiguration&&r.confirmWorshipConfiguration(...t))},"Bestätigen"),(0,o.Lk)("button",{onClick:e[2]||(e[2]=(...t)=>r.closeWorshipDialog&&r.closeWorshipDialog(...t))},"Schließen")])])])):(0,o.Q3)("",!0)])}n(1701);var mv=n(5877),gv={name:"WorshipDialog",components:{Multiselect:mv.Ay},emits:["confirm"],setup(t,{emit:e}){const n=(0,h.KR)(!1),r=(0,h.KR)([]),o=(0,h.KR)([]),s=()=>{n.value=!0,l()},i=()=>{n.value=!1},l=async()=>{try{const t=await m.A.get("/event-places");r.value=t.data}catch(t){console.error("Fehler beim Laden der Orte:",t)}},a=()=>{const t=JSON.stringify(o.value.map(t=>t.id));e("confirm",t),i()};return{isOpen:n,locations:r,selectedLocations:o,openWorshipDialog:s,closeWorshipDialog:i,confirmWorshipConfiguration:a}}},xv=n(6262);const Mv=(0,xv.A)(gv,[["render",fv],["__scopeId","data-v-660e0d32"]]);var yv=Mv,vv=n(513);n(3579);const wv={key:0,class:"dialog-overlay"},bv={class:"dialog-content"},Wv={key:0},kv={key:1},Qv={key:2},Cv={key:3},Sv={class:"display-options"},Ov=["value"];function Av(t,e,n,i,l,a){const p=(0,o.g2)("multiselect");return(0,o.uX)(),(0,o.CE)("div",null,[i.isOpen?((0,o.uX)(),(0,o.CE)("div",wv,[(0,o.Lk)("div",bv,[e[27]||(e[27]=(0,o.Lk)("h3",null,"Kontaktperson hinzufügen",-1)),(0,o.Lk)("div",null,[e[14]||(e[14]=(0,o.Lk)("label",{for:"type-select"},"Typen:",-1)),(0,o.bF)(p,{id:"type-select",modelValue:i.selectedTypes,"onUpdate:modelValue":e[0]||(e[0]=t=>i.selectedTypes=t),options:i.typeOptions,multiple:!0,label:"caption","track-by":"id",onSelect:i.onTypeSelect},null,8,["modelValue","options","onSelect"])]),i.selectedTypes.some(t=>"places"===t.id)?((0,o.uX)(),(0,o.CE)("div",Wv,[e[15]||(e[15]=(0,o.Lk)("label",{for:"places-select"},"Wählen Sie Orte:",-1)),(0,o.bF)(p,{id:"places-select",modelValue:i.selectedPlaces,"onUpdate:modelValue":e[1]||(e[1]=t=>i.selectedPlaces=t),options:i.places,multiple:!0,label:"name","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),i.selectedTypes.some(t=>"types"===t.id)?((0,o.uX)(),(0,o.CE)("div",kv,[e[16]||(e[16]=(0,o.Lk)("label",{for:"types-select"},"Wählen Sie Typen:",-1)),(0,o.bF)(p,{id:"types-select",modelValue:i.selectedEventTypes,"onUpdate:modelValue":e[2]||(e[2]=t=>i.selectedEventTypes=t),options:i.eventTypes,multiple:!0,label:"caption","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),i.selectedTypes.some(t=>"position"===t.id)?((0,o.uX)(),(0,o.CE)("div",Qv,[e[17]||(e[17]=(0,o.Lk)("label",{for:"position-select"},"Wählen Sie eine Position:",-1)),(0,o.bF)(p,{id:"position-select",modelValue:i.selectedPositions,"onUpdate:modelValue":e[3]||(e[3]=t=>i.selectedPositions=t),options:i.positions,multiple:!1,label:"caption","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),i.selectedTypes.some(t=>"specific"===t.id)?((0,o.uX)(),(0,o.CE)("div",Cv,[e[18]||(e[18]=(0,o.Lk)("label",{for:"contact-select"},"Wählen Sie eine Kontaktperson:",-1)),(0,o.bF)(p,{id:"contact-select",modelValue:i.selectedContact,"onUpdate:modelValue":e[4]||(e[4]=t=>i.selectedContact=t),options:i.contacts,multiple:!1,label:"name","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),(0,o.Lk)("div",null,[e[26]||(e[26]=(0,o.Lk)("label",null,"Wählen Sie welche Elemente angezeigt werden sollen:",-1)),(0,o.Lk)("div",Sv,[(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=t=>i.displayOptions.phone=t)},null,512),[[s.lH,i.displayOptions.phone]]),e[19]||(e[19]=(0,o.eW)(" Telefon",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=t=>i.displayOptions.street=t)},null,512),[[s.lH,i.displayOptions.street]]),e[20]||(e[20]=(0,o.eW)(" Straße",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=t=>i.displayOptions.zipcode=t)},null,512),[[s.lH,i.displayOptions.zipcode]]),e[21]||(e[21]=(0,o.eW)(" Postleitzahl",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[8]||(e[8]=t=>i.displayOptions.city=t)},null,512),[[s.lH,i.displayOptions.city]]),e[22]||(e[22]=(0,o.eW)(" Stadt",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[9]||(e[9]=t=>i.displayOptions.email=t)},null,512),[[s.lH,i.displayOptions.email]]),e[23]||(e[23]=(0,o.eW)(" E-Mail",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[10]||(e[10]=t=>i.displayOptions.positions=t)},null,512),[[s.lH,i.displayOptions.positions]]),e[24]||(e[24]=(0,o.eW)(" Positionen",-1))])]),(0,o.Lk)("div",null,[e[25]||(e[25]=(0,o.Lk)("label",{for:"displayStyle"},"Anzeigen als",-1)),(0,o.bo)((0,o.Lk)("select",{id:"displayStyle","onUpdate:modelValue":e[11]||(e[11]=t=>i.displayStyle=t)},[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(i.displayStyles,t=>((0,o.uX)(),(0,o.CE)("option",{value:t.id,key:t.id},(0,r.v_)(t.label),9,Ov))),128))],512),[[s.u1,i.displayStyle]])])]),(0,o.Lk)("div",null,[(0,o.Lk)("button",{onClick:e[12]||(e[12]=(...t)=>i.confirmAddContactConfiguration&&i.confirmAddContactConfiguration(...t))},"Bestätigen"),(0,o.Lk)("button",{onClick:e[13]||(e[13]=(...t)=>i.closeAddContactDialog&&i.closeAddContactDialog(...t))},"Schließen")])])])):(0,o.Q3)("",!0)])}n(2489);var Tv={name:"AddContactDialog",components:{Multiselect:mv.Ay},emits:["confirm"],setup(t,{emit:e}){const n=(0,h.KR)(!1),r=(0,h.KR)([]),o=(0,h.KR)([]),s=(0,h.KR)([]),i=(0,h.KR)([]),l=(0,h.KR)(null),a=(0,h.KR)([]),p=(0,h.KR)([]),c=(0,h.KR)([]),u=(0,h.KR)([]),d=(0,h.KR)("float"),f=(0,h.KR)({phone:!1,street:!1,zipcode:!1,city:!1,email:!1,positions:!1}),g=(0,h.KR)([{id:"all",caption:"Alle"},{id:"specific",caption:"Eine Person"},{id:"places",caption:"Für bestimmte Orte"},{id:"types",caption:"Für bestimmte Typen"},{id:"position",caption:"Für bestimmte Positionen"}]),x=(0,h.KR)([{id:"float",label:"Durchlaufender Text"},{id:"box",label:"Textbox"}]),M=()=>{n.value=!0,b(),W(),k(),Q()},y=()=>{n.value=!1},v=()=>{a.value.some(t=>"all"===t.id)?(a.value=[{id:"all",caption:"Alle"}],l.value=null,p.value=[],u.value=[],c.value=[]):a.value.some(t=>"specific"===t.id)?(a.value=[{id:"specific",caption:"Eine Person"}],p.value=[],u.value=[],c.value=[]):(a.value.some(t=>"places"===t.id)||a.value.some(t=>"types"===t.id)||a.value.some(t=>"position"===t.id))&&(l.value=null)},w=()=>{console.log("Selected positions:",c.value);let t="";const n=Object.keys(f.value).filter(t=>f.value[t]);let r={};a.value.some(t=>"all"===t.id)?r["id"]="all":a.value.some(t=>"specific"===t.id)&&l.value?r["id"]=l.value.id:(r["types"]=p.value.map(t=>t.id),r["places"]=u.value.map(t=>t.id),r["positions"]=Array.isArray(c.value)?c.value.map(t=>t.id):[]);const o={selection:r,display:n,style:d.value};t="{{ contact:"+JSON.stringify(o)+" }}",console.log("Emitting config:",t),e("confirm",t),y()},b=async()=>{try{const t=await m.A.get("/contact-persons");r.value=t.data}catch(t){console.error("Fehler beim Laden der Kontaktpersonen:",t)}},W=async()=>{try{const t=await m.A.get("/event-types");o.value=t.data}catch(t){console.error("Fehler beim Laden der Event-Typen:",t)}},k=async()=>{try{const t=await m.A.get("/event-places");s.value=t.data}catch(t){console.error("Fehler beim Laden der Orte:",t)}},Q=async()=>{try{const t=await m.A.get("/positions");i.value=t.data}catch(t){console.error("Fehler beim Laden der Positionen:",t)}};return{isOpen:n,contacts:r,selectedContact:l,selectedTypes:a,selectedEventTypes:p,selectedPlaces:u,displayOptions:f,displayStyle:d,displayStyles:x,typeOptions:g,openAddContactDialog:M,closeAddContactDialog:y,confirmAddContactConfiguration:w,onTypeSelect:v,places:s,eventTypes:o,positions:i,selectedPositions:c}}};const Ev=(0,xv.A)(Tv,[["render",Av],["__scopeId","data-v-208f7992"]]);var Lv=Ev;const Dv={key:0,class:"dialog-overlay"},Nv={class:"dialog-content"},Rv={key:0},Iv={key:1},Pv={key:2},$v={class:"display-options"};function Hv(t,e,n,r,i,l){const a=(0,o.g2)("multiselect");return(0,o.uX)(),(0,o.CE)("div",null,[r.isOpen?((0,o.uX)(),(0,o.CE)("div",Dv,[(0,o.Lk)("div",Nv,[e[29]||(e[29]=(0,o.Lk)("h3",null,"Ereignisse hinzufügen",-1)),(0,o.Lk)("div",null,[e[15]||(e[15]=(0,o.Lk)("label",{for:"selection-type"},"Wählen Sie den Typ:",-1)),(0,o.bF)(a,{id:"selection-type",modelValue:r.selectedTypes,"onUpdate:modelValue":e[0]||(e[0]=t=>r.selectedTypes=t),options:r.typeOptions,multiple:!0,"close-on-select":!1,"clear-on-select":!1,"preserve-search":!0,onSelect:r.onTypeSelect},null,8,["modelValue","options","onSelect"])]),(0,o.Lk)("div",null,[(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=t=>r.isHomepage=t)},null,512),[[s.lH,r.isHomepage]]),e[16]||(e[16]=(0,o.eW)(" Auch Ereignisse für die Homepage zeigen",-1))])]),r.selectedTypes.includes("Für bestimmte Orte")?((0,o.uX)(),(0,o.CE)("div",Rv,[e[17]||(e[17]=(0,o.Lk)("label",{for:"places-select"},"Wählen Sie Orte:",-1)),(0,o.bF)(a,{id:"places-select",modelValue:r.selectedPlaces,"onUpdate:modelValue":e[2]||(e[2]=t=>r.selectedPlaces=t),options:r.places,multiple:!0,"close-on-select":!1,"clear-on-select":!1,"preserve-search":!0,label:"name","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),r.selectedTypes.includes("Für bestimmte Typen")?((0,o.uX)(),(0,o.CE)("div",Iv,[e[18]||(e[18]=(0,o.Lk)("label",{for:"types-select"},"Wählen Sie Typen:",-1)),(0,o.bF)(a,{id:"types-select",modelValue:r.selectedEventTypes,"onUpdate:modelValue":e[3]||(e[3]=t=>r.selectedEventTypes=t),options:r.eventTypes,multiple:!0,"close-on-select":!1,"clear-on-select":!1,"preserve-search":!0,label:"caption","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),r.selectedTypes.includes("Ein bestimmtes")?((0,o.uX)(),(0,o.CE)("div",Pv,[e[19]||(e[19]=(0,o.Lk)("label",{for:"event-select"},"Wählen Sie ein Event:",-1)),(0,o.bF)(a,{id:"event-select",modelValue:r.selectedEvent,"onUpdate:modelValue":e[4]||(e[4]=t=>r.selectedEvent=t),options:r.events,multiple:!1,label:"name","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),(0,o.Lk)("div",null,[e[28]||(e[28]=(0,o.Lk)("label",null,"Wählen Sie welche Elemente angezeigt werden sollen:",-1)),(0,o.Lk)("div",$v,[(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=t=>r.displayOptions.name=t)},null,512),[[s.lH,r.displayOptions.name]]),e[20]||(e[20]=(0,o.eW)(" Name",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=t=>r.displayOptions.type=t)},null,512),[[s.lH,r.displayOptions.type]]),e[21]||(e[21]=(0,o.eW)(" Typ",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=t=>r.displayOptions.place=t)},null,512),[[s.lH,r.displayOptions.place]]),e[22]||(e[22]=(0,o.eW)(" Ort",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[8]||(e[8]=t=>r.displayOptions.description=t)},null,512),[[s.lH,r.displayOptions.description]]),e[23]||(e[23]=(0,o.eW)(" Beschreibung",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[9]||(e[9]=t=>r.displayOptions.time=t)},null,512),[[s.lH,r.displayOptions.time]]),e[24]||(e[24]=(0,o.eW)(" Uhrzeit",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[10]||(e[10]=t=>r.displayOptions.contactPerson=t)},null,512),[[s.lH,r.displayOptions.contactPerson]]),e[25]||(e[25]=(0,o.eW)(" Kontaktperson",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[11]||(e[11]=t=>r.displayOptions.day=t)},null,512),[[s.lH,r.displayOptions.day]]),e[26]||(e[26]=(0,o.eW)(" Veranstaltungstag",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[12]||(e[12]=t=>r.displayOptions.institution=t)},null,512),[[s.lH,r.displayOptions.institution]]),e[27]||(e[27]=(0,o.eW)(" Institution",-1))])])]),(0,o.Lk)("div",null,[(0,o.Lk)("button",{onClick:e[13]||(e[13]=(...t)=>r.confirmAddEventConfiguration&&r.confirmAddEventConfiguration(...t))},"Bestätigen"),(0,o.Lk)("button",{onClick:e[14]||(e[14]=(...t)=>r.closeAddEventDialog&&r.closeAddEventDialog(...t))},"Schließen")])])])):(0,o.Q3)("",!0)])}var Bv={name:"AddEventDialog",components:{Multiselect:mv.Ay},emits:["confirm"],setup(t,{emit:e}){const n=(0,h.KR)(!1),r=(0,h.KR)(["Alle","Für bestimmte Orte","Für bestimmte Typen","Ein bestimmtes","Ereignisse für Homepage"]),o=(0,h.KR)([]),s=(0,h.KR)([]),i=(0,h.KR)([]),l=(0,h.KR)([]),a=(0,h.KR)([]),p=(0,h.KR)([]),c=(0,h.KR)(null),u=(0,h.KR)(!1),d=(0,h.KR)({name:!1,type:!1,place:!1,description:!1,time:!1,contactPerson:!1,day:!1,institution:!1}),f=()=>{n.value=!0,y(),v(),w()},g=()=>{n.value=!1},x=t=>{o.value="Alle"===t||"Ein bestimmtes"===t?[t]:o.value.filter(t=>"Alle"!==t&&"Ein bestimmtes"!==t)},M=()=>{const t={};t.display=Object.keys(d.value).filter(t=>d.value[t]),u.value?t.id="home":o.value.includes("Alle")?t.id="all":o.value.includes("Ein bestimmtes")?t.id=c.value.id:(t.types=p.value.map(t=>t.id),t.places=a.value.map(t=>t.id)),e("confirm","{{ events:"+JSON.stringify(t)+" }}"),g()},y=async()=>{try{const t=await m.A.get("/event-places");s.value=t.data}catch(t){console.error("Fehler beim Laden der Orte:",t)}},v=async()=>{try{const t=await m.A.get("/event-types");i.value=t.data}catch(t){console.error("Fehler beim Laden der Typen:",t)}},w=async()=>{try{const t=await m.A.get("/events");l.value=t.data}catch(t){console.error("Fehler beim Laden der Events:",t)}};return{isOpen:n,typeOptions:r,selectedTypes:o,places:s,eventTypes:i,events:l,selectedPlaces:a,selectedEventTypes:p,selectedEvent:c,displayOptions:d,openAddEventDialog:f,closeAddEventDialog:g,confirmAddEventConfiguration:M,onTypeSelect:x,isHomepage:u}}};const zv=(0,xv.A)(Bv,[["render",Hv],["__scopeId","data-v-577814c6"]]);var Vv=zv;const Fv={key:0,class:"modal"},jv={class:"modal-content"};function Kv(t,e,n,r,i,l){return i.showDialog?((0,o.uX)(),(0,o.CE)("div",Fv,[(0,o.Lk)("div",jv,[(0,o.Lk)("span",{class:"close",onClick:e[0]||(e[0]=(...t)=>l.closeDialog&&l.closeDialog(...t))},"×"),e[6]||(e[6]=(0,o.Lk)("h2",null,"Link hinzufügen",-1)),(0,o.Lk)("table",null,[(0,o.Lk)("tbody",null,[(0,o.Lk)("tr",null,[e[4]||(e[4]=(0,o.Lk)("td",null,[(0,o.Lk)("label",{for:"link-url"},"URL:")],-1)),(0,o.Lk)("td",null,[(0,o.bo)((0,o.Lk)("input",{id:"link-url","onUpdate:modelValue":e[1]||(e[1]=t=>i.url=t),type:"text"},null,512),[[s.Jo,i.url]])])]),(0,o.Lk)("tr",null,[e[5]||(e[5]=(0,o.Lk)("td",null,[(0,o.Lk)("label",{for:"link-text"},"Linktext:")],-1)),(0,o.Lk)("td",null,[(0,o.bo)((0,o.Lk)("input",{id:"link-text","onUpdate:modelValue":e[2]||(e[2]=t=>i.text=t),type:"text"},null,512),[[s.Jo,i.text]])])])])]),(0,o.Lk)("button",{onClick:e[3]||(e[3]=(...t)=>l.confirm&&l.confirm(...t))},"Hinzufügen")])])):(0,o.Q3)("",!0)}var _v={name:"AddLinkDialog",data(){return{showDialog:!1,url:"",text:""}},methods:{openAddLinkDialog(){this.showDialog=!0},closeDialog(){this.showDialog=!1,this.url="",this.text=""},confirm(){this.$emit("confirm",this.url,this.text),this.closeDialog()}}};const Uv=(0,xv.A)(_v,[["render",Kv],["__scopeId","data-v-89dc2ef4"]]);var qv=Uv;const Jv={key:0,class:"modal"},Xv={class:"modal-content"},Gv=["value"];function Yv(t,e,n,i,l,a){return l.showDialog?((0,o.uX)(),(0,o.CE)("div",Jv,[(0,o.Lk)("div",Xv,[(0,o.Lk)("span",{class:"close",onClick:e[0]||(e[0]=(...t)=>a.closeDialog&&a.closeDialog(...t))},"×"),e[4]||(e[4]=(0,o.Lk)("h2",null,"Datei zum Download hinzufügen",-1)),(0,o.Lk)("table",null,[(0,o.Lk)("tbody",null,[(0,o.Lk)("tr",null,[e[3]||(e[3]=(0,o.Lk)("td",null,[(0,o.Lk)("label",{for:"file-select"},"Datei auswählen:")],-1)),(0,o.Lk)("td",null,[(0,o.bo)((0,o.Lk)("select",{id:"file-select","onUpdate:modelValue":e[1]||(e[1]=t=>l.selectedFile=t)},[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(l.files,t=>((0,o.uX)(),(0,o.CE)("option",{key:t.id,value:t},(0,r.v_)(t.title)+" ("+(0,r.v_)(t.originalName)+") ",9,Gv))),128))],512),[[s.u1,l.selectedFile]])])])])]),(0,o.Lk)("button",{onClick:e[2]||(e[2]=(...t)=>a.confirm&&a.confirm(...t))},"Hinzufügen")])])):(0,o.Q3)("",!0)}var Zv={name:"AddDownloadDialog",data(){return{showDialog:!1,selectedFile:null,files:[]}},methods:{async openAddDownloadDialog(){this.showDialog=!0;try{const t=await m.A.get("/files");this.files=t.data}catch(t){console.error("Fehler beim Abrufen der Dateien:",t)}},closeDialog(){this.showDialog=!1,this.selectedFile=null},confirm(){this.selectedFile?(console.log(this.selectedFile.hash),this.$emit("confirm",{hash:this.selectedFile.hash}),this.closeDialog()):alert("Bitte wählen Sie eine Datei aus.")}}};const tw=(0,xv.A)(Zv,[["render",Yv],["__scopeId","data-v-471c7457"]]);var ew=tw;const nw={key:0,class:"dialog-overlay"},rw={class:"dialog-content"},ow={class:"display-options"},sw=["value"];function iw(t,e,n,i,l,a){const p=(0,o.g2)("multiselect");return(0,o.uX)(),(0,o.CE)("div",null,[i.isOpen?((0,o.uX)(),(0,o.CE)("div",nw,[(0,o.Lk)("div",rw,[e[19]||(e[19]=(0,o.Lk)("h3",null,"Institution hinzufügen",-1)),(0,o.Lk)("div",null,[e[10]||(e[10]=(0,o.Lk)("label",{for:"institution-select"},"Wählen Sie eine Institution:",-1)),(0,o.bF)(p,{id:"institution-select",modelValue:i.selectedInstitution,"onUpdate:modelValue":e[0]||(e[0]=t=>i.selectedInstitution=t),options:i.institutionOptions,multiple:!1,label:"name","track-by":"id",onSelect:i.onInstitutionSelect},null,8,["modelValue","options","onSelect"])]),(0,o.Lk)("div",null,[e[18]||(e[18]=(0,o.Lk)("label",null,"Wählen Sie welche Elemente angezeigt werden sollen:",-1)),(0,o.Lk)("div",ow,[(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=t=>i.displayOptions.street=t)},null,512),[[s.lH,i.displayOptions.street]]),e[11]||(e[11]=(0,o.eW)(" Straße",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=t=>i.displayOptions.zipcode=t)},null,512),[[s.lH,i.displayOptions.zipcode]]),e[12]||(e[12]=(0,o.eW)(" Postleitzahl",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=t=>i.displayOptions.city=t)},null,512),[[s.lH,i.displayOptions.city]]),e[13]||(e[13]=(0,o.eW)(" Stadt",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=t=>i.displayOptions.phone=t)},null,512),[[s.lH,i.displayOptions.phone]]),e[14]||(e[14]=(0,o.eW)(" Telefon",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=t=>i.displayOptions.fax=t)},null,512),[[s.lH,i.displayOptions.fax]]),e[15]||(e[15]=(0,o.eW)(" Fax",-1))]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=t=>i.displayOptions.email=t)},null,512),[[s.lH,i.displayOptions.email]]),e[16]||(e[16]=(0,o.eW)(" E-Mail",-1))])]),(0,o.Lk)("div",null,[e[17]||(e[17]=(0,o.Lk)("label",{for:"displayStyle"},"Anzeigen als",-1)),(0,o.bo)((0,o.Lk)("select",{id:"displayStyle","onUpdate:modelValue":e[7]||(e[7]=t=>i.displayStyle=t)},[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(i.displayStyles,t=>((0,o.uX)(),(0,o.CE)("option",{value:t.id,key:t.id},(0,r.v_)(t.label),9,sw))),128))],512),[[s.u1,i.displayStyle]])])]),(0,o.Lk)("div",null,[(0,o.Lk)("button",{onClick:e[8]||(e[8]=(...t)=>i.confirmAddInstitutionConfiguration&&i.confirmAddInstitutionConfiguration(...t))},"Bestätigen"),(0,o.Lk)("button",{onClick:e[9]||(e[9]=(...t)=>i.closeAddInstitutionDialog&&i.closeAddInstitutionDialog(...t))},"Schließen")])])])):(0,o.Q3)("",!0)])}var lw={name:"AddInstitutionDialog",components:{Multiselect:mv.Ay},emits:["confirm"],setup(t,{emit:e}){const n=(0,h.KR)(!1),r=(0,h.KR)([]),o=(0,h.KR)(null),s=(0,h.KR)("float"),i=(0,h.KR)({street:!1,zipcode:!1,city:!1,phone:!1,fax:!1,email:!1}),l=(0,h.KR)([{id:"all",name:"Alle"},...r.value]),a=(0,h.KR)([{id:"float",label:"Durchlaufender Text"},{id:"box",label:"Textbox"}]),p=()=>{n.value=!0,f()},c=()=>{n.value=!1},u=()=>{o.value&&"all"===o.value.id&&(l.value=[{id:"all",name:"Alle"}],o.value={id:"all",name:"Alle"})},d=()=>{const t=Object.keys(i.value).filter(t=>i.value[t]),n={id:o.value.id,display:t,style:s.value},r=`{{ institution:${JSON.stringify(n)} }}`;e("confirm",r),c()},f=async()=>{try{const t=await m.A.get("/institutions");r.value=t.data,l.value=[{id:"all",name:"Alle"},...r.value]}catch(t){console.error("Fehler beim Laden der Institutionen:",t)}};return{isOpen:n,institutions:r,selectedInstitution:o,displayOptions:i,displayStyle:s,displayStyles:a,institutionOptions:l,openAddInstitutionDialog:p,closeAddInstitutionDialog:c,confirmAddInstitutionConfiguration:d,onInstitutionSelect:u}}};const aw=(0,xv.A)(lw,[["render",iw],["__scopeId","data-v-1dd5c408"]]);var pw=aw;const cw=Symbol("IconoirProvider"),uw=((0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}}),(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const dw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function hw(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Fv)('',8)]),16)}const fw=uw(dw,[["render",hw]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const mw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function gw(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Fv)('',8)]),16)}const xw=uw(mw,[["render",gw]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const Mw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function yw(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Lk)("path",{d:"M12 3L12 21M12 21L20.5 12.5M12 21L3.5 12.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),16)}const vw=uw(Mw,[["render",yw]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const ww=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function bw(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Lk)("path",{d:"M3 12L21 12M21 12L12.5 3.5M21 12L12.5 20.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),16)}const Ww=uw(ww,[["render",bw]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const kw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function Qw(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Lk)("path",{d:"M12 11.6667H8M12 11.6667C12 11.6667 15.3333 11.6667 15.3333 8.33333C15.3333 5.00002 12 5 12 5C12 5 12 5 12 5H8.6C8.26863 5 8 5.26863 8 5.6V11.6667M12 11.6667C12 11.6667 16 11.6667 16 15.3333C16 19 12 19 12 19C12 19 12 19 12 19H8.6C8.26863 19 8 18.7314 8 18.4V11.6667",stroke:"currentColor","stroke-width":"1.5"},null,-1)]),16)}const Cw=uw(kw,[["render",Qw]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const Sw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function Ow(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Lk)("path",{d:"M6 20L18 20",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),(0,o.Lk)("path",{d:"M12 4V16M12 16L15.5 12.5M12 16L8.5 12.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),16)}const Aw=uw(Sw,[["render",Ow]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const Tw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function Ew(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Lk)("path",{d:"M11 5L14 5M17 5L14 5M14 5L10 19M10 19L7 19M10 19L13 19",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),16)}const Lw=uw(Tw,[["render",Ew]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const Dw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function Nw(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Fv)('',6)]),16)}const Rw=uw(Dw,[["render",Nw]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const Iw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function Pw(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Fv)('',7)]),16)}const $w=uw(Iw,[["render",Pw]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const Hw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function Bw(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Lk)("path",{d:"M8 21H20.4C20.7314 21 21 20.7314 21 20.4V3.6C21 3.26863 20.7314 3 20.4 3H3.6C3.26863 3 3 3.26863 3 3.6V16",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),(0,o.Lk)("path",{d:"M3.5 20.5L12 12M12 12V16M12 12H8",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),16)}const zw=uw(Hw,[["render",Bw]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const Vw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function Fw(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Fv)('',5)]),16)}const jw=uw(Vw,[["render",Fw]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const Kw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function _w(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Lk)("path",{d:"M3 12L21 12",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),(0,o.Lk)("path",{d:"M16.2857 3L10.068 3C7.82129 3 6 4.82129 6 7.06797C6 8.81895 7.12044 10.3735 8.78157 10.9272L12 12M6 21H13.932C16.1787 21 18 19.1787 18 16.932C18 16.2409 17.8255 15.5804 17.512 15",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),16)}const Uw=uw(Kw,[["render",_w]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const qw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function Jw(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Fv)('',5)]),16)}const Xw=uw(qw,[["render",Jw]]),Gw=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function Yw(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Lk)("path",{d:"M3 12H7.5H12H16.5H21M3 12V16.5M3 12V7.5M21 12V16.5M21 12V7.5M3 16.5V20.4C3 20.7314 3.26863 21 3.6 21H7.5H12H16.5H20.4C20.7314 21 21 20.7314 21 20.4V16.5M3 16.5H7.5H12H16.5H21M21 7.5V3.6C21 3.26863 20.7314 3 20.4 3H16.5H12H7.5H3.6C3.26863 3 3 3.26863 3 3.6V7.5M21 7.5H16.5H12H7.5H3",stroke:"currentColor","stroke-width":"1.5"},null,-1)]),16)}const Zw=uw(Gw,[["render",Yw]]),tb=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function eb(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Fv)('',7)]),16)}const nb=uw(tb,[["render",eb]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});const rb=(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});function ob(t,e,n,r,s,i){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),e[0]||(e[0]=[(0,o.Lk)("path",{d:"M16 5V11C16 13.2091 14.2091 15 12 15V15C9.79086 15 8 13.2091 8 11V5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),(0,o.Lk)("path",{d:"M6 19L18 19",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),16)}const sb=uw(rb,[["render",ob]]);(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});(0,o.pM)({setup(){return{context:(0,o.WQ)(cw)}}});var ib={name:"EditPagesComponent",components:{EditorContent:vf,WorshipDialog:yv,AddImageDialog:vv.A,BoldIcon:Cw,ItalicIcon:Lw,UnderlineIcon:sb,StrikethroughIcon:Uw,ListIcon:Rw,NumberedListLeftIcon:$w,TableIcon:nb,Table2ColumnsIcon:Xw,ArrowDownIcon:vw,ArrowRightIcon:Ww,TableRowsIcon:Zw,AlignTopBoxIcon:xw,AlignLeftBoxIcon:fw,StatsReportIcon:jw,AddEventDialog:Vv,AddContactDialog:Lv,AddLinkDialog:qv,AddDownloadDialog:ew,AddInstitutionDialog:pw,OpenInWindowIcon:zw,DownloadIcon:Aw},setup(){const t=(0,f.Pj)(),e=(0,h.KR)([]),n=(0,h.KR)(""),r=(0,o.EW)(()=>t.state.pageContent),s=(0,h.KR)(null),i=(0,h.KR)(null),l=(0,h.KR)(null),a=(0,h.KR)(null),p=(0,h.KR)(null),c=(0,h.KR)(null),u=(0,h.KR)(null),d=(0,h.KR)(null),g=wf({extensions:[Km,Bx.configure({resizable:!0}),zx,cv,uv,Of,Nm,Vx,Fm,Lf,Hm,nm.configure({levels:[3,4,5,6]}),ov.configure({openOnClick:!1}),iv,lv],content:"",onUpdate:({editor:e})=>{t.commit("SET_PAGE_CONTENT",e.getHTML())}}),x=(t,e,n="")=>{t.forEach(t=>{const r=n?`${n} -> ${t.name}`:t.name;e.push({...t,name:r}),t.submenu&&t.submenu.length&&x(t.submenu,e,r)})},M=async()=>{try{const n=await m.A.get("/menu-data"),r=n.data,o=[];x(r,o),e.value=o.sort((t,e)=>t.name.localeCompare(e.name)),t.commit("setMenuData",r)}catch(n){console.error("Fehler beim Abrufen der Seiten:",n)}},y=async()=>{try{await t.dispatch("loadPageContent",n.value);const e=t.getters.pageContent,r=()=>{g.value&&g.value.commands?g.value.commands.setContent(e,!1):setTimeout(r,100)};r()}catch(e){console.error("Fehler beim Laden des Seiteninhalts:",e)}},v=async()=>{try{const r=e.value.find(t=>t.link===n.value)?.name||"";if(!r)return;const o=g.value.getHTML();t.commit("SET_PAGE_CONTENT",o),await t.dispatch("savePageContent",{link:n.value,name:r})}catch(r){console.error("Fehler beim Speichern des Seiteninhalts:",r)}};(0,o.sV)(M);const w=(0,o.EW)(()=>e.value);(0,o.wB)(n,n=>{t.dispatch("setSelectedPage",n);const r=e.value.find(t=>t.link===n);r&&t.dispatch("setPageTitle",r.name),y()});const b=()=>{s.value.openWorshipDialog()},W=()=>{i.value.openAddImageDialog()},k=t=>{if(g.value){const e={location:t,order:"date asc"};g.value.chain().focus().insertContent("{{ worshipslist:"+JSON.stringify(e)+" }}").run()}},Q=t=>{g.value&&g.value.chain().focus().insertContent(`{{ image:${t} }}`).run()},C=()=>{l.value.openAddEventDialog()},S=t=>{g.value&&g.value.chain().focus().insertContent(t).run()},O=()=>{a.value.openAddContactDialog()},A=t=>{g.value&&g.value.chain().focus().insertContent(t).run()},T=()=>{p.value.openAddLinkDialog()},E=(t,e)=>{if(!g.value)return;if(!t)return;const n=g.value.state.doc.textBetween(g.value.state.selection.from,g.value.state.selection.to),r=e&&e.trim()||n||t,o=t=>t.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[t])),s=o(r),i=t.trim();g.value.chain().focus().insertContent(`${s}`).run()},L=()=>{c.value.openAddDownloadDialog()},D=({hash:t})=>{if(t&&g.value){const e="{{ download:"+t+" }}";g.value.chain().focus().insertContent(e).run()}},N=()=>{u.value.openAddInstitutionDialog()},R=t=>{g.value&&g.value.chain().focus().insertContent(t).run()},I=()=>{d.value.click()},P=t=>{const e=t.target.value;g.value&&g.value.chain().focus().setColor(e).run()},$=t=>{g.value.chain().focus().toggleHeading({level:t}).run()},H=()=>{g.value.chain().focus().toggleItalic().run()},B=()=>{g.value.chain().focus().toggleBold().run()},z=()=>{g.value.chain().focus().toggleUnderline().run()},V=()=>{g.value.chain().focus().toggleStrike().run()},F=()=>{g.value.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()},j=()=>{g.value.chain().focus().toggleBulletList().run()},K=()=>{g.value.chain().focus().toggleOrderedList().run()};return{pages:e,sortedPages:w,selectedPage:n,editor:g,loadPageContent:y,savePageContent:v,pageHtmlContent:r,openWorshipDialog:b,insertWorshipList:k,worshipDialog:s,addImageDialog:i,openAddImageDialog:W,insertImage:Q,addEventDialog:l,openAddEventsDialog:C,addContactDialog:a,openAddContactDialog:O,insertContact:A,insertEvent:S,addLinkDialog:p,openAddLinkDialog:T,insertLink:E,addDownloadDialog:c,openAddDownloadDialog:L,insertDownload:D,addInstitutionDialog:u,openAddInstitutionDialog:N,insertInstitution:R,colorPicker:d,openColorPicker:I,setColor:P,toggleHeading:$,toggleBold:B,toggleItalic:H,toggleUnderline:z,toggleStrike:V,insertTable:F,toggleBulletList:j,toggleOrderedList:K}}};const lb=(0,xv.A)(ib,[["render",d],["__scopeId","data-v-7b6ff8ae"]]);var ab=lb}}]); //# sourceMappingURL=93.ab1b2f73.js.map