const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('text', '', 'js/text-text.mjs'),window.OC.filePath('text', '', 'js/index-CRQM6PVi.chunk.mjs'),window.OC.filePath('text', '', 'js/emoji-picker-MDCGxHB0.chunk.mjs'),window.OC.filePath('text', '', 'js/vue.runtime.esm-CLeelJur.chunk.mjs'),window.OC.filePath('text', '', 'js/Editor-BRjzGCQi.chunk.mjs'),window.OC.filePath('text', '', 'js/index-BsHmGXxZ.chunk.mjs'),window.OC.filePath('text', '', 'js/NcLoadingIcon-ZJnsd-es.chunk.mjs'),window.OC.filePath('text', '', 'js/index-DxwFe63_.chunk.mjs'),window.OC.filePath('text', '', 'css/NcLoadingIcon-CAC0K4sG.chunk.css'),window.OC.filePath('text', '', 'js/dav-CQDyL7M_-DQpu_A9F.chunk.mjs'),window.OC.filePath('text', '', 'js/NcNoteCard-Dz5-u2BY-S2qe9Sjm.chunk.mjs'),window.OC.filePath('text', '', 'js/index-Dl858C8_.chunk.mjs'),window.OC.filePath('text', '', 'css/NcNoteCard-Dz5-u2BY-DSc672TB.chunk.css'),window.OC.filePath('text', '', 'js/MenuBar-aZwqxDEv.chunk.mjs'),window.OC.filePath('text', '', 'js/MediaHandler.provider-CTjO6aKX.chunk.mjs'),window.OC.filePath('text', '', 'js/logger-CoS2pszN.chunk.mjs'),window.OC.filePath('text', '', 'js/_plugin-vue2_normalizer-wd1ZAbRr.chunk.mjs'),window.OC.filePath('text', '', 'js/NcCheckboxRadioSwitch-DAPHFb0L-BMVa4UgQ.chunk.mjs'),window.OC.filePath('text', '', 'css/NcCheckboxRadioSwitch-DAPHFb0L-35V8jJy1.chunk.css'),window.OC.filePath('text', '', 'css/MenuBar-vlQMjTHZ.chunk.css'),window.OC.filePath('text', '', 'css/Editor-C0q_ky-Z.chunk.css'),window.OC.filePath('text', '', 'css/text-BrKBJp1J.chunk.css'),window.OC.filePath('text', '', 'js/index-hTwX2gcC-TY8YV1bJ.chunk.mjs'),window.OC.filePath('text', '', 'js/mermaid.core-DrJfu-9d.chunk.mjs')])))=>i.map(i=>d[i]); import{d as Ha,g as J1,B as Sm,n as ut,c as Jn,t as Re,G as Hs,r as ft,o as W4,b as ge,q as hN,s as K4,u as pN,v as Q4,w as J4,x as X4,y as eB,N as Bu,z as tB,A as fN,C as nB,D as rB,E as iB,F as mN,H as sB,I as gN,J as oB,h as aB,K as lB,L as TN,M as AN,O as cB,l as uB,P as dB,Q as hB,R as pB,S as fB,T as mB,U as gB,V as TB,W as AB,X as bB,Y as yB,Z as EB,_ as vB,$ as DB,a0 as SB,a1 as wB,a2 as _B,a3 as CB,a4 as NB,a5 as FB,a6 as OB,a7 as xB,a8 as kB,a9 as RB,aa as MB}from"./NcLoadingIcon-ZJnsd-es.chunk.mjs";import{g as cs,a as Ni,c as Ov,d as BB,i as LB}from"./index-DxwFe63_.chunk.mjs";import{g as xv,i as Ed,p as Jp,s as kv,r as Jr,c as as,d as X1,e as Lu,w as ba,k as ah,l as IB,m as YB,t as HB,v as ZB,V as gi,n as bN,x as PB,u as yN,f as EN,h as $B,b as UB}from"./vue.runtime.esm-CLeelJur.chunk.mjs";import{l as jr}from"./logger-CoS2pszN.chunk.mjs";import{p as wi,s as Kc,_ as j0,c as ab,a as vd,u as wp,e as uu,r as zB,d as VB,f as jB}from"./index-CRQM6PVi.chunk.mjs";import{l as Yl}from"./index-Dl858C8_.chunk.mjs";import{g as Wl,c as Ao,e as Qc,d as vN,a as GB}from"./emoji-picker-MDCGxHB0.chunk.mjs";import{i as qB,f as Iu,m as WB,o as DN,e as Vs,S as SN,b as qi,l as gr,k as Xo,q as wN,r as KB,v as QB,w as JB,x as XB,h as yl,y as e6,z as t6,D as _N,C as CN,N as lb,u as n6,A as r6,g as Rv,p as i6,t as wc,B as s6,E as o6,a as NN,s as cb,d as wm,F as a6,G as l6,H as c6,I as u6,J as d6,L as Bh}from"./NcNoteCard-Dz5-u2BY-S2qe9Sjm.chunk.mjs";import{u as js}from"./NcCheckboxRadioSwitch-DAPHFb0L-BMVa4UgQ.chunk.mjs";import{n as Ae}from"./_plugin-vue2_normalizer-wd1ZAbRr.chunk.mjs";import{u as FN,f as h6,h as p6,i as f6,g as m6,j as g6,c as ON,k as T6,l as ub,m as db,n as A6,p as xN}from"./MediaHandler.provider-CTjO6aKX.chunk.mjs";const q4="text";function b6(e,t,n){const r=document.querySelector(`#initial-state-${e}-${t}`);if(r===null)throw new Error(`Could not find initial state ${t} of ${e}`);try{return JSON.parse(atob(r.value))}catch{throw new Error(`Could not parse initial state ${t} of ${e}`)}}function _m(){try{return b6("core","capabilities")}catch{return console.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}}function y6(){if(typeof globalThis.firstDay<"u")return globalThis.firstDay;const e=new Intl.Locale(Ha()),t=e.getWeekInfo?.()??e.weekInfo;return t?t.firstDay%7:1}function E6(){if(typeof globalThis.dayNames<"u")return globalThis.dayNames;const e=Ha();return[new Date(1970,0,4).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,5).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,6).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,7).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,8).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,9).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,10).toLocaleDateString(e,{weekday:"long"})]}function v6(){if(typeof globalThis.dayNamesShort<"u")return globalThis.dayNamesShort;const e=Ha();return[new Date(1970,0,4).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,5).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,6).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,7).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,8).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,9).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,10).toLocaleDateString(e,{weekday:"short"})]}function D6(){if(typeof globalThis.dayNamesMin<"u")return globalThis.dayNamesMin;const e=Ha();return[new Date(1970,0,4).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,5).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,6).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,7).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,8).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,9).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,10).toLocaleDateString(e,{weekday:"narrow"})]}function S6(){if(typeof globalThis.monthNames<"u")return globalThis.monthNames;const e=Ha();return[new Date(1970,0).toLocaleDateString(e,{month:"long"}),new Date(1970,1).toLocaleDateString(e,{month:"long"}),new Date(1970,2).toLocaleDateString(e,{month:"long"}),new Date(1970,3).toLocaleDateString(e,{month:"long"}),new Date(1970,4).toLocaleDateString(e,{month:"long"}),new Date(1970,5).toLocaleDateString(e,{month:"long"}),new Date(1970,6).toLocaleDateString(e,{month:"long"}),new Date(1970,7).toLocaleDateString(e,{month:"long"}),new Date(1970,8).toLocaleDateString(e,{month:"long"}),new Date(1970,9).toLocaleDateString(e,{month:"long"}),new Date(1970,10).toLocaleDateString(e,{month:"long"}),new Date(1970,11).toLocaleDateString(e,{month:"long"})]}function w6(){if(typeof globalThis.monthNamesShort<"u")return globalThis.monthNamesShort;const e=Ha();return[new Date(1970,0).toLocaleDateString(e,{month:"short"}),new Date(1970,1).toLocaleDateString(e,{month:"short"}),new Date(1970,2).toLocaleDateString(e,{month:"short"}),new Date(1970,3).toLocaleDateString(e,{month:"short"}),new Date(1970,4).toLocaleDateString(e,{month:"short"}),new Date(1970,5).toLocaleDateString(e,{month:"short"}),new Date(1970,6).toLocaleDateString(e,{month:"short"}),new Date(1970,7).toLocaleDateString(e,{month:"short"}),new Date(1970,8).toLocaleDateString(e,{month:"short"}),new Date(1970,9).toLocaleDateString(e,{month:"short"}),new Date(1970,10).toLocaleDateString(e,{month:"short"}),new Date(1970,11).toLocaleDateString(e,{month:"short"})]}function _6(e=Date.now(),t={}){const n={ignoreSeconds:!1,language:J1(),relativeTime:"long",...t},r=new Date(e),i=new Intl.RelativeTimeFormat([n.language,J1()],{numeric:"auto",style:n.relativeTime}),s=(r.getTime()-Date.now())/1e3;if(Math.abs(s)<59.5)return n.ignoreSeconds||i.format(Math.round(s),"second");const o=s/60;if(Math.abs(o)<=59)return i.format(Math.round(o),"minute");const a=o/60;if(Math.abs(a)<23.5)return i.format(Math.round(a),"hour");const l=a/24;if(Math.abs(l)<6.5)return i.format(Math.round(l),"day");if(Math.abs(l)<27.5){const d=l/7;return i.format(Math.round(d),"week")}const c=l/30,u=Math.abs(c)<11?{month:n.relativeTime,day:"numeric"}:{year:n.relativeTime==="narrow"?"2-digit":"numeric",month:n.relativeTime};return new Intl.DateTimeFormat([n.language,J1()],u).format(r)}function vr(e){this.content=e}vr.prototype={constructor:vr,find:function(e){for(var t=0;t>1}},vr.from=function(e){if(e instanceof vr)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new vr(t)};function kN(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),s=t.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)n++;return n}if(i.content.size||s.content.size){let o=kN(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function RN(e,t,n,r){for(let i=e.childCount,s=t.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=e.child(--i),a=t.child(--s),l=o.nodeSize;if(o==a){n-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:n,b:r};if(o.isText&&o.text!=a.text){let c=0,u=Math.min(o.text.length,a.text.length);for(;ct&&r(l,i+a,s||null,o)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,n-u),r,i+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let s="",o=!0;return this.nodesBetween(t,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);st)for(let s=0,o=0;ot&&((on)&&(a.isText?a=a.cut(Math.max(0,t-o),Math.min(a.text.length,n-o)):a=a.cut(Math.max(0,t-o-1),Math.min(a.content.size,n-o-1))),r.push(a),i+=a.nodeSize),o=l}return new ue(r,i)}cutByIndex(t,n){return t==n?ue.empty:t==0&&n==this.content.length?this:new ue(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new ue(i,s)}addToStart(t){return new ue([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ue(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let s=this.child(r),o=i+s.nodeSize;if(o>=t)return o==t||n>0?Lh(r+1,o):Lh(r,i);i=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,n){if(!n)return ue.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new ue(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ue.empty;let n,r=0;for(let i=0;ithis.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-i.type.rank),n}};Xt.none=[];class ef extends Error{}class Ce{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=BN(this.content,t+this.openStart,n);return r&&new Ce(r,this.openStart,this.openEnd)}removeBetween(t,n){return new Ce(MN(this.content,t+this.openStart,n+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,n){if(!n)return Ce.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ce(ue.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let s=t.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=t.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new Ce(t,r,i)}}Ce.empty=new Ce(ue.empty,0,0);function MN(e,t,n){let{index:r,offset:i}=e.findIndex(t),s=e.maybeChild(r),{index:o,offset:a}=e.findIndex(n);if(i==t||s.isText){if(a!=n&&!e.child(o).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return e.replaceChild(r,s.copy(MN(s.content,t-i-1,n-i-1)))}function BN(e,t,n,r){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i);if(s==t||o.isText)return e.cut(0,t).append(n).append(e.cut(t));let a=BN(o.content,t-s-1,n);return a&&e.replaceChild(i,o.copy(a))}function C6(e,t,n){if(n.openStart>e.depth)throw new ef("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ef("Inconsistent open depths");return LN(e,t,n,0)}function LN(e,t,n,r){let i=e.index(r),s=e.node(r);if(i==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function G0(e,t,n,r){let i=(t||e).node(n),s=0,o=t?t.index(n):i.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&(_l(e.nodeAfter,r),s++));for(let a=s;ai&&kT(e,t,i+1),o=r.depth>i&&kT(n,r,i+1),a=[];return G0(null,e,i,a),s&&o&&t.index(i)==n.index(i)?(IN(s,o),_l(Cl(s,YN(e,t,n,r,i+1)),a)):(s&&_l(Cl(s,tf(e,t,i+1)),a),G0(t,n,i,a),o&&_l(Cl(o,tf(n,r,i+1)),a)),G0(r,null,i,a),new ue(a)}function tf(e,t,n){let r=[];if(G0(null,e,n,r),e.depth>n){let i=kT(e,t,n+1);_l(Cl(i,tf(e,t,n+1)),r)}return G0(t,null,n,r),new ue(r)}function N6(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)r=t.node(i).copy(ue.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}class Dd{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?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[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-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[t*3-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[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new nf(this,t,r);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&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=t;;){let{index:a,offset:l}=o.content.findIndex(s),c=s-l;if(r.push(o,a,i+l),!c||(o=o.child(a),o.isText))break;s=c-1,i+=l+1}return new Dd(n,r,s)}static resolveCached(t,n){let r=Mv.get(t);if(r)for(let s=0;st&&this.nodesBetween(t,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}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()+")"),HN(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=ue.empty,i=0,s=r.childCount){let o=this.contentMatchAt(t).matchFragment(r,i,s),a=o&&o.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;ln.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n 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(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=ue.fromJSON(t,n.content),s=t.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};vo.prototype.text=void 0;class rf extends vo{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):HN(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new rf(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new rf(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function HN(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Hl{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new k6(t,n);if(r.next==null)return Hl.empty;let i=ZN(r);r.next&&r.err("Unexpected trailing text");let s=H6(Y6(i));return Z6(s,r),s}matchType(t){for(let n=0;nc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+t.indexOf(r.next[o].next);return s}).join(` `)}}Hl.empty=new Hl(!0);class k6{constructor(t,n){this.string=t,this.nodeTypes=n,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 ZN(e){let t=[];do t.push(R6(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function R6(e){let t=[];do t.push(M6(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function M6(e){let t=I6(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=B6(e,t);else break;return t}function Bv(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function B6(e,t){let n=Bv(e),r=n;return e.eat(",")&&(e.next!="}"?r=Bv(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function L6(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let s in n){let o=n[s];o.isInGroup(t)&&i.push(o)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function I6(e){if(e.eat("(")){let t=ZN(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=L6(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function Y6(e){let t=[[]];return i(s(e,0),n()),t;function n(){return t.push([])-1}function r(o,a,l){let c={term:l,to:a};return t[o].push(c),c}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,c)=>l.concat(s(c,a)),[]);if(o.type=="seq")for(let l=0;;l++){let c=s(o.exprs[l],a);if(l==o.exprs.length-1)return c;i(c,a=n())}else if(o.type=="star"){let l=n();return r(a,l),i(s(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=n();return i(s(o.expr,a),l),i(s(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let c=0;c{e[o].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=t[r.join(",")]=new Hl(r.indexOf(e.length-1)>-1);for(let o=0;o-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:UN(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new vo(this,this.computeAttrs(t),ue.from(n),Xt.setFrom(r))}createChecked(t=null,n,r){return n=ue.from(n),this.checkContent(n),new vo(this,this.computeAttrs(t),n,Xt.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=ue.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(ue.empty,!0);return s?new vo(this,t,n.append(s),Xt.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[s]=new jN(s,n,o));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function P6(e,t,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${s}`)}}class $6{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?P6(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Cm{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=VN(t,i.attrs),this.excluded=null;let s=$N(this.attrs);this.instance=s?new Xt(this,s):null}create(t=null){return!t&&this.instance?this.instance:new Xt(this,UN(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((s,o)=>r[s]=new Cm(s,i++,n,o)),r}removeFromSet(t){for(var n=0;n-1}}class hb{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=vr.from(t.nodes),n.marks=vr.from(t.marks||{}),this.nodes=Iv.compile(this.spec.nodes,this),this.marks=Cm.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=Hl.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?Yv(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:Yv(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof Iv){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new rf(r,r.defaultAttrs,t,Xt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return vo.fromJSON(this,t)}markFromJSON(t){return Xt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function Yv(e,t){let n=[];for(let r=0;r-1)&&n.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function U6(e){return e.tag!=null}function z6(e){return e.style!=null}let Jc=class MT{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(U6(i))this.tags.push(i);else if(z6(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=t.nodes[i.node];return s.contentMatch.matchType(s)})}parse(t,n={}){let r=new Zv(this,n,!1);return r.addAll(t,Xt.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Zv(this,n,!0);return r.addAll(t,Xt.none,n.from,n.to),Ce.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;it.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(o.getAttrs){let l=o.getAttrs(n);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(t){let n=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o{r(o=Pv(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in t.nodes){let s=t.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Pv(o)),o.node||o.ignore||o.mark||(o.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new MT(t,MT.schemaRules(t)))}};const GN={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},V6={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},qN={ol:!0,ul:!0},Sd=1,BT=2,q0=4;function Hv(e,t,n){return t!=null?(t?Sd:0)|(t==="full"?BT:0):e&&e.whitespace=="pre"?Sd|BT:n&~q0}class Ih{constructor(t,n,r,i,s,o){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=Xt.none,this.match=s||(o&q0?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(ue.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Sd)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=ue.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(ue.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!GN.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Zv{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,o=Hv(null,n.preserveWhitespace,0)|(r?q0:0);i?s=new Ih(i.type,i.attrs,Xt.none,!0,n.topMatch||i.type.contentMatch,o):r?s=new Ih(null,null,Xt.none,!0,null,o):s=new Ih(t.schema.topNodeType,null,Xt.none,!0,null,o),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top,s=i.options&BT?"full":this.localPreserveWS||(i.options&Sd)>0;if(s==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(s)s!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,` `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],a=t.previousSibling;(!o||a&&a.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,s=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let o=t.nodeName.toLowerCase(),a;qN.hasOwnProperty(o)&&this.parser.normalizeLists&&j6(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,r));e:if(l?l.ignore:V6.hasOwnProperty(o))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let c,u=this.needsBlock;if(GN.hasOwnProperty(o))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),c=!0,s.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let d=l&&l.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),c&&this.sync(s),this.needsBlock=u}else{let c=this.readStyles(t,n);c&&this.addElementByRule(t,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` `),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,r,i){let s,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r)||this.leafFallback(t,r);else{let l=this.enter(o,n.attrs||null,r,n.preserveWhitespace);l&&(s=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}s&&this.sync(a)&&this.open--}addAll(t,n,r,i){let s=r||0;for(let o=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];o!=a;o=o.nextSibling,++s)this.findAtPoint(t,s),this.addDOM(o,n);this.findAtPoint(t,s)}findPlace(t,n){let r,i;for(let s=this.open;s>=0;s--){let o=this.nodes[s],a=o.findWrapping(t);if(a&&(!r||r.length>a.length)&&(r=a,i=o,!a.length)||o.solid)break}if(!r)return null;this.sync(i);for(let s=0;s(o.type?o.type.allowsMarkType(c.type):$v(c.type,t))?(l=c.addToSet(l),!1):!0),this.nodes.push(new Ih(t,n,l,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].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 n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Sd)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=s?r.node(l-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function j6(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&qN.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function G6(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Pv(e){let t={};for(let n in e)t[n]=e[n];return t}function $v(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let s=[],o=a=>{s.push(a);for(let l=0;l{if(s.length||o.marks.length){let a=0,l=0;for(;a=0;i--){let s=this.serializeMark(t.marks[i],t.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&_p(tg(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return _p(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Kl(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Uv(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return Uv(t.marks)}}function Uv(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function tg(e){return e.document||window.document}const zv=new WeakMap;function q6(e){let t=zv.get(e);return t===void 0&&zv.set(e,t=W6(e)),t}function W6(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let i=0;i-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 o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let a,l=n?e.createElementNS(n,i):e.createElement(i),c=t[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):l.setAttribute(d,c[d])}}for(let d=u;du)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:m}=_p(e,h,n,r);if(l.appendChild(p),m){if(a)throw new RangeError("Multiple content holes");a=m}}}return{dom:l,contentDOM:a}}const WN=65535,KN=Math.pow(2,16);function K6(e,t){return e+t*KN}function Vv(e){return e&WN}function Q6(e){return(e-(e&WN))/KN}const QN=1,JN=2,Cp=4,XN=8;class LT{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&XN)>0}get deletedBefore(){return(this.delInfo&(QN|Cp))>0}get deletedAfter(){return(this.delInfo&(JN|Cp))>0}get deletedAcross(){return(this.delInfo&Cp)>0}}class _i{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&_i.empty)return _i.empty}recover(t){let n=0,r=Vv(t);if(!this.inverted)for(let i=0;it)break;let c=this.ranges[a+s],u=this.ranges[a+o],d=l+c;if(t<=d){let h=c?t==l?-1:t==d?1:n:n,p=l+i+(h<0?0:u);if(r)return p;let m=t==(n<0?l:d)?null:K6(a/3,t-l),T=t==l?JN:t==d?QN:Cp;return(n<0?t!=l:t!=d)&&(T|=XN),new LT(p,T,m)}i+=u-c}return r?t+i:new LT(t+i,0,null)}touches(t,n){let r=0,i=Vv(n),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+s],u=l+c;if(t<=u&&a==i*3)return!0;r+=this.ranges[a+o]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i=0;n--){let i=t.getMirror(n);this.appendMap(t._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new sf;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;rs&&l!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),n.openStart,n.openEnd);return Xn.fromReplace(t,this.from,this.to,s)}invert(){return new ks(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new da(n.pos,r.pos,this.mark)}merge(t){return t instanceof da&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new da(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new da(n.from,n.to,t.markFromJSON(n.mark))}}Yr.jsonID("addMark",da);class ks extends Yr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new Ce(pb(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return Xn.fromReplace(t,this.from,this.to,r)}invert(){return new da(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ks(n.pos,r.pos,this.mark)}merge(t){return t instanceof ks&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ks(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ks(n.from,n.to,t.markFromJSON(n.mark))}}Yr.jsonID("removeMark",ks);class ha extends Yr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Xn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Xn.fromReplace(t,this.pos,this.pos+1,new Ce(ue.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;ir.pos?null:new Tr(n.pos,r.pos,i,s,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,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Tr(n.from,n.to,n.gapFrom,n.gapTo,Ce.fromJSON(t,n.slice),n.insert,!!n.structure)}}Yr.jsonID("replaceAround",Tr);function IT(e,t,n){let r=e.resolve(t),i=n-t,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function J6(e,t,n,r){let i=[],s=[],o,a;e.doc.nodesBetween(t,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,t),p=Math.min(c+l.nodeSize,n),m=r.addToSet(d);for(let T=0;Te.step(l)),s.forEach(l=>e.step(l))}function X6(e,t,n,r){let i=[],s=0;e.doc.nodesBetween(t,n,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(r instanceof Cm){let c=o.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let c=Math.min(a+o.nodeSize,n);for(let u=0;ue.step(new ks(o.from,o.to,o.style)))}function fb(e,t,n,r=n.contentMatch,i=!0){let s=e.doc.nodeAt(t),o=[],a=t+1;for(let l=0;l=0;l--)e.step(o[l])}function e5(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Yu(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),s=e.$to.indexAfter(n);if(nn;m--)T||r.index(m)>0?(T=!0,u=ue.from(r.node(m).copy(u)),d++):l--;let h=ue.empty,p=0;for(let m=s,T=!1;m>n;m--)T||i.after(m+1)=0;o--){if(r.size){let a=n[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ue.from(n[o].type.create(n[o].attrs,r))}let i=t.start,s=t.end;e.step(new Tr(i,s,i,s,new Ce(r,0,0),n.length,!0))}function s5(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,n,(o,a)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,l)&&o5(e.doc,e.mapping.slice(s).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?c=!1:!p&&m&&(c=!0)}c===!1&&tF(e,o,a,s),fb(e,e.mapping.slice(s).map(a,1),r,void 0,c===null);let u=e.mapping.slice(s),d=u.map(a,1),h=u.map(a+o.nodeSize,1);return e.step(new Tr(d,h,d+1,h-1,new Ce(ue.from(r.create(l,null,o.marks)),0,0),1,!0)),c===!0&&eF(e,o,a,s),!1}})}function eF(e,t,n,r){t.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=e.mapping.slice(r).map(n+1+s+o.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function tF(e,t,n,r){t.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=e.mapping.slice(r).map(n+1+s);e.replaceWith(o,o+1,t.type.schema.text(` `))}})}function o5(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function a5(e,t,n,r,i){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let o=n.create(r,null,i||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,o);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Tr(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new Ce(ue.from(o),0,0),1,!0))}function Do(e,t,n=1,r){let i=e.resolve(t),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=n-2;c>s;c--,u--){let d=i.node(c),h=i.index(c);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(h,d.childCount),m=r&&r[u+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let T=r&&r[u]||d;if(!d.canReplace(h+1,d.childCount)||!T.type.validContent(p))return!1}let a=i.indexAfter(s),l=r&&r[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function l5(e,t,n=1,r){let i=e.doc.resolve(t),s=ue.empty,o=ue.empty;for(let a=i.depth,l=i.depth-n,c=n-1;a>l;a--,c--){s=ue.from(i.node(a).copy(s));let u=r&&r[c];o=ue.from(u?u.type.create(u.attrs,o):i.node(a).copy(o))}e.step(new pr(t,t,new Ce(s.append(o),n,n),!0))}function Za(e,t){let n=e.resolve(t),r=n.index();return nF(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function c5(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i0?(s=r.node(i+1),a++,o=r.node(i).maybeChild(a)):(s=r.node(i).maybeChild(a-1),o=r.node(i+1)),s&&!s.isTextblock&&nF(s,o)&&r.node(i).canReplace(a,a+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function u5(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,s=e.doc.resolve(t-n),o=s.node().type;if(i&&o.inlineContent){let u=o.whitespace=="pre",d=!!o.contentMatch.matchType(i);u&&!d?r=!1:!u&&d&&(r=!0)}let a=e.steps.length;if(r===!1){let u=e.doc.resolve(t+n);tF(e,u.node(),u.before(),a)}o.inlineContent&&fb(e,t+n-1,o,s.node().contentMatchAt(s.index()),r==null);let l=e.mapping.slice(a),c=l.map(t-n);if(e.step(new pr(c,l.map(t+n,-1),Ce.empty,!0)),r===!0){let u=e.doc.resolve(c);eF(e,u.node(),u.before(),e.steps.length)}return e}function d5(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,n))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,n))return r.after(i+1);if(s=0;o--){let a=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,l=r.index(o)+(a>0?1:0),c=r.node(o),u=!1;if(s==1)u=c.canReplace(l,l,i);else{let d=c.contentMatchAt(l).findWrapping(i.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return a==0?r.pos:a<0?r.before(o+1):r.after(o+1)}return null}function Fm(e,t,n=t,r=Ce.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),s=e.resolve(n);return iF(i,s,r)?new pr(t,n,r):new h5(i,s,r).fit()}function iF(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class h5{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=ue.empty;for(let i=0;i<=t.depth;i++){let s=t.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=ue.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let s=this.placed,o=r.depth,a=i.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new Ce(s,o,a);return t>-1?new Tr(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new pr(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r1&&(i=0),s.type.spec.isolating&&i<=r){t=r;break}n=s.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=rg(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(n==1&&(o?c.matchType(o.type)||(d=c.fillBefore(ue.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:a,parent:s,inject:d};if(n==2&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:a,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=rg(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new Ce(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=rg(t,n);if(i.childCount<=1&&n>0){let s=t.size-n<=n+i.size;this.unplaced=new Ce(B0(t,n-1,1),n-1,s?n-1:r)}else this.unplaced=new Ce(B0(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let T=0;T1||l==0||T.content.size)&&(d=b,u.push(sF(T.mark(h.allowedMarks(T.marks)),c==1?l:0,c==a.childCount?p:-1)))}let m=c==a.childCount;m||(p=-1),this.placed=L0(this.placed,n,ue.from(u)),this.frontier[n].match=d,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let T=0,b=a;T1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],s=n=0;a--){let{match:l,type:c}=this.frontier[a],u=ig(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:o,move:s?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=L0(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,s)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=L0(this.placed,this.depth,ue.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(ue.empty,!0);t.childCount&&(this.placed=L0(this.placed,this.frontier.length,t))}}function B0(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(B0(e.firstChild.content,t-1,n)))}function L0(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(L0(e.lastChild.content,t-1,n)))}function rg(e,t){for(let n=0;n1&&(r=r.replaceChild(0,sF(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(ue.empty,!0)))),e.copy(r)}function ig(e,t,n,r,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let a=r.fillBefore(s.content,!0,o);return a&&!p5(n,s.content,o)?a:null}function p5(e,t,n){for(let r=n;r0;h--,p--){let m=i.node(h).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;o.indexOf(h)>-1?a=h:i.before(h)==p&&o.splice(1,0,-h)}let l=o.indexOf(a),c=[],u=r.openStart;for(let h=r.content,p=0;;p++){let m=h.firstChild;if(c.push(m),p==r.openStart)break;h=m.content}for(let h=u-1;h>=0;h--){let p=c[h],m=f5(p.type);if(m&&!p.sameMarkup(i.node(Math.abs(a)-1)))u=h;else if(m||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+u+1)%(r.openStart+1),m=c[p];if(m)for(let T=0;T=0&&(e.replace(t,n,r),!(e.steps.length>d));h--){let p=o[h];p<0||(t=i.before(p),n=s.after(p))}}function oF(e,t,n,r,i){if(tr){let s=i.contentMatchAt(0),o=s.fillBefore(e).append(e);e=o.append(s.matchFragment(o).fillBefore(ue.empty,!0))}return e}function g5(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=d5(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new Ce(ue.from(r),0,0))}function T5(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),s=aF(r,i);for(let o=0;o0&&(l||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return e.delete(r.before(a),i.after(a))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(t-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return e.delete(r.before(o),n);e.delete(t,n)}function aF(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let s=e.start(i);if(st.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(s==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==s-1)&&n.push(i)}return n}class Xc extends Yr{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return Xn.fail("No node at attribute step's position");let r=Object.create(null);for(let s in n.attrs)r[s]=n.attrs[s];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Xn.fromReplace(t,this.pos,this.pos+1,new Ce(ue.from(i),0,n.isLeaf?0:1))}getMap(){return _i.empty}invert(t){return new Xc(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Xc(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Xc(n.pos,n.attr,n.value)}}Yr.jsonID("attr",Xc);class wd extends Yr{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return Xn.ok(r)}getMap(){return _i.empty}invert(t){return new wd(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new wd(n.attr,n.value)}}Yr.jsonID("docAttr",wd);let xc=class extends Error{};xc=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},xc.prototype=Object.create(Error.prototype),xc.prototype.constructor=xc,xc.prototype.name="TransformError";class gb{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new sf}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new xc(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=Ce.empty){let i=Fm(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new Ce(ue.from(r),0,0))}delete(t,n){return this.replace(t,n,Ce.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return m5(this,t,n,r),this}replaceRangeWith(t,n,r){return g5(this,t,n,r),this}deleteRange(t,n){return T5(this,t,n),this}lift(t,n){return t5(this,t,n),this}join(t,n=1){return u5(this,t,n),this}wrap(t,n){return i5(this,t,n),this}setBlockType(t,n=t,r,i=null){return s5(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return a5(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new Xc(t,n,r)),this}setDocAttribute(t,n){return this.step(new wd(t,n)),this}addNodeMark(t,n){return this.step(new ha(t,n)),this}removeNodeMark(t,n){if(!(n instanceof Xt)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new du(t,n)),this}split(t,n=1,r){return l5(this,t,n,r),this}addMark(t,n,r){return J6(this,t,n,r),this}removeMark(t,n,r){return X6(this,t,n,r),this}clearIncompatible(t,n,r){return fb(this,t,n,r),this}}const sg=Object.create(null);class dt{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new lF(t.min(n),t.max(n))]}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 n=0;n=0;s--){let o=n<0?kc(t.node(0),t.node(s),t.before(s+1),t.index(s),n,r):kc(t.node(0),t.node(s),t.after(s+1),t.index(s)+1,n,r);if(o)return o}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new ui(t.node(0))}static atStart(t){return kc(t,t,0,0,1)||new ui(t)}static atEnd(t){return kc(t,t,t.content.size,t.childCount,-1)||new ui(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=sg[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in sg)throw new RangeError("Duplicate use of selection JSON ID "+t);return sg[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Xe.between(this.$anchor,this.$head).getBookmark()}}dt.prototype.visible=!0;class lF{constructor(t,n){this.$from=t,this.$to=n}}let Gv=!1;function qv(e){!Gv&&!e.parent.inlineContent&&(Gv=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Xe extends dt{constructor(t,n=t){qv(t),qv(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return dt.near(r);let i=t.resolve(n.map(this.anchor));return new Xe(i.parent.inlineContent?i:r,r)}replace(t,n=Ce.empty){if(super.replace(t,n),n==Ce.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Xe&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Om(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Xe(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let s=dt.findFrom(n,r,!0)||dt.findFrom(n,-r,!0);if(s)n=s.$head;else return dt.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(dt.findFrom(t,-r,!0)||dt.findFrom(t,r,!0)).$anchor,t.pos0?0:1);i>0?o=0;o+=i){let a=t.child(o);if(a.isAtom){if(!s&&Je.isSelectable(a))return Je.create(e,n-(i<0?a.nodeSize:0))}else{let l=kc(e,a,n+i,i<0?a.childCount:0,i,s);if(l)return l}n+=a.nodeSize*i}return null}function Wv(e,t,n){let r=e.steps.length-1;if(r{o==null&&(o=u)}),e.setSelection(dt.near(e.doc.resolve(o),n))}const Kv=1,Yh=2,Qv=4;let b5=class extends gb{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Yh,this}ensureMarks(e){return Xt.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Yh)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Yh,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Xt.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n==null&&(n=t),n=n??t,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let s=this.doc.resolve(t);i=n==t?s.marks():s.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.setSelection(dt.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Qv,this}get scrolledIntoView(){return(this.updated&Qv)>0}};function Jv(e,t){return!t||!e?e:e.bind(t)}class I0{constructor(t,n,r){this.name=t,this.init=Jv(n.init,r),this.apply=Jv(n.apply,r)}}const y5=[new I0("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new I0("selection",{init(e,t){return e.selection||dt.atStart(t.doc)},apply(e){return e.selection}}),new I0("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new I0("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class og{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=y5.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new I0(r.key,r.spec.state,r))})}}class Uc{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,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],s=i.spec.state;s&&s.toJSON&&(n[r]=s.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new og(t.schema,t.plugins),s=new Uc(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=vo.fromJSON(t.schema,n.doc);else if(o.name=="selection")s.selection=dt.fromJSON(s.doc,n.selection);else if(o.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){s[o.name]=c.fromJSON.call(l,t,n[a],s);return}}s[o.name]=o.init(t,s)}}),s}}function cF(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=cF(i,t,{})),n[r]=i}return n}class Mt{constructor(t){this.spec=t,this.props={},t.props&&cF(t.props,this,this.props),this.key=t.key?t.key.key:uF("plugin")}getState(t){return t[this.key]}}const ag=Object.create(null);function uF(e){return e in ag?e+"$"+ ++ag[e]:(ag[e]=0,e+"$")}class Vt{constructor(t="key"){this.key=uF(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Dr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},hu=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let YT=null;const mo=function(e,t,n){let r=YT||(YT=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},E5=function(){YT=null},Zl=function(e,t,n,r){return n&&(Xv(e,t,n,r,-1)||Xv(e,t,n,r,1))},v5=/^(img|br|input|textarea|hr)$/i;function Xv(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Zi(e))){let s=e.parentNode;if(!s||s.nodeType!=1||lh(e)||v5.test(e.nodeName)||e.contentEditable=="false")return!1;t=Dr(e)+(i<0?0:1),e=s}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?Zi(e):0}else return!1}}function Zi(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function D5(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Zi(e)}else if(e.parentNode&&!lh(e))t=Dr(e),e=e.parentNode;else return null}}function S5(e,t){for(;;){if(e.nodeType==3&&t2),Yi=pu||(Zs?/Mac/.test(Zs.platform):!1),N5=Zs?/Win/.test(Zs.platform):!1,bo=/Android \d/.test(Pa),ch=!!eD&&"webkitFontSmoothing"in eD.documentElement.style,F5=ch?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function O5(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function io(e,t){return typeof e=="number"?e:e[t]}function x5(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function tD(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(o.nodeType!=1){o=hu(o);continue}let a=o,l=a==s.body,c=l?O5(s):x5(a),u=0,d=0;if(t.topc.bottom-io(r,"bottom")&&(d=t.bottom-t.top>c.bottom-c.top?t.top+io(i,"top")-c.top:t.bottom-c.bottom+io(i,"bottom")),t.leftc.right-io(r,"right")&&(u=t.right-c.right+io(i,"right")),u||d)if(l)s.defaultView.scrollBy(u,d);else{let p=a.scrollLeft,m=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let T=a.scrollLeft-p,b=a.scrollTop-m;t={left:t.left-T,top:t.top-b,right:t.right-T,bottom:t.bottom-b}}let h=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(h))break;o=h=="absolute"?o.offsetParent:hu(o)}}function k5(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let s=(t.left+t.right)/2,o=n+1;o=n-20){r=a,i=l.top;break}}return{refDOM:r,refTop:i,stack:pF(e.dom)}}function pF(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=hu(r));return t}function R5({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;fF(n,r==0?0:r-t)}function fF(e,t){for(let n=0;n=a){o=Math.max(m.bottom,o),a=Math.min(m.top,a);let T=m.left>t.left?m.left-t.left:m.right=(m.left+m.right)/2?1:0));continue}}else m.top>t.top&&!l&&m.left<=t.left&&m.right>=t.left&&(l=u,c={left:Math.max(m.left,Math.min(m.right,t.left)),top:m.top});!n&&(t.left>=m.right&&t.top>=m.top||t.left>=m.left&&t.top>=m.bottom)&&(s=d+1)}}return!n&&l&&(n=l,i=c,r=0),n&&n.nodeType==3?B5(n,i):!n||r&&n.nodeType==1?{node:e,offset:s}:mF(n,i)}function B5(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i=(s.left+s.right)/2?1:0)}}return{node:e,offset:0}}function Ab(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function L5(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(o.left+o.right)/2?1:-1}return e.docView.posFromDOM(r,i,s)}function Y5(e,t,n,r){let i=-1;for(let s=t,o=!1;s!=e.dom;){let a=e.docView.nearestDesc(s,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&(!o&&l.left>r.left||l.top>r.top?i=a.posBefore:(!o&&l.right-1?i:e.docView.posFromDOM(t,n,-1)}function gF(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&i++}let c;ch&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=Y5(e,r,i,t))}a==null&&(a=I5(e,o,t));let l=e.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function nD(e){return e.top=0&&i==r.nodeValue.length?(a--,c=1):n<0?a--:l++,i0(Qo(mo(r,a,l),c),c<0)}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(s==null&&i&&(n<0||i==Zi(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return lg(a.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(n<0||i==Zi(r))){let a=r.childNodes[i-1],l=a.nodeType==3?mo(a,Zi(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(l)return i0(Qo(l,1),!1)}if(s==null&&i=0)}function i0(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function lg(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function AF(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function P5(e,t,n){let r=t.selection,i=n=="up"?r.$from:r.$to;return AF(e,t,()=>{let{node:s}=e.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let o=TF(e,i.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=mo(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;cu.top+1&&(n=="up"?o.top-u.top>(u.bottom-o.top)*2:u.bottom-o.bottom>(o.bottom-u.top)*2))return!1}}return!0})}const $5=/[\u0590-\u08ac]/;function U5(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,o=i==r.parent.content.size,a=e.domSelection();return a?!$5.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?s:o:AF(e,t,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=e.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:m,focusOffset:T}=e.domSelectionRange(),b=m&&!p.contains(m.nodeType==1?m:m.parentNode)||l==m&&c==T;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return h!=null&&(a.caretBidiLevel=h),b}):r.pos==r.start()||r.pos==r.end()}let rD=null,iD=null,sD=!1;function z5(e,t,n){return rD==t&&iD==n?sD:(rD=t,iD=n,sD=n=="up"||n=="down"?P5(e,t,n):U5(e,t,n))}const Ui=0,oD=1,El=2,Ps=3;class uh{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=Ui,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nDr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&n==t.childNodes.length)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!n||s.node))if(r&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))r=!1;else return s}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||o instanceof yF){i=t-s;break}s=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof bF&&s.side>=0;r--);if(n<=0){let s,o=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,o=!1);return s&&n&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?Dr(s.dom)+1:0}}else{let s,o=!0;for(;s=r=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,u);t=o;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=Dr(h.dom)+1;break}t-=h.size}i==-1&&(i=0)}if(i>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;um&&on){let m=a;a=l,l=m}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i=r:tr){let a=r+s.border,l=o-s.border;if(t>=a&&n<=l){this.dirty=t==r||n==o?El:oD,t==a&&n==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Ps:s.markDirty(t-a,n-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?El:Ps}r=o}this.dirty=El}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?El:oD;n.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=n,this.widget=n,s=this}matchesWidget(t){return this.dirty==Ui&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class V5 extends uh{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Pl extends uh{constructor(t,n,r,i,s){super(t,[],r,i),this.mark=n,this.spec=s}static create(t,n,r,i){let s=i.nodeViews[n.type.name],o=s&&s(n,i,r);return(!o||!o.dom)&&(o=Kl.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Pl(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Ps||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Ps&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Ui){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(s=UT(s,0,t,r));for(let a=0;a{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},r,i),u=c&&c.dom,d=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=Kl.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let h=u;return u=DF(u,r,n),c?l=new j5(t,n,r,i,u,d||null,h,c,s,o+1):n.isText?new km(t,n,r,i,u,h,s):new Ea(t,n,r,i,u,d||null,h,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>ue.empty)}return t}matchesNode(t,n,r){return this.dirty==Ui&&t.eq(this.node)&&of(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,s=t.composing?this.localCompositionInfo(t,n):null,o=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new q5(this,o&&o.node,t);Q5(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,t):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?Xt.none:this.node.child(u).marks,r,t),l.placeWidget(c,t,i)},(c,u,d,h)=>{l.syncToMarks(c.marks,r,t);let p;l.findNodeMatch(c,u,d,h)||a&&t.state.selection.from>i&&t.state.selection.to-1&&l.updateNodeAt(c,u,d,p,t)||l.updateNextNode(c,u,d,t,h,i)||l.addNode(c,u,d,t,i),i+=c.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==El)&&(o&&this.protectLocalComposition(t,o),EF(this.contentDOM,this.children,t),pu&&J5(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof Xe)||rn+this.node.content.size)return null;let s=t.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,a=X5(this.node.content,o,r-n,i-n);return a<0?null:{node:s,pos:a,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new V5(this,s,n,i);t.input.compositionNodes.push(o),this.children=UT(this.children,r,r+i.length,t,o)}update(t,n,r,i){return this.dirty==Ps||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Ui}updateOuterDeco(t){if(of(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=vF(this.dom,this.nodeDOM,$T(this.outerDeco,this.node,n),$T(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function aD(e,t,n,r,i){DF(r,t,e);let s=new Ea(void 0,e,t,n,r,r,r,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class km extends Ea{constructor(t,n,r,i,s,o,a){super(t,n,r,i,s,null,o,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,i){return this.dirty==Ps||this.dirty!=Ui&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Ui||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=Ui,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),s=document.createTextNode(i.text);return new km(this.parent,i,this.outerDeco,this.innerDeco,s,s,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ps)}get domAtom(){return!1}isText(t){return this.node.text==t}}class yF extends uh{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Ui&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class j5 extends Ea{constructor(t,n,r,i,s,o,a,l,c,u){super(t,n,r,i,s,o,a,c,u),this.spec=l}update(t,n,r,i){if(this.dirty==Ps)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let s=this.spec.update(t,n,r);return s&&this.updateInner(t,n,r,i),s}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function EF(e,t,n){let r=e.firstChild,i=!1;for(let s=0;s>1,o=Math.min(s,t.length);for(;i-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Pl.create(this.top,t[s],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,r,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(t,n,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof Pl)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(i-1))break;--i,s.set(a,i),o.push(a)}}return{index:i,matched:s,matches:o.reverse()}}function K5(e,t){return e.type.side-t.type.side}function Q5(e,t,n,r){let i=t.locals(e),s=0;if(i.length==0){for(let c=0;cs;)a.push(i[o++]);let m=s+h.nodeSize;if(h.isText){let b=m;o!b.inline):a.slice();r(h,T,t.forChild(s,h),p),s=m}}function J5(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function X5(e,t,n,r){for(let i=0,s=0;i=n){if(s>=r&&l.slice(r-t.length-a,r-a)==t)return r-t.length;let c=a=0&&c+t.length+a>=n)return a+c;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}function UT(e,t,n,r,i){let s=[];for(let o=0,a=0;o=n||u<=t?s.push(l):(cn&&s.push(l.slice(n-c,l.size,r)))}return s}function bb(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),s=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let a=r.resolve(o),l,c;if(xm(n)){for(l=o;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&Je.isSelectable(d)&&i.parent&&!(d.isInline&&w5(n.focusNode,n.focusOffset,i.dom))){let h=i.posBefore;c=new Je(o==h?a:r.resolve(h))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=o,h=o;for(let p=0;p{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!SF(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function t9(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setStart(r.parentNode,Dr(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&di&&ya<=11&&(r.disabled=!0,r.disabled=!1)}function wF(e,t){if(t instanceof Je){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(hD(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else hD(e)}function hD(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function yb(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||Xe.between(t,n,r)}function pD(e){return e.editable&&!e.hasFocus()?!1:_F(e)}function _F(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function n9(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Zl(t.node,t.offset,n.anchorNode,n.anchorOffset)}function zT(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),s=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return s&&dt.findFrom(s,t)}function ea(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function fD(e,t,n){let r=e.state.selection;if(r instanceof Xe)if(n.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=e.state.doc.resolve(i.pos+s.nodeSize*(t<0?-1:1));return ea(e,new Xe(r.$anchor,o))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=zT(e.state,t);return i&&i instanceof Je?ea(e,i):!1}else if(!(Yi&&n.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let a=t<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=e.docView.descAt(a))&&!o.contentDOM?Je.isSelectable(s)?ea(e,new Je(t<0?e.state.doc.resolve(i.pos-s.nodeSize):i)):ch?ea(e,new Xe(e.state.doc.resolve(t<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Je&&r.node.isInline)return ea(e,new Xe(t>0?r.$to:r.$from));{let i=zT(e.state,t);return i?ea(e,i):!1}}}function af(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function K0(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Cc(e,t){return t<0?r9(e):i9(e)}function r9(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,s,o=!1;for(us&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(K0(a,-1))i=n,s=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(CF(n))break;{let a=n.previousSibling;for(;a&&K0(a,-1);)i=n.parentNode,s=Dr(a),a=a.previousSibling;if(a)n=a,r=af(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}o?VT(e,n,r):i&&VT(e,i,s)}function i9(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=af(n),s,o;for(;;)if(r{e.state==i&&So(e)},50)}function mD(e,t){let n=e.state.doc.resolve(t);if(!(Br||N5)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>r.top&&s1)return i.leftr.top&&s1)return i.left>r.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function gD(e,t,n){let r=e.state.selection;if(r instanceof Xe&&!r.empty||n.indexOf("s")>-1||Yi&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let o=zT(e.state,t);if(o&&o instanceof Je)return ea(e,o)}if(!i.parent.inlineContent){let o=t<0?i:s,a=r instanceof ui?dt.near(o,t):dt.findFrom(o,t);return a?ea(e,a):!1}return!1}function TD(e,t){if(!(e.state.selection instanceof Xe))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let o=e.state.tr;return t<0?o.delete(n.pos-s.nodeSize,n.pos):o.delete(n.pos,n.pos+s.nodeSize),e.dispatch(o),!0}return!1}function AD(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function a9(e){if(!Xr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;AD(e,r,"true"),setTimeout(()=>AD(e,r,"false"),20)}return!1}function l9(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function c9(e,t){let n=t.keyCode,r=l9(t);if(n==8||Yi&&n==72&&r=="c")return TD(e,-1)||Cc(e,-1);if(n==46&&!t.shiftKey||Yi&&n==68&&r=="c")return TD(e,1)||Cc(e,1);if(n==13||n==27)return!0;if(n==37||Yi&&n==66&&r=="c"){let i=n==37?mD(e,e.state.selection.from)=="ltr"?-1:1:-1;return fD(e,i,r)||Cc(e,i)}else if(n==39||Yi&&n==70&&r=="c"){let i=n==39?mD(e,e.state.selection.from)=="ltr"?1:-1:1;return fD(e,i,r)||Cc(e,i)}else{if(n==38||Yi&&n==80&&r=="c")return gD(e,-1,r)||Cc(e,-1);if(n==40||Yi&&n==78&&r=="c")return a9(e)||gD(e,1,r)||Cc(e,1);if(r==(Yi?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Eb(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:i,openEnd:s}=t;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let o=e.someProp("clipboardSerializer")||Kl.fromSchema(e.state.schema),a=RF(),l=a.createElement("div");l.appendChild(o.serializeFragment(r,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=kF[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let m=a.createElement(u[p]);for(;l.firstChild;)m.appendChild(l.firstChild);l.appendChild(m),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` `);return{dom:l,text:h,slice:t}}function NF(e,t,n,r,i){let s=i.parent.type.spec.code,o,a;if(!n&&!t)return null;let l=t&&(r||s||!n);if(l){if(e.someProp("transformPastedText",h=>{t=h(t,s||r,e)}),s)return t?new Ce(ue.from(e.state.schema.text(t.replace(/\r\n?/g,` `))),0,0):Ce.empty;let d=e.someProp("clipboardTextParser",h=>h(t,i,r,e));if(d)a=d;else{let h=i.marks(),{schema:p}=e.state,m=Kl.fromSchema(p);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(T=>{let b=o.appendChild(document.createElement("p"));T&&b.appendChild(m.serializeNode(p.text(T,h)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),o=p9(n),ch&&f9(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let h=o.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;o=h}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Jc.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||u),context:i,ruleFromNode(d){return d.nodeName=="BR"&&!d.nextSibling&&d.parentNode&&!u9.test(d.parentNode.nodeName)?{ignore:!0}:null}})),u)a=m9(bD(a,+u[1],+u[2]),u[4]);else if(a=Ce.maxOpen(d9(a.content,i),!0),a.openStart||a.openEnd){let d=0,h=0;for(let p=a.content.firstChild;d{a=d(a,e)}),a}const u9=/^(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 d9(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(o=>{if(!s)return;let a=r.findWrapping(o.type),l;if(!a)return s=null;if(l=s.length&&i.length&&OF(a,i,o,s[s.length-1],0))s[s.length-1]=l;else{s.length&&(s[s.length-1]=xF(s[s.length-1],i.length));let c=FF(o,a);s.push(c),r=r.matchType(c.type),i=a}}),s)return ue.from(s)}return e}function FF(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,ue.from(e));return e}function OF(e,t,n,r,i){if(i1&&(s=0),i=n&&(a=t<0?o.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(ue.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(a))}function bD(e,t,n){return tn})),ug.createHTML(e)):e}function p9(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=RF().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&kF[r[1].toLowerCase()])&&(e=i.map(s=>"<"+s+">").join("")+e+i.map(s=>"").reverse().join("")),n.innerHTML=h9(e),i)for(let s=0;s=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=ue.from(l.create(r[a+1],i)),s++,o++}return new Ce(i,s,o)}const Gr={},Wr={},g9={touchstart:!0,touchmove:!0};class T9{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},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 A9(e){for(let t in Gr){let n=Gr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{y9(e,r)&&!vb(e,r)&&(e.editable||!(r.type in Wr))&&n(e,r)},g9[t]?{passive:!0}:void 0)}Xr&&e.dom.addEventListener("input",()=>null),GT(e)}function pa(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function b9(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function GT(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>vb(e,r))})}function vb(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function y9(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function E9(e,t){!vb(e,t)&&Gr[t.type]&&(e.editable||!(t.type in Wr))&&Gr[t.type](e,t)}Wr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!ED(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(bo&&Br&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),pu&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,Tl(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||c9(e,n)?n.preventDefault():pa(e,"key")},Wr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},Wr.keypress=(e,t)=>{let n=t;if(ED(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Yi&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Xe)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,i))&&e.dispatch(e.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function lf(e){return{left:e.clientX,top:e.clientY}}function v9(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Db(e,t,n,r,i){if(r==-1)return!1;let s=e.state.doc.resolve(r);for(let o=s.depth+1;o>0;o--)if(e.someProp(t,a=>o>s.depth?a(e,n,s.nodeAfter,s.before(o),i,!0):a(e,n,s.node(o),s.before(o),i,!1)))return!0;return!1}function eu(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function D9(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Je.isSelectable(r)?(eu(e,new Je(n)),!0):!1}function S9(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof Je&&(r=n.node);let s=e.state.doc.resolve(t);for(let o=s.depth+1;o>0;o--){let a=o>s.depth?s.nodeAfter:s.node(o);if(Je.isSelectable(a)){r&&n.$from.depth>0&&o>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?i=s.before(n.$from.depth):i=s.before(o);break}}return i!=null?(eu(e,Je.create(e.state.doc,i)),!0):!1}function w9(e,t,n,r,i){return Db(e,"handleClickOn",t,n,r)||e.someProp("handleClick",s=>s(e,t,r))||(i?S9(e,n):D9(e,n))}function _9(e,t,n,r){return Db(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function C9(e,t,n,r){return Db(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||N9(e,n,r)}function N9(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(eu(e,Xe.create(r,0,r.content.size)),!0):!1;let i=r.resolve(t);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),a=i.before(s);if(o.inlineContent)eu(e,Xe.create(r,a+1,a+1+o.content.size));else if(Je.isSelectable(o))eu(e,Je.create(r,a));else continue;return!0}}function qT(e){return cf(e)}const MF=Yi?"metaKey":"ctrlKey";Gr.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=qT(e),i=Date.now(),s="singleClick";i-e.input.lastClick.time<500&&v9(n,e.input.lastClick)&&!n[MF]&&(e.input.lastClick.type=="singleClick"?s="doubleClick":e.input.lastClick.type=="doubleClick"&&(s="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:s};let o=e.posAtCoords(lf(n));o&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new F9(e,o,n,!!r)):(s=="doubleClick"?_9:C9)(e,o.pos,o.inside,n)?n.preventDefault():pa(e,"pointer"))};class F9{constructor(t,n,r,i){this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[MF],this.allowDefault=r.shiftKey;let s,o;if(n.inside>-1)s=t.state.doc.nodeAt(n.inside),o=n.inside;else{let u=t.state.doc.resolve(n.pos);s=u.parent,o=u.depth?u.before():0}const a=i?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=t.state;(r.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof Je&&c.from<=o&&c.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&us&&!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)),pa(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(()=>So(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(lf(t))),this.updateAllowDefault(t),this.allowDefault||!n?pa(this.view,"pointer"):w9(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Xr&&this.mightDrag&&!this.mightDrag.node.isAtom||Br&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(eu(this.view,dt.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):pa(this.view,"pointer")}move(t){this.updateAllowDefault(t),pa(this.view,"pointer"),t.buttons==0&&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)}}Gr.touchstart=e=>{e.input.lastTouch=Date.now(),qT(e),pa(e,"pointer")},Gr.touchmove=e=>{e.input.lastTouch=Date.now(),pa(e,"pointer")},Gr.contextmenu=e=>qT(e);function ED(e,t){return e.composing?!0:Xr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const O9=bo?5e3:-1;Wr.compositionstart=Wr.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Xe&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),cf(e,!0),e.markCursor=null;else if(cf(e,!t.selection.empty),us&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let a=e.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}e.input.composing=!0}vD(e,O9)},Wr.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,vD(e,20))};function vD(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>cf(e),t))}function BF(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=k9());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function x9(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=D5(t.focusNode,t.focusOffset),r=S5(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,s=e.domObserver.lastChangedTextNode;if(n==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let o=n.pmViewDesc;if(!(!o||!o.isText(n.nodeValue)))return r}}return n||r}function k9(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function cf(e,t=!1){if(!(bo&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),BF(e),t||e.docView&&e.docView.dirty){let n=bb(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!e.state.selection.empty?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function R9(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const Q0=di&&ya<15||pu&&F5<604;Gr.copy=Wr.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let s=Q0?null:n.clipboardData,o=r.content(),{dom:a,text:l}=Eb(e,o);s?(n.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):R9(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function M9(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function B9(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?_d(e,r.value,null,i,t):_d(e,r.textContent,r.innerHTML,i,t)},50)}function _d(e,t,n,r,i){let s=NF(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,s||Ce.empty)))return!0;if(!s)return!1;let o=M9(s),a=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(s);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function LF(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Wr.paste=(e,t)=>{let n=t;if(e.composing&&!bo)return;let r=Q0?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&_d(e,LF(r),r.getData("text/html"),i,n)?n.preventDefault():B9(e,n)};class IF{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const DD=Yi?"altKey":"ctrlKey";Gr.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,s=i.empty?null:e.posAtCoords(lf(n)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof Je?i.to-1:i.to))){if(r&&r.mightDrag)o=Je.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(o=Je.create(e.state.doc,d.posBefore))}}let a=(o||e.state.selection).content(),{dom:l,text:c,slice:u}=Eb(e,a);(!n.dataTransfer.files.length||!Br||hF>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Q0?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Q0||n.dataTransfer.setData("text/plain",c),e.dragging=new IF(u,!n[DD],o)},Gr.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},Wr.dragover=Wr.dragenter=(e,t)=>t.preventDefault(),Wr.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(lf(n));if(!i)return;let s=e.state.doc.resolve(i.pos),o=r&&r.slice;o?e.someProp("transformPasted",m=>{o=m(o,e)}):o=NF(e,LF(n.dataTransfer),Q0?null:n.dataTransfer.getData("text/html"),!1,s);let a=!!(r&&!n[DD]);if(e.someProp("handleDrop",m=>m(e,n,o||Ce.empty,a))){n.preventDefault();return}if(!o)return;n.preventDefault();let l=o?rF(e.state.doc,s.pos,o):s.pos;l==null&&(l=s.pos);let c=e.state.tr;if(a){let{node:m}=r;m?m.replace(c):c.deleteSelection()}let u=c.mapping.map(l),d=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,h=c.doc;if(d?c.replaceRangeWith(u,u,o.content.firstChild):c.replaceRange(u,u,o),c.doc.eq(h))return;let p=c.doc.resolve(u);if(d&&Je.isSelectable(o.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(o.content.firstChild))c.setSelection(new Je(p));else{let m=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((T,b,D,v)=>m=v),c.setSelection(yb(e,p,c.doc.resolve(m)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},Gr.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&So(e)},20))},Gr.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},Gr.beforeinput=(e,t)=>{if(Br&&bo&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Tl(8,"Backspace")))))return;let{$cursor:r}=e.state.selection;r&&r.pos>0&&e.dispatch(e.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let e in Wr)Gr[e]=Wr[e];function Cd(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class uf{constructor(t,n){this.toDOM=t,this.spec=n||Nl,this.side=this.spec.side||0}map(t,n,r,i){let{pos:s,deleted:o}=t.mapResult(n.from+i,this.side<0?-1:1);return o?null:new $n(s-r,s-r,this)}valid(){return!0}eq(t){return this==t||t instanceof uf&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Cd(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class va{constructor(t,n){this.attrs=t,this.spec=n||Nl}map(t,n,r,i){let s=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,o=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=o?null:new $n(s,o,this)}valid(t,n){return n.from=t&&(!s||s(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let o=0;ot){let a=this.children[o]+1;this.children[o+2].findInner(t-a,n-a,r,i+a,s)}}map(t,n,r){return this==Fr||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Nl)}mapInner(t,n,r,i,s){let o;for(let a=0;a{let c=l+r,u;if(u=HF(n,a,c)){for(i||(i=this.children.slice());sa&&d.to=t){this.children[a]==t&&(r=this.children[a+2]);break}let s=t+1,o=s+n.content.size;for(let a=0;as&&l.type instanceof va){let c=Math.max(s,l.from)-s,u=Math.min(o,l.to)-s;ci.map(t,n,Nl));return ra.from(r)}forChild(t,n){if(n.isLeaf)return zt.empty;let r=[];for(let i=0;in instanceof zt)?t:t.reduce((n,r)=>n.concat(r instanceof zt?r:r.members),[]))}}forEachSet(t){for(let n=0;n{let b=T-m-(p-h);for(let D=0;Dv+u-d)continue;let C=a[D]+u-d;p>=C?a[D+1]=h<=C?-2:-1:h>=u&&b&&(a[D]+=b,a[D+1]+=b)}d+=b}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c=r.content.size){l=!0;continue}let h=n.map(e[c+1]+s,-1),p=h-i,{index:m,offset:T}=r.content.findIndex(d),b=r.maybeChild(m);if(b&&T==d&&T+b.nodeSize==p){let D=a[c+2].mapInner(n,b,u+1,e[c]+s+1,o);D!=Fr?(a[c]=d,a[c+1]=p,a[c+2]=D):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=I9(a,e,t,n,i,s,o),u=df(c,r,0,o);t=u.local;for(let d=0;dn&&o.to{let c=HF(e,a,l+n);if(c){s=!0;let u=df(c,a,n+l+1,r);u!=Fr&&i.push(l,l+a.nodeSize,u)}});let o=YF(s?ZF(e):e,-n).sort(Fl);for(let a=0;a0;)t++;e.splice(t,0,n)}function dg(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Fr&&t.push(r)}),e.cursorWrapper&&t.push(zt.create(e.state.doc,[e.cursorWrapper.deco])),ra.from(t)}const Y9={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},H9=di&&ya<=11;class Z9{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 P9{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Z9,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),H9&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.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,Y9)),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 n=0;nthis.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(pD(this.view)){if(this.suppressingSelectionUpdates)return So(this.view);if(di&&ya<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Zl(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 n=new Set,r;for(let s=t.focusNode;s;s=hu(s))n.add(s);for(let s=t.anchorNode;s;s=hu(s))if(n.has(s)){r=s;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!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 n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&pD(t)&&!this.ignoreSelectionChange(r),s=-1,o=-1,a=!1,l=[];if(t.editable)for(let u=0;ud.nodeName=="BR");if(u.length==2){let[d,h]=u;d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let h of u){let p=h.parentNode;p&&p.nodeName=="LI"&&(!d||z9(t,d)!=p)&&h.remove()}}}let c=null;s<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||i)&&(s>-1&&(t.docView.markDirty(s,o),$9(t)),this.handleDOMChange(s,o,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||So(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let u=0;ui;b--){let D=r.childNodes[b-1],v=D.pmViewDesc;if(D.nodeName=="BR"&&!v){s=b;break}if(!v||v.size)break}let d=e.state.doc,h=e.someProp("domParser")||Jc.fromSchema(e.state.schema),p=d.resolve(o),m=null,T=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:s,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:j9,context:p});if(c&&c[0].pos!=null){let b=c[0].pos,D=c[1]&&c[1].pos;D==null&&(D=b),m={anchor:b+o,head:D+o}}return{doc:T,sel:m,from:o,to:a}}function j9(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Xr&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Xr&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const G9=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function q9(e,t,n,r,i){let s=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let $=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,w=bb(e,$);if(w&&!e.state.selection.eq(w)){if(Br&&bo&&e.input.lastKeyCode===13&&Date.now()-100z(e,Tl(13,"Enter"))))return;let U=e.state.tr.setSelection(w);$=="pointer"?U.setMeta("pointer",!0):$=="key"&&U.scrollIntoView(),s&&U.setMeta("composition",s),e.dispatch(U)}return}let o=e.state.doc.resolve(t),a=o.sharedDepth(n);t=o.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l=e.state.selection,c=V9(e,t,n),u=e.state.doc,d=u.slice(c.from,c.to),h,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||bo)&&i.some($=>$.nodeType==1&&!G9.test($.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",$=>$(e,Tl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(r&&l instanceof Xe&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))m={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let $=ND(e,e.state.doc,c.sel);if($&&!$.eq(e.state.selection)){let w=e.state.tr.setSelection($);s&&w.setMeta("composition",s),e.dispatch(w)}}return}e.state.selection.frome.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?m.start=e.state.selection.from:m.endA=e.state.selection.to-2&&e.state.selection.to<=c.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),di&&ya<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>c.from&&c.doc.textBetween(m.start-c.from-1,m.start-c.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let T=c.doc.resolveNoCache(m.start-c.from),b=c.doc.resolveNoCache(m.endB-c.from),D=u.resolve(m.start),v=T.sameParent(b)&&T.parent.inlineContent&&D.end()>=m.endA,C;if((pu&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some($=>$.nodeName=="DIV"||$.nodeName=="P"))||!v&&T.pos$(e,Tl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&K9(u,m.start,m.endA,T,b)&&e.someProp("handleKeyDown",$=>$(e,Tl(8,"Backspace")))){bo&&Br&&e.domObserver.suppressSelectionUpdates();return}Br&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),bo&&!v&&T.start()!=b.start()&&b.parentOffset==0&&T.depth==b.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==m.endA&&(m.endB-=2,b=c.doc.resolveNoCache(m.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function($){return $(e,Tl(13,"Enter"))})},20));let S=m.start,O=m.endA,R,H,W;if(v){if(T.pos==b.pos)di&&ya<=11&&T.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>So(e),20)),R=e.state.tr.delete(S,O),H=u.resolve(m.start).marksAcross(u.resolve(m.endA));else if(m.endA==m.endB&&(W=W9(T.parent.content.cut(T.parentOffset,b.parentOffset),D.parent.content.cut(D.parentOffset,m.endA-D.start()))))R=e.state.tr,W.type=="add"?R.addMark(S,O,W.mark):R.removeMark(S,O,W.mark);else if(T.parent.child(T.index()).isText&&T.index()==b.index()-(b.textOffset?0:1)){let $=T.parent.textBetween(T.parentOffset,b.parentOffset);if(e.someProp("handleTextInput",w=>w(e,S,O,$)))return;R=e.state.tr.insertText($,S,O)}}if(R||(R=e.state.tr.replace(S,O,c.doc.slice(m.start-c.from,m.endB-c.from))),c.sel){let $=ND(e,R.doc,c.sel);$&&!(Br&&e.composing&&$.empty&&(m.start!=m.endB||e.input.lastChromeDeletet.content.size?null:yb(e,t.resolve(n.anchor),t.resolve(n.head))}function W9(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,s=r,o,a,l;for(let u=0;uu.mark(a.addToSet(u.marks));else if(i.length==0&&s.length==1)a=s[0],o="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;un||hg(o,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let s=e.node(r).maybeChild(e.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function Q9(e,t,n,r,i){let s=e.findDiffStart(t,n);if(s==null)return null;let{a:o,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(i=="end"){let l=Math.max(0,s-Math.min(o,a));r-=o+l-s}if(o=o?s-r:0;s-=l,s&&s=a?s-r:0;s-=l,s&&s=56320&&t<=57343&&n>=55296&&n<=56319}class J9{constructor(t,n){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 T9,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(MD),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=kD(this),xD(this),this.nodeViews=RD(this),this.docView=aD(this.state.doc,OD(this),dg(this),this.dom,this),this.domObserver=new P9(this,(r,i,s,o)=>q9(this,r,i,s,o)),this.domObserver.start(),A9(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 n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&>(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(MD),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,s=!1,o=!1;t.storedMarks&&this.composing&&(BF(this),o=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=RD(this);eL(p,this.nodeViews)&&(this.nodeViews=p,s=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&>(this),this.editable=kD(this),xD(this);let l=dg(this),c=OD(this),u=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(t.doc,c,l);(d||!t.selection.eq(i.selection))&&(o=!0);let h=u=="preserve"&&o&&this.dom.style.overflowAnchor==null&&k5(this);if(o){this.domObserver.stop();let p=d&&(di||Br)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&X9(i.selection,t.selection);if(d){let m=Br?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=x9(this)),(s||!this.docView.update(t.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=aD(t.doc,c,l,this.dom,this)),m&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&n9(this))?So(this,p):(wF(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&R5(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))&&!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Je){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&tD(this,n.getBoundingClientRect(),t)}else tD(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n0&&this.state.doc.nodeAt(s))==r.node&&(i=s)}this.dragging=new IF(t.slice,t.move,i<0?void 0:Je.create(this.state.doc,i))}someProp(t,n){let r=this._props&&this._props[t],i;if(r!=null&&(i=n?n(r):r))return i;for(let o=0;on.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return H5(this,t)}coordsAtPos(t,n=1){return TF(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return z5(this,n||this.state,t)}pasteHTML(t,n){return _d(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return _d(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return Eb(this,t)}destroy(){this.docView&&(b9(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],dg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,E5())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return E9(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?Xr&&this.root.nodeType===11&&_5(this.dom.ownerDocument)==this.dom&&U9(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function OD(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[$n.node(0,e.state.doc.content.size,t)]}function xD(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:$n.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function kD(e){return!e.someProp("editable",t=>t(e.state)===!1)}function X9(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function RD(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function eL(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r}function MD(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Fa={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:"'",229:"q"},hf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},BD=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),tL=typeof navigator<"u"&&/Apple Computer/.test(navigator.vendor),nL=typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent),LD=typeof navigator<"u"&&/Mac/.test(navigator.platform),rL=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),iL=BD&&(LD||+BD[1]<57)||nL&&LD,Sr=0;Sr<10;Sr++)Fa[48+Sr]=Fa[96+Sr]=String(Sr);for(var Sr=1;Sr<=24;Sr++)Fa[Sr+111]="F"+Sr;for(var Sr=65;Sr<=90;Sr++)Fa[Sr]=String.fromCharCode(Sr+32),hf[Sr]=String.fromCharCode(Sr);for(var pg in Fa)hf.hasOwnProperty(pg)||(hf[pg]=Fa[pg]);function sL(e){var t=iL&&(e.ctrlKey||e.altKey||e.metaKey)||(tL||rL)&&e.shiftKey&&e.key&&e.key.length==1,n=!t&&e.key||(e.shiftKey?hf:Fa)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const oL=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function aL(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,i,s,o;for(let a=0;a127)&&(s=Fa[r.keyCode])&&s!=i){let a=t[fg(s,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const WT=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function PF(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const $F=(e,t,n)=>{let r=PF(e,n);if(!r)return!1;let i=Cb(r);if(!i){let o=r.blockRange(),a=o&&Yu(o);return a==null?!1:(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)}let s=i.nodeBefore;if(QF(e,i,t,-1))return!0;if(r.parent.content.size==0&&(fu(s,"end")||Je.isSelectable(s)))for(let o=r.depth;;o--){let a=Fm(e.doc,r.before(o),r.after(o),Ce.empty);if(a&&a.slice.size1)break}return s.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},uL=(e,t,n)=>{let r=PF(e,n);if(!r)return!1;let i=Cb(r);return i?UF(e,i,t):!1},dL=(e,t,n)=>{let r=VF(e,n);if(!r)return!1;let i=Nb(r);return i?UF(e,i,t):!1};function UF(e,t,n){let r=t.nodeBefore,i=r,s=t.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let u=i.lastChild;if(!u)return!1;i=u}let o=t.nodeAfter,a=o,l=t.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let u=a.firstChild;if(!u)return!1;a=u}let c=Fm(e.doc,s,l,Ce.empty);if(!c||c.from!=s||c instanceof pr&&c.slice.size>=l-s)return!1;if(n){let u=e.tr.step(c);u.setSelection(Xe.create(u.doc,s)),n(u.scrollIntoView())}return!0}function fu(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const zF=(e,t,n)=>{let{$head:r,empty:i}=e.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;s=Cb(r)}let o=s&&s.nodeBefore;return!o||!Je.isSelectable(o)?!1:(t&&t(e.tr.setSelection(Je.create(e.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function Cb(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function VF(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=VF(e,n);if(!r)return!1;let i=Nb(r);if(!i)return!1;let s=i.nodeAfter;if(QF(e,i,t,1))return!0;if(r.parent.content.size==0&&(fu(s,"start")||Je.isSelectable(s))){let o=Fm(e.doc,r.before(),r.after(),Ce.empty);if(o&&o.slice.size{let{$head:r,empty:i}=e.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof Je,i;if(r){if(n.node.isTextblock||!Za(e.doc,n.from))return!1;i=n.from}else if(i=Nm(e.doc,n.from,-1),i==null)return!1;if(t){let s=e.tr.join(i);r&&s.setSelection(Je.create(s.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(s.scrollIntoView())}return!0},pL=(e,t)=>{let n=e.selection,r;if(n instanceof Je){if(n.node.isTextblock||!Za(e.doc,n.to))return!1;r=n.to}else if(r=Nm(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},fL=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),s=i&&Yu(i);return s==null?!1:(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},qF=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` `).scrollIntoView()),!0)};function Fb(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),s=n.indexAfter(-1),o=Fb(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,o.createAndFill());l.setSelection(dt.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},WF=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof ui||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=Fb(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let o=(!r.parentOffset&&i.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let s=n.before();if(Do(e.doc,s))return t&&t(e.tr.split(s).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Yu(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function gL(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof Je&&t.selection.node.isBlock)return!r.parentOffset||!Do(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],o,a,l=!1,c=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){l=r.end(p)==r.pos+(r.depth-p),c=r.start(p)==r.pos-(r.depth-p),a=Fb(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),s.unshift(l&&a?{type:a}:null),o=p;break}else{if(p==1)return!1;s.unshift(null)}let u=t.tr;(t.selection instanceof Xe||t.selection instanceof ui)&&u.deleteSelection();let d=u.mapping.map(r.pos),h=Do(u.doc,d,s.length,s);if(h||(s[0]=a?{type:a}:null,h=Do(u.doc,d,s.length,s)),u.split(d,s.length,s),!l&&c&&r.node(o).type!=a){let p=u.mapping.map(r.before(o)),m=u.doc.resolve(p);a&&r.node(o-1).canReplaceWith(m.index(),m.index()+1,a)&&u.setNodeMarkup(u.mapping.map(r.before(o)),a)}return n&&n(u.scrollIntoView()),!0}}const TL=gL(),AL=(e,t)=>{let{$from:n,to:r}=e.selection,i,s=n.sharedDepth(r);return s==0?!1:(i=n.before(s),t&&t(e.tr.setSelection(Je.create(e.doc,i))),!0)};function bL(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,s=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(s,s+1)||!(i.isTextblock||Za(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function QF(e,t,n,r){let i=t.nodeBefore,s=t.nodeAfter,o,a,l=i.type.spec.isolating||s.type.spec.isolating;if(!l&&bL(e,t,n))return!0;let c=!l&&t.parent.canReplace(t.index(),t.index()+1);if(c&&(o=(a=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&a.matchType(o[0]||s.type).validEnd){if(n){let p=t.pos+s.nodeSize,m=ue.empty;for(let D=o.length-1;D>=0;D--)m=ue.from(o[D].create(null,m));m=ue.from(i.copy(m));let T=e.tr.step(new Tr(t.pos-1,p,t.pos,p,new Ce(m,1,0),o.length,!0)),b=T.doc.resolve(p+2*o.length);b.nodeAfter&&b.nodeAfter.type==i.type&&Za(T.doc,b.pos)&&T.join(b.pos),n(T.scrollIntoView())}return!0}let u=s.type.spec.isolating||r>0&&l?null:dt.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),h=d&&Yu(d);if(h!=null&&h>=t.depth)return n&&n(e.tr.lift(d,h).scrollIntoView()),!0;if(c&&fu(s,"start",!0)&&fu(i,"end")){let p=i,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let T=s,b=1;for(;!T.isTextblock;T=T.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,T.content)){if(n){let D=ue.empty;for(let C=m.length-1;C>=0;C--)D=ue.from(m[C].copy(D));let v=e.tr.step(new Tr(t.pos-m.length,t.pos+s.nodeSize,t.pos+b,t.pos+s.nodeSize-b,new Ce(D,m.length,0),0,!0));n(v.scrollIntoView())}return!0}}return!1}function JF(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(n&&n(t.tr.setSelection(Xe.create(t.doc,e<0?i.start(s):i.end(s)))),!0):!1}}const yL=JF(-1),EL=JF(1);function vL(e,t=null){return function(n,r){let{$from:i,$to:s}=n.selection,o=i.blockRange(s),a=o&&mb(o,e,t);return a?(r&&r(n.tr.wrap(o,a).scrollIntoView()),!0):!1}}function ID(e,t=null){return function(n,r){let i=!1;for(let s=0;s{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let u=n.doc.resolve(c),d=u.index();i=u.parent.canReplaceWith(d,d+1,e)}})}if(!i)return!1;if(r){let s=n.tr;for(let o=0;o=2&&i.node(o.depth-1).type.compatibleContent(e)&&o.startIndex==0){if(i.index(o.depth-1)==0)return!1;let u=n.doc.resolve(o.start-2);l=new nf(u,u,o.depth),o.endIndex=0;u--)s=ue.from(n[u].type.create(n[u].attrs,s));e.step(new Tr(t.start-(r?2:0),t.end,t.start,t.end,new Ce(s,0,0),n.length,!0));let o=0;for(let u=0;uo.childCount>0&&o.firstChild.type==e);return s?n?r.node(s.depth-1).type==e?_L(t,n,e,s):CL(t,n,s):!0:!1}}function _L(e,t,n,r){let i=e.tr,s=r.end,o=r.$to.end(r.depth);sT;m--)p-=i.child(m).nodeSize,r.delete(p-1,p+1);let s=r.doc.resolve(n.start),o=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,c=s.node(-1),u=s.index(-1);if(!c.canReplace(u+(a?0:1),u+1,o.content.append(l?ue.empty:ue.from(i))))return!1;let d=s.pos,h=d+o.nodeSize;return r.step(new Tr(d-(a?1:0),h+(l?1:0),d+1,h-1,new Ce((a?ue.empty:ue.from(i.copy(ue.empty))).append(l?ue.empty:ue.from(i.copy(ue.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}function NL(e){return function(t,n){let{$from:r,$to:i}=t.selection,s=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==e);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let a=s.parent,l=a.child(o-1);if(l.type!=e)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=ue.from(c?e.create():null),d=new Ce(ue.from(e.create(null,ue.from(a.type.create(null,u)))),c?3:1,0),h=s.start,p=s.end;n(t.tr.step(new Tr(h-(c?3:1),p,h,p,d,1,!0)).scrollIntoView())}return!0}}function Rm(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:i}=n,{storedMarks:s}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,s=n.storedMarks,n}}}class Mm{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:n,state:r}=this,{view:i}=n,{tr:s}=r,o=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...c)=>{const u=l(...c)(o);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(s),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:i,state:s}=this,{view:o}=i,a=[],l=!!t,c=t||s.tr,u=()=>(!l&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(c),a.every(h=>h===!0)),d={...Object.fromEntries(Object.entries(r).map(([h,p])=>[h,(...m)=>{const T=this.buildProps(c,n),b=p(...m)(T);return a.push(b),d}])),run:u};return d}createCan(t){const{rawCommands:n,state:r}=this,i=!1,s=t||r.tr,o=this.buildProps(s,i);return{...Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...c)=>l(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(s,i)}}buildProps(t,n=!0){const{rawCommands:r,editor:i,state:s}=this,{view:o}=i,a={tr:t,editor:i,view:o,state:Rm({state:s,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}let FL=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){const n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){const n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}};function ze(e,t,n){return e.config[t]===void 0&&e.parent?ze(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?ze(e.parent,t,n):null}):e.config[t]}function Bm(e){const t=e.filter(i=>i.type==="extension"),n=e.filter(i=>i.type==="node"),r=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function XF(e){const t=[],{nodeExtensions:n,markExtensions:r}=Bm(e),i=[...n,...r],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage,extensions:i},l=ze(o,"addGlobalAttributes",a);l&&l().forEach(c=>{c.types.forEach(u=>{Object.entries(c.attributes).forEach(([d,h])=>{t.push({type:u,name:d,attribute:{...s,...h}})})})})}),i.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=ze(o,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{const h={...s,...d};typeof h?.default=="function"&&(h.default=h.default()),h?.isRequired&&h?.default===void 0&&delete h.default,t.push({type:o.name,name:u,attribute:h})})}),t}function sr(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function xt(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){const o=s?String(s).split(" "):[],a=r[i]?r[i].split(" "):[],l=o.filter(c=>!a.includes(c));r[i]=[...a,...l].join(" ")}else if(i==="style"){const o=s?s.split(";").map(c=>c.trim()).filter(Boolean):[],a=r[i]?r[i].split(";").map(c=>c.trim()).filter(Boolean):[],l=new Map;a.forEach(c=>{const[u,d]=c.split(":").map(h=>h.trim());l.set(u,d)}),o.forEach(c=>{const[u,d]=c.split(":").map(h=>h.trim());l.set(u,d)}),r[i]=Array.from(l.entries()).map(([c,u])=>`${c}: ${u}`).join("; ")}else r[i]=s}),r},{})}function KT(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>xt(n,r),{})}function eO(e){return typeof e=="function"}function Ot(e,t=void 0,...n){return eO(e)?t?e.bind(t)(...n):e(...n):e}function OL(e={}){return Object.keys(e).length===0&&e.constructor===Object}function xL(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function YD(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const i=t.reduce((s,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(n):xL(n.getAttribute(o.name));return a==null?s:{...s,[o.name]:a}},{});return{...r,...i}}}}function HD(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&OL(n)?!1:n!=null))}function kL(e,t){var n;const r=XF(e),{nodeExtensions:i,markExtensions:s}=Bm(e),o=(n=i.find(c=>ze(c,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(i.map(c=>{const u=r.filter(D=>D.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:t},h=e.reduce((D,v)=>{const C=ze(v,"extendNodeSchema",d);return{...D,...C?C(c):{}}},{}),p=HD({...h,content:Ot(ze(c,"content",d)),marks:Ot(ze(c,"marks",d)),group:Ot(ze(c,"group",d)),inline:Ot(ze(c,"inline",d)),atom:Ot(ze(c,"atom",d)),selectable:Ot(ze(c,"selectable",d)),draggable:Ot(ze(c,"draggable",d)),code:Ot(ze(c,"code",d)),whitespace:Ot(ze(c,"whitespace",d)),linebreakReplacement:Ot(ze(c,"linebreakReplacement",d)),defining:Ot(ze(c,"defining",d)),isolating:Ot(ze(c,"isolating",d)),attrs:Object.fromEntries(u.map(D=>{var v;return[D.name,{default:(v=D?.attribute)===null||v===void 0?void 0:v.default}]}))}),m=Ot(ze(c,"parseHTML",d));m&&(p.parseDOM=m.map(D=>YD(D,u)));const T=ze(c,"renderHTML",d);T&&(p.toDOM=D=>T({node:D,HTMLAttributes:KT(D,u)}));const b=ze(c,"renderText",d);return b&&(p.toText=b),[c.name,p]})),l=Object.fromEntries(s.map(c=>{const u=r.filter(b=>b.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:t},h=e.reduce((b,D)=>{const v=ze(D,"extendMarkSchema",d);return{...b,...v?v(c):{}}},{}),p=HD({...h,inclusive:Ot(ze(c,"inclusive",d)),excludes:Ot(ze(c,"excludes",d)),group:Ot(ze(c,"group",d)),spanning:Ot(ze(c,"spanning",d)),code:Ot(ze(c,"code",d)),attrs:Object.fromEntries(u.map(b=>{var D;return[b.name,{default:(D=b?.attribute)===null||D===void 0?void 0:D.default}]}))}),m=Ot(ze(c,"parseHTML",d));m&&(p.parseDOM=m.map(b=>YD(b,u)));const T=ze(c,"renderHTML",d);return T&&(p.toDOM=b=>T({mark:b,HTMLAttributes:KT(b,u)})),[c.name,p]}));return new hb({topNode:o,nodes:a,marks:l})}function gg(e,t){return t.nodes[e]||t.marks[e]||null}function ZD(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function Ob(e,t){const n=Kl.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}const RL=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(i,s,o,a)=>{var l,c;const u=((c=(l=i.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:i,pos:s,parent:o,index:a}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?u:u.slice(0,Math.max(0,r-s))}),n};function xb(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class Hu{constructor(t){this.find=t.find,this.handler=t.handler}}const ML=(e,t)=>{if(xb(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,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 Hh(e){var t;const{editor:n,from:r,to:i,text:s,rules:o,plugin:a}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((t=c.nodeBefore||c.nodeAfter)===null||t===void 0)&&t.marks.find(h=>h.type.spec.code))return!1;let u=!1;const d=RL(c)+s;return o.forEach(h=>{if(u)return;const p=ML(d,h.find);if(!p)return;const m=l.state.tr,T=Rm({state:l.state,transaction:m}),b={from:r-(p[0].length-s.length),to:i},{commands:D,chain:v,can:C}=new Mm({editor:n,state:T});h.handler({state:T,range:b,match:p,commands:D,chain:v,can:C})===null||!m.steps.length||(m.setMeta(a,{transform:m,from:r,to:i,text:s}),l.dispatch(m),u=!0)}),u}function BL(e){const{editor:t,rules:n}=e,r=new Mt({state:{init(){return null},apply(i,s,o){const a=i.getMeta(r);if(a)return a;const l=i.getMeta("applyInputRules");return l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=Ob(ue.from(c),o.schema);const{from:u}=l,d=u+c.length;Hh({editor:t,from:u,to:d,text:c,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,a){return Hh({editor:t,from:s,to:o,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&Hh({editor:t,from:s.pos,to:s.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?Hh({editor:t,from:o.pos,to:o.pos,text:` `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function LL(e){return Object.prototype.toString.call(e).slice(8,-1)}function Zh(e){return LL(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function Lm(e,t){const n={...e};return Zh(e)&&Zh(t)&&Object.keys(t).forEach(r=>{Zh(t[r])&&Zh(e[r])?n[r]=Lm(e[r],t[r]):n[r]=t[r]}),n}class ds{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=Ot(ze(this,"addOptions",{name:this.name}))),this.storage=Ot(ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new ds(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>Lm(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new ds(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.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: "${n.name}".`),n.options=Ot(ze(n,"addOptions",{name:n.name})),n.storage=Ot(ze(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!s.find(a=>a?.type.name===n.name))return!1;const o=s.find(a=>a?.type.name===n.name);return o&&r.removeStoredMark(o),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}}function IL(e){return typeof e=="number"}class YL{constructor(t){this.find=t.find,this.handler=t.handler}}const HL=(e,t,n)=>{if(xb(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(i=>{const s=[i.text];return s.index=i.index,s.input=e,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function ZL(e){const{editor:t,state:n,from:r,to:i,rule:s,pasteEvent:o,dropEvent:a}=e,{commands:l,chain:c,can:u}=new Mm({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(h,p)=>{if(!h.isTextblock||h.type.spec.code)return;const m=Math.max(r,p),T=Math.min(i,p+h.content.size),b=h.textBetween(m-p,T-p,void 0,"");HL(b,s.find,o).forEach(D=>{if(D.index===void 0)return;const v=m+D.index+1,C=v+D[0].length,S={from:n.tr.mapping.map(v),to:n.tr.mapping.map(C)},O=s.handler({state:n,range:S,match:D,commands:l,chain:c,can:u,pasteEvent:o,dropEvent:a});d.push(O)})}),d.every(h=>h!==null)}let Ph=null;const PL=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function $L(e){const{editor:t,rules:n}=e;let r=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:c,from:u,to:d,rule:h,pasteEvt:p})=>{const m=c.tr,T=Rm({state:c,transaction:m});if(!(!ZL({editor:t,state:T,from:Math.max(u-1,0),to:d.b-1,rule:h,pasteEvent:p,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new Mt({view(u){const d=p=>{var m;r=!((m=u.dom.parentElement)===null||m===void 0)&&m.contains(p.target)?u.dom.parentElement:null,r&&(Ph=t)},h=()=>{Ph&&(Ph=null)};return window.addEventListener("dragstart",d),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",d),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(u,d)=>{if(s=r===u.dom.parentElement,a=d,!s){const h=Ph;h?.isEditable&&setTimeout(()=>{const p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(u,d)=>{var h;const p=(h=d.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return o=d,i=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(u,d,h)=>{const p=u[0],m=p.getMeta("uiEvent")==="paste"&&!i,T=p.getMeta("uiEvent")==="drop"&&!s,b=p.getMeta("applyPasteRules"),D=!!b;if(!m&&!T&&!D)return;if(D){let{text:S}=b;typeof S=="string"?S=S:S=Ob(ue.from(S),h.schema);const{from:O}=b,R=O+S.length,H=PL(S);return l({rule:c,state:h,from:O,to:{b:R},pasteEvt:H})}const v=d.doc.content.findDiffStart(h.doc.content),C=d.doc.content.findDiffEnd(h.doc.content);if(!(!IL(v)||!C||v===C.b))return l({rule:c,state:h,from:v,to:C,pasteEvt:o})}}))}function UL(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}class zc{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=zc.resolve(t),this.schema=kL(this.extensions,n),this.setupExtensions()}static resolve(t){const n=zc.sort(zc.flatten(t)),r=UL(n.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},i=ze(n,"addExtensions",r);return i?[n,...this.flatten(i())]:n}).flat(10)}static sort(t){return t.sort((n,r)=>{const i=ze(n,"priority")||100,s=ze(r,"priority")||100;return i>s?-1:i{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:gg(n.name,this.schema)},i=ze(n,"addCommands",r);return i?{...t,...i()}:t},{})}get plugins(){const{editor:t}=this,n=zc.sort([...this.extensions].reverse()),r=[],i=[],s=n.map(o=>{const a={name:o.name,options:o.options,storage:o.storage,editor:t,type:gg(o.name,this.schema)},l=[],c=ze(o,"addKeyboardShortcuts",a);let u={};if(o.type==="mark"&&ze(o,"exitable",a)&&(u.ArrowRight=()=>ds.handleExit({editor:t,mark:o})),c){const T=Object.fromEntries(Object.entries(c()).map(([b,D])=>[b,()=>D({editor:t})]));u={...u,...T}}const d=cL(u);l.push(d);const h=ze(o,"addInputRules",a);ZD(o,t.options.enableInputRules)&&h&&r.push(...h());const p=ze(o,"addPasteRules",a);ZD(o,t.options.enablePasteRules)&&p&&i.push(...p());const m=ze(o,"addProseMirrorPlugins",a);if(m){const T=m();l.push(...T)}return l}).flat();return[BL({editor:t,rules:r}),...$L({editor:t,rules:i}),...s]}get attributes(){return XF(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=Bm(this.extensions);return Object.fromEntries(n.filter(r=>!!ze(r,"addNodeView")).map(r=>{const i=this.attributes.filter(l=>l.type===r.name),s={name:r.name,options:r.options,storage:r.storage,editor:t,type:sr(r.name,this.schema)},o=ze(r,"addNodeView",s);if(!o)return[];const a=(l,c,u,d,h)=>{const p=KT(l,i);return o()({node:l,view:c,getPos:u,decorations:d,innerDecorations:h,editor:t,extension:r,HTMLAttributes:p})};return[r.name,a]}))}setupExtensions(){this.extensions.forEach(t=>{var n;this.editor.extensionStorage[t.name]=t.storage;const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:gg(t.name,this.schema)};t.type==="mark"&&(!((n=Ot(ze(t,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(t.name);const i=ze(t,"onBeforeCreate",r),s=ze(t,"onCreate",r),o=ze(t,"onUpdate",r),a=ze(t,"onSelectionUpdate",r),l=ze(t,"onTransaction",r),c=ze(t,"onFocus",r),u=ze(t,"onBlur",r),d=ze(t,"onDestroy",r);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}}class gn{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=Ot(ze(this,"addOptions",{name:this.name}))),this.storage=Ot(ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new gn(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>Lm(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new gn({...this.config,...t});return n.parent=this,this.child=n,n.name=t.name?t.name:n.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: "${n.name}".`),n.options=Ot(ze(n,"addOptions",{name:n.name})),n.storage=Ot(ze(n,"addStorage",{name:n.name,options:n.options})),n}}function tO(e,t,n){const{from:r,to:i}=t,{blockSeparator:s=` `,textSerializers:o={}}=n||{};let a="";return e.nodesBetween(r,i,(l,c,u,d)=>{var h;l.isBlock&&c>r&&(a+=s);const p=o?.[l.type.name];if(p)return u&&(a+=p({node:l,pos:c,parent:u,index:d,range:t})),!1;l.isText&&(a+=(h=l?.text)===null||h===void 0?void 0:h.slice(Math.max(r,c)-c,i-c))}),a}function nO(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const zL=gn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Mt({key:new Vt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:s}=i,o=Math.min(...s.map(c=>c.$from.pos)),a=Math.max(...s.map(c=>c.$to.pos)),l=nO(n);return tO(r,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),VL=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),jL=(e=!1)=>({commands:t})=>t.setContent("",e),GL=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:s,$to:o})=>{e.doc.nodesBetween(s.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=t,d=c.resolve(u.map(l)),h=c.resolve(u.map(l+a.nodeSize)),p=d.blockRange(h);if(!p)return;const m=Yu(p);if(a.type.isTextblock){const{defaultType:T}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,T)}(m||m===0)&&t.lift(p,m)})}),!0},qL=e=>t=>e(t),WL=()=>({state:e,dispatch:t})=>WF(e,t),KL=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,s=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const o=r.mapping.map(t);return r.insert(o,s.content),r.setSelection(new Xe(r.doc.resolve(Math.max(o-1,0)))),!0},QL=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(t){const o=i.before(s),a=i.after(s);e.delete(o,a).scrollIntoView()}return!0}return!1},JL=e=>({tr:t,state:n,dispatch:r})=>{const i=sr(e,n.schema),s=t.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(r){const a=s.before(o),l=s.after(o);t.delete(a,l).scrollIntoView()}return!0}return!1},XL=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},eI=()=>({state:e,dispatch:t})=>WT(e,t),tI=()=>({commands:e})=>e.keyboardShortcut("Enter"),nI=()=>({state:e,dispatch:t})=>mL(e,t);function pf(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:xb(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function rO(e,t,n={}){return e.find(r=>r.type===t&&pf(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function PD(e,t,n={}){return!!rO(e,t,n)}function Im(e,t,n){var r;if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if((!i.node||!i.node.marks.some(c=>c.type===t))&&(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(c=>c.type===t)||(n=n||((r=i.node.marks[0])===null||r===void 0?void 0:r.attrs),!rO([...i.node.marks],t,n)))return;let s=i.index,o=e.start()+i.offset,a=s+1,l=o+i.node.nodeSize;for(;s>0&&PD([...e.parent.child(s-1).marks],t,n);)s-=1,o-=e.parent.child(s).nodeSize;for(;a({tr:n,state:r,dispatch:i})=>{const s=$a(e,r.schema),{doc:o,selection:a}=n,{$from:l,from:c,to:u}=a;if(i){const d=Im(l,s,t);if(d&&d.from<=c&&d.to>=u){const h=Xe.create(o,d.from,d.to);n.setSelection(h)}}return!0},iI=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:i,dispatch:s})=>{t={scrollIntoView:!0,...t};const o=()=>{(Ym()||oO())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(s&&e===null&&!iO(n.state.selection))return o(),!0;const a=sO(i.doc,e)||n.state.selection,l=n.state.selection.eq(a);return s&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},oI=(e,t)=>n=>e.every((r,i)=>t(r,{...n,index:i})),aI=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),aO=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&aO(r)}return e};function $h(e){const t=`${e}`,n=new window.DOMParser().parseFromString(t,"text/html").body;return aO(n)}function Nd(e,t,n){if(e instanceof vo||e instanceof ue)return e;n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,i=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return ue.fromArray(e.map(o=>t.nodeFromJSON(o)));const s=t.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",s),Nd("",t,n)}if(i){if(n.errorOnInvalidContent){let o=!1,a="";const l=new hb({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?Jc.fromSchema(l).parseSlice($h(e),n.parseOptions):Jc.fromSchema(l).parse($h(e),n.parseOptions),n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const s=Jc.fromSchema(t);return n.slice?s.parseSlice($h(e),n.parseOptions).content:s.parse($h(e),n.parseOptions)}return Nd("",t,n)}function lI(e,t,n){const r=e.steps.length-1;if(r{o===0&&(o=u)}),e.setSelection(dt.near(e.doc.resolve(o),n))}const cI=e=>!("type"in e),uI=(e,t,n)=>({tr:r,dispatch:i,editor:s})=>{var o;if(i){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=T=>{s.emit("contentError",{editor:s,error:T,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{Nd(t,s.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(T){l(T)}try{a=Nd(t,s.schema,{parseOptions:c,errorOnInvalidContent:(o=n.errorOnInvalidContent)!==null&&o!==void 0?o:s.options.enableContentCheck})}catch(T){return l(T),!1}let{from:u,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},h=!0,p=!0;if((cI(a)?a:[a]).forEach(T=>{T.check(),h=h?T.isText&&T.marks.length===0:!1,p=p?T.isBlock:!1}),u===d&&p){const{parent:T}=r.doc.resolve(u);T.isTextblock&&!T.type.spec.code&&!T.childCount&&(u-=1,d+=1)}let m;if(h){if(Array.isArray(t))m=t.map(T=>T.text||"").join("");else if(t instanceof ue){let T="";t.forEach(b=>{b.text&&(T+=b.text)}),m=T}else typeof t=="object"&&t&&t.text?m=t.text:m=t;r.insertText(m,u,d)}else m=a,r.replaceWith(u,d,m);n.updateSelection&&lI(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:m})}return!0},dI=()=>({state:e,dispatch:t})=>hL(e,t),hI=()=>({state:e,dispatch:t})=>pL(e,t),pI=()=>({state:e,dispatch:t})=>$F(e,t),fI=()=>({state:e,dispatch:t})=>jF(e,t),mI=()=>({state:e,dispatch:t,tr:n})=>{try{const r=Nm(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},gI=()=>({state:e,dispatch:t,tr:n})=>{try{const r=Nm(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},TI=()=>({state:e,dispatch:t})=>uL(e,t),AI=()=>({state:e,dispatch:t})=>dL(e,t);function lO(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function bI(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,i,s,o;for(let a=0;a({editor:t,view:n,tr:r,dispatch:i})=>{const s=bI(e).split(/-(?!$)/),o=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0});return t.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))})?.steps.forEach(c=>{const u=c.map(r.mapping);u&&i&&r.maybeStep(u)}),!0};function _o(e,t,n={}){const{from:r,to:i,empty:s}=e.selection,o=t?sr(t,e.schema):null,a=[];e.doc.nodesBetween(r,i,(u,d)=>{if(u.isText)return;const h=Math.max(r,d),p=Math.min(i,d+u.nodeSize);a.push({node:u,from:h,to:p})});const l=i-r,c=a.filter(u=>o?o.name===u.node.type.name:!0).filter(u=>pf(u.node.attrs,n,{strict:!1}));return s?!!c.length:c.reduce((u,d)=>u+d.to-d.from,0)>=l}const EI=(e,t={})=>({state:n,dispatch:r})=>{const i=sr(e,n.schema);return _o(n,i,t)?fL(n,r):!1},vI=()=>({state:e,dispatch:t})=>KF(e,t),DI=e=>({state:t,dispatch:n})=>{const r=sr(e,t.schema);return wL(r)(t,n)},SI=()=>({state:e,dispatch:t})=>qF(e,t);function Hm(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function $D(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,i)=>(n.includes(i)||(r[i]=e[i]),r),{})}const wI=(e,t)=>({tr:n,state:r,dispatch:i})=>{let s=null,o=null;const a=Hm(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(s=sr(e,r.schema)),a==="mark"&&(o=$a(e,r.schema)),i&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{s&&s===c.type&&n.setNodeMarkup(u,void 0,$D(c.attrs,t)),o&&c.marks.length&&c.marks.forEach(d=>{o===d.type&&n.addMark(u,u+c.nodeSize,o.create($D(d.attrs,t)))})})}),!0):!1},_I=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),CI=()=>({tr:e,dispatch:t})=>{if(t){const n=new ui(e.doc);e.setSelection(n)}return!0},NI=()=>({state:e,dispatch:t})=>zF(e,t),FI=()=>({state:e,dispatch:t})=>GF(e,t),OI=()=>({state:e,dispatch:t})=>AL(e,t),xI=()=>({state:e,dispatch:t})=>EL(e,t),kI=()=>({state:e,dispatch:t})=>yL(e,t);function QT(e,t,n={},r={}){return Nd(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const RI=(e,t=!1,n={},r={})=>({editor:i,tr:s,dispatch:o,commands:a})=>{var l,c;const{doc:u}=s;if(n.preserveWhitespace!=="full"){const d=QT(e,i.schema,n,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:i.options.enableContentCheck});return o&&s.replaceWith(0,u.content.size,d).setMeta("preventUpdate",!t),!0}return o&&s.setMeta("preventUpdate",!t),a.insertContentAt({from:0,to:u.content.size},e,{parseOptions:n,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:i.options.enableContentCheck})};function kb(e,t){const n=$a(t,e.schema),{from:r,to:i,empty:s}=e.selection,o=[];s?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function cO(e,t){const n=new gb(e);return t.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function MI(e){for(let t=0;t{t(r)&&n.push({node:r,pos:i})}),n}function uO(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,(i,s)=>{n(i)&&r.push({node:i,pos:s})}),r}function dO(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function Rb(e){return t=>dO(t.$from,e)}function BI(e,t){const n={from:0,to:e.content.size};return tO(e,n,t)}function LI(e,t){const n=sr(t,e.schema),{from:r,to:i}=e.selection,s=[];e.doc.nodesBetween(r,i,a=>{s.push(a)});const o=s.reverse().find(a=>a.type.name===n.name);return o?{...o.attrs}:{}}function hO(e,t){const n=Hm(typeof t=="string"?t:t.name,e.schema);return n==="node"?LI(e,t):n==="mark"?kb(e,t):{}}function II(e,t=JSON.stringify){const n={};return e.filter(r=>{const i=t(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function YI(e){const t=II(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function pO(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((i,s)=>{const o=[];if(i.ranges.length)i.forEach((a,l)=>{o.push({from:a,to:l})});else{const{from:a,to:l}=n[s];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{const c=t.slice(s).map(a,-1),u=t.slice(s).map(l),d=t.invert().map(c,-1),h=t.invert().map(u);r.push({oldRange:{from:d,to:h},newRange:{from:c,to:u}})})}),YI(r)}function Mb(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(i=>{const s=n.resolve(e),o=Im(s,i.type);o&&r.push({mark:i,...o})}):n.nodesBetween(e,t,(i,s)=>{!i||i?.nodeSize===void 0||r.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),r}function Np(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=e.find(s=>s.type===t&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}function ff(e,t,n={}){const{empty:r,ranges:i}=e.selection,s=t?$a(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(u=>s?s.name===u.type.name:!0).find(u=>pf(u.attrs,n,{strict:!1}));let o=0;const a=[];if(i.forEach(({$from:u,$to:d})=>{const h=u.pos,p=d.pos;e.doc.nodesBetween(h,p,(m,T)=>{if(!m.isText&&!m.marks.length)return;const b=Math.max(h,T),D=Math.min(p,T+m.nodeSize),v=D-b;o+=v,a.push(...m.marks.map(C=>({mark:C,from:b,to:D})))})}),o===0)return!1;const l=a.filter(u=>s?s.name===u.mark.type.name:!0).filter(u=>pf(u.mark.attrs,n,{strict:!1})).reduce((u,d)=>u+d.to-d.from,0),c=a.filter(u=>s?u.mark.type!==s&&u.mark.type.excludes(s):!0).reduce((u,d)=>u+d.to-d.from,0);return(l>0?l+c:l)>=o}function fO(e,t,n={}){if(!t)return _o(e,null,n)||ff(e,null,n);const r=Hm(t,e.schema);return r==="node"?_o(e,t,n):r==="mark"?ff(e,t,n):!1}function UD(e,t){const{nodeExtensions:n}=Bm(t),r=n.find(o=>o.name===e);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},s=Ot(ze(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function Bb(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!==null&&r!==void 0?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach(s=>{i!==!1&&(Bb(s,{ignoreWhitespace:n,checkChildren:t})||(i=!1))}),i}return!1}function HI(e){return e instanceof Je}function ZI(e,t,n){var r;const{selection:i}=t;let s=null;if(iO(i)&&(s=i.$cursor),s){const a=(r=e.storedMarks)!==null&&r!==void 0?r:s.marks();return!!n.isInSet(a)||!a.some(l=>l.type.excludes(n))}const{ranges:o}=i;return o.some(({$from:a,$to:l})=>{let c=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,l.pos,(u,d,h)=>{if(c)return!1;if(u.isInline){const p=!h||h.type.allowsMarkType(n),m=!!n.isInSet(u.marks)||!u.marks.some(T=>T.type.excludes(n));c=p&&m}return!c}),c})}const PI=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=n,{empty:o,ranges:a}=s,l=$a(e,r.schema);if(i)if(o){const c=kb(r,l);n.addStoredMark(l.create({...c,...t}))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(h,p)=>{const m=Math.max(p,u),T=Math.min(p+h.nodeSize,d);h.marks.find(b=>b.type===l)?h.marks.forEach(b=>{l===b.type&&n.addMark(m,T,l.create({...b.attrs,...t}))}):n.addMark(m,T,l.create(t))})});return ZI(r,n,l)},$I=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),UI=(e,t={})=>({state:n,dispatch:r,chain:i})=>{const s=sr(e,n.schema);let o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:a})=>ID(s,{...o,...t})(n)?!0:a.clearNodes()).command(({state:a})=>ID(s,{...o,...t})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},zI=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,i=Dl(e,0,r.content.size),s=Je.create(r,i);t.setSelection(s)}return!0},VI=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:i,to:s}=typeof e=="number"?{from:e,to:e}:e,o=Xe.atStart(r).from,a=Xe.atEnd(r).to,l=Dl(i,o,a),c=Dl(s,o,a),u=Xe.create(r,l,c);t.setSelection(u)}return!0},jI=e=>({state:t,dispatch:n})=>{const r=sr(e,t.schema);return NL(r)(t,n)};function zD(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(i=>t?.includes(i.type.name));e.tr.ensureMarks(r)}}const GI=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:o}=t,{$from:a,$to:l}=s,c=i.extensionManager.attributes,u=Np(c,a.node().type.name,a.node().attrs);if(s instanceof Je&&s.node.isBlock)return!a.parentOffset||!Do(o,a.pos)?!1:(r&&(e&&zD(n,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,h=a.depth===0?void 0:MI(a.node(-1).contentMatchAt(a.indexAfter(-1)));let p=d&&h?[{type:h,attrs:u}]:void 0,m=Do(t.doc,t.mapping.map(a.pos),1,p);if(!p&&!m&&Do(t.doc,t.mapping.map(a.pos),1,h?[{type:h}]:void 0)&&(m=!0,p=h?[{type:h,attrs:u}]:void 0),r){if(m&&(s instanceof Xe&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,p),h&&!d&&!a.parentOffset&&a.parent.type!==h)){const T=t.mapping.map(a.before()),b=t.doc.resolve(T);a.node(-1).canReplaceWith(b.index(),b.index()+1,h)&&t.setNodeMarkup(t.mapping.map(a.before()),h)}e&&zD(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return m},qI=(e,t={})=>({tr:n,state:r,dispatch:i,editor:s})=>{var o;const a=sr(e,r.schema),{$from:l,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(c))return!1;const d=l.node(-1);if(d.type!==a)return!1;const h=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let D=ue.empty;const v=l.index(-1)?1:l.index(-2)?2:3;for(let W=l.depth-v;W>=l.depth-3;W-=1)D=ue.from(l.node(W).copy(D));const C=l.indexAfter(-1){if(H>-1)return!1;W.isTextblock&&W.content.size===0&&(H=$+1)}),H>-1&&n.setSelection(Xe.near(n.doc.resolve(H))),n.scrollIntoView()}return!0}const p=c.pos===l.end()?d.contentMatchAt(0).defaultType:null,m={...Np(h,d.type.name,d.attrs),...t},T={...Np(h,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,c.pos);const b=p?[{type:a,attrs:m},{type:p,attrs:T}]:[{type:a,attrs:m}];if(!Do(n.doc,l.pos,2))return!1;if(i){const{selection:D,storedMarks:v}=r,{splittableMarks:C}=s.extensionManager,S=v||D.$to.parentOffset&&D.$from.marks();if(n.split(l.pos,2,b).scrollIntoView(),!S||!i)return!0;const O=S.filter(R=>C.includes(R.type.name));n.ensureMarks(O)}return!0},Tg=(e,t)=>{const n=Rb(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===i?.type&&Za(e.doc,n.pos)&&e.join(n.pos),!0},Ag=(e,t)=>{const n=Rb(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===i?.type&&Za(e.doc,r)&&e.join(r),!0},WI=(e,t,n,r={})=>({editor:i,tr:s,state:o,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:h}=i.extensionManager,p=sr(e,o.schema),m=sr(t,o.schema),{selection:T,storedMarks:b}=o,{$from:D,$to:v}=T,C=D.blockRange(v),S=b||T.$to.parentOffset&&T.$from.marks();if(!C)return!1;const O=Rb(R=>UD(R.type.name,d))(T);if(C.depth>=1&&O&&C.depth-O.depth<=1){if(O.node.type===p)return c.liftListItem(m);if(UD(O.node.type.name,d)&&p.validContent(O.node.content)&&a)return l().command(()=>(s.setNodeMarkup(O.pos,p),!0)).command(()=>Tg(s,p)).command(()=>Ag(s,p)).run()}return!n||!S||!a?l().command(()=>u().wrapInList(p,r)?!0:c.clearNodes()).wrapInList(p,r).command(()=>Tg(s,p)).command(()=>Ag(s,p)).run():l().command(()=>{const R=u().wrapInList(p,r),H=S.filter(W=>h.includes(W.type.name));return s.ensureMarks(H),R?!0:c.clearNodes()}).wrapInList(p,r).command(()=>Tg(s,p)).command(()=>Ag(s,p)).run()},KI=(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:s=!1}=n,o=$a(e,r.schema);return ff(r,o,t)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,t)},QI=(e,t,n={})=>({state:r,commands:i})=>{const s=sr(e,r.schema),o=sr(t,r.schema),a=_o(r,s,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?i.setNode(o,l):i.setNode(s,{...l,...n})},JI=(e,t={})=>({state:n,commands:r})=>{const i=sr(e,n.schema);return _o(n,i,t)?r.lift(i):r.wrapIn(i,t)},XI=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,e.schema.text(s.text,l))}else o.delete(s.from,s.to)}return!0}}return!1},e7=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(s=>{e.removeMark(s.$from.pos,s.$to.pos)}),!0},t7=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=t,{selection:a}=n,l=$a(e,r.schema),{$from:c,empty:u,ranges:d}=a;if(!i)return!0;if(u&&o){let{from:h,to:p}=a;const m=(s=c.marks().find(b=>b.type===l))===null||s===void 0?void 0:s.attrs,T=Im(c,l,m);T&&(h=T.from,p=T.to),n.removeMark(h,p,l)}else d.forEach(h=>{n.removeMark(h.$from.pos,h.$to.pos,l)});return n.removeStoredMark(l),!0},n7=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let s=null,o=null;const a=Hm(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(s=sr(e,r.schema)),a==="mark"&&(o=$a(e,r.schema)),i&&n.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;let d,h,p,m;n.selection.empty?r.doc.nodesBetween(c,u,(T,b)=>{s&&s===T.type&&(p=Math.max(b,c),m=Math.min(b+T.nodeSize,u),d=b,h=T)}):r.doc.nodesBetween(c,u,(T,b)=>{b=c&&b<=u&&(s&&s===T.type&&n.setNodeMarkup(b,void 0,{...T.attrs,...t}),o&&T.marks.length&&T.marks.forEach(D=>{if(o===D.type){const v=Math.max(b,c),C=Math.min(b+T.nodeSize,u);n.addMark(v,C,o.create({...D.attrs,...t}))}}))}),h&&(d!==void 0&&n.setNodeMarkup(d,void 0,{...h.attrs,...t}),o&&h.marks.length&&h.marks.forEach(T=>{o===T.type&&n.addMark(p,m,o.create({...T.attrs,...t}))}))}),!0):!1},r7=(e,t={})=>({state:n,dispatch:r})=>{const i=sr(e,n.schema);return vL(i,t)(n,r)},i7=(e,t={})=>({state:n,dispatch:r})=>{const i=sr(e,n.schema);return DL(i,t)(n,r)};var s7=Object.freeze({__proto__:null,blur:VL,clearContent:jL,clearNodes:GL,command:qL,createParagraphNear:WL,cut:KL,deleteCurrentNode:QL,deleteNode:JL,deleteRange:XL,deleteSelection:eI,enter:tI,exitCode:nI,extendMarkRange:rI,first:iI,focus:sI,forEach:oI,insertContent:aI,insertContentAt:uI,joinBackward:pI,joinDown:hI,joinForward:fI,joinItemBackward:mI,joinItemForward:gI,joinTextblockBackward:TI,joinTextblockForward:AI,joinUp:dI,keyboardShortcut:yI,lift:EI,liftEmptyBlock:vI,liftListItem:DI,newlineInCode:SI,resetAttributes:wI,scrollIntoView:_I,selectAll:CI,selectNodeBackward:NI,selectNodeForward:FI,selectParentNode:OI,selectTextblockEnd:xI,selectTextblockStart:kI,setContent:RI,setMark:PI,setMeta:$I,setNode:UI,setNodeSelection:zI,setTextSelection:VI,sinkListItem:jI,splitBlock:GI,splitListItem:qI,toggleList:WI,toggleMark:KI,toggleNode:QI,toggleWrap:JI,undoInputRule:XI,unsetAllMarks:e7,unsetMark:t7,updateAttributes:n7,wrapIn:r7,wrapInList:i7});const o7=gn.create({name:"commands",addCommands(){return{...s7}}}),a7=gn.create({name:"drop",addProseMirrorPlugins(){return[new Mt({key:new Vt("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),l7=gn.create({name:"editable",addProseMirrorPlugins(){return[new Mt({key:new Vt("editable"),props:{editable:()=>this.editor.options.editable}})]}}),c7=new Vt("focusEvents"),u7=gn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Mt({key:c7,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),d7=gn.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:o})=>{const{selection:a,doc:l}=o,{empty:c,$anchor:u}=a,{pos:d,parent:h}=u,p=u.parent.isTextblock&&d>0?o.doc.resolve(d-1):u,m=p.parent.type.spec.isolating,T=u.pos-u.parentOffset,b=m&&p.parent.childCount===1?T===u.pos:dt.atStart(l).from===d;return!c||!h.type.isTextblock||h.textContent.length||!b||b&&u.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Ym()||lO()?i:r},addProseMirrorPlugins(){return[new Mt({key:new Vt("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(p=>p.getMeta("composition")))return;const r=e.some(p=>p.docChanged)&&!t.doc.eq(n.doc),i=e.some(p=>p.getMeta("preventClearDocument"));if(!r||i)return;const{empty:s,from:o,to:a}=t.selection,l=dt.atStart(t.doc).from,c=dt.atEnd(t.doc).to;if(s||!(o===l&&a===c)||!Bb(n.doc))return;const u=n.tr,d=Rm({state:n,transaction:u}),{commands:h}=new Mm({editor:this.editor,state:d});if(h.clearNodes(),!!u.steps.length)return u}})]}}),h7=gn.create({name:"paste",addProseMirrorPlugins(){return[new Mt({key:new Vt("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),p7=gn.create({name:"tabindex",addProseMirrorPlugins(){return[new Mt({key:new Vt("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Al{get name(){return this.node.type.name}constructor(t,n,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=i}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},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(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new Al(n,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 Al(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 Al(t,this.editor)}get children(){const t=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,s=n.isAtom&&!n.isText,o=this.pos+r+(s?0:1);if(o<0||o>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(o);if(!i&&a.depth<=this.depth)return;const l=new Al(a,this.editor,i,i?n:null);i&&(l.actualDepth=this.depth+1),t.push(new Al(a,this.editor,i,i?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===t)if(Object.keys(n).length>0){const s=i.node.attrs,o=Object.keys(n);for(let a=0;a{r&&i.length>0||(o.node.type.name===t&&s.every(a=>n[a]===o.node.attrs[a])&&i.push(o),!(r&&i.length>0)&&(i=i.concat(o.querySelectorAll(t,n,r))))}),i}setAttribute(t){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}}const f7=`.ProseMirror { position: relative; } .ProseMirror { word-wrap: break-word; white-space: pre-wrap; white-space: break-spaces; -webkit-font-variant-ligatures: none; font-variant-ligatures: none; font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ } .ProseMirror [contenteditable="false"] { white-space: normal; } .ProseMirror [contenteditable="false"] [contenteditable="true"] { white-space: pre-wrap; } .ProseMirror pre { white-space: pre-wrap; } img.ProseMirror-separator { display: inline !important; border: none !important; margin: 0 !important; width: 0 !important; height: 0 !important; } .ProseMirror-gapcursor { display: none; pointer-events: none; position: absolute; margin: 0; } .ProseMirror-gapcursor:after { content: ""; display: block; position: absolute; top: -2px; width: 20px; border-top: 1px solid black; animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; } @keyframes ProseMirror-cursor-blink { to { visibility: hidden; } } .ProseMirror-hideselection *::selection { background: transparent; } .ProseMirror-hideselection *::-moz-selection { background: transparent; } .ProseMirror-hideselection * { caret-color: transparent; } .ProseMirror-focused .ProseMirror-gapcursor { display: block; } .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0 }`;function m7(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}let jAe=class extends FL{constructor(e={}){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(e),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:n,moved:r})=>this.options.onDrop(t,n,r)),this.on("paste",({event:t,slice:n})=>this.options.onPaste(t,n)),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=m7(f7,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&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(e,t){const n=eO(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let n=t;if([].concat(e).forEach(i=>{const s=typeof i=="string"?`${i}$`:i.key;n=n.filter(o=>!o.key.startsWith(s))}),t.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;const n=[...this.options.enableCoreExtensions?[l7,zL.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||t===void 0?void 0:t.blockSeparator}),o7,u7,d7,p7,a7,h7].filter(r=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[r.name]!==!1:!0):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r?.type));this.extensionManager=new zc(n,this)}createCommandManager(){this.commandManager=new Mm({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let t;try{t=QT(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(o=>o.name!=="collaboration"),this.createExtensionManager()}}),t=QT(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=sO(t,this.options.autofocus);this.view=new J9(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Uc.create({doc:t,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var o;return(o=this.capturedTransaction)===null||o===void 0?void 0:o.step(s)});return}const t=this.state.apply(e),n=!this.state.selection.eq(t.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});const r=e.getMeta("focus"),i=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return hO(this.state,e)}isActive(e,t){const n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return fO(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ob(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=` `,textSerializers:n={}}=e||{};return BI(this.state.doc,{blockSeparator:t,textSerializers:{...nO(this.schema),...n}})}get isEmpty(){return Bb(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 e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,t){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new Al(t,this)}get $doc(){return this.$pos(0)}};function Co(e){return new Hu({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ot(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:s}=t,o=r[r.length-1],a=r[0];if(o){const l=a.search(/\S/),c=n.from+a.indexOf(o),u=c+o.length;if(Mb(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(p=>p===e.type&&p!==h.mark.type)).filter(h=>h.to>c).length)return null;un.from&&s.delete(n.from+l,c);const d=n.from+l+o.length;s.addMark(n.from+l,d,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}function mO(e){return new Hu({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ot(e.getAttributes,void 0,r)||{},{tr:s}=t,o=n.from;let a=n.to;const l=e.type.create(i);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=o+c;u>a?u=a:a=u+r[1].length;const d=r[0][r[0].length-1];s.insertText(d,o+r[0].length-1),s.replaceWith(u,a,l)}else if(r[0]){const c=e.type.isInline?o:o-1;s.insert(c,e.type.create(i)).delete(s.mapping.map(o),s.mapping.map(a))}s.scrollIntoView()}})}function XT(e){return new Hu({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),s=Ot(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,s)}})}function Pt(e){return new Hu({find:e.find,handler:({state:t,range:n,match:r})=>{let i=e.replace,s=n.from;const o=n.to;if(r[1]){const a=r[0].lastIndexOf(r[1]);i+=r[0].slice(a+r[1].length),s+=a;const l=s-o;l>0&&(i=r[0].slice(a-l,a)+i,s=o)}t.tr.insertText(i,s,o)}})}function Oa(e){return new Hu({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const s=Ot(e.getAttributes,void 0,r)||{},o=t.tr.delete(n.from,n.to),a=o.doc.resolve(n.from).blockRange(),l=a&&mb(a,e.type,s);if(!l)return null;if(o.wrap(a,l),e.keepMarks&&e.editor){const{selection:u,storedMarks:d}=t,{splittableMarks:h}=e.editor.extensionManager,p=d||u.$to.parentOffset&&u.$from.marks();if(p){const m=p.filter(T=>h.includes(T.type.name));o.ensureMarks(m)}}if(e.keepAttributes){const u=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(u,s).run()}const c=o.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&Za(o.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&o.join(n.from-1)}})}let Tn=class eA{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=Ot(ze(this,"addOptions",{name:this.name}))),this.storage=Ot(ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new eA(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>Lm(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new eA(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.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: "${n.name}".`),n.options=Ot(ze(n,"addOptions",{name:n.name})),n.storage=Ot(ze(n,"addStorage",{name:n.name,options:n.options})),n}};class g7{constructor(t,n,r){this.isDragging=!1,this.component=t,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.innerDecorations=n.innerDecorations,this.view=n.view,this.HTMLAttributes=n.HTMLAttributes,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var n,r,i,s,o,a,l;const{view:c}=this.editor,u=t.target,d=u.nodeType===3?(n=u.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(u)||!d)return;let h=0,p=0;if(this.dom!==d){const v=this.dom.getBoundingClientRect(),C=d.getBoundingClientRect(),S=(i=t.offsetX)!==null&&i!==void 0?i:(s=t.nativeEvent)===null||s===void 0?void 0:s.offsetX,O=(o=t.offsetY)!==null&&o!==void 0?o:(a=t.nativeEvent)===null||a===void 0?void 0:a.offsetY;h=C.x-v.x+S,p=C.y-v.y+O}const m=this.dom.cloneNode(!0);(l=t.dataTransfer)===null||l===void 0||l.setDragImage(m,h,p);const T=this.getPos();if(typeof T!="number")return;const b=Je.create(c.state.doc,T),D=c.state.tr.setSelection(b);c.dispatch(D)}stopEvent(t){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});const r=t.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const i=t.type.startsWith("drag"),s=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!s&&!i)return!0;const{isEditable:o}=this.editor,{isDragging:a}=this,l=!!this.node.type.spec.draggable,c=Je.isSelectable(this.node),u=t.type==="copy",d=t.type==="paste",h=t.type==="cut",p=t.type==="mousedown";if(!l&&c&&i&&t.target===this.dom&&t.preventDefault(),l&&i&&!a&&t.target===this.dom)return t.preventDefault(),!1;if(l&&o&&!a&&p){const m=r.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(a||s||u||d||h||p&&c)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(Ym()||oO())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return typeof r!="number"?!1:(n.setNodeMarkup(r,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){const t=this.getPos();if(typeof t!="number")return;const n=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:n})}}function No(e){return new YL({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{const s=Ot(e.getAttributes,void 0,r,i);if(s===!1||s===null)return null;const{tr:o}=t,a=r[r.length-1],l=r[0];let c=n.to;if(a){const u=l.search(/\S/),d=n.from+l.indexOf(a),h=d+a.length;if(Mb(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===e.type&&m!==p.mark.type)).filter(p=>p.to>d).length)return null;hn.from&&o.delete(n.from+u,d),c=n.from+u+a.length,o.addMark(n.from+u,c,e.type.create(s||{})),o.removeStoredMark(e.type)}}})}function T7(e,t){const{selection:n}=e,{$from:r}=n;if(n instanceof Je){const s=r.index();return r.parent.canReplaceWith(s,s+1,t)}let i=r.depth;for(;i>=0;){const s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(t))return!0;i-=1}return!1}function A7(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}const Kr=()=>new Map,tA=e=>{const t=Kr();return e.forEach((n,r)=>{t.set(r,n)}),t},Wi=(e,t,n)=>{let r=e.get(t);return r===void 0&&e.set(t,r=n()),r},b7=(e,t)=>{const n=[];for(const[r,i]of e)n.push(t(i,r));return n},y7=(e,t)=>{for(const[n,r]of e)if(t(r,n))return!0;return!1},Fo=()=>new Set,bg=e=>e[e.length-1],E7=(e,t)=>{for(let n=0;n{for(let n=0;n{this.off(t,r),n(...i)};this.on(t,r)}off(t,n){const r=this._observers.get(t);r!==void 0&&(r.delete(n),r.size===0&&this._observers.delete(t))}emit(t,n){return Oo((this._observers.get(t)||Kr()).values()).forEach(r=>r(...n))}destroy(){this._observers=Kr()}}class TO{constructor(){this._observers=Kr()}on(t,n){Wi(this._observers,t,Fo).add(n)}once(t,n){const r=(...i)=>{this.off(t,r),n(...i)};this.on(t,r)}off(t,n){const r=this._observers.get(t);r!==void 0&&(r.delete(n),r.size===0&&this._observers.delete(t))}emit(t,n){return Oo((this._observers.get(t)||Kr()).values()).forEach(r=>r(...n))}destroy(){this._observers=Kr()}}const $s=Math.floor,Fp=Math.abs,Bs=(e,t)=>ee>t?e:t,D7=Math.pow,AO=e=>e!==0?e<0:1/e<0,VD=1,jD=2,yg=4,Eg=8,Fd=32,wo=64,Qr=128,S7=1<<29,Zm=31,rA=63,Ol=127,w7=2147483647,bO=Number.MAX_SAFE_INTEGER,_7=Number.isInteger||(e=>typeof e=="number"&&isFinite(e)&&$s(e)===e),C7=String.fromCharCode,N7=e=>e.toLowerCase(),F7=/^\s*/g,O7=e=>e.replace(F7,""),x7=/([A-Z])/g,GD=(e,t)=>O7(e.replace(x7,n=>`${t}${N7(n)}`)),k7=e=>{const t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let i=0;iOd.encode(e),M7=Od?R7:k7;let J0=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});J0&&J0.decode(new Uint8Array).length===1&&(J0=null);class dh{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const hr=()=>new dh,B7=e=>{const t=hr();return e(t),xn(t)},Lb=e=>{let t=e.cpos;for(let n=0;n{const t=new Uint8Array(Lb(e));let n=0;for(let r=0;r{const n=e.cbuf.length;n-e.cpos{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},iA=ur,st=(e,t)=>{for(;t>Ol;)ur(e,Qr|Ol&t),t=$s(t/128);ur(e,Ol&t)},Ib=(e,t)=>{const n=AO(t);for(n&&(t=-t),ur(e,(t>rA?Qr:0)|(n?wo:0)|rA&t),t=$s(t/64);t>0;)ur(e,(t>Ol?Qr:0)|Ol&t),t=$s(t/128)},sA=new Uint8Array(3e4),I7=sA.length/3,Y7=(e,t)=>{if(t.length{const n=unescape(encodeURIComponent(t)),r=n.length;st(e,r);for(let i=0;i{const n=e.cbuf.length,r=e.cpos,i=Bs(n-r,t.length),s=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(hs(n*2,s)),e.cbuf.set(t.subarray(i)),e.cpos=s)},Vn=(e,t)=>{st(e,t.byteLength),Pm(e,t)},Yb=(e,t)=>{L7(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},Z7=(e,t)=>Yb(e,4).setFloat32(0,t,!1),P7=(e,t)=>Yb(e,8).setFloat64(0,t,!1),$7=(e,t)=>Yb(e,8).setBigInt64(0,t,!1),qD=new DataView(new ArrayBuffer(4)),U7=e=>(qD.setFloat32(0,e),qD.getFloat32(0)===e),mu=(e,t)=>{switch(typeof t){case"string":ur(e,119),xl(e,t);break;case"number":_7(t)&&Fp(t)<=w7?(ur(e,125),Ib(e,t)):U7(t)?(ur(e,124),Z7(e,t)):(ur(e,123),P7(e,t));break;case"bigint":ur(e,122),$7(e,t);break;case"object":if(t===null)ur(e,126);else if(nA(t)){ur(e,117),st(e,t.length);for(let n=0;n0&&st(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const KD=e=>{e.count>0&&(Ib(e.encoder,e.count===1?e.s:-e.s),e.count>1&&st(e.encoder,e.count-2))};class Op{constructor(){this.encoder=new dh,this.s=0,this.count=0}write(t){this.s===t?this.count++:(KD(this),this.count=1,this.s=t)}toUint8Array(){return KD(this),xn(this.encoder)}}const QD=e=>{if(e.count>0){const t=e.diff*2+(e.count===1?0:1);Ib(e.encoder,t),e.count>1&&st(e.encoder,e.count-2)}};class vg{constructor(){this.encoder=new dh,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(QD(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return QD(this),xn(this.encoder)}}class z7{constructor(){this.sarr=[],this.s="",this.lensE=new Op}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new dh;return this.sarr.push(this.s),this.s="",xl(t,this.sarr.join("")),Pm(t,this.lensE.toUint8Array()),xn(t)}}const xa=e=>new Error(e),ls=()=>{throw xa("Method unimplemented")},Ti=()=>{throw xa("Unexpected case")},yO=xa("Unexpected end of array"),EO=xa("Integer out of Range");class $m{constructor(t){this.arr=t,this.pos=0}}const Ro=e=>new $m(e),V7=e=>e.pos!==e.arr.length,j7=(e,t=e.pos)=>{const n=Ro(e.arr);return n.pos=t,n},G7=(e,t)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},Or=e=>G7(e,yt(e)),gu=e=>e.arr[e.pos++],yt=e=>{let t=0,n=1;const r=e.arr.length;for(;e.posbO)throw EO}throw yO},Hb=e=>{let t=e.arr[e.pos++],n=t&rA,r=64;const i=(t&wo)>0?-1:1;if((t&Qr)===0)return i*n;const s=e.arr.length;for(;e.posbO)throw EO}throw yO},q7=e=>{let t=yt(e);if(t===0)return"";{let n=String.fromCodePoint(gu(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(gu(e));else for(;t>0;){const r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},W7=e=>J0.decode(Or(e)),Da=J0?W7:q7,Zb=(e,t)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},K7=e=>Zb(e,4).getFloat32(0,!1),Q7=e=>Zb(e,8).getFloat64(0,!1),J7=e=>Zb(e,8).getBigInt64(0,!1),X7=[e=>{},e=>null,Hb,K7,Q7,J7,e=>!1,e=>!0,Da,e=>{const t=yt(e),n={};for(let r=0;r{const t=yt(e),n=[];for(let r=0;rX7[127-gu(e)](e);class JD extends $m{constructor(t,n){super(t),this.reader=n,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),V7(this)?this.count=yt(this)+1:this.count=-1),this.count--,this.s}}class xp extends $m{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=Hb(this);const t=AO(this.s);this.count=1,t&&(this.s=-this.s,this.count=yt(this)+2)}return this.count--,this.s}}class Dg extends $m{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=Hb(this),n=t&1;this.diff=$s(t/2),this.count=1,n&&(this.count=yt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class e8{constructor(t){this.decoder=new xp(t),this.str=Da(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),n=this.str.slice(this.spos,t);return this.spos=t,n}}const t8=crypto.getRandomValues.bind(crypto),n8=Math.random,vO=()=>t8(new Uint32Array(1))[0],r8=e=>e[$s(n8()*e.length)],i8="10000000-1000-4000-8000"+-1e11,s8=()=>i8.replace(/[018]/g,e=>(e^vO()&15>>e/4).toString(16)),ka=Date.now,XD=e=>new Promise(e);Promise.all.bind(Promise);const o8=e=>e===void 0?null:e;class a8{constructor(){this.map=new Map}setItem(t,n){this.map.set(t,n)}getItem(t){return this.map.get(t)}}let DO=new a8,Pb=!0;try{typeof localStorage<"u"&&localStorage&&(DO=localStorage,Pb=!1)}catch{}const SO=DO,l8=e=>Pb||addEventListener("storage",e),c8=e=>Pb||removeEventListener("storage",e),u8=Object.assign,$b=Object.keys,d8=(e,t)=>{for(const n in e)t(e[n],n)},h8=(e,t)=>{const n=[];for(const r in e)n.push(t(e[r],r));return n},eS=e=>$b(e).length,tS=e=>$b(e).length,p8=e=>{for(const t in e)return!1;return!0},wO=(e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0},_O=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f8=(e,t)=>e===t||tS(e)===tS(t)&&wO(e,(n,r)=>(n!==void 0||_O(t,r))&&t[r]===n),m8=Object.freeze,CO=e=>{for(const t in e){const n=e[t];(typeof n=="object"||typeof n=="function")&&CO(e[t])}return m8(e)},nS=Symbol("Equality"),Ub=(e,t,n=0)=>{try{for(;ne,X0=(e,t)=>{if(e===t)return!0;if(e==null||t==null||e.constructor!==t.constructor)return!1;if(e[nS]!=null)return e[nS](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:{if(e.byteLength!==t.byteLength)return!1;for(let n=0;nt.includes(e);var NO={};const Ra=typeof wi<"u"&&wi.release&&/node|io\.js/.test(wi.release.name)&&Object.prototype.toString.call(typeof wi<"u"?wi:0)==="[object process]",zb=typeof window<"u"&&typeof document<"u"&&!Ra;let Ds;const A8=()=>{if(Ds===void 0)if(Ra){Ds=Kr();const e=wi.argv;let t=null;for(let n=0;n{if(e.length!==0){const[t,n]=e.split("=");Ds.set(`--${GD(t,"-")}`,n),Ds.set(`-${GD(t,"-")}`,n)}})):Ds=Kr();return Ds},oA=e=>A8().has(e),mf=e=>o8(Ra?NO[e.toUpperCase().replaceAll("-","_")]:SO.getItem(e)),FO=e=>oA("--"+e)||mf(e)!==null;FO("production");const b8=Ra&&T8(NO.FORCE_COLOR,["true","1","2"]),y8=b8||!oA("--no-colors")&&!FO("no-color")&&(!Ra||wi.stdout.isTTY)&&(!Ra||oA("--color")||mf("COLORTERM")!==null||(mf("TERM")||"").includes("color")),OO=e=>new Uint8Array(e),E8=(e,t,n)=>new Uint8Array(e,t,n),v8=e=>new Uint8Array(e),D8=e=>{let t="";for(let n=0;nSm.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),w8=e=>{const t=atob(e),n=OO(t.length);for(let r=0;r{const t=Sm.from(e,"base64");return E8(t.buffer,t.byteOffset,t.byteLength)},Vb=zb?D8:S8,xO=zb?w8:_8,C8=e=>{const t=OO(e.byteLength);return t.set(e),t},N8=e=>B7(t=>mu(t,e));class F8{constructor(t,n){this.left=t,this.right=n}}const so=(e,t)=>new F8(e,t),O8=typeof document<"u"?document:{};typeof DOMParser<"u"&&new DOMParser;const x8=e=>b7(e,(t,n)=>`${n}:${t};`).join(""),k8=e=>class{constructor(t){this._=t}destroy(){e(this._)}},R8=k8(clearTimeout),jb=(e,t)=>new R8(setTimeout(t,e)),Mo=Symbol,kO=Mo(),RO=Mo(),M8=Mo(),B8=Mo(),L8=Mo(),MO=Mo(),I8=Mo(),Gb=Mo(),Y8=Mo(),H8=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[];let r=0;for(;r0&&n.push(t.join(""));r{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[],r=Kr();let i=[],s=0;for(;s0||l.length>0?(t.push("%c"+o),n.push(l)):t.push(o)}else break}}for(s>0&&(i=n,i.unshift(t.join("")));s{console.log(...BO(e)),IO.forEach(t=>t.print(e))},LO=(...e)=>{console.warn(...BO(e)),e.unshift(Gb),IO.forEach(t=>t.print(e))},IO=Fo(),YO=e=>({[Symbol.iterator](){return this},next:e}),U8=(e,t)=>YO(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),Sg=(e,t)=>YO(()=>{const{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}});class qb{constructor(t,n){this.clock=t,this.len=n}}class Zu{constructor(){this.clients=new Map}}const Ma=(e,t,n)=>t.clients.forEach((r,i)=>{const s=e.doc.store.clients.get(i);if(s!=null){const o=s[s.length-1],a=o.id.clock+o.length;for(let l=0,c=r[l];l{let n=0,r=e.length-1;for(;n<=r;){const i=$s((n+r)/2),s=e[i],o=s.clock;if(o<=t){if(t{const n=e.clients.get(t.client);return n!==void 0&&z8(n,t.clock)!==null},Wb=e=>{e.clients.forEach(t=>{t.sort((i,s)=>i.clock-s.clock);let n,r;for(n=1,r=1;n=s.clock?i.len=hs(i.len,s.clock+s.len-i.clock):(r{const t=new Zu;for(let n=0;n{if(!t.clients.has(i)){const s=r.slice();for(let o=n+1;o{Wi(e.clients,t,()=>[]).push(new qb(n,r))},HO=()=>new Zu,ZO=e=>{const t=HO();return e.clients.forEach((n,r)=>{const i=[];for(let s=0;s0&&t.clients.set(r,i)}),t},$u=(e,t)=>{st(e.restEncoder,t.clients.size),Oo(t.clients.entries()).sort((n,r)=>r[0]-n[0]).forEach(([n,r])=>{e.resetDsCurVal(),st(e.restEncoder,n);const i=r.length;st(e.restEncoder,i);for(let s=0;s{const t=new Zu,n=yt(e.restDecoder);for(let r=0;r0){const o=Wi(t.clients,i,()=>[]);for(let a=0;a{const r=new Zu,i=yt(e.restDecoder);for(let s=0;s0){const s=new $l;return st(s.restEncoder,0),$u(s,r),s.toUint8Array()}return null},PO=vO;class Ua extends gO{constructor({guid:t=s8(),collectionid:n=null,gc:r=!0,gcFilter:i=()=>!0,meta:s=null,autoLoad:o=!1,shouldLoad:a=!0}={}){super(),this.gc=r,this.gcFilter=i,this.clientID=PO(),this.guid=t,this.collectionid=n,this.share=new Map,this.store=new QO,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=a,this.autoLoad=o,this.meta=s,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=XD(c=>{this.on("load",()=>{this.isLoaded=!0,c(this)})});const l=()=>XD(c=>{const u=d=>{(d===void 0||d===!0)&&(this.off("sync",u),c())};this.on("sync",u)});this.on("sync",c=>{c===!1&&this.isSynced&&(this.whenSynced=l()),this.isSynced=c===void 0||c===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=l()}load(){const t=this._item;t!==null&&!this.shouldLoad&&mn(t.parent.doc,n=>{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Oo(this.subdocs).map(t=>t.guid))}transact(t,n=null){return mn(this,t,n)}get(t,n=Ar){const r=Wi(this.share,t,()=>{const s=new n;return s._integrate(this,null),s}),i=r.constructor;if(n!==Ar&&i!==n)if(i===Ar){const s=new n;s._map=r._map,r._map.forEach(o=>{for(;o!==null;o=o.left)o.parent=s}),s._start=r._start;for(let o=s._start;o!==null;o=o.right)o.parent=s;return s._length=r._length,this.share.set(t,s),s._integrate(this,null),s}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=""){return this.get(t,ru)}getText(t=""){return this.get(t,Ul)}getMap(t=""){return this.get(t,Au)}getXmlElement(t=""){return this.get(t,qr)}getXmlFragment(t=""){return this.get(t,Ba)}toJSON(){const t={};return this.share.forEach((n,r)=>{t[r]=n.toJSON()}),t}destroy(){this.isDestroyed=!0,Oo(this.subdocs).forEach(n=>n.destroy());const t=this._item;if(t!==null){this._item=null;const n=t.content;n.doc=new Ua({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=t,mn(t.parent.doc,r=>{const i=n.doc;t.deleted||r.subdocsAdded.add(i),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class $O{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return yt(this.restDecoder)}readDsLen(){return yt(this.restDecoder)}}class UO extends $O{readLeftID(){return Dt(yt(this.restDecoder),yt(this.restDecoder))}readRightID(){return Dt(yt(this.restDecoder),yt(this.restDecoder))}readClient(){return yt(this.restDecoder)}readInfo(){return gu(this.restDecoder)}readString(){return Da(this.restDecoder)}readParentInfo(){return yt(this.restDecoder)===1}readTypeRef(){return yt(this.restDecoder)}readLen(){return yt(this.restDecoder)}readAny(){return xd(this.restDecoder)}readBuf(){return C8(Or(this.restDecoder))}readJSON(){return JSON.parse(Da(this.restDecoder))}readKey(){return Da(this.restDecoder)}}class V8{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=yt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=yt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Tu extends V8{constructor(t){super(t),this.keys=[],yt(t),this.keyClockDecoder=new Dg(Or(t)),this.clientDecoder=new xp(Or(t)),this.leftClockDecoder=new Dg(Or(t)),this.rightClockDecoder=new Dg(Or(t)),this.infoDecoder=new JD(Or(t),gu),this.stringDecoder=new e8(Or(t)),this.parentInfoDecoder=new JD(Or(t),gu),this.typeRefDecoder=new xp(Or(t)),this.lenDecoder=new xp(Or(t))}readLeftID(){return new tu(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new tu(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return xd(this.restDecoder)}readBuf(){return Or(this.restDecoder)}readJSON(){return xd(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=hs(r,t[0].id.clock);const i=ps(t,r);st(e.restEncoder,t.length-i),e.writeClient(n),st(e.restEncoder,r);const s=t[i];s.write(e,r-s.id.clock);for(let o=i+1;o{const r=new Map;n.forEach((i,s)=>{Gn(t,s)>i&&r.set(s,i)}),ph(t).forEach((i,s)=>{n.has(s)||r.set(s,0)}),st(e.restEncoder,r.size),Oo(r.entries()).sort((i,s)=>s[0]-i[0]).forEach(([i,s])=>{j8(e,t.clients.get(i),i,s)})},G8=(e,t)=>{const n=Kr(),r=yt(e.restDecoder);for(let i=0;i{const r=[];let i=Oo(n.keys()).sort((p,m)=>p-m);if(i.length===0)return null;const s=()=>{if(i.length===0)return null;let p=n.get(i[i.length-1]);for(;p.refs.length===p.i;)if(i.pop(),i.length>0)p=n.get(i[i.length-1]);else return null;return p};let o=s();if(o===null)return null;const a=new QO,l=new Map,c=(p,m)=>{const T=l.get(p);(T==null||T>m)&&l.set(p,m)};let u=o.refs[o.i++];const d=new Map,h=()=>{for(const p of r){const m=p.id.client,T=n.get(m);T?(T.i--,a.clients.set(m,T.refs.slice(T.i)),n.delete(m),T.i=0,T.refs=[]):a.clients.set(m,[p]),i=i.filter(b=>b!==m)}r.length=0};for(;;){if(u.constructor!==$i){const p=Wi(d,u.id.client,()=>Gn(t,u.id.client))-u.id.clock;if(p<0)r.push(u),c(u.id.client,u.id.clock-1),h();else{const m=u.getMissing(e,t);if(m!==null){r.push(u);const T=n.get(m)||{refs:[],i:0};if(T.refs.length===T.i)c(m,Gn(t,m)),h();else{u=T.refs[T.i++];continue}}else(p===0||p0)u=r.pop();else if(o!==null&&o.i0){const p=new $l;return Qb(p,a,new Map),st(p.restEncoder,0),{missing:l,update:p.toUint8Array()}}return null},W8=(e,t)=>Qb(e,t.doc.store,t.beforeState),K8=(e,t,n,r=new Tu(e))=>mn(t,i=>{i.local=!1;let s=!1;const o=i.doc,a=o.store,l=G8(r,o),c=q8(i,a,l),u=a.pendingStructs;if(u){for(const[h,p]of u.missing)if(pp)&&u.missing.set(h,p)}u.update=Tf([u.update,c.update])}}else a.pendingStructs=c;const d=rS(r,i,a);if(a.pendingDs){const h=new Tu(Ro(a.pendingDs));yt(h.restDecoder);const p=rS(h,i,a);d&&p?a.pendingDs=Tf([d,p]):a.pendingDs=d||p}else a.pendingDs=d;if(s){const h=a.pendingStructs.update;a.pendingStructs=null,gf(i.doc,h)}},n,!1),gf=(e,t,n,r=Tu)=>{const i=Ro(t);K8(i,e,n,new r(i))},Q8=(e,t,n)=>gf(e,t,n,UO),J8=(e,t,n=new Map)=>{Qb(e,t.store,n),$u(e,ZO(t.store))},X8=(e,t=new Uint8Array([0]),n=new $l)=>{const r=jO(t);J8(n,e,r);const i=[n.toUint8Array()];if(e.store.pendingDs&&i.push(e.store.pendingDs),e.store.pendingStructs&&i.push(AY(e.store.pendingStructs.update,t)),i.length>1){if(n.constructor===hh)return gY(i.map((s,o)=>o===0?s:yY(s)));if(n.constructor===$l)return Tf(i)}return i[0]},Jb=(e,t)=>X8(e,t,new hh),eY=e=>{const t=new Map,n=yt(e.restDecoder);for(let r=0;reY(new $O(Ro(e))),GO=(e,t)=>(st(e.restEncoder,t.size),Oo(t.entries()).sort((n,r)=>r[0]-n[0]).forEach(([n,r])=>{st(e.restEncoder,n),st(e.restEncoder,r)}),e),tY=(e,t)=>GO(e,ph(t.store)),nY=(e,t=new VO)=>(e instanceof Map?GO(t,e):tY(t,e),t.toUint8Array()),qO=e=>nY(e,new zO);class rY{constructor(){this.l=[]}}const iS=()=>new rY,sS=(e,t)=>e.l.push(t),oS=(e,t)=>{const n=e.l,r=n.length;e.l=n.filter(i=>t!==i),r===e.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},WO=(e,t,n)=>Ub(e.l,[t,n]);class tu{constructor(t,n){this.client=t,this.clock=n}}const Vc=(e,t)=>e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock,Dt=(e,t)=>new tu(e,t),Rd=e=>{for(const[t,n]of e.doc.share.entries())if(n===e)return t;throw Ti()},Md=(e,t)=>{for(;t!==null;){if(t.parent===e)return!0;t=t.parent._item}return!1};class Bd{constructor(t,n,r,i=0){this.type=t,this.tname=n,this.item=r,this.assoc=i}}const ed=e=>new Bd(e.type==null?null:Dt(e.type.client,e.type.clock),e.tname??null,e.item==null?null:Dt(e.item.client,e.item.clock),e.assoc==null?0:e.assoc);class iY{constructor(t,n,r=0){this.type=t,this.index=n,this.assoc=r}}const sY=(e,t,n=0)=>new iY(e,t,n),Uh=(e,t,n)=>{let r=null,i=null;return e._item===null?i=Rd(e):r=Dt(e._item.id.client,e._item.id.clock),new Bd(r,i,t,n)},wg=(e,t,n=0)=>{let r=e._start;if(n<0){if(t===0)return Uh(e,null,n);t--}for(;r!==null;){if(!r.deleted&&r.countable){if(r.length>t)return Uh(e,Dt(r.id.client,r.id.clock+t),n);t-=r.length}if(r.right===null&&n<0)return Uh(e,r.lastId,n);r=r.right}return Uh(e,null,n)},oY=(e,t)=>{const n=nu(e,t),r=t.clock-n.id.clock;return{item:n,diff:r}},aY=(e,t,n=!0)=>{const r=t.store,i=e.item,s=e.type,o=e.tname,a=e.assoc;let l=null,c=0;if(i!==null){if(Gn(r,i.client)<=i.clock)return null;const u=n?dA(r,i):oY(r,i),d=u.item;if(!(d instanceof dn))return null;if(l=d.parent,l._item===null||!l._item.deleted){c=d.deleted||!d.countable?0:u.diff+(a>=0?0:1);let h=d.left;for(;h!==null;)!h.deleted&&h.countable&&(c+=h.length),h=h.left}}else{if(o!==null)l=t.get(o);else if(s!==null){if(Gn(r,s.client)<=s.clock)return null;const{item:u}=n?dA(r,s):{item:nu(r,s)};if(u instanceof dn&&u.content instanceof Gs)l=u.content.type;else return null}else throw Ti();a>=0?c=l._length:c=0}return sY(l,c,e.assoc)},aS=(e,t)=>e===t||e!==null&&t!==null&&e.tname===t.tname&&Vc(e.item,t.item)&&Vc(e.type,t.type)&&e.assoc===t.assoc;class Xb{constructor(t,n){this.ds=t,this.sv=n}}const KO=(e,t)=>new Xb(e,t),_g=e=>KO(ZO(e.store),ph(e.store)),bl=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!Pu(t.ds,e.id),lA=(e,t)=>{const n=Wi(e.meta,lA,Fo),r=e.doc.store;n.has(t)||(t.sv.forEach((i,s)=>{i{}),n.add(t))};class QO{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const ph=e=>{const t=new Map;return e.clients.forEach((n,r)=>{const i=n[n.length-1];t.set(r,i.id.clock+i.length)}),t},Gn=(e,t)=>{const n=e.clients.get(t);if(n===void 0)return 0;const r=n[n.length-1];return r.id.clock+r.length},JO=(e,t)=>{let n=e.clients.get(t.id.client);if(n===void 0)n=[],e.clients.set(t.id.client,n);else{const r=n[n.length-1];if(r.id.clock+r.length!==t.id.clock)throw Ti()}n.push(t)},ps=(e,t)=>{let n=0,r=e.length-1,i=e[r],s=i.id.clock;if(s===t)return r;let o=$s(t/(s+i.length-1)*r);for(;n<=r;){if(i=e[o],s=i.id.clock,s<=t){if(t{const n=e.clients.get(t.client);return n[ps(n,t.clock)]},nu=lY,cA=(e,t,n)=>{const r=ps(t,n),i=t[r];return i.id.clock{const n=e.doc.store.clients.get(t.client);return n[cA(e,n,t.clock)]},lS=(e,t,n)=>{const r=t.clients.get(n.client),i=ps(r,n.clock),s=r[i];return n.clock!==s.id.clock+s.length-1&&s.constructor!==Pi&&r.splice(i+1,0,vf(e,s,n.clock-s.id.clock+1)),s},cY=(e,t,n)=>{const r=e.clients.get(t.id.client);r[ps(r,t.id.clock)]=n},XO=(e,t,n,r,i)=>{if(r===0)return;const s=n+r;let o=cA(e,t,n),a;do a=t[o++],st.deleteSet.clients.size===0&&!y7(t.afterState,(n,r)=>t.beforeState.get(r)!==n)?!1:(Wb(t.deleteSet),W8(e,t),$u(e,t.deleteSet),!0),uS=(e,t,n)=>{const r=t._item;(r===null||r.id.clock<(e.beforeState.get(r.id.client)||0)&&!r.deleted)&&Wi(e.changed,t,Fo).add(n)},kp=(e,t)=>{let n=e[t],r=e[t-1],i=t;for(;i>0;n=r,r=e[--i-1]){if(r.deleted===n.deleted&&r.constructor===n.constructor&&r.mergeWith(n)){n instanceof dn&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,r);continue}break}const s=t-i;return s&&e.splice(t+1-s,s),s},dY=(e,t,n)=>{for(const[r,i]of e.clients.entries()){const s=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const a=i[o],l=a.clock+a.len;for(let c=ps(s,a.clock),u=s[c];c{e.clients.forEach((n,r)=>{const i=t.clients.get(r);for(let s=n.length-1;s>=0;s--){const o=n[s],a=Bs(i.length-1,1+ps(i,o.clock+o.len-1));for(let l=a,c=i[l];l>0&&c.id.clock>=o.clock;c=i[l])l-=1+kp(i,l)}})},ex=(e,t)=>{if(ta.push(()=>{(c._item===null||!c._item.deleted)&&c._callObserver(n,l)})),a.push(()=>{n.changedParentTypes.forEach((l,c)=>{c._dEH.l.length>0&&(c._item===null||!c._item.deleted)&&(l=l.filter(u=>u.target._item===null||!u.target._item.deleted),l.forEach(u=>{u.currentTarget=c,u._path=null}),l.sort((u,d)=>u.path.length-d.path.length),WO(c._dEH,l,n))})}),a.push(()=>r.emit("afterTransaction",[n,r])),Ub(a,[]),n._needFormattingCleanup&&MY(n)}finally{r.gc&&dY(s,i,r.gcFilter),hY(s,i),n.afterState.forEach((u,d)=>{const h=n.beforeState.get(d)||0;if(h!==u){const p=i.clients.get(d),m=hs(ps(p,h),1);for(let T=p.length-1;T>=m;)T-=1+kp(p,T)}});for(let u=o.length-1;u>=0;u--){const{client:d,clock:h}=o[u].id,p=i.clients.get(d),m=ps(p,h);m+11||m>0&&kp(p,m)}if(!n.local&&n.afterState.get(r.clientID)!==n.beforeState.get(r.clientID)&&($8(Gb,kO,"[yjs] ",RO,MO,"Changed the client-id because another client seems to be using it."),r.clientID=PO()),r.emit("afterTransactionCleanup",[n,r]),r._observers.has("update")){const u=new hh;cS(u,n)&&r.emit("update",[u.toUint8Array(),n.origin,r,n])}if(r._observers.has("updateV2")){const u=new $l;cS(u,n)&&r.emit("updateV2",[u.toUint8Array(),n.origin,r,n])}const{subdocsAdded:a,subdocsLoaded:l,subdocsRemoved:c}=n;(a.size>0||c.size>0||l.size>0)&&(a.forEach(u=>{u.clientID=r.clientID,u.collectionid==null&&(u.collectionid=r.collectionid),r.subdocs.add(u)}),c.forEach(u=>r.subdocs.delete(u)),r.emit("subdocs",[{loaded:l,added:a,removed:c},r,n]),c.forEach(u=>u.destroy())),e.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,e])):ex(e,t+1)}}},mn=(e,t,n=null,r=!0)=>{const i=e._transactionCleanups;let s=!1,o=null;e._transaction===null&&(s=!0,e._transaction=new uY(e,n,r),i.push(e._transaction),i.length===1&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{o=t(e._transaction)}finally{if(s){const a=e._transaction===i[0];e._transaction=null,a&&ex(i,0)}}return o};class pY{constructor(t,n){this.insertions=n,this.deletions=t,this.meta=new Map}}const dS=(e,t,n)=>{Ma(e,n.deletions,r=>{r instanceof dn&&t.scope.some(i=>i===e.doc||Md(i,r))&&ay(r,!1)})},hS=(e,t,n)=>{let r=null;const i=e.doc,s=e.scope;mn(i,a=>{for(;t.length>0&&e.currStackItem===null;){const l=i.store,c=t.pop(),u=new Set,d=[];let h=!1;Ma(a,c.insertions,p=>{if(p instanceof dn){if(p.redone!==null){let{item:m,diff:T}=dA(l,p.id);T>0&&(m=li(a,Dt(m.id.client,m.id.clock+T))),p=m}!p.deleted&&s.some(m=>m===a.doc||Md(m,p))&&d.push(p)}}),Ma(a,c.deletions,p=>{p instanceof dn&&s.some(m=>m===a.doc||Md(m,p))&&!Pu(c.insertions,p.id)&&u.add(p)}),u.forEach(p=>{h=bx(a,p,u,c.insertions,e.ignoreRemoteMapChanges,e)!==null||h});for(let p=d.length-1;p>=0;p--){const m=d[p];e.deleteFilter(m)&&(m.delete(a),h=!0)}e.currStackItem=h?c:null}a.changed.forEach((l,c)=>{l.has(null)&&c._searchMarker&&(c._searchMarker.length=0)}),r=a},e);const o=e.currStackItem;if(o!=null){const a=r.changedParentTypes;e.emit("stack-item-popped",[{stackItem:o,type:n,changedParentTypes:a,origin:e},e]),e.currStackItem=null}return o};class fY extends gO{constructor(t,{captureTimeout:n=500,captureTransaction:r=l=>!0,deleteFilter:i=()=>!0,trackedOrigins:s=new Set([null]),ignoreRemoteMapChanges:o=!1,doc:a=nA(t)?t[0].doc:t instanceof Ua?t:t.doc}={}){super(),this.scope=[],this.doc=a,this.addToScope(t),this.deleteFilter=i,s.add(this),this.trackedOrigins=s,this.captureTransaction=r,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.currStackItem=null,this.lastChange=0,this.ignoreRemoteMapChanges=o,this.captureTimeout=n,this.afterTransactionHandler=l=>{if(!this.captureTransaction(l)||!this.scope.some(b=>l.changedParentTypes.has(b)||b===this.doc)||!this.trackedOrigins.has(l.origin)&&(!l.origin||!this.trackedOrigins.has(l.origin.constructor)))return;const c=this.undoing,u=this.redoing,d=c?this.redoStack:this.undoStack;c?this.stopCapturing():u||this.clear(!1,!0);const h=new Zu;l.afterState.forEach((b,D)=>{const v=l.beforeState.get(D)||0,C=b-v;C>0&&kd(h,D,v,C)});const p=ka();let m=!1;if(this.lastChange>0&&p-this.lastChange0&&!c&&!u){const b=d[d.length-1];b.deletions=aA([b.deletions,l.deleteSet]),b.insertions=aA([b.insertions,h])}else d.push(new pY(l.deleteSet,h)),m=!0;!c&&!u&&(this.lastChange=p),Ma(l,l.deleteSet,b=>{b instanceof dn&&this.scope.some(D=>D===l.doc||Md(D,b))&&ay(b,!0)});const T=[{stackItem:d[d.length-1],origin:l.origin,type:c?"redo":"undo",changedParentTypes:l.changedParentTypes},this];m?this.emit("stack-item-added",T):this.emit("stack-item-updated",T)},this.doc.on("afterTransaction",this.afterTransactionHandler),this.doc.on("destroy",()=>{this.destroy()})}addToScope(t){const n=new Set(this.scope);t=nA(t)?t:[t],t.forEach(r=>{n.has(r)||(n.add(r),(r instanceof Ar?r.doc!==this.doc:r!==this.doc)&&LO("[yjs#509] Not same Y.Doc"),this.scope.push(r))})}addTrackedOrigin(t){this.trackedOrigins.add(t)}removeTrackedOrigin(t){this.trackedOrigins.delete(t)}clear(t=!0,n=!0){(t&&this.canUndo()||n&&this.canRedo())&&this.doc.transact(r=>{t&&(this.undoStack.forEach(i=>dS(r,this,i)),this.undoStack=[]),n&&(this.redoStack.forEach(i=>dS(r,this,i)),this.redoStack=[]),this.emit("stack-cleared",[{undoStackCleared:t,redoStackCleared:n}])})}stopCapturing(){this.lastChange=0}undo(){this.undoing=!0;let t;try{t=hS(this,this.undoStack,"undo")}finally{this.undoing=!1}return t}redo(){this.redoing=!0;let t;try{t=hS(this,this.redoStack,"redo")}finally{this.redoing=!1}return t}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off("afterTransaction",this.afterTransactionHandler),super.destroy()}}function*mY(e){const t=yt(e.restDecoder);for(let n=0;nTf(e,UO,hh),TY=(e,t)=>{if(e.constructor===Pi){const{client:n,clock:r}=e.id;return new Pi(Dt(n,r+t),e.length-t)}else if(e.constructor===$i){const{client:n,clock:r}=e.id;return new $i(Dt(n,r+t),e.length-t)}else{const n=e,{client:r,clock:i}=n.id;return new dn(Dt(r,i+t),null,Dt(r,i+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},Tf=(e,t=Tu,n=$l)=>{if(e.length===1)return e[0];const r=e.map(u=>new t(Ro(u)));let i=r.map(u=>new ey(u,!0)),s=null;const o=new n,a=new ty(o);for(;i=i.filter(u=>u.curr!==null),i.sort((u,d)=>{if(u.curr.id.client===d.curr.id.client){const h=u.curr.id.clock-d.curr.id.clock;return h===0?u.curr.constructor===d.curr.constructor?0:u.curr.constructor===$i?1:-1:h}else return d.curr.id.client-u.curr.id.client}),i.length!==0;){const u=i[0],d=u.curr.id.client;if(s!==null){let h=u.curr,p=!1;for(;h!==null&&h.id.clock+h.length<=s.struct.id.clock+s.struct.length&&h.id.client>=s.struct.id.client;)h=u.next(),p=!0;if(h===null||h.id.client!==d||p&&h.id.clock>s.struct.id.clock+s.struct.length)continue;if(d!==s.struct.id.client)ia(a,s.struct,s.offset),s={struct:h,offset:0},u.next();else if(s.struct.id.clock+s.struct.length0&&(s.struct.constructor===$i?s.struct.length-=m:h=TY(h,m)),s.struct.mergeWith(h)||(ia(a,s.struct,s.offset),s={struct:h,offset:0},u.next())}}else s={struct:u.curr,offset:0},u.next();for(let h=u.curr;h!==null&&h.id.client===d&&h.id.clock===s.struct.id.clock+s.struct.length&&h.constructor!==$i;h=u.next())ia(a,s.struct,s.offset),s={struct:h,offset:0}}s!==null&&(ia(a,s.struct,s.offset),s=null),ny(a);const l=r.map(u=>Kb(u)),c=aA(l);return $u(o,c),o.toUint8Array()},AY=(e,t,n=Tu,r=$l)=>{const i=jO(t),s=new r,o=new ty(s),a=new n(Ro(e)),l=new ey(a,!1);for(;l.curr;){const u=l.curr,d=u.id.client,h=i.get(d)||0;if(l.curr.constructor===$i){l.next();continue}if(u.id.clock+u.length>h)for(ia(o,u,hs(h-u.id.clock,0)),l.next();l.curr&&l.curr.id.client===d;)ia(o,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===d&&l.curr.id.clock+l.curr.length<=h;)l.next()}ny(o);const c=Kb(a);return $u(s,c),s.toUint8Array()},tx=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:xn(e.encoder.restEncoder)}),e.encoder.restEncoder=hr(),e.written=0)},ia=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&tx(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),st(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},ny=e=>{tx(e);const t=e.encoder.restEncoder;st(t,e.clientStructs.length);for(let n=0;n{const i=new n(Ro(e)),s=new ey(i,!1),o=new r,a=new ty(o);for(let c=s.curr;c!==null;c=s.next())ia(a,t(c),0);ny(a);const l=Kb(i);return $u(o,l),o.toUint8Array()},yY=e=>bY(e,g8,Tu,hh),pS="You must not compute changes after the event-handler fired.";class Um{constructor(t,n){this.target=t,this.currentTarget=t,this.transaction=n,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=EY(this.currentTarget,this.target))}deletes(t){return Pu(this.transaction.deleteSet,t.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw xa(pS);const t=new Map,n=this.target;this.transaction.changed.get(n).forEach(r=>{if(r!==null){const i=n._map.get(r);let s,o;if(this.adds(i)){let a=i.left;for(;a!==null&&this.adds(a);)a=a.left;if(this.deletes(i))if(a!==null&&this.deletes(a))s="delete",o=bg(a.content.getContent());else return;else a!==null&&this.deletes(a)?(s="update",o=bg(a.content.getContent())):(s="add",o=void 0)}else if(this.deletes(i))s="delete",o=bg(i.content.getContent());else return;t.set(r,{action:s,oldValue:o})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw xa(pS);const n=this.target,r=Fo(),i=Fo(),s=[];if(t={added:r,deleted:i,delta:s,keys:this.keys},this.transaction.changed.get(n).has(null)){let o=null;const a=()=>{o&&s.push(o)};for(let l=n._start;l!==null;l=l.right)l.deleted?this.deletes(l)&&!this.adds(l)&&((o===null||o.delete===void 0)&&(a(),o={delete:0}),o.delete+=l.length,i.add(l)):this.adds(l)?((o===null||o.insert===void 0)&&(a(),o={insert:[]}),o.insert=o.insert.concat(l.content.getContent()),r.add(l)):((o===null||o.retain===void 0)&&(a(),o={retain:0}),o.retain+=l.length);o!==null&&o.retain===void 0&&a()}this._changes=t}return t}}const EY=(e,t)=>{const n=[];for(;t._item!==null&&t!==e;){if(t._item.parentSub!==null)n.unshift(t._item.parentSub);else{let r=0,i=t._item.parent._start;for(;i!==t._item&&i!==null;)!i.deleted&&i.countable&&(r+=i.length),i=i.right;n.unshift(r)}t=t._item.parent}return n},Lr=()=>{LO("Invalid access: Add Yjs type to a document before reading data.")},nx=80;let ry=0;class vY{constructor(t,n){t.marker=!0,this.p=t,this.index=n,this.timestamp=ry++}}const DY=e=>{e.timestamp=ry++},rx=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=ry++},SY=(e,t,n)=>{if(e.length>=nx){const r=e.reduce((i,s)=>i.timestamp{if(e._start===null||t===0||e._searchMarker===null)return null;const n=e._searchMarker.length===0?null:e._searchMarker.reduce((s,o)=>Fp(t-s.index)t;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);return n!==null&&Fp(n.index-i){for(let r=e.length-1;r>=0;r--){const i=e[r];if(n>0){let s=i.p;for(s.marker=!1;s&&(s.deleted||!s.countable);)s=s.left,s&&!s.deleted&&s.countable&&(i.index-=s.length);if(s===null||s.marker===!0){e.splice(r,1);continue}i.p=s,s.marker=!0}(t0&&t===i.index)&&(i.index=hs(t,i.index+n))}},Vm=(e,t,n)=>{const r=e,i=t.changedParentTypes;for(;Wi(i,e,()=>[]).push(n),e._item!==null;)e=e._item.parent;WO(r._eH,n,t)};class Ar{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=iS(),this._dEH=iS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,n){this.doc=t,this._item=n}_copy(){throw ls()}clone(){throw ls()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,n){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){sS(this._eH,t)}observeDeep(t){sS(this._dEH,t)}unobserve(t){oS(this._eH,t)}unobserveDeep(t){oS(this._dEH,t)}toJSON(){}}const ix=(e,t,n)=>{e.doc??Lr(),t<0&&(t=e._length+t),n<0&&(n=e._length+n);let r=n-t;const i=[];let s=e._start;for(;s!==null&&r>0;){if(s.countable&&!s.deleted){const o=s.content.getContent();if(o.length<=t)t-=o.length;else{for(let a=t;a0;a++)i.push(o[a]),r--;t=0}}s=s.right}return i},sx=e=>{e.doc??Lr();const t=[];let n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){const r=n.content.getContent();for(let i=0;i{const n=[];let r=e._start;for(;r!==null;){if(r.countable&&bl(r,t)){const i=r.content.getContent();for(let s=0;s{let n=0,r=e._start;for(e.doc??Lr();r!==null;){if(r.countable&&!r.deleted){const i=r.content.getContent();for(let s=0;s{const n=[];return Id(e,(r,i)=>{n.push(t(r,i,e))}),n},wY=e=>{let t=e._start,n=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};n=t.content.getContent(),r=0,t=t.right}const i=n[r++];return n.length<=r&&(n=null),{done:!1,value:i}}}},lx=(e,t)=>{e.doc??Lr();const n=zm(e,t);let r=e._start;for(n!==null&&(r=n.p,t-=n.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let i=n;const s=e.doc,o=s.clientID,a=s.store,l=n===null?t._start:n.right;let c=[];const u=()=>{c.length>0&&(i=new dn(Dt(o,Gn(a,o)),i,i&&i.lastId,l,l&&l.id,t,null,new zl(c)),i.integrate(e,0),c=[])};r.forEach(d=>{if(d===null)c.push(d);else switch(d.constructor){case Number:case Object:case Boolean:case Array:case String:c.push(d);break;default:switch(u(),d.constructor){case Uint8Array:case ArrayBuffer:i=new dn(Dt(o,Gn(a,o)),i,i&&i.lastId,l,l&&l.id,t,null,new fh(new Uint8Array(d))),i.integrate(e,0);break;case Ua:i=new dn(Dt(o,Gn(a,o)),i,i&&i.lastId,l,l&&l.id,t,null,new mh(d)),i.integrate(e,0);break;default:if(d instanceof Ar)i=new dn(Dt(o,Gn(a,o)),i,i&&i.lastId,l,l&&l.id,t,null,new Gs(d)),i.integrate(e,0);else throw new Error("Unexpected content type in insert operation")}}}),u()},cx=()=>xa("Length exceeded!"),ux=(e,t,n,r)=>{if(n>t._length)throw cx();if(n===0)return t._searchMarker&&Ld(t._searchMarker,n,r.length),Af(e,t,null,r);const i=n,s=zm(t,n);let o=t._start;for(s!==null&&(o=s.p,n-=s.index,n===0&&(o=o.prev,n+=o&&o.countable&&!o.deleted?o.length:0));o!==null;o=o.right)if(!o.deleted&&o.countable){if(n<=o.length){n{let r=(t._searchMarker||[]).reduce((i,s)=>s.index>i.index?s:i,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;return Af(e,t,r,n)},dx=(e,t,n,r)=>{if(r===0)return;const i=n,s=r,o=zm(t,n);let a=t._start;for(o!==null&&(a=o.p,n-=o.index);a!==null&&n>0;a=a.right)!a.deleted&&a.countable&&(n0&&a!==null;)a.deleted||(r0)throw cx();t._searchMarker&&Ld(t._searchMarker,i,-s+r)},bf=(e,t,n)=>{const r=t._map.get(n);r!==void 0&&r.delete(e)},iy=(e,t,n,r)=>{const i=t._map.get(n)||null,s=e.doc,o=s.clientID;let a;if(r==null)a=new zl([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:a=new zl([r]);break;case Uint8Array:a=new fh(r);break;case Ua:a=new mh(r);break;default:if(r instanceof Ar)a=new Gs(r);else throw new Error("Unexpected content type")}new dn(Dt(o,Gn(s.store,o)),i,i&&i.lastId,null,null,t,n,a).integrate(e,0)},sy=(e,t)=>{e.doc??Lr();const n=e._map.get(t);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},hx=e=>{const t={};return e.doc??Lr(),e._map.forEach((n,r)=>{n.deleted||(t[r]=n.content.getContent()[n.length-1])}),t},px=(e,t)=>{e.doc??Lr();const n=e._map.get(t);return n!==void 0&&!n.deleted},CY=(e,t)=>{const n={};return e._map.forEach((r,i)=>{let s=r;for(;s!==null&&(!t.sv.has(s.id.client)||s.id.clock>=(t.sv.get(s.id.client)||0));)s=s.left;s!==null&&bl(s,t)&&(n[i]=s.content.getContent()[s.length-1])}),n},zh=e=>(e.doc??Lr(),U8(e._map.entries(),t=>!t[1].deleted));class NY extends Um{}class ru extends Ar{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const n=new ru;return n.push(t),n}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new ru}clone(){const t=new ru;return t.insert(0,this.toArray().map(n=>n instanceof Ar?n.clone():n)),t}get length(){return this.doc??Lr(),this._length}_callObserver(t,n){super._callObserver(t,n),Vm(this,t,new NY(this,t))}insert(t,n){this.doc!==null?mn(this.doc,r=>{ux(r,this,t,n)}):this._prelimContent.splice(t,0,...n)}push(t){this.doc!==null?mn(this.doc,n=>{_Y(n,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,n=1){this.doc!==null?mn(this.doc,r=>{dx(r,this,t,n)}):this._prelimContent.splice(t,n)}get(t){return lx(this,t)}toArray(){return sx(this)}slice(t=0,n=this.length){return ix(this,t,n)}toJSON(){return this.map(t=>t instanceof Ar?t.toJSON():t)}map(t){return ax(this,t)}forEach(t){Id(this,t)}[Symbol.iterator](){return wY(this)}_write(t){t.writeTypeRef(XY)}}const FY=e=>new ru;class OY extends Um{constructor(t,n,r){super(t,n),this.keysChanged=r}}class Au extends Ar{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,n){super._integrate(t,n),this._prelimContent.forEach((r,i)=>{this.set(i,r)}),this._prelimContent=null}_copy(){return new Au}clone(){const t=new Au;return this.forEach((n,r)=>{t.set(r,n instanceof Ar?n.clone():n)}),t}_callObserver(t,n){Vm(this,t,new OY(this,t,n))}toJSON(){this.doc??Lr();const t={};return this._map.forEach((n,r)=>{if(!n.deleted){const i=n.content.getContent()[n.length-1];t[r]=i instanceof Ar?i.toJSON():i}}),t}get size(){return[...zh(this)].length}keys(){return Sg(zh(this),t=>t[0])}values(){return Sg(zh(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Sg(zh(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??Lr(),this._map.forEach((n,r)=>{n.deleted||t(n.content.getContent()[n.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?mn(this.doc,n=>{bf(n,this,t)}):this._prelimContent.delete(t)}set(t,n){return this.doc!==null?mn(this.doc,r=>{iy(r,this,t,n)}):this._prelimContent.set(t,n),n}get(t){return sy(this,t)}has(t){return px(this,t)}clear(){this.doc!==null?mn(this.doc,t=>{this.forEach(function(n,r,i){bf(t,i,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(eH)}}const xY=e=>new Au,fa=(e,t)=>e===t||typeof e=="object"&&typeof t=="object"&&e&&t&&f8(e,t);class uA{constructor(t,n,r,i){this.left=t,this.right=n,this.index=r,this.currentAttributes=i}forward(){switch(this.right===null&&Ti(),this.right.content.constructor){case er:this.right.deleted||Uu(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const fS=(e,t,n)=>{for(;t.right!==null&&n>0;){switch(t.right.content.constructor){case er:t.right.deleted||Uu(t.currentAttributes,t.right.content);break;default:t.right.deleted||(n{const i=new Map,s=r?zm(t,n):null;if(s){const o=new uA(s.p.left,s.p,s.index,i);return fS(e,o,n-s.index)}else{const o=new uA(null,t._start,0,i);return fS(e,o,n)}},fx=(e,t,n,r)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===er&&fa(r.get(n.right.content.key),n.right.content.value));)n.right.deleted||r.delete(n.right.content.key),n.forward();const i=e.doc,s=i.clientID;r.forEach((o,a)=>{const l=n.left,c=n.right,u=new dn(Dt(s,Gn(i.store,s)),l,l&&l.lastId,c,c&&c.id,t,null,new er(a,o));u.integrate(e,0),n.right=u,n.forward()})},Uu=(e,t)=>{const{key:n,value:r}=t;r===null?e.delete(n):e.set(n,r)},mx=(e,t)=>{for(;e.right!==null&&(e.right.deleted||e.right.content.constructor===er&&fa(t[e.right.content.key]??null,e.right.content.value));)e.forward()},gx=(e,t,n,r)=>{const i=e.doc,s=i.clientID,o=new Map;for(const a in r){const l=r[a],c=n.currentAttributes.get(a)??null;if(!fa(c,l)){o.set(a,c);const{left:u,right:d}=n;n.right=new dn(Dt(s,Gn(i.store,s)),u,u&&u.lastId,d,d&&d.id,t,null,new er(a,l)),n.right.integrate(e,0),n.forward()}}return o},Cg=(e,t,n,r,i)=>{n.currentAttributes.forEach((h,p)=>{i[p]===void 0&&(i[p]=null)});const s=e.doc,o=s.clientID;mx(n,i);const a=gx(e,t,n,i),l=r.constructor===String?new fs(r):r instanceof Ar?new Gs(r):new Ql(r);let{left:c,right:u,index:d}=n;t._searchMarker&&Ld(t._searchMarker,n.index,l.getLength()),u=new dn(Dt(o,Gn(s.store,o)),c,c&&c.lastId,u,u&&u.id,t,null,l),u.integrate(e,0),n.right=u,n.index=d,n.forward(),fx(e,t,n,a)},mS=(e,t,n,r,i)=>{const s=e.doc,o=s.clientID;mx(n,i);const a=gx(e,t,n,i);e:for(;n.right!==null&&(r>0||a.size>0&&(n.right.deleted||n.right.content.constructor===er));){if(!n.right.deleted)switch(n.right.content.constructor){case er:{const{key:l,value:c}=n.right.content,u=i[l];if(u!==void 0){if(fa(u,c))a.delete(l);else{if(r===0)break e;a.set(l,c)}n.right.delete(e)}else n.currentAttributes.set(l,c);break}default:r0){let l="";for(;r>0;r--)l+=` `;n.right=new dn(Dt(o,Gn(s.store,o)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new fs(l)),n.right.integrate(e,0),n.forward()}fx(e,t,n,a)},Tx=(e,t,n,r,i)=>{let s=t;const o=Kr();for(;s&&(!s.countable||s.deleted);){if(!s.deleted&&s.content.constructor===er){const c=s.content;o.set(c.key,c)}s=s.right}let a=0,l=!1;for(;t!==s;){if(n===t&&(l=!0),!t.deleted){const c=t.content;switch(c.constructor){case er:{const{key:u,value:d}=c,h=r.get(u)??null;(o.get(u)!==c||h===d)&&(t.delete(e),a++,!l&&(i.get(u)??null)===d&&h!==d&&(h===null?i.delete(u):i.set(u,h))),!l&&!t.deleted&&Uu(i,c);break}}}t=t.right}return a},kY=(e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===er){const r=t.content.key;n.has(r)?t.delete(e):n.add(r)}t=t.left}},RY=e=>{let t=0;return mn(e.doc,n=>{let r=e._start,i=e._start,s=Kr();const o=tA(s);for(;i;){if(i.deleted===!1)switch(i.content.constructor){case er:Uu(o,i.content);break;default:t+=Tx(n,r,i,s,o),s=tA(o),r=i;break}i=i.right}}),t},MY=e=>{const t=new Set,n=e.doc;for(const[r,i]of e.afterState.entries()){const s=e.beforeState.get(r)||0;i!==s&&XO(e,n.store.clients.get(r),s,i,o=>{!o.deleted&&o.content.constructor===er&&o.constructor!==Pi&&t.add(o.parent)})}mn(n,r=>{Ma(e,e.deleteSet,i=>{if(i instanceof Pi||!i.parent._hasFormatting||t.has(i.parent))return;const s=i.parent;i.content.constructor===er?t.add(s):kY(r,i)});for(const i of t)RY(i)})},gS=(e,t,n)=>{const r=n,i=tA(t.currentAttributes),s=t.right;for(;n>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case Gs:case Ql:case fs:n{i===null?this.childListChanged=!0:this.keysChanged.add(i)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,n=[];mn(t,r=>{const i=new Map,s=new Map;let o=this.target._start,a=null;const l={};let c="",u=0,d=0;const h=()=>{if(a!==null){let p=null;switch(a){case"delete":d>0&&(p={delete:d}),d=0;break;case"insert":(typeof c=="object"||c.length>0)&&(p={insert:c},i.size>0&&(p.attributes={},i.forEach((m,T)=>{m!==null&&(p.attributes[T]=m)}))),c="";break;case"retain":u>0&&(p={retain:u},p8(l)||(p.attributes=u8({},l))),u=0;break}p&&n.push(p),a=null}};for(;o!==null;){switch(o.content.constructor){case Gs:case Ql:this.adds(o)?this.deletes(o)||(h(),a="insert",c=o.content.getContent()[0],h()):this.deletes(o)?(a!=="delete"&&(h(),a="delete"),d+=1):o.deleted||(a!=="retain"&&(h(),a="retain"),u+=1);break;case fs:this.adds(o)?this.deletes(o)||(a!=="insert"&&(h(),a="insert"),c+=o.content.str):this.deletes(o)?(a!=="delete"&&(h(),a="delete"),d+=o.length):o.deleted||(a!=="retain"&&(h(),a="retain"),u+=o.length);break;case er:{const{key:p,value:m}=o.content;if(this.adds(o)){if(!this.deletes(o)){const T=i.get(p)??null;fa(T,m)?m!==null&&o.delete(r):(a==="retain"&&h(),fa(m,s.get(p)??null)?delete l[p]:l[p]=m)}}else if(this.deletes(o)){s.set(p,m);const T=i.get(p)??null;fa(T,m)||(a==="retain"&&h(),l[p]=T)}else if(!o.deleted){s.set(p,m);const T=l[p];T!==void 0&&(fa(T,m)?T!==null&&o.delete(r):(a==="retain"&&h(),m===null?delete l[p]:l[p]=m))}o.deleted||(a==="insert"&&h(),Uu(i,o.content));break}}o=o.right}for(h();n.length>0;){const p=n[n.length-1];if(p.retain!==void 0&&p.attributes===void 0)n.pop();else break}}),this._delta=n}return this._delta}}class Ul extends Ar{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Lr(),this._length}_integrate(t,n){super._integrate(t,n);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Ul}clone(){const t=new Ul;return t.applyDelta(this.toDelta()),t}_callObserver(t,n){super._callObserver(t,n);const r=new BY(this,t,n);Vm(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??Lr();let t="",n=this._start;for(;n!==null;)!n.deleted&&n.countable&&n.content.constructor===fs&&(t+=n.content.str),n=n.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:n=!0}={}){this.doc!==null?mn(this.doc,r=>{const i=new uA(null,this._start,0,new Map);for(let s=0;s0)&&Cg(r,this,i,a,o.attributes||{})}else o.retain!==void 0?mS(r,this,i,o.retain,o.attributes||{}):o.delete!==void 0&&gS(r,i,o.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,n,r){this.doc??Lr();const i=[],s=new Map,o=this.doc;let a="",l=this._start;function c(){if(a.length>0){const d={};let h=!1;s.forEach((m,T)=>{h=!0,d[T]=m});const p={insert:a};h&&(p.attributes=d),i.push(p),a=""}}const u=()=>{for(;l!==null;){if(bl(l,t)||n!==void 0&&bl(l,n))switch(l.content.constructor){case fs:{const d=s.get("ychange");t!==void 0&&!bl(l,t)?(d===void 0||d.user!==l.id.client||d.type!=="removed")&&(c(),s.set("ychange",r?r("removed",l.id):{type:"removed"})):n!==void 0&&!bl(l,n)?(d===void 0||d.user!==l.id.client||d.type!=="added")&&(c(),s.set("ychange",r?r("added",l.id):{type:"added"})):d!==void 0&&(c(),s.delete("ychange")),a+=l.content.str;break}case Gs:case Ql:{c();const d={insert:l.content.getContent()[0]};if(s.size>0){const h={};d.attributes=h,s.forEach((p,m)=>{h[m]=p})}i.push(d);break}case er:bl(l,t)&&(c(),Uu(s,l.content));break}l=l.right}c()};return t||n?mn(o,d=>{t&&lA(d,t),n&&lA(d,n),u()},"cleanup"):u(),i}insert(t,n,r){if(n.length<=0)return;const i=this.doc;i!==null?mn(i,s=>{const o=Vh(s,this,t,!r);r||(r={},o.currentAttributes.forEach((a,l)=>{r[l]=a})),Cg(s,this,o,n,r)}):this._pending.push(()=>this.insert(t,n,r))}insertEmbed(t,n,r){const i=this.doc;i!==null?mn(i,s=>{const o=Vh(s,this,t,!r);Cg(s,this,o,n,r||{})}):this._pending.push(()=>this.insertEmbed(t,n,r||{}))}delete(t,n){if(n===0)return;const r=this.doc;r!==null?mn(r,i=>{gS(i,Vh(i,this,t,!0),n)}):this._pending.push(()=>this.delete(t,n))}format(t,n,r){if(n===0)return;const i=this.doc;i!==null?mn(i,s=>{const o=Vh(s,this,t,!1);o.right!==null&&mS(s,this,o,n,r)}):this._pending.push(()=>this.format(t,n,r))}removeAttribute(t){this.doc!==null?mn(this.doc,n=>{bf(n,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,n){this.doc!==null?mn(this.doc,r=>{iy(r,this,t,n)}):this._pending.push(()=>this.setAttribute(t,n))}getAttribute(t){return sy(this,t)}getAttributes(){return hx(this)}_write(t){t.writeTypeRef(tH)}}const LY=e=>new Ul;class Ng{constructor(t,n=()=>!0){this._filter=n,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??Lr()}[Symbol.iterator](){return this}next(){let t=this._currentNode,n=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(n)))do if(n=t.content.type,!t.deleted&&(n.constructor===qr||n.constructor===Ba)&&n._start!==null)t=n._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ba extends Ar{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ba}clone(){const t=new Ba;return t.insert(0,this.toArray().map(n=>n instanceof Ar?n.clone():n)),t}get length(){return this.doc??Lr(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Ng(this,t)}querySelector(t){t=t.toUpperCase();const n=new Ng(this,r=>r.nodeName&&r.nodeName.toUpperCase()===t).next();return n.done?null:n.value}querySelectorAll(t){return t=t.toUpperCase(),Oo(new Ng(this,n=>n.nodeName&&n.nodeName.toUpperCase()===t))}_callObserver(t,n){Vm(this,t,new HY(this,n,t))}toString(){return ax(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,n={},r){const i=t.createDocumentFragment();return r!==void 0&&r._createAssociation(i,this),Id(this,s=>{i.insertBefore(s.toDOM(t,n,r),null)}),i}insert(t,n){this.doc!==null?mn(this.doc,r=>{ux(r,this,t,n)}):this._prelimContent.splice(t,0,...n)}insertAfter(t,n){if(this.doc!==null)mn(this.doc,r=>{const i=t&&t instanceof Ar?t._item:t;Af(r,this,i,n)});else{const r=this._prelimContent,i=t===null?0:r.findIndex(s=>s===t)+1;if(i===0&&t!==null)throw xa("Reference item not found");r.splice(i,0,...n)}}delete(t,n=1){this.doc!==null?mn(this.doc,r=>{dx(r,this,t,n)}):this._prelimContent.splice(t,n)}toArray(){return sx(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return lx(this,t)}slice(t=0,n=this.length){return ix(this,t,n)}forEach(t){Id(this,t)}_write(t){t.writeTypeRef(rH)}}const IY=e=>new Ba;class qr extends Ba{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,n){super._integrate(t,n),this._prelimAttrs.forEach((r,i)=>{this.setAttribute(i,r)}),this._prelimAttrs=null}_copy(){return new qr(this.nodeName)}clone(){const t=new qr(this.nodeName),n=this.getAttributes();return d8(n,(r,i)=>{typeof r=="string"&&t.setAttribute(i,r)}),t.insert(0,this.toArray().map(r=>r instanceof Ar?r.clone():r)),t}toString(){const t=this.getAttributes(),n=[],r=[];for(const a in t)r.push(a);r.sort();const i=r.length;for(let a=0;a0?" "+n.join(" "):"";return`<${s}${o}>${super.toString()}`}removeAttribute(t){this.doc!==null?mn(this.doc,n=>{bf(n,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,n){this.doc!==null?mn(this.doc,r=>{iy(r,this,t,n)}):this._prelimAttrs.set(t,n)}getAttribute(t){return sy(this,t)}hasAttribute(t){return px(this,t)}getAttributes(t){return t?CY(this,t):hx(this)}toDOM(t=document,n={},r){const i=t.createElement(this.nodeName),s=this.getAttributes();for(const o in s){const a=s[o];typeof a=="string"&&i.setAttribute(o,a)}return Id(this,o=>{i.appendChild(o.toDOM(t,n,r))}),r!==void 0&&r._createAssociation(i,this),i}_write(t){t.writeTypeRef(nH),t.writeKey(this.nodeName)}}const YY=e=>new qr(e.readKey());class HY extends Um{constructor(t,n,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,n.forEach(i=>{i===null?this.childListChanged=!0:this.attributesChanged.add(i)})}}class yf extends Au{constructor(t){super(),this.hookName=t}_copy(){return new yf(this.hookName)}clone(){const t=new yf(this.hookName);return this.forEach((n,r)=>{t.set(r,n)}),t}toDOM(t=document,n={},r){const i=n[this.hookName];let s;return i!==void 0?s=i.createDom(this):s=document.createElement(this.hookName),s.setAttribute("data-yjs-hook",this.hookName),r!==void 0&&r._createAssociation(s,this),s}_write(t){t.writeTypeRef(iH),t.writeKey(this.hookName)}}const ZY=e=>new yf(e.readKey());class hi extends Ul{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new hi}clone(){const t=new hi;return t.applyDelta(this.toDelta()),t}toDOM(t=document,n,r){const i=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(i,this),i}toString(){return this.toDelta().map(t=>{const n=[];for(const i in t.attributes){const s=[];for(const o in t.attributes[i])s.push({key:o,value:t.attributes[i][o]});s.sort((o,a)=>o.keyi.nodeName=0;i--)r+=``;return r}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(sH)}}const PY=e=>new hi;class oy{constructor(t,n){this.id=t,this.length=n}get deleted(){throw ls()}mergeWith(t){return!1}write(t,n,r){throw ls()}integrate(t,n){throw ls()}}const $Y=0;class Pi extends oy{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){n>0&&(this.id.clock+=n,this.length-=n),JO(t.doc.store,this)}write(t,n){t.writeInfo($Y),t.writeLen(this.length-n)}getMissing(t,n){return null}}class fh{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new fh(this.content)}splice(t){throw ls()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeBuf(this.content)}getRef(){return 3}}const UY=e=>new fh(e.readBuf());class Yd{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new Yd(this.len)}splice(t){const n=new Yd(this.len-t);return this.len=t,n}mergeWith(t){return this.len+=t.len,!0}integrate(t,n){kd(t.deleteSet,n.id.client,n.id.clock,this.len),n.markDeleted()}delete(t){}gc(t){}write(t,n){t.writeLen(this.len-n)}getRef(){return 1}}const zY=e=>new Yd(e.readLen()),Ax=(e,t)=>new Ua({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class mh{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const n={};this.opts=n,t.gc||(n.gc=!1),t.autoLoad&&(n.autoLoad=!0),t.meta!==null&&(n.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new mh(Ax(this.doc.guid,this.opts))}splice(t){throw ls()}mergeWith(t){return!1}integrate(t,n){this.doc._item=n,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,n){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const VY=e=>new mh(Ax(e.readString(),e.readAny()));class Ql{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Ql(this.embed)}splice(t){throw ls()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeJSON(this.embed)}getRef(){return 5}}const jY=e=>new Ql(e.readJSON());class er{constructor(t,n){this.key=t,this.value=n}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new er(this.key,this.value)}splice(t){throw ls()}mergeWith(t){return!1}integrate(t,n){const r=n.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,n){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const GY=e=>new er(e.readKey(),e.readJSON());class Ef{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Ef(this.arr)}splice(t){const n=new Ef(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){const r=this.arr.length;t.writeLen(r-n);for(let i=n;i{const t=e.readLen(),n=[];for(let r=0;r{const t=e.readLen(),n=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+"�",n.str="�"+n.str.slice(1)),n}mergeWith(t){return this.str+=t.str,!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeString(n===0?this.str:this.str.slice(n))}getRef(){return 4}}const QY=e=>new fs(e.readString()),JY=[FY,xY,LY,YY,IY,ZY,PY],XY=0,eH=1,tH=2,nH=3,rH=4,iH=5,sH=6;class Gs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new Gs(this.type._copy())}splice(t){throw ls()}mergeWith(t){return!1}integrate(t,n){this.type._integrate(t.doc,n)}delete(t){let n=this.type._start;for(;n!==null;)n.deleted?n.id.clock<(t.beforeState.get(n.id.client)||0)&&t._mergeStructs.push(n):n.delete(t),n=n.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let n=this.type._start;for(;n!==null;)n.gc(t,!0),n=n.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,n){this.type._write(t)}getRef(){return 7}}const oH=e=>new Gs(JY[e.readTypeRef()](e)),dA=(e,t)=>{let n=t,r=0,i;do r>0&&(n=Dt(n.client,n.clock+r)),i=nu(e,n),r=n.clock-i.id.clock,n=i.redone;while(n!==null&&i instanceof dn);return{item:i,diff:r}},ay=(e,t)=>{for(;e!==null&&e.keep!==t;)e.keep=t,e=e.parent._item},vf=(e,t,n)=>{const{client:r,clock:i}=t.id,s=new dn(Dt(r,i+n),t,Dt(r,i+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&s.markDeleted(),t.keep&&(s.keep=!0),t.redone!==null&&(s.redone=Dt(t.redone.client,t.redone.clock+n)),t.right=s,s.right!==null&&(s.right.left=s),e._mergeStructs.push(s),s.parentSub!==null&&s.right===null&&s.parent._map.set(s.parentSub,s),t.length=n,s},TS=(e,t)=>v7(e,n=>Pu(n.deletions,t)),bx=(e,t,n,r,i,s)=>{const o=e.doc,a=o.store,l=o.clientID,c=t.redone;if(c!==null)return li(e,c);let u=t.parent._item,d=null,h;if(u!==null&&u.deleted===!0){if(u.redone===null&&(!n.has(u)||bx(e,u,n,r,i,s)===null))return null;for(;u.redone!==null;)u=li(e,u.redone)}const p=u===null?t.parent:u.content.type;if(t.parentSub===null){for(d=t.left,h=t;d!==null;){let D=d;for(;D!==null&&D.parent._item!==u;)D=D.redone===null?null:li(e,D.redone);if(D!==null&&D.parent._item===u){d=D;break}d=d.left}for(;h!==null;){let D=h;for(;D!==null&&D.parent._item!==u;)D=D.redone===null?null:li(e,D.redone);if(D!==null&&D.parent._item===u){h=D;break}h=h.right}}else if(h=null,t.right&&!i){for(d=t;d!==null&&d.right!==null&&(d.right.redone||Pu(r,d.right.id)||TS(s.undoStack,d.right.id)||TS(s.redoStack,d.right.id));)for(d=d.right;d.redone;)d=li(e,d.redone);if(d&&d.right!==null)return null}else d=p._map.get(t.parentSub)||null;const m=Gn(a,l),T=Dt(l,m),b=new dn(T,d,d&&d.lastId,h,h&&h.id,p,t.parentSub,t.content.copy());return t.redone=T,ay(b,!0),b.integrate(e,0),b};class dn extends oy{constructor(t,n,r,i,s,o,a,l){super(t,l.getLength()),this.origin=r,this.left=n,this.right=i,this.rightOrigin=s,this.parent=o,this.parentSub=a,this.redone=null,this.content=l,this.info=this.content.isCountable()?jD:0}set marker(t){(this.info&Eg)>0!==t&&(this.info^=Eg)}get marker(){return(this.info&Eg)>0}get keep(){return(this.info&VD)>0}set keep(t){this.keep!==t&&(this.info^=VD)}get countable(){return(this.info&jD)>0}get deleted(){return(this.info&yg)>0}set deleted(t){this.deleted!==t&&(this.info^=yg)}markDeleted(){this.info|=yg}getMissing(t,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=Gn(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=Gn(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===tu&&this.id.client!==this.parent.client&&this.parent.clock>=Gn(n,this.parent.client))return this.parent.client;if(this.origin&&(this.left=lS(t,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=li(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===Pi||this.right&&this.right.constructor===Pi)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===dn?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===dn&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===tu){const r=nu(n,this.parent);r.constructor===Pi?this.parent=null:this.parent=r.content.type}return null}integrate(t,n){if(n>0&&(this.id.clock+=n,this.left=lS(t,t.doc.store,Dt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(n),this.length-=n),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,i;if(r!==null)i=r.right;else if(this.parentSub!==null)for(i=this.parent._map.get(this.parentSub)||null;i!==null&&i.left!==null;)i=i.left;else i=this.parent._start;const s=new Set,o=new Set;for(;i!==null&&i!==this.right;){if(o.add(i),s.add(i),Vc(this.origin,i.origin)){if(i.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const n=this.parent;this.countable&&this.parentSub===null&&(n._length-=this.length),this.markDeleted(),kd(t.deleteSet,this.id.client,this.id.clock,this.length),uS(t,n,this.parentSub),this.content.delete(t)}}gc(t,n){if(!this.deleted)throw Ti();this.content.gc(t),n?cY(t,this,new Pi(this.id,this.length)):this.content=new Yd(this.length)}write(t,n){const r=n>0?Dt(this.id.client,this.id.clock+n-1):this.origin,i=this.rightOrigin,s=this.parentSub,o=this.content.getRef()&Zm|(r===null?0:Qr)|(i===null?0:wo)|(s===null?0:Fd);if(t.writeInfo(o),r!==null&&t.writeLeftID(r),i!==null&&t.writeRightID(i),r===null&&i===null){const a=this.parent;if(a._item!==void 0){const l=a._item;if(l===null){const c=Rd(a);t.writeParentInfo(!0),t.writeString(c)}else t.writeParentInfo(!1),t.writeLeftID(l.id)}else a.constructor===String?(t.writeParentInfo(!0),t.writeString(a)):a.constructor===tu?(t.writeParentInfo(!1),t.writeLeftID(a)):Ti();s!==null&&t.writeString(s)}this.content.write(t,n)}}const yx=(e,t)=>aH[t&Zm](e),aH=[()=>{Ti()},zY,qY,UY,QY,jY,GY,oH,KY,VY,()=>{Ti()}],lH=10;class $i extends oy{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){Ti()}write(t,n){t.writeInfo(lH),st(t.restEncoder,this.length-n)}getMissing(t,n){return null}}const AS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof xv<"u"?xv:{},bS="__ $YJS$ __";AS[bS]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"),AS[bS]=!0;const Fg=3e4;class cH extends TO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const n=ka();this.getLocalState()!==null&&Fg/2<=n-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((i,s)=>{s!==this.clientID&&Fg<=n-i.lastUpdated&&this.states.has(s)&&r.push(s)}),r.length>0&&ly(this,r,"timeout")},$s(Fg/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const n=this.clientID,r=this.meta.get(n),i=r===void 0?0:r.clock+1,s=this.states.get(n);t===null?this.states.delete(n):this.states.set(n,t),this.meta.set(n,{clock:i,lastUpdated:ka()});const o=[],a=[],l=[],c=[];t===null?c.push(n):s==null?t!=null&&o.push(n):(a.push(n),X0(s,t)||l.push(n)),(o.length>0||l.length>0||c.length>0)&&this.emit("change",[{added:o,updated:l,removed:c},"local"]),this.emit("update",[{added:o,updated:a,removed:c},"local"])}setLocalStateField(t,n){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:n})}getStates(){return this.states}}const ly=(e,t,n)=>{const r=[];for(let i=0;i0&&(e.emit("change",[{added:[],updated:[],removed:r},n]),e.emit("update",[{added:[],updated:[],removed:r},n]))},td=(e,t,n=e.states)=>{const r=t.length,i=hr();st(i,r);for(let s=0;s{const r=Ro(t),i=ka(),s=[],o=[],a=[],l=[],c=yt(r);for(let u=0;u0||a.length>0||l.length>0)&&e.emit("change",[{added:s,updated:a,removed:l},n]),(s.length>0||o.length>0||l.length>0)&&e.emit("update",[{added:s,updated:o,removed:l},n])},dH=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else n!==void 0&&n()}},hH=/[\uD800-\uDBFF]/,pH=/[\uDC00-\uDFFF]/,fH=(e,t)=>{let n=0,r=0;for(;n0&&hH.test(e[n-1])&&n--;r+n0&&pH.test(e[e.length-r])&&r--,{index:n,remove:e.length-n-r,insert:t.slice(n,t.length-r)}},mH=fH,ir=new Vt("y-sync"),gH=new Vt("y-undo"),jh=new Vt("yjs-cursor"),Ls=(e,t)=>e>>>t|e<<32-t,TH=e=>Ls(e,2)^Ls(e,13)^Ls(e,22),AH=e=>Ls(e,6)^Ls(e,11)^Ls(e,25),bH=e=>Ls(e,7)^Ls(e,18)^e>>>3,yH=e=>Ls(e,17)^Ls(e,19)^e>>>10,EH=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),vH=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);class DH{constructor(){const t=new ArrayBuffer(320);this._H=new Uint32Array(t,0,8),this._H.set(vH),this._W=new Uint32Array(t,64,64)}_updateHash(){const t=this._H,n=this._W;for(let d=16;d<64;d++)n[d]=yH(n[d-2])+n[d-7]+bH(n[d-15])+n[d-16];let r=t[0],i=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=t[6],u=t[7];for(let d=0,h,p;d<64;d++)h=u+AH(a)+(a&l^~a&c)+EH[d]+n[d]>>>0,p=TH(r)+(r&i^r&s^i&s)>>>0,u=c,c=l,l=a,a=o+h>>>0,o=s,s=i,i=r,r=h+p>>>0;t[0]+=r,t[1]+=i,t[2]+=s,t[3]+=o,t[4]+=a,t[5]+=l,t[6]+=c,t[7]+=u}digest(t){let n=0;for(;n+56<=t.length;){let o=0;for(;o<16&&n+3=0&&n>>(3-a)*8;return s}}const SH=e=>new DH().digest(e),wH=e=>{for(let t=6;tVb(wH(SH(N8(e)))),Df=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&t.sv.get(e.id.client)>e.id.clock&&!Pu(t.ds,e.id),CH=[{light:"#ecd44433",dark:"#ecd444"}],NH=(e,t,n)=>{if(!e.has(n)){if(e.sizer.add(i)),t=t.filter(i=>!r.has(i))}e.set(n,r8(t))}return e.get(n)},GAe=(e,{colors:t=CH,colorMapping:n=new Map,permanentUserData:r=null,onFirstRender:i=()=>{},mapping:s}={})=>{let o=!1;const a=new OH(e,s),l=new Mt({props:{editable:c=>{const u=ir.getState(c);return u.snapshot==null&&u.prevSnapshot==null}},key:ir,state:{init:(c,u)=>({type:e,doc:e.doc,binding:a,snapshot:null,prevSnapshot:null,isChangeOrigin:!1,isUndoRedoOperation:!1,addToHistory:!0,colors:t,colorMapping:n,permanentUserData:r}),apply:(c,u)=>{const d=c.getMeta(ir);if(d!==void 0){u=Object.assign({},u);for(const h in d)u[h]=d[h]}return u.addToHistory=c.getMeta("addToHistory")!==!1,u.isChangeOrigin=d!==void 0&&!!d.isChangeOrigin,u.isUndoRedoOperation=d!==void 0&&!!d.isChangeOrigin&&!!d.isUndoRedoOperation,a.prosemirrorView!==null&&d!==void 0&&(d.snapshot!=null||d.prevSnapshot!=null)&&jb(0,()=>{a.prosemirrorView!=null&&(d.restore==null?a._renderSnapshot(d.snapshot,d.prevSnapshot,u):(a._renderSnapshot(d.snapshot,d.snapshot,u),delete u.restore,delete u.snapshot,delete u.prevSnapshot,a.mux(()=>{a._prosemirrorChanged(a.prosemirrorView.state.doc)})))}),u}},view:c=>(a.initView(c),s==null&&a._forceRerender(),i(),{update:()=>{const u=l.getState(c.state);if(u.snapshot==null&&u.prevSnapshot==null&&(o||c.state.doc.content.findDiffStart(c.state.doc.type.createAndFill().content)!==null)){if(o=!0,u.addToHistory===!1&&!u.isChangeOrigin){const d=gH.getState(c.state),h=d&&d.undoManager;h&&h.stopCapturing()}a.mux(()=>{u.doc.transact(d=>{d.meta.set("addToHistory",u.addToHistory),a._prosemirrorChanged(c.state.doc)},ir)})}},destroy:()=>{a.destroy()}})});return l},FH=(e,t,n)=>{if(t!==null&&t.anchor!==null&&t.head!==null)if(t.type==="all")e.setSelection(new ui(e.doc));else if(t.type==="node"){const r=iu(n.doc,n.type,t.anchor,n.mapping);e.setSelection(Je.create(e.doc,r))}else{const r=iu(n.doc,n.type,t.anchor,n.mapping),i=iu(n.doc,n.type,t.head,n.mapping);if(r!==null&&i!==null){const s=Xe.between(e.doc.resolve(r),e.doc.resolve(i));e.setSelection(s)}}},yS=(e,t)=>({type:t.selection.jsonID,anchor:_f(t.selection.anchor,e.type,e.mapping),head:_f(t.selection.head,e.type,e.mapping)});class OH{constructor(t,n=new Map){this.type=t,this.prosemirrorView=null,this.mux=dH(),this.mapping=n,this.isOMark=new Map,this._observeFunction=this._typeChanged.bind(this),this.doc=t.doc,this.beforeTransactionSelection=null,this.beforeAllTransactions=()=>{this.beforeTransactionSelection===null&&this.prosemirrorView!=null&&(this.beforeTransactionSelection=yS(this,this.prosemirrorView.state))},this.afterAllTransactions=()=>{this.beforeTransactionSelection=null},this._domSelectionInView=null}get _tr(){return this.prosemirrorView.state.tr.setMeta("addToHistory",!1)}_isLocalCursorInView(){return this.prosemirrorView.hasFocus()?(zb&&this._domSelectionInView===null&&(jb(0,()=>{this._domSelectionInView=null}),this._domSelectionInView=this._isDomSelectionInView()),this._domSelectionInView):!1}_isDomSelectionInView(){const t=this.prosemirrorView._root.getSelection();if(t==null||t.anchorNode==null)return!1;const n=this.prosemirrorView._root.createRange();n.setStart(t.anchorNode,t.anchorOffset),n.setEnd(t.focusNode,t.focusOffset),n.getClientRects().length===0&&n.startContainer&&n.collapsed&&n.selectNodeContents(n.startContainer);const r=n.getBoundingClientRect(),i=O8.documentElement;return r.bottom>=0&&r.right>=0&&r.left<=(window.innerWidth||i.clientWidth||0)&&r.top<=(window.innerHeight||i.clientHeight||0)}renderSnapshot(t,n){n||(n=KO(HO(),new Map)),this.prosemirrorView.dispatch(this._tr.setMeta(ir,{snapshot:t,prevSnapshot:n}))}unrenderSnapshot(){this.mapping.clear(),this.mux(()=>{const t=this.type.toArray().map(r=>Rp(r,this.prosemirrorView.state.schema,this)).filter(r=>r!==null),n=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new Ce(ue.from(t),0,0));n.setMeta(ir,{snapshot:null,prevSnapshot:null}),this.prosemirrorView.dispatch(n)})}_forceRerender(){this.mapping.clear(),this.mux(()=>{const t=this.beforeTransactionSelection!==null?null:this.prosemirrorView.state.selection,n=this.type.toArray().map(i=>Rp(i,this.prosemirrorView.state.schema,this)).filter(i=>i!==null),r=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new Ce(ue.from(n),0,0));if(t){const i=Bs(hs(t.anchor,0),r.doc.content.size),s=Bs(hs(t.head,0),r.doc.content.size);r.setSelection(Xe.create(r.doc,i,s))}this.prosemirrorView.dispatch(r.setMeta(ir,{isChangeOrigin:!0,binding:this}))})}_renderSnapshot(t,n,r){let i=this.doc,s=this.type;if(t||(t=_g(this.doc)),t instanceof Uint8Array||n instanceof Uint8Array)if((!(t instanceof Uint8Array)||!(n instanceof Uint8Array))&&Ti(),i=new Ua({gc:!1}),gf(i,n),n=_g(i),gf(i,t),t=_g(i),s._item===null){const o=Array.from(this.doc.share.keys()).find(a=>this.doc.share.get(a)===this.type);s=i.getXmlFragment(o)}else{const o=i.store.clients.get(s._item.id.client)??[],a=ps(o,s._item.id.clock);s=o[a].content.type}this.mapping.clear(),this.mux(()=>{i.transact(o=>{const a=r.permanentUserData;a&&a.dss.forEach(d=>{Ma(o,d,h=>{})});const l=(d,h)=>{const p=d==="added"?a.getUserByClientId(h.client):a.getUserByDeletedId(h);return{user:p,type:d,color:NH(r.colorMapping,r.colors,p)}},c=ox(s,new Xb(n.ds,t.sv)).map(d=>!d._item.deleted||Df(d._item,t)||Df(d._item,n)?Rp(d,this.prosemirrorView.state.schema,{mapping:new Map,isOMark:new Map},t,n,l):null).filter(d=>d!==null),u=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new Ce(ue.from(c),0,0));this.prosemirrorView.dispatch(u.setMeta(ir,{isChangeOrigin:!0}))},ir)})}_typeChanged(t,n){if(this.prosemirrorView==null)return;const r=ir.getState(this.prosemirrorView.state);if(t.length===0||r.snapshot!=null||r.prevSnapshot!=null){this.renderSnapshot(r.snapshot,r.prevSnapshot);return}this.mux(()=>{const i=(a,l)=>this.mapping.delete(l);Ma(n,n.deleteSet,a=>{if(a.constructor===dn){const l=a.content.type;l&&this.mapping.delete(l)}}),n.changed.forEach(i),n.changedParentTypes.forEach(i);const s=this.type.toArray().map(a=>Ex(a,this.prosemirrorView.state.schema,this)).filter(a=>a!==null);let o=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new Ce(ue.from(s),0,0));FH(o,this.beforeTransactionSelection,this),o=o.setMeta(ir,{isChangeOrigin:!0,isUndoRedoOperation:n.origin instanceof fY}),this.beforeTransactionSelection!==null&&this._isLocalCursorInView()&&o.scrollIntoView(),this.prosemirrorView.dispatch(o)})}_prosemirrorChanged(t){this.doc.transact(()=>{wf(this.doc,this.type,t,this),this.beforeTransactionSelection=yS(this,this.prosemirrorView.state)},ir)}initView(t){this.prosemirrorView!=null&&this.destroy(),this.prosemirrorView=t,this.doc.on("beforeAllTransactions",this.beforeAllTransactions),this.doc.on("afterAllTransactions",this.afterAllTransactions),this.type.observeDeep(this._observeFunction)}destroy(){this.prosemirrorView!=null&&(this.prosemirrorView=null,this.type.unobserveDeep(this._observeFunction),this.doc.off("beforeAllTransactions",this.beforeAllTransactions),this.doc.off("afterAllTransactions",this.afterAllTransactions))}}const Ex=(e,t,n,r,i,s)=>{const o=n.mapping.get(e);if(o===void 0){if(e instanceof qr)return Rp(e,t,n,r,i,s);throw ls()}return o},Rp=(e,t,n,r,i,s)=>{const o=[],a=l=>{if(l instanceof qr){const c=Ex(l,t,n,r,i,s);c!==null&&o.push(c)}else{const c=l._item.right?.content?.type;c instanceof Ul&&!c._item.deleted&&c._item.id.client===c.doc.clientID&&(l.applyDelta([{retain:l.length},...c.toDelta()]),c.doc.transact(d=>{c._item.delete(d)}));const u=xH(l,t,n,r,i,s);u!==null&&u.forEach(d=>{d!==null&&o.push(d)})}};r===void 0||i===void 0?e.toArray().forEach(a):ox(e,new Xb(i.ds,r.sv)).forEach(a);try{const l=e.getAttributes(r);r!==void 0&&(Df(e._item,r)?Df(e._item,i)||(l.ychange=s?s("added",e._item.id):{type:"added"}):l.ychange=s?s("removed",e._item.id):{type:"removed"});const c=t.node(e.nodeName,l,o);return n.mapping.set(e,c),c}catch{return e.doc.transact(l=>{e._item.delete(l)},ir),n.mapping.delete(e),null}},xH=(e,t,n,r,i,s)=>{const o=[],a=e.toDelta(r,i,s);try{for(let l=0;l{e._item.delete(l)},ir),null}return o},kH=(e,t)=>{const n=new hi,r=e.map(i=>({insert:i.text,attributes:Dx(i.marks,t)}));return n.applyDelta(r),t.mapping.set(n,e),n},RH=(e,t)=>{const n=new qr(e.type.name);for(const r in e.attrs){const i=e.attrs[r];i!==null&&r!=="ychange"&&n.setAttribute(r,i)}return n.insert(0,jm(e).map(r=>hA(r,t))),t.mapping.set(n,e),n},hA=(e,t)=>e instanceof Array?kH(e,t):RH(e,t),ES=e=>typeof e=="object"&&e!==null,cy=(e,t)=>{const n=Object.keys(e).filter(i=>e[i]!==null);let r=n.length===(t==null?0:Object.keys(t).filter(i=>t[i]!==null).length);for(let i=0;i{const t=e.content.content,n=[];for(let r=0;r{const n=e.toDelta();return n.length===t.length&&n.every((r,i)=>r.insert===t[i].text&&$b(r.attributes||{}).length===t[i].marks.length&&wO(r.attributes,(s,o)=>{const a=uy(o),l=t[i].marks;return cy(s,l.find(c=>c.type.name===a)?.attrs)}))},Hd=(e,t)=>{if(e instanceof qr&&!(t instanceof Array)&&pA(e,t)){const n=jm(t);return e._length===n.length&&cy(e.getAttributes(),t.attrs)&&e.toArray().every((r,i)=>Hd(r,n[i]))}return e instanceof hi&&t instanceof Array&&vx(e,t)},Sf=(e,t)=>e===t||e instanceof Array&&t instanceof Array&&e.length===t.length&&e.every((n,r)=>t[r]===n),vS=(e,t,n)=>{const r=e.toArray(),i=jm(t),s=i.length,o=r.length,a=Bs(o,s);let l=0,c=0,u=!1;for(;l{let t="",n=e._start;const r={};for(;n!==null;)n.deleted||(n.countable&&n.content instanceof fs?t+=n.content.str:n.content instanceof er&&(r[n.content.key]=null)),n=n.right;return{str:t,nAttrs:r}},BH=(e,t,n)=>{n.mapping.set(e,t);const{nAttrs:r,str:i}=MH(e),s=t.map(c=>({insert:c.text,attributes:Object.assign({},r,Dx(c.marks,n))})),{insert:o,remove:a,index:l}=mH(i,s.map(c=>c.insert).join(""));e.delete(l,a),e.insert(l,o),e.applyDelta(s.map(c=>({retain:c.insert.length,attributes:c.attributes})))},LH=/(.*)(--[a-zA-Z0-9+/=]{8})$/,uy=e=>LH.exec(e)?.[1]??e,IH=(e,t)=>{const n=[];for(const r in e)n.push(t.mark(uy(r),e[r]));return n},Dx=(e,t)=>{const n={};return e.forEach(r=>{if(r.type.name!=="ychange"){const i=Wi(t.isOMark,r.type,()=>!r.type.excludes(r.type));n[i?`${r.type.name}--${_H(r.toJSON())}`:r.type.name]=r.attrs}}),n},wf=(e,t,n,r)=>{if(t instanceof qr&&t.nodeName!==n.type.name)throw new Error("node name mismatch!");if(r.mapping.set(t,n),t instanceof qr){const d=t.getAttributes(),h=n.attrs;for(const p in h)h[p]!==null?d[p]!==h[p]&&p!=="ychange"&&t.setAttribute(p,h[p]):t.removeAttribute(p);for(const p in d)h[p]===void 0&&t.removeAttribute(p)}const i=jm(n),s=i.length,o=t.toArray(),a=o.length,l=Bs(s,a);let c=0,u=0;for(;c{for(;a-c-u>0&&s-c-u>0;){const h=o[c],p=i[c],m=o[a-u-1],T=i[s-u-1];if(h instanceof hi&&p instanceof Array)vx(h,p)||BH(h,p,r),c+=1;else{let b=h instanceof qr&&pA(h,p),D=m instanceof qr&&pA(m,T);if(b&&D){const v=vS(h,p,r),C=vS(m,T,r);v.foundMappedChild&&!C.foundMappedChild?D=!1:!v.foundMappedChild&&C.foundMappedChild||v.equalityFactor0&&(t.slice(c,c+d).forEach(h=>r.mapping.delete(h)),t.delete(c,d)),c+u!(t instanceof Array)&&e.nodeName===t.type.name;let nd=null;const YH=()=>{const e=nd;nd=null,e.forEach((t,n)=>{const r=n.state.tr,i=ir.getState(n.state);i&&i.binding&&!i.binding.isDestroyed&&(t.forEach((s,o)=>{r.setMeta(o,s)}),n.dispatch(r))})},HH=(e,t,n)=>{nd||(nd=new Map,jb(0,YH)),Wi(nd,e,Kr).set(t,n)},_f=(e,t,n)=>{if(e===0)return wg(t,0,t.length===0?-1:0);let r=t._first===null?null:t._first.content.type;for(;r!==null&&t!==r;){if(r instanceof hi){if(r._length>=e)return wg(r,e,t.length===0?-1:0);if(e-=r._length,r._item!==null&&r._item.next!==null)r=r._item.next.content.type;else{do r=r._item===null?null:r._item.parent,e--;while(r!==t&&r!==null&&r._item!==null&&r._item.next===null);r!==null&&r!==t&&(r=r._item===null?null:r._item.next.content.type)}}else{const i=(n.get(r)||{nodeSize:0}).nodeSize;if(r._first!==null&&e1)return new Bd(r._item===null?null:r._item.id,r._item===null?Rd(r):null,null);if(e-=i,r._item!==null&&r._item.next!==null)r=r._item.next.content.type;else{if(e===0)return r=r._item===null?r:r._item.parent,new Bd(r._item===null?null:r._item.id,r._item===null?Rd(r):null,null);do r=r._item.parent,e--;while(r!==t&&r._item.next===null);r!==t&&(r=r._item.next.content.type)}}}if(r===null)throw Ti();if(e===0&&r.constructor!==hi&&r!==t)return ZH(r._item.parent,r._item)}return wg(t,t._length,t.length===0?-1:0)},ZH=(e,t)=>{let n=null,r=null;return e._item===null?r=Rd(e):n=Dt(e._item.id.client,e._item.id.clock),new Bd(n,r,t.id)},iu=(e,t,n,r)=>{const i=aY(n,e);if(i===null||i.type!==t&&!Md(t,i.type._item))return null;let s=i.type,o=0;if(s.constructor===hi)o=i.index;else if(s._item===null||!s._item.deleted){let a=s._first,l=0;for(;li(void 0)};return wf(r,n,e,{mapping:new Map,isOMark:new Map}),n}function WAe(e){const t=e.toArray(),n=r=>{let i;if(r instanceof hi)i=r.toDelta().map(s=>{const o={type:"text",text:s.insert};return s.attributes&&(o.marks=Object.keys(s.attributes).map(a=>{const l=s.attributes[a],c={type:uy(a)};return Object.keys(l)&&(c.attrs=l),c})),o});else if(r instanceof qr){i={type:r.nodeName};const s=r.getAttributes();Object.keys(s).length&&(i.attrs=s);const o=r.toArray();o.length&&(i.content=o.map(n).flat())}else Ti();return i};return{type:"doc",content:t.map(n)}}const PH=(e,t,n)=>e!==t,$H=e=>{const t=document.createElement("span");t.classList.add("ProseMirror-yjs-cursor"),t.setAttribute("style",`border-color: ${e.color}`);const n=document.createElement("div");n.setAttribute("style",`background-color: ${e.color}`),n.insertBefore(document.createTextNode(e.name),null);const r=document.createTextNode("⁠"),i=document.createTextNode("⁠");return t.insertBefore(r,null),t.insertBefore(n,null),t.insertBefore(i,null),t},Sx=e=>({style:`background-color: ${e.color}70`,class:"ProseMirror-yjs-selection"}),UH=/^#[0-9a-fA-F]{6}$/,DS=(e,t,n,r,i)=>{const s=ir.getState(e),o=s.doc,a=[];return s.snapshot!=null||s.prevSnapshot!=null||s.binding.mapping.size===0?zt.create(e.doc,[]):(t.getStates().forEach((l,c)=>{if(n(o.clientID,c,l)&&l.cursor!=null){const u=l.user||{};u.color==null?u.color="#ffa500":UH.test(u.color)||console.warn("A user uses an unsupported color format",u),u.name==null&&(u.name=`User: ${c}`);let d=iu(o,s.type,ed(l.cursor.anchor),s.binding.mapping),h=iu(o,s.type,ed(l.cursor.head),s.binding.mapping);if(d!==null&&h!==null){const p=hs(e.doc.content.size-1,0);d=Bs(d,p),h=Bs(h,p),a.push($n.widget(h,()=>r(u,c),{key:c+"",side:10}));const m=Bs(d,h),T=hs(d,h);a.push($n.inline(m,T,i(u,c),{inclusiveEnd:!0,inclusiveStart:!1}))}}}),zt.create(e.doc,a))},zH=(e,{awarenessStateFilter:t=PH,cursorBuilder:n=$H,selectionBuilder:r=Sx,getSelection:i=o=>o.selection}={},s="cursor")=>new Mt({key:jh,state:{init(o,a){return DS(a,e,t,n,r)},apply(o,a,l,c){const u=ir.getState(c),d=o.getMeta(jh);return u&&u.isChangeOrigin||d&&d.awarenessUpdated?DS(c,e,t,n,r):a.map(o.mapping,o.doc)}},props:{decorations:o=>jh.getState(o)},view:o=>{const a=()=>{o.docView&&HH(o,jh,{awarenessUpdated:!0})},l=()=>{const c=ir.getState(o.state),u=e.getLocalState()||{};if(o.hasFocus()){const d=i(o.state),h=_f(d.anchor,c.type,c.binding.mapping),p=_f(d.head,c.type,c.binding.mapping);(u.cursor==null||!aS(ed(u.cursor.anchor),h)||!aS(ed(u.cursor.head),p))&&e.setLocalStateField(s,{anchor:h,head:p})}else u.cursor!=null&&iu(c.doc,c.type,ed(u.cursor.anchor),c.binding.mapping)!==null&&e.setLocalStateField(s,null)};return e.on("change",a),o.dom.addEventListener("focusin",l),o.dom.addEventListener("focusout",l),{update:l,destroy:()=>{o.dom.removeEventListener("focusin",l),o.dom.removeEventListener("focusout",l),e.off("change",a),e.setLocalStateField(s,null)}}}}),wx=Symbol("tiptap:editor"),KAe=e=>{Jp(wx,e)},dy=()=>{const e=Ed(wx);if(!e)throw new Error("Failed to inject Editor");return{editor:e}},_x=Symbol("editor:flags"),QAe=e=>{const t=e.isDirectEditing||qB(),n=e.richWorkspace??!1,r=Yl("text","rich_editing_enabled",!0)&&e.mime==="text/markdown";return Jp(_x,{isPublic:t,isRichEditor:r,isRichWorkspace:n}),{isPublic:t,isRichEditor:r,isRichWorkspace:n}},VH=()=>{const{isPublic:e,isRichEditor:t,isRichWorkspace:n}=Ed(_x,{isPublic:!1,isRichEditor:!1,isRichWorkspace:!1});return{isPublic:e,isRichEditor:t,isRichWorkspace:n}},jH={name:"AlertIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var GH=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon alert-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},qH=[],WH=Ae(jH,GH,qH,!1,null,null);const KH=WH.exports,QH={name:"AlertDecagramIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var JH=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon alert-decagram-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M23,12L20.56,9.22L20.9,5.54L17.29,4.72L15.4,1.54L12,3L8.6,1.54L6.71,4.72L3.1,5.53L3.44,9.21L1,12L3.44,14.78L3.1,18.47L6.71,19.29L8.6,22.47L12,21L15.4,22.46L17.29,19.28L20.9,18.46L20.56,14.78L23,12M13,17H11V15H13V17M13,13H11V7H13V13Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},XH=[],eZ=Ae(QH,JH,XH,!1,null,null);const tZ=eZ.exports,nZ={name:"AlignHorizontalCenterIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var rZ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon align-horizontal-center-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11 2H13V7H21V10H13V14H18V17H13V22H11V17H6V14H11V10H3V7H11V2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},iZ=[],sZ=Ae(nZ,rZ,iZ,!1,null,null);const oZ=sZ.exports,aZ={name:"AlignHorizontalLeftIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var lZ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon align-horizontal-left-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M4 22H2V2H4V22M22 7H6V10H22V7M16 14H6V17H16V14Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},cZ=[],uZ=Ae(aZ,lZ,cZ,!1,null,null);const dZ=uZ.exports,hZ={name:"AlignHorizontalRightIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var pZ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon align-horizontal-right-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M20 2H22V22H20V2M2 10H18V7H2V10M8 17H18V14H8V17Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},fZ=[],mZ=Ae(hZ,pZ,fZ,!1,null,null);const gZ=mZ.exports,TZ={name:"AlphabeticalVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var AZ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon alphabetical-variant-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3 7A2 2 0 0 0 1 9V17H3V13H5V17H7V9A2 2 0 0 0 5 7H3M3 9H5V11H3M15 10.5V9A2 2 0 0 0 13 7H9V17H13A2 2 0 0 0 15 15V13.5A1.54 1.54 0 0 0 13.5 12A1.54 1.54 0 0 0 15 10.5M13 15H11V13H13V15M13 11H11V9H13M19 7A2 2 0 0 0 17 9V15A2 2 0 0 0 19 17H21A2 2 0 0 0 23 15V14H21V15H19V9H21V10H23V9A2 2 0 0 0 21 7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},bZ=[],yZ=Ae(TZ,AZ,bZ,!1,null,null);const EZ=yZ.exports,vZ={name:"ArrowULeftTopIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var DZ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon arrow-u-left-top-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M20 13.5C20 17.09 17.09 20 13.5 20H6V18H13.5C16 18 18 16 18 13.5S16 9 13.5 9H7.83L10.91 12.09L9.5 13.5L4 8L9.5 2.5L10.92 3.91L7.83 7H13.5C17.09 7 20 9.91 20 13.5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},SZ=[],wZ=Ae(vZ,DZ,SZ,!1,null,null);const _Z=wZ.exports,CZ={name:"ArrowURightTopIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var NZ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon arrow-u-right-top-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10.5 18H18V20H10.5C6.91 20 4 17.09 4 13.5S6.91 7 10.5 7H16.17L13.08 3.91L14.5 2.5L20 8L14.5 13.5L13.09 12.09L16.17 9H10.5C8 9 6 11 6 13.5S8 18 10.5 18Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},FZ=[],OZ=Ae(CZ,NZ,FZ,!1,null,null);const xZ=OZ.exports,kZ={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var RZ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon check-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},MZ=[],BZ=Ae(kZ,RZ,MZ,!1,null,null);const hy=BZ.exports,LZ={name:"CheckboxMarkedCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var IZ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon checkbox-marked-circle-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},YZ=[],HZ=Ae(LZ,IZ,YZ,!1,null,null);const ZZ=HZ.exports,PZ={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var $Z=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon close-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},UZ=[],zZ=Ae(PZ,$Z,UZ,!1,null,null);const Cx=zZ.exports,VZ={name:"CodeBracketsIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var jZ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon code-brackets-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M15,4V6H18V18H15V20H20V4M4,4V20H9V18H6V6H9V4H4Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},GZ=[],qZ=Ae(VZ,jZ,GZ,!1,null,null);const WZ=qZ.exports,KZ={name:"CodeTagsIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var QZ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon code-tags-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M14.6,16.6L19.2,12L14.6,7.4L16,6L22,12L16,18L14.6,16.6M9.4,16.6L4.8,12L9.4,7.4L8,6L2,12L8,18L9.4,16.6Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},JZ=[],XZ=Ae(KZ,QZ,JZ,!1,null,null);const eP=XZ.exports,tP={name:"DotsHorizontalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var nP=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon dots-horizontal-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},rP=[],iP=Ae(tP,nP,rP,!1,null,null);const sP=iP.exports,oP={name:"EmoticonOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var aP=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon emoticon-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,17.5C14.33,17.5 16.3,16.04 17.11,14H6.89C7.69,16.04 9.67,17.5 12,17.5M8.5,11A1.5,1.5 0 0,0 10,9.5A1.5,1.5 0 0,0 8.5,8A1.5,1.5 0 0,0 7,9.5A1.5,1.5 0 0,0 8.5,11M15.5,11A1.5,1.5 0 0,0 17,9.5A1.5,1.5 0 0,0 15.5,8A1.5,1.5 0 0,0 14,9.5A1.5,1.5 0 0,0 15.5,11M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},lP=[],cP=Ae(oP,aP,lP,!1,null,null);const uP=cP.exports,dP={name:"FileDocumentIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var hP=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon file-document-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},pP=[],fP=Ae(dP,hP,pP,!1,null,null);const mP=fP.exports,gP={name:"FolderOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var TP=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon folder-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},AP=[],bP=Ae(gP,TP,AP,!1,null,null);const yP=bP.exports,EP={name:"FormatBoldIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var vP=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-bold-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},DP=[],SP=Ae(EP,vP,DP,!1,null,null);const wP=SP.exports,_P={name:"FormatHeader1Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var CP=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-header1-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M14,18V16H16V6.31L13.5,7.75V5.44L16,4H18V16H20V18H14Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},NP=[],FP=Ae(_P,CP,NP,!1,null,null);const Nx=FP.exports,OP={name:"FormatHeader2Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var xP=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-header2-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M21,18H15A2,2 0 0,1 13,16C13,15.47 13.2,15 13.54,14.64L18.41,9.41C18.78,9.05 19,8.55 19,8A2,2 0 0,0 17,6A2,2 0 0,0 15,8H13A4,4 0 0,1 17,4A4,4 0 0,1 21,8C21,9.1 20.55,10.1 19.83,10.83L15,16H21V18Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},kP=[],RP=Ae(OP,xP,kP,!1,null,null);const MP=RP.exports,BP={name:"FormatHeader3Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var LP=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-header3-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V15H15V16H19V12H15V10H19V6H15V7H13V6A2,2 0 0,1 15,4Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},IP=[],YP=Ae(BP,LP,IP,!1,null,null);const HP=YP.exports,ZP={name:"FormatHeader4Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var PP=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-header4-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M18,18V13H13V11L18,4H20V11H21V13H20V18H18M18,11V7.42L15.45,11H18Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},$P=[],UP=Ae(ZP,PP,$P,!1,null,null);const zP=UP.exports,VP={name:"FormatHeader5Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var jP=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-header5-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H20V6H15V10H17A4,4 0 0,1 21,14A4,4 0 0,1 17,18H15A2,2 0 0,1 13,16V15H15V16H17A2,2 0 0,0 19,14A2,2 0 0,0 17,12H15A2,2 0 0,1 13,10V6A2,2 0 0,1 15,4Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},GP=[],qP=Ae(VP,jP,GP,!1,null,null);const WP=qP.exports,KP={name:"FormatHeader6Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var QP=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-header6-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V7H19V6H15V10H19A2,2 0 0,1 21,12V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V6A2,2 0 0,1 15,4M15,12V16H19V12H15Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},JP=[],XP=Ae(KP,QP,JP,!1,null,null);const e$=XP.exports,t$={name:"FormatIndentDecreaseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var n$=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-indent-decrease-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M3,21H21V19H3M3,12L7,16V8M11,17H21V15H11V17Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},r$=[],i$=Ae(t$,n$,r$,!1,null,null);const s$=i$.exports,o$={name:"FormatIndentIncreaseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var a$=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-indent-increase-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M11,17H21V15H11M3,8V16L7,12M3,21H21V19H3V21Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},l$=[],c$=Ae(o$,a$,l$,!1,null,null);const u$=c$.exports,d$={name:"FormatItalicIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var h$=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-italic-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},p$=[],f$=Ae(d$,h$,p$,!1,null,null);const m$=f$.exports,g$={name:"FormatListBulletedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var T$=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-list-bulleted-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},A$=[],b$=Ae(g$,T$,A$,!1,null,null);const y$=b$.exports,E$={name:"FormatListCheckboxIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var v$=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-list-checkbox-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M21,19V17H8V19H21M21,13V11H8V13H21M8,7H21V5H8V7M4,5V7H6V5H4M3,5A1,1 0 0,1 4,4H6A1,1 0 0,1 7,5V7A1,1 0 0,1 6,8H4A1,1 0 0,1 3,7V5M4,11V13H6V11H4M3,11A1,1 0 0,1 4,10H6A1,1 0 0,1 7,11V13A1,1 0 0,1 6,14H4A1,1 0 0,1 3,13V11M4,17V19H6V17H4M3,17A1,1 0 0,1 4,16H6A1,1 0 0,1 7,17V19A1,1 0 0,1 6,20H4A1,1 0 0,1 3,19V17Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},D$=[],S$=Ae(E$,v$,D$,!1,null,null);const w$=S$.exports,_$={name:"FormatListNumberedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var C$=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-list-numbered-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M7,13V11H21V13H7M7,19V17H21V19H7M7,7V5H21V7H7M3,8V5H2V4H4V8H3M2,17V16H5V20H2V19H4V18.5H3V17.5H4V17H2M4.25,10A0.75,0.75 0 0,1 5,10.75C5,10.95 4.92,11.14 4.79,11.27L3.12,13H5V14H2V13.08L4,11H2V10H4.25Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},N$=[],F$=Ae(_$,C$,N$,!1,null,null);const O$=F$.exports,x$={name:"FormatQuoteCloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var k$=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-quote-close-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},R$=[],M$=Ae(x$,k$,R$,!1,null,null);const B$=M$.exports,L$={name:"FormatSizeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var I$=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-size-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M2 4V7H7V19H10V7H15V4H2M21 9H12V12H15V19H18V12H21V9Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Y$=[],H$=Ae(L$,I$,Y$,!1,null,null);const Z$=H$.exports,P$={name:"FormatStrikethroughIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var $$=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-strikethrough-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,14H21V12H3M5,4V7H10V10H14V7H19V4M10,19H14V16H10V19Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},U$=[],z$=Ae(P$,$$,U$,!1,null,null);const V$=z$.exports,j$={name:"FormatUnderlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var G$=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-underline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},q$=[],W$=Ae(j$,G$,q$,!1,null,null);const K$=W$.exports,Q$={name:"HelpCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var J$=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon help-circle-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},X$=[],eU=Ae(Q$,J$,X$,!1,null,null);const Fx=eU.exports,tU={name:"ImageOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var nU=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon image-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,19H5V5H19M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M13.96,12.29L11.21,15.83L9.25,13.47L6.5,17H17.5L13.96,12.29Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},rU=[],iU=Ae(tU,nU,rU,!1,null,null);const sU=iU.exports,oU={name:"InformationOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var aU=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon information-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},lU=[],cU=Ae(oU,aU,lU,!1,null,null);const uU=cU.exports,dU={name:"LinkIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var hU=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon link-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},pU=[],fU=Ae(dU,hU,pU,!1,null,null);const mU=fU.exports,gU={name:"LinkOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var TU=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon link-off-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.43 19.12,14.63 17.79,15L19.25,16.44C20.88,15.61 22,13.95 22,12A5,5 0 0,0 17,7M16,11H13.81L15.81,13H16V11M2,4.27L5.11,7.38C3.29,8.12 2,9.91 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12C3.9,10.41 5.11,9.1 6.66,8.93L8.73,11H8V13H10.73L13,15.27V17H14.73L18.74,21L20,19.74L3.27,3L2,4.27Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},AU=[],bU=Ae(gU,TU,AU,!1,null,null);const yU=bU.exports,EU={name:"LoadingIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var vU=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon loading-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},DU=[],SU=Ae(EU,vU,DU,!1,null,null);const wU=SU.exports,_U={name:"PaperclipIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var CU=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon paperclip-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M16.5,6V17.5A4,4 0 0,1 12.5,21.5A4,4 0 0,1 8.5,17.5V5A2.5,2.5 0 0,1 11,2.5A2.5,2.5 0 0,1 13.5,5V15.5A1,1 0 0,1 12.5,16.5A1,1 0 0,1 11.5,15.5V6H10V15.5A2.5,2.5 0 0,0 12.5,18A2.5,2.5 0 0,0 15,15.5V5A4,4 0 0,0 11,1A4,4 0 0,0 7,5V17.5A5.5,5.5 0 0,0 12.5,23A5.5,5.5 0 0,0 18,17.5V6H16.5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},NU=[],FU=Ae(_U,CU,NU,!1,null,null);const OU=FU.exports,xU={name:"PencilOffOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var kU=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon pencil-off-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,10.2L14,6.2L17.8,10L13.8,14L12.4,12.6L15,9.9L14.1,9L11.5,11.6L10,10.2M20.7,5.6L18.4,3.3C18.2,3.1 17.9,3 17.7,3C17.5,3 17.2,3.1 17,3.3L15.2,5.1L19,8.9L20.7,7C21.1,6.7 21.1,6 20.7,5.6M19,21.7L17.7,23L11.2,16.5L6.8,21H3V17.2L7.5,12.7L1,6.3L2.3,5L19,21.7M9.8,15.1L8.9,14.2L5,18.1V19H5.9L9.8,15.1Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},RU=[],MU=Ae(xU,kU,RU,!1,null,null);const BU=MU.exports,LU={name:"PencilOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var IU=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon pencil-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M14.06,9L15,9.94L5.92,19H5V18.08L14.06,9M17.66,3C17.41,3 17.15,3.1 16.96,3.29L15.13,5.12L18.88,8.87L20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18.17,3.09 17.92,3 17.66,3M14.06,6.19L3,17.25V21H6.75L17.81,9.94L14.06,6.19Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},YU=[],HU=Ae(LU,IU,YU,!1,null,null);const py=HU.exports,ZU={name:"PlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var PU=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon plus-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},$U=[],UU=Ae(ZU,PU,$U,!1,null,null);const zU=UU.exports,VU={name:"ShapeOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var jU=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon shape-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,13.5V21.5H3V13.5H11M9,15.5H5V19.5H9V15.5M12,2L17.5,11H6.5L12,2M12,5.86L10.08,9H13.92L12,5.86M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13M17.5,15A2.5,2.5 0 0,0 15,17.5A2.5,2.5 0 0,0 17.5,20A2.5,2.5 0 0,0 20,17.5A2.5,2.5 0 0,0 17.5,15Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},GU=[],qU=Ae(VU,jU,GU,!1,null,null);const WU=qU.exports,KU={name:"TableIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var QU=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon table-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M5,4H19A2,2 0 0,1 21,6V18A2,2 0 0,1 19,20H5A2,2 0 0,1 3,18V6A2,2 0 0,1 5,4M5,8V12H11V8H5M13,8V12H19V8H13M5,14V18H11V14H5M13,14V18H19V14H13Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},JU=[],XU=Ae(KU,QU,JU,!1,null,null);const ez=XU.exports,tz={name:"TableCogIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var nz=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon table-cog-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3 3H17C18.11 3 19 3.9 19 5V12.08C17.45 11.82 15.92 12.18 14.68 13H11V17H12.08C11.97 17.68 11.97 18.35 12.08 19H3C1.9 19 1 18.11 1 17V5C1 3.9 1.9 3 3 3M3 7V11H9V7H3M11 7V11H17V7H11M3 13V17H9V13H3M22.78 19.32L21.71 18.5C21.73 18.33 21.75 18.17 21.75 18S21.74 17.67 21.71 17.5L22.77 16.68C22.86 16.6 22.89 16.47 22.83 16.36L21.83 14.63C21.77 14.5 21.64 14.5 21.5 14.5L20.28 15C20 14.82 19.74 14.65 19.43 14.53L19.24 13.21C19.23 13.09 19.12 13 19 13H17C16.88 13 16.77 13.09 16.75 13.21L16.56 14.53C16.26 14.66 15.97 14.82 15.71 15L14.47 14.5C14.36 14.5 14.23 14.5 14.16 14.63L13.16 16.36C13.1 16.47 13.12 16.6 13.22 16.68L14.28 17.5C14.26 17.67 14.25 17.83 14.25 18S14.26 18.33 14.28 18.5L13.22 19.32C13.13 19.4 13.1 19.53 13.16 19.64L14.16 21.37C14.22 21.5 14.35 21.5 14.47 21.5L15.71 21C15.97 21.18 16.25 21.35 16.56 21.47L16.75 22.79C16.77 22.91 16.87 23 17 23H19C19.12 23 19.23 22.91 19.25 22.79L19.44 21.47C19.74 21.34 20 21.18 20.28 21L21.5 21.5C21.64 21.5 21.77 21.5 21.84 21.37L22.84 19.64C22.9 19.53 22.87 19.4 22.78 19.32M18 19.5C17.17 19.5 16.5 18.83 16.5 18S17.18 16.5 18 16.5 19.5 17.17 19.5 18 18.84 19.5 18 19.5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},rz=[],iz=Ae(tz,nz,rz,!1,null,null);const sz=iz.exports,oz={name:"TableColumnPlusAfterIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var az=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon table-column-plus-after-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},lz=[],cz=Ae(oz,az,lz,!1,null,null);const uz=cz.exports,dz={name:"TableColumnPlusBeforeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var hz=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon table-column-plus-before-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M13,2A2,2 0 0,0 11,4V20A2,2 0 0,0 13,22H22V2H13M20,10V14H13V10H20M20,16V20H13V16H20M20,4V8H13V4H20M9,11H6V8H4V11H1V13H4V16H6V13H9V11Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},pz=[],fz=Ae(dz,hz,pz,!1,null,null);const mz=fz.exports,gz={name:"TableRowPlusAfterIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Tz=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon table-row-plus-after-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Az=[],bz=Ae(gz,Tz,Az,!1,null,null);const yz=bz.exports,Ez={name:"TableRowPlusBeforeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var vz=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon table-row-plus-before-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M22,14A2,2 0 0,0 20,12H4A2,2 0 0,0 2,14V21H4V19H8V21H10V19H14V21H16V19H20V21H22V14M4,14H8V17H4V14M10,14H14V17H10V14M20,14V17H16V14H20M11,10H13V7H16V5H13V2H11V5H8V7H11V10Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Dz=[],Sz=Ae(Ez,vz,Dz,!1,null,null);const wz=Sz.exports,_z={name:"TranslateIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Cz=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon translate-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12.87,15.07L10.33,12.56L10.36,12.53C12.1,10.59 13.34,8.36 14.07,6H17V4H10V2H8V4H1V6H12.17C11.5,7.92 10.44,9.75 9,11.35C8.07,10.32 7.3,9.19 6.69,8H4.69C5.42,9.63 6.42,11.17 7.67,12.56L2.58,17.58L4,19L9,14L12.11,17.11L12.87,15.07M18.5,10H16.5L12,22H14L15.12,19H19.87L21,22H23L18.5,10M15.88,17L17.5,12.67L19.12,17H15.88Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Nz=[],Fz=Ae(_z,Cz,Nz,!1,null,null);const Oz=Fz.exports,xz={name:"TrashCanOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var kz=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon trash-can-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Rz=[],Mz=Ae(xz,kz,Rz,!1,null,null);const fy=Mz.exports,Bz={name:"TrayArrowUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Lz=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon tray-arrow-up-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 2L6.46 7.46L7.88 8.88L11 5.75V15H13V5.75L16.13 8.88L17.55 7.45L12 2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Iz=[],Yz=Ae(Bz,Lz,Iz,!1,null,null);const Hz=Yz.exports,Zz={name:"UnfoldMoreHorizontalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Pz=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon unfold-more-horizontal-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},$z=[],Uz=Ae(Zz,Pz,$z,!1,null,null);const zz=Uz.exports,Vz={name:"WebIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var jz=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon web-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Gz=[],qz=Ae(Vz,jz,Gz,!1,null,null);const Wz=qz.exports,Ox=20,lt=e=>({functional:!0,render(t,{data:n,props:r}){return t(e,{data:n,key:n.key,staticClass:n.staticClass,props:{size:Ox,...r}})}}),fA={functional:!0,render(e,{data:t,props:n}){return e(wU,{data:t,staticClass:"animation-rotate",props:{size:Ox,...n}})}},JAe=lt(EZ),Kz=lt(oZ),Qz=lt(dZ),Jz=lt(gZ),Xz=lt(Cx),eV=lt(WZ),tV=lt(eP),xx=lt(tZ),nV=lt(mP),XAe=lt(sP),rV=lt(uP),iV=lt(yP),sV=lt(wP),oV=lt(Z$),aV=lt(Nx),lV=lt(MP),cV=lt(HP),uV=lt(zP),dV=lt(WP),hV=lt(e$),pV=lt(s$),fV=lt(u$),mV=lt(m$),Mp=lt(y$),gV=lt(w$),TV=lt(O$),AV=lt(B$),bV=lt(V$),yV=lt(K$),ebe=lt(Fx),EV=lt(sU),my=lt(uU),vV=lt(mU),DV=lt(yU),SV=lt(OU),wV=lt(py),_V=lt(BU),kx=lt(ZZ),CV=lt(xZ),NV=lt(WU),FV=lt(ez),Rx=lt(uz),OV=lt(mz),Mx=lt(yz),xV=lt(wz),kV=lt(sz),Gm=lt(fy),RV=lt(_Z),MV=lt(zz),BV=lt(Hz),Bx=lt(KH),LV=lt(Wz),IV=lt(zU),gy={beforeUpdate(){this.text=this.getText()},data(){return{text:this.getText()}},computed:{isLongText(){return this.text&&this.text.trim().length>20}},methods:{getText(){return this.$slots.default?this.$slots.default[0].text.trim():""}}};function YV(e,t){let n=e.$parent;for(;n;){if(n.$options.name===t)return n;n=n.$parent}}const qm={mixins:[gy],props:{icon:{type:String,default:""},name:{type:String,default:""},title:{type:String,default:""},closeAfterClick:{type:Boolean,default:!1},ariaLabel:{type:String,default:null},ariaHidden:{type:Boolean,default:null}},emits:["click"],computed:{isIconUrl(){try{return!!new URL(this.icon,this.icon.startsWith("/")?window.location.origin:void 0)}catch{return!1}}},methods:{onClick(e){if(this.$emit("click",e),this.closeAfterClick){const t=YV(this,"NcActions");t&&t.closeMenu&&t.closeMenu(!1)}}}},HV={name:"NcActionButton",components:{NcIconSvgWrapper:Iu},mixins:[qm],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{ariaHidden:{type:Boolean,default:null},disabled:{type:Boolean,default:!1},isMenu:{type:Boolean,default:!1},type:{type:String,default:"button",validator:e=>["button","checkbox","radio","reset","submit"].includes(e)},modelValue:{type:[Boolean,String],default:null},value:{type:String,default:null},description:{type:String,default:""}},setup(){return{mdiCheck:DN,mdiChevronRight:WB}},computed:{isFocusable(){return!this.disabled},isChecked(){return this.type==="radio"&&typeof this.modelValue!="boolean"?this.modelValue===this.value:this.modelValue},nativeType(){return this.type==="submit"||this.type==="reset"?this.type:"button"},buttonAttributes(){const e={};return this.isInSemanticMenu?(e.role="menuitem",this.type==="radio"?(e.role="menuitemradio",e["aria-checked"]=this.isChecked?"true":"false"):(this.type==="checkbox"||this.nativeType==="button"&&this.modelValue!==null)&&(e.role="menuitemcheckbox",e["aria-checked"]=this.modelValue===null?"mixed":this.modelValue?"true":"false")):this.modelValue!==null&&this.nativeType==="button"&&(e["aria-pressed"]=this.modelValue?"true":"false"),e}},methods:{handleClick(e){this.onClick(e),(this.modelValue!==null||this.type!=="button")&&(this.type==="radio"?typeof this.modelValue!="boolean"?this.isChecked||this.$emit("update:modelValue",this.value):this.$emit("update:modelValue",!this.isChecked):this.$emit("update:modelValue",!this.isChecked))}}};var ZV=function(){var e=this,t=e._self._c;return t("li",{staticClass:"action",class:{"action--disabled":e.disabled},attrs:{role:e.isInSemanticMenu&&"presentation"}},[t("button",e._b({staticClass:"action-button button-vue",class:{"action-button--active":e.isChecked,focusable:e.isFocusable},attrs:{"aria-label":e.ariaLabel,disabled:e.disabled,title:e.title,type:e.nativeType},on:{click:e.handleClick}},"button",e.buttonAttributes,!1),[e._t("icon",function(){return[t("span",{staticClass:"action-button__icon",class:[e.isIconUrl?"action-button__icon--url":e.icon],style:{backgroundImage:e.isIconUrl?`url(${e.icon})`:null},attrs:{"aria-hidden":"true"}})]}),t("span",{staticClass:"action-button__longtext-wrapper"},[e.name?t("strong",{staticClass:"action-button__name"},[e._v(" "+e._s(e.name)+" ")]):e._e(),e.isLongText?t("span",{staticClass:"action-button__longtext",domProps:{textContent:e._s(e.text)}}):t("span",{staticClass:"action-button__text"},[e._v(" "+e._s(e.text)+" ")]),e.description?t("span",{staticClass:"action-button__description",domProps:{textContent:e._s(e.description)}}):e._e()]),e.isMenu?t("NcIconSvgWrapper",{staticClass:"action-button__menu-icon",attrs:{directional:"",path:e.mdiChevronRight}}):e.isChecked?t("NcIconSvgWrapper",{staticClass:"action-button__pressed-icon",attrs:{path:e.mdiCheck}}):e.isChecked===!1?t("span",{staticClass:"action-button__pressed-icon material-design-icon"}):e._e(),e._e()],2)])},PV=[],$V=ut(HV,ZV,PV,!1,null,"5b4c6c71");const Bo=$V.exports,UV={name:"NcActionSeparator"};var zV=function(){var e=this,t=e._self._c;return t("li",{staticClass:"action action-separator action--disabled",attrs:{role:"separator"}})},VV=[],jV=ut(UV,zV,VV,!1,null,"3e2324b7");const Wm=jV.exports;async function GV(e){const t=`${e.token?cs("/apps/text/public"):cs("/apps/text")}/session/${e.fileId}/create`,n=await Jn.put(t,e),{document:r,session:i}=n.data;return{connection:{documentId:r.id,sessionId:i.id,sessionToken:i.token,baseVersionEtag:r.baseVersionEtag,filePath:e.filePath,shareToken:e.token},data:n.data}}async function tbe(e,t){if(!t.shareToken)throw new Error("Cannot set guest name without a share token!");const n=t.documentId,r=cs(`/apps/text/public/session/${n}/session`);return(await Jn.post(r,{documentId:t.documentId,sessionId:t.sessionId,sessionToken:t.sessionToken,token:t.shareToken,guestName:e})).data}async function qV(e){const t=e.documentId,n=cs(`/apps/text/session/${t}/close`);return(await Jn.post(n,{documentId:e.documentId,sessionId:e.sessionId,sessionToken:e.sessionToken})).data}const Lx=Symbol("text:connection"),Ix=Symbol("text:opendata");function nbe(e){let t;const n=kv(void 0),r=kv(void 0),i=async()=>{const s=localStorage.getItem("nick")??"",{connection:o,data:a}=KV(e)||await GV({fileId:e.fileId,guestName:s,token:e.shareToken,filePath:e.relativePath,baseVersionEtag:t});return t=a.document.baseVersionEtag,n.value=o,r.value=a,a};return Jp(Lx,n),Jp(Ix,r),{connection:n,openConnection:i,openData:r}}const WV=()=>{const e=Ed(Lx),t=Ed(Ix);return{connection:e,openData:t}};function KV(e){if(e.initialSession){const{document:t,session:n}=e.initialSession;return{connection:{documentId:t.id,sessionId:n.id,sessionToken:n.token,baseVersionEtag:t.baseVersionEtag,filePath:e.relativePath,shareToken:e.shareToken},data:e.initialSession}}}function QV(){const e=Jr(navigator.onLine?null:Date.now()),t=as(()=>!e.value);return Kc("networkOnline",n=>{n.success&&(e.value=null)}),Kc("networkOffline",()=>{e.value=Date.now()}),{networkOnline:t,offlineSince:e}}var Gh={exports:{}},SS;function JV(){if(SS)return Gh.exports;SS=1;function e(t,n=100,r={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(n<0)throw new RangeError("`wait` must not be negative.");const{immediate:i}=typeof r=="boolean"?{immediate:r}:r;let s,o,a,l,c;function u(){const p=s,m=o;return s=void 0,o=void 0,c=t.apply(p,m),c}function d(){const p=Date.now()-l;p=0?a=setTimeout(d,n-p):(a=void 0,i||(c=u()))}const h=function(...p){if(s&&this!==s&&Object.getPrototypeOf(this)===Object.getPrototypeOf(s))throw new Error("Debounced method called with different contexts of the same prototype.");s=this,o=p,l=Date.now();const m=i&&!a;return a||(a=setTimeout(d,n)),m&&(c=u()),c};return Object.defineProperty(h,"isPending",{get(){return a!==void 0}}),h.clear=()=>{a&&(clearTimeout(a),a=void 0)},h.flush=()=>{a&&h.trigger()},h.trigger=()=>{c=u(),h.clear()},h}return Gh.exports.debounce=e,Gh.exports=e,Gh.exports}var XV=JV();const Km=Wl(XV),ej=Symbol("wrapper:outline-state"),tj=Symbol("wrapper:outline-actions"),nj=Symbol("wrapper:read-only-actions"),Yx={inject:{$outlineState:{from:ej,default:{visible:!1,enable:!1}}}},Hx={inject:{$outlineActions:{from:tj,default:{toggle:()=>{}}}}},rj={inject:{$readOnlyActions:{from:nj,default:{toggle:()=>{}}}}},mA=navigator.userAgent.includes("Mac"),Ft={Mod:mA?"Meta":"Control",Alt:"Alt",Control:"Control",Shift:"Shift"},ij={[Ft.Mod]:mA?Re("text","Command"):Re("text","Ctrl"),[Ft.Control]:Re("text","Ctrl"),[Ft.Alt]:Re("text",mA?"Option":"Alt"),[Ft.Shift]:Re("text","Shift")},sj=(e,t)=>({"is-active":t,[`action-menu-${e.key}`]:!0}),oj=(e,t=[])=>t.map(n=>ij[n]).concat(e.toUpperCase()).join("+"),aj=({keyChar:e,keyModifiers:t=[]})=>t.map(n=>Ft[n]).concat(e).join("+"),wS=(e,{keyChar:t,keyModifiers:n})=>!e&&t?`(${oj(t,n)})`:"",lj=(e,t)=>e.action&&!e.action(t.can(),t),Zx=({isActive:e},t)=>{if(!e)return!1;const n=Array.isArray(e)?e:[e];for(const r of n){let i;if(r!==null&&typeof r=="object"?i=r.name?[r.name,{...r.attributes}]:[{...r.attributes}]:i=[r],t.isActive(...i))return!0}return!1},cj=e=>Array.isArray(e.isActive)?"button":e.isActive&&typeof e.isActive=="object"?"radio":typeof e.isActive=="string"?"checkbox":"button",_S=(e,t)=>{const n=Zx(e,t);return{disabled:lj(e,t),class:sj(e,n),active:n,type:cj(e)}},Zd={mixins:[FN,Hx,Yx,rj],setup(){const{editor:e}=dy();return{editor:e}},props:{actionEntry:{type:Object,required:!0},canBeFocussed:{type:Boolean,default:null}},data(){return{state:_S(this.actionEntry,this.editor)}},computed:{label(){const{label:e}=this.actionEntry;return typeof e=="function"?e(this):e},icon(){return this.actionEntry.icon},keyshortcuts(){return aj(this.actionEntry)},tooltip(){return[this.label,wS(this.$isMobile,this.actionEntry)].join(" ")},listItemTooltip(){return[wS(this.$isMobile,this.actionEntry)].join(" ")}},watch:{canBeFocussed(){this.setTabIndexOnButton()}},mounted(){this.$_updateState=Km(this.updateState.bind(this),50),this.editor.on("update",this.$_updateState),this.editor.on("selectionUpdate",this.$_updateState),this.$emit("disabled",this.state.disabled),this.setTabIndexOnButton()},beforeDestroy(){this.editor.off("update",this.$_updateState),this.editor.off("selectionUpdate",this.$_updateState)},methods:{updateState(){this.state=_S(this.actionEntry,this.editor),this.$emit("disabled",this.state.disabled)},setTabIndexOnButton(){const e=this.$el.tagName.toLowerCase()==="button"?this.$el:this.$el.querySelector("button");this.canBeFocussed===null?e.removeAttribute("tabindex"):e.setAttribute("tabindex",this.canBeFocussed?"0":"-1")},focusButton(){(this.$el.tagName.toLowerCase()==="button"?this.$el:this.$el.querySelector("button")).focus()}}},uj=Symbol("menu::id"),Qm={inject:{$menuID:{from:uj,default:null}},computed:{menuIDSelector(){return`#${this.$menuID}`}}},dj={name:"ActionAttachmentUpload",components:{NcActions:Vs,NcActionSeparator:Wm,NcActionButton:Bo,NcIconSvgWrapper:Iu,Loading:fA,Folder:iV,Upload:BV,Plus:IV},extends:Zd,mixins:[h6,p6,f6,m6,g6,Qm],setup(){const{isPublic:e}=VH(),{openData:t}=WV(),{networkOnline:n}=QV();return{...Zd.setup(),isPublic:e,networkOnline:n,openData:t}},computed:{icon(){return this.isUploadingAttachments?fA:this.actionEntry.icon},isUploadingAttachments(){return this.$uploadingState.isUploadingAttachments},templates(){return Yl("files","templates",[])},isUploadDisabled(){return!this.openData?.hasOwner||!this.networkOnline},menuTitle(){return this.networkOnline?this.openData?.hasOwner?this.actionEntry.label:Re("text","Attachments cannot be created or uploaded because this file is shared from another cloud."):Re("text","Disabled because you are currently offline.")}},methods:{createAttachment(e){this.$callCreateAttachment(e)},t:Re}};var hj=function(){var e=this,t=e._self._c;return t("NcActions",{staticClass:"entry-action entry-action__image-upload",attrs:{"data-text-action-entry":e.actionEntry.key,name:e.actionEntry.label,disabled:e.isUploadDisabled,title:e.menuTitle,"aria-label":e.actionEntry.label,container:e.menuIDSelector},scopedSlots:e._u([{key:"icon",fn:function(){return[t(e.icon,{tag:"component",attrs:{name:e.actionEntry.label,"aria-label":e.actionEntry.label}})]},proxy:!0}])},[e.$editorUpload?t("NcActionButton",{attrs:{"close-after-click":"",disabled:e.isUploadingAttachments,"data-text-action-entry":`${e.actionEntry.key}-upload`},on:{click:e.$callChooseLocalAttachment},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Upload")]},proxy:!0}],null,!1,933298848)},[e._v(" "+e._s(e.t("text","Upload from computer"))+" ")]):e._e(),e.isPublic?e._e():t("NcActionButton",{attrs:{"close-after-click":"",disabled:e.isUploadingAttachments,"data-text-action-entry":`${e.actionEntry.key}-insert`},on:{click:e.$callAttachmentPrompt},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Folder")]},proxy:!0}],null,!1,2750733237)},[e._v(" "+e._s(e.t("text","Insert from Files"))+" ")]),e.templates.length?[t("NcActionSeparator"),e._l(e.templates,function(n,r){return t("NcActionButton",{key:`${n.app}-${r}`,attrs:{"close-after-click":"",disabled:e.isUploadingAttachments,"data-text-action-entry":`${e.actionEntry.key}-add-${n.app}-${r}`},on:{click:function(i){return e.createAttachment(n)}},scopedSlots:e._u([{key:"icon",fn:function(){return[n.iconSvgInline?t("NcIconSvgWrapper",{attrs:{svg:n.iconSvgInline}}):t("Plus")]},proxy:!0}],null,!0)},[e._v(" "+e._s(n.actionLabel)+" ")])})]:e._e()],2)},pj=[],fj=Ae(dj,hj,pj,!1,null,null);const mj=fj.exports,gj=["date","datetime-local","month","time","week"],Tj={name:"NcDateTimePickerNative",inheritAttrs:!1,model:{prop:"modelValue",event:"update:modelValue"},props:{value:{type:Date,default:void 0},modelValue:{type:Date,default:null},id:{type:String,default:()=>"date-time-picker-"+Hs(),validator:e=>e.trim()!==""},type:{type:String,default:"date",validate:e=>gj.includes(e)},label:{type:String,default:"Please choose a date"},min:{type:[Boolean,Date],default:null},max:{type:[Boolean,Date],default:null},hideLabel:{type:Boolean,default:!1},inputClass:{type:[Object,String],default:""}},emits:["input","update:modelValue","update:model-value"],setup(){return{model:js("value","input")}},computed:{formattedValue(){return this.formatValue(this.model)},formattedMin(){return this.min?this.formatValue(this.min):!1},formattedMax(){return this.max?this.formatValue(this.max):!1},listeners(){return{...this.$listeners,input:e=>{if(isNaN(e.target.valueAsNumber))this.model=null;else if(this.type==="time"){const t=e.target.value;if(this.model===""){const{yyyy:n,MM:r,dd:i}=this.getReadableDate(new Date);this.model=new Date(`${n}-${r}-${i}T${t}`)}else{const{yyyy:n,MM:r,dd:i}=this.getReadableDate(this.model);this.model=new Date(`${n}-${r}-${i}T${t}`)}}else if(this.type==="month"){const t=(new Date(e.target.value).getMonth()+1).toString().padStart(2,"0");if(this.model===""){const{yyyy:n,dd:r,hh:i,mm:s}=this.getReadableDate(new Date);this.model=new Date(`${n}-${t}-${r}T${i}:${s}`)}else{const{yyyy:n,dd:r,hh:i,mm:s}=this.getReadableDate(this.model);this.model=new Date(`${n}-${t}-${r}T${i}:${s}`)}}else{const t=new Date(e.target.valueAsNumber).getTimezoneOffset()*1e3*60,n=e.target.valueAsNumber+t;this.model=new Date(n)}}}}},methods:{getReadableDate(e){if(e instanceof Date){const t=e.getFullYear().toString().padStart(4,"0"),n=(e.getMonth()+1).toString().padStart(2,"0"),r=e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0");return{yyyy:t,MM:n,dd:r,hh:i,mm:s}}},formatValue(e){if(e instanceof Date){const{yyyy:t,MM:n,dd:r,hh:i,mm:s}=this.getReadableDate(e);if(this.type==="datetime-local")return`${t}-${n}-${r}T${i}:${s}`;if(this.type==="date")return`${t}-${n}-${r}`;if(this.type==="month")return`${t}-${n}`;if(this.type==="time")return`${i}:${s}`;if(this.type==="week"){const o=new Date(t,0,1),a=Math.floor((e-o)/(24*60*60*1e3)),l=Math.ceil(a/7);return`${t}-W${l}`}}else return""}}};var Aj=function(){var e=this,t=e._self._c;return t("div",{staticClass:"native-datetime-picker"},[t("label",{staticClass:"native-datetime-picker--label",class:{"hidden-visually":e.hideLabel},attrs:{for:e.id}},[e._v(" "+e._s(e.label)+" ")]),t("input",e._g(e._b({staticClass:"native-datetime-picker--input",class:e.inputClass,attrs:{id:e.id,type:e.type,min:e.formattedMin,max:e.formattedMax},domProps:{value:e.formattedValue}},"input",e.$attrs,!1),e.listeners))])},bj=[],yj=ut(Tj,Aj,bj,!1,null,"6c1feae8");const Px=yj.exports;SN(Px);function Vl(e,t,n){const r=document.querySelector(`#initial-state-${e}-${t}`);if(r===null){if(n!==void 0)return n;throw new Error(`Could not find initial state ${t} of ${e}`)}try{return JSON.parse(atob(r.value))}catch{throw new Error(`Could not parse initial state ${t} of ${e}`)}}const Ej={name:"AlertCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var vj=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon alert-circle-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Dj=[],Sj=ut(Ej,vj,Dj,!1,null,null);const wj=Sj.exports,_j={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Cj=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon check-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Nj=[],Fj=ut(_j,Cj,Nj,!1,null,null);const Oj=Fj.exports,xj={name:"NcInputField",components:{NcButton:qi,AlertCircle:wj,Check:Oj},inheritAttrs:!1,model:{prop:"modelValue",event:"update:modelValue"},props:{value:{type:[String,Number],default:void 0},modelValue:{type:[String,Number],default:void 0},type:{type:String,default:"text",validator:e=>["text","password","email","tel","url","search","number"].includes(e)},label:{type:String,default:void 0},labelOutside:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},showTrailingButton:{type:Boolean,default:!1},trailingButtonLabel:{type:String,default:""},success:{type:Boolean,default:!1},error:{type:Boolean,default:!1},helperText:{type:String,default:""},disabled:{type:Boolean,default:!1},pill:{type:Boolean,default:!1},inputClass:{type:[Object,String],default:""}},emits:["update:value","update:modelValue","update:model-value","trailing-button-click"],setup(){const e=js("value","update:value",!0);return{isLegacy32:Xo,model:e}},computed:{computedId(){return this.$attrs.id&&this.$attrs.id!==""?this.$attrs.id:this.inputName},inputName(){return"input"+Hs()},hasTrailingIcon(){return this.success},computedPlaceholder(){if(this.placeholder)return this.placeholder;if(this.label)return Xo?this.label:""},isValidLabel(){const e=this.label||this.labelOutside;return e||gr.warn("You need to add a label to the NcInputField component. Either use the prop label or use an external one, as per the example in the documentation."),e},ariaDescribedby(){const e=[];return this.helperText.length>0&&e.push(`${this.inputName}-helper-text`),this.$attrs["aria-describedby"]&&e.push(this.$attrs["aria-describedby"]),e.join(" ")||null}},methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()},handleInput(e){const t=this.type==="number"&&typeof this.model=="number"?parseFloat(e.target.value,10):e.target.value;this.model=t},handleTrailingButtonClick(e){this.$emit("trailing-button-click",e)}}};var kj=function(){var e=this,t=e._self._c;return t("div",{staticClass:"input-field",class:{"input-field--disabled":e.disabled,"input-field--error":e.error,"input-field--label-outside":e.labelOutside||!e.isValidLabel,"input-field--leading-icon":!!e.$scopedSlots.icon||!!e.$scopedSlots.default||!!e.$slots.default,"input-field--success":e.success,"input-field--trailing-icon":e.showTrailingButton||e.hasTrailingIcon,"input-field--pill":e.pill,"input-field--legacy":e.isLegacy32}},[t("div",{staticClass:"input-field__main-wrapper"},[t("input",e._g(e._b({ref:"input",staticClass:"input-field__input",class:[e.inputClass,{"input-field__input--success":e.success,"input-field__input--error":e.error}],attrs:{id:e.computedId,type:e.type,disabled:e.disabled,placeholder:e.computedPlaceholder,"aria-describedby":e.ariaDescribedby,"aria-live":"polite"},domProps:{value:e.model?.toString()},on:{input:e.handleInput}},"input",e.$attrs,!1),e.$listeners)),!e.labelOutside&&e.isValidLabel?t("label",{staticClass:"input-field__label",attrs:{for:e.computedId}},[e._v(" "+e._s(e.label)+" ")]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!!e.$scopedSlots.icon||!!e.$scopedSlots.default||!!e.$slots.default,expression:"!!$scopedSlots.icon || !!$scopedSlots.default || !!$slots.default"}],staticClass:"input-field__icon input-field__icon--leading"},[e._t("icon",function(){return[e._t("default")]})],2),e.showTrailingButton?t("NcButton",{staticClass:"input-field__trailing-button",attrs:{"aria-label":e.trailingButtonLabel,disabled:e.disabled,variant:"tertiary-no-background"},on:{click:e.handleTrailingButtonClick},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("trailing-button-icon")]},proxy:!0}],null,!0)}):e.success||e.error?t("div",{staticClass:"input-field__icon input-field__icon--trailing"},[e.success?t("Check",{staticStyle:{color:"var(--color-success-text)"},attrs:{size:20}}):e.error?t("AlertCircle",{staticStyle:{color:"var(--color-error-text)"},attrs:{size:20}}):e._e()],1):e._e()],1),e.helperText.length>0?t("p",{staticClass:"input-field__helper-text-message",class:{"input-field__helper-text-message--error":e.error,"input-field__helper-text-message--success":e.success},attrs:{id:`${e.inputName}-helper-text`}},[e.success?t("Check",{staticClass:"input-field__helper-text-message__icon",attrs:{size:18}}):e.error?t("AlertCircle",{staticClass:"input-field__helper-text-message__icon",attrs:{size:18}}):e._e(),e._v(" "+e._s(e.helperText)+" ")],1):e._e()])},Rj=[],Mj=ut(xj,kj,Rj,!1,null,"5c7bbaef");const bu=Mj.exports,Bj={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Lj=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon eye-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Ij=[],Yj=ut(Bj,Lj,Ij,!1,null,null);const Hj=Yj.exports,Zj={name:"EyeOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Pj=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon eye-off-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},$j=[],Uj=ut(Zj,Pj,$j,!1,null,null);const zj=Uj.exports;ft(W4);const CS=Vl("core","capabilities",{}).password_policy||null,Vj=new Set(Object.keys(bu.props)),jj={name:"NcPasswordField",components:{NcInputField:bu,IconEye:Hj,IconEyeOff:zj},inheritAttrs:!1,model:{prop:"modelValue",event:"update:modelValue"},props:{" ":{},...bu.props,showTrailingButton:{type:Boolean,default:!0},trailingButtonLabel:void 0,checkPasswordStrength:{type:Boolean,default:!1},minlength:{type:Number,default:0},maxlength:{type:Number,default:null},asText:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:["valid","invalid","update:value","update:modelValue","update:model-value","update:visible"],setup(e,{emit:t}){const n=js("value","update:value"),r=wN(e,"visible",t,{passive:!0});return{t:ge,model:n,visibility:r}},data(){return{internalHelpMessage:"",isValid:null}},computed:{computedError(){return this.error||this.isValid===!1},computedSuccess(){return this.success||this.isValid===!0},computedHelperText(){return this.helperText.length>0?this.helperText:this.internalHelpMessage},rules(){const{minlength:e}=this;return{minlength:e??CS?.minLength}},trailingButtonLabelPassword(){return this.visibility?ge("Hide password"):ge("Show password")},propsAndAttrsToForward(){return{...this.$attrs,...Object.fromEntries(Object.entries(this.$props).filter(([e])=>Vj.has(e)))}}},watch:{model(e){if(this.checkPasswordStrength){if(CS===null)return;this.checkPassword(e)}}},methods:{focus(){this.$refs.inputField.focus()},select(){this.$refs.inputField.select()},handleInput(e){this.model=e.target.value},toggleVisibility(){this.visibility=!this.visibility},checkPassword:Km(async function(e){try{const{data:t}=await Jn.post(Ni("apps/password_policy/api/v1/validate"),{password:e});if(this.isValid=t.ocs.data.passed,t.ocs.data.passed){this.internalHelpMessage=ge("Password is secure"),this.$emit("valid");return}this.internalHelpMessage=t.ocs.data.reason,this.$emit("invalid")}catch(t){gr.error("Password policy returned an error",t)}},500)}};var Gj=function(){var e=this,t=e._self._c;return t("NcInputField",e._g(e._b({ref:"inputField",attrs:{type:e.visibility||e.asText?"text":"password","trailing-button-label":e.trailingButtonLabelPassword,"helper-text":e.computedHelperText,error:e.computedError,success:e.computedSuccess,minlength:e.rules.minlength,"input-class":{"password-field__input--secure-text":!e.visibility&&e.asText}},on:{"trailing-button-click":e.toggleVisibility,input:e.handleInput},scopedSlots:e._u([e.$scopedSlots.icon||e.$slots.default||e.$scopedSlots.default?{key:"icon",fn:function(){return[e._t("icon",function(){return[e._t("default")]})]},proxy:!0}:null,{key:"trailing-button-icon",fn:function(){return[e.visibility?t("IconEyeOff",{attrs:{size:18}}):t("IconEye",{attrs:{size:18}})]},proxy:!0}],null,!0)},"NcInputField",e.propsAndAttrsToForward,!1),e.$listeners))},qj=[],Wj=ut(jj,Gj,qj,!1,null,"822eec9d");const Kj=Wj.exports;ft(K4,hN);const Qj=new Set(Object.keys(bu.props)),Jj={name:"NcTextField",components:{NcIconSvgWrapper:Iu,NcInputField:bu},inheritAttrs:!1,model:{prop:"modelValue",event:"update:modelValue"},props:{" ":{},...bu.props,trailingButtonLabel:{type:String,default:""},trailingButtonIcon:{type:String,default:"close",validator:e=>["close","arrowEnd","arrowRight","undo"].includes(e)}},emits:["update:value","update:modelValue","update:model-value"],setup(){return{model:js("value","update:value"),mdiArrowRight:JB,mdiClose:QB,mdiUndo:KB}},computed:{isArrow(){return this.trailingButtonIcon==="arrowEnd"||this.trailingButtonIcon==="arrowRight"},propsAndAttrsToForward(){const e={arrowEnd:ge("Save changes"),arrowRight:ge("Save changes"),close:ge("Clear text"),undo:ge("Undo changes")};return{...this.$attrs,...Object.fromEntries(Object.entries(this.$props).filter(([t])=>Qj.has(t))),trailingButtonLabel:this.trailingButtonLabel||e[this.trailingButtonIcon]}}},methods:{focus(){this.$refs.inputField.focus()},select(){this.$refs.inputField.select()}}};var Xj=function(){var e=this,t=e._self._c;return t("NcInputField",e._g(e._b({ref:"inputField",scopedSlots:e._u([e.$scopedSlots.icon||e.$slots.default||e.$scopedSlots.default?{key:"icon",fn:function(){return[e._t("icon",function(){return[e._t("default")]})]},proxy:!0}:null,e.type!=="search"?{key:"trailing-button-icon",fn:function(){return[e.isArrow?t("NcIconSvgWrapper",{attrs:{directional:"",path:e.mdiArrowRight}}):t("NcIconSvgWrapper",{attrs:{path:e.trailingButtonIcon==="undo"?e.mdiUndo:e.mdiClose}})]},proxy:!0}:null],null,!0)},"NcInputField",e.propsAndAttrsToForward,!1),e.$listeners))},eG=[],tG=ut(Jj,Xj,eG,!1,null,null);const Jm=tG.exports;ft(pN);const nG={name:"NcActionInput",components:{NcDateTimePickerNative:Px,NcPasswordField:Kj,NcTextField:Jm,NcColorPicker:X1(()=>j0(()=>import("./text-text.mjs").then(e=>e.a),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url)),NcDateTimePicker:X1(()=>j0(()=>Promise.resolve().then(()=>yhe),void 0,import.meta.url)),NcSelect:X1(()=>j0(()=>import("./text-text.mjs").then(e=>e.N),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url))},mixins:[gy],model:{prop:"modelValue",event:"update:modelValue"},props:{id:{type:String,default:()=>"action-"+Hs(),validator:e=>e.trim()!==""},inputId:{type:String,default:()=>"action-input-"+Hs(),validator:e=>e.trim()!==""},icon:{type:String,default:""},type:{type:String,default:"text",validator(e){return["date","datetime-local","month","multiselect","number","password","search","tel","text","time","url","week","color","email"].indexOf(e)>-1}},idNativeDateTimePicker:{type:String,default:"date-time-picker_id"},isNativePicker:{type:Boolean,default:!1},label:{type:String,default:null},labelOutside:{type:Boolean,default:!0},value:{type:[String,Date,Number,Array],default:void 0},modelValue:{type:[String,Date,Number,Array],default:""},disabled:{type:Boolean,default:!1},ariaLabel:{type:String,default:""},ariaHidden:{type:Boolean,default:null},showTrailingButton:{type:Boolean,default:!0},trailingButtonLabel:{type:String,default:ge("Submit")}},emits:["input","submit","change","update:value","update:modelValue","update:model-value"],setup(){return{model:js("value","update:value")}},computed:{isIconUrl(){try{return new URL(this.icon)}catch{return!1}},isMultiselectType(){return this.type==="multiselect"},nativeDatePickerType(){switch(this.type){case"date":case"month":case"time":case"week":case"datetime-local":return this.type}return!1},datePickerType(){if(!this.isNativePicker)switch(this.type){case"date":case"month":case"time":return this.type;case"datetime-local":return"datetime"}return!1},isFocusable(){return!this.disabled}},methods:{onLeave(){this.$refs.datetimepicker&&this.$refs.datetimepicker.$refs.datepicker&&this.$refs.datetimepicker.$refs.datepicker.closePopup()},onInput(e){this.$emit("input",e),this.model=e.target?e.target.value:e},onSubmit(e){if(e.preventDefault(),e.stopPropagation(),!this.disabled)this.$emit("submit",e);else return!1},onChange(e){this.$emit("change",e)}}};var rG=function(){var e=this,t=e._self._c;return t("li",{staticClass:"action",class:{"action--disabled":e.disabled}},[t("span",{staticClass:"action-input",class:{"action-input-picker--disabled":e.disabled,"action-input--visible-label":e.labelOutside&&e.label},on:{mouseleave:e.onLeave}},[t("span",{staticClass:"action-input__icon-wrapper"},[e._t("icon",function(){return[t("span",{staticClass:"action-input__icon",class:[e.isIconUrl?"action-input__icon--url":e.icon],style:{backgroundImage:e.isIconUrl?`url(${e.icon})`:null},attrs:{"aria-hidden":"true"}})]})],2),t("form",{ref:"form",staticClass:"action-input__form",attrs:{disabled:e.disabled},on:{submit:function(n){return n.preventDefault(),e.onSubmit.apply(null,arguments)}}},[t("div",{staticClass:"action-input__container"},[e.label&&e.labelOutside?t("label",{staticClass:"action-input__text-label",class:{"action-input__text-label--hidden":!e.labelOutside},attrs:{for:e.inputId}},[e._v(" "+e._s(e.label)+" ")]):e._e(),t("div",{staticClass:"action-input__input-container"},[e.datePickerType?t("NcDateTimePicker",e._b({ref:"datetimepicker",staticClass:"action-input__datetimepicker",staticStyle:{"z-index":"99999999999"},attrs:{value:e.model,placeholder:e.text,disabled:e.disabled,type:e.datePickerType,"input-class":["mx-input",{focusable:e.isFocusable}]},on:{input:e.onInput,change:e.onChange}},"NcDateTimePicker",e.$attrs,!1)):e.isNativePicker?t("NcDateTimePickerNative",e._b({staticClass:"action-input__datetimepicker",attrs:{id:e.idNativeDateTimePicker,value:e.model,type:e.nativeDatePickerType,"input-class":{focusable:e.isFocusable}},on:{"update:model-value":function(n){e.model=n},change:function(n){return e.$emit("change",n)}}},"NcDateTimePickerNative",e.$attrs,!1)):e.isMultiselectType?t("NcSelect",e._g(e._b({staticClass:"action-input__multi",attrs:{value:e.model,placeholder:e.text,disabled:e.disabled,"append-to-body":e.$attrs.appendToBody||e.$attrs["append-to-body"]||!1,"input-class":{focusable:e.isFocusable}}},"NcSelect",e.$attrs,!1),e.$listeners)):e.type==="password"?t("NcPasswordField",e._g(e._b({attrs:{id:e.inputId,value:e.model,label:e.label,"label-outside":!e.label||e.labelOutside,placeholder:e.text,disabled:e.disabled,"input-class":{focusable:e.isFocusable},"show-trailing-button":e.showTrailingButton&&!e.disabled},on:{input:e.onInput,change:e.onChange}},"NcPasswordField",e.$attrs,!1),e.$listeners)):e.type==="color"?t("div",{staticClass:"action-input__container"},[e.label&&e.type==="color"?t("label",{staticClass:"action-input__text-label",class:{"action-input__text-label--hidden":!e.labelOutside},attrs:{for:e.inputId}},[e._v(" "+e._s(e.label)+" ")]):e._e(),t("div",{staticClass:"action-input__input-container"},[t("NcColorPicker",e._g(e._b({staticClass:"colorpicker__trigger",attrs:{id:"inputId",value:e.model},on:{"update:model-value":e.onInput,submit:function(n){return e.$refs.form.requestSubmit()}}},"NcColorPicker",e.$attrs,!1),e.$listeners),[t("button",{staticClass:"colorpicker__preview",class:{focusable:e.isFocusable},style:{"background-color":e.model}})])],1)]):t("NcTextField",e._g(e._b({attrs:{id:e.inputId,value:e.model,label:e.label,"label-outside":!e.label||e.labelOutside,placeholder:e.text,disabled:e.disabled,"input-class":{focusable:e.isFocusable},type:e.type,"trailing-button-icon":"arrowRight","trailing-button-label":e.trailingButtonLabel,"show-trailing-button":e.showTrailingButton&&!e.disabled},on:{"trailing-button-click":function(n){return e.$refs.form.requestSubmit()},input:e.onInput,change:e.onChange}},"NcTextField",e.$attrs,!1),e.$listeners))],1)])])])])},iG=[],sG=ut(nG,rG,iG,!1,null,"29a30fef");const $x=sG.exports;function rs(e,t){for(var n in t)e[n]=t[n];return e}var oG=/[!'()*]/g,aG=function(e){return"%"+e.charCodeAt(0).toString(16)},lG=/%2C/g,Nc=function(e){return encodeURIComponent(e).replace(oG,aG).replace(lG,",")};function gA(e){try{return decodeURIComponent(e)}catch{}return e}function cG(e,t,n){t===void 0&&(t={});var r=n||uG,i;try{i=r(e||"")}catch{i={}}for(var s in t){var o=t[s];i[s]=Array.isArray(o)?o.map(NS):NS(o)}return i}var NS=function(e){return e==null||typeof e=="object"?e:String(e)};function uG(e){var t={};return e=e.trim().replace(/^(\?|#|&)/,""),e&&e.split("&").forEach(function(n){var r=n.replace(/\+/g," ").split("="),i=gA(r.shift()),s=r.length>0?gA(r.join("=")):null;t[i]===void 0?t[i]=s:Array.isArray(t[i])?t[i].push(s):t[i]=[t[i],s]}),t}function dG(e){var t=e?Object.keys(e).map(function(n){var r=e[n];if(r===void 0)return"";if(r===null)return Nc(n);if(Array.isArray(r)){var i=[];return r.forEach(function(s){s!==void 0&&(s===null?i.push(Nc(n)):i.push(Nc(n)+"="+Nc(s)))}),i.join("&")}return Nc(n)+"="+Nc(r)}).filter(function(n){return n.length>0}).join("&"):null;return t?"?"+t:""}var Cf=/\/?$/;function Nf(e,t,n,r){var i=r&&r.options.stringifyQuery,s=t.query||{};try{s=TA(s)}catch{}var o={name:t.name||e&&e.name,meta:e&&e.meta||{},path:t.path||"/",hash:t.hash||"",query:s,params:t.params||{},fullPath:FS(t,i),matched:e?hG(e):[]};return n&&(o.redirectedFrom=FS(n,i)),Object.freeze(o)}function TA(e){if(Array.isArray(e))return e.map(TA);if(e&&typeof e=="object"){var t={};for(var n in e)t[n]=TA(e[n]);return t}else return e}var La=Nf(null,{path:"/"});function hG(e){for(var t=[];e;)t.unshift(e),e=e.parent;return t}function FS(e,t){var n=e.path,r=e.query;r===void 0&&(r={});var i=e.hash;i===void 0&&(i="");var s=t||dG;return(n||"/")+s(r)+i}function Ux(e,t,n){return t===La?e===t:t?e.path&&t.path?e.path.replace(Cf,"")===t.path.replace(Cf,"")&&(n||e.hash===t.hash&&Bp(e.query,t.query)):e.name&&t.name?e.name===t.name&&(n||e.hash===t.hash&&Bp(e.query,t.query)&&Bp(e.params,t.params)):!1:!1}function Bp(e,t){if(e===void 0&&(e={}),t===void 0&&(t={}),!e||!t)return e===t;var n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length!==r.length?!1:n.every(function(i,s){var o=e[i],a=r[s];if(a!==i)return!1;var l=t[i];return o==null||l==null?o===l:typeof o=="object"&&typeof l=="object"?Bp(o,l):String(o)===String(l)})}function pG(e,t){return e.path.replace(Cf,"/").indexOf(t.path.replace(Cf,"/"))===0&&(!t.hash||e.hash===t.hash)&&fG(e.query,t.query)}function fG(e,t){for(var n in t)if(!(n in e))return!1;return!0}function zx(e){for(var t=0;t=0&&(t=e.slice(r),e=e.slice(0,r));var i=e.indexOf("?");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{path:e,query:n,hash:t}}function Sa(e){return e.replace(/\/(?:\s*\/)+/g,"/")}var Ff=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"},jc=qx,AG=Ty,bG=DG,yG=jx,EG=Gx,vG=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function Ty(e,t){for(var n=[],r=0,i=0,s="",o=t&&t.delimiter||"/",a;(a=vG.exec(e))!=null;){var l=a[0],c=a[1],u=a.index;if(s+=e.slice(i,u),i=u+l.length,c){s+=c[1];continue}var d=e[i],h=a[2],p=a[3],m=a[4],T=a[5],b=a[6],D=a[7];s&&(n.push(s),s="");var v=h!=null&&d!=null&&d!==h,C=b==="+"||b==="*",S=b==="?"||b==="*",O=a[2]||o,R=m||T;n.push({name:p||r++,prefix:h||"",delimiter:O,optional:S,repeat:C,partial:v,asterisk:!!D,pattern:R?_G(R):D?".*":"[^"+Lp(O)+"]+?"})}return i1||!S.length)return S.length===0?e():e("span",{},S)}if(this.tag==="a")C.on=v,C.attrs={href:a,"aria-current":b};else{var O=Wx(this.$slots.default);if(O){O.isStatic=!1;var R=O.data=rs({},O.data);R.on=R.on||{};for(var H in R.on){var W=R.on[H];H in v&&(R.on[H]=Array.isArray(W)?W:[W])}for(var $ in v)$ in R.on?R.on[$].push(v[$]):R.on[$]=D;var w=O.data.attrs=rs({},O.data.attrs);w.href=a,w["aria-current"]=b}else C.on=v}return e(this.tag,C,this.$slots.default)}};function RS(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Wx(e){if(e){for(var t,n=0;n-1&&(b.params[S]=m.params[S]);return b.path=Ip(v.path,b.params),h(v,b,T)}else if(b.path){b.params={};for(var O=0;O-1}function Rf(e,t){return kf(e)&&e._isRouter&&(t==null||e.type===t)}function HS(e,t,n){var r=function(i){i>=e.length?n():e[i]?t(e[i],function(){r(i+1)}):r(i+1)};r(0)}function GG(e){return function(t,n,r){var i=!1,s=0,o=null;nk(e,function(a,l,c,u){if(typeof a=="function"&&a.cid===void 0){i=!0,s++;var d=ZS(function(T){WG(T)&&(T=T.default),a.resolved=typeof T=="function"?T:Of.extend(T),c.components[u]=T,s--,s<=0&&r()}),h=ZS(function(T){var b="Failed to resolve async component "+u+": "+T;o||(o=kf(T)?T:new Error(b),r(o))}),p;try{p=a(d,h)}catch(T){h(T)}if(p)if(typeof p.then=="function")p.then(d,h);else{var m=p.component;m&&typeof m.then=="function"&&m.then(d,h)}}}),i||r()}}function nk(e,t){return rk(e.map(function(n){return Object.keys(n.components).map(function(r){return t(n.components[r],n.instances[r],n,r)})}))}function rk(e){return Array.prototype.concat.apply([],e)}var qG=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function WG(e){return e.__esModule||qG&&e[Symbol.toStringTag]==="Module"}function ZS(e){var t=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!t)return t=!0,e.apply(this,n)}}var ns=function(e,t){this.router=e,this.base=KG(t),this.current=La,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};ns.prototype.listen=function(e){this.cb=e},ns.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},ns.prototype.onError=function(e){this.errorCbs.push(e)},ns.prototype.transitionTo=function(e,t,n){var r=this,i;try{i=this.router.match(e,this.current)}catch(o){throw this.errorCbs.forEach(function(a){a(o)}),o}var s=this.current;this.confirmTransition(i,function(){r.updateRoute(i),t&&t(i),r.ensureURL(),r.router.afterHooks.forEach(function(o){o&&o(i,s)}),r.ready||(r.ready=!0,r.readyCbs.forEach(function(o){o(i)}))},function(o){n&&n(o),o&&!r.ready&&(!Rf(o,Jl.redirected)||s!==La)&&(r.ready=!0,r.readyErrorCbs.forEach(function(a){a(o)}))})},ns.prototype.confirmTransition=function(e,t,n){var r=this,i=this.current;this.pending=e;var s=function(m){!Rf(m)&&kf(m)&&(r.errorCbs.length?r.errorCbs.forEach(function(T){T(m)}):console.error(m)),n&&n(m)},o=e.matched.length-1,a=i.matched.length-1;if(Ux(e,i)&&o===a&&e.matched[o]===i.matched[a])return this.ensureURL(),e.hash&&wa(this.router,i,e,!1),s(UG(i,e));var l=QG(this.current.matched,e.matched),c=l.updated,u=l.deactivated,d=l.activated,h=[].concat(XG(u),this.router.beforeHooks,eq(c),d.map(function(m){return m.beforeEnter}),GG(d)),p=function(m,T){if(r.pending!==e)return s(YS(i,e));try{m(e,i,function(b){b===!1?(r.ensureURL(!0),s(zG(i,e))):kf(b)?(r.ensureURL(!0),s(b)):typeof b=="string"||typeof b=="object"&&(typeof b.path=="string"||typeof b.name=="string")?(s($G(i,e)),typeof b=="object"&&b.replace?r.replace(b):r.push(b)):T(b)})}catch(b){s(b)}};HS(h,p,function(){var m=tq(d),T=m.concat(r.router.resolveHooks);HS(T,p,function(){if(r.pending!==e)return s(YS(i,e));r.pending=null,t(e),r.router.app&&r.router.app.$nextTick(function(){zx(e)})})})},ns.prototype.updateRoute=function(e){this.current=e,this.cb&&this.cb(e)},ns.prototype.setupListeners=function(){},ns.prototype.teardown=function(){this.listeners.forEach(function(e){e()}),this.listeners=[],this.current=La,this.pending=null};function KG(e){if(!e)if(gh){var t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^https?:\/\/[^\/]+/,"")}else e="/";return e.charAt(0)!=="/"&&(e="/"+e),e.replace(/\/$/,"")}function QG(e,t){var n,r=Math.max(e.length,t.length);for(n=0;n0)){var r=this.router,i=r.options.scrollBehavior,s=_a&&i;s&&this.listeners.push(ek());var o=function(){var a=n.current,l=Y0(n.base);n.current===La&&l===n._startLocation||n.transitionTo(l,function(c){s&&wa(r,c,a,!0)})};window.addEventListener("popstate",o),this.listeners.push(function(){window.removeEventListener("popstate",o)})}},t.prototype.go=function(n){window.history.go(n)},t.prototype.push=function(n,r,i){var s=this,o=this,a=o.current;this.transitionTo(n,function(l){xf(Sa(s.base+l.fullPath)),wa(s.router,l,a,!1),r&&r(l)},i)},t.prototype.replace=function(n,r,i){var s=this,o=this,a=o.current;this.transitionTo(n,function(l){yA(Sa(s.base+l.fullPath)),wa(s.router,l,a,!1),r&&r(l)},i)},t.prototype.ensureURL=function(n){if(Y0(this.base)!==this.current.fullPath){var r=Sa(this.base+this.current.fullPath);n?xf(r):yA(r)}},t.prototype.getCurrentLocation=function(){return Y0(this.base)},t}(ns);function Y0(e){var t=window.location.pathname,n=t.toLowerCase(),r=e.toLowerCase();return e&&(n===r||n.indexOf(Sa(r+"/"))===0)&&(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash}var ok=function(e){function t(n,r,i){e.call(this,n,r),!(i&&rq(this.base))&&PS()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var n=this;if(!(this.listeners.length>0)){var r=this.router,i=r.options.scrollBehavior,s=_a&&i;s&&this.listeners.push(ek());var o=function(){var l=n.current;PS()&&n.transitionTo(Yp(),function(c){s&&wa(n.router,c,l,!0),_a||Hp(c.fullPath)})},a=_a?"popstate":"hashchange";window.addEventListener(a,o),this.listeners.push(function(){window.removeEventListener(a,o)})}},t.prototype.push=function(n,r,i){var s=this,o=this,a=o.current;this.transitionTo(n,function(l){$S(l.fullPath),wa(s.router,l,a,!1),r&&r(l)},i)},t.prototype.replace=function(n,r,i){var s=this,o=this,a=o.current;this.transitionTo(n,function(l){Hp(l.fullPath),wa(s.router,l,a,!1),r&&r(l)},i)},t.prototype.go=function(n){window.history.go(n)},t.prototype.ensureURL=function(n){var r=this.current.fullPath;Yp()!==r&&(n?$S(r):Hp(r))},t.prototype.getCurrentLocation=function(){return Yp()},t}(ns);function rq(e){var t=Y0(e);if(!/^\/#/.test(t))return window.location.replace(Sa(e+"/#"+t)),!0}function PS(){var e=Yp();return e.charAt(0)==="/"?!0:(Hp("/"+e),!1)}function Yp(){var e=window.location.href,t=e.indexOf("#");return t<0?"":(e=e.slice(t+1),e)}function EA(e){var t=window.location.href,n=t.indexOf("#"),r=n>=0?t.slice(0,n):t;return r+"#"+e}function $S(e){_a?xf(EA(e)):window.location.hash=e}function Hp(e){_a?yA(EA(e)):window.location.replace(EA(e))}var iq=function(e){function t(n,r){e.call(this,n,r),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(n,r,i){var s=this;this.transitionTo(n,function(o){s.stack=s.stack.slice(0,s.index+1).concat(o),s.index++,r&&r(o)},i)},t.prototype.replace=function(n,r,i){var s=this;this.transitionTo(n,function(o){s.stack=s.stack.slice(0,s.index).concat(o),r&&r(o)},i)},t.prototype.go=function(n){var r=this,i=this.index+n;if(!(i<0||i>=this.stack.length)){var s=this.stack[i];this.confirmTransition(s,function(){var o=r.current;r.index=i,r.updateRoute(s),r.router.afterHooks.forEach(function(a){a&&a(s,o)})},function(o){Rf(o,Jl.duplicated)&&(r.index=i)})}},t.prototype.getCurrentLocation=function(){var n=this.stack[this.stack.length-1];return n?n.fullPath:"/"},t.prototype.ensureURL=function(){},t}(ns),On=function(e){e===void 0&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=MG(e.routes||[],this);var t=e.mode||"hash";switch(this.fallback=t==="history"&&!_a&&e.fallback!==!1,this.fallback&&(t="hash"),gh||(t="abstract"),this.mode=t,t){case"history":this.history=new sk(this,e.base);break;case"hash":this.history=new ok(this,e.base,this.fallback);break;case"abstract":this.history=new iq(this,e.base);break}},US={currentRoute:{configurable:!0}};On.prototype.match=function(e,t,n){return this.matcher.match(e,t,n)},US.currentRoute.get=function(){return this.history&&this.history.current},On.prototype.init=function(e){var t=this;if(this.apps.push(e),e.$once("hook:destroyed",function(){var s=t.apps.indexOf(e);s>-1&&t.apps.splice(s,1),t.app===e&&(t.app=t.apps[0]||null),t.app||t.history.teardown()}),!this.app){this.app=e;var n=this.history;if(n instanceof sk||n instanceof ok){var r=function(s){var o=n.current,a=t.options.scrollBehavior,l=_a&&a;l&&"fullPath"in s&&wa(t,s,o,!1)},i=function(s){n.setupListeners(),r(s)};n.transitionTo(n.getCurrentLocation(),i,i)}n.listen(function(s){t.apps.forEach(function(o){o._route=s})})}},On.prototype.beforeEach=function(e){return Og(this.beforeHooks,e)},On.prototype.beforeResolve=function(e){return Og(this.resolveHooks,e)},On.prototype.afterEach=function(e){return Og(this.afterHooks,e)},On.prototype.onReady=function(e,t){this.history.onReady(e,t)},On.prototype.onError=function(e){this.history.onError(e)},On.prototype.push=function(e,t,n){var r=this;if(!t&&!n&&typeof Promise<"u")return new Promise(function(i,s){r.history.push(e,i,s)});this.history.push(e,t,n)},On.prototype.replace=function(e,t,n){var r=this;if(!t&&!n&&typeof Promise<"u")return new Promise(function(i,s){r.history.replace(e,i,s)});this.history.replace(e,t,n)},On.prototype.go=function(e){this.history.go(e)},On.prototype.back=function(){this.go(-1)},On.prototype.forward=function(){this.go(1)},On.prototype.getMatchedComponents=function(e){var t=e?e.matched?e:this.resolve(e).route:this.currentRoute;return t?[].concat.apply([],t.matched.map(function(n){return Object.keys(n.components).map(function(r){return n.components[r]})})):[]},On.prototype.resolve=function(e,t,n){t=t||this.history.current;var r=yy(e,t,n,this),i=this.match(r,t),s=i.redirectedFrom||i.fullPath,o=this.history.base,a=sq(o,s,this.mode);return{location:r,route:i,href:a,normalizedTo:r,resolved:i}},On.prototype.getRoutes=function(){return this.matcher.getRoutes()},On.prototype.addRoute=function(e,t){this.matcher.addRoute(e,t),this.history.current!==La&&this.history.transitionTo(this.history.getCurrentLocation())},On.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==La&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(On.prototype,US);function Og(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function sq(e,t,n){var r=n==="hash"?"#"+t:t;return e?Sa(e+"/"+r):r}On.install=AA,On.version="3.6.5",On.isNavigationFailure=Rf,On.NavigationFailureType=Jl,On.START_LOCATION=La,gh&&window.Vue&&window.Vue.use(On);const oq={name:"ArrowLeftIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var aq=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon arrow-left-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},lq=[],cq=ut(oq,aq,lq,!1,null,null);const uq=cq.exports;window._vue_richtext_widgets??={},window._registerWidget??=(e,t,n,r)=>{dq(e,t,n,r)};function dq(e,t,n=()=>{},r){const i={hasInteractiveView:!0,fullWidth:!1,...r};if(window._vue_richtext_widgets[e]){gr.error(`[ReferencePicker]: Widget for id ${e} already registered`);return}window._vue_richtext_widgets[e]={id:e,callback:t,onDestroy:n,...i}}function hq(e,t){const{richObjectType:n,richObject:r,accessible:i,interactive:s}=t;if(n!=="open-graph"){if(!window._vue_richtext_widgets[n]){gr.error("Widget for rich object type "+n+" not registered");return}window._vue_richtext_widgets[n].callback(e,{richObjectType:n,richObject:r,accessible:i,interactive:s})}}function pq(e,t){e!=="open-graph"&&window._vue_richtext_widgets[e]&&window._vue_richtext_widgets[e].onDestroy(t)}function zS(e){return!!window._vue_richtext_widgets[e]}function fq(e){return!!window._vue_richtext_widgets[e]?.hasInteractiveView}function mq(e){return!!window._vue_richtext_widgets[e]?.fullWidth}window._vue_richtext_custom_picker_elements??={},window._registerCustomPickerElement??=Tq;function Pd(e){return!!window._vue_richtext_custom_picker_elements[e]}function gq(e){const t=window._vue_richtext_custom_picker_elements[e]?.size;return["small","normal","large","full"].includes(t)?t:null}function Tq(e,t,n=()=>{},r="large"){if(window._vue_richtext_custom_picker_elements[e]){gr.error(`Custom reference picker element for id ${e} already registered`);return}window._vue_richtext_custom_picker_elements[e]={id:e,callback:t,onDestroy:n,size:r}}function Aq(e,t){const{providerId:n,accessible:r}=t;if(!window._vue_richtext_custom_picker_elements[n]){gr.error(`Custom reference picker element for reference provider ID ${n} not registered`);return}return window._vue_richtext_custom_picker_elements[n].callback(e,{providerId:n,accessible:r})}function bq(e,t,n){window._vue_richtext_custom_picker_elements[e]&&window._vue_richtext_custom_picker_elements[e].onDestroy(t,n)}window._nc_vue_element_id=window._nc_vue_element_id??0;function Dy(){return`nc-vue-${window._nc_vue_element_id++}`}const yq={name:"NcEmptyContent",props:{name:{type:String,default:""},description:{type:String,default:""}},setup(){return{nameId:Dy()}},computed:{hasName(){return this.name!==""||this.$slots.name},hasDescription(){return this.description!==""||this.$slots.description?.[0]}}};var Eq=function(){var e=this,t=e._self._c;return t("div",{staticClass:"empty-content",attrs:{"aria-labelledby":e.nameId,role:"note"}},[e.$slots.icon?t("div",{staticClass:"empty-content__icon",attrs:{"aria-hidden":"true"}},[e._t("icon")],2):e._e(),e.hasName?t("div",{staticClass:"empty-content__name",attrs:{id:e.nameId}},[e._t("name",function(){return[e._v(" "+e._s(e.name)+" ")]})],2):e._e(),e.hasDescription?t("p",{staticClass:"empty-content__description"},[e._t("description",function(){return[e._v(" "+e._s(e.description)+" ")]})],2):e._e(),e.$slots.action?t("div",{staticClass:"empty-content__action"},[e._t("action")],2):e._e()])},vq=[],Dq=ut(yq,Eq,vq,!1,null,"c3123941");const Sy=Dq.exports;function ak(e,t){const n=[];let r=0,i=e.toLowerCase().indexOf(t.toLowerCase(),r),s=0;for(;i>-1&&s[]}},computed:{ranges(){let e=[];return!this.search&&this.highlight.length===0||(this.highlight.length>0?e=this.highlight:e=ak(this.text,this.search),e.forEach((t,n)=>{t.end(n.start0&&t.push({start:n.start<0?0:n.start,end:n.end>this.text.length?this.text.length:n.end}),t),[]),e.sort((t,n)=>t.start-n.start),e=e.reduce((t,n)=>{if(!t.length)t.push(n);else{const r=t.length-1;t[r].end>=n.start?t[r]={start:t[r].start,end:Math.max(t[r].end,n.end)}:t.push(n)}return t},[])),e},chunks(){if(this.ranges.length===0)return[{start:0,end:this.text.length,highlight:!1,text:this.text}];const e=[];let t=0,n=0;for(;t=this.ranges.length&&tt.highlight?e("strong",{},t.text):t.text)):e("span",{},this.text)}},wq=null,_q=null;var Cq=ut(Sq,wq,_q,!1,null,null);const t1=Cq.exports,Mf=Math.min,kl=Math.max,Bf=Math.round,Wh=Math.floor,Is=e=>({x:e,y:e}),Nq={left:"right",right:"left",bottom:"top",top:"bottom"},Fq={start:"end",end:"start"};function VS(e,t,n){return kl(e,Mf(t,n))}function Eu(e,t){return typeof e=="function"?e(t):e}function Ia(e){return e.split("-")[0]}function n1(e){return e.split("-")[1]}function wy(e){return e==="x"?"y":"x"}function lk(e){return e==="y"?"height":"width"}const Oq=new Set(["top","bottom"]);function yo(e){return Oq.has(Ia(e))?"y":"x"}function ck(e){return wy(yo(e))}function xq(e,t,n){n===void 0&&(n=!1);const r=n1(e),i=ck(e),s=lk(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Lf(o)),[o,Lf(o)]}function kq(e){const t=Lf(e);return[vA(e),t,vA(t)]}function vA(e){return e.replace(/start|end/g,t=>Fq[t])}const jS=["left","right"],GS=["right","left"],Rq=["top","bottom"],Mq=["bottom","top"];function Bq(e,t,n){switch(e){case"top":case"bottom":return n?t?GS:jS:t?jS:GS;case"left":case"right":return t?Rq:Mq;default:return[]}}function Lq(e,t,n,r){const i=n1(e);let s=Bq(Ia(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(vA)))),s}function Lf(e){return e.replace(/left|right|bottom|top/g,t=>Nq[t])}function Iq(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yq(e){return typeof e!="number"?Iq(e):{top:e,right:e,bottom:e,left:e}}function If(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function qS(e,t,n){let{reference:r,floating:i}=e;const s=yo(t),o=ck(t),a=lk(o),l=Ia(t),c=s==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(n1(t)){case"start":p[o]-=h*(n&&c?-1:1);break;case"end":p[o]+=h*(n&&c?-1:1);break}return p}const Hq=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=qS(c,r,l),h=r,p={},m=0;for(let T=0;Toe<=0)){var U,z;const oe=(((U=s.flip)==null?void 0:U.index)||0)+1,X=H[oe];if(X&&(!(d==="alignment"&&v!==yo(X))||w.every(G=>yo(G.placement)===v?G.overflows[0]>0:!0)))return{data:{index:oe,overflows:w},reset:{placement:X}};let De=(z=w.filter(G=>G.overflows[0]<=0).sort((G,ie)=>G.overflows[1]-ie.overflows[1])[0])==null?void 0:z.placement;if(!De)switch(p){case"bestFit":{var Y;const G=(Y=w.filter(ie=>{if(R){const ce=yo(ie.placement);return ce===v||ce==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(ce=>ce>0).reduce((ce,Se)=>ce+Se,0)]).sort((ie,ce)=>ie[1]-ce[1])[0])==null?void 0:Y[0];G&&(De=G);break}case"initialPlacement":De=a;break}if(i!==De)return{reset:{placement:De}}}return{}}}},dk=new Set(["left","top"]);async function Pq(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ia(n),a=n1(n),l=yo(n)==="y",c=dk.has(o)?-1:1,u=s&&l?-1:1,d=Eu(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const $q=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await Pq(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},Uq=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:D,y:v}=b;return{x:D,y:v}}},...l}=Eu(e,t),c={x:n,y:r},u=await uk(t,l),d=yo(Ia(i)),h=wy(d);let p=c[h],m=c[d];if(s){const b=h==="y"?"top":"left",D=h==="y"?"bottom":"right",v=p+u[b],C=p-u[D];p=VS(v,p,C)}if(o){const b=d==="y"?"top":"left",D=d==="y"?"bottom":"right",v=m+u[b],C=m-u[D];m=VS(v,m,C)}const T=a.fn({...t,[h]:p,[d]:m});return{...T,data:{x:T.x-n,y:T.y-r,enabled:{[h]:s,[d]:o}}}}}},zq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Eu(e,t),u={x:n,y:r},d=yo(i),h=wy(d);let p=u[h],m=u[d];const T=Eu(a,t),b=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:0,crossAxis:0,...T};if(l){const C=h==="y"?"height":"width",S=s.reference[h]-s.floating[C]+b.mainAxis,O=s.reference[h]+s.reference[C]-b.mainAxis;pO&&(p=O)}if(c){var D,v;const C=h==="y"?"width":"height",S=dk.has(Ia(i)),O=s.reference[d]-s.floating[C]+(S&&((D=o.offset)==null?void 0:D[d])||0)+(S?0:b.crossAxis),R=s.reference[d]+s.reference[C]+(S?0:((v=o.offset)==null?void 0:v[d])||0)-(S?b.crossAxis:0);mR&&(m=R)}return{[h]:p,[d]:m}}}};function r1(){return typeof window<"u"}function zu(e){return hk(e)?(e.nodeName||"").toLowerCase():"#document"}function Oi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qs(e){var t;return(t=(hk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hk(e){return r1()?e instanceof Node||e instanceof Oi(e).Node:!1}function ms(e){return r1()?e instanceof Element||e instanceof Oi(e).Element:!1}function Us(e){return r1()?e instanceof HTMLElement||e instanceof Oi(e).HTMLElement:!1}function WS(e){return!r1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oi(e).ShadowRoot}const Vq=new Set(["inline","contents"]);function Th(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=gs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Vq.has(i)}const jq=new Set(["table","td","th"]);function Gq(e){return jq.has(zu(e))}const qq=[":popover-open",":modal"];function i1(e){return qq.some(t=>{try{return e.matches(t)}catch{return!1}})}const Wq=["transform","translate","scale","rotate","perspective"],Kq=["transform","translate","scale","rotate","perspective","filter"],Qq=["paint","layout","strict","content"];function _y(e){const t=Cy(),n=ms(e)?gs(e):e;return Wq.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Kq.some(r=>(n.willChange||"").includes(r))||Qq.some(r=>(n.contain||"").includes(r))}function Jq(e){let t=Ya(e);for(;Us(t)&&!vu(t);){if(_y(t))return t;if(i1(t))return null;t=Ya(t)}return null}function Cy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Xq=new Set(["html","body","#document"]);function vu(e){return Xq.has(zu(e))}function gs(e){return Oi(e).getComputedStyle(e)}function s1(e){return ms(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ya(e){if(zu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||WS(e)&&e.host||qs(e);return WS(t)?t.host:t}function pk(e){const t=Ya(e);return vu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Us(t)&&Th(t)?t:pk(t)}function $d(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=pk(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=Oi(i);if(s){const a=DA(o);return t.concat(o,o.visualViewport||[],Th(i)?i:[],a&&n?$d(a):[])}return t.concat(i,$d(i,[],n))}function DA(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fk(e){const t=gs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Us(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=Bf(n)!==s||Bf(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function Ny(e){return ms(e)?e:e.contextElement}function su(e){const t=Ny(e);if(!Us(t))return Is(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=fk(t);let o=(s?Bf(n.width):n.width)/r,a=(s?Bf(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const eW=Is(0);function mk(e){const t=Oi(e);return!Cy()||!t.visualViewport?eW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Oi(e)?!1:t}function jl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Ny(e);let o=Is(1);t&&(r?ms(r)&&(o=su(r)):o=su(e));const a=tW(s,n,r)?mk(s):Is(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const h=Oi(s),p=r&&ms(r)?Oi(r):r;let m=h,T=DA(m);for(;T&&r&&p!==m;){const b=su(T),D=T.getBoundingClientRect(),v=gs(T),C=D.left+(T.clientLeft+parseFloat(v.paddingLeft))*b.x,S=D.top+(T.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=C,c+=S,m=Oi(T),T=DA(m)}}return If({width:u,height:d,x:l,y:c})}function o1(e,t){const n=s1(e).scrollLeft;return t?t.left+n:jl(qs(e)).left+n}function gk(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-o1(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function nW(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=qs(r),a=t?i1(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Is(1);const u=Is(0),d=Us(r);if((d||!d&&!s)&&((zu(r)!=="body"||Th(o))&&(l=s1(r)),Us(r))){const p=jl(r);c=su(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const h=o&&!d&&!s?gk(o,l):Is(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function rW(e){return Array.from(e.getClientRects())}function iW(e){const t=qs(e),n=s1(e),r=e.ownerDocument.body,i=kl(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=kl(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+o1(e);const a=-n.scrollTop;return gs(r).direction==="rtl"&&(o+=kl(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const KS=25;function sW(e,t){const n=Oi(e),r=qs(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=Cy();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=o1(r);if(c<=0){const u=r.ownerDocument,d=u.body,h=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(r.clientWidth-d.clientWidth-p);m<=KS&&(s-=m)}else c<=KS&&(s+=c);return{width:s,height:o,x:a,y:l}}const oW=new Set(["absolute","fixed"]);function aW(e,t){const n=jl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Us(e)?su(e):Is(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function QS(e,t,n){let r;if(t==="viewport")r=sW(e,n);else if(t==="document")r=iW(qs(e));else if(ms(t))r=aW(t,n);else{const i=mk(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return If(r)}function Tk(e,t){const n=Ya(e);return n===t||!ms(n)||vu(n)?!1:gs(n).position==="fixed"||Tk(n,t)}function lW(e,t){const n=t.get(e);if(n)return n;let r=$d(e,[],!1).filter(a=>ms(a)&&zu(a)!=="body"),i=null;const s=gs(e).position==="fixed";let o=s?Ya(e):e;for(;ms(o)&&!vu(o);){const a=gs(o),l=_y(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&i&&oW.has(i.position)||Th(o)&&!l&&Tk(e,o))?r=r.filter(c=>c!==o):i=a,o=Ya(o)}return t.set(e,r),r}function cW(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?i1(t)?[]:lW(t,this._c):[].concat(n),r],o=s[0],a=s.reduce((l,c)=>{const u=QS(t,c,i);return l.top=kl(u.top,l.top),l.right=Mf(u.right,l.right),l.bottom=Mf(u.bottom,l.bottom),l.left=kl(u.left,l.left),l},QS(t,o,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function uW(e){const{width:t,height:n}=fk(e);return{width:t,height:n}}function dW(e,t,n){const r=Us(t),i=qs(t),s=n==="fixed",o=jl(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Is(0);function c(){l.x=o1(i)}if(r||!r&&!s)if((zu(t)!=="body"||Th(i))&&(a=s1(t)),r){const p=jl(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?gk(i,a):Is(0),d=o.left+a.scrollLeft-l.x-u.x,h=o.top+a.scrollTop-l.y-u.y;return{x:d,y:h,width:o.width,height:o.height}}function xg(e){return gs(e).position==="static"}function JS(e,t){if(!Us(e)||gs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qs(e)===n&&(n=n.ownerDocument.body),n}function Ak(e,t){const n=Oi(e);if(i1(e))return n;if(!Us(e)){let i=Ya(e);for(;i&&!vu(i);){if(ms(i)&&!xg(i))return i;i=Ya(i)}return n}let r=JS(e,t);for(;r&&Gq(r)&&xg(r);)r=JS(r,t);return r&&vu(r)&&xg(r)&&!_y(r)?n:r||Jq(e)||n}const hW=async function(e){const t=this.getOffsetParent||Ak,n=this.getDimensions,r=await n(e.floating);return{reference:dW(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pW(e){return gs(e).direction==="rtl"}const fW={convertOffsetParentRelativeRectToViewportRelativeRect:nW,getDocumentElement:qs,getClippingRect:cW,getOffsetParent:Ak,getElementRects:hW,getClientRects:rW,getDimensions:uW,getScale:su,isElement:ms,isRTL:pW};function bk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mW(e,t){let n=null,r;const i=qs(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=c;if(a||t(),!h||!p)return;const m=Wh(d),T=Wh(i.clientWidth-(u+h)),b=Wh(i.clientHeight-(d+p)),D=Wh(u),v={rootMargin:-m+"px "+-T+"px "+-b+"px "+-D+"px",threshold:kl(0,Mf(1,l))||1};let C=!0;function S(O){const R=O[0].intersectionRatio;if(R!==l){if(!C)return o();R?o(!1,R):r=setTimeout(()=>{o(!1,1e-7)},1e3)}R===1&&!bk(c,e.getBoundingClientRect())&&o(),C=!1}try{n=new IntersectionObserver(S,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return o(!0),s}function gW(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Ny(e),u=i||s?[...c?$d(c):[],...$d(t)]:[];u.forEach(D=>{i&&D.addEventListener("scroll",n,{passive:!0}),s&&D.addEventListener("resize",n)});const d=c&&a?mW(c,n):null;let h=-1,p=null;o&&(p=new ResizeObserver(D=>{let[v]=D;v&&v.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m,T=l?jl(e):null;l&&b();function b(){const D=jl(e);T&&!bk(T,D)&&n(),T=D,m=requestAnimationFrame(b)}return n(),()=>{var D;u.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),d?.(),(D=p)==null||D.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const TW=$q,AW=Uq,bW=Zq,yW=zq,EW=(e,t,n)=>{const r=new Map,i={platform:fW,...n},s={...i.platform,_c:r};return Hq(e,t,{...i,platform:s})};var SA={exports:{}},vW=SA.exports,XS;function DW(){return XS||(XS=1,function(e,t){(function(n,r){e.exports=r()})(typeof self<"u"?self:vW,function(){return(()=>{var n={646:o=>{o.exports=function(a){if(Array.isArray(a)){for(var l=0,c=new Array(a.length);l{o.exports=function(a,l,c){return l in a?Object.defineProperty(a,l,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[l]=c,a}},860:o=>{o.exports=function(a){if(Symbol.iterator in Object(a)||Object.prototype.toString.call(a)==="[object Arguments]")return Array.from(a)}},206:o=>{o.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},319:(o,a,l)=>{var c=l(646),u=l(860),d=l(206);o.exports=function(h){return c(h)||u(h)||d()}},8:o=>{function a(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o.exports=a=function(c){return typeof c}:o.exports=a=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},a(l)}o.exports=a}},r={};function i(o){var a=r[o];if(a!==void 0)return a.exports;var l=r[o]={exports:{}};return n[o](l,l.exports,i),l.exports}i.n=o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return i.d(a,{a}),a},i.d=(o,a)=>{for(var l in a)i.o(a,l)&&!i.o(o,l)&&Object.defineProperty(o,l,{enumerable:!0,get:a[l]})},i.o=(o,a)=>Object.prototype.hasOwnProperty.call(o,a),i.r=o=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var s={};return(()=>{i.r(s),i.d(s,{VueSelect:()=>H,default:()=>$,mixins:()=>W});var o=i(319),a=i.n(o),l=i(8),c=i.n(l),u=i(713),d=i.n(u);const h={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer:function(){this.autoscroll&&this.maybeAdjustScroll()},open:function(w){var U=this;this.autoscroll&&w&&this.$nextTick(function(){return U.maybeAdjustScroll()})}},methods:{maybeAdjustScroll:function(){var w,U=((w=this.$refs.dropdownMenu)===null||w===void 0?void 0:w.children[this.typeAheadPointer])||!1;if(U){var z=this.getDropdownViewport(),Y=U.getBoundingClientRect(),oe=Y.top,X=Y.bottom,De=Y.height;if(oez.bottom)return this.$refs.dropdownMenu.scrollTop=U.offsetTop-(z.height-De)}},getDropdownViewport:function(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},p={data:function(){return{typeAheadPointer:-1}},watch:{filteredOptions:function(){if(this.resetFocusOnOptionsChange){for(var w=0;w=0;w--)if(this.selectable(this.filteredOptions[w])){this.typeAheadPointer=w;break}},typeAheadDown:function(){for(var w=this.typeAheadPointer+1;w0&&arguments[0]!==void 0?arguments[0]:null;return this.mutableLoading=w??!this.mutableLoading}}};function T(w,U,z,Y,oe,X,De,G){var ie,ce=typeof w=="function"?w.options:w;return U&&(ce.render=U,ce.staticRenderFns=z,ce._compiled=!0),{exports:w,options:ce}}const b={Deselect:T({},function(){var w=this.$createElement,U=this._self._c||w;return U("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"}},[U("path",{attrs:{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"}})])},[]).exports,OpenIndicator:T({},function(){var w=this.$createElement,U=this._self._c||w;return U("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"}},[U("path",{attrs:{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"}})])},[]).exports},D={inserted:function(w,U,z){var Y=z.context;if(Y.appendToBody){document.body.appendChild(w);var oe=Y.$refs.toggle.getBoundingClientRect(),X=oe.height,De=oe.top,G=oe.left,ie=oe.width,ce=window.scrollX||window.pageXOffset,Se=window.scrollY||window.pageYOffset;w.unbindPosition=Y.calculatePosition(w,Y,{width:ie+"px",left:ce+G+"px",top:Se+De+X+"px"})}},unbind:function(w,U,z){z.context.appendToBody&&(w.unbindPosition&&typeof w.unbindPosition=="function"&&w.unbindPosition(),w.parentNode&&w.parentNode.removeChild(w))}},v=function(w){var U={};return Object.keys(w).sort().forEach(function(z){U[z]=w[z]}),JSON.stringify(U)};var C=0;const S=function(){return++C};function O(w,U){var z=Object.keys(w);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(w);U&&(Y=Y.filter(function(oe){return Object.getOwnPropertyDescriptor(w,oe).enumerable})),z.push.apply(z,Y)}return z}function R(w){for(var U=1;U-1}},filter:{type:Function,default:function(w,U){var z=this;return w.filter(function(Y){var oe=z.getOptionLabel(Y);return typeof oe=="number"&&(oe=oe.toString()),z.filterBy(Y,oe,U)})}},createOption:{type:Function,default:function(w){return c()(this.optionList[0])==="object"?d()({},this.label,w):w}},resetFocusOnOptionsChange:{type:Boolean,default:!0},resetOnOptionsChange:{default:!1,validator:function(w){return["function","boolean"].includes(c()(w))}},clearSearchOnBlur:{type:Function,default:function(w){var U=w.clearSearchOnSelect,z=w.multiple;return U&&!z}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:function(){return[13]}},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:function(w,U){return w}},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default:function(w,U,z){var Y=z.width,oe=z.top,X=z.left;w.style.top=oe,w.style.left=X,w.style.width=Y}},dropdownShouldOpen:{type:Function,default:function(w){var U=w.noDrop,z=w.open,Y=w.mutableLoading;return!U&&z&&!Y}},keyboardFocusBorder:{type:Boolean,default:!1},uid:{type:[String,Number],default:function(){return S()}}},data:function(){return{search:"",open:!1,isComposing:!1,isKeyboardNavigation:!1,pushedTags:[],_value:[]}},computed:{isTrackingValues:function(){return this.value===void 0||this.$options.propsData.hasOwnProperty("reduce")},selectedValue:function(){var w=this.value;return this.isTrackingValues&&(w=this.$data._value),w!=null&&w!==""?[].concat(w):[]},optionList:function(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl:function(){return this.$scopedSlots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope:function(){var w=this,U={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:R({id:this.inputId,disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,role:"combobox","aria-autocomplete":"list","aria-label":this.ariaLabelCombobox,"aria-controls":"vs-".concat(this.uid,"__listbox"),"aria-owns":"vs-".concat(this.uid,"__listbox"),"aria-expanded":this.dropdownOpen.toString(),ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":"vs-".concat(this.uid,"__option-").concat(this.typeAheadPointer)}:{}),events:{compositionstart:function(){return w.isComposing=!0},compositionend:function(){return w.isComposing=!1},keydown:this.onSearchKeyDown,keypress:this.onSearchKeyPress,blur:this.onSearchBlur,focus:this.onSearchFocus,input:function(z){return w.search=z.target.value}}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:U,listFooter:U,header:R({},U,{deselect:this.deselect}),footer:R({},U,{deselect:this.deselect})}},childComponents:function(){return R({},b,{},this.components)},stateClasses:function(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching:function(){return!!this.search},dropdownOpen:function(){return this.dropdownShouldOpen(this)},searchPlaceholder:function(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions:function(){var w=this,U=function(X){return w.limit!==null?X.slice(0,w.limit):X},z=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return U(z);var Y=this.search.length?this.filter(z,this.search,this):z;if(this.taggable&&this.search.length)try{var oe=this.createOption(this.search);this.optionExists(oe)||Y.unshift(oe)}catch{}return U(Y)},isValueEmpty:function(){return this.selectedValue.length===0},showClearButton:function(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options:function(w,U){var z=this;!this.taggable&&(typeof z.resetOnOptionsChange=="function"?z.resetOnOptionsChange(w,U,z.selectedValue):z.resetOnOptionsChange)&&this.clearSelection(),this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value)},value:{immediate:!0,handler:function(w){this.isTrackingValues&&this.setInternalValueFromOptions(w)}},multiple:function(){this.clearSelection()},open:function(w){this.$emit(w?"open":"close")},search:function(w){w.length&&(this.open=!0)}},created:function(){this.mutableLoading=this.loading,this.$on("option:created",this.pushTag)},methods:{setInternalValueFromOptions:function(w){var U=this;Array.isArray(w)?this.$data._value=w.map(function(z){return U.findOptionFromReducedValue(z)}):this.$data._value=this.findOptionFromReducedValue(w)},select:function(w){this.$emit("option:selecting",w),this.isOptionSelected(w)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(w):(this.taggable&&!this.optionExists(w)&&this.$emit("option:created",w),this.multiple&&(w=this.selectedValue.concat(w)),this.updateValue(w),this.$emit("option:selected",w)),this.onAfterSelect(w)},deselect:function(w){var U=this;this.$emit("option:deselecting",w),this.updateValue(this.selectedValue.filter(function(z){return!U.optionComparator(z,w)})),this.$emit("option:deselected",w)},keyboardDeselect:function(w,U){var z,Y;this.deselect(w);var oe=(z=this.$refs.deselectButtons)===null||z===void 0?void 0:z[U+1],X=(Y=this.$refs.deselectButtons)===null||Y===void 0?void 0:Y[U-1],De=oe??X;De?De.focus():this.searchEl.focus()},clearSelection:function(){this.updateValue(this.multiple?[]:null),this.searchEl.focus()},onAfterSelect:function(w){var U=this;this.closeOnSelect&&(this.open=!this.open),this.clearSearchOnSelect&&(this.search=""),this.noDrop&&this.multiple&&this.$nextTick(function(){return U.$refs.search.focus()})},updateValue:function(w){var U=this;this.value===void 0&&(this.$data._value=w),w!==null&&(w=Array.isArray(w)?w.map(function(z){return U.reduce(z)}):this.reduce(w)),this.$emit("input",w)},toggleDropdown:function(w){var U=w.target!==this.searchEl;U&&w.preventDefault();var z=[].concat(a()(this.$refs.deselectButtons||[]),a()([this.$refs.clearButton]));this.searchEl===void 0||z.filter(Boolean).some(function(Y){return Y.contains(w.target)||Y===w.target})?w.preventDefault():this.open&&U?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected:function(w){var U=this;return this.selectedValue.some(function(z){return U.optionComparator(z,w)})},isOptionDeselectable:function(w){return this.isOptionSelected(w)&&this.deselectFromDropdown},hasKeyboardFocusBorder:function(w){return!(!this.keyboardFocusBorder||!this.isKeyboardNavigation)&&w===this.typeAheadPointer},optionComparator:function(w,U){return this.getOptionKey(w)===this.getOptionKey(U)},findOptionFromReducedValue:function(w){var U=this,z=[].concat(a()(this.options),a()(this.pushedTags)).filter(function(Y){return JSON.stringify(U.reduce(Y))===JSON.stringify(w)});return z.length===1?z[0]:z.find(function(Y){return U.optionComparator(Y,U.$data._value)})||w},closeSearchOptions:function(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue:function(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){var w=null;this.multiple&&(w=a()(this.selectedValue.slice(0,this.selectedValue.length-1))),this.updateValue(w)}},optionExists:function(w){var U=this;return this.optionList.some(function(z){return U.optionComparator(z,w)})},optionAriaSelected:function(w){return this.selectable(w)?String(this.isOptionSelected(w)):null},normalizeOptionForSlot:function(w){return c()(w)==="object"?w:d()({},this.label,w)},pushTag:function(w){this.pushedTags.push(w)},onEscape:function(){this.search.length?this.search="":this.open=!1},onSearchBlur:function(){if(!this.mousedown||this.searching){var w=this.clearSearchOnSelect,U=this.multiple;return this.clearSearchOnBlur({clearSearchOnSelect:w,multiple:U})&&(this.search=""),void this.closeSearchOptions()}this.mousedown=!1,this.search.length!==0||this.options.length!==0||this.closeSearchOptions()},onSearchFocus:function(){this.open=!0,this.$emit("search:focus")},onMousedown:function(){this.mousedown=!0},onMouseUp:function(){this.mousedown=!1},onMouseMove:function(w,U){this.isKeyboardNavigation=!1,this.selectable(w)&&(this.typeAheadPointer=U)},onSearchKeyDown:function(w){var U=this,z=function(X){if(X.preventDefault(),U.open)return!U.isComposing&&U.typeAheadSelect();U.open=!0},Y={8:function(X){return U.maybeDeleteValue()},9:function(X){return U.onTab()},27:function(X){return U.onEscape()},38:function(X){if(X.preventDefault(),U.isKeyboardNavigation=!0,U.open)return U.typeAheadUp();U.open=!0},40:function(X){if(X.preventDefault(),U.isKeyboardNavigation=!0,U.open)return U.typeAheadDown();U.open=!0}};this.selectOnKeyCodes.forEach(function(X){return Y[X]=z});var oe=this.mapKeydown(Y,this);if(typeof oe[w.keyCode]=="function")return oe[w.keyCode](w)},onSearchKeyPress:function(w){this.open||w.keyCode!==32||(w.preventDefault(),this.open=!0)}}},function(){var w=this,U=w.$createElement,z=w._self._c||U;return z("div",{staticClass:"v-select",class:w.stateClasses,attrs:{id:"v-select-"+w.uid,dir:w.dir}},[w._t("header",null,null,w.scope.header),w._v(" "),z("div",{ref:"toggle",staticClass:"vs__dropdown-toggle"},[z("div",{ref:"selectedOptions",staticClass:"vs__selected-options",on:{mousedown:w.toggleDropdown}},[w._l(w.selectedValue,function(Y,oe){return w._t("selected-option-container",[z("span",{key:w.getOptionKey(Y),staticClass:"vs__selected"},[w._t("selected-option",[w._v(` `+w._s(w.getOptionLabel(Y))+` `)],null,w.normalizeOptionForSlot(Y)),w._v(" "),w.multiple?z("button",{ref:"deselectButtons",refInFor:!0,staticClass:"vs__deselect",attrs:{disabled:w.disabled,type:"button",title:w.ariaLabelDeselectOption(w.getOptionLabel(Y)),"aria-label":w.ariaLabelDeselectOption(w.getOptionLabel(Y))},on:{mousedown:function(X){return X.stopPropagation(),w.deselect(Y)},keydown:function(X){return!X.type.indexOf("key")&&w._k(X.keyCode,"enter",13,X.key,"Enter")?null:w.keyboardDeselect(Y,oe)}}},[z(w.childComponents.Deselect,{tag:"component"})],1):w._e()],2)],{option:w.normalizeOptionForSlot(Y),deselect:w.deselect,multiple:w.multiple,disabled:w.disabled})}),w._v(" "),w._t("search",[z("input",w._g(w._b({staticClass:"vs__search"},"input",w.scope.search.attributes,!1),w.scope.search.events))],null,w.scope.search)],2),w._v(" "),z("div",{ref:"actions",staticClass:"vs__actions"},[z("button",{directives:[{name:"show",rawName:"v-show",value:w.showClearButton,expression:"showClearButton"}],ref:"clearButton",staticClass:"vs__clear",attrs:{disabled:w.disabled,type:"button",title:w.ariaLabelClearSelected,"aria-label":w.ariaLabelClearSelected},on:{click:w.clearSelection}},[z(w.childComponents.Deselect,{tag:"component"})],1),w._v(" "),w.noDrop?w._e():z("button",{ref:"openIndicatorButton",staticClass:"vs__open-indicator-button",attrs:{type:"button",tabindex:"-1","aria-labelledby":"vs-"+w.uid+"__listbox","aria-controls":"vs-"+w.uid+"__listbox","aria-expanded":w.dropdownOpen.toString()},on:{mousedown:w.toggleDropdown}},[w._t("open-indicator",[z(w.childComponents.OpenIndicator,w._b({tag:"component"},"component",w.scope.openIndicator.attributes,!1))],null,w.scope.openIndicator)],2),w._v(" "),w._t("spinner",[z("div",{directives:[{name:"show",rawName:"v-show",value:w.mutableLoading,expression:"mutableLoading"}],staticClass:"vs__spinner"},[w._v("Loading...")])],null,w.scope.spinner)],2)]),w._v(" "),z("transition",{attrs:{name:w.transition}},[w.dropdownOpen?z("ul",{directives:[{name:"append-to-body",rawName:"v-append-to-body"}],key:"vs-"+w.uid+"__listbox",ref:"dropdownMenu",staticClass:"vs__dropdown-menu",attrs:{id:"vs-"+w.uid+"__listbox",role:"listbox","aria-label":w.ariaLabelListbox,"aria-multiselectable":w.multiple,tabindex:"-1"},on:{mousedown:function(Y){return Y.preventDefault(),w.onMousedown(Y)},mouseup:w.onMouseUp}},[w._t("list-header",null,null,w.scope.listHeader),w._v(" "),w._l(w.filteredOptions,function(Y,oe){return z("li",{key:w.getOptionKey(Y),staticClass:"vs__dropdown-option",class:{"vs__dropdown-option--deselect":w.isOptionDeselectable(Y)&&oe===w.typeAheadPointer,"vs__dropdown-option--selected":w.isOptionSelected(Y),"vs__dropdown-option--highlight":oe===w.typeAheadPointer,"vs__dropdown-option--kb-focus":w.hasKeyboardFocusBorder(oe),"vs__dropdown-option--disabled":!w.selectable(Y)},attrs:{id:"vs-"+w.uid+"__option-"+oe,role:"option","aria-selected":w.optionAriaSelected(Y)},on:{mousemove:function(X){return w.onMouseMove(Y,oe)},click:function(X){X.preventDefault(),X.stopPropagation(),w.selectable(Y)&&w.select(Y)}}},[w._t("option",[w._v(` `+w._s(w.getOptionLabel(Y))+` `)],null,w.normalizeOptionForSlot(Y))],2)}),w._v(" "),w.filteredOptions.length===0?z("li",{staticClass:"vs__no-options"},[w._t("no-options",[w._v(` Sorry, no matching options. `)],null,w.scope.noOptions)],2):w._e(),w._v(" "),w._t("list-footer",null,null,w.scope.listFooter)],2):z("ul",{staticStyle:{display:"none",visibility:"hidden"},attrs:{id:"vs-"+w.uid+"__listbox",role:"listbox","aria-label":w.ariaLabelListbox}})]),w._v(" "),w._t("footer",null,null,w.scope.footer)],2)},[]).exports,W={ajax:m,pointer:p,pointerScroll:h},$=H})(),s})()})}(SA)),SA.exports}var ul=DW();const SW={name:"ChevronDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var wW=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon chevron-down-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},_W=[],CW=ut(SW,wW,_W,!1,null,null);const NW=CW.exports,FW={name:"NcEllipsisedOption",components:{NcHighlight:t1},props:{name:{type:String,default:""},search:{type:String,default:""}},computed:{needsTruncate(){return this.name&&this.name.length>=10},split(){return this.name.length-Math.min(Math.floor(this.name.length/2),10)},part1(){return this.needsTruncate?this.name.slice(0,this.split):this.name},part2(){return this.needsTruncate?this.name.slice(this.split):""},highlight1(){return this.search?ak(this.name,this.search):[]},highlight2(){return this.highlight1.map(e=>({start:e.start-this.split,end:e.end-this.split}))}}};var OW=function(){var e=this,t=e._self._c;return t("span",{staticClass:"name-parts",attrs:{dir:"auto",title:e.name}},[t("NcHighlight",{staticClass:"name-parts__first",attrs:{text:e.part1,search:e.search,highlight:e.highlight1}}),e.part2?t("NcHighlight",{staticClass:"name-parts__last",attrs:{text:e.part2,search:e.search,highlight:e.highlight2}}):e._e()],1)},xW=[],kW=ut(FW,OW,xW,!1,null,"592b8444");const RW=kW.exports,yk=Jr(Ek());window.addEventListener("resize",()=>{yk.value=Ek()});function Ek(){return window.outerHeight===window.screen.height}Lu(yk);const Fy=1024,vk=Fy/2,Yf=e=>document.documentElement.clientWidth{Oy.value=Yf(Fy),MW.value=Yf(vk)},{passive:!0});function rbe(){return Lu(Oy)}Lu(Oy);var wA={exports:{}},BW=wA.exports,e2;function LW(){return e2||(e2=1,function(e){(function(t){if(typeof n!="function"){var n=function(m){return m};n.nonNative=!0}const r=n("plaintext"),i=n("html"),s=n("comment"),o=/<(\w*)>/g,a=/<\/?([^\s\/>]+)/;function l(m,T,b){m=m||"",T=T||[],b=b||"";let D=u(T,b);return d(m,D)}function c(m,T){m=m||[],T=T||"";let b=u(m,T);return function(D){return d(D||"",b)}}l.init_streaming_mode=c;function u(m,T){return m=h(m),{allowable_tags:m,tag_replacement:T,state:r,tag_buffer:"",depth:0,in_quote_char:""}}function d(m,T){if(typeof m!="string")throw new TypeError("'html' parameter must be a string");let b=T.allowable_tags,D=T.tag_replacement,v=T.state,C=T.tag_buffer,S=T.depth,O=T.in_quote_char,R="";for(let H=0,W=m.length;H":if(O)break;if(S){S--;break}O="",v=r,C+=">",b.has(p(C))?R+=C:R+=D,C="";break;case'"':case"'":$===O?O="":O=O||$,C+=$;break;case"-":C==="":C.slice(-2)=="--"&&(v=r),C="";break;default:C+=$;break}}return T.state=v,T.tag_buffer=C,T.depth=S,T.in_quote_char=O,R}function h(m){let T=new Set;if(typeof m=="string"){let b;for(;b=o.exec(m);)T.add(b[1])}else!n.nonNative&&typeof m[n.iterator]=="function"?T=new Set(m):typeof m.forEach=="function"&&m.forEach(T.add,T);return T}function p(m){let T=a.exec(m);return T?T[1].toLowerCase():null}e.exports?e.exports=l:t.striptags=l})(BW)}(wA)),wA.exports}LW();function Hf(e=document.body){const t=window.getComputedStyle(e).getPropertyValue("--background-invert-if-dark");return t!==void 0?t==="invert(100%)":!1}Hf();const IW=Symbol.for("nc:theme:enforced");function YW(e){const t=as(()=>yl(e)??document.body),n=Jr(Hf(t.value)),r=e6();function i(){n.value=Hf(t.value)}return t6(t,i,{attributes:!0}),ba(t,i),ba(r,i,{immediate:!0}),Lu(n)}const HW=XB(()=>YW());function a1(){const e=HW(),t=Ed(IW,void 0);return as(()=>t?.value?t.value==="dark":e.value)}function Dk(e){return IB()?(YB(e),!0):!1}function rd(e){return typeof e=="function"?e():ah(e)}const Sk=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ZW=Object.prototype.toString,PW=e=>ZW.call(e)==="[object Object]",id=()=>{},_A=$W();function $W(){var e,t;return Sk&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}const t2={mounted:"inserted",unmounted:"unbind"};function UW(...e){if(e.length!==1)return HB(...e);const t=e[0];return typeof t=="function"?Lu(ZB(()=>({get:t,set:id}))):Jr(t)}function H0(e){var t;const n=rd(e);return(t=n?.$el)!=null?t:n}const wk=Sk?window:void 0;function Zp(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=wk):[t,n,r,i]=e,!t)return id;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],o=()=>{s.forEach(u=>u()),s.length=0},a=(u,d,h,p)=>(u.addEventListener(d,h,p),()=>u.removeEventListener(d,h,p)),l=ba(()=>[H0(t),rd(i)],([u,d])=>{if(o(),!u)return;const h=PW(d)?{...d}:d;s.push(...n.flatMap(p=>r.map(m=>a(u,p,m,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),o()};return Dk(c),c}let n2=!1;function r2(e,t,n={}){const{window:r=wk,ignore:i=[],capture:s=!0,detectIframe:o=!1}=n;if(!r)return id;_A&&!n2&&(n2=!0,Array.from(r.document.body.children).forEach(u=>u.addEventListener("click",id)),r.document.documentElement.addEventListener("click",id));let a=!0;const l=u=>i.some(d=>{if(typeof d=="string")return Array.from(r.document.querySelectorAll(d)).some(h=>h===u.target||u.composedPath().includes(h));{const h=H0(d);return h&&(u.target===h||u.composedPath().includes(h))}}),c=[Zp(r,"click",u=>{const d=H0(e);if(!(!d||d===u.target||u.composedPath().includes(d))){if(u.detail===0&&(a=!l(u)),!a){a=!0;return}t(u)}},{passive:!0,capture:s}),Zp(r,"pointerdown",u=>{const d=H0(e);a=!l(u)&&!!(d&&!u.composedPath().includes(d))},{passive:!0}),o&&Zp(r,"blur",u=>{setTimeout(()=>{var d;const h=H0(e);((d=r.document.activeElement)==null?void 0:d.tagName)==="IFRAME"&&!h?.contains(r.document.activeElement)&&t(u)},0)})].filter(Boolean);return()=>c.forEach(u=>u())}const zW={[t2.mounted](e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=r2(e,t.value,{capture:n});else{const[r,i]=t.value;e.__onClickOutside_stop=r2(e,r,Object.assign({capture:n},i))}},[t2.unmounted](e){e.__onClickOutside_stop()}};function kg(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function _k(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Rg=new WeakMap;function jW(e,t=!1){const n=Jr(t);let r=null,i="";ba(UW(e),a=>{const l=kg(rd(a));if(l){const c=l;if(Rg.get(c)||Rg.set(c,c.style.overflow),c.style.overflow!=="hidden"&&(i=c.style.overflow),c.style.overflow==="hidden")return n.value=!0;if(n.value)return c.style.overflow="hidden"}},{immediate:!0});const s=()=>{const a=kg(rd(e));!a||n.value||(_A&&(r=Zp(a,"touchmove",l=>{VW(l)},{passive:!1})),a.style.overflow="hidden",n.value=!0)},o=()=>{const a=kg(rd(e));!a||!n.value||(_A&&r?.(),a.style.overflow=i,Rg.delete(a),n.value=!1)};return Dk(o),as({get(){return n.value},set(a){a?s():o()}})}function GW(){let e=!1;const t=Jr(!1);return(n,r)=>{if(t.value=r.value,e)return;e=!0;const i=jW(n,r.value);ba(t,s=>i.value=s)}}GW();const i2=/(\s|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/ig;function Ck(e,t){const n=(u,d)=>u.startsWith(d)?u.slice(d.length):u,r=(u,...d)=>d.reduce((h,p)=>n(h,p),u);if(!e)return null;const i=/^https?:\/\//.test(t),s=/^[a-z][a-z0-9+.-]*:.+/.test(t);if(!i&&s||i&&!t.startsWith(Ov())||!i&&!t.startsWith("/"))return null;const o=i?r(t,Ov(),"/index.php"):t,a=r(e.history.base,BB(),"/index.php"),l=r(o,a)||"/",c=e.resolve(l).route;return c.matched.length?c.fullPath:null}function qW(e){return window._nc_contacts_menu_hooks?Object.values(window._nc_contacts_menu_hooks).filter(t=>t.enabled(e)):[]}var s2={exports:{}},o2={exports:{}},a2;function WW(){return a2||(a2=1,function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,r){return n<>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var r=0;r0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],i=0,s=0;i>>5]|=n[i]<<24-s%32;return r},wordsToBytes:function(n){for(var r=[],i=0;i>>5]>>>24-i%32&255);return r},bytesToHex:function(n){for(var r=[],i=0;i>>4).toString(16)),r.push((n[i]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],i=0;i>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],i=0,s=0;i>>6-s*2);return r}};o2.exports=t}()),o2.exports}var Mg,l2;function c2(){if(l2)return Mg;l2=1;var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var n=[],r=0;r>>24)&16711935|(a[p]<<24|a[p]>>>8)&4278255360;a[l>>>5]|=128<>>9<<4)+14]=l;for(var m=i._ff,T=i._gg,b=i._hh,D=i._ii,p=0;p>>0,u=u+C>>>0,d=d+S>>>0,h=h+O>>>0}return e.endian([c,u,d,h])};i._ff=function(s,o,a,l,c,u,d){var h=s+(o&a|~o&l)+(c>>>0)+d;return(h<>>32-u)+o},i._gg=function(s,o,a,l,c,u,d){var h=s+(o&l|a&~l)+(c>>>0)+d;return(h<>>32-u)+o},i._hh=function(s,o,a,l,c,u,d){var h=s+(o^a^l)+(c>>>0)+d;return(h<>>32-u)+o},i._ii=function(s,o,a,l,c,u,d){var h=s+(a^(o|~l))+(c>>>0)+d;return(h<>>32-u)+o},i._blocksize=16,i._digestsize=16,s2.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=e.wordsToBytes(i(s,o));return o&&o.asBytes?a:o&&o.asString?r.bytesToString(a):e.bytesToHex(a)}}()),s2.exports}var JW=QW();const XW=Wl(JW);ft(Q4);class jn{constructor(t,n,r,i){this.r=t,this.g=n,this.b=r,this.name=i,this.r=Math.min(t,255),this.g=Math.min(n,255),this.b=Math.min(r,255),this.name=i}get color(){const t=n=>`00${n.toString(16)}`.slice(-2);return`#${t(this.r)}${t(this.g)}${t(this.b)}`}}function eK(e,t,n){return{r:(n.r-t.r)/e,g:(n.g-t.g)/e,b:(n.b-t.b)/e}}function Lg(e,t,n){const r=[];r.push(t);const i=eK(e,t,n);for(let s=1;s `,nK=` `,rK=` `,iK=` `,sK=` `,T2=` `,A2=` `,oK=` `,aK=` `;ft(J4),ft(X4);function Fk(e){switch(e){case"away":return ge("away");case"busy":return ge("busy");case"dnd":return ge("do not disturb");case"online":return ge("online");case"invisible":return ge("invisible");case"offline":return ge("offline");default:return e}}const lK={online:Xo?oK:aK,away:Xo?g2:nK,busy:Xo?g2:rK,dnd:Xo?iK:sK,invisible:Xo?T2:A2,offline:Xo?T2:A2},cK={name:"NcUserStatusIcon",props:{user:{type:String,default:null},status:{type:String,default:null,validator:e=>["online","away","busy","dnd","invisible","offline"].includes(e)},ariaHidden:{type:String,default:null,validator:e=>["true","false"].includes(e)}},data(){return{fetchedUserStatus:null}},computed:{activeStatus(){return this.status??this.fetchedUserStatus},activeSvg(){return lK[this.activeStatus]??null},ariaLabel(){return this.ariaHidden==="true"?null:ge("User status: {status}",{status:Fk(this.activeStatus)})}},watch:{user:{immediate:!0,async handler(e){if(!e||!_m()?.user_status?.enabled){this.fetchedUserStatus=null;return}try{const{data:t}=await Jn.get(Ni("/apps/user_status/api/v1/statuses/{user}",{user:e}));this.fetchedUserStatus=t.ocs?.data?.status}catch{this.fetchedUserStatus=null}}}}};var uK=function(){var e=this,t=e._self._c;return e.activeStatus?t("span",{staticClass:"user-status-icon",class:{"user-status-icon--invisible":["invisible","offline"].includes(e.status)},attrs:{role:"img","aria-hidden":e.ariaHidden,"aria-label":e.ariaLabel},domProps:{innerHTML:e._s(e.activeSvg)}}):e._e()},dK=[],hK=ut(cK,uK,dK,!1,null,"86b73d39");const Ok=hK.exports,pK={name:"NcActionLink",mixins:[qm],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{href:{type:String,required:!0,validator:e=>{try{return new URL(e)}catch{return e.startsWith("#")||e.startsWith("/")}}},download:{type:String,default:null},target:{type:String,default:"_self",validator:e=>e&&(!e.startsWith("_")||["_blank","_self","_parent","_top"].indexOf(e)>-1)},title:{type:String,default:null},ariaHidden:{type:Boolean,default:null}}};var fK=function(){var e=this,t=e._self._c;return t("li",{staticClass:"action",attrs:{role:e.isInSemanticMenu&&"presentation"}},[t("a",{staticClass:"action-link focusable",attrs:{download:e.download,href:e.href,"aria-label":e.ariaLabel,target:e.target,title:e.title,rel:"nofollow noreferrer noopener",role:e.isInSemanticMenu&&"menuitem"},on:{click:e.onClick}},[e._t("icon",function(){return[t("span",{staticClass:"action-link__icon",class:[e.isIconUrl?"action-link__icon--url":e.icon],style:{backgroundImage:e.isIconUrl?`url(${e.icon})`:null},attrs:{"aria-hidden":"true"}})]}),e.name?t("span",{staticClass:"action-link__longtext-wrapper"},[t("strong",{staticClass:"action-link__name"},[e._v(" "+e._s(e.name)+" ")]),t("br"),t("span",{staticClass:"action-link__longtext",domProps:{textContent:e._s(e.text)}})]):e.isLongText?t("span",{staticClass:"action-link__longtext",domProps:{textContent:e._s(e.text)}}):t("span",{staticClass:"action-link__text"},[e._v(e._s(e.text))]),e._e()],2)])},mK=[],gK=ut(pK,fK,mK,!1,null,"86e09254");const xk=gK.exports,TK={name:"NcActionRouter",mixins:[qm],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{to:{type:[String,Object],required:!0},exact:{type:Boolean,default:!1}}};var AK=function(){var e=this,t=e._self._c;return t("li",{staticClass:"action",attrs:{role:e.isInSemanticMenu&&"presentation"}},[t("RouterLink",{staticClass:"action-router focusable",attrs:{to:e.to,"aria-label":e.ariaLabel,exact:e.exact,title:e.title,rel:"nofollow noreferrer noopener",role:e.isInSemanticMenu&&"menuitem"},nativeOn:{click:function(n){return e.onClick.apply(null,arguments)}}},[e._t("icon",function(){return[t("span",{staticClass:"action-router__icon",class:[e.isIconUrl?"action-router__icon--url":e.icon],style:{backgroundImage:e.isIconUrl?`url(${e.icon})`:null},attrs:{"aria-hidden":"true"}})]}),e.name?t("span",{staticClass:"action-router__longtext-wrapper"},[t("strong",{staticClass:"action-router__name"},[e._v(" "+e._s(e.name)+" ")]),t("br"),t("span",{staticClass:"action-router__longtext",domProps:{textContent:e._s(e.text)}})]):e.isLongText?t("span",{staticClass:"action-router__longtext",domProps:{textContent:e._s(e.text)}}):t("span",{staticClass:"action-router__text"},[e._v(e._s(e.text))]),e._e()],2)],1)},bK=[],yK=ut(TK,AK,bK,!1,null,"4dae1ff7");const EK=yK.exports,vK={name:"NcActionText",mixins:[qm],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}}};var DK=function(){var e=this,t=e._self._c;return t("li",{staticClass:"action",attrs:{role:e.isInSemanticMenu&&"presentation"}},[t("span",{staticClass:"action-text",on:{click:e.onClick}},[e._t("icon",function(){return[e.icon!==""?t("span",{staticClass:"action-text__icon",class:[e.isIconUrl?"action-text__icon--url":e.icon],style:{backgroundImage:e.isIconUrl?`url(${e.icon})`:null},attrs:{"aria-hidden":"true"}}):e._e()]}),e.name?t("span",{staticClass:"action-text__longtext-wrapper"},[t("strong",{staticClass:"action-text__name"},[e._v(" "+e._s(e.name)+" ")]),t("span",{staticClass:"action-text__longtext",domProps:{textContent:e._s(e.text)}})]):e.isLongText?t("span",{staticClass:"action-text__longtext",domProps:{textContent:e._s(e.text)}}):t("span",{staticClass:"action-text__text"},[e._v(e._s(e.text))]),e._e()],2)])},SK=[],wK=ut(vK,DK,SK,!1,null,"2fe7eb92");const _K=wK.exports;ft(eB);const kk={data(){return{hasStatus:!1,userStatus:{status:null,message:null,icon:null}}},methods:{async fetchUserStatus(e){if(!e)return;const t=_m();if(!(!Object.hasOwn(t,"user_status")||!t.user_status.enabled)&&vd())try{const{data:n}=await Jn.get(Ni("apps/user_status/api/v1/statuses/{userId}",{userId:e})),{status:r,message:i,icon:s}=n.ocs.data;this.userStatus.status=r,this.userStatus.message=i||"",this.userStatus.icon=s||"",this.hasStatus=!0}catch(n){if(n.response.status===404&&n.response.data.ocs?.data?.length===0)return;gr.error("Could not fetch user status",{error:n})}}}},Rk=ab("nextcloud").persist().build();function CK(e){const t=Rk.getItem("user-has-avatar."+e);return typeof t=="string"?!!t:null}function b2(e,t){e&&Rk.setItem("user-has-avatar."+e,t)}const NK={name:"NcAvatar",directives:{ClickOutside:zW},components:{IconDotsHorizontal:_N,NcActions:Vs,NcButton:qi,NcIconSvgWrapper:Iu,NcLoadingIcon:Bu,NcUserStatusIcon:Ok},mixins:[kk],props:{url:{type:String,default:void 0},iconClass:{type:String,default:void 0},user:{type:String,default:void 0},hideStatus:{type:Boolean,default:!1},showUserStatus:{type:Boolean,default:!0},verboseStatus:{type:Boolean,default:!1},showUserStatusCompact:{type:Boolean,default:!0},preloadedUserStatus:{type:Object,default:void 0},isGuest:{type:Boolean,default:!1},displayName:{type:String,default:void 0},size:{type:Number,default:32},noPlaceholder:{type:Boolean,default:!1},allowPlaceholder:{type:Boolean,default:!0},disableTooltip:{type:Boolean,default:!1},disableMenu:{type:Boolean,default:!1},tooltipMessage:{type:String,default:null},isNoUser:{type:Boolean,default:!1},menuContainer:{type:[Boolean,String,Object,Element],default:"body"}},setup(){return{isDarkTheme:a1()}},data(){return{avatarUrlLoaded:null,avatarSrcSetLoaded:null,userDoesNotExist:!1,isAvatarLoaded:!1,isMenuLoaded:!1,contactsMenuLoading:!1,contactsMenuData:{},contactsMenuActions:[],contactsMenuOpenState:!1}},computed:{avatarAriaLabel(){if(this.hasMenu)return this.canDisplayUserStatus||this.showUserStatusIconOnAvatar?ge("Avatar of {displayName}, {status}",{displayName:this.displayName??this.user,status:Fk(this.userStatus.status)}):ge("Avatar of {displayName}",{displayName:this.displayName??this.user})},canDisplayUserStatus(){return!this.hideStatus&&this.showUserStatus&&this.hasStatus&&["online","away","busy","dnd"].includes(this.userStatus.status)},showUserStatusIconOnAvatar(){return!this.hideStatus&&this.showUserStatus&&!this.verboseStatus&&this.showUserStatusCompact&&this.hasStatus&&this.userStatus.status!=="dnd"&&this.userStatus.icon},userIdentifier(){return this.isDisplayNameDefined?this.displayName:this.isUserDefined?this.user:""},isUserDefined(){return typeof this.user<"u"},isDisplayNameDefined(){return typeof this.displayName<"u"},isUrlDefined(){return typeof this.url<"u"},hasMenu(){return this.disableMenu?!1:this.isMenuLoaded?this.menu.length>0:!(this.user===vd()?.uid||this.userDoesNotExist||this.url)},showInitials(){return!this.noPlaceholder&&this.allowPlaceholder&&this.userDoesNotExist&&!(this.iconClass||this.$slots.icon)},avatarStyle(){return{"--avatar-size":this.size+"px",lineHeight:this.showInitials?this.size+"px":0,fontSize:Math.round(this.size*.45)+"px"}},initialsWrapperStyle(){const{r:e,g:t,b:n}=m2(this.userIdentifier);return{backgroundColor:`rgba(${e}, ${t}, ${n}, 0.1)`}},initialsStyle(){const{r:e,g:t,b:n}=m2(this.userIdentifier);return{color:`rgb(${e}, ${t}, ${n})`}},tooltip(){return this.disableTooltip?!1:this.tooltipMessage?this.tooltipMessage:this.displayName},initials(){let e="?";if(this.showInitials){const t=this.userIdentifier.trim();if(t==="")return e;const n=t.match(/[\p{L}\p{N}\s]/gu);if(!n)return e;const r=n.join(""),i=r.lastIndexOf(" ");e=String.fromCodePoint(r.codePointAt(0)),i!==-1&&(e=e.concat(String.fromCodePoint(r.codePointAt(i+1))))}return e.toLocaleUpperCase()},menu(){const e=this.contactsMenuActions.map(n=>{const r=Ck(this.$router,n.hyperlink);return{ncActionComponent:r?EK:xk,ncActionComponentProps:r?{to:r,icon:n.icon}:{href:n.hyperlink,icon:n.icon},text:n.title}});for(const n of qW(this.contactsMenuData))try{e.push({ncActionComponent:Bo,ncActionComponentProps:{},ncActionComponentHandlers:{click:()=>n.callback(this.contactsMenuData)},text:n.displayName(this.contactsMenuData),iconSvg:n.iconSvg(this.contactsMenuData)})}catch(r){gr.error(`Failed to render ContactsMenu action ${n.id}`,{error:r,action:n})}function t(n){const r=document.createTextNode(n),i=document.createElement("p");return i.appendChild(r),i.innerHTML}if(!this.hideStatus&&this.showUserStatus&&(this.userStatus.icon||this.userStatus.message)){const n=` ${t(this.userStatus.icon)} `;return[{ncActionComponent:_K,ncActionComponentProps:{},iconSvg:this.userStatus.icon?n:void 0,text:`${this.userStatus.message}`}].concat(e)}return e}},watch:{url(){this.userDoesNotExist=!1,this.loadAvatarUrl()},user(){this.userDoesNotExist=!1,this.isMenuLoaded=!1,this.loadAvatarUrl()}},mounted(){this.loadAvatarUrl(),Kc("settings:avatar:updated",this.loadAvatarUrl),Kc("settings:display-name:updated",this.loadAvatarUrl),!this.hideStatus&&this.showUserStatus&&this.user&&!this.isNoUser&&(this.preloadedUserStatus?(this.userStatus.status=this.preloadedUserStatus.status||"",this.userStatus.message=this.preloadedUserStatus.message||"",this.userStatus.icon=this.preloadedUserStatus.icon||"",this.hasStatus=this.preloadedUserStatus.status!==null):this.fetchUserStatus(this.user),Kc("user_status:status.updated",this.handleUserStatusUpdated))},beforeDestroy(){wp("settings:avatar:updated",this.loadAvatarUrl),wp("settings:display-name:updated",this.loadAvatarUrl),wp("user_status:status.updated",this.handleUserStatusUpdated)},methods:{t:ge,handleUserStatusUpdated(e){this.user===e.userId&&(this.userStatus={status:e.status,icon:e.icon,message:e.message},this.hasStatus=e.status!==null)},async toggleMenu(e){e.type==="keydown"&&e.key!=="Enter"||(this.contactsMenuOpenState||await this.fetchContactsMenu(),this.contactsMenuOpenState=!this.contactsMenuOpenState)},closeMenu(){this.contactsMenuOpenState=!1},async fetchContactsMenu(){this.contactsMenuLoading=!0;try{const e=encodeURIComponent(this.user),{data:t}=await Jn.post(cs("contactsmenu/findOne"),`shareType=0&shareWith=${e}`);this.contactsMenuData=t,this.contactsMenuActions=t.topAction?[t.topAction].concat(t.actions):t.actions}catch{this.contactsMenuOpenState=!1}this.contactsMenuLoading=!1,this.isMenuLoaded=!0},loadAvatarUrl(){if(this.isAvatarLoaded=!1,!this.isUrlDefined&&(!this.isUserDefined||this.isNoUser||this.iconClass)){this.isAvatarLoaded=!0,this.userDoesNotExist=!0;return}if(this.isUrlDefined){this.updateImageIfValid(this.url);return}if(this.size<=64){const e=this.avatarUrlGenerator(this.user,64),t=[e+" 1x",this.avatarUrlGenerator(this.user,512)+" 8x"].join(", ");this.updateImageIfValid(e,t)}else{const e=this.avatarUrlGenerator(this.user,512);this.updateImageIfValid(e)}},avatarUrlGenerator(e,t){let n=Nk(e,{size:t,isDarkTheme:this.isDarkTheme,isGuest:this.isGuest});return e===vd()?.uid&&typeof window.oc_userconfig<"u"&&(n+="?v="+window.oc_userconfig.avatar.version),n},updateImageIfValid(e,t=null){const n=CK(this.user);if(this.isUserDefined&&typeof n=="boolean"){this.isAvatarLoaded=!0,this.avatarUrlLoaded=e,t&&(this.avatarSrcSetLoaded=t),n===!1&&(this.userDoesNotExist=!0);return}const r=new Image;r.onload=()=>{this.avatarUrlLoaded=e,t&&(this.avatarSrcSetLoaded=t),this.isAvatarLoaded=!0,b2(this.user,!0)},r.onerror=i=>{gr.debug("Invalid avatar url",{error:i,url:e}),this.avatarUrlLoaded=null,this.avatarSrcSetLoaded=null,this.userDoesNotExist=!0,this.isAvatarLoaded=!1,b2(this.user,!1)},t&&(r.srcset=t),r.src=e}}};var FK=function(){var e=this,t=e._self._c;return t("span",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeMenu,expression:"closeMenu"}],staticClass:"avatardiv popovermenu-wrapper",class:{"avatardiv--unknown":e.userDoesNotExist,"avatardiv--with-menu":e.hasMenu,"avatardiv--with-menu-loading":e.contactsMenuLoading},style:e.avatarStyle,attrs:{title:e.tooltip}},[e._t("icon",function(){return[e.iconClass?t("span",{staticClass:"avatar-class-icon",class:e.iconClass}):e.isAvatarLoaded&&!e.userDoesNotExist?t("img",{attrs:{src:e.avatarUrlLoaded,srcset:e.avatarSrcSetLoaded,alt:""}}):e._e()]}),e.hasMenu&&e.menu.length===0?t("NcButton",{staticClass:"action-item action-item__menutoggle",attrs:{"aria-label":e.avatarAriaLabel,variant:"tertiary-no-background"},on:{click:e.toggleMenu},scopedSlots:e._u([{key:"icon",fn:function(){return[e.contactsMenuLoading?t("NcLoadingIcon"):t("IconDotsHorizontal",{attrs:{size:20}})]},proxy:!0}],null,!1,1269954734)}):e.hasMenu?t("NcActions",{attrs:{"aria-label":e.avatarAriaLabel,container:e.menuContainer,"force-menu":"","manual-open":"",open:e.contactsMenuOpenState,variant:"tertiary-no-background"},on:{"update:open":function(n){e.contactsMenuOpenState=n},click:e.toggleMenu},scopedSlots:e._u([e.contactsMenuLoading?{key:"icon",fn:function(){return[t("NcLoadingIcon")]},proxy:!0}:null],null,!0)},e._l(e.menu,function(n,r){return t(n.ncActionComponent,e._g(e._b({key:r,tag:"component",scopedSlots:e._u([n.iconSvg?{key:"icon",fn:function(){return[t("NcIconSvgWrapper",{attrs:{svg:n.iconSvg}})]},proxy:!0}:null],null,!0)},"component",n.ncActionComponentProps,!1),n.ncActionComponentHandlers),[e._v(" "+e._s(n.text)+" ")])}),1):e._e(),e.showUserStatusIconOnAvatar?t("span",{staticClass:"avatardiv__user-status avatardiv__user-status--icon"},[e._v(" "+e._s(e.userStatus.icon)+" ")]):e.canDisplayUserStatus?t("NcUserStatusIcon",{staticClass:"avatardiv__user-status",attrs:{status:e.userStatus.status,"aria-hidden":String(e.hasMenu)}}):e._e(),e.showInitials?t("span",{staticClass:"avatardiv__initials-wrapper",style:e.initialsWrapperStyle},[t("span",{staticClass:"avatardiv__initials",style:e.initialsStyle},[e._v(" "+e._s(e.initials)+" ")])]):e._e()],2)},OK=[],xK=ut(NK,FK,OK,!1,null,"936fbce2");const Mk=xK.exports,kK=8,y2=32,RK={name:"NcListItemIcon",components:{NcAvatar:Mk,NcHighlight:t1,NcIconSvgWrapper:Iu},mixins:[kk],props:{name:{type:String,required:!0},subname:{type:String,default:""},icon:{type:String,default:""},iconSvg:{type:String,default:""},iconName:{type:String,default:""},search:{type:String,default:""},avatarSize:{type:Number,default:y2},noMargin:{type:Boolean,default:!1},displayName:{type:String,default:null},isNoUser:{type:Boolean,default:!1},id:{type:String,default:null}},setup(){return{margin:kK,defaultSize:y2}},computed:{hasIcon(){return this.icon!==""},hasIconSvg(){return this.iconSvg!==""},isValidSubname(){return this.subname?.trim?.()!==""},isSizeBigEnough(){return this.avatarSize>=26},cssVars(){const e=this.noMargin?0:this.margin;return{"--height":this.avatarSize+2*e+"px","--margin":this.margin+"px"}},searchParts(){const e=/^([^<]*)<([^>]+)>?$/,t=this.search.match(e);return this.isNoUser||!t?[this.search,this.search]:[t[1].trim(),t[2]]}},beforeMount(){!this.isNoUser&&!this.subname&&this.fetchUserStatus(this.user)}};var MK=function(){var e=this,t=e._self._c;return t("span",e._g({staticClass:"option",class:{"option--compact":e.avatarSize({...e,...t.props}),{}),ariaLabelClearSelected:{type:String,default:ge("Clear selected")},ariaLabelCombobox:{type:String,default:null},ariaLabelListbox:{type:String,default:ge("Options")},ariaLabelDeselectOption:{type:Function,default:e=>ge("Deselect {option}",{option:e})},appendToBody:{type:Boolean,default:!0},calculatePosition:{type:Function,default:null},closeOnSelect:{type:Boolean,default:!0},keepOpen:{type:Boolean,default:!1},components:{type:Object,default:()=>({Deselect:{render:e=>e(CN,{props:{size:20,fillColor:"var(--vs-controls-color)"},style:{cursor:"pointer"}})}})},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},dropdownShouldOpen:{type:Function,default:({noDrop:e,open:t})=>e?!1:t},filterBy:{type:Function,default:null},inputClass:{type:[String,Object],default:null},inputId:{type:String,default:()=>`select-input-${Hs()}`},inputLabel:{type:String,default:null},labelOutside:{type:Boolean,default:!1},keyboardFocusBorder:{type:Boolean,default:!0},label:{type:String,default:null},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},noWrap:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},placeholder:{type:String,default:""},mapKeydown:{type:Function,default(e,t){return{...e,27:n=>{t.open&&n.stopPropagation(),e[27](n)}}}},uid:{type:String,default:()=>Hs()},placement:{type:String,default:"bottom"},resetFocusOnOptionsChange:{type:Boolean,default:!0},userSelect:{type:Boolean,default:!1},value:{type:[String,Number,Object,Array],default:void 0},modelValue:{type:[String,Number,Object,Array],default:null},required:{type:Boolean,default:!1}," ":{}},emits:[" ","input","update:modelValue","update:model-value"],setup(){const e=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),t=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline")),n=e-2*t,r=js("value","input");return{avatarSize:n,model:r}},data(){return{search:""}},computed:{inputRequired(){return this.required?this.model===null||Array.isArray(this.model)&&this.model.length===0:null},localCalculatePosition(){return this.calculatePosition!==null?this.calculatePosition:(e,t,{width:n})=>{e.style.width=n;const r={name:"addClass",fn(){return e.classList.add("vs__dropdown-menu--floating"),{}}},i={name:"togglePlacementClass",fn({placement:o}){return t.$el.classList.toggle("select--drop-up",o==="top"),e.classList.toggle("vs__dropdown-menu--floating-placement-top",o==="top"),{}}},s=()=>{EW(t.$refs.toggle,e,{placement:this.placement,middleware:[TW(-1),r,i,bW(),AW({limiter:yW()})]}).then(({x:o,y:a})=>{Object.assign(e.style,{left:`${o}px`,top:`${a}px`,width:`${t.$refs.toggle.getBoundingClientRect().width}px`})})};return gW(t.$refs.toggle,e,s)}},localFilterBy(){const e=/[^<]*<([^>]+)/;return this.filterBy!==null?this.filterBy:this.userSelect?(t,n,r)=>{const i=r.match(e);return i&&t.subname?.toLocaleLowerCase?.()?.indexOf(i[1].toLocaleLowerCase())>-1||`${n} ${t.subname}`.toLocaleLowerCase().indexOf(r.toLocaleLowerCase())>-1}:ul.VueSelect.props.filterBy.default},localLabel(){return this.label!==null?this.label:this.userSelect?"displayName":ul.VueSelect.props.label.default},propsToForward(){const e=[...Object.keys(ul.VueSelect.props),...ul.VueSelect.mixins.flatMap(t=>Object.keys(t.props??{}))];return{...Object.fromEntries(Object.entries(this.$props).filter(([t])=>e.includes(t))),value:this.model,calculatePosition:this.localCalculatePosition,closeOnSelect:this.closeOnSelect&&!this.keepOpen,filterBy:this.localFilterBy,label:this.localLabel}},listenersToForward(){return{...this.$listeners,input:e=>{this.model=e}}}},mounted(){!this.labelOutside&&!this.inputLabel&&!this.ariaLabelCombobox&&gi.util.warn("[NcSelect] An `inputLabel` or `ariaLabelCombobox` should be set. If an external label is used, `labelOutside` should be set to `true`."),this.inputLabel&&this.ariaLabelCombobox&&gi.util.warn("[NcSelect] Only one of `inputLabel` or `ariaLabelCombobox` should to be set.")},methods:{t:ge}};var HK=function(){var e=this,t=e._self._c;return t("VueSelect",e._g(e._b({staticClass:"select",class:{"select--no-wrap":e.noWrap,"user-select":e.userSelect},on:{search:n=>e.search=n},scopedSlots:e._u([!e.labelOutside&&e.inputLabel?{key:"header",fn:function(){return[t("label",{staticClass:"select__label",attrs:{for:e.inputId}},[e._v(" "+e._s(e.inputLabel)+" ")])]},proxy:!0}:null,{key:"search",fn:function({attributes:n,events:r}){return[t("input",e._g(e._b({staticClass:"vs__search",class:e.inputClass,attrs:{required:e.inputRequired,dir:"auto"}},"input",n,!1),r))]}},{key:"open-indicator",fn:function({attributes:n}){return[t("ChevronDown",e._b({style:{cursor:e.disabled?null:"pointer"},attrs:{"fill-color":"var(--vs-controls-color)",size:26}},"ChevronDown",n,!1))]}},{key:"option",fn:function(n){return[e._t("option",function(){return[e.userSelect?t("NcListItemIcon",e._b({attrs:{"avatar-size":32,name:n[e.localLabel],search:e.search}},"NcListItemIcon",n,!1)):t("NcEllipsisedOption",{attrs:{name:String(n[e.localLabel]),search:e.search}})]},null,n)]}},{key:"selected-option",fn:function(n){return[e._t("selected-option",function(){return[e.userSelect?t("NcListItemIcon",e._b({attrs:{"avatar-size":e.avatarSize,name:n[e.localLabel],"no-margin":"",search:e.search}},"NcListItemIcon",n,!1)):t("NcEllipsisedOption",{attrs:{name:String(n[e.localLabel]),search:e.search}})]},{vBind:n})]}},{key:"spinner",fn:function(n){return[n.loading?t("NcLoadingIcon"):e._e()]}},{key:"no-options",fn:function(){return[e._v(" "+e._s(e.t("No results"))+" ")]},proxy:!0},e._l(e.$scopedSlots,function(n,r){return{key:r,fn:function(i){return[e._t(r,null,null,i)]}}})],null,!0)},"VueSelect",e.propsToForward,!1),e.listenersToForward))},ZK=[],PK=ut(YK,HK,ZK,!1,null,null);const l1=PK.exports;ft(nB);const $K=3*60*1e3,UK={name:"NcReferenceWidget",components:{NcButton:qi},props:{reference:{type:Object,required:!0},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},setup(){const e=Jr(!1),t=Jr(),{width:n}=n6(t);return r6(t,([r])=>{bN(()=>{e.value=r.isIntersecting})}),{width:n,isVisible:e,widgetRoot:t}},data(){return{showInteractive:!1,rendered:!1,idleTimeout:null}},computed:{isInteractive(){return!this.interactiveOptIn&&this.interactive||this.showInteractive},hasFullWidth(){return mq(this.reference.richObjectType)},hasCustomWidget(){return zS(this.reference.richObjectType)},hasInteractiveView(){return zS(this.reference.richObjectType)&&fq(this.reference.richObjectType)},noAccess(){return this.reference&&!this.reference.accessible},descriptionStyle(){if(this.numberOfLines===0)return{display:"none"};const e=this.numberOfLines;return{lineClamp:e,webkitLineClamp:e}},numberOfLines(){return[450,550,650,1/0].findIndex(e=>this.width{this.isVisible||this.destroyWidget()},$K);return}this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),this.rendered||this.renderWidget()},immediate:!0}},beforeDestroy(){this.destroyWidget()},methods:{t:ge,enableInteractive(){this.showInteractive=!0,this.renderWidget()},renderWidget(){if(!this.$refs.customWidget||this?.reference?.richObjectType==="open-graph")return;this.$refs.customWidget.innerHTML="";const e=document.createElement("div");e.style="width: 100%;",this.$refs.customWidget.appendChild(e),this.$nextTick(()=>{hq(e,{...this.reference,interactive:this.isInteractive}),this.rendered=!0})},destroyWidget(){this.rendered&&(pq(this.reference.richObjectType,this.$el),this.rendered=!1)}}};var zK=function(){var e=this,t=e._self._c;return t("div",{ref:"widgetRoot",class:{"toggle-interactive":e.hasInteractiveView&&!e.isInteractive}},[e.reference&&e.hasCustomWidget?t("div",{ref:"customWidget",staticClass:"widget-custom",class:{"full-width":e.hasFullWidth}}):!e.noAccess&&e.reference&&e.reference.openGraphObject&&!e.hasCustomWidget?t(e.referenceWidgetLinkComponent,e._b({tag:"component",staticClass:"widget-default",attrs:{rel:"noopener noreferrer"}},"component",e.referenceWidgetLinkProps,!1),[e.reference.openGraphObject.thumb?t("img",{staticClass:"widget-default--image",attrs:{src:e.reference.openGraphObject.thumb}}):e._e(),t("div",{staticClass:"widget-default--details"},[t("p",{staticClass:"widget-default--name"},[e._v(" "+e._s(e.reference.openGraphObject.name)+" ")]),t("p",{staticClass:"widget-default--description",style:e.descriptionStyle},[e._v(" "+e._s(e.reference.openGraphObject.description)+" ")]),t("p",{staticClass:"widget-default--link"},[e._v(" "+e._s(e.compactLink)+" ")])])]):e._e(),e.interactiveOptIn&&e.hasInteractiveView&&!e.isInteractive?t("NcButton",{staticClass:"toggle-interactive--button",on:{click:e.enableInteractive}},[e._v(" "+e._s(e.t("Enable interactive view"))+" ")]):e._e()],1)},VK=[],jK=ut(UK,zK,VK,!1,null,"f05dd81b");const Bk=jK.exports,GK={name:"NcCustomPickerElement",props:{provider:{type:Object,required:!0}},emits:["cancel","submit"],data(){return{isRegistered:Pd(this.provider.id),renderResult:null}},mounted(){this.isRegistered&&this.renderElement()},beforeDestroy(){this.isRegistered&&bq(this.provider.id,this.$el,this.renderResult)},methods:{renderElement(){this.$refs.domElement&&(this.$refs.domElement.innerHTML="");const e=Aq(this.$refs.domElement,{providerId:this.provider.id,accessible:!1});Promise.resolve(e).then(t=>{this.renderResult=t,this.renderResult.object?._isVue&&this.renderResult.object?.$on&&(this.renderResult.object.$on("submit",this.onSubmit),this.renderResult.object.$on("cancel",this.onCancel)),this.renderResult.element.addEventListener("submit",n=>{this.onSubmit(n.detail)}),this.renderResult.element.addEventListener("cancel",this.onCancel)})},onSubmit(e){this.$emit("submit",e)},onCancel(){this.$emit("cancel")}}};var qK=function(){var e=this,t=e._self._c;return t("div",{ref:"domElement"})},WK=[],KK=ut(GK,qK,WK,!1,null,"0547d92f");const QK=KK.exports,JK={name:"LinkVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var XK=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon link-variant-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},eQ=[],tQ=ut(JK,XK,eQ,!1,null,null);const xy=tQ.exports;ft(rB);const Lk="any-link",Ik={id:Lk,title:ge("Any link"),order:0,icon_url:LB("core","filetypes/link.svg")};window._vue_richtext_reference_providers??=Vl("core","reference-provider-list",[]),window._vue_richtext_reference_provider_timestamps??=Vl("core","reference-provider-timestamps",{});function nQ(e){return e===Lk?Ik:Yk().find(t=>t.id===e)}function Yk(){return window._vue_richtext_reference_providers.filter(e=>{const t=!!e.search_providers_ids&&e.search_providers_ids.length>0||Pd(e.id);return t||gr.debug(`[smart picker] ${e.id} reference provider is discoverable but does not have any related search provider or custom picker component registered`),t})}function rQ(e){const t=window._vue_richtext_reference_provider_timestamps;return e.sort((n,r)=>n.order===r.order?0:n.order>r.order?1:-1).sort((n,r)=>{const i=t[n.id],s=t[r.id];return i===s?0:s===void 0?-1:i===void 0?1:i>s?-1:1})}function Hk(e,t){const n=Yk(),r=e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),i=new RegExp(r,"i"),s=rQ(n).filter(a=>a.title.match(i)),o=t?s.slice(0,t):s;return(e===""||o.length===0)&&o.push(Ik),o}async function iQ(e){const t=Math.floor(Date.now()/1e3),n=Ni("references/provider/{providerId}",{providerId:e});await Jn.put(n,{timestamp:t}),window._vue_richtext_reference_provider_timestamps[e]=t}ft(mN,iB);let E2=0;function Zk(e,t){return function(){const n=this,r=arguments;clearTimeout(E2),E2=setTimeout(function(){e.apply(n,r)},t)}}function ky(e){try{return!!new URL(e)}catch{return!1}}const sQ={name:"NcProviderList",components:{NcSelect:l1,NcHighlight:t1,NcEmptyContent:Sy,LinkVariantIcon:xy},emits:["select-provider","submit"],data(){return{selectedProvider:null,query:"",multiselectPlaceholder:ge("Select provider"),providerIconAlt:ge("Provider icon")}},computed:{options(){const e=[];return this.query!==""&&ky(this.query)&&e.push({id:this.query,title:this.query,isLink:!0}),e.push(...Hk(this.query)),e}},methods:{focus(){setTimeout(()=>{this.$refs["provider-select"]?.$el?.querySelector("#provider-select-input")?.focus()},300)},onProviderSelected(e){e!==null&&(e.isLink?this.$emit("submit",e.title):this.$emit("select-provider",e),this.selectedProvider=null)},onSearch(e){this.query=e}}};var oQ=function(){var e=this,t=e._self._c;return t("div",{staticClass:"provider-list"},[t("NcSelect",{ref:"provider-select",staticClass:"provider-list--select",attrs:{"input-id":"provider-select-input",label:"title",placeholder:e.multiselectPlaceholder,options:e.options,"append-to-body":!1,"clear-search-on-select":!0,"clear-search-on-blur":()=>!1,filterable:!1},on:{search:e.onSearch,input:e.onProviderSelected},scopedSlots:e._u([{key:"option",fn:function(n){return[n.isLink?t("div",{staticClass:"provider"},[t("LinkVariantIcon",{staticClass:"link-icon",attrs:{size:20}}),t("span",[e._v(e._s(n.title))])],1):t("div",{staticClass:"provider"},[t("img",{staticClass:"provider-icon",attrs:{src:n.icon_url,alt:e.providerIconAlt}}),t("NcHighlight",{staticClass:"option-text",attrs:{search:e.query,text:n.title}})],1)]}}]),model:{value:e.selectedProvider,callback:function(n){e.selectedProvider=n},expression:"selectedProvider"}}),t("NcEmptyContent",{staticClass:"provider-list--empty-content",scopedSlots:e._u([{key:"icon",fn:function(){return[t("LinkVariantIcon")]},proxy:!0}])})],1)},aQ=[],lQ=ut(sQ,oQ,aQ,!1,null,"f39d58d9");const cQ=lQ.exports;ft(sB);const uQ={name:"NcRawLinkInput",components:{LinkVariantIcon:xy,NcEmptyContent:Sy,NcLoadingIcon:Bu,NcReferenceWidget:Bk,NcTextField:Jm},props:{provider:{type:Object,required:!0}},emits:["submit"],data(){return{inputValue:"",loading:!1,reference:null,abortController:null,inputPlaceholder:ge("Enter link")}},computed:{isLinkValid(){return ky(this.inputValue)}},methods:{focus(){this.$refs["url-input"].$el.getElementsByTagName("input")[0]?.focus()},onSubmit(e){const t=e.target.value;this.isLinkValid&&this.$emit("submit",t)},onClear(){this.inputValue="",this.reference=null},onInput(){this.reference=null,this.abortController&&this.abortController.abort(),this.isLinkValid&&Zk(()=>{this.updateReference()},500)()},updateReference(){this.loading=!0,this.abortController=new AbortController,Jn.get(Ni("references/resolve",2)+"?reference="+encodeURIComponent(this.inputValue),{signal:this.abortController.signal}).then(e=>{this.reference=e.data.ocs.data.references[this.inputValue]}).catch(e=>{gr.error("Could not update reference",{error:e})}).then(()=>{this.loading=!1})}}};var dQ=function(){var e=this,t=e._self._c;return t("div",{staticClass:"raw-link"},[t("div",{staticClass:"input-wrapper"},[t("NcTextField",{ref:"url-input",attrs:{value:e.inputValue,"show-trailing-button":e.inputValue!=="",label:e.inputPlaceholder},on:{"update:value":[function(n){e.inputValue=n},e.onInput],"trailing-button-click":e.onClear},nativeOn:{keyup:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.onSubmit.apply(null,arguments)}}},[e.loading?t("NcLoadingIcon",{attrs:{size:16}}):t("LinkVariantIcon",{attrs:{size:16}})],1)],1),e.reference!==null?t("NcReferenceWidget",{staticClass:"reference-widget",attrs:{reference:e.reference}}):t("NcEmptyContent",{staticClass:"raw-link--empty-content",scopedSlots:e._u([{key:"icon",fn:function(){return[e.provider.icon_url?t("img",{staticClass:"provider-icon",attrs:{src:e.provider.icon_url}}):t("LinkVariantIcon")]},proxy:!0}])})],1)},hQ=[],pQ=ut(uQ,dQ,hQ,!1,null,"be630586");const fQ=pQ.exports,mQ={name:"NcSearchResult",components:{NcHighlight:t1},props:{entry:{type:Object,required:!0},query:{type:String,required:!0}}};var gQ=function(){var e=this,t=e._self._c;return t("div",{staticClass:"result"},[e.entry.icon?t("div",{staticClass:"result--icon-class",class:{[e.entry.icon]:!0,rounded:e.entry.rounded}}):t("img",{staticClass:"result--image",class:{rounded:e.entry.rounded},attrs:{src:e.entry.thumbnailUrl}}),t("div",{staticClass:"result--content"},[t("span",{staticClass:"result--content--name"},[t("NcHighlight",{attrs:{search:e.query,text:e.entry.title}})],1),t("span",{staticClass:"result--content--subline"},[t("NcHighlight",{attrs:{search:e.query,text:e.entry.subline}})],1)])])},TQ=[],AQ=ut(mQ,gQ,TQ,!1,null,"995c2758");const bQ=AQ.exports;ft(oB,mN,gN);const v2=5,yQ={name:"NcSearch",components:{LinkVariantIcon:xy,DotsHorizontalIcon:_N,NcEmptyContent:Sy,NcSelect:l1,NcSearchResult:bQ},props:{provider:{type:Object,required:!0},showEmptyContent:{type:Boolean,default:!0},searchPlaceholder:{type:String,default:null}},emits:["submit"],data(){return{searchQuery:"",selectedResult:null,resultsBySearchProvider:{},searching:!1,searchingMoreOf:null,abortController:null,noOptionsText:ge("Start typing to search"),providerIconAlt:ge("Provider icon")}},computed:{mySearchPlaceholder(){return this.searchPlaceholder||ge("Search")},searchProviderIds(){return this.provider.search_providers_ids},options(){if(this.searchQuery==="")return[];const e=[];return ky(this.searchQuery)&&e.push(this.rawLinkEntry),e.push(...this.formattedSearchResults),e},rawLinkEntry(){return{id:"rawLinkEntry",resourceUrl:this.searchQuery,isRawLink:!0}},formattedSearchResults(){const e=[];return this.searchProviderIds.forEach(t=>{if(this.resultsBySearchProvider[t].entries.length>0){(this.searchProviderIds.length>1||this.resultsBySearchProvider[t].entries.length>1)&&e.push({id:"groupTitle-"+t,name:this.resultsBySearchProvider[t].name,isCustomGroupTitle:!0,providerId:t});const n=this.resultsBySearchProvider[t].entries.map((r,i)=>({id:"provider-"+t+"-entry-"+i,...r}));e.push(...n),this.resultsBySearchProvider[t].isPaginated&&e.push({id:"moreOf-"+t,name:this.resultsBySearchProvider[t].name,isMore:!0,providerId:t,isLoading:this.searchingMoreOf===t})}}),e}},mounted(){this.resetResults()},beforeDestroy(){this.cancelSearchRequests()},methods:{t:ge,resetResults(){const e={};this.searchProviderIds.forEach(t=>{e[t]={entries:[]}}),this.resultsBySearchProvider=e},focus(){setTimeout(()=>{this.$refs["search-select"]?.$el?.querySelector("#search-select-input")?.focus()},300)},cancelSearchRequests(){this.abortController&&this.abortController.abort()},onSearchInput(e){this.searchQuery=e,Zk(()=>{this.updateSearch()},500)()},onSelectResultSelected(e){e!==null&&(e.resourceUrl?(this.cancelSearchRequests(),this.$emit("submit",e.resourceUrl)):e.isMore&&this.searchMoreOf(e.providerId).then(()=>{this.selectedResult=null}))},searchMoreOf(e){return this.searchingMoreOf=e,this.cancelSearchRequests(),this.searchProviders(e)},updateSearch(){if(this.cancelSearchRequests(),this.resetResults(),this.searchQuery===""){this.searching=!1;return}return this.searchProviders()},searchProviders(e=null){this.abortController=new AbortController,this.searching=!0;const t=e===null?[...this.searchProviderIds].map(n=>this.searchOneProvider(n)):[this.searchOneProvider(e,this.resultsBySearchProvider[e]?.cursor??null)];return Promise.allSettled(t).then(n=>{n.find(r=>r.status==="rejected"&&(r.reason.name==="CanceledError"||r.reason.code==="ERR_CANCELED"))||(this.searching=!1,this.searchingMoreOf=null)})},searchOneProvider(e,t=null){const n=t===null?Ni("search/providers/{providerId}/search?term={term}&limit={limit}",{providerId:e,term:this.searchQuery,limit:v2}):Ni("search/providers/{providerId}/search?term={term}&limit={limit}&cursor={cursor}",{providerId:e,term:this.searchQuery,limit:v2,cursor:t});return Jn.get(n,{signal:this.abortController.signal}).then(r=>{const i=r.data.ocs.data;this.resultsBySearchProvider[e].name=i.name,this.resultsBySearchProvider[e].cursor=i.cursor,this.resultsBySearchProvider[e].isPaginated=i.isPaginated,this.resultsBySearchProvider[e].entries.push(...i.entries)})}}};var EQ=function(){var e=this,t=e._self._c;return t("div",{staticClass:"smart-picker-search",class:{"with-empty-content":e.showEmptyContent}},[t("NcSelect",{ref:"search-select",staticClass:"smart-picker-search--select",attrs:{"input-id":"search-select-input",label:"name",placeholder:e.mySearchPlaceholder,options:e.options,"append-to-body":!1,"close-on-select":!1,"clear-search-on-select":!1,"clear-search-on-blur":()=>!1,"reset-focus-on-options-change":!1,filterable:!1,autoscroll:!0,"reset-on-options-change":!1,loading:e.searching},on:{search:e.onSearchInput,input:e.onSelectResultSelected},scopedSlots:e._u([{key:"option",fn:function(n){return[n.isRawLink?t("div",{staticClass:"custom-option"},[t("LinkVariantIcon",{staticClass:"option-simple-icon",attrs:{size:20}}),t("span",{staticClass:"option-text"},[e._v(" "+e._s(e.t("Raw link {options}",{options:n.resourceUrl}))+" ")])],1):n.resourceUrl?t("NcSearchResult",{staticClass:"search-result",attrs:{entry:n,query:e.searchQuery}}):n.isCustomGroupTitle?t("span",{staticClass:"custom-option group-name"},[e.provider.icon_url?t("img",{staticClass:"provider-icon group-name-icon",attrs:{src:e.provider.icon_url}}):e._e(),t("span",{staticClass:"option-text"},[t("strong",[e._v(e._s(n.name))])])]):n.isMore?t("span",{staticClass:"custom-option"},[n.isLoading?t("span",{staticClass:"option-simple-icon icon-loading-small"}):t("DotsHorizontalIcon",{staticClass:"option-simple-icon",attrs:{size:20}}),t("span",{staticClass:"option-text"},[e._v(" "+e._s(e.t('Load more "{options}"',{options:n.name}))+" ")])],1):e._e()]}},{key:"no-options",fn:function(){return[e._v(" "+e._s(e.noOptionsText)+" ")]},proxy:!0}]),model:{value:e.selectedResult,callback:function(n){e.selectedResult=n},expression:"selectedResult"}}),e.showEmptyContent?t("NcEmptyContent",{staticClass:"smart-picker-search--empty-content",scopedSlots:e._u([{key:"icon",fn:function(){return[e.provider.icon_url?t("img",{staticClass:"provider-icon",attrs:{alt:e.providerIconAlt,src:e.provider.icon_url}}):t("LinkVariantIcon")]},proxy:!0}],null,!1,2922132592)}):e._e()],1)},vQ=[],DQ=ut(yQ,EQ,vQ,!1,null,"e61f71e3");const SQ=DQ.exports,s0={providerList:1,standardLinkInput:2,searchInput:3,customElement:4},wQ={name:"NcReferencePicker",components:{NcCustomPickerElement:QK,NcProviderList:cQ,NcRawLinkInput:fQ,NcSearch:SQ},props:{initialProvider:{type:Object,default:()=>null},width:{type:Number,default:null},focusOnCreate:{type:Boolean,default:!0}},emits:["cancel","cancel-raw-link","cancel-search","provider-selected","submit"],data(){return{MODES:s0,selectedProvider:this.initialProvider}},computed:{mode(){return this.selectedProvider===null?s0.providerList:Pd(this.selectedProvider.id)?s0.customElement:this.selectedProvider.search_providers_ids?s0.searchInput:s0.standardLinkInput},pickerWrapperStyle(){return{width:this.width?this.width+"px":void 0}}},mounted(){this.focusOnCreate&&(this.initialProvider?setTimeout(()=>{this.$refs["url-input"]?.focus()},300):this.$nextTick(()=>{this.$refs["provider-list"]?.focus()}))},methods:{onEscapePressed(){this.selectedProvider!==null?this.deselectProvider():this.cancelProviderSelection()},onProviderSelected(e){this.selectedProvider=e,this.$emit("provider-selected",e),this.$nextTick(()=>{this.$refs["url-input"]?.focus()})},cancelCustomElement(){this.deselectProvider()},cancelSearch(){this.$emit("cancel-search",this.selectedProvider?.title),this.deselectProvider()},cancelRawLinkInput(){this.$emit("cancel-raw-link",this.selectedProvider?.title),this.deselectProvider()},cancelProviderSelection(){this.$emit("cancel")},submitLink(e){this.selectedProvider!==null&&iQ(this.selectedProvider.id),this.$emit("submit",e),this.deselectProvider()},deselectProvider(){this.selectedProvider=null,this.$emit("provider-selected",null),setTimeout(()=>{this.$refs["provider-list"]?.focus()},300)}}};var _Q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"reference-picker",style:e.pickerWrapperStyle,attrs:{tabindex:"-1"},on:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:(n.stopPropagation(),n.preventDefault(),e.onEscapePressed.apply(null,arguments))}}},[e.mode===e.MODES.providerList?t("NcProviderList",{ref:"provider-list",on:{"select-provider":e.onProviderSelected,submit:e.submitLink,cancel:e.cancelProviderSelection}}):e.mode===e.MODES.standardLinkInput?t("NcRawLinkInput",{ref:"url-input",attrs:{provider:e.selectedProvider},on:{submit:e.submitLink,cancel:e.cancelRawLinkInput}}):e.mode===e.MODES.searchInput?t("NcSearch",{ref:"url-input",attrs:{provider:e.selectedProvider},on:{cancel:e.cancelSearch,submit:e.submitLink}}):e.mode===e.MODES.customElement?t("div",{staticClass:"custom-element-wrapper"},[t("NcCustomPickerElement",{staticClass:"custom-element",attrs:{provider:e.selectedProvider},on:{submit:e.submitLink,cancel:e.cancelCustomElement}})],1):e._e()],1)},CQ=[],NQ=ut(wQ,_Q,CQ,!1,null,"646d5538");const FQ=NQ.exports;ft(lB,aB);const OQ={name:"NcReferencePickerModal",components:{NcReferencePicker:FQ,NcModal:lb,NcButton:qi,ArrowLeftIcon:uq,CloseIcon:CN},props:{initialProvider:{type:Object,default:()=>null},focusOnCreate:{type:Boolean,default:!0},isInsideViewer:{type:Boolean,default:!1}},emits:["cancel","submit"],data(){return{show:!0,selectedProvider:this.initialProvider,backButtonTitle:ge("Back to provider selection"),closeButtonTitle:ge("Close"),closeButtonLabel:ge("Close Smart Picker")}},computed:{isProviderSelected(){return this.selectedProvider!==null},showBackButton(){return this.initialProvider===null&&this.isProviderSelected},modalSize(){return this.isProviderSelected&&Pd(this.selectedProvider.id)?gq(this.selectedProvider.id)??"large":"normal"},showModalName(){return!this.isProviderSelected||!Pd(this.selectedProvider.id)},modalName(){return this.isProviderSelected?this.selectedProvider.title:ge("Smart Picker")}},mounted(){if(this.isInsideViewer){const e=this.$refs.modal_content;uu("viewer:trapElements:changed",e)}},methods:{onCancel(){this.show=!1,this.$emit("cancel")},onSubmit(e){this.show=!1,this.$emit("submit",e)},onProviderSelect(e){this.selectedProvider=e,e===null&&this.initialProvider!==null&&this.onCancel()},onBackClicked(){this.$refs.referencePicker.deselectProvider()}}};var xQ=function(){var e=this,t=e._self._c;return e.show?t("NcModal",{staticClass:"reference-picker-modal",attrs:{size:e.modalSize,"can-close":!0},on:{close:e.onCancel}},[t("div",{ref:"modal_content",staticClass:"reference-picker-modal--content"},[e.showBackButton?t("NcButton",{staticClass:"back-button",attrs:{"aria-label":e.backButtonTitle,title:e.backButtonTitle},on:{click:e.onBackClicked},scopedSlots:e._u([{key:"icon",fn:function(){return[t("ArrowLeftIcon")]},proxy:!0}],null,!1,3001860362)}):e._e(),t("NcButton",{staticClass:"close-button",attrs:{"aria-label":e.closeButtonLabel,title:e.closeButtonTitle,variant:"tertiary"},on:{click:e.onCancel},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon")]},proxy:!0}],null,!1,2491825086)}),e.showModalName?t("h2",[e._v(" "+e._s(e.modalName)+" ")]):e._e(),t("NcReferencePicker",{ref:"referencePicker",attrs:{"initial-provider":e.initialProvider,"focus-on-create":e.focusOnCreate},on:{"provider-selected":e.onProviderSelect,submit:e.onSubmit,cancel:e.onCancel}})],1)]):e._e()},kQ=[],RQ=ut(OQ,xQ,kQ,!1,null,"00990f2a");const MQ=RQ.exports;async function Pk(e,t){const n="referencePickerModal",r=document.createElement("div");r.id=n,document.body.append(r);const{promise:i,reject:s,resolve:o}=Promise.withResolvers(),a=e&&nQ(e)||null,l=gi.extend(MQ),c=new l({propsData:{initialProvider:a,isInsideViewer:t}}).$mount(r);return c.$on("cancel",()=>{c.$destroy(),s(new Error("User cancellation"))}),c.$on("submit",u=>{c.$destroy(),o(u)}),i}const BQ={name:"NcReferenceList",components:{NcReferenceWidget:Bk},props:{text:{type:String,default:""},referenceData:{type:Array,default:null},limit:{type:Number,default:1},displayFallback:{type:Boolean,default:!1},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},data(){return{references:null,loading:!0}},computed:{isVisible(){return this.loading||this.displayedReferences.length!==0},values(){return this.referenceData?this.referenceData:this.displayFallback&&!this.loading&&!this.references?[this.fallbackReference]:this.references?Object.values(this.references):[]},firstReference(){return this.values[0]??null},displayedReferences(){return this.values.filter(Boolean).slice(0,this.limit)},fallbackReference(){return{accessible:!0,openGraphObject:{id:this.text,link:this.text,name:this.text},richObjectType:"open-graph"}}},watch:{text:"fetch"},mounted(){this.fetch()},methods:{fetch(){if(this.loading=!0,this.referenceData){this.references=null,this.loading=!1;return}if(!new RegExp(i2).exec(this.text)){this.references=null,this.loading=!1;return}this.resolve().then(e=>{this.references=e.data.ocs.data.references,this.loading=!1,this.$emit("loaded")}).catch(e=>{gr.error("Failed to extract references",{error:e}),this.loading=!1,this.$emit("loaded")})},resolve(){const e=new RegExp(i2).exec(this.text.trim()),t=vd()===null;return this.limit===1&&e?t?Jn.get(Ni("references/resolvePublic")+`?reference=${encodeURIComponent(e[0])}&sharingToken=${Rv()}`):Jn.get(Ni("references/resolve")+`?reference=${encodeURIComponent(e[0])}`):t?Jn.post(Ni("references/extractPublic"),{text:this.text,resolve:!0,limit:this.limit,sharingToken:Rv()}):Jn.post(Ni("references/extract"),{text:this.text,resolve:!0,limit:this.limit})}}};var LQ=function(){var e=this,t=e._self._c;return e.isVisible?t("div",{staticClass:"widgets--list",class:{"icon-loading":e.loading}},e._l(e.displayedReferences,function(n){return t("NcReferenceWidget",{key:n.openGraphObject?.id,attrs:{reference:n,interactive:e.interactive,"interactive-opt-in":e.interactiveOptIn}})}),1):e._e()},IQ=[],YQ=ut(BQ,LQ,IQ,!1,null,"a50e616b");const $k=YQ.exports,Ud=c1(/[A-Za-z]/),Ry=c1(/[\dA-Za-z]/);function HQ(e){return e!==null&&(e<32||e===127)}function Du(e){return e!==null&&(e<0||e===32)}const Uk=c1(new RegExp("\\p{P}|\\p{S}","u")),zd=c1(/\s/);function c1(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}const zk=function(e){if(e==null)return UQ;if(typeof e=="function")return u1(e);if(typeof e=="object")return Array.isArray(e)?ZQ(e):PQ(e);if(typeof e=="string")return $Q(e);throw new Error("Expected function, string, or object as test")};function ZQ(e){const t=[];let n=-1;for(;++n0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Jr(null);function tJ(e,t={},n={},r=()=>{}){typeof n=="function"&&(r=n,n={});let{container:i}=n;"container"in t&&typeof t.container=="string"&&(i??=t.container);const s=(typeof i=="string"&&document.querySelector(i)||document.body).appendChild(document.createElement("div")),o=new gi({el:s,name:"VueDialogHelper",render:a=>a(e,{props:{container:null,...t},on:{close:(...l)=>{r(...l.map(c=>PB(c))),o.$destroy(),s.remove()}}})});return o}const nJ='',rJ='';class iJ extends Error{}class sJ{title;multiSelect;mimeTypeFilter;directoriesAllowed;buttons;path;filter;canPick;container;disabledNavigation;constructor(t,n,r,i,s,o,a,l,c,u=!1){this.title=t,this.multiSelect=n,this.mimeTypeFilter=r,this.directoriesAllowed=i,this.path=o,this.filter=a,this.canPick=l,this.buttons=s,this.container=c,this.disabledNavigation=u}async pickNodes(){const{FilePickerVue:t}=await j0(async()=>{const{FilePickerVue:n}=await import("./index-hTwX2gcC-TY8YV1bJ.chunk.mjs");return{FilePickerVue:n}},__vite__mapDeps([22,1,2,3]),import.meta.url);return new Promise((n,r)=>{tJ(t,{allowPickDirectory:this.directoriesAllowed,buttons:this.buttons,container:this.container,name:this.title,path:this.path,mimetypeFilter:this.mimeTypeFilter,multiselect:this.multiSelect,filterFn:this.filter,canPickFn:this.canPick,disabledNavigation:this.disabledNavigation},(...i)=>{const[s]=i;!Array.isArray(s)||s.length===0?r(new iJ("FilePicker: No nodes selected")):n(s)})})}async pick(){const t=await this.pickNodes();return this.multiSelect?t.map(n=>n.path):t[0]?.path??"/"}}class oJ{title;multiSelect=!1;mimeTypeFilter=[];directoriesAllowed=!1;path;filter;canPick;buttons=[];container;disabledNavigation=!1;constructor(t){this.title=t}setContainer(t){return this.container=t,this}setMultiSelect(t){return this.multiSelect=t,this}addMimeTypeFilter(t){return this.mimeTypeFilter.push(t),this}setMimeTypeFilter(t){return this.mimeTypeFilter=t,this}addButton(t){return typeof this.buttons=="function"&&(console.warn("FilePicker buttons were set to factory, now overwritten with button object."),this.buttons=[]),this.buttons.push(t),this}setButtonFactory(t){return this.buttons=t,this}setType(t){return this.buttons=(n,r)=>{const i=[],s=n?.[0]?.attributes?.displayName||n?.[0]?.basename,o=s||i6.basename(r);if(t===1){let a=wc("Choose");n.length===1?a=wc("Choose {file}",{file:s}):this.multiSelect&&(a=s6("Choose %n file","Choose %n files",n.length)),i.push({callback:()=>{},type:"primary",label:a})}return(t===4||t===3)&&i.push({callback:()=>{},label:o?wc("Copy to {target}",{target:o}):wc("Copy"),icon:rJ,variant:t===3?"primary":"secondary"}),(t===4||t===2)&&i.push({callback:()=>{},label:o?wc("Move to {target}",{target:o}):wc("Move"),icon:nJ,variant:"primary"}),i},this}allowDirectories(t=!0){return this.directoriesAllowed=t,this}startAt(t){return this.path=t,this}setFilter(t){return this.filter=t,this}setCanPick(t){return this.canPick=t,this}disableNavigation(){return this.disabledNavigation=!0,this}build(){return new sJ(this.title,this.multiSelect,this.mimeTypeFilter,this.directoriesAllowed,this.buttons,this.path,this.filter,this.canPick,this.container,this.disabledNavigation)}}function aJ(e){return new oJ(e)}const lJ=e=>aJ(Re("text","Select file or folder to link to")).startAt(e).allowDirectories(!0).setMultiSelect(!1).setButtonFactory((t,n)=>{const r=[],i=t?.[0]?.attributes?.displayName||t?.[0]?.basename,s=t?.[0]?.root===t?.[0]?.attributes?.filename;let o=Re("text","Choose");return t.length===1&&!s&&(o=Re("text","Choose {file}",{file:i})),r.push({callback:()=>{},type:"primary",label:o,disabled:s}),r}).build(),cJ={name:"ActionInsertLink",components:{NcActions:Vs,NcActionButton:Bo,NcActionInput:$x,Document:nV,Loading:fA,LinkOff:DV,Web:LV,Shape:NV},extends:Zd,mixins:[ON,Qm],data:()=>({href:"",isInputMode:!1,startPath:null,menuOpen:!1,isUsingDirectEditing:Yl("text","directEditingToken",null)!==null}),computed:{activeClass(){return this.state.active?"is-active":""},relativePath(){return this.$file?.relativePath??"/"}},methods:{linkFile(){this.startPath===null&&(this.startPath=this.relativePath.split("/").slice(0,-1).join("/")),lJ(this.startPath).pick().then(e=>{OC.Files.getClient().getFileInfo(e).then((t,n)=>{const r=new URL(cs(`/f/${n.id}`),window.origin);this.setLink(r.href,n.name),this.startPath=n.path+(n.type==="dir"?`/${n.name}/`:"")}),this.menuOpen=!1}).catch(()=>{this.$refs.buttonFile?.$el.focus()})},linkWebsite(e){if(e?.type==="submit"){const t=[...e.target.elements].filter(n=>n?.type==="text")[0].value;return this.menuOpen=!1,this.isInputMode=!1,this.href="",this.setLink(t,t)}if(fO(this.editor?.state,"link")){const t=kb(this.editor?.state,"link");this.href=t.href}this.isInputMode=!0},setLink(e,t){e&&![/^[a-zA-Z]+:/,/^\//,/\?fileId=/,/^\.\.?\//,/^[^.]*[/$]/,/^#/].find(i=>e.match(i))&&(e="https://"+e);const n=e.replaceAll(" ","%20"),r=this.editor?.chain();r.insertOrSetLink(t,{href:n}),r.focus().run()},removeLink(){this.editor?.chain().unsetLink().focus().run(),this.menuOpen=!1},linkPicker(){Pk(null,!0).then(e=>{const t=this.editor?.chain();this.editor?.view.state?.selection.empty?t.focus().insertPreview(e).run():t.setLink({href:e}).focus().run()}).catch(e=>{console.error("Smart picker promise rejected",e)})},t:Re}};var uJ=function(){var e=this,t=e._self._c;return t("NcActions",{staticClass:"entry-action entry-action__insert-link",class:e.activeClass,attrs:{title:e.actionEntry.label,"aria-label":e.actionEntry.label,container:e.menuIDSelector,"data-text-action-entry":e.actionEntry.key,name:e.actionEntry.label,open:e.menuOpen},on:{"update:open":n=>{e.menuOpen=e.menuOpen||n}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(e.icon,{tag:"component",attrs:{name:e.actionEntry.label,"aria-label":e.actionEntry.label}})]},proxy:!0}])},[e.state.active?t("NcActionButton",{attrs:{"data-text-action-entry":`${e.actionEntry.key}-remove`},on:{click:e.removeLink},scopedSlots:e._u([{key:"icon",fn:function(){return[t("LinkOff")]},proxy:!0}],null,!1,3589828876)},[e._v(" "+e._s(e.t("text","Remove link"))+" ")]):e._e(),e.isUsingDirectEditing?e._e():t("NcActionButton",{ref:"buttonFile",attrs:{"data-text-action-entry":`${e.actionEntry.key}-file`},on:{click:e.linkFile},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Document")]},proxy:!0}],null,!1,1149029676)},[e._v(" "+e._s(e.t("text","Link to file or folder"))+" ")]),e.isInputMode?t("NcActionInput",{attrs:{type:"text",value:e.href,"data-text-action-entry":`${e.actionEntry.key}-input`},on:{"update:value":function(n){e.href=n},submit:e.linkWebsite},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Web")]},proxy:!0}],null,!1,1844845715)},[e._v(" "+e._s(e.t("text","Link to website"))+" ")]):t("NcActionButton",{attrs:{"data-text-action-entry":`${e.actionEntry.key}-website`},on:{click:e.linkWebsite},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Web")]},proxy:!0}])},[e._v(" "+e._s(e.state.active?e.t("text","Update link"):e.t("text","Link to website"))+" ")]),t("NcActionButton",{attrs:{"data-text-action-entry":`${e.actionEntry.key}-picker`},on:{click:e.linkPicker},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Shape")]},proxy:!0}])},[e._v(" "+e._s(e.t("text","Open the Smart Picker"))+" ")])],1)},dJ=[],hJ=Ae(cJ,uJ,dJ,!1,null,"f1d082ea");const pJ=hJ.exports,fJ="_assistantIcon_1ndue_20",mJ="_assistantIcon_inline_1ndue_25",gJ="_assistantIcon__svg_1ndue_30",TJ={"material-design-icon":"_material-design-icon_1ndue_12",assistantIcon:fJ,assistantIcon_inline:mJ,assistantIcon__svg:gJ},AJ={__name:"NcAssistantIcon",props:{inline:{type:Boolean,default:!1},size:{type:Number,default:20}},setup(e){const t=e;yN((s,o)=>({a843d9d2:o.sizePx}));const n=a1(),r=Dy(),i=as(()=>`${t.size}px`);return{__sfc:!0,props:t,isDarkTheme:n,gradientId:r,sizePx:i,mdiCreation:o6}}};var bJ=function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("span",{class:[e.$style.assistantIcon,e.inline&&e.$style.assistantIcon_inline],attrs:{"aria-hidden":"true",role:"img"}},[t("svg",{class:e.$style.assistantIcon__svg,attrs:{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}},[t("defs",[n.isDarkTheme?t("linearGradient",{attrs:{id:n.gradientId,gradientTransform:"rotateX(285)"}},[t("stop",{attrs:{offset:"15%","stop-color":"#CDACE7"}}),t("stop",{attrs:{offset:"40%","stop-color":"#008FDB"}}),t("stop",{attrs:{offset:"82%","stop-color":"#A180E0"}})],1):t("linearGradient",{attrs:{id:n.gradientId,gradientTransform:"rotateX(285)"}},[t("stop",{attrs:{offset:"15%","stop-color":"#9669D3"}}),t("stop",{attrs:{offset:"40%","stop-color":"#00679E"}}),t("stop",{attrs:{offset:"80%","stop-color":"#492083"}})],1)],1),t("path",{attrs:{d:n.mdiCreation,fill:`url('#${n.gradientId}')`}})])])},yJ=[];const w2={$style:TJ};function EJ(e){for(var t in w2)this[t]=w2[t]}var vJ=ut(AJ,bJ,yJ,!1,EJ,null);const DJ=vJ.exports,SJ={name:"NcCounterBubble",props:{type:{type:String,default:"",validator(e){return["highlighted","outlined",""].includes(e)}},active:{type:Boolean,default:!1},count:{type:Number,required:!1,default:void 0},raw:{type:Boolean,required:!1,default:!1}},computed:{counterClassObject(){return{"counter-bubble__counter--highlighted":this.type==="highlighted","counter-bubble__counter--outlined":this.type==="outlined",active:this.active}},humanizedCount(){return this.humanizeCount(this.count)}},methods:{humanizeCount(e){return this.raw?e.toString():new Intl.NumberFormat(Ha(),{notation:"compact",compactDisplay:"short"}).format(e)},getHumanizedCount(){if(this.count!==void 0)return{humanized:this.humanizedCount,original:this.count.toString()};if(!this.raw&&this.$slots.default?.length===1){const e=this.$slots.default[0].text?.trim();if(e&&/^\d+$/.test(e)){const t=parseInt(e,10);return{humanized:this.humanizeCount(t),original:e}}}}},render(e){const t=this.getHumanizedCount();return e("div",{staticClass:"counter-bubble__counter",class:this.counterClassObject,attrs:{title:t&&t.original!==t.humanized?t.original:void 0}},[t?.humanized??this.$slots.default])}},wJ=null,_J=null;var CJ=ut(SJ,wJ,_J,!1,null,"7d9795d6");const NJ=CJ.exports,FJ={name:"NcVNodes",props:{vnodes:{type:[Array,Object],default:null}},render(){return this.vnodes||this.$slots?.default||this.$scopedSlots?.default?.()}},OJ=null,xJ=null;var kJ=ut(FJ,OJ,xJ,!1,null,null);const RJ=kJ.exports,[_2]=Vl("core","config",{version:"30.0"}).version.split(".",2)??[],MJ=_2&&Number.parseInt(_2)<30,BJ={name:"NcListItem",components:{NcActions:Vs,NcCounterBubble:NJ,NcVNodes:RJ},props:{details:{type:String,default:""},name:{type:String,default:void 0},exact:{type:Boolean,default:!1},to:{type:[String,Object],default:null},href:{type:String,default:"#"},target:{type:String,default:""},anchorId:{type:String,default:""},bold:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},active:{type:Boolean,default:void 0},linkAriaLabel:{type:String,default:""},actionsAriaLabel:{type:String,default:void 0},counterNumber:{type:[Number,String],default:0},counterType:{type:String,default:"",validator(e){return["highlighted","outlined",""].indexOf(e)!==-1}},forceDisplayActions:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},oneLine:{type:Boolean,default:!1}},emits:["click","update:menuOpen"],setup(){return{isLegacy:MJ}},data(){return{hovered:!1,hasActions:!1,hasSubname:!1,displayActionsOnHoverFocus:!1,menuOpen:!1,hasIndicator:!1,hasDetails:!1}},computed:{showAdditionalElements(){return!this.displayActionsOnHoverFocus||this.forceDisplayActions},showDetails(){return(this.details!==""||this.hasDetails)&&(!this.displayActionsOnHoverFocus||this.forceDisplayActions)}},watch:{menuOpen(e){!e&&!this.hovered&&(this.displayActionsOnHoverFocus=!1)}},mounted(){this.checkSlots()},updated(){this.checkSlots()},methods:{onClick(e,t,n){this.$emit("click",e),!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&n&&(t?.(e),e.preventDefault())},showActions(){this.hasActions&&(this.displayActionsOnHoverFocus=!0),this.hovered=!1},hideActions(){this.displayActionsOnHoverFocus=!1},handleBlur(e){this.menuOpen||this.$refs["list-item"].contains(e.relatedTarget)||this.hideActions()},handleMouseleave(){this.menuOpen||(this.displayActionsOnHoverFocus=!1),this.hovered=!1},handleMouseover(){this.showActions(),this.hovered=!0},handleActionsUpdateOpen(e){this.menuOpen=e,this.$emit("update:menuOpen",e)},checkSlots(){this.hasActions!==!!this.$slots.actions&&(this.hasActions=!!this.$slots.actions),this.hasSubname!==!!this.$slots.subname&&(this.hasSubname=!!this.$slots.subname),this.hasIndicator!==!!this.$slots.indicator&&(this.hasIndicator=!!this.$slots.indicator),this.hasDetails!==!!this.$slots.details&&(this.hasDetails=!!this.$slots.details)}}};var LJ=function(){var e=this,t=e._self._c;return t(e.to?"router-link":"NcVNodes",{tag:"component",attrs:{custom:e.to?!0:null,to:e.to,exact:e.to?e.exact:null},scopedSlots:e._u([{key:"default",fn:function({href:n,navigate:r,isActive:i}){return[t("li",{staticClass:"list-item__wrapper",class:{"list-item__wrapper--active":e.active??i}},[t("div",{ref:"list-item",staticClass:"list-item",class:{"list-item--compact":e.compact,"list-item--legacy":e.isLegacy,"list-item--one-line":e.oneLine},on:{mouseover:e.handleMouseover,mouseleave:e.handleMouseleave}},[t("a",{staticClass:"list-item__anchor",attrs:{id:e.anchorId||void 0,"aria-label":e.linkAriaLabel,href:n||e.href,target:e.target||(e.href==="#"?void 0:"_blank"),rel:e.href==="#"?void 0:"noopener noreferrer"},on:{focus:e.showActions,focusout:e.handleBlur,click:function(s){return e.onClick(s,r,n)},keydown:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"esc",27,s.key,["Esc","Escape"])?null:e.hideActions.apply(null,arguments)}}},[e._t("icon"),t("div",{staticClass:"list-item-content"},[t("div",{staticClass:"list-item-content__main"},[t("div",{staticClass:"list-item-content__name"},[e._t("name",function(){return[e._v(e._s(e.name))]})],2),e.hasSubname?t("div",{staticClass:"list-item-content__subname",class:{"list-item-content__subname--bold":e.bold}},[e._t("subname")],2):e._e()]),t("div",{staticClass:"list-item-content__details"},[e.showDetails?t("div",{staticClass:"list-item-details__details"},[e._t("details",function(){return[e._v(e._s(e.details))]})],2):e._e(),e.counterNumber||e.hasIndicator?t("div",{directives:[{name:"show",rawName:"v-show",value:e.showAdditionalElements,expression:"showAdditionalElements"}],staticClass:"list-item-details__extra"},[e.counterNumber?t("NcCounterBubble",{staticClass:"list-item-details__counter",attrs:{active:e.active??i,type:e.counterType}},[e._v(" "+e._s(e.counterNumber)+" ")]):e._e(),e.hasIndicator?t("span",{staticClass:"list-item-details__indicator"},[e._t("indicator")],2):e._e()],1):e._e()])])],2),e.$slots["extra-actions"]?t("div",{staticClass:"list-item-content__extra-actions"},[e._t("extra-actions")],2):e._e(),e.forceDisplayActions||e.displayActionsOnHoverFocus?t("div",{staticClass:"list-item-content__actions",on:{focusout:e.handleBlur}},[t("NcActions",{ref:"actions",attrs:{primary:e.active??i,"force-menu":e.forceMenu,"aria-label":e.actionsAriaLabel},on:{"update:open":e.handleActionsUpdateOpen},scopedSlots:e._u([e.$slots["actions-icon"]?{key:"icon",fn:function(){return[e._t("actions-icon")]},proxy:!0}:null],null,!0)},[e._t("actions")],2)],1):e._e(),e.$slots.extra?t("div",{staticClass:"list-item__extra"},[e._t("extra")],2):e._e()])])]}}],null,!0)})},IJ=[],YJ=ut(BJ,LJ,IJ,!1,null,"0a08838f");const HJ=YJ.exports,ZJ={name:"AlertCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var PJ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon alert-circle-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},$J=[],UJ=Ae(ZJ,PJ,$J,!1,null,null);const C2=UJ.exports,zJ={name:"CheckCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var VJ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon check-circle-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 20C7.59 20 4 16.41 4 12S7.59 4 12 4 20 7.59 20 12 16.41 20 12 20M16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},jJ=[],GJ=Ae(zJ,VJ,jJ,!1,null,null);const N2=GJ.exports,qJ={name:"ClipboardTextOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var WJ=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon clipboard-text-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,3H14.82C14.25,1.44 12.53,0.64 11,1.2C10.14,1.5 9.5,2.16 9.18,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M12,3A1,1 0 0,1 13,4A1,1 0 0,1 12,5A1,1 0 0,1 11,4A1,1 0 0,1 12,3M7,7H17V5H19V19H5V5H7V7M17,11H7V9H17V11M15,15H7V13H15V15Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},KJ=[],QJ=Ae(qJ,WJ,KJ,!1,null,null);const JJ=QJ.exports,XJ={name:"ClockOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var eX=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon clock-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},tX=[],nX=Ae(XJ,eX,tX,!1,null,null);const F2=nX.exports,rX={name:"ShuffleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var iX=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon shuffle-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M14.83,13.41L13.42,14.82L16.55,17.95L14.5,20H20V14.5L17.96,16.54L14.83,13.41M14.5,4L16.54,6.04L4,18.59L5.41,20L17.96,7.46L20,9.5V4M10.59,9.17L5.41,4L4,5.41L9.17,10.58L10.59,9.17Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},sX=[],oX=Ae(rX,iX,sX,!1,null,null);const aX=oX.exports,lX={name:"TextBoxPlusOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var cX=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon text-box-plus-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M17,14H19V17H22V19H19V22H17V19H14V17H17V14M5,3H19C20.11,3 21,3.89 21,5V12.8C20.39,12.45 19.72,12.2 19,12.08V5H5V19H12.08C12.2,19.72 12.45,20.39 12.8,21H5C3.89,21 3,20.11 3,19V5C3,3.89 3.89,3 5,3M7,7H17V9H7V7M7,11H17V12.08C16.15,12.22 15.37,12.54 14.68,13H7V11M7,15H12V17H7V15Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},uX=[],dX=Ae(lX,cX,uX,!1,null,null);const hX=dX.exports,pX={name:"TextShortIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var fX=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon text-short-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M4,9H20V11H4V9M4,13H14V15H4V13Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},mX=[],gX=Ae(pX,fX,mX,!1,null,null);const TX=gX.exports;var Ig={exports:{}},O2,x2;function AX(){return x2||(x2=1,O2=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}),O2}var Kh={},k2;function bX(){if(k2)return Kh;k2=1;var e=Object.prototype.hasOwnProperty,t;function n(o){try{return decodeURIComponent(o.replace(/\+/g," "))}catch{return null}}function r(o){try{return encodeURIComponent(o)}catch{return null}}function i(o){for(var a=/([^=?#&]+)=?([^&]*)/g,l={},c;c=a.exec(o);){var u=n(c[1]),d=n(c[2]);u===null||d===null||u in l||(l[u]=d)}return l}function s(o,a){a=a||"";var l=[],c,u;typeof a!="string"&&(a="?");for(u in o)if(e.call(o,u)){if(c=o[u],!c&&(c===null||c===t||isNaN(c))&&(c=""),u=r(u),c=r(c),u===null||c===null)continue;l.push(u+"="+c)}return l.length?a+l.join("&"):""}return Kh.stringify=s,Kh.parse=i,Kh}var Yg,R2;function yX(){if(R2)return Yg;R2=1;var e=AX(),t=bX(),n=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r=/[\n\r\t]/g,i=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,s=/:\d+$/,o=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,a=/^[a-zA-Z]:/;function l(v){return(v||"").toString().replace(n,"")}var c=[["#","hash"],["?","query"],function(v,C){return h(C.protocol)?v.replace(/\\/g,"/"):v},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],u={hash:1,query:1};function d(v){var C;typeof window<"u"?C=window:typeof Ao<"u"?C=Ao:typeof self<"u"?C=self:C={};var S=C.location||{};v=v||S;var O={},R=typeof v,H;if(v.protocol==="blob:")O=new T(unescape(v.pathname),{});else if(R==="string"){O=new T(v,{});for(H in u)delete O[H]}else if(R==="object"){for(H in v)H in u||(O[H]=v[H]);O.slashes===void 0&&(O.slashes=i.test(v.href))}return O}function h(v){return v==="file:"||v==="ftp:"||v==="http:"||v==="https:"||v==="ws:"||v==="wss:"}function p(v,C){v=l(v),v=v.replace(r,""),C=C||{};var S=o.exec(v),O=S[1]?S[1].toLowerCase():"",R=!!S[2],H=!!S[3],W=0,$;return R?H?($=S[2]+S[3]+S[4],W=S[2].length+S[3].length):($=S[2]+S[4],W=S[2].length):H?($=S[3]+S[4],W=S[3].length):$=S[4],O==="file:"?W>=2&&($=$.slice(2)):h(O)?$=S[4]:O?R&&($=$.slice(2)):W>=2&&h(C.protocol)&&($=S[4]),{protocol:O,slashes:R||h(O),slashesCount:W,rest:$}}function m(v,C){if(v==="")return C;for(var S=(C||"/").split("/").slice(0,-1).concat(v.split("/")),O=S.length,R=S[O-1],H=!1,W=0;O--;)S[O]==="."?S.splice(O,1):S[O]===".."?(S.splice(O,1),W++):W&&(O===0&&(H=!0),S.splice(O,1),W--);return H&&S.unshift(""),(R==="."||R==="..")&&S.push(""),S.join("/")}function T(v,C,S){if(v=l(v),v=v.replace(r,""),!(this instanceof T))return new T(v,C,S);var O,R,H,W,$,w,U=c.slice(),z=typeof C,Y=this,oe=0;for(z!=="object"&&z!=="string"&&(S=C,C=null),S&&typeof S!="function"&&(S=t.parse),C=d(C),R=p(v||"",C),O=!R.protocol&&!R.slashes,Y.slashes=R.slashes||O&&C.slashes,Y.protocol=R.protocol||C.protocol||"",v=R.rest,(R.protocol==="file:"&&(R.slashesCount!==2||a.test(v))||!R.slashes&&(R.protocol||R.slashesCount<2||!h(Y.protocol)))&&(U[3]=[/(.*)/,"pathname"]);oe'+l[c].mention.label+""}function o(l){var c=r(l);return{type:c.host,id:c.pathname.slice(1)}}function a(l){var c=/@$/;l.tokens.forEach(function(u){if(u.type==="inline"){var d=u.children;d.forEach(function(h,p){if(!(p+3>d.length)){var m=d.slice(p,p+4),T=i(m,4),b=T[0],D=T[1],v=T[2],C=T[3],S=C===void 0?{}:C;if(v.type==="link_close"&&(S=v,v=null),b.type==="text"&&c.test(b.content)&&D.type==="link_open"&&S.type==="link_close"){var O=D.attrs.reduce(function(R,H){return H[0]==="href"?H[1]:R},"");b.content=b.content.slice(0,-1),D.type="mention",D.mention=o(O),D.mention.label=v&&v.content||"",d.splice(p+2,v?2:1)}}}),u.children=d}})}e.exports=function(l,c){l.renderer.rules.mention=s,l.core.ruler.after("inline","mention",a)},t.renderMention=s,t.parseUri=o,t.parseMentions=a}(Ig,Ig.exports)),Ig.exports}var vX=EX();const DX=Wl(vX),B2={};function SX(e){let t=B2[e];if(t)return t;t=B2[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);t.push(r)}for(let n=0;n=55296&&u<=57343?i+="���":i+=String.fromCharCode(u),s+=6;continue}}if((a&248)===240&&s+91114111?i+="����":(d-=65536,i+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),s+=9;continue}}i+="�"}return i})}Su.defaultChars=";/?:@&=+$,#",Su.componentChars="";const L2={};function wX(e){let t=L2[e];if(t)return t;t=L2[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const r=wX(t);let i="";for(let s=0,o=e.length;s=55296&&a<=57343){if(a>=55296&&a<=56319&&s+1=56320&&l<=57343){i+=encodeURIComponent(e[s]+e[s+1]),s++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[s])}return i}Vd.defaultChars=";/?:@&=+$,-_.!~*'()#",Vd.componentChars="-_.!~*'()";function By(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Zf(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const _X=/^([a-z0-9.+-]+:)/i,CX=/:[0-9]*$/,NX=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,FX=["<",">",'"',"`"," ","\r",` `," "],OX=["{","}","|","\\","^","`"].concat(FX),xX=["'"].concat(OX),I2=["%","/","?",";","#"].concat(xX),Y2=["/","?","#"],kX=255,H2=/^[+a-z0-9A-Z_-]{0,63}$/,RX=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Z2={javascript:!0,"javascript:":!0},P2={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ly(e,t){if(e&&e instanceof Zf)return e;const n=new Zf;return n.parse(e,t),n}Zf.prototype.parse=function(e,t){let n,r,i,s=e;if(s=s.trim(),!t&&e.split("#").length===1){const c=NX.exec(s);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let o=_X.exec(s);if(o&&(o=o[0],n=o.toLowerCase(),this.protocol=o,s=s.substr(o.length)),(t||o||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=s.substr(0,2)==="//",i&&!(o&&Z2[o])&&(s=s.substr(2),this.slashes=!0)),!Z2[o]&&(i||o&&!P2[o])){let c=-1;for(let m=0;m127?v+="x":v+=D[C];if(!v.match(H2)){const C=m.slice(0,T),S=m.slice(T+1),O=D.match(RX);O&&(C.push(O[1]),S.unshift(O[2])),S.length&&(s=S.join(".")+s),this.hostname=C.join(".");break}}}}this.hostname.length>kX&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=s.indexOf("#");a!==-1&&(this.hash=s.substr(a),s=s.slice(0,a));const l=s.indexOf("?");return l!==-1&&(this.search=s.substr(l),s=s.slice(0,l)),s&&(this.pathname=s),P2[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Zf.prototype.parseHost=function(e){let t=CX.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const MX=Object.freeze(Object.defineProperty({__proto__:null,decode:Su,encode:Vd,format:By,parse:Ly},Symbol.toStringTag,{value:"Module"})),Qk=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Jk=/[\0-\x1F\x7F-\x9F]/,BX=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Iy=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Xk=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,eR=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,LX=Object.freeze(Object.defineProperty({__proto__:null,Any:Qk,Cc:Jk,Cf:BX,P:Iy,S:Xk,Z:eR},Symbol.toStringTag,{value:"Module"})),IX=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),YX=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Hg;const HX=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),ZX=(Hg=String.fromCodePoint)!==null&&Hg!==void 0?Hg:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function PX(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=HX.get(e))!==null&&t!==void 0?t:e}var fr;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(fr||(fr={}));const $X=32;var ma;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ma||(ma={}));function xA(e){return e>=fr.ZERO&&e<=fr.NINE}function UX(e){return e>=fr.UPPER_A&&e<=fr.UPPER_F||e>=fr.LOWER_A&&e<=fr.LOWER_F}function zX(e){return e>=fr.UPPER_A&&e<=fr.UPPER_Z||e>=fr.LOWER_A&&e<=fr.LOWER_Z||xA(e)}function VX(e){return e===fr.EQUALS||zX(e)}var cr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(cr||(cr={}));var sa;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(sa||(sa={}));class jX{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=cr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=sa.Strict}startEntity(t){this.decodeMode=t,this.state=cr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case cr.EntityStart:return t.charCodeAt(n)===fr.NUM?(this.state=cr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=cr.NamedEntity,this.stateNamedEntity(t,n));case cr.NumericStart:return this.stateNumericStart(t,n);case cr.NumericDecimal:return this.stateNumericDecimal(t,n);case cr.NumericHex:return this.stateNumericHex(t,n);case cr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|$X)===fr.LOWER_X?(this.state=cr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=cr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,s!==0){if(o===fr.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==sa.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&ma.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~ma.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case cr.NamedEntity:return this.result!==0&&(this.decodeMode!==sa.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case cr.NumericDecimal:return this.emitNumericEntity(0,2);case cr.NumericHex:return this.emitNumericEntity(0,3);case cr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case cr.EntityStart:return 0}}}function tR(e){let t="";const n=new jX(e,r=>t+=ZX(r));return function(r,i){let s=0,o=0;for(;(o=r.indexOf("&",o))>=0;){t+=r.slice(s,o),n.startEntity(i);const l=n.write(r,o+1);if(l<0){s=o+n.end();break}s=o+l,o=l===0?s+1:s}const a=t+r.slice(s);return t="",a}}function GX(e,t,n,r){const i=(t&ma.BRANCH_LENGTH)>>7,s=t&ma.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const l=r-s;return l<0||l>=i?-1:e[n+l]-1}let o=n,a=o+i-1;for(;o<=a;){const l=o+a>>>1,c=e[l];if(cr)a=l-1;else return e[l+i]}return-1}const qX=tR(IX);tR(YX);function nR(e,t=sa.Legacy){return qX(e,t)}function WX(e){return Object.prototype.toString.call(e)}function Yy(e){return WX(e)==="[object String]"}const KX=Object.prototype.hasOwnProperty;function QX(e,t){return KX.call(e,t)}function d1(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if(typeof t!="object")throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function rR(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Hy(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Pf(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const iR=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,JX=/&([a-z#][a-z0-9]{1,31});/gi,XX=new RegExp(iR.source+"|"+JX.source,"gi"),eee=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function tee(e,t){if(t.charCodeAt(0)===35&&eee.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Hy(r)?Pf(r):e}const n=nR(e);return n!==e?n:e}function nee(e){return e.indexOf("\\")<0?e:e.replace(iR,"$1")}function wu(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(XX,function(t,n,r){return n||tee(t,r)})}const ree=/[&<>"]/,iee=/[&<>"]/g,see={"&":"&","<":"<",">":">",'"':"""};function oee(e){return see[e]}function go(e){return ree.test(e)?e.replace(iee,oee):e}const aee=/[.?*+^$[\]\\(){}|-]/g;function lee(e){return e.replace(aee,"\\$&")}function Sn(e){switch(e){case 9:case 32:return!0}return!1}function jd(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Gd(e){return Iy.test(e)||Xk.test(e)}function qd(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function h1(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const cee={mdurl:MX,ucmicro:LX},uee=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:rR,assign:d1,escapeHtml:go,escapeRE:lee,fromCodePoint:Pf,has:QX,isMdAsciiPunct:qd,isPunctChar:Gd,isSpace:Sn,isString:Yy,isValidEntityCode:Hy,isWhiteSpace:jd,lib:cee,normalizeReference:h1,unescapeAll:wu,unescapeMd:nee},Symbol.toStringTag,{value:"Module"}));function dee(e,t,n){let r,i,s,o;const a=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos32))return s;if(r===41){if(o===0)break;o--}i++}return t===i||o!==0||(s.str=wu(e.slice(t,i)),s.pos=i,s.ok=!0),s}function pee(e,t,n,r){let i,s=t;const o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(s>=n)return o;let a=e.charCodeAt(s);if(a!==34&&a!==39&&a!==40)return o;t++,s++,a===40&&(a=41),o.marker=a}for(;s"+go(s.content)+""},Ss.code_block=function(e,t,n,r,i){const s=e[t];return""+go(e[t].content)+` `},Ss.fence=function(e,t,n,r,i){const s=e[t],o=s.info?wu(s.info).trim():"";let a="",l="";if(o){const u=o.split(/(\s+)/g);a=u[0],l=u.slice(2).join("")}let c;if(n.highlight?c=n.highlight(s.content,a,l)||go(s.content):c=go(s.content),c.indexOf("${c} `}return`
${c}
`},Ss.image=function(e,t,n,r,i){const s=e[t];return s.attrs[s.attrIndex("alt")][1]=i.renderInlineAsText(s.children,n,r),i.renderToken(e,t,n)},Ss.hardbreak=function(e,t,n){return n.xhtmlOut?`
`:`
`},Ss.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
`:`
`:` `},Ss.text=function(e,t){return go(e[t].content)},Ss.html_block=function(e,t){return e[t].content},Ss.html_inline=function(e,t){return e[t].content};function Mc(){this.rules=d1({},Ss)}Mc.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t `:">",i},Mc.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let s=0,o=e.length;s=0&&(n=this.attrs[t][1]),n},ci.prototype.attrJoin=function(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t};function sR(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}sR.prototype.Token=ci;const mee=/\r\n?|\n/g,gee=/\0/g;function Tee(e){let t;t=e.src.replace(mee,` `),t=t.replace(gee,"�"),e.src=t}function Aee(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function bee(e){const t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function Eee(e){return/^<\/a\s*>/i.test(e)}function vee(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;o--){const a=i[o];if(a.type==="link_close"){for(o--;i[o].level!==a.level&&i[o].type!=="link_open";)o--;continue}if(a.type==="html_inline"&&(yee(a.content)&&s>0&&s--,Eee(a.content)&&s++),!(s>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const l=a.content;let c=e.md.linkify.match(l);const u=[];let d=a.level,h=0;c.length>0&&c[0].index===0&&o>0&&i[o-1].type==="text_special"&&(c=c.slice(1));for(let p=0;ph){const O=new e.Token("text","",0);O.content=l.slice(h,D),O.level=d,u.push(O)}const v=new e.Token("link_open","a",1);v.attrs=[["href",T]],v.level=d++,v.markup="linkify",v.info="auto",u.push(v);const C=new e.Token("text","",0);C.content=b,C.level=d,u.push(C);const S=new e.Token("link_close","a",-1);S.level=--d,S.markup="linkify",S.info="auto",u.push(S),h=c[p].lastIndex}if(h=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(See,_ee)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Nee(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&oR.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Fee(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(Dee.test(e.tokens[t].content)&&Cee(e.tokens[t].children),oR.test(e.tokens[t].content)&&Nee(e.tokens[t].children))}const Oee=/['"]/,$2=/['"]/g,U2="’";function Qh(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function xee(e,t){let n;const r=[];for(let i=0;i=0&&!(r[n].level<=o);n--);if(r.length=n+1,s.type!=="text")continue;let a=s.content,l=0,c=a.length;e:for(;l=0)m=a.charCodeAt(u.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let T=32;if(l=48&&m<=57&&(h=d=!1),d&&h&&(d=b,h=D),!d&&!h){p&&(s.content=Qh(s.content,u.index,U2));continue}if(h)for(n=r.length-1;n>=0;n--){let S=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!Oee.test(e.tokens[t].content)||xee(e.tokens[t].children,e)}function Ree(e){let t,n;const r=e.tokens,i=r.length;for(let s=0;s0&&this.level++,this.tokens.push(r),r},ws.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},ws.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;et;)if(!Sn(this.src.charCodeAt(--e)))return e+1;return e},ws.prototype.skipChars=function(e,t){for(let n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},ws.prototype.getLines=function(e,t,n,r){if(e>=t)return"";const i=new Array(t-e);for(let s=0,o=e;on?i[s]=new Array(a-n+1).join(" ")+this.src.slice(c,u):i[s]=this.src.slice(c,u)}return i.join("")},ws.prototype.Token=ci;const Mee=65536;function Pg(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function z2(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),s=!1,o=0,a="";for(;rn)return!1;let i=t+1;if(e.sCount[i]=4)return!1;let s=e.bMarks[i]+e.tShift[i];if(s>=e.eMarks[i])return!1;const o=e.src.charCodeAt(s++);if(o!==124&&o!==45&&o!==58||s>=e.eMarks[i])return!1;const a=e.src.charCodeAt(s++);if(a!==124&&a!==45&&a!==58&&!Sn(a)||o===45&&Sn(a))return!1;for(;s=4)return!1;c=z2(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const d=c.length;if(d===0||d!==u.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),T=[t,0];m.map=T;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const D=e.push("tr_open","tr",1);D.map=[t,t+1];for(let S=0;S=4||(c=z2(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),C+=d-c.length,C>Mee))break;if(i===t+2){const R=e.push("tbody_open","tbody",1);R.map=v=[t+2,0]}const O=e.push("tr_open","tr",1);O.map=[i,i+1];for(let R=0;R=4){r++,i=r;continue}break}e.line=i;const s=e.push("code_block","code",0);return s.content=e.getLines(t,i,4+e.blkIndent,!1)+` `,s.map=[t,e.line],!0}function Iee(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>s)return!1;const o=e.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let a=i;i=e.skipChars(i,o);let l=i-a;if(l<3)return!1;const c=e.src.slice(a,i),u=e.src.slice(i,s);if(o===96&&u.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let d=t,h=!1;for(;d++,!(d>=n||(i=a=e.bMarks[d]+e.tShift[d],s=e.eMarks[d],i=4)&&(i=e.skipChars(i,o),!(i-a=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const a=[],l=[],c=[],u=[],d=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m=s)break;if(e.src.charCodeAt(i++)===62&&!C){let O=e.sCount[m]+1,R,H;e.src.charCodeAt(i)===32?(i++,O++,H=!1,R=!0):e.src.charCodeAt(i)===9?(R=!0,(e.bsCount[m]+O)%4===3?(i++,O++,H=!1):H=!0):R=!1;let W=O;for(a.push(e.bMarks[m]),e.bMarks[m]=i;i=s,l.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(R?1:0),c.push(e.sCount[m]),e.sCount[m]=W-O,u.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let S=!1;for(let O=0,R=d.length;O";const D=[t,0];b.map=D,e.md.block.tokenize(e,t,m);const v=e.push("blockquote_close","blockquote",-1);v.markup=">",e.lineMax=o,e.parentType=h,D[1]=e.line;for(let C=0;C=4)return!1;let s=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(s++);if(o!==42&&o!==45&&o!==95)return!1;let a=1;for(;s=r)return-1;let s=e.src.charCodeAt(i++);if(s<48||s>57)return-1;for(;;){if(i>=r)return-1;if(s=e.src.charCodeAt(i++),s>=48&&s<=57){if(i-n>=10)return-1;continue}if(s===41||s===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]=e.blkIndent&&(u=!0);let d,h,p;if((p=j2(e,l))>=0){if(d=!0,o=e.bMarks[l]+e.tShift[l],h=Number(e.src.slice(o,p-1)),u&&h!==1)return!1}else if((p=V2(e,l))>=0)d=!1;else return!1;if(u&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(r)return!0;const m=e.src.charCodeAt(p-1),T=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),h!==1&&(a.attrs=[["start",h]])):a=e.push("bullet_list_open","ul",1);const b=[l,0];a.map=b,a.markup=String.fromCharCode(m);let D=!1;const v=e.md.block.ruler.getRules("list"),C=e.parentType;for(e.parentType="list";l=i?H=1:H=O-S,H>4&&(H=1);const W=S+H;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(m);const $=[l,0];a.map=$,d&&(a.info=e.src.slice(o,p-1));const w=e.tight,U=e.tShift[l],z=e.sCount[l],Y=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=W,e.tight=!0,e.tShift[l]=R-e.bMarks[l],e.sCount[l]=O,R>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||D)&&(c=!1),D=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=Y,e.tShift[l]=U,e.sCount[l]=z,e.tight=w,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(m),l=e.line,$[1]=l,l>=n||e.sCount[l]=4)break;let oe=!1;for(let X=0,De=v.length;X=4||e.src.charCodeAt(i)!==91)return!1;function a(v){const C=e.lineMax;if(v>=C||e.isEmpty(v))return null;let S=!1;if(e.sCount[v]-e.blkIndent>3&&(S=!0),e.sCount[v]<0&&(S=!0),!S){const H=e.md.block.ruler.getRules("reference"),W=e.parentType;e.parentType="reference";let $=!1;for(let w=0,U=H.length;w"u"&&(e.env.references={}),typeof e.env.references[D]>"u"&&(e.env.references[D]={title:b,href:d}),e.line=o),!0):!1}const Uee=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zee="[a-zA-Z_:][a-zA-Z0-9:._-]*",Vee="[^\"'=<>`\\x00-\\x20]+",jee="'[^']*'",Gee='"[^"]*"',qee="(?:"+Vee+"|"+jee+"|"+Gee+")",Wee="(?:\\s+"+zee+"(?:\\s*=\\s*"+qee+")?)",aR="<[A-Za-z][A-Za-z0-9\\-]*"+Wee+"*\\s*\\/?>",lR="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Kee="",Qee="<[?][\\s\\S]*?[?]>",Jee="]*>",Xee="",ete=new RegExp("^(?:"+aR+"|"+lR+"|"+Kee+"|"+Qee+"|"+Jee+"|"+Xee+")"),tte=new RegExp("^(?:"+aR+"|"+lR+")"),Fc=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(tte.source+"\\s*$"),/^$/,!1]];function nte(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,s),a=0;for(;a=4)return!1;let o=e.src.charCodeAt(i);if(o!==35||i>=s)return!1;let a=1;for(o=e.src.charCodeAt(++i);o===35&&i6||ii&&Sn(e.src.charCodeAt(l-1))&&(s=l),e.line=t+1;const c=e.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[t,e.line];const u=e.push("inline","",0);u.content=e.src.slice(i,s).trim(),u.map=[t,e.line],u.children=[];const d=e.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function ite(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let s=0,o,a=t+1;for(;a3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a];const m=e.eMarks[a];if(p=m))){s=o===61?1:2;break}}if(e.sCount[a]<0)continue;let h=!1;for(let p=0,m=r.length;p3||e.sCount[s]<0)continue;let c=!1;for(let u=0,d=r.length;u=n||e.sCount[o]=s){e.line=n;break}const l=e.line;let c=!1;for(let u=0;u=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),o=e.line,o0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},Z0.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let s=e;for(;s0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(lte);if(!i)return!1;const s=i[1],o=e.md.linkify.matchAtStart(e.src.slice(n-s.length));if(!o)return!1;let a=o.url;if(a.length<=s.length)return!1;a=a.replace(/\*+$/,"");const l=e.md.normalizeLink(a);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-s.length);const c=e.push("link_open","a",1);c.attrs=[["href",l]],c.markup="linkify",c.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(a);const d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=a.length-s.length,!0}function cR(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let s=r-1;for(;s>=1&&e.pending.charCodeAt(s-1)===32;)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){Zy[e.charCodeAt(0)]=1});function uR(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&a<=57343&&(s+=e.src[n+1],n++)}const o="\\"+s;if(!t){const a=e.push("text_special","",0);i<256&&Zy[i]!==0?a.content=s:a.content=o,a.markup=o,a.info="escape"}return e.pos=n+1,!0}function ute(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const r=n;n++;const i=e.posMax;for(;n=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const s=t[i.end],o=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===s.token+1,a=String.fromCharCode(i.marker),l=e.tokens[i.token];l.type=o?"strong_open":"em_open",l.tag=o?"strong":"em",l.nesting=1,l.markup=o?a+a:a,l.content="";const c=e.tokens[s.token];c.type=o?"strong_close":"em_close",c.tag=o?"strong":"em",c.nesting=-1,c.markup=o?a+a:a,c.content="",o&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function fte(e){const t=e.tokens_meta,n=e.tokens_meta.length;q2(e,e.delimiters);for(let r=0;r=d)return!1;if(l=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?m=i.pos:o="",l=m;m=d||e.src.charCodeAt(m)!==41)&&(c=!0),m++}if(c){if(typeof e.env.references>"u")return!1;if(m=0?r=e.src.slice(l,m++):m=p+1):m=p+1,r||(r=e.src.slice(h,p)),s=e.env.references[h1(r)],!s)return e.pos=u,!1;o=s.href,a=s.title}if(!t){e.pos=h,e.posMax=p;const T=e.push("link_open","a",1),b=[["href",o]];T.attrs=b,a&&b.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=d,!0}function gte(e,t){let n,r,i,s,o,a,l,c,u="";const d=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(s=m+1,s=h)return!1;for(c=s,a=e.md.helpers.parseLinkDestination(e.src,s,e.posMax),a.ok&&(u=e.md.normalizeLink(a.str),e.md.validateLink(u)?s=a.pos:u=""),c=s;s=h||e.src.charCodeAt(s)!==41)return e.pos=d,!1;s++}else{if(typeof e.env.references>"u")return!1;if(s=0?i=e.src.slice(c,s++):s=m+1):s=m+1,i||(i=e.src.slice(p,m)),o=e.env.references[h1(i)],!o)return e.pos=d,!1;u=o.href,l=o.title}if(!t){r=e.src.slice(p,m);const T=[];e.md.inline.parse(r,e.md,e.env,T);const b=e.push("image","img",0),D=[["src",u],["alt",""]];b.attrs=D,b.children=T,b.content=r,l&&D.push(["title",l])}return e.pos=s,e.posMax=h,!0}const Tte=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Ate=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function bte(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const o=e.src.charCodeAt(n);if(o===60)return!1;if(o===62)break}const s=e.src.slice(r+1,n);if(Ate.test(s)){const o=e.md.normalizeLink(s);if(!e.md.validateLink(o))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(s);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=s.length+2,!0}if(Tte.test(s)){const o=e.md.normalizeLink("mailto:"+s);if(!e.md.validateLink(o))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(s);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=s.length+2,!0}return!1}function yte(e){return/^\s]/i.test(e)}function Ete(e){return/^<\/a\s*>/i.test(e)}function vte(e){const t=e|32;return t>=97&&t<=122}function Dte(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!vte(i))return!1;const s=e.src.slice(r).match(ete);if(!s)return!1;if(!t){const o=e.push("html_inline","",0);o.content=s[0],yte(o.content)&&e.linkLevel++,Ete(o.content)&&e.linkLevel--}return e.pos+=s[0].length,!0}const Ste=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,wte=/^&([a-z][a-z0-9]{1,31});/i;function _te(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const i=e.src.slice(n).match(Ste);if(i){if(!t){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),o=e.push("text_special","",0);o.content=Hy(s)?Pf(s):Pf(65533),o.markup=i[0],o.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(wte);if(i){const s=nR(i[0]);if(s!==i[0]){if(!t){const o=e.push("text_special","",0);o.content=s,o.markup=i[0],o.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function W2(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const s=[];for(let o=0;ol;c-=s[c]+1){const d=e[c];if(d.marker===a.marker&&d.open&&d.end<0){let h=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(h=!0),!h){const p=c>0&&!e[c-1].open?s[c-1]+1:0;s[o]=o-c+p,s[c]=p,a.open=!1,d.end=o,d.close=!1,u=-1,i=-2;break}}}u!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=u)}}function Cte(e){const t=e.tokens_meta,n=e.tokens_meta.length;W2(e.delimiters);for(let r=0;r0&&r++,i[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;o||e.pos++,s[t]=e.pos},P0.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},P0.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const s=this.ruler2.getRules(""),o=s.length;for(let a=0;a|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function RA(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function p1(e){return Object.prototype.toString.call(e)}function Ote(e){return p1(e)==="[object String]"}function xte(e){return p1(e)==="[object Object]"}function kte(e){return p1(e)==="[object RegExp]"}function K2(e){return p1(e)==="[object Function]"}function Rte(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const pR={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Mte(e){return Object.keys(e||{}).reduce(function(t,n){return t||pR.hasOwnProperty(n)},!1)}const Bte={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},Lte="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Ite="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Yte(e){e.__index__=-1,e.__text_cache__=""}function Hte(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function Q2(){return function(e,t){t.normalize(e)}}function $p(e){const t=e.re=Fte(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Lte),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function s(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){const l=e.__schemas__[a];if(l===null)return;const c={validate:null,link:null};if(e.__compiled__[a]=c,xte(l)){kte(l.validate)?c.validate=Hte(l.validate):K2(l.validate)?c.validate=l.validate:s(a,l),K2(l.normalize)?c.normalize=l.normalize:l.normalize?s(a,l):c.normalize=Q2();return}if(Ote(l)){i.push(a);return}s(a,l)}),i.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:Q2()};const o=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(Rte).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Yte(e)}function Zte(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function zg(e,t){const n=new Zte(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Di(e,t){if(!(this instanceof Di))return new Di(e,t);t||Mte(e)&&(t=e,e={}),this.__opts__=RA({},pR,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=RA({},Bte,e),this.__compiled__={},this.__tlds__=Ite,this.__tlds_replaced__=!1,this.re={},$p(this)}Di.prototype.add=function(e,t){return this.__schemas__[e]=t,$p(this),this},Di.prototype.set=function(e){return this.__opts__=RA(this.__opts__,e),this},Di.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,i,s,o,a,l,c;if(this.re.schema_test.test(e)){for(a=this.re.schema_search,a.lastIndex=0;(t=a.exec(e))!==null;)if(i=this.testSchemaAt(e,t[2],a.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(r=e.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,o=r.index+r[0].length,(this.__index__<0||sthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=o))),this.__index__>=0},Di.prototype.pretest=function(e){return this.re.pretest.test(e)},Di.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},Di.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(zg(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(zg(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},Di.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,zg(this,0)):null},Di.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,r,i){return n!==i[r-1]}).reverse(),$p(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,$p(this),this)},Di.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},Di.prototype.onCompile=function(){};const ou=2147483647,Rs=36,Py=1,Wd=26,Pte=38,$te=700,fR=72,mR=128,gR="-",Ute=/^xn--/,zte=/[^\0-\x7F]/,Vte=/[\x2E\u3002\uFF0E\uFF61]/g,jte={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Vg=Rs-Py,Ms=Math.floor,jg=String.fromCharCode;function ta(e){throw new RangeError(jte[e])}function Gte(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function TR(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(Vte,".");const i=e.split("."),s=Gte(i,t).join(".");return r+s}function AR(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),Wte=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Rs},J2=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},bR=function(e,t,n){let r=0;for(e=n?Ms(e/$te):e>>1,e+=Ms(e/t);e>Vg*Wd>>1;r+=Rs)e=Ms(e/Vg);return Ms(r+(Vg+1)*e/(e+Pte))},yR=function(e){const t=[],n=e.length;let r=0,i=mR,s=fR,o=e.lastIndexOf(gR);o<0&&(o=0);for(let a=0;a=128&&ta("not-basic"),t.push(e.charCodeAt(a));for(let a=o>0?o+1:0;a=n&&ta("invalid-input");const h=Wte(e.charCodeAt(a++));h>=Rs&&ta("invalid-input"),h>Ms((ou-r)/u)&&ta("overflow"),r+=h*u;const p=d<=s?Py:d>=s+Wd?Wd:d-s;if(hMs(ou/m)&&ta("overflow"),u*=m}const c=t.length+1;s=bR(r-l,c,l==0),Ms(r/c)>ou-i&&ta("overflow"),i+=Ms(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},ER=function(e){const t=[];e=AR(e);const n=e.length;let r=mR,i=0,s=fR;for(const l of e)l<128&&t.push(jg(l));const o=t.length;let a=o;for(o&&t.push(gR);a=r&&uMs((ou-i)/c)&&ta("overflow"),i+=(l-r)*c,r=l;for(const u of e)if(uou&&ta("overflow"),u===r){let d=i;for(let h=Rs;;h+=Rs){const p=h<=s?Py:h>=s+Wd?Wd:h-s;if(d=0))try{t.hostname=vR.toASCII(t.hostname)}catch{}return Vd(By(t))}function one(e){const t=Ly(e,!0);if(t.hostname&&(!t.protocol||DR.indexOf(t.protocol)>=0))try{t.hostname=vR.toUnicode(t.hostname)}catch{}return Su(By(t),Su.defaultChars+"%")}function Si(e,t){if(!(this instanceof Si))return new Si(e,t);t||Yy(e)||(t=e||{},e="default"),this.inline=new P0,this.block=new Pp,this.core=new kA,this.renderer=new Mc,this.linkify=new Di,this.validateLink=ine,this.normalizeLink=sne,this.normalizeLinkText=one,this.utils=uee,this.helpers=d1({},fee),this.options={},this.configure(e),t&&this.set(t)}Si.prototype.set=function(e){return d1(this.options,e),this},Si.prototype.configure=function(e){const t=this;if(Yy(e)){const n=e;if(e=tne[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},Si.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},Si.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},Si.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Si.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Si.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Si.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Si.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var X2,ew;function ane(){return ew||(ew=1,X2=function(e,t){var n=3,r="-",i=r.charCodeAt(0),s=r.length;function o(a,l,c,u){var d,h,p,m,T,b,D,v=!1,C=a.bMarks[l]+a.tShift[l],S=a.eMarks[l];if(l!==0||i!==a.src.charCodeAt(0))return!1;for(d=C+1;d<=S;d++)if(r[(d-C)%s]!==a.src[d]){D=d+1;break}if(p=Math.floor((d-C)/s),p=c||a.src.slice(C,S)==="..."||(C=a.bMarks[h]+a.tShift[h],S=a.eMarks[h],C=4)){for(d=C+1;d<=S&&r[(d-C)%s]===a.src[d];d++);if(!(Math.floor((d-C)/s)n!==t)}function wR(e,t){e&&e.attrs&&(e.attrs=SR(e.attrs,t))}function une(e,t){if(!tw.has(e))throw new TypeError(`figcaption must be one of: ${[...tw]}.`);if(e==="alt")return t.content;const n=t.attrs.find(([r])=>r==="title");return Array.isArray(n)&&n[1]?(wR(t,"title"),n[1]):void 0}function dne(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(n){let r=1;for(let i=1,s=n.tokens.length;iu.match(c)).map(u=>Array.from(u))}if(t.tabindex&&(n.tokens[i-1].attrPush(["tabindex",r]),r++),t.lazy&&(l.attrs.some(([c])=>c==="loading")||l.attrs.push(["loading","lazy"])),t.async&&(l.attrs.some(([c])=>c==="decoding")||l.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let c=!1;for(let u=0,d=l.attrs.length;uu==="src");l.attrs.push(["data-src",c[1]]),wR(l,"src")}}})}function hne(e,t,n){function r(h){return h.trim().split(" ",2)[0]===t}function i(h,p,m,T,b){return h[p].nesting===1&&h[p].attrJoin("class",t),b.renderToken(h,p,m,T,b)}n=n||{};const s=3,o=n.marker||":",a=o.charCodeAt(0),l=o.length,c=n.validate||r,u=n.render||i;function d(h,p,m,T){let b,D=!1,v=h.bMarks[p]+h.tShift[p],C=h.eMarks[p];if(a!==h.src.charCodeAt(v))return!1;for(b=v+1;b<=C&&o[(b-v)%l]===h.src[b];b++);const S=Math.floor((b-v)/l);if(S=m||(v=h.bMarks[H]+h.tShift[H],C=h.eMarks[H],v=4)){for(b=v+1;b<=C&&o[(b-v)%l]===h.src[b];b++);if(!(Math.floor((b-v)/l)(t,n,r,i,s)=>{const o=t[n];return o.nesting===1&&(o.attrSet("data-callout",e),o.attrJoin("class",`callout callout-${e}`)),s.renderToken(t,n,r,i,s)},fne=e=>(MA.forEach(t=>{e.use(hne,t,{render:pne(t)})}),e),nw=/^
\s*$/,mne=/(?<=^
\s*).*(?=<\/summary>\s*$)/,gne=/^<\/details>\s*$/,Tne=/(?<=^).*(?=<\/summary>\s*$)/;function Ane(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],o=!1,a=null,l=2;const c=e.src.slice(i,s).match(mne);if(c)a=c[0].trim(),l=1;else if(!e.src.slice(i,s).match(nw))return!1;if(r)return!0;let u=0,d=t;for(;d++,!(d>=n);){i=e.bMarks[d]+e.tShift[d],s=e.eMarks[d];const b=e.src.slice(i,s).match(Tne);if(b&&a===null){a=b[0].trim();continue}if(e.src.slice(i,s).match(nw)&&u++,!!e.src.slice(i,s).match(gne))if(u>0)u--;else{o=!0;break}}if(!o||a===null)return!1;const h=e.parentType,p=e.lineMax;e.parentType="reference",e.lineMax=d;let m=e.push("details_open","details",1);m.block=!0,m.info=a,m.map=[t,d],m=e.push("details_summary","summary",1),m.block=!1;const T=[];e.md.inline.parse(a,e.md,e.env,T);for(const b of T)m=e.push(b.type,b.tag,b.nesting),m.block=b.block,m.markup=b.markup,m.content=b.content;return m=e.push("details_summary","summary",-1),e.md.block.tokenize(e,t+l,d),m=e.push("details_close","details",-1),m.block=!0,e.parentType=h,e.lineMax=p,e.line=d+1,!0}function bne(e){e.block.ruler.before("fence","details",Ane,{alt:["paragraph","reference","blockquote","list"]})}function yne(e){e.inline.ruler.at("newline",(t,n)=>{const r=cR(t,n);return r&&t.tokens.length&&t.tokens[t.tokens.length-1].type==="hardbreak"&&t.tokens[t.tokens.length-1].attrSet("syntax"," "),r}),e.inline.ruler.at("escape",(t,n)=>{const r=uR(t,n);return r&&t.tokens.length&&t.tokens[t.tokens.length-1].type==="hardbreak"&&t.tokens[t.tokens.length-1].attrSet("syntax","\\"),r}),e.inline.ruler.after("html_inline","html_breaks",t=>{const n=t.src.slice(t.pos).match(/^\s*/);return n?(t.push("hardbreak","br",0).attrPush(["syntax","html"]),t.pos+=n[0].length,!0):!1}),e.renderer.rules.hardbreak=(t,n,r)=>`
`}function Ene(e){const t=/(\n(?[#\-*+>])|(?[`*\\~[\]]+))/;e.core.ruler.before("text_join","tag-markdown-syntax",n=>{const r=new n.Token("keep_md_open","span",1);r.attrSet("class","keep-md");const i=new n.Token("keep_md_close","span",-1);for(let s=0;s{function t({tokens:n}){for(let r=1,i=n.length;r{const n=t.tokens;for(let r=0;rl.nesting===1&&Gg(l,"task-list-item")!==o);a>r&&_ne(n,a,t.Token)}return!1})}function Gg(e,t){return e.attrGet("class")?.split(" ").includes(t)||!1}function _ne(e,t,n){const r=new n("bullet_list_close","ul",-1);r.block=!0;const i=new n("bullet_list_open","ul",1);i.attrSet("class","contains-task-list"),i.block=!0,i.markup=e[t].markup,e.splice(t,0,r,i)}function Cne(e,t,n){const r=e[t].level+1;for(let i=t+1;iFne(n,t)),e.renderer.rules.taskListItemCheckbox=n=>{const r=n[0],i=r.attrGet("checked")?'checked="" ':"",s=r.attrGet("disabled")?'disabled="" ':"",o=r.attrGet("line"),a=`id="${r.attrGet("id")}" `,l=o&&t.lineNumber?`data-line="${o}" `:"";return``},e.renderer.rules.taskListItemLabel_close=()=>"",e.renderer.rules.taskListItemLabel_open=n=>`