@chahindb7/vue3-editor
Version:
HTML editor using Vue.js 3, and Quill.js, an open source editor with advanced table functionality (quill-table-up)
1 lines • 352 kB
JavaScript
var ly=Object.defineProperty;var oy=(U,mt,Ge)=>mt in U?ly(U,mt,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):U[mt]=Ge;var v=(U,mt,Ge)=>(oy(U,typeof mt!="symbol"?mt+"":mt,Ge),Ge);(function(U,mt){typeof exports=="object"&&typeof module<"u"?mt(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],mt):(U=typeof globalThis<"u"?globalThis:U||self,mt(U.Vue3Editor={},U.Vue))})(this,function(U,mt){var At,Ki,je,Un,cn,He,Xi,Mr,Zi,Yi,Ji,Rr,Gl,Kl,Xl,Zl,Yl,ze;"use strict";var Ge=typeof global=="object"&&global&&global.Object===Object&&global;const zo=Ge;var eu=typeof self=="object"&&self&&self.Object===Object&&self,nu=zo||eu||Function("return this")();const ee=nu;var ru=ee.Symbol;const Ne=ru;var Fo=Object.prototype,iu=Fo.hasOwnProperty,su=Fo.toString,ir=Ne?Ne.toStringTag:void 0;function lu(n){var t=iu.call(n,ir),e=n[ir];try{n[ir]=void 0;var r=!0}catch{}var i=su.call(n);return r&&(t?n[ir]=e:delete n[ir]),i}var ou=Object.prototype,au=ou.toString;function cu(n){return au.call(n)}var hu="[object Null]",uu="[object Undefined]",Uo=Ne?Ne.toStringTag:void 0;function bn(n){return n==null?n===void 0?uu:hu:Uo&&Uo in Object(n)?lu(n):cu(n)}function pe(n){return n!=null&&typeof n=="object"}var du=Array.isArray;const Ke=du;function Ae(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function Wo(n){return n}var fu="[object AsyncFunction]",pu="[object Function]",gu="[object GeneratorFunction]",mu="[object Proxy]";function xs(n){if(!Ae(n))return!1;var t=bn(n);return t==pu||t==gu||t==fu||t==mu}var bu=ee["__core-js_shared__"];const Ts=bu;var Vo=function(){var n=/[^.]+$/.exec(Ts&&Ts.keys&&Ts.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function yu(n){return!!Vo&&Vo in n}var vu=Function.prototype,wu=vu.toString;function Xe(n){if(n!=null){try{return wu.call(n)}catch{}try{return n+""}catch{}}return""}var Cu=/[\\^$.*+?()[\]{}|]/g,xu=/^\[object .+?Constructor\]$/,Tu=Function.prototype,Eu=Object.prototype,Nu=Tu.toString,Au=Eu.hasOwnProperty,Iu=RegExp("^"+Nu.call(Au).replace(Cu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Lu(n){if(!Ae(n)||yu(n))return!1;var t=xs(n)?Iu:xu;return t.test(Xe(n))}function Su(n,t){return n==null?void 0:n[t]}function Ze(n,t){var e=Su(n,t);return Lu(e)?e:void 0}var Ou=Ze(ee,"WeakMap");const Es=Ou;var Go=Object.create,qu=function(){function n(){}return function(t){if(!Ae(t))return{};if(Go)return Go(t);n.prototype=t;var e=new n;return n.prototype=void 0,e}}();const Mu=qu;function Ru(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function Ko(n,t){var e=-1,r=n.length;for(t||(t=Array(r));++e<r;)t[e]=n[e];return t}var _u=800,Bu=16,ku=Date.now;function $u(n){var t=0,e=0;return function(){var r=ku(),i=Bu-(r-e);if(e=r,i>0){if(++t>=_u)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function Du(n){return function(){return n}}var Pu=function(){try{var n=Ze(Object,"defineProperty");return n({},"",{}),n}catch{}}();const ti=Pu;var ju=ti?function(n,t){return ti(n,"toString",{configurable:!0,enumerable:!1,value:Du(t),writable:!0})}:Wo,Hu=$u(ju);const zu=Hu;function Fu(n,t){for(var e=-1,r=n==null?0:n.length;++e<r&&t(n[e],e,n)!==!1;);return n}var Uu=9007199254740991,Wu=/^(?:0|[1-9]\d*)$/;function Xo(n,t){var e=typeof n;return t=t??Uu,!!t&&(e=="number"||e!="symbol"&&Wu.test(n))&&n>-1&&n%1==0&&n<t}function Ns(n,t,e){t=="__proto__"&&ti?ti(n,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):n[t]=e}function sr(n,t){return n===t||n!==n&&t!==t}var Vu=Object.prototype,Gu=Vu.hasOwnProperty;function Zo(n,t,e){var r=n[t];(!(Gu.call(n,t)&&sr(r,e))||e===void 0&&!(t in n))&&Ns(n,t,e)}function lr(n,t,e,r){var i=!e;e||(e={});for(var s=-1,l=t.length;++s<l;){var o=t[s],a=r?r(e[o],n[o],o,e,n):void 0;a===void 0&&(a=n[o]),i?Ns(e,o,a):Zo(e,o,a)}return e}var Yo=Math.max;function Ku(n,t,e){return t=Yo(t===void 0?n.length-1:t,0),function(){for(var r=arguments,i=-1,s=Yo(r.length-t,0),l=Array(s);++i<s;)l[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=e(l),Ru(n,this,o)}}function Xu(n,t){return zu(Ku(n,t,Wo),n+"")}var Zu=9007199254740991;function Jo(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Zu}function ei(n){return n!=null&&Jo(n.length)&&!xs(n)}function Yu(n,t,e){if(!Ae(e))return!1;var r=typeof t;return(r=="number"?ei(e)&&Xo(t,e.length):r=="string"&&t in e)?sr(e[t],n):!1}function Ju(n){return Xu(function(t,e){var r=-1,i=e.length,s=i>1?e[i-1]:void 0,l=i>2?e[2]:void 0;for(s=n.length>3&&typeof s=="function"?(i--,s):void 0,l&&Yu(e[0],e[1],l)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var o=e[r];o&&n(t,o,r,s)}return t})}var Qu=Object.prototype;function As(n){var t=n&&n.constructor,e=typeof t=="function"&&t.prototype||Qu;return n===e}function td(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}var ed="[object Arguments]";function Qo(n){return pe(n)&&bn(n)==ed}var ta=Object.prototype,nd=ta.hasOwnProperty,rd=ta.propertyIsEnumerable,id=Qo(function(){return arguments}())?Qo:function(n){return pe(n)&&nd.call(n,"callee")&&!rd.call(n,"callee")};const Is=id;function sd(){return!1}var ea=typeof U=="object"&&U&&!U.nodeType&&U,na=ea&&typeof module=="object"&&module&&!module.nodeType&&module,ld=na&&na.exports===ea,ra=ld?ee.Buffer:void 0,od=ra?ra.isBuffer:void 0,ad=od||sd;const or=ad;var cd="[object Arguments]",hd="[object Array]",ud="[object Boolean]",dd="[object Date]",fd="[object Error]",pd="[object Function]",gd="[object Map]",md="[object Number]",bd="[object Object]",yd="[object RegExp]",vd="[object Set]",wd="[object String]",Cd="[object WeakMap]",xd="[object ArrayBuffer]",Td="[object DataView]",Ed="[object Float32Array]",Nd="[object Float64Array]",Ad="[object Int8Array]",Id="[object Int16Array]",Ld="[object Int32Array]",Sd="[object Uint8Array]",Od="[object Uint8ClampedArray]",qd="[object Uint16Array]",Md="[object Uint32Array]",K={};K[Ed]=K[Nd]=K[Ad]=K[Id]=K[Ld]=K[Sd]=K[Od]=K[qd]=K[Md]=!0,K[cd]=K[hd]=K[xd]=K[ud]=K[Td]=K[dd]=K[fd]=K[pd]=K[gd]=K[md]=K[bd]=K[yd]=K[vd]=K[wd]=K[Cd]=!1;function Rd(n){return pe(n)&&Jo(n.length)&&!!K[bn(n)]}function Ls(n){return function(t){return n(t)}}var ia=typeof U=="object"&&U&&!U.nodeType&&U,ar=ia&&typeof module=="object"&&module&&!module.nodeType&&module,_d=ar&&ar.exports===ia,Ss=_d&&zo.process,Bd=function(){try{var n=ar&&ar.require&&ar.require("util").types;return n||Ss&&Ss.binding&&Ss.binding("util")}catch{}}();const yn=Bd;var sa=yn&&yn.isTypedArray,kd=sa?Ls(sa):Rd;const Os=kd;var $d=Object.prototype,Dd=$d.hasOwnProperty;function la(n,t){var e=Ke(n),r=!e&&Is(n),i=!e&&!r&&or(n),s=!e&&!r&&!i&&Os(n),l=e||r||i||s,o=l?td(n.length,String):[],a=o.length;for(var c in n)(t||Dd.call(n,c))&&!(l&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Xo(c,a)))&&o.push(c);return o}function oa(n,t){return function(e){return n(t(e))}}var Pd=oa(Object.keys,Object);const jd=Pd;var Hd=Object.prototype,zd=Hd.hasOwnProperty;function Fd(n){if(!As(n))return jd(n);var t=[];for(var e in Object(n))zd.call(n,e)&&e!="constructor"&&t.push(e);return t}function qs(n){return ei(n)?la(n):Fd(n)}function Ud(n){var t=[];if(n!=null)for(var e in Object(n))t.push(e);return t}var Wd=Object.prototype,Vd=Wd.hasOwnProperty;function Gd(n){if(!Ae(n))return Ud(n);var t=As(n),e=[];for(var r in n)r=="constructor"&&(t||!Vd.call(n,r))||e.push(r);return e}function cr(n){return ei(n)?la(n,!0):Gd(n)}var Kd=Ze(Object,"create");const hr=Kd;function Xd(){this.__data__=hr?hr(null):{},this.size=0}function Zd(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}var Yd="__lodash_hash_undefined__",Jd=Object.prototype,Qd=Jd.hasOwnProperty;function tf(n){var t=this.__data__;if(hr){var e=t[n];return e===Yd?void 0:e}return Qd.call(t,n)?t[n]:void 0}var ef=Object.prototype,nf=ef.hasOwnProperty;function rf(n){var t=this.__data__;return hr?t[n]!==void 0:nf.call(t,n)}var sf="__lodash_hash_undefined__";function lf(n,t){var e=this.__data__;return this.size+=this.has(n)?0:1,e[n]=hr&&t===void 0?sf:t,this}function Ye(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}Ye.prototype.clear=Xd,Ye.prototype.delete=Zd,Ye.prototype.get=tf,Ye.prototype.has=rf,Ye.prototype.set=lf;function of(){this.__data__=[],this.size=0}function ni(n,t){for(var e=n.length;e--;)if(sr(n[e][0],t))return e;return-1}var af=Array.prototype,cf=af.splice;function hf(n){var t=this.__data__,e=ni(t,n);if(e<0)return!1;var r=t.length-1;return e==r?t.pop():cf.call(t,e,1),--this.size,!0}function uf(n){var t=this.__data__,e=ni(t,n);return e<0?void 0:t[e][1]}function df(n){return ni(this.__data__,n)>-1}function ff(n,t){var e=this.__data__,r=ni(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this}function ge(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}ge.prototype.clear=of,ge.prototype.delete=hf,ge.prototype.get=uf,ge.prototype.has=df,ge.prototype.set=ff;var pf=Ze(ee,"Map");const ur=pf;function gf(){this.size=0,this.__data__={hash:new Ye,map:new(ur||ge),string:new Ye}}function mf(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function ri(n,t){var e=n.__data__;return mf(t)?e[typeof t=="string"?"string":"hash"]:e.map}function bf(n){var t=ri(this,n).delete(n);return this.size-=t?1:0,t}function yf(n){return ri(this,n).get(n)}function vf(n){return ri(this,n).has(n)}function wf(n,t){var e=ri(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this}function Je(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}Je.prototype.clear=gf,Je.prototype.delete=bf,Je.prototype.get=yf,Je.prototype.has=vf,Je.prototype.set=wf;function aa(n,t){for(var e=-1,r=t.length,i=n.length;++e<r;)n[i+e]=t[e];return n}var Cf=oa(Object.getPrototypeOf,Object);const Ms=Cf;var xf="[object Object]",Tf=Function.prototype,Ef=Object.prototype,ca=Tf.toString,Nf=Ef.hasOwnProperty,Af=ca.call(Object);function If(n){if(!pe(n)||bn(n)!=xf)return!1;var t=Ms(n);if(t===null)return!0;var e=Nf.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&ca.call(e)==Af}function Lf(){this.__data__=new ge,this.size=0}function Sf(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e}function Of(n){return this.__data__.get(n)}function qf(n){return this.__data__.has(n)}var Mf=200;function Rf(n,t){var e=this.__data__;if(e instanceof ge){var r=e.__data__;if(!ur||r.length<Mf-1)return r.push([n,t]),this.size=++e.size,this;e=this.__data__=new Je(r)}return e.set(n,t),this.size=e.size,this}function ne(n){var t=this.__data__=new ge(n);this.size=t.size}ne.prototype.clear=Lf,ne.prototype.delete=Sf,ne.prototype.get=Of,ne.prototype.has=qf,ne.prototype.set=Rf;function _f(n,t){return n&&lr(t,qs(t),n)}function Bf(n,t){return n&&lr(t,cr(t),n)}var ha=typeof U=="object"&&U&&!U.nodeType&&U,ua=ha&&typeof module=="object"&&module&&!module.nodeType&&module,kf=ua&&ua.exports===ha,da=kf?ee.Buffer:void 0,fa=da?da.allocUnsafe:void 0;function pa(n,t){if(t)return n.slice();var e=n.length,r=fa?fa(e):new n.constructor(e);return n.copy(r),r}function $f(n,t){for(var e=-1,r=n==null?0:n.length,i=0,s=[];++e<r;){var l=n[e];t(l,e,n)&&(s[i++]=l)}return s}function ga(){return[]}var Df=Object.prototype,Pf=Df.propertyIsEnumerable,ma=Object.getOwnPropertySymbols,jf=ma?function(n){return n==null?[]:(n=Object(n),$f(ma(n),function(t){return Pf.call(n,t)}))}:ga;const Rs=jf;function Hf(n,t){return lr(n,Rs(n),t)}var zf=Object.getOwnPropertySymbols,Ff=zf?function(n){for(var t=[];n;)aa(t,Rs(n)),n=Ms(n);return t}:ga;const ba=Ff;function Uf(n,t){return lr(n,ba(n),t)}function ya(n,t,e){var r=t(n);return Ke(n)?r:aa(r,e(n))}function _s(n){return ya(n,qs,Rs)}function Wf(n){return ya(n,cr,ba)}var Vf=Ze(ee,"DataView");const Bs=Vf;var Gf=Ze(ee,"Promise");const ks=Gf;var Kf=Ze(ee,"Set");const $s=Kf;var va="[object Map]",Xf="[object Object]",wa="[object Promise]",Ca="[object Set]",xa="[object WeakMap]",Ta="[object DataView]",Zf=Xe(Bs),Yf=Xe(ur),Jf=Xe(ks),Qf=Xe($s),tp=Xe(Es),Qe=bn;(Bs&&Qe(new Bs(new ArrayBuffer(1)))!=Ta||ur&&Qe(new ur)!=va||ks&&Qe(ks.resolve())!=wa||$s&&Qe(new $s)!=Ca||Es&&Qe(new Es)!=xa)&&(Qe=function(n){var t=bn(n),e=t==Xf?n.constructor:void 0,r=e?Xe(e):"";if(r)switch(r){case Zf:return Ta;case Yf:return va;case Jf:return wa;case Qf:return Ca;case tp:return xa}return t});const dr=Qe;var ep=Object.prototype,np=ep.hasOwnProperty;function rp(n){var t=n.length,e=new n.constructor(t);return t&&typeof n[0]=="string"&&np.call(n,"index")&&(e.index=n.index,e.input=n.input),e}var ip=ee.Uint8Array;const ii=ip;function Ds(n){var t=new n.constructor(n.byteLength);return new ii(t).set(new ii(n)),t}function sp(n,t){var e=t?Ds(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}var lp=/\w*$/;function op(n){var t=new n.constructor(n.source,lp.exec(n));return t.lastIndex=n.lastIndex,t}var Ea=Ne?Ne.prototype:void 0,Na=Ea?Ea.valueOf:void 0;function ap(n){return Na?Object(Na.call(n)):{}}function Aa(n,t){var e=t?Ds(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}var cp="[object Boolean]",hp="[object Date]",up="[object Map]",dp="[object Number]",fp="[object RegExp]",pp="[object Set]",gp="[object String]",mp="[object Symbol]",bp="[object ArrayBuffer]",yp="[object DataView]",vp="[object Float32Array]",wp="[object Float64Array]",Cp="[object Int8Array]",xp="[object Int16Array]",Tp="[object Int32Array]",Ep="[object Uint8Array]",Np="[object Uint8ClampedArray]",Ap="[object Uint16Array]",Ip="[object Uint32Array]";function Lp(n,t,e){var r=n.constructor;switch(t){case bp:return Ds(n);case cp:case hp:return new r(+n);case yp:return sp(n,e);case vp:case wp:case Cp:case xp:case Tp:case Ep:case Np:case Ap:case Ip:return Aa(n,e);case up:return new r;case dp:case gp:return new r(n);case fp:return op(n);case pp:return new r;case mp:return ap(n)}}function Ia(n){return typeof n.constructor=="function"&&!As(n)?Mu(Ms(n)):{}}var Sp="[object Map]";function Op(n){return pe(n)&&dr(n)==Sp}var La=yn&&yn.isMap,qp=La?Ls(La):Op;const Mp=qp;var Rp="[object Set]";function _p(n){return pe(n)&&dr(n)==Rp}var Sa=yn&&yn.isSet,Bp=Sa?Ls(Sa):_p;const kp=Bp;var $p=1,Dp=2,Pp=4,Oa="[object Arguments]",jp="[object Array]",Hp="[object Boolean]",zp="[object Date]",Fp="[object Error]",qa="[object Function]",Up="[object GeneratorFunction]",Wp="[object Map]",Vp="[object Number]",Ma="[object Object]",Gp="[object RegExp]",Kp="[object Set]",Xp="[object String]",Zp="[object Symbol]",Yp="[object WeakMap]",Jp="[object ArrayBuffer]",Qp="[object DataView]",tg="[object Float32Array]",eg="[object Float64Array]",ng="[object Int8Array]",rg="[object Int16Array]",ig="[object Int32Array]",sg="[object Uint8Array]",lg="[object Uint8ClampedArray]",og="[object Uint16Array]",ag="[object Uint32Array]",G={};G[Oa]=G[jp]=G[Jp]=G[Qp]=G[Hp]=G[zp]=G[tg]=G[eg]=G[ng]=G[rg]=G[ig]=G[Wp]=G[Vp]=G[Ma]=G[Gp]=G[Kp]=G[Xp]=G[Zp]=G[sg]=G[lg]=G[og]=G[ag]=!0,G[Fp]=G[qa]=G[Yp]=!1;function si(n,t,e,r,i,s){var l,o=t&$p,a=t&Dp,c=t&Pp;if(e&&(l=i?e(n,r,i,s):e(n)),l!==void 0)return l;if(!Ae(n))return n;var u=Ke(n);if(u){if(l=rp(n),!o)return Ko(n,l)}else{var f=dr(n),d=f==qa||f==Up;if(or(n))return pa(n,o);if(f==Ma||f==Oa||d&&!i){if(l=a||d?{}:Ia(n),!o)return a?Uf(n,Bf(l,n)):Hf(n,_f(l,n))}else{if(!G[f])return i?n:{};l=Lp(n,f,o)}}s||(s=new ne);var p=s.get(n);if(p)return p;s.set(n,l),kp(n)?n.forEach(function(w){l.add(si(w,t,e,w,n,s))}):Mp(n)&&n.forEach(function(w,y){l.set(y,si(w,t,e,y,n,s))});var g=c?a?Wf:_s:a?cr:qs,b=u?void 0:g(n);return Fu(b||n,function(w,y){b&&(y=w,w=n[y]),Zo(l,y,si(w,t,e,y,n,s))}),l}var cg=1,hg=4;function vn(n){return si(n,cg|hg)}var ug="__lodash_hash_undefined__";function dg(n){return this.__data__.set(n,ug),this}function fg(n){return this.__data__.has(n)}function li(n){var t=-1,e=n==null?0:n.length;for(this.__data__=new Je;++t<e;)this.add(n[t])}li.prototype.add=li.prototype.push=dg,li.prototype.has=fg;function pg(n,t){for(var e=-1,r=n==null?0:n.length;++e<r;)if(t(n[e],e,n))return!0;return!1}function gg(n,t){return n.has(t)}var mg=1,bg=2;function Ra(n,t,e,r,i,s){var l=e&mg,o=n.length,a=t.length;if(o!=a&&!(l&&a>o))return!1;var c=s.get(n),u=s.get(t);if(c&&u)return c==t&&u==n;var f=-1,d=!0,p=e&bg?new li:void 0;for(s.set(n,t),s.set(t,n);++f<o;){var g=n[f],b=t[f];if(r)var w=l?r(b,g,f,t,n,s):r(g,b,f,n,t,s);if(w!==void 0){if(w)continue;d=!1;break}if(p){if(!pg(t,function(y,E){if(!gg(p,E)&&(g===y||i(g,y,e,r,s)))return p.push(E)})){d=!1;break}}else if(!(g===b||i(g,b,e,r,s))){d=!1;break}}return s.delete(n),s.delete(t),d}function yg(n){var t=-1,e=Array(n.size);return n.forEach(function(r,i){e[++t]=[i,r]}),e}function vg(n){var t=-1,e=Array(n.size);return n.forEach(function(r){e[++t]=r}),e}var wg=1,Cg=2,xg="[object Boolean]",Tg="[object Date]",Eg="[object Error]",Ng="[object Map]",Ag="[object Number]",Ig="[object RegExp]",Lg="[object Set]",Sg="[object String]",Og="[object Symbol]",qg="[object ArrayBuffer]",Mg="[object DataView]",_a=Ne?Ne.prototype:void 0,Ps=_a?_a.valueOf:void 0;function Rg(n,t,e,r,i,s,l){switch(e){case Mg:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case qg:return!(n.byteLength!=t.byteLength||!s(new ii(n),new ii(t)));case xg:case Tg:case Ag:return sr(+n,+t);case Eg:return n.name==t.name&&n.message==t.message;case Ig:case Sg:return n==t+"";case Ng:var o=yg;case Lg:var a=r&wg;if(o||(o=vg),n.size!=t.size&&!a)return!1;var c=l.get(n);if(c)return c==t;r|=Cg,l.set(n,t);var u=Ra(o(n),o(t),r,i,s,l);return l.delete(n),u;case Og:if(Ps)return Ps.call(n)==Ps.call(t)}return!1}var _g=1,Bg=Object.prototype,kg=Bg.hasOwnProperty;function $g(n,t,e,r,i,s){var l=e&_g,o=_s(n),a=o.length,c=_s(t),u=c.length;if(a!=u&&!l)return!1;for(var f=a;f--;){var d=o[f];if(!(l?d in t:kg.call(t,d)))return!1}var p=s.get(n),g=s.get(t);if(p&&g)return p==t&&g==n;var b=!0;s.set(n,t),s.set(t,n);for(var w=l;++f<a;){d=o[f];var y=n[d],E=t[d];if(r)var N=l?r(E,y,d,t,n,s):r(y,E,d,n,t,s);if(!(N===void 0?y===E||i(y,E,e,r,s):N)){b=!1;break}w||(w=d=="constructor")}if(b&&!w){var A=n.constructor,L=t.constructor;A!=L&&"constructor"in n&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof L=="function"&&L instanceof L)&&(b=!1)}return s.delete(n),s.delete(t),b}var Dg=1,Ba="[object Arguments]",ka="[object Array]",oi="[object Object]",Pg=Object.prototype,$a=Pg.hasOwnProperty;function jg(n,t,e,r,i,s){var l=Ke(n),o=Ke(t),a=l?ka:dr(n),c=o?ka:dr(t);a=a==Ba?oi:a,c=c==Ba?oi:c;var u=a==oi,f=c==oi,d=a==c;if(d&&or(n)){if(!or(t))return!1;l=!0,u=!1}if(d&&!u)return s||(s=new ne),l||Os(n)?Ra(n,t,e,r,i,s):Rg(n,t,a,e,r,i,s);if(!(e&Dg)){var p=u&&$a.call(n,"__wrapped__"),g=f&&$a.call(t,"__wrapped__");if(p||g){var b=p?n.value():n,w=g?t.value():t;return s||(s=new ne),i(b,w,e,r,s)}}return d?(s||(s=new ne),$g(n,t,e,r,i,s)):!1}function Da(n,t,e,r,i){return n===t?!0:n==null||t==null||!pe(n)&&!pe(t)?n!==n&&t!==t:jg(n,t,e,r,Da,i)}function Hg(n){return function(t,e,r){for(var i=-1,s=Object(t),l=r(t),o=l.length;o--;){var a=l[n?o:++i];if(e(s[a],a,s)===!1)break}return t}}var zg=Hg();const Fg=zg;function js(n,t,e){(e!==void 0&&!sr(n[t],e)||e===void 0&&!(t in n))&&Ns(n,t,e)}function Ug(n){return pe(n)&&ei(n)}function Hs(n,t){if(!(t==="constructor"&&typeof n[t]=="function")&&t!="__proto__")return n[t]}function Wg(n){return lr(n,cr(n))}function Vg(n,t,e,r,i,s,l){var o=Hs(n,e),a=Hs(t,e),c=l.get(a);if(c){js(n,e,c);return}var u=s?s(o,a,e+"",n,t,l):void 0,f=u===void 0;if(f){var d=Ke(a),p=!d&&or(a),g=!d&&!p&&Os(a);u=a,d||p||g?Ke(o)?u=o:Ug(o)?u=Ko(o):p?(f=!1,u=pa(a,!0)):g?(f=!1,u=Aa(a,!0)):u=[]:If(a)||Is(a)?(u=o,Is(o)?u=Wg(o):(!Ae(o)||xs(o))&&(u=Ia(a))):f=!1}f&&(l.set(a,u),i(u,a,r,s,l),l.delete(a)),js(n,e,u)}function Pa(n,t,e,r,i){n!==t&&Fg(t,function(s,l){if(i||(i=new ne),Ae(s))Vg(n,t,l,e,Pa,r,i);else{var o=r?r(Hs(n,l),s,l+"",n,t,i):void 0;o===void 0&&(o=s),js(n,l,o)}},cr)}function zs(n,t){return Da(n,t)}var Gg=Ju(function(n,t,e){Pa(n,t,e)});const Ie=Gg;var M=(n=>(n[n.TYPE=3]="TYPE",n[n.LEVEL=12]="LEVEL",n[n.ATTRIBUTE=13]="ATTRIBUTE",n[n.BLOT=14]="BLOT",n[n.INLINE=7]="INLINE",n[n.BLOCK=11]="BLOCK",n[n.BLOCK_BLOT=10]="BLOCK_BLOT",n[n.INLINE_BLOT=6]="INLINE_BLOT",n[n.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",n[n.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",n[n.ANY=15]="ANY",n))(M||{});class re{constructor(t,e,r={}){this.attrName=t,this.keyName=e;const i=M.TYPE&M.ATTRIBUTE;this.scope=r.scope!=null?r.scope&M.LEVEL|i:M.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.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 wn extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const ja=class jo{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 r=null;try{r=t.parentNode}catch{return null}return this.find(r,e)}return null}create(t,e,r){const i=this.query(e);if(i==null)throw new wn(`Unable to create ${e} blot`);const s=i,l=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:s.create(r),o=new s(t,l,r);return jo.blots.set(o.domNode,o),o}find(t,e=!1){return jo.find(t,e)}query(t,e=M.ANY){let r;return typeof t=="string"?r=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?r=this.types.text:typeof t=="number"?t&M.LEVEL&M.BLOCK?r=this.types.block:t&M.LEVEL&M.INLINE&&(r=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[t.tagName]),r==null?null:"scope"in r&&e&M.LEVEL&r.scope&&e&M.TYPE&r.scope?r:null}register(...t){return t.map(e=>{const r="blotName"in e,i="attrName"in e;if(!r&&!i)throw new wn("Invalid definition");if(r&&e.blotName==="abstract")throw new wn("Cannot register abstract class");const s=r?e.blotName:i?e.attrName:void 0;return this.types[s]=e,i?typeof e.keyName=="string"&&(this.attributes[e.keyName]=e):r&&(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})}};ja.blots=new WeakMap;let Cn=ja;function Ha(n,t){return(n.getAttribute("class")||"").split(/\s+/).filter(e=>e.indexOf(`${t}-`)===0)}class Kg extends re{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 zt=Kg;function Fs(n){const t=n.split("-"),e=t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return t[0]+e}class Xg extends re{static keys(t){return(t.getAttribute("style")||"").split(";").map(e=>e.split(":")[0].trim())}add(t,e){return this.canAdd(t,e)?(t.style[Fs(this.keyName)]=e,!0):!1}remove(t){t.style[Fs(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[Fs(this.keyName)];return this.canAdd(t,e)?e:""}}const Le=Xg;class Zg{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=Cn.find(this.domNode);if(t==null)return;const e=re.keys(this.domNode),r=zt.keys(this.domNode),i=Le.keys(this.domNode);e.concat(r).concat(i).forEach(s=>{const l=t.scroll.query(s,M.ATTRIBUTE);l instanceof re&&(this.attributes[l.attrName]=l)})}copy(t){Object.keys(this.attributes).forEach(e=>{const r=this.attributes[e].value(this.domNode);t.format(e,r)})}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 ai=Zg,za=class{constructor(t,e){this.scroll=t,this.domNode=e,Cn.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new wn("Blot definition missing tagName");let e,r;return Array.isArray(this.tagName)?(typeof t=="string"?(r=t.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof t=="number"&&(r=t),typeof r=="number"?e=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?e=document.createElement(r):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),Cn.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,r,i){const s=this.isolate(t,e);if(this.scroll.query(r,M.BLOT)!=null&&i)s.wrap(r,i);else if(this.scroll.query(r,M.ATTRIBUTE)!=null){const l=this.scroll.create(this.statics.scope);s.wrap(l),l.format(r,i)}}insertAt(t,e,r){const i=r==null?this.scroll.create("text",e):this.scroll.create(e,r),s=this.split(t);this.parent.insertBefore(i,s||void 0)}isolate(t,e){const r=this.split(t);if(r==null)throw new Error("Attempt to isolate at end");return r.split(e),r}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 r=typeof t=="string"?this.scroll.create(t,e):t;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(t,e){return t===0?this:this.next}update(t,e){}wrap(t,e){const r=typeof t=="string"?this.scroll.create(t,e):t;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new wn(`Cannot wrap ${t}`);return r.appendChild(this),r}};za.blotName="abstract";let Fa=za;const Ua=class extends Fa{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 r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Ua.scope=M.INLINE_BLOT;const ut=Ua;class Yg{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 r=e();for(;r&&t>0;)t-=1,r=e();return r}contains(t){const e=this.iterator();let r=e();for(;r;){if(r===t)return!0;r=e()}return!1}indexOf(t){const e=this.iterator();let r=e(),i=0;for(;r;){if(r===t)return i;i+=1,r=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,r=this.head;for(;r!=null;){if(r===t)return e;e+=r.length(),r=r.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 r=this.iterator();let i=r();for(;i;){const s=i.length();if(t<s||e&&t===s&&(i.next==null||i.next.length()!==0))return[i,t];t-=s,i=r()}return[null,0]}forEach(t){const e=this.iterator();let r=e();for(;r;)t(r),r=e()}forEachAt(t,e,r){if(e<=0)return;const[i,s]=this.find(t);let l=t-s;const o=this.iterator(i);let a=o();for(;a&&l<t+e;){const c=a.length();t>l?r(a,t-l,Math.min(e,l+c-t)):r(a,0,Math.min(c,t+e-l)),l+=c,a=o()}}map(t){return this.reduce((e,r)=>(e.push(t(r)),e),[])}reduce(t,e){const r=this.iterator();let i=r();for(;i;)e=t(e,i),i=r();return e}}function Wa(n,t){const e=t.find(n);if(e)return e;try{return t.create(n)}catch{const r=t.create(M.INLINE);return Array.from(n.childNodes).forEach(i=>{r.domNode.appendChild(i)}),n.parentNode&&n.parentNode.replaceChild(r.domNode,n),r.attach(),r}}const Va=class Ve extends Fa{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,Ve.uiClass&&this.uiNode.classList.add(Ve.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Yg,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const e=Wa(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(e){if(e instanceof wn)return;throw e}})}deleteAt(t,e){if(t===0&&e===this.length())return this.remove();this.children.forEachAt(t,e,(r,i,s)=>{r.deleteAt(i,s)})}descendant(t,e=0){const[r,i]=this.children.find(e);return t.blotName==null&&t(r)||t.blotName!=null&&r instanceof t?[r,i]:r instanceof Ve?r.descendant(t,i):[null,-1]}descendants(t,e=0,r=Number.MAX_VALUE){let i=[],s=r;return this.children.forEachAt(e,r,(l,o,a)=>{(t.blotName==null&&t(l)||t.blotName!=null&&l instanceof t)&&i.push(l),l instanceof Ve&&(i=i.concat(l.descendants(t,o,s))),s-=a}),i}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(e=>{t||this.statics.allowedChildren.some(r=>e instanceof r)||(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 Ve?e.unwrap():e.remove())})}formatAt(t,e,r,i){this.children.forEachAt(t,e,(s,l,o)=>{s.formatAt(l,o,r,i)})}insertAt(t,e,r){const[i,s]=this.children.find(t);if(i)i.insertAt(s,e,r);else{const l=r==null?this.scroll.create("text",e):this.scroll.create(e,r);this.appendChild(l)}}insertBefore(t,e){t.parent!=null&&t.parent.children.remove(t);let r=null;this.children.insertBefore(t,e||null),t.parent=this,e!=null&&(r=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(t.domNode,r),t.attach()}length(){return this.children.reduce((t,e)=>t+e.length(),0)}moveChildren(t,e){this.children.forEach(r=>{t.insertBefore(r,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[r,i]=this.children.find(t,e),s=[[this,t]];return r instanceof Ve?s.concat(r.path(i,e)):(r!=null&&s.push([r,i]),s)}removeChild(t){this.children.remove(t)}replaceWith(t,e){const r=typeof t=="string"?this.scroll.create(t,e):t;return r instanceof Ve&&this.moveChildren(r),super.replaceWith(r)}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(t,this.length(),(i,s,l)=>{const o=i.split(s,e);o!=null&&r.appendChild(o)}),r}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 r=[],i=[];t.forEach(s=>{s.target===this.domNode&&s.type==="childList"&&(r.push(...s.addedNodes),i.push(...s.removedNodes))}),i.forEach(s=>{if(s.parentNode!=null&&s.tagName!=="IFRAME"&&document.body.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const l=this.scroll.find(s);l!=null&&(l.domNode.parentNode==null||l.domNode.parentNode===this.domNode)&&l.detach()}),r.filter(s=>s.parentNode===this.domNode&&s!==this.uiNode).sort((s,l)=>s===l?0:s.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(s=>{let l=null;s.nextSibling!=null&&(l=this.scroll.find(s.nextSibling));const o=Wa(s,this.scroll);(o.next!==l||o.next==null)&&(o.parent!=null&&o.parent.removeChild(this),this.insertBefore(o,l||void 0))}),this.enforceAllowedChildren()}};Va.uiClass="";const Ft=Va;function Jg(n,t){if(Object.keys(n).length!==Object.keys(t).length)return!1;for(const e in n)if(n[e]!==t[e])return!1;return!0}const xn=class rr extends Ft{static create(t){return super.create(t)}static formats(t,e){const r=e.query(rr.blotName);if(!(r!=null&&t.tagName===r.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 ai(this.domNode)}format(t,e){if(t===this.statics.blotName&&!e)this.children.forEach(r=>{r instanceof rr||(r=r.wrap(rr.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(t,M.INLINE);if(r==null)return;r instanceof re?this.attributes.attribute(r,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,r,i){this.formats()[r]!=null||this.scroll.query(r,M.ATTRIBUTE)?this.isolate(t,e).format(r,i):super.formatAt(t,e,r,i)}optimize(t){super.optimize(t);const e=this.formats();if(Object.keys(e).length===0)return this.unwrap();const r=this.next;r instanceof rr&&r.prev===this&&Jg(e,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(t,e){const r=super.replaceWith(t,e);return this.attributes.copy(r),r}update(t,e){super.update(t,e),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(t,e){const r=super.wrap(t,e);return r instanceof rr&&this.attributes.move(r),r}};xn.allowedChildren=[xn,ut],xn.blotName="inline",xn.scope=M.INLINE_BLOT,xn.tagName="SPAN";const Us=xn,Tn=class Ho extends Ft{static create(t){return super.create(t)}static formats(t,e){const r=e.query(Ho.blotName);if(!(r!=null&&t.tagName===r.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 ai(this.domNode)}format(t,e){const r=this.scroll.query(t,M.BLOCK);r!=null&&(r instanceof re?this.attributes.attribute(r,e):t===this.statics.blotName&&!e?this.replaceWith(Ho.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,r,i){this.scroll.query(r,M.BLOCK)!=null?this.format(r,i):super.formatAt(t,e,r,i)}insertAt(t,e,r){if(r==null||this.scroll.query(e,M.INLINE)!=null)super.insertAt(t,e,r);else{const i=this.split(t);if(i!=null){const s=this.scroll.create(e,r);i.parent.insertBefore(s,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,e){const r=super.replaceWith(t,e);return this.attributes.copy(r),r}update(t,e){super.update(t,e),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Tn.blotName="block",Tn.scope=M.BLOCK_BLOT,Tn.tagName="P",Tn.allowedChildren=[Us,Tn,ut];const fr=Tn,Ws=class extends Ft{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,r,i){super.formatAt(t,e,r,i),this.enforceAllowedChildren()}insertAt(t,e,r){super.insertAt(t,e,r),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Ws.blotName="container",Ws.scope=M.BLOCK_BLOT;const ci=Ws;class Qg extends ut{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,r,i){t===0&&e===this.length()?this.format(r,i):super.formatAt(t,e,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Ot=Qg,tm={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},em=100,En=class extends Ft{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,tm),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){const r=this.registry.find(t,e);return r?r.scroll===this?r:e?this.find(r.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(r=>{r.remove()}):super.deleteAt(t,e)}formatAt(t,e,r,i){this.update(),super.formatAt(t,e,r,i)}insertAt(t,e,r){this.update(),super.insertAt(t,e,r)}optimize(t=[],e={}){super.optimize(e);const r=e.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)t.push(i.pop());const s=(a,c=!0)=>{a==null||a===this||a.domNode.parentNode!=null&&(r.has(a.domNode)||r.set(a.domNode,[]),c&&s(a.parent))},l=a=>{r.has(a.domNode)&&(a instanceof Ft&&a.children.forEach(l),r.delete(a.domNode),a.optimize(e))};let o=t;for(let a=0;o.length>0;a+=1){if(a>=em)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach(c=>{const u=this.find(c.target,!0);u!=null&&(u.domNode===c.target&&(c.type==="childList"?(s(this.find(c.previousSibling,!1)),Array.from(c.addedNodes).forEach(f=>{const d=this.find(f,!1);s(d,!1),d instanceof Ft&&d.children.forEach(p=>{s(p,!1)})})):c.type==="attributes"&&s(u.prev)),s(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 r=new WeakMap;t.map(i=>{const s=this.find(i.target,!0);return s==null?null:r.has(s.domNode)?(r.get(s.domNode).push(i),null):(r.set(s.domNode,[i]),s)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],e)}),e.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),e),this.optimize(t,e)}};En.blotName="scroll",En.defaultChild=fr,En.allowedChildren=[fr,ci],En.scope=M.BLOCK_BLOT,En.tagName="DIV";const Vs=En,Gs=class tu extends ut{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,r){r==null?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,r)}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 tu&&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 r=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(t,e){t.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Gs.blotName="text",Gs.scope=M.INLINE_BLOT;const hi=Gs,nm=Object.freeze(Object.defineProperty({__proto__:null,Attributor:re,AttributorStore:ai,BlockBlot:fr,ClassAttributor:zt,ContainerBlot:ci,EmbedBlot:Ot,InlineBlot:Us,LeafBlot:ut,ParentBlot:Ft,Registry:Cn,Scope:M,ScrollBlot:Vs,StyleAttributor:Le,TextBlot:hi},Symbol.toStringTag,{value:"Module"}));var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ga(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ks={exports:{}},qt=-1,bt=1,st=0;function pr(n,t,e,r,i){if(n===t)return n?[[st,n]]:[];if(e!=null){var s=um(n,t,e);if(s)return s}var l=Xs(n,t),o=n.substring(0,l);n=n.substring(l),t=t.substring(l),l=ui(n,t);var a=n.substring(n.length-l);n=n.substring(0,n.length-l),t=t.substring(0,t.length-l);var c=rm(n,t);return o&&c.unshift([st,o]),a&&c.push([st,a]),Zs(c,i),r&&lm(c),c}function rm(n,t){var e;if(!n)return[[bt,t]];if(!t)return[[qt,n]];var r=n.length>t.length?n:t,i=n.length>t.length?t:n,s=r.indexOf(i);if(s!==-1)return e=[[bt,r.substring(0,s)],[st,i],[bt,r.substring(s+i.length)]],n.length>t.length&&(e[0][0]=e[2][0]=qt),e;if(i.length===1)return[[qt,n],[bt,t]];var l=sm(n,t);if(l){var o=l[0],a=l[1],c=l[2],u=l[3],f=l[4],d=pr(o,c),p=pr(a,u);return d.concat([[st,f]],p)}return im(n,t)}function im(n,t){for(var e=n.length,r=t.length,i=Math.ceil((e+r)/2),s=i,l=2*i,o=new Array(l),a=new Array(l),c=0;c<l;c++)o[c]=-1,a[c]=-1;o[s+1]=0,a[s+1]=0;for(var u=e-r,f=u%2!==0,d=0,p=0,g=0,b=0,w=0;w<i;w++){for(var y=-w+d;y<=w-p;y+=2){var E=s+y,N;y===-w||y!==w&&o[E-1]<o[E+1]?N=o[E+1]:N=o[E-1]+1;for(var A=N-y;N<e&&A<r&&n.charAt(N)===t.charAt(A);)N++,A++;if(o[E]=N,N>e)p+=2;else if(A>r)d+=2;else if(f){var L=s+u-y;if(L>=0&&L<l&&a[L]!==-1){var O=e-a[L];if(N>=O)return Ka(n,t,N,A)}}}for(var _=-w+g;_<=w-b;_+=2){var L=s+_,O;_===-w||_!==w&&a[L-1]<a[L+1]?O=a[L+1]:O=a[L-1]+1;for(var D=O-_;O<e&&D<r&&n.charAt(e-O-1)===t.charAt(r-D-1);)O++,D++;if(a[L]=O,O>e)b+=2;else if(D>r)g+=2;else if(!f){var E=s+u-_;if(E>=0&&E<l&&o[E]!==-1){var N=o[E],A=s+N-E;if(O=e-O,N>=O)return Ka(n,t,N,A)}}}}return[[qt,n],[bt,t]]}function Ka(n,t,e,r){var i=n.substring(0,e),s=t.substring(0,r),l=n.substring(e),o=t.substring(r),a=pr(i,s),c=pr(l,o);return a.concat(c)}function Xs(n,t){if(!n||!t||n.charAt(0)!==t.charAt(0))return 0;for(var e=0,r=Math.min(n.length,t.length),i=r,s=0;e<i;)n.substring(s,i)==t.substring(s,i)?(e=i,s=e):r=i,i=Math.floor((r-e)/2+e);return Qa(n.charCodeAt(i-1))&&i--,i}function Xa(n,t){var e=n.length,r=t.length;if(e==0||r==0)return 0;e>r?n=n.substring(e-r):e<r&&(t=t.substring(0,e));var i=Math.min(e,r);if(n==t)return i;for(var s=0,l=1;;){var o=n.substring(i-l),a=t.indexOf(o);if(a==-1)return s;l+=a,(a==0||n.substring(i-l)==t.substring(0,l))&&(s=l,l++)}}function ui(n,t){if(!n||!t||n.slice(-1)!==t.slice(-1))return 0;for(var e=0,r=Math.min(n.length,t.length),i=r,s=0;e<i;)n.substring(n.length-i,n.length-s)==t.substring(t.length-i,t.length-s)?(e=i,s=e):r=i,i=Math.floor((r-e)/2+e);return tc(n.charCodeAt(n.length-i))&&i--,i}function sm(n,t){var e=n.length>t.length?n:t,r=n.length>t.length?t:n;if(e.length<4||r.length*2<e.length)return null;function i(p,g,b){for(var w=p.substring(b,b+Math.floor(p.length/4)),y=-1,E="",N,A,L,O;(y=g.indexOf(w,y+1))!==-1;){var _=Xs(p.substring(b),g.substring(y)),D=ui(p.substring(0,b),g.substring(0,y));E.length<D+_&&(E=g.substring(y-D,y)+g.substring(y,y+_),N=p.substring(0,b-D),A=p.substring(b+_),L=g.substring(0,y-D),O=g.substring(y+_))}return E.length*2>=p.length?[N,A,L,O,E]:null}var s=i(e,r,Math.ceil(e.length/4)),l=i(e,r,Math.ceil(e.length/2)),o;if(!s&&!l)return null;l?s?o=s[4].length>l[4].length?s:l:o=l:o=s;var a,c,u,f;n.length>t.length?(a=o[0],c=o[1],u=o[2],f=o[3]):(u=o[0],f=o[1],a=o[2],c=o[3]);var d=o[4];return[a,c,u,f,d]}function lm(n){for(var t=!1,e=[],r=0,i=null,s=0,l=0,o=0,a=0,c=0;s<n.length;)n[s][0]==st?(e[r++]=s,l=a,o=c,a=0,c=0,i=n[s][1]):(n[s][0]==bt?a+=n[s][1].length:c+=n[s][1].length,i&&i.length<=Math.max(l,o)&&i.length<=Math.max(a,c)&&(n.splice(e[r-1],0,[qt,i]),n[e[r-1]+1][0]=bt,r--,r--,s=r>0?e[r-1]:-1,l=0,o=0,a=0,c=0,i=null,t=!0)),s++;for(t&&Zs(n),cm(n),s=1;s<n.length;){if(n[s-1][0]==qt&&n[s][0]==bt){var u=n[s-1][1],f=n[s][1],d=Xa(u,f),p=Xa(f,u);d>=p?(d>=u.length/2||d>=f.length/2)&&(n.splice(s,0,[st,f.substring(0,d)]),n[s-1][1]=u.substring(0,u.length-d),n[s+1][1]=f.substring(d),s++):(p>=u.length/2||p>=f.length/2)&&(n.splice(s,0,[st,u.substring(0,p)]),n[s-1][0]=bt,n[s-1][1]=f.substring(0,f.length-p),n[s+1][0]=qt,n[s+1][1]=u.substring(p),s++),s++}s++}}var Za=/[^a-zA-Z0-9]/,Ya=/\s/,Ja=/[\r\n]/,om=/\n\r?\n$/,am=/^\r?\n\r?\n/;function cm(n){function t(p,g){if(!p||!g)return 6;var b=p.charAt(p.length-1),w=g.charAt(0),y=b.match(Za),E=w.match(Za),N=y&&b.match(Ya),A=E&&w.match(Ya),L=N&&b.match(Ja),O=A&&w.match(Ja),_=L&&p.match(om),D=O&&g.match(am);return _||D?5:L||O?4:y&&!N&&A?3:N||A?2:y||E?1:0}for(var e=1;e<n.length-1;){if(n[e-1][0]==st&&n[e+1][0]==st){var r=n[e-1][1],i=n[e][1],s=n[e+1][1],l=ui(r,i);if(l){var o=i.substring(i.length-l);r=r.substring(0,r.length-l),i=o+i.substring(0,i.length-l),s=o+s}for(var a=r,c=i,u=s,f=t(r,i)+t(i,s);i.charAt(0)===s.charAt(0);){r+=i.charAt(0),i=i.substring(1)+s.charAt(0),s=s.substring(1);var d=t(r,i)+t(i,s);d>=f&&(f=d,a=r,c=i,u=s)}n[e-1][1]!=a&&(a?n[e-1][1]=a:(n.splice(e-1,1),e--),n[e][1]=c,u?n[e+1][1]=u:(n.splice(e+1,1),e--))}e++}}function Zs(n,t){n.push([st,""]);for(var e=0,r=0,i=0,s="",l="",o;e<n.length;){if(e<n.length-1&&!n[e][1]){n.splice(e,1);continue}switch(n[e][0]){case bt:i++,l+=n[e][1],e++;break;case qt:r++,s+=n[e][1],e++;break;case st:var a=e-i-r-1;if(t){if(a>=0&&nc(n[a][1])){var c=n[a][1].slice(-1);if(n[a][1]=n[a][1].slice(0,-1),s=c+s,l=c+l,!n[a][1]){n.splice(a,1),e--;var u=a-1;n[u]&&n[u][0]===bt&&(i++,l=n[u][1]+l,u--),n[u]&&n[u][0]===qt&&(r++,s=n[u][1]+s,u--),a=u}}if(ec(n[e][1])){var c=n[e][1].charAt(0);n[e][1]=n[e][1].slice(1),s+=c,l+=c}}if(e<n.length-1&&!n[e][1]){n.splice(e,1);break}if(s.length>0||l.length>0){s.length>0&&l.length>0&&(o=Xs(l,s),o!==0&&(a>=0?n[a][1]+=l.substring(0,o):(n.splice(0,0,[st,l.substring(0,o)]),e++),l=l.substring(o),s=s.substring(o)),o=ui(l,s),o!==0&&(n[e][1]=l.substring(l.length-o)+n[e][1],l=l.substring(0,l.length-o),s=s.substring(0,s.length-o)));var f=i+r;s.length===0&&l.length===0?(n.splice(e-f,f),e=e-f):s.length===0?(n.splice(e-f,f,[bt,l]),e=e-f+1):l.length===0?(n.splice(e-f,f,[qt,s]),e=e-f+1):(n.splice(e-f,f,[qt,s],[bt,l]),e=e-f+2)}e!==0&&n[e-1][0]===st?(n[e-1][1]+=n[e][1],n.splice(e,1)):e++,i=0,r=0,s="",l="";break}}n[n.length-1][1]===""&&n.pop();var d=!1;for(e=1;e<n.length-1;)n[e-1][0]===st&&n[e+1][0]===st&&(n[e][1].substring(n[e][1].length-n[e-1][1].length)===n[e-1][1]?(n[e][1]=n[e-1][1]+n[e][1].substring(0,n[e][1].length-n[e-1][1].length),n[e+1][1]=n[e-1][1]+n[e+1][1],n.splice(e-1,1),d=!0):n[e][1].substring(0,n[e+1][1].length)==n[e+1][1]&&(n[e-1][1]+=n[e+1][1],n[e][1]=n[e][1].substring(n[e+1][1].length)+n[e+1][1],n.splice(e+1,1),d=!0)),e++;d&&Zs(n,t)}function Qa(n){return n>=55296&&n<=56319}function tc(n){return n>=56320&&n<=57343}function ec(n){return tc(n.charCodeAt(0))}function nc(n){return Qa(n.charCodeAt(n.length-1))}function hm(n){for(var t=[],e=0;e<n.length;e++)n[e][1].length>0&&t.push(n[e]);return t}function Ys(n,t,e,r){return nc(n)||ec(r)?null:hm([[st,n],[qt,t],[bt,e],[st,r]])}function um(n,t,e){var r=typeof e=="number"?{index:e,length:0}:e.oldRange,i=typeof e=="number"?null:e.newRange,s=n.length,l=t.length;if(r.length===0&&(i===null||i.length===0)){var o=r.index,a=n.slice(0,o),c=n.slice(o),u=i?i.index:null;t:{var f=o+l-s;if(u!==null&&u!==f||f<0||f>l)break t;var d=t.slice(0,f),p=t.slice(f);if(p!==c)break t;var g=Math.min(o,f),b=a.slice(0,g),w=d.slice(0,g);if(b!==w)break t;var y=a.slice(g),E=d.slice(g);return Ys(b,y,E,c)}t:{if(u!==null&&u!==o)break t;var N=o,d=t.slice(0,N),p=t.slice(N);if(d!==a)break t;var A=Math.min(s-N,l-N),L=c.slice(c.length-A),O=p.slice(p.length-A);if(L!==O)break t;var y=c.slice(0,c.length-A),E=p.slice(0,p.length-A);return Ys(a,y,E,L)}}if(r.length>0&&i&&i.length===0)t:{var b=n.slice(0,r.index),L=n.slice(r.index+r.length),g=b.length,A=L.length;if(l<g+A)break t;var w=t.slice(0,g),O=t.slice(l-A);if(b!==w||L!==O)break t;var y=n.slice(g,s-A),E=t.slice(g,l-A);return Ys(b,y,E,L)}return null}function di(n,t,e,r){return pr(n,t,e,r,!0)}di.INSERT=bt,di.DELETE=qt,di.EQUAL=st;var dm=di,fi={exports:{}};fi.exports,function(n,t){var e=200,r="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",l="[object Array]",o="[object Boolean]",a="[object Date]",c="[object Error]",u="[object Function]",f="[object GeneratorFunction]",d="[object Map]",p="[object Number]",g="[object Object]",b="[object Promise]",w="[object RegExp]",y="[object Set]",E="[object String]",N="[object Symbol]",A="[object WeakMap]",L="[object ArrayBuffer]",O="[object DataView]",_="[object Float32Array]",D="[object Float64Array]",X="[object Int8Array]",rt="[object Int16Array]",Y="[object Int32Array]",Z="[object Uint8Array]",It="[object Uint8ClampedArray]",z="[object Uint16Array]",J="[object Uint32Array]",V=/[\\^$.*+?()[\]{}|]/g,wt=/\w*$/,Q=/^\[object .+?Constructor\]$/,Ct=/^(?:0|[1-9]\d*)$/,H={};H[s]=H[l]=H[L]=H[O]=H[o]=H[a]=H[_]=H[D]=H[X]=H[rt]=H[Y]=H[d]=H[p]=H[g]=H[w]=H[y]=H[E]=H[N]=H[Z]=H[It]=H[z]=H[J]=!0,H[c]=H[u]=H[A]=!1;var Wn=typeof Se=="object"&&Se&&Se.Object===Object&&Se,_r=typeof self=="object"&&self&&self.Object===Object&&self,B=Wn||_r||Function("return this")(),tt=t&&!t.nodeType&&t,$=tt&&!0&&n&&!n.nodeType&&n,nt=$&&$.exports===tt;function Fe(h,m){return h.set(m[0],m[1]),h}function xt(h,m){return h.add(m),h}function Qi(h,m){for(var C=-1,I=h?h.length:0;++C<I&&m(h[C],C,h)!==!1;);return h}function ts(h,m){for(var C=-1,I=m.length,k=h.length;++C<I;)h[k+C]=m[C];return h}function Br(h,m,C,I){var k=-1,R=h?h.leng