@chahindb7/vue3-editor
Version:
HTML editor using Vue.js 3, and Quill.js, an open source editor with advanced table functionality (quill-table-better)
1 lines • 321 kB
JavaScript
var o1=Object.defineProperty;var a1=(K,yt,je)=>yt in K?o1(K,yt,{enumerable:!0,configurable:!0,writable:!0,value:je}):K[yt]=je;var v=(K,yt,je)=>(a1(K,typeof yt!="symbol"?yt+"":yt,je),je);(function(K,yt){typeof exports=="object"&&typeof module<"u"?yt(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],yt):(K=typeof globalThis<"u"?globalThis:K||self,yt(K.Vue3Editor={},K.Vue))})(this,function(K,yt){var Si;"use strict";var je=typeof global=="object"&&global&&global.Object===Object&&global;const ho=je;var fh=typeof self=="object"&&self&&self.Object===Object&&self,ph=ho||fh||Function("return this")();const Qt=ph;var gh=Qt.Symbol;const Ne=gh;var uo=Object.prototype,mh=uo.hasOwnProperty,bh=uo.toString,Wn=Ne?Ne.toStringTag:void 0;function yh(s){var t=mh.call(s,Wn),e=s[Wn];try{s[Wn]=void 0;var n=!0}catch{}var i=bh.call(s);return n&&(t?s[Wn]=e:delete s[Wn]),i}var vh=Object.prototype,wh=vh.toString;function xh(s){return wh.call(s)}var Eh="[object Null]",Ch="[object Undefined]",fo=Ne?Ne.toStringTag:void 0;function un(s){return s==null?s===void 0?Ch:Eh:fo&&fo in Object(s)?yh(s):xh(s)}function de(s){return s!=null&&typeof s=="object"}var Nh=Array.isArray;const Pe=Nh;function Te(s){var t=typeof s;return s!=null&&(t=="object"||t=="function")}function po(s){return s}var Th="[object AsyncFunction]",Ah="[object Function]",Lh="[object GeneratorFunction]",Sh="[object Proxy]";function Qi(s){if(!Te(s))return!1;var t=un(s);return t==Ah||t==Lh||t==Th||t==Sh}var Ih=Qt["__core-js_shared__"];const Ji=Ih;var go=function(){var s=/[^.]+$/.exec(Ji&&Ji.keys&&Ji.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}();function qh(s){return!!go&&go in s}var Oh=Function.prototype,Mh=Oh.toString;function ze(s){if(s!=null){try{return Mh.call(s)}catch{}try{return s+""}catch{}}return""}var Rh=/[\\^$.*+?()[\]{}|]/g,_h=/^\[object .+?Constructor\]$/,kh=Function.prototype,Bh=Object.prototype,$h=kh.toString,Dh=Bh.hasOwnProperty,jh=RegExp("^"+$h.call(Dh).replace(Rh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ph(s){if(!Te(s)||qh(s))return!1;var t=Qi(s)?jh:_h;return t.test(ze(s))}function zh(s,t){return s==null?void 0:s[t]}function He(s,t){var e=zh(s,t);return Ph(e)?e:void 0}var Hh=He(Qt,"WeakMap");const tr=Hh;var mo=Object.create,Uh=function(){function s(){}return function(t){if(!Te(t))return{};if(mo)return mo(t);s.prototype=t;var e=new s;return s.prototype=void 0,e}}();const Fh=Uh;function Wh(s,t,e){switch(e.length){case 0:return s.call(t);case 1:return s.call(t,e[0]);case 2:return s.call(t,e[0],e[1]);case 3:return s.call(t,e[0],e[1],e[2])}return s.apply(t,e)}function bo(s,t){var e=-1,n=s.length;for(t||(t=Array(n));++e<n;)t[e]=s[e];return t}var Vh=800,Kh=16,Gh=Date.now;function Yh(s){var t=0,e=0;return function(){var n=Gh(),i=Kh-(n-e);if(e=n,i>0){if(++t>=Vh)return arguments[0]}else t=0;return s.apply(void 0,arguments)}}function Zh(s){return function(){return s}}var Xh=function(){try{var s=He(Object,"defineProperty");return s({},"",{}),s}catch{}}();const Ps=Xh;var Qh=Ps?function(s,t){return Ps(s,"toString",{configurable:!0,enumerable:!1,value:Zh(t),writable:!0})}:po,Jh=Yh(Qh);const tu=Jh;function eu(s,t){for(var e=-1,n=s==null?0:s.length;++e<n&&t(s[e],e,s)!==!1;);return s}var nu=9007199254740991,su=/^(?:0|[1-9]\d*)$/;function yo(s,t){var e=typeof s;return t=t??nu,!!t&&(e=="number"||e!="symbol"&&su.test(s))&&s>-1&&s%1==0&&s<t}function er(s,t,e){t=="__proto__"&&Ps?Ps(s,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):s[t]=e}function Vn(s,t){return s===t||s!==s&&t!==t}var iu=Object.prototype,ru=iu.hasOwnProperty;function vo(s,t,e){var n=s[t];(!(ru.call(s,t)&&Vn(n,e))||e===void 0&&!(t in s))&&er(s,t,e)}function Kn(s,t,e,n){var i=!e;e||(e={});for(var r=-1,l=t.length;++r<l;){var o=t[r],a=n?n(e[o],s[o],o,e,s):void 0;a===void 0&&(a=s[o]),i?er(e,o,a):vo(e,o,a)}return e}var wo=Math.max;function lu(s,t,e){return t=wo(t===void 0?s.length-1:t,0),function(){for(var n=arguments,i=-1,r=wo(n.length-t,0),l=Array(r);++i<r;)l[i]=n[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=n[i];return o[t]=e(l),Wh(s,this,o)}}function ou(s,t){return tu(lu(s,t,po),s+"")}var au=9007199254740991;function xo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=au}function zs(s){return s!=null&&xo(s.length)&&!Qi(s)}function cu(s,t,e){if(!Te(e))return!1;var n=typeof t;return(n=="number"?zs(e)&&yo(t,e.length):n=="string"&&t in e)?Vn(e[t],s):!1}function hu(s){return ou(function(t,e){var n=-1,i=e.length,r=i>1?e[i-1]:void 0,l=i>2?e[2]:void 0;for(r=s.length>3&&typeof r=="function"?(i--,r):void 0,l&&cu(e[0],e[1],l)&&(r=i<3?void 0:r,i=1),t=Object(t);++n<i;){var o=e[n];o&&s(t,o,n,r)}return t})}var uu=Object.prototype;function nr(s){var t=s&&s.constructor,e=typeof t=="function"&&t.prototype||uu;return s===e}function du(s,t){for(var e=-1,n=Array(s);++e<s;)n[e]=t(e);return n}var fu="[object Arguments]";function Eo(s){return de(s)&&un(s)==fu}var Co=Object.prototype,pu=Co.hasOwnProperty,gu=Co.propertyIsEnumerable,mu=Eo(function(){return arguments}())?Eo:function(s){return de(s)&&pu.call(s,"callee")&&!gu.call(s,"callee")};const sr=mu;function bu(){return!1}var No=typeof K=="object"&&K&&!K.nodeType&&K,To=No&&typeof module=="object"&&module&&!module.nodeType&&module,yu=To&&To.exports===No,Ao=yu?Qt.Buffer:void 0,vu=Ao?Ao.isBuffer:void 0,wu=vu||bu;const Gn=wu;var xu="[object Arguments]",Eu="[object Array]",Cu="[object Boolean]",Nu="[object Date]",Tu="[object Error]",Au="[object Function]",Lu="[object Map]",Su="[object Number]",Iu="[object Object]",qu="[object RegExp]",Ou="[object Set]",Mu="[object String]",Ru="[object WeakMap]",_u="[object ArrayBuffer]",ku="[object DataView]",Bu="[object Float32Array]",$u="[object Float64Array]",Du="[object Int8Array]",ju="[object Int16Array]",Pu="[object Int32Array]",zu="[object Uint8Array]",Hu="[object Uint8ClampedArray]",Uu="[object Uint16Array]",Fu="[object Uint32Array]",J={};J[Bu]=J[$u]=J[Du]=J[ju]=J[Pu]=J[zu]=J[Hu]=J[Uu]=J[Fu]=!0,J[xu]=J[Eu]=J[_u]=J[Cu]=J[ku]=J[Nu]=J[Tu]=J[Au]=J[Lu]=J[Su]=J[Iu]=J[qu]=J[Ou]=J[Mu]=J[Ru]=!1;function Wu(s){return de(s)&&xo(s.length)&&!!J[un(s)]}function ir(s){return function(t){return s(t)}}var Lo=typeof K=="object"&&K&&!K.nodeType&&K,Yn=Lo&&typeof module=="object"&&module&&!module.nodeType&&module,Vu=Yn&&Yn.exports===Lo,rr=Vu&&ho.process,Ku=function(){try{var s=Yn&&Yn.require&&Yn.require("util").types;return s||rr&&rr.binding&&rr.binding("util")}catch{}}();const dn=Ku;var So=dn&&dn.isTypedArray,Gu=So?ir(So):Wu;const lr=Gu;var Yu=Object.prototype,Zu=Yu.hasOwnProperty;function Io(s,t){var e=Pe(s),n=!e&&sr(s),i=!e&&!n&&Gn(s),r=!e&&!n&&!i&&lr(s),l=e||n||i||r,o=l?du(s.length,String):[],a=o.length;for(var h in s)(t||Zu.call(s,h))&&!(l&&(h=="length"||i&&(h=="offset"||h=="parent")||r&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||yo(h,a)))&&o.push(h);return o}function qo(s,t){return function(e){return s(t(e))}}var Xu=qo(Object.keys,Object);const Qu=Xu;var Ju=Object.prototype,td=Ju.hasOwnProperty;function ed(s){if(!nr(s))return Qu(s);var t=[];for(var e in Object(s))td.call(s,e)&&e!="constructor"&&t.push(e);return t}function or(s){return zs(s)?Io(s):ed(s)}function nd(s){var t=[];if(s!=null)for(var e in Object(s))t.push(e);return t}var sd=Object.prototype,id=sd.hasOwnProperty;function rd(s){if(!Te(s))return nd(s);var t=nr(s),e=[];for(var n in s)n=="constructor"&&(t||!id.call(s,n))||e.push(n);return e}function Zn(s){return zs(s)?Io(s,!0):rd(s)}var ld=He(Object,"create");const Xn=ld;function od(){this.__data__=Xn?Xn(null):{},this.size=0}function ad(s){var t=this.has(s)&&delete this.__data__[s];return this.size-=t?1:0,t}var cd="__lodash_hash_undefined__",hd=Object.prototype,ud=hd.hasOwnProperty;function dd(s){var t=this.__data__;if(Xn){var e=t[s];return e===cd?void 0:e}return ud.call(t,s)?t[s]:void 0}var fd=Object.prototype,pd=fd.hasOwnProperty;function gd(s){var t=this.__data__;return Xn?t[s]!==void 0:pd.call(t,s)}var md="__lodash_hash_undefined__";function bd(s,t){var e=this.__data__;return this.size+=this.has(s)?0:1,e[s]=Xn&&t===void 0?md:t,this}function Ue(s){var t=-1,e=s==null?0:s.length;for(this.clear();++t<e;){var n=s[t];this.set(n[0],n[1])}}Ue.prototype.clear=od,Ue.prototype.delete=ad,Ue.prototype.get=dd,Ue.prototype.has=gd,Ue.prototype.set=bd;function yd(){this.__data__=[],this.size=0}function Hs(s,t){for(var e=s.length;e--;)if(Vn(s[e][0],t))return e;return-1}var vd=Array.prototype,wd=vd.splice;function xd(s){var t=this.__data__,e=Hs(t,s);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():wd.call(t,e,1),--this.size,!0}function Ed(s){var t=this.__data__,e=Hs(t,s);return e<0?void 0:t[e][1]}function Cd(s){return Hs(this.__data__,s)>-1}function Nd(s,t){var e=this.__data__,n=Hs(e,s);return n<0?(++this.size,e.push([s,t])):e[n][1]=t,this}function fe(s){var t=-1,e=s==null?0:s.length;for(this.clear();++t<e;){var n=s[t];this.set(n[0],n[1])}}fe.prototype.clear=yd,fe.prototype.delete=xd,fe.prototype.get=Ed,fe.prototype.has=Cd,fe.prototype.set=Nd;var Td=He(Qt,"Map");const Qn=Td;function Ad(){this.size=0,this.__data__={hash:new Ue,map:new(Qn||fe),string:new Ue}}function Ld(s){var t=typeof s;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?s!=="__proto__":s===null}function Us(s,t){var e=s.__data__;return Ld(t)?e[typeof t=="string"?"string":"hash"]:e.map}function Sd(s){var t=Us(this,s).delete(s);return this.size-=t?1:0,t}function Id(s){return Us(this,s).get(s)}function qd(s){return Us(this,s).has(s)}function Od(s,t){var e=Us(this,s),n=e.size;return e.set(s,t),this.size+=e.size==n?0:1,this}function Fe(s){var t=-1,e=s==null?0:s.length;for(this.clear();++t<e;){var n=s[t];this.set(n[0],n[1])}}Fe.prototype.clear=Ad,Fe.prototype.delete=Sd,Fe.prototype.get=Id,Fe.prototype.has=qd,Fe.prototype.set=Od;function Oo(s,t){for(var e=-1,n=t.length,i=s.length;++e<n;)s[i+e]=t[e];return s}var Md=qo(Object.getPrototypeOf,Object);const ar=Md;var Rd="[object Object]",_d=Function.prototype,kd=Object.prototype,Mo=_d.toString,Bd=kd.hasOwnProperty,$d=Mo.call(Object);function Dd(s){if(!de(s)||un(s)!=Rd)return!1;var t=ar(s);if(t===null)return!0;var e=Bd.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&Mo.call(e)==$d}function jd(){this.__data__=new fe,this.size=0}function Pd(s){var t=this.__data__,e=t.delete(s);return this.size=t.size,e}function zd(s){return this.__data__.get(s)}function Hd(s){return this.__data__.has(s)}var Ud=200;function Fd(s,t){var e=this.__data__;if(e instanceof fe){var n=e.__data__;if(!Qn||n.length<Ud-1)return n.push([s,t]),this.size=++e.size,this;e=this.__data__=new Fe(n)}return e.set(s,t),this.size=e.size,this}function Jt(s){var t=this.__data__=new fe(s);this.size=t.size}Jt.prototype.clear=jd,Jt.prototype.delete=Pd,Jt.prototype.get=zd,Jt.prototype.has=Hd,Jt.prototype.set=Fd;function Wd(s,t){return s&&Kn(t,or(t),s)}function Vd(s,t){return s&&Kn(t,Zn(t),s)}var Ro=typeof K=="object"&&K&&!K.nodeType&&K,_o=Ro&&typeof module=="object"&&module&&!module.nodeType&&module,Kd=_o&&_o.exports===Ro,ko=Kd?Qt.Buffer:void 0,Bo=ko?ko.allocUnsafe:void 0;function $o(s,t){if(t)return s.slice();var e=s.length,n=Bo?Bo(e):new s.constructor(e);return s.copy(n),n}function Gd(s,t){for(var e=-1,n=s==null?0:s.length,i=0,r=[];++e<n;){var l=s[e];t(l,e,s)&&(r[i++]=l)}return r}function Do(){return[]}var Yd=Object.prototype,Zd=Yd.propertyIsEnumerable,jo=Object.getOwnPropertySymbols,Xd=jo?function(s){return s==null?[]:(s=Object(s),Gd(jo(s),function(t){return Zd.call(s,t)}))}:Do;const cr=Xd;function Qd(s,t){return Kn(s,cr(s),t)}var Jd=Object.getOwnPropertySymbols,tf=Jd?function(s){for(var t=[];s;)Oo(t,cr(s)),s=ar(s);return t}:Do;const Po=tf;function ef(s,t){return Kn(s,Po(s),t)}function zo(s,t,e){var n=t(s);return Pe(s)?n:Oo(n,e(s))}function hr(s){return zo(s,or,cr)}function nf(s){return zo(s,Zn,Po)}var sf=He(Qt,"DataView");const ur=sf;var rf=He(Qt,"Promise");const dr=rf;var lf=He(Qt,"Set");const fr=lf;var Ho="[object Map]",of="[object Object]",Uo="[object Promise]",Fo="[object Set]",Wo="[object WeakMap]",Vo="[object DataView]",af=ze(ur),cf=ze(Qn),hf=ze(dr),uf=ze(fr),df=ze(tr),We=un;(ur&&We(new ur(new ArrayBuffer(1)))!=Vo||Qn&&We(new Qn)!=Ho||dr&&We(dr.resolve())!=Uo||fr&&We(new fr)!=Fo||tr&&We(new tr)!=Wo)&&(We=function(s){var t=un(s),e=t==of?s.constructor:void 0,n=e?ze(e):"";if(n)switch(n){case af:return Vo;case cf:return Ho;case hf:return Uo;case uf:return Fo;case df:return Wo}return t});const Jn=We;var ff=Object.prototype,pf=ff.hasOwnProperty;function gf(s){var t=s.length,e=new s.constructor(t);return t&&typeof s[0]=="string"&&pf.call(s,"index")&&(e.index=s.index,e.input=s.input),e}var mf=Qt.Uint8Array;const Fs=mf;function pr(s){var t=new s.constructor(s.byteLength);return new Fs(t).set(new Fs(s)),t}function bf(s,t){var e=t?pr(s.buffer):s.buffer;return new s.constructor(e,s.byteOffset,s.byteLength)}var yf=/\w*$/;function vf(s){var t=new s.constructor(s.source,yf.exec(s));return t.lastIndex=s.lastIndex,t}var Ko=Ne?Ne.prototype:void 0,Go=Ko?Ko.valueOf:void 0;function wf(s){return Go?Object(Go.call(s)):{}}function Yo(s,t){var e=t?pr(s.buffer):s.buffer;return new s.constructor(e,s.byteOffset,s.length)}var xf="[object Boolean]",Ef="[object Date]",Cf="[object Map]",Nf="[object Number]",Tf="[object RegExp]",Af="[object Set]",Lf="[object String]",Sf="[object Symbol]",If="[object ArrayBuffer]",qf="[object DataView]",Of="[object Float32Array]",Mf="[object Float64Array]",Rf="[object Int8Array]",_f="[object Int16Array]",kf="[object Int32Array]",Bf="[object Uint8Array]",$f="[object Uint8ClampedArray]",Df="[object Uint16Array]",jf="[object Uint32Array]";function Pf(s,t,e){var n=s.constructor;switch(t){case If:return pr(s);case xf:case Ef:return new n(+s);case qf:return bf(s,e);case Of:case Mf:case Rf:case _f:case kf:case Bf:case $f:case Df:case jf:return Yo(s,e);case Cf:return new n;case Nf:case Lf:return new n(s);case Tf:return vf(s);case Af:return new n;case Sf:return wf(s)}}function Zo(s){return typeof s.constructor=="function"&&!nr(s)?Fh(ar(s)):{}}var zf="[object Map]";function Hf(s){return de(s)&&Jn(s)==zf}var Xo=dn&&dn.isMap,Uf=Xo?ir(Xo):Hf;const Ff=Uf;var Wf="[object Set]";function Vf(s){return de(s)&&Jn(s)==Wf}var Qo=dn&&dn.isSet,Kf=Qo?ir(Qo):Vf;const Gf=Kf;var Yf=1,Zf=2,Xf=4,Jo="[object Arguments]",Qf="[object Array]",Jf="[object Boolean]",tp="[object Date]",ep="[object Error]",ta="[object Function]",np="[object GeneratorFunction]",sp="[object Map]",ip="[object Number]",ea="[object Object]",rp="[object RegExp]",lp="[object Set]",op="[object String]",ap="[object Symbol]",cp="[object WeakMap]",hp="[object ArrayBuffer]",up="[object DataView]",dp="[object Float32Array]",fp="[object Float64Array]",pp="[object Int8Array]",gp="[object Int16Array]",mp="[object Int32Array]",bp="[object Uint8Array]",yp="[object Uint8ClampedArray]",vp="[object Uint16Array]",wp="[object Uint32Array]",Z={};Z[Jo]=Z[Qf]=Z[hp]=Z[up]=Z[Jf]=Z[tp]=Z[dp]=Z[fp]=Z[pp]=Z[gp]=Z[mp]=Z[sp]=Z[ip]=Z[ea]=Z[rp]=Z[lp]=Z[op]=Z[ap]=Z[bp]=Z[yp]=Z[vp]=Z[wp]=!0,Z[ep]=Z[ta]=Z[cp]=!1;function Ws(s,t,e,n,i,r){var l,o=t&Yf,a=t&Zf,h=t&Xf;if(e&&(l=i?e(s,n,i,r):e(s)),l!==void 0)return l;if(!Te(s))return s;var u=Pe(s);if(u){if(l=gf(s),!o)return bo(s,l)}else{var f=Jn(s),d=f==ta||f==np;if(Gn(s))return $o(s,o);if(f==ea||f==Jo||d&&!i){if(l=a||d?{}:Zo(s),!o)return a?ef(s,Vd(l,s)):Qd(s,Wd(l,s))}else{if(!Z[f])return i?s:{};l=Pf(s,f,o)}}r||(r=new Jt);var g=r.get(s);if(g)return g;r.set(s,l),Gf(s)?s.forEach(function(y){l.add(Ws(y,t,e,y,s,r))}):Ff(s)&&s.forEach(function(y,x){l.set(x,Ws(y,t,e,x,s,r))});var m=h?a?nf:hr:a?Zn:or,b=u?void 0:m(s);return eu(b||s,function(y,x){b&&(x=y,y=s[x]),vo(l,x,Ws(y,t,e,x,s,r))}),l}var xp=1,Ep=4;function fn(s){return Ws(s,xp|Ep)}var Cp="__lodash_hash_undefined__";function Np(s){return this.__data__.set(s,Cp),this}function Tp(s){return this.__data__.has(s)}function Vs(s){var t=-1,e=s==null?0:s.length;for(this.__data__=new Fe;++t<e;)this.add(s[t])}Vs.prototype.add=Vs.prototype.push=Np,Vs.prototype.has=Tp;function Ap(s,t){for(var e=-1,n=s==null?0:s.length;++e<n;)if(t(s[e],e,s))return!0;return!1}function Lp(s,t){return s.has(t)}var Sp=1,Ip=2;function na(s,t,e,n,i,r){var l=e&Sp,o=s.length,a=t.length;if(o!=a&&!(l&&a>o))return!1;var h=r.get(s),u=r.get(t);if(h&&u)return h==t&&u==s;var f=-1,d=!0,g=e&Ip?new Vs:void 0;for(r.set(s,t),r.set(t,s);++f<o;){var m=s[f],b=t[f];if(n)var y=l?n(b,m,f,t,s,r):n(m,b,f,s,t,r);if(y!==void 0){if(y)continue;d=!1;break}if(g){if(!Ap(t,function(x,C){if(!Lp(g,C)&&(m===x||i(m,x,e,n,r)))return g.push(C)})){d=!1;break}}else if(!(m===b||i(m,b,e,n,r))){d=!1;break}}return r.delete(s),r.delete(t),d}function qp(s){var t=-1,e=Array(s.size);return s.forEach(function(n,i){e[++t]=[i,n]}),e}function Op(s){var t=-1,e=Array(s.size);return s.forEach(function(n){e[++t]=n}),e}var Mp=1,Rp=2,_p="[object Boolean]",kp="[object Date]",Bp="[object Error]",$p="[object Map]",Dp="[object Number]",jp="[object RegExp]",Pp="[object Set]",zp="[object String]",Hp="[object Symbol]",Up="[object ArrayBuffer]",Fp="[object DataView]",sa=Ne?Ne.prototype:void 0,gr=sa?sa.valueOf:void 0;function Wp(s,t,e,n,i,r,l){switch(e){case Fp:if(s.byteLength!=t.byteLength||s.byteOffset!=t.byteOffset)return!1;s=s.buffer,t=t.buffer;case Up:return!(s.byteLength!=t.byteLength||!r(new Fs(s),new Fs(t)));case _p:case kp:case Dp:return Vn(+s,+t);case Bp:return s.name==t.name&&s.message==t.message;case jp:case zp:return s==t+"";case $p:var o=qp;case Pp:var a=n&Mp;if(o||(o=Op),s.size!=t.size&&!a)return!1;var h=l.get(s);if(h)return h==t;n|=Rp,l.set(s,t);var u=na(o(s),o(t),n,i,r,l);return l.delete(s),u;case Hp:if(gr)return gr.call(s)==gr.call(t)}return!1}var Vp=1,Kp=Object.prototype,Gp=Kp.hasOwnProperty;function Yp(s,t,e,n,i,r){var l=e&Vp,o=hr(s),a=o.length,h=hr(t),u=h.length;if(a!=u&&!l)return!1;for(var f=a;f--;){var d=o[f];if(!(l?d in t:Gp.call(t,d)))return!1}var g=r.get(s),m=r.get(t);if(g&&m)return g==t&&m==s;var b=!0;r.set(s,t),r.set(t,s);for(var y=l;++f<a;){d=o[f];var x=s[d],C=t[d];if(n)var N=l?n(C,x,d,t,s,r):n(x,C,d,s,t,r);if(!(N===void 0?x===C||i(x,C,e,n,r):N)){b=!1;break}y||(y=d=="constructor")}if(b&&!y){var L=s.constructor,A=t.constructor;L!=A&&"constructor"in s&&"constructor"in t&&!(typeof L=="function"&&L instanceof L&&typeof A=="function"&&A instanceof A)&&(b=!1)}return r.delete(s),r.delete(t),b}var Zp=1,ia="[object Arguments]",ra="[object Array]",Ks="[object Object]",Xp=Object.prototype,la=Xp.hasOwnProperty;function Qp(s,t,e,n,i,r){var l=Pe(s),o=Pe(t),a=l?ra:Jn(s),h=o?ra:Jn(t);a=a==ia?Ks:a,h=h==ia?Ks:h;var u=a==Ks,f=h==Ks,d=a==h;if(d&&Gn(s)){if(!Gn(t))return!1;l=!0,u=!1}if(d&&!u)return r||(r=new Jt),l||lr(s)?na(s,t,e,n,i,r):Wp(s,t,a,e,n,i,r);if(!(e&Zp)){var g=u&&la.call(s,"__wrapped__"),m=f&&la.call(t,"__wrapped__");if(g||m){var b=g?s.value():s,y=m?t.value():t;return r||(r=new Jt),i(b,y,e,n,r)}}return d?(r||(r=new Jt),Yp(s,t,e,n,i,r)):!1}function oa(s,t,e,n,i){return s===t?!0:s==null||t==null||!de(s)&&!de(t)?s!==s&&t!==t:Qp(s,t,e,n,oa,i)}function Jp(s){return function(t,e,n){for(var i=-1,r=Object(t),l=n(t),o=l.length;o--;){var a=l[s?o:++i];if(e(r[a],a,r)===!1)break}return t}}var tg=Jp();const eg=tg;function mr(s,t,e){(e!==void 0&&!Vn(s[t],e)||e===void 0&&!(t in s))&&er(s,t,e)}function ng(s){return de(s)&&zs(s)}function br(s,t){if(!(t==="constructor"&&typeof s[t]=="function")&&t!="__proto__")return s[t]}function sg(s){return Kn(s,Zn(s))}function ig(s,t,e,n,i,r,l){var o=br(s,e),a=br(t,e),h=l.get(a);if(h){mr(s,e,h);return}var u=r?r(o,a,e+"",s,t,l):void 0,f=u===void 0;if(f){var d=Pe(a),g=!d&&Gn(a),m=!d&&!g&&lr(a);u=a,d||g||m?Pe(o)?u=o:ng(o)?u=bo(o):g?(f=!1,u=$o(a,!0)):m?(f=!1,u=Yo(a,!0)):u=[]:Dd(a)||sr(a)?(u=o,sr(o)?u=sg(o):(!Te(o)||Qi(o))&&(u=Zo(a))):f=!1}f&&(l.set(a,u),i(u,a,n,r,l),l.delete(a)),mr(s,e,u)}function aa(s,t,e,n,i){s!==t&&eg(t,function(r,l){if(i||(i=new Jt),Te(r))ig(s,t,l,e,aa,n,i);else{var o=n?n(br(s,l),r,l+"",s,t,i):void 0;o===void 0&&(o=r),mr(s,l,o)}},Zn)}function yr(s,t){return oa(s,t)}var rg=hu(function(s,t,e){aa(s,t,e)});const Ae=rg;var M=(s=>(s[s.TYPE=3]="TYPE",s[s.LEVEL=12]="LEVEL",s[s.ATTRIBUTE=13]="ATTRIBUTE",s[s.BLOT=14]="BLOT",s[s.INLINE=7]="INLINE",s[s.BLOCK=11]="BLOCK",s[s.BLOCK_BLOT=10]="BLOCK_BLOT",s[s.INLINE_BLOT=6]="INLINE_BLOT",s[s.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",s[s.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",s[s.ANY=15]="ANY",s))(M||{});class te{constructor(t,e,n={}){this.attrName=t,this.keyName=e;const i=M.TYPE&M.ATTRIBUTE;this.scope=n.scope!=null?n.scope&M.LEVEL|i:M.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(t){return Array.from(t.attributes).map(e=>e.name)}add(t,e){return this.canAdd(t,e)?(t.setAttribute(this.keyName,e),!0):!1}canAdd(t,e){return this.whitelist==null?!0:typeof e=="string"?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}}class pn extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const ca=class ao{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,e=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(e){let n=null;try{n=t.parentNode}catch{return null}return this.find(n,e)}return null}create(t,e,n){const i=this.query(e);if(i==null)throw new pn(`Unable to create ${e} blot`);const r=i,l=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(n),o=new r(t,l,n);return ao.blots.set(o.domNode,o),o}find(t,e=!1){return ao.find(t,e)}query(t,e=M.ANY){let n;return typeof t=="string"?n=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?n=this.types.text:typeof t=="number"?t&M.LEVEL&M.BLOCK?n=this.types.block:t&M.LEVEL&M.INLINE&&(n=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(i=>(n=this.classes[i],!!n)),n=n||this.tags[t.tagName]),n==null?null:"scope"in n&&e&M.LEVEL&n.scope&&e&M.TYPE&n.scope?n:null}register(...t){return t.map(e=>{const n="blotName"in e,i="attrName"in e;if(!n&&!i)throw new pn("Invalid definition");if(n&&e.blotName==="abstract")throw new pn("Cannot register abstract class");const r=n?e.blotName:i?e.attrName:void 0;return this.types[r]=e,i?typeof e.keyName=="string"&&(this.attributes[e.keyName]=e):n&&(e.className&&(this.classes[e.className]=e),e.tagName&&(Array.isArray(e.tagName)?e.tagName=e.tagName.map(l=>l.toUpperCase()):e.tagName=e.tagName.toUpperCase(),(Array.isArray(e.tagName)?e.tagName:[e.tagName]).forEach(l=>{(this.tags[l]==null||e.className==null)&&(this.tags[l]=e)}))),e})}};ca.blots=new WeakMap;let gn=ca;function ha(s,t){return(s.getAttribute("class")||"").split(/\s+/).filter(e=>e.indexOf(`${t}-`)===0)}class lg extends te{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(e=>e.split("-").slice(0,-1).join("-"))}add(t,e){return this.canAdd(t,e)?(this.remove(t),t.classList.add(`${this.keyName}-${e}`),!0):!1}remove(t){ha(t,this.keyName).forEach(e=>{t.classList.remove(e)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const e=(ha(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}}const Dt=lg;function vr(s){const t=s.split("-"),e=t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return t[0]+e}class og extends te{static keys(t){return(t.getAttribute("style")||"").split(";").map(e=>e.split(":")[0].trim())}add(t,e){return this.canAdd(t,e)?(t.style[vr(this.keyName)]=e,!0):!1}remove(t){t.style[vr(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[vr(this.keyName)];return this.canAdd(t,e)?e:""}}const Le=og;class ag{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,e){e?t.add(this.domNode,e)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=gn.find(this.domNode);if(t==null)return;const e=te.keys(this.domNode),n=Dt.keys(this.domNode),i=Le.keys(this.domNode);e.concat(n).concat(i).forEach(r=>{const l=t.scroll.query(r,M.ATTRIBUTE);l instanceof te&&(this.attributes[l.attrName]=l)})}copy(t){Object.keys(this.attributes).forEach(e=>{const n=this.attributes[e].value(this.domNode);t.format(e,n)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(e=>{this.attributes[e].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,e)=>(t[e]=this.attributes[e].value(this.domNode),t),{})}}const Gs=ag,ua=class{constructor(t,e){this.scroll=t,this.domNode=e,gn.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new pn("Blot definition missing tagName");let e,n;return Array.isArray(this.tagName)?(typeof t=="string"?(n=t.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):typeof t=="number"&&(n=t),typeof n=="number"?e=document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?e=document.createElement(n):e=document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),gn.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,n,i){const r=this.isolate(t,e);if(this.scroll.query(n,M.BLOT)!=null&&i)r.wrap(n,i);else if(this.scroll.query(n,M.ATTRIBUTE)!=null){const l=this.scroll.create(this.statics.scope);r.wrap(l),l.format(n,i)}}insertAt(t,e,n){const i=n==null?this.scroll.create("text",e):this.scroll.create(e,n),r=this.split(t);this.parent.insertBefore(i,r||void 0)}isolate(t,e){const n=this.split(t);if(n==null)throw new Error("Attempt to isolate at end");return n.split(e),n}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,e){const n=typeof t=="string"?this.scroll.create(t,e):t;return this.parent!=null&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(t,e){return t===0?this:this.next}update(t,e){}wrap(t,e){const n=typeof t=="string"?this.scroll.create(t,e):t;if(this.parent!=null&&this.parent.insertBefore(n,this.next||void 0),typeof n.appendChild!="function")throw new pn(`Cannot wrap ${t}`);return n.appendChild(this),n}};ua.blotName="abstract";let da=ua;const fa=class extends da{static value(t){return!0}index(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}position(t,e){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};fa.scope=M.INLINE_BLOT;const dt=fa;class cg{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const e=t.slice(1);this.append(...e)}}at(t){const e=this.iterator();let n=e();for(;n&&t>0;)t-=1,n=e();return n}contains(t){const e=this.iterator();let n=e();for(;n;){if(n===t)return!0;n=e()}return!1}indexOf(t){const e=this.iterator();let n=e(),i=0;for(;n;){if(n===t)return i;i+=1,n=e()}return-1}insertBefore(t,e){t!=null&&(this.remove(t),t.next=e,e!=null?(t.prev=e.prev,e.prev!=null&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let e=0,n=this.head;for(;n!=null;){if(n===t)return e;e+=n.length(),n=n.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const e=t;return t!=null&&(t=t.next),e}}find(t,e=!1){const n=this.iterator();let i=n();for(;i;){const r=i.length();if(t<r||e&&t===r&&(i.next==null||i.next.length()!==0))return[i,t];t-=r,i=n()}return[null,0]}forEach(t){const e=this.iterator();let n=e();for(;n;)t(n),n=e()}forEachAt(t,e,n){if(e<=0)return;const[i,r]=this.find(t);let l=t-r;const o=this.iterator(i);let a=o();for(;a&&l<t+e;){const h=a.length();t>l?n(a,t-l,Math.min(e,l+h-t)):n(a,0,Math.min(h,t+e-l)),l+=h,a=o()}}map(t){return this.reduce((e,n)=>(e.push(t(n)),e),[])}reduce(t,e){const n=this.iterator();let i=n();for(;i;)e=t(e,i),i=n();return e}}function pa(s,t){const e=t.find(s);if(e)return e;try{return t.create(s)}catch{const n=t.create(M.INLINE);return Array.from(s.childNodes).forEach(i=>{n.domNode.appendChild(i)}),s.parentNode&&s.parentNode.replaceChild(n.domNode,s),n.attach(),n}}const ga=class De extends da{constructor(t,e){super(t,e),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,De.uiClass&&this.uiNode.classList.add(De.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new cg,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const e=pa(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(e){if(e instanceof pn)return;throw e}})}deleteAt(t,e){if(t===0&&e===this.length())return this.remove();this.children.forEachAt(t,e,(n,i,r)=>{n.deleteAt(i,r)})}descendant(t,e=0){const[n,i]=this.children.find(e);return t.blotName==null&&t(n)||t.blotName!=null&&n instanceof t?[n,i]:n instanceof De?n.descendant(t,i):[null,-1]}descendants(t,e=0,n=Number.MAX_VALUE){let i=[],r=n;return this.children.forEachAt(e,n,(l,o,a)=>{(t.blotName==null&&t(l)||t.blotName!=null&&l instanceof t)&&i.push(l),l instanceof De&&(i=i.concat(l.descendants(t,o,r))),r-=a}),i}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(e=>{t||this.statics.allowedChildren.some(n=>e instanceof n)||(e.statics.scope===M.BLOCK_BLOT?(e.next!=null&&this.splitAfter(e),e.prev!=null&&this.splitAfter(e.prev),e.parent.unwrap(),t=!0):e instanceof De?e.unwrap():e.remove())})}formatAt(t,e,n,i){this.children.forEachAt(t,e,(r,l,o)=>{r.formatAt(l,o,n,i)})}insertAt(t,e,n){const[i,r]=this.children.find(t);if(i)i.insertAt(r,e,n);else{const l=n==null?this.scroll.create("text",e):this.scroll.create(e,n);this.appendChild(l)}}insertBefore(t,e){t.parent!=null&&t.parent.children.remove(t);let n=null;this.children.insertBefore(t,e||null),t.parent=this,e!=null&&(n=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(t.domNode,n),t.attach()}length(){return this.children.reduce((t,e)=>t+e.length(),0)}moveChildren(t,e){this.children.forEach(n=>{t.insertBefore(n,e)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e)}else this.remove()}path(t,e=!1){const[n,i]=this.children.find(t,e),r=[[this,t]];return n instanceof De?r.concat(n.path(i,e)):(n!=null&&r.push([n,i]),r)}removeChild(t){this.children.remove(t)}replaceWith(t,e){const n=typeof t=="string"?this.scroll.create(t,e):t;return n instanceof De&&this.moveChildren(n),super.replaceWith(n)}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(t,this.length(),(i,r,l)=>{const o=i.split(r,e);o!=null&&n.appendChild(o)}),n}splitAfter(t){const e=this.clone();for(;t.next!=null;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,e){const n=[],i=[];t.forEach(r=>{r.target===this.domNode&&r.type==="childList"&&(n.push(...r.addedNodes),i.push(...r.removedNodes))}),i.forEach(r=>{if(r.parentNode!=null&&r.tagName!=="IFRAME"&&document.body.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const l=this.scroll.find(r);l!=null&&(l.domNode.parentNode==null||l.domNode.parentNode===this.domNode)&&l.detach()}),n.filter(r=>r.parentNode===this.domNode&&r!==this.uiNode).sort((r,l)=>r===l?0:r.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(r=>{let l=null;r.nextSibling!=null&&(l=this.scroll.find(r.nextSibling));const o=pa(r,this.scroll);(o.next!==l||o.next==null)&&(o.parent!=null&&o.parent.removeChild(this),this.insertBefore(o,l||void 0))}),this.enforceAllowedChildren()}};ga.uiClass="";const jt=ga;function hg(s,t){if(Object.keys(s).length!==Object.keys(t).length)return!1;for(const e in s)if(s[e]!==t[e])return!1;return!0}const mn=class Fn extends jt{static create(t){return super.create(t)}static formats(t,e){const n=e.query(Fn.blotName);if(!(n!=null&&t.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new Gs(this.domNode)}format(t,e){if(t===this.statics.blotName&&!e)this.children.forEach(n=>{n instanceof Fn||(n=n.wrap(Fn.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{const n=this.scroll.query(t,M.INLINE);if(n==null)return;n instanceof te?this.attributes.attribute(n,e):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e)}}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,n,i){this.formats()[n]!=null||this.scroll.query(n,M.ATTRIBUTE)?this.isolate(t,e).format(n,i):super.formatAt(t,e,n,i)}optimize(t){super.optimize(t);const e=this.formats();if(Object.keys(e).length===0)return this.unwrap();const n=this.next;n instanceof Fn&&n.prev===this&&hg(e,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(t,e){const n=super.replaceWith(t,e);return this.attributes.copy(n),n}update(t,e){super.update(t,e),t.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(t,e){const n=super.wrap(t,e);return n instanceof Fn&&this.attributes.move(n),n}};mn.allowedChildren=[mn,dt],mn.blotName="inline",mn.scope=M.INLINE_BLOT,mn.tagName="SPAN";const wr=mn,bn=class co extends jt{static create(t){return super.create(t)}static formats(t,e){const n=e.query(co.blotName);if(!(n!=null&&t.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new Gs(this.domNode)}format(t,e){const n=this.scroll.query(t,M.BLOCK);n!=null&&(n instanceof te?this.attributes.attribute(n,e):t===this.statics.blotName&&!e?this.replaceWith(co.blotName):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e))}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,n,i){this.scroll.query(n,M.BLOCK)!=null?this.format(n,i):super.formatAt(t,e,n,i)}insertAt(t,e,n){if(n==null||this.scroll.query(e,M.INLINE)!=null)super.insertAt(t,e,n);else{const i=this.split(t);if(i!=null){const r=this.scroll.create(e,n);i.parent.insertBefore(r,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,e){const n=super.replaceWith(t,e);return this.attributes.copy(n),n}update(t,e){super.update(t,e),t.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};bn.blotName="block",bn.scope=M.BLOCK_BLOT,bn.tagName="P",bn.allowedChildren=[wr,bn,dt];const ts=bn,xr=class extends jt{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,n,i){super.formatAt(t,e,n,i),this.enforceAllowedChildren()}insertAt(t,e,n){super.insertAt(t,e,n),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};xr.blotName="container",xr.scope=M.BLOCK_BLOT;const Ys=xr;class ug extends dt{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,n,i){t===0&&e===this.length()?this.format(n,i):super.formatAt(t,e,n,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Tt=ug,dg={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},fg=100,yn=class extends jt{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(n=>{this.update(n)}),this.observer.observe(this.domNode,dg),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){const n=this.registry.find(t,e);return n?n.scroll===this?n:e?this.find(n.scroll.domNode.parentNode,!0):null:null}query(t,e=M.ANY){return this.registry.query(t,e)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,e){this.update(),t===0&&e===this.length()?this.children.forEach(n=>{n.remove()}):super.deleteAt(t,e)}formatAt(t,e,n,i){this.update(),super.formatAt(t,e,n,i)}insertAt(t,e,n){this.update(),super.insertAt(t,e,n)}optimize(t=[],e={}){super.optimize(e);const n=e.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)t.push(i.pop());const r=(a,h=!0)=>{a==null||a===this||a.domNode.parentNode!=null&&(n.has(a.domNode)||n.set(a.domNode,[]),h&&r(a.parent))},l=a=>{n.has(a.domNode)&&(a instanceof jt&&a.children.forEach(l),n.delete(a.domNode),a.optimize(e))};let o=t;for(let a=0;o.length>0;a+=1){if(a>=fg)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach(h=>{const u=this.find(h.target,!0);u!=null&&(u.domNode===h.target&&(h.type==="childList"?(r(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(f=>{const d=this.find(f,!1);r(d,!1),d instanceof jt&&d.children.forEach(g=>{r(g,!1)})})):h.type==="attributes"&&r(u.prev)),r(u))}),this.children.forEach(l),o=Array.from(this.observer.takeRecords()),i=o.slice();i.length>0;)t.push(i.pop())}}update(t,e={}){t=t||this.observer.takeRecords();const n=new WeakMap;t.map(i=>{const r=this.find(i.target,!0);return r==null?null:n.has(r.domNode)?(n.get(r.domNode).push(i),null):(n.set(r.domNode,[i]),r)}).forEach(i=>{i!=null&&i!==this&&n.has(i.domNode)&&i.update(n.get(i.domNode)||[],e)}),e.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),e),this.optimize(t,e)}};yn.blotName="scroll",yn.defaultChild=ts,yn.allowedChildren=[ts,Ys],yn.scope=M.BLOCK_BLOT,yn.tagName="DIV";const Er=yn,Cr=class dh extends dt{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,e){super(t,e),this.text=this.statics.value(this.domNode)}deleteAt(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)}index(t,e){return this.domNode===t?e:-1}insertAt(t,e,n){n==null?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,n)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof dh&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,e=!1){return[this.domNode,t]}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(t,e){t.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Cr.blotName="text",Cr.scope=M.INLINE_BLOT;const Zs=Cr,pg=Object.freeze(Object.defineProperty({__proto__:null,Attributor:te,AttributorStore:Gs,BlockBlot:ts,ClassAttributor:Dt,ContainerBlot:Ys,EmbedBlot:Tt,InlineBlot:wr,LeafBlot:dt,ParentBlot:jt,Registry:gn,Scope:M,ScrollBlot:Er,StyleAttributor:Le,TextBlot:Zs},Symbol.toStringTag,{value:"Module"}));var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ma(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Nr={exports:{}},At=-1,vt=1,it=0;function es(s,t,e,n,i){if(s===t)return s?[[it,s]]:[];if(e!=null){var r=Cg(s,t,e);if(r)return r}var l=Tr(s,t),o=s.substring(0,l);s=s.substring(l),t=t.substring(l),l=Xs(s,t);var a=s.substring(s.length-l);s=s.substring(0,s.length-l),t=t.substring(0,t.length-l);var h=gg(s,t);return o&&h.unshift([it,o]),a&&h.push([it,a]),Ar(h,i),n&&yg(h),h}function gg(s,t){var e;if(!s)return[[vt,t]];if(!t)return[[At,s]];var n=s.length>t.length?s:t,i=s.length>t.length?t:s,r=n.indexOf(i);if(r!==-1)return e=[[vt,n.substring(0,r)],[it,i],[vt,n.substring(r+i.length)]],s.length>t.length&&(e[0][0]=e[2][0]=At),e;if(i.length===1)return[[At,s],[vt,t]];var l=bg(s,t);if(l){var o=l[0],a=l[1],h=l[2],u=l[3],f=l[4],d=es(o,h),g=es(a,u);return d.concat([[it,f]],g)}return mg(s,t)}function mg(s,t){for(var e=s.length,n=t.length,i=Math.ceil((e+n)/2),r=i,l=2*i,o=new Array(l),a=new Array(l),h=0;h<l;h++)o[h]=-1,a[h]=-1;o[r+1]=0,a[r+1]=0;for(var u=e-n,f=u%2!==0,d=0,g=0,m=0,b=0,y=0;y<i;y++){for(var x=-y+d;x<=y-g;x+=2){var C=r+x,N;x===-y||x!==y&&o[C-1]<o[C+1]?N=o[C+1]:N=o[C-1]+1;for(var L=N-x;N<e&&L<n&&s.charAt(N)===t.charAt(L);)N++,L++;if(o[C]=N,N>e)g+=2;else if(L>n)d+=2;else if(f){var A=r+u-x;if(A>=0&&A<l&&a[A]!==-1){var I=e-a[A];if(N>=I)return ba(s,t,N,L)}}}for(var _=-y+m;_<=y-b;_+=2){var A=r+_,I;_===-y||_!==y&&a[A-1]<a[A+1]?I=a[A+1]:I=a[A-1]+1;for(var $=I-_;I<e&&$<n&&s.charAt(e-I-1)===t.charAt(n-$-1);)I++,$++;if(a[A]=I,I>e)b+=2;else if($>n)m+=2;else if(!f){var C=r+u-_;if(C>=0&&C<l&&o[C]!==-1){var N=o[C],L=r+N-C;if(I=e-I,N>=I)return ba(s,t,N,L)}}}}return[[At,s],[vt,t]]}function ba(s,t,e,n){var i=s.substring(0,e),r=t.substring(0,n),l=s.substring(e),o=t.substring(n),a=es(i,r),h=es(l,o);return a.concat(h)}function Tr(s,t){if(!s||!t||s.charAt(0)!==t.charAt(0))return 0;for(var e=0,n=Math.min(s.length,t.length),i=n,r=0;e<i;)s.substring(r,i)==t.substring(r,i)?(e=i,r=e):n=i,i=Math.floor((n-e)/2+e);return Ea(s.charCodeAt(i-1))&&i--,i}function ya(s,t){var e=s.length,n=t.length;if(e==0||n==0)return 0;e>n?s=s.substring(e-n):e<n&&(t=t.substring(0,e));var i=Math.min(e,n);if(s==t)return i;for(var r=0,l=1;;){var o=s.substring(i-l),a=t.indexOf(o);if(a==-1)return r;l+=a,(a==0||s.substring(i-l)==t.substring(0,l))&&(r=l,l++)}}function Xs(s,t){if(!s||!t||s.slice(-1)!==t.slice(-1))return 0;for(var e=0,n=Math.min(s.length,t.length),i=n,r=0;e<i;)s.substring(s.length-i,s.length-r)==t.substring(t.length-i,t.length-r)?(e=i,r=e):n=i,i=Math.floor((n-e)/2+e);return Ca(s.charCodeAt(s.length-i))&&i--,i}function bg(s,t){var e=s.length>t.length?s:t,n=s.length>t.length?t:s;if(e.length<4||n.length*2<e.length)return null;function i(g,m,b){for(var y=g.substring(b,b+Math.floor(g.length/4)),x=-1,C="",N,L,A,I;(x=m.indexOf(y,x+1))!==-1;){var _=Tr(g.substring(b),m.substring(x)),$=Xs(g.substring(0,b),m.substring(0,x));C.length<$+_&&(C=m.substring(x-$,x)+m.substring(x,x+_),N=g.substring(0,b-$),L=g.substring(b+_),A=m.substring(0,x-$),I=m.substring(x+_))}return C.length*2>=g.length?[N,L,A,I,C]:null}var r=i(e,n,Math.ceil(e.length/4)),l=i(e,n,Math.ceil(e.length/2)),o;if(!r&&!l)return null;l?r?o=r[4].length>l[4].length?r:l:o=l:o=r;var a,h,u,f;s.length>t.length?(a=o[0],h=o[1],u=o[2],f=o[3]):(u=o[0],f=o[1],a=o[2],h=o[3]);var d=o[4];return[a,h,u,f,d]}function yg(s){for(var t=!1,e=[],n=0,i=null,r=0,l=0,o=0,a=0,h=0;r<s.length;)s[r][0]==it?(e[n++]=r,l=a,o=h,a=0,h=0,i=s[r][1]):(s[r][0]==vt?a+=s[r][1].length:h+=s[r][1].length,i&&i.length<=Math.max(l,o)&&i.length<=Math.max(a,h)&&(s.splice(e[n-1],0,[At,i]),s[e[n-1]+1][0]=vt,n--,n--,r=n>0?e[n-1]:-1,l=0,o=0,a=0,h=0,i=null,t=!0)),r++;for(t&&Ar(s),xg(s),r=1;r<s.length;){if(s[r-1][0]==At&&s[r][0]==vt){var u=s[r-1][1],f=s[r][1],d=ya(u,f),g=ya(f,u);d>=g?(d>=u.length/2||d>=f.length/2)&&(s.splice(r,0,[it,f.substring(0,d)]),s[r-1][1]=u.substring(0,u.length-d),s[r+1][1]=f.substring(d),r++):(g>=u.length/2||g>=f.length/2)&&(s.splice(r,0,[it,u.substring(0,g)]),s[r-1][0]=vt,s[r-1][1]=f.substring(0,f.length-g),s[r+1][0]=At,s[r+1][1]=u.substring(g),r++),r++}r++}}var va=/[^a-zA-Z0-9]/,wa=/\s/,xa=/[\r\n]/,vg=/\n\r?\n$/,wg=/^\r?\n\r?\n/;function xg(s){function t(g,m){if(!g||!m)return 6;var b=g.charAt(g.length-1),y=m.charAt(0),x=b.match(va),C=y.match(va),N=x&&b.match(wa),L=C&&y.match(wa),A=N&&b.match(xa),I=L&&y.match(xa),_=A&&g.match(vg),$=I&&m.match(wg);return _||$?5:A||I?4:x&&!N&&L?3:N||L?2:x||C?1:0}for(var e=1;e<s.length-1;){if(s[e-1][0]==it&&s[e+1][0]==it){var n=s[e-1][1],i=s[e][1],r=s[e+1][1],l=Xs(n,i);if(l){var o=i.substring(i.length-l);n=n.substring(0,n.length-l),i=o+i.substring(0,i.length-l),r=o+r}for(var a=n,h=i,u=r,f=t(n,i)+t(i,r);i.charAt(0)===r.charAt(0);){n+=i.charAt(0),i=i.substring(1)+r.charAt(0),r=r.substring(1);var d=t(n,i)+t(i,r);d>=f&&(f=d,a=n,h=i,u=r)}s[e-1][1]!=a&&(a?s[e-1][1]=a:(s.splice(e-1,1),e--),s[e][1]=h,u?s[e+1][1]=u:(s.splice(e+1,1),e--))}e++}}function Ar(s,t){s.push([it,""]);for(var e=0,n=0,i=0,r="",l="",o;e<s.length;){if(e<s.length-1&&!s[e][1]){s.splice(e,1);continue}switch(s[e][0]){case vt:i++,l+=s[e][1],e++;break;case At:n++,r+=s[e][1],e++;break;case it:var a=e-i-n-1;if(t){if(a>=0&&Ta(s[a][1])){var h=s[a][1].slice(-1);if(s[a][1]=s[a][1].slice(0,-1),r=h+r,l=h+l,!s[a][1]){s.splice(a,1),e--;var u=a-1;s[u]&&s[u][0]===vt&&(i++,l=s[u][1]+l,u--),s[u]&&s[u][0]===At&&(n++,r=s[u][1]+r,u--),a=u}}if(Na(s[e][1])){var h=s[e][1].charAt(0);s[e][1]=s[e][1].slice(1),r+=h,l+=h}}if(e<s.length-1&&!s[e][1]){s.splice(e,1);break}if(r.length>0||l.length>0){r.length>0&&l.length>0&&(o=Tr(l,r),o!==0&&(a>=0?s[a][1]+=l.substring(0,o):(s.splice(0,0,[it,l.substring(0,o)]),e++),l=l.substring(o),r=r.substring(o)),o=Xs(l,r),o!==0&&(s[e][1]=l.substring(l.length-o)+s[e][1],l=l.substring(0,l.length-o),r=r.substring(0,r.length-o)));var f=i+n;r.length===0&&l.length===0?(s.splice(e-f,f),e=e-f):r.length===0?(s.splice(e-f,f,[vt,l]),e=e-f+1):l.length===0?(s.splice(e-f,f,[At,r]),e=e-f+1):(s.splice(e-f,f,[At,r],[vt,l]),e=e-f+2)}e!==0&&s[e-1][0]===it?(s[e-1][1]+=s[e][1],s.splice(e,1)):e++,i=0,n=0,r="",l="";break}}s[s.length-1][1]===""&&s.pop();var d=!1;for(e=1;e<s.length-1;)s[e-1][0]===it&&s[e+1][0]===it&&(s[e][1].substring(s[e][1].length-s[e-1][1].length)===s[e-1][1]?(s[e][1]=s[e-1][1]+s[e][1].substring(0,s[e][1].length-s[e-1][1].length),s[e+1][1]=s[e-1][1]+s[e+1][1],s.splice(e-1,1),d=!0):s[e][1].substring(0,s[e+1][1].length)==s[e+1][1]&&(s[e-1][1]+=s[e+1][1],s[e][1]=s[e][1].substring(s[e+1][1].length)+s[e+1][1],s.splice(e+1,1),d=!0)),e++;d&&Ar(s,t)}function Ea(s){return s>=55296&&s<=56319}function Ca(s){return s>=56320&&s<=57343}function Na(s){return Ca(s.charCodeAt(0))}function Ta(s){return Ea(s.charCodeAt(s.length-1))}function Eg(s){for(var t=[],e=0;e<s.length;e++)s[e][1].length>0&&t.push(s[e]);return t}function Lr(s,t,e,n){return Ta(s)||Na(n)?null:Eg([[it,s],[At,t],[vt,e],[it,n]])}function Cg(s,t,e){var n=typeof e=="number"?{index:e,length:0}:e.oldRange,i=typeof e=="number"?null:e.newRange,r=s.length,l=t.length;if(n.length===0&&(i===null||i.length===0)){var o=n.index,a=s.slice(0,o),h=s.slice(o),u=i?i.index:null;t:{var f=o+l-r;if(u!==null&&u!==f||f<0||f>l)break t;var d=t.slice(0,f),g=t.slice(f);if(g!==h)break t;var m=Math.min(o,f),b=a.slice(0,m),y=d.slice(0,m);if(b!==y)break t;var x=a.slice(m),C=d.slice(m);return Lr(b,x,C,h)}t:{if(u!==null&&u!==o)break t;var N=o,d=t.slice(0,N),g=t.slice(N);if(d!==a)break t;var L=Math.min(r-N,l-N),A=h.slice(h.length-L),I=g.slice(g.length-L);if(A!==I)break t;var x=h.slice(0,h.length-L),C=g.slice(0,g.length-L);return Lr(a,x,C,A)}}if(n.length>0&&i&&i.length===0)t:{var b=s.slice(0,n.index),A=s.slice(n.index+n.length),m=b.length,L=A.length;if(l<m+L)break t;var y=t.slice(0,m),I=t.slice(l-L);if(b!==y||A!==I)break t;var x=s.slice(m,r-L),C=t.slice(m,l-L);return Lr(b,x,C,A)}return null}function Qs(s,t,e,n){return es(s,t,e,n,!0)}Qs.INSERT=vt,Qs.DELETE=At,Qs.EQUAL=it;var Ng=Qs,Js={exports:{}};Js.exports,function(s,t){var e=200,n="__lodash_hash_undefined__",i=9007199254740991,r="[object Arguments]",l="[object Array]",o="[object Boolean]",a="[object Date]",h="[object Error]",u="[object Function]",f="[object GeneratorFunction]",d="[object Map]",g="[object Number]",m="[object Object]",b="[object Promise]",y="[object RegExp]",x="[object Set]",C="[object String]",N="[object Symbol]",L="[object WeakMap]",A="[object ArrayBuffer]",I="[object DataView]",_="[object Float32Array]",$="[object Float64Array]",Y="[object Int8Array]",U="[object Int16Array]",G="[object Int32Array]",at="[object Uint8Array]",V="[object Uint8ClampedArray]",j="[object Uint16Array]",P="[object Uint32Array]",X=/[\\^$.*+?()[\]{}|]/g,tt=/\w*$/,nt=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,B={};B[r]=B[l]=B[A]=B[I]=B[o]=B[a]=B[_]=B[$]=B[Y]=B[U]=B[G]=B[d]=B[g]=B[m]=B[y]=B[x]=B[C]=B[N]=B[at]=B[V]=B[j]=B[P]=!0,B[h]=B[u]=B[L]=!1;var Q=typeof Se=="object"&&Se&&Se.Object===Object&&Se,et=typeof self=="object"&&self&&self.Object===Object&&self,ct=Q||et||Function("return this")(),nn=t&&!t.nodeType&&t,F=nn&&!0&&s&&!s.nodeType&&s,Mn=F&&F.exports===nn;function wl(c,p){return c.set(p[0],p[1]),c}function Yt(c,p){return c.add(p),c}function Ii(c,p){for(var w=-1,T=c?c.length:0;++w<T&&p(c[w],w,c)!==!1;);return c}function qi(c,p){for(var w=-1,T=p.length,D=c.length;++w<T;)c[D+w]=p[w];return c}function xs(c,p,w,T){var D=-1,R=c?c.length:0;for(T&&R&&(w=c[++D]);++D<R;)w=p(w,c[D],D,c);retur