1import{a as C,b as Yt,d as Wn,e as f,f as Jt,g as va,h as ut}from"./chunk-TWZW5B45.js";var _p,hs,Zn=f(()=>{_p=typeof global=="object"&&global&&global.Object===Object&&global,hs=_p});var qp,Ip,j,Et=f(()=>{Zn();qp=typeof self=="object"&&self&&self.Object===Object&&self,Ip=hs||qp||Function("return this")(),j=Ip});var kp,dt,Tr=f(()=>{Et();kp=j.Symbol,dt=kp});function Mp(r){var t=Rp.call(r,Nr),e=r[Nr];try{r[Nr]=void 0;var s=!0}catch(i){}var n=Bp.call(r);return s&&(t?r[Nr]=e:delete r[Nr]),n}var Aa,Rp,Bp,Nr,Ea,Ta=f(()=>{Tr();Aa=Object.prototype,Rp=Aa.hasOwnProperty,Bp=Aa.toString,Nr=dt?dt.toStringTag:void 0;Ea=Mp});function Pp(r){return jp.call(r)}var Dp,jp,Na,wa=f(()=>{Dp=Object.prototype,jp=Dp.toString;Na=Pp});function Hp(r){return r==null?r===void 0?Fp:Up:Sa&&Sa in Object(r)?Ea(r):Na(r)}var Up,Fp,Sa,Tt,Me=f(()=>{Tr();Ta();wa();Up="[object Null]",Fp="[object Undefined]",Sa=dt?dt.toStringTag:void 0;Tt=Hp});function zp(r){return r!=null&&typeof r=="object"}var $,It=f(()=>{$=zp});var $p,pt,De=f(()=>{$p=Array.isArray,pt=$p});function Kp(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var K,kt=f(()=>{K=Kp});function Gp(r){return r}var ds,Xn=f(()=>{ds=Gp});function Qp(r){if(!K(r))return!1;var t=Tt(r);return t==Wp||t==Zp||t==Vp||t==Xp}var Vp,Wp,Zp,Xp,je,ps=f(()=>{Me();kt();Vp="[object AsyncFunction]",Wp="[object Function]",Zp="[object GeneratorFunction]",Xp="[object Proxy]";je=Qp});var Yp,ms,La=f(()=>{Et();Yp=j["__core-js_shared__"],ms=Yp});function Jp(r){return!!Oa&&Oa in r}var Oa,Ca,_a=f(()=>{La();
1Oa=(function(){var r=/[^.]+$/.exec(ms&&ms.keys&&ms.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();Ca=Jp});function rm(r){if(r!=null){try{return em.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var tm,em,Rt,Qn=f(()=>{tm=Function.prototype,em=tm.toString;Rt=rm});function cm(r){if(!K(r)||Ca(r))return!1;var t=je(r)?um:nm;return t.test(Rt(r))}var sm,nm,im,om,am,lm,um,qa,Ia=f(()=>{ps();_a();kt();Qn();sm=/[\\^$.*+?()[\]{}|]/g,nm=/^\[object .+?Constructor\]$/,im=Function.prototype,om=Object.prototype,am=im.toString,lm=om.hasOwnProperty,um=RegExp("^"+am.call(lm).replace(sm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");qa=cm});function fm(r,t){return r?.[t]}var ka,Ra=f(()=>{ka=fm});function hm(r,t){var e=ka(r,t);return qa(e)?e:void 0}var et,te=f(()=>{Ia();Ra();et=hm});var dm,gs,Ba=f(()=>{te();Et();dm=et(j,"WeakMap"),gs=dm});var Ma,pm,Da,ja=f(()=>{kt();Ma=Object.create,pm=(function(){function r(){}return function(t){if(!K(t))return{};if(Ma)return Ma(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}})(),Da=pm});function mm(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}var Pa,Ua=f(()=>{Pa=mm});function gm(r,t){var e=-1,s=r.length;for(t||(t=Array(s));++e<s;)t[e]=r[e];return t}var bs,Yn=f(()=>{bs=gm});function vm(r){var t=0,e=0;return function(){var s=xm(),n=ym-(s-e);if(e=s,n>0){if(++t>=bm)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var bm,ym,xm,Fa,Ha=f(()=>{bm=800,ym=16,xm=Date.now;Fa=vm});function Am(r){return function(){return r}}var za,$a=f(()=>{za=Am});var Em,Pe,Jn=f(()=>{te();Em=(function(){try{var r=et(Object,"defineProperty");return r({},"",{}),r}catch(t){}})(),Pe=Em});var Tm,Ka,Ga=f(()=>{$a();Jn();Xn();Tm=Pe?function(r,t){return Pe(r,"toString",{configurable:!0,enumerable:!1,value:za(t),writable:!0})}:ds,Ka=Tm});var Nm,Va,Wa=f(()=>{Ga();Ha();Nm=Fa(Ka),Va=Nm});function wm(r,t){for(var e=-1,s=r==null?0:r.length;++e<s&&t(r[e],e,r)!==!1;);return r}var Za,Xa=f(()=>{Za=wm});function Om(r,t){var e=typeof r;return t=t??Sm,!!t&&(e=="number"||e!="symbol"&&Lm.test(r))&&r>-1&&r%1==0&&r<t}var Sm,Lm,ys,ti=f(()=>{Sm=9007199254740991,Lm=/^(?:0|[1-9]\d*)$/;ys=Om});function Cm(r,t,e){t=="__proto__"&&Pe?Pe(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var Ue,xs=f(()=>{Jn();Ue=Cm});function _m(r,t){return r===t||r!==r&&t!==t}var wt,Fe=f(()=>{wt=_m});function km(r,t,e){var s=r[t];(!(Im.call(r,t)&&wt(s,e))||e===void 0&&!(t in r))&&Ue(r,t,e)}var qm,Im,vs,ei=f(()=>{xs();Fe();qm=Object.prototype,Im=qm.hasOwnProperty;vs=km});function Rm(r,t,e,s){var n=!e;e||(e={});for(var i=-1,o=t.length;++i<o;){var a=t[i],l=s?s(e[a],r[a],a,e,r):void 0;l===void 0&&(l=r[a]),n?Ue(e,a,l):vs(e,a,l)}return e}var St,He=f(()=>{ei();xs();St=Rm});function Bm(r,t,e){return t=Qa(t===void 0?r.length-1:t,0),function(){for(var s=arguments,n=-1,i=Qa(s.length-t,0),o=Array(i);++n<i;)o[n]=s[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=s[n];return a[t]=e(o),Pa(r,this,a)}}var Qa,Ya,Ja=f(()=>{Ua();Qa=Math.max;Ya=Bm});function Mm(r,t){return Va(Ya(r,t,ds),r+"")}var tl,el=f(()=>{Xn();Ja();Wa();tl=Mm});function jm(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Dm}var Dm,As,ri=f(()=>{Dm=9007199254740991;As=jm});function Pm(r){return r!=null&&As(r.length)&&!je(r)}var ee,wr=f(()=>{ps();ri();ee=Pm});function Um(r,t,e){if(!K(e))return!1;var s=typeof t;return(s=="number"?ee(e)&&ys(t,e.length):s=="string"&&t in e)?wt(e[t],r):!1}var rl,sl=f(()=>{Fe();wr();ti();kt();rl=Um});function Fm(r){return tl(function(t,e){var s=-1,n=e.length,i=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(i=r.length>3&&typeof i=="function"?(n--,i):void 0,o&&rl(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++s<n;){var a=e[s];a&&r(t,a,s,i)}return t})}var nl,il=f(()=>{el();sl();nl=Fm});function zm(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||Hm;return r===e}var Hm,ze,Es=f(()=>{Hm=Object.prototype;ze=zm});function $m(r,t){for(var e=-1,s=Array(r);++e<r;)s[e]=t(e);return s}var ol,al=f(()=>{ol=$m});function Gm(r){return $(r)&&Tt(r)==Km}var Km,si,ll=f(()=>{Me();It();Km="[object Arguments]";si=Gm});var ul,Vm,Wm,Zm,Sr,ni=f(()=>{ll();It();ul=Object.prototype,Vm=ul.hasOwnProperty,Wm=ul.propertyIsEnumerable,Zm=si((function(){return arguments})())?si:function(r){return $(r)&&Vm.call(r,"callee")&&!Wm.call(r,"callee")},Sr=Zm});function Xm(){return!1}var cl,fl=f(()=>{cl=Xm});var pl,hl,Qm,dl,Ym,Jm,Bt,Lr=f(()=>{Et();fl();pl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hl=pl&&typeof module=="object"&&module&&!module.nodeType&&module,Qm=hl&&hl.exports===pl,dl=Qm?j.Buffer:void 0,Ym=dl?dl.isBuffer:void 0,Jm=Ym||cl,Bt=Jm});function Ng(r){return $(r)&&As(r.length)&&!!_[Tt(r)]}var tg,eg,rg,sg,ng,ig,og,ag,lg,ug,cg,fg,hg,dg,pg,mg,gg,bg,yg,xg,vg,Ag,Eg,Tg,_,ml,gl=f(()=>{Me();ri();It();tg="[object Arguments]",eg="[object Array]",rg="[object Boolean]",sg="[object Date]",ng="[object Error]",ig="[object Function]",og="[object Map]",ag="[object Number]",lg="[object Object]",ug="[object RegExp]",cg="[object Set]",fg="[object String]",hg="[object WeakMap]",dg="[object ArrayBuffer]",pg="[object DataView]",mg="[object Float32Array]",gg="[object Float64Array
1]",bg="[object Int8Array]",yg="[object Int16Array]",xg="[object Int32Array]",vg="[object Uint8Array]",Ag="[object Uint8ClampedArray]",Eg="[object Uint16Array]",Tg="[object Uint32Array]",_={};_[mg]=_[gg]=_[bg]=_[yg]=_[xg]=_[vg]=_[Ag]=_[Eg]=_[Tg]=!0;_[tg]=_[eg]=_[dg]=_[rg]=_[pg]=_[sg]=_[ng]=_[ig]=_[og]=_[ag]=_[lg]=_[ug]=_[cg]=_[fg]=_[hg]=!1;ml=Ng});function wg(r){return function(t){return r(t)}}var $e,Ts=f(()=>{$e=wg});var bl,Or,Sg,ii,Lg,Mt,Ns=f(()=>{Zn();bl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Or=bl&&typeof module=="object"&&module&&!module.nodeType&&module,Sg=Or&&Or.exports===bl,ii=Sg&&hs.process,Lg=(function(){try{var r=Or&&Or.require&&Or.require("util").types;return r||ii&&ii.binding&&ii.binding("util")}catch(t){}})(),Mt=Lg});var yl,Og,Ke,ws=f(()=>{gl();Ts();Ns();yl=Mt&&Mt.isTypedArray,Og=yl?$e(yl):ml,Ke=Og});function qg(r,t){var e=pt(r),s=!e&&Sr(r),n=!e&&!s&&Bt(r),i=!e&&!s&&!n&&Ke(r),o=e||s||n||i,a=o?ol(r.length,String):[],l=a.length;for(var u in r)(t||_g.call(r,u))&&!(o&&(u=="length"||n&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ys(u,l)))&&a.push(u);return a}var Cg,_g,Ss,oi=f(()=>{al();ni();De();Lr();ti();ws();Cg=Object.prototype,_g=Cg.hasOwnProperty;Ss=qg});function Ig(r,t){return function(e){return r(t(e))}}var Ls,ai=f(()=>{Ls=Ig});var kg,xl,vl=f(()=>{ai();kg=Ls(Object.keys,Object),xl=kg});function Mg(r){if(!ze(r))return xl(r);var t=[];for(var e in Object(r))Bg.call(r,e)&&e!="constructor"&&t.push(e);return t}var Rg,Bg,Al,El=f(()=>{Es();vl();Rg=Object.prototype,Bg=Rg.hasOwnProperty;Al=Mg});function Dg(r){return ee(r)?Ss(r):Al(r)}var Ge,Os=f(()=>{oi();El();wr();Ge=Dg});function jg(r){var t=[];if(r!=null)for(var e in Object(r))t.push(e);return t}var Tl,Nl=f(()=>{Tl=jg});function Fg(r){if(!K(r))return Tl(r);var t=ze(r),e=[];for(var s in r)s=="constructor"&&(t||!Ug.call(r,s))||e.push(s);return e}var Pg,Ug,wl,Sl=f(()=>{kt();Es();Nl();Pg=Object.prototype,Ug=Pg.hasOwnProperty;wl=Fg});function Hg(r){return ee(r)?Ss(r,!0):wl(r)}var Lt,Ve=f(()=>{oi();Sl();wr();Lt=Hg});var zg,Dt,Cr=f(()=>{te();zg=et(Object,"create"),Dt=zg});function $g(){this.__data__=Dt?Dt(null):{},this.size=0}var Ll,Ol=f(()=>{Cr();Ll=$g});function Kg(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Cl,_l=f(()=>{Cl=Kg});function Zg(r){var t=this.__data__;if(Dt){var e=t[r];return e===Gg?void 0:e}return Wg.call(t,r)?t[r]:void 0}var Gg,Vg,Wg,ql,Il=f(()=>{Cr();Gg="__lodash_hash_undefined__",Vg=Object.prototype,Wg=Vg.hasOwnProperty;ql=Zg});function Yg(r){var t=this.__data__;return Dt?t[r]!==void 0:Qg.call(t,r)}var Xg,Qg,kl,Rl=f(()=>{Cr();Xg=Object.prototype,Qg=Xg.hasOwnProperty;kl=Yg});function t1(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=Dt&&t===void 0?Jg:t,this}var Jg,Bl,Ml=f(()=>{Cr();Jg="__lodash_hash_undefined__";Bl=t1});function We(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}var li,Dl=f(()=>{Ol();_l();Il();Rl();Ml();We.prototype.clear=Ll;We.prototype.delete=Cl;We.prototype.get=ql;We.prototype.has=kl;We.prototype.set=Bl;li=We});function e1(){this.__data__=[],this.size=0}var jl,Pl=f(()=>{jl=e1});function r1(r,t){for(var e=r.length;e--;)if(wt(r[e][0],t))return e;return-1}var re,_r=f(()=>{Fe();re=r1});function i1(r){var t=this.__data__,e=re(t,r);if(e<0)return!1;var s=t.length-1;return e==s?t.pop():n1.call(t,e,1),--this.size,!0}var s1,n1,Ul,Fl=f(()=>{_r();s1=Array.prototype,n1=s1.splice;Ul=i1});function o1(r){var t=this.__data__,e=re(t,r);return e<0?void 0:t[e][1]}var Hl,zl=f(()=>{_r();Hl=o1});function a1(r){return re(this.__data__,r)>-1}var $l,Kl=f(()=>{_r();$l=a1});function l1(r,t){var e=this.__data__,s=re(e,r);return s<0?(++this.size,e.push([r,t])):e[s][1]=t,this}var Gl,Vl=f(()=>{_r();Gl=l1});function Ze(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}var se,qr=f(()=>{Pl();Fl();zl();Kl();Vl();Ze.prototype.clear=jl;Ze.prototype.delete=Ul;Ze.prototype.get=Hl;Ze.prototype.has=$l;Ze.prototype.set=Gl;se=Ze});var u1,ne,Cs=f(()=>{te();Et();u1=et(j,"Map"),ne=u1});function c1(){this.size=0,this.__data__={hash:new li,map:new(ne||se),string:new li}}var Wl,Zl=f(()=>{Dl();qr();Cs();Wl=c1});function f1(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var Xl,Ql=f(()=>{Xl=f1});function h1(r,t){var e=r.__data__;return Xl(t)?e[typeof t=="string"?"string":"hash"]:e.map}var ie,Ir=f(()=>{Ql();ie=h1});function d1(r){var t=ie(this,r).delete(r);return this.size-=t?1:0,t}var Yl,Jl=f(()=>{Ir();Yl=d1});function p1(r){return ie(this,r).get(r)}var tu,eu=f(()=>{Ir();tu=p1});function m1(r){return ie(this,r).has(r)}var ru,su=f(()=>{Ir();ru=m1});function g1(r,t){var e=ie(this,r),s=e.size;return e.set(r,t),this.size+=e.size==s?0:1,this}var nu,iu=f(()=>{Ir();nu=g1});function Xe(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}var _s,ui=f(()=>{Zl();Jl();eu();su();iu();Xe.prototype.clear=Wl;Xe.prototype.delete=Yl;Xe.prototype.get=tu;Xe.prototype.has=ru;Xe.prototype.set=nu;_s=Xe});function b1(r,t){for(var e=-1,s=t.length,n=r.length;++e<s;)r[n+e]=t[e];return r}var qs,ci=f(()=>{qs=b1});var y1,Qe,Is=f(()=>{ai();y1=Ls(Object.getPrototypeOf,Object),Qe=y1});function N1(r){if(!$(r)||Tt(r)!=x1)return!1;var t=Qe(r);if(t===null)return!0;var e=E1.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&ou.call(e)==T1}var x1,v1,A1,ou,E1,T1,au,lu=f(()=>{Me();Is();It();x1="[object Object]",v1=Function.prototype,A1=Object.prototype,ou=v1.toString,E1=A1.hasOwnProperty,T1=ou.call(Object);au=N1});function w1(){this.__data__=new se,this.size=0}var uu,cu=f(()=>{qr();uu=w1});function S1(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var fu,hu=f(()=>{fu=S1});function L1(r){return this.__data__.get(r)}
1var du,pu=f(()=>{du=L1});function O1(r){return this.__data__.has(r)}var mu,gu=f(()=>{mu=O1});function _1(r,t){var e=this.__data__;if(e instanceof se){var s=e.__data__;if(!ne||s.length<C1-1)return s.push([r,t]),this.size=++e.size,this;e=this.__data__=new _s(s)}return e.set(r,t),this.size=e.size,this}var C1,bu,yu=f(()=>{qr();Cs();ui();C1=200;bu=_1});function Ye(r){var t=this.__data__=new se(r);this.size=t.size}var oe,ks=f(()=>{qr();cu();hu();pu();gu();yu();Ye.prototype.clear=uu;Ye.prototype.delete=fu;Ye.prototype.get=du;Ye.prototype.has=mu;Ye.prototype.set=bu;oe=Ye});function q1(r,t){return r&&St(t,Ge(t),r)}var xu,vu=f(()=>{He();Os();xu=q1});function I1(r,t){return r&&St(t,Lt(t),r)}var Au,Eu=f(()=>{He();Ve();Au=I1});function R1(r,t){if(t)return r.slice();var e=r.length,s=wu?wu(e):new r.constructor(e);return r.copy(s),s}var Su,Tu,k1,Nu,wu,Rs,fi=f(()=>{Et();Su=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tu=Su&&typeof module=="object"&&module&&!module.nodeType&&module,k1=Tu&&Tu.exports===Su,Nu=k1?j.Buffer:void 0,wu=Nu?Nu.allocUnsafe:void 0;Rs=R1});function B1(r,t){for(var e=-1,s=r==null?0:r.length,n=0,i=[];++e<s;){var o=r[e];t(o,e,r)&&(i[n++]=o)}return i}var Lu,Ou=f(()=>{Lu=B1});function M1(){return[]}var Bs,hi=f(()=>{Bs=M1});var D1,j1,Cu,P1,Je,Ms=f(()=>{Ou();hi();D1=Object.prototype,j1=D1.propertyIsEnumerable,Cu=Object.getOwnPropertySymbols,P1=Cu?function(r){return r==null?[]:(r=Object(r),Lu(Cu(r),function(t){return j1.call(r,t)}))}:Bs,Je=P1});function U1(r,t){return St(r,Je(r),t)}var _u,qu=f(()=>{He();Ms();_u=U1});var F1,H1,Ds,di=f(()=>{ci();Is();Ms();hi();F1=Object.getOwnPropertySymbols,H1=F1?function(r){for(var t=[];r;)qs(t,Je(r)),r=Qe(r);return t}:Bs,Ds=H1});function z1(r,t){return St(r,Ds(r),t)}var Iu,ku=f(()=>{He();di();Iu=z1});function $1(r,t,e){var s=t(r);return pt(r)?s:qs(s,e(r))}var js,pi=f(()=>{ci();De();js=$1});function K1(r){return js(r,Ge,Je)}var kr,mi=f(()=>{pi();Ms();Os();kr=K1});function G1(r){return js(r,Lt,Ds)}var Ru,Bu=f(()=>{pi();di();Ve();Ru=G1});var V1,Ps,Mu=f(()=>{te();Et();V1=et(j,"DataView"),Ps=V1});var W1,Us,Du=f(()=>{te();Et();W1=et(j,"Promise"),Us=W1});var Z1,Fs,ju=f(()=>{te();Et();Z1=et(j,"Set"),Fs=Z1});var Pu,X1,Uu,Fu,Hu,zu,Q1,Y1,J1,t0,e0,Ae,jt,Rr=f(()=>{Mu();Cs();Du();ju();Ba();Me();Qn();Pu="[object Map]",X1="[object Object]",Uu="[object Promise]",Fu="[object Set]",Hu="[object WeakMap]",zu="[object DataView]",Q1=Rt(Ps),Y1=Rt(ne),J1=Rt(Us),t0=Rt(Fs),e0=Rt(gs),Ae=Tt;(Ps&&Ae(new Ps(new ArrayBuffer(1)))!=zu||ne&&Ae(new ne)!=Pu||Us&&Ae(Us.resolve())!=Uu||Fs&&Ae(new Fs)!=Fu||gs&&Ae(new gs)!=Hu)&&(Ae=function(r){var t=Tt(r),e=t==X1?r.constructor:void 0,s=e?Rt(e):"";if(s)switch(s){case Q1:return zu;case Y1:return Pu;case J1:return Uu;case t0:return Fu;case e0:return Hu}return t});jt=Ae});function n0(r){var t=r.length,e=new r.constructor(t);return t&&typeof r[0]=="string"&&s0.call(r,"index")&&(e.index=r.index,e.input=r.input),e}var r0,s0,$u,Ku=f(()=>{r0=Object.prototype,s0=r0.hasOwnProperty;$u=n0});var i0,tr,gi=f(()=>{Et();i0=j.Uint8Array,tr=i0});function o0(r){var t=new r.constructor(r.byteLength);return new tr(t).set(new tr(r)),t}var er,Hs=f(()=>{gi();er=o0});function a0(r,t){var e=t?er(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.byteLength)}var Gu,Vu=f(()=>{Hs();Gu=a0});function u0(r){var t=new r.constructor(r.source,l0.exec(r));return t.lastIndex=r.lastIndex,t}var l0,Wu,Zu=f(()=>{l0=/\w*$/;Wu=u0});function c0(r){return Qu?Object(Qu.call(r)):{}}var Xu,Qu,Yu,Ju=f(()=>{Tr();Xu=dt?dt.prototype:void 0,Qu=Xu?Xu.valueOf:void 0;Yu=c0});function f0(r,t){var e=t?er(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var zs,bi=f(()=>{Hs();zs=f0});function q0(r,t,e){var s=r.constructor;switch(t){case v0:return er(r);case h0:case d0:return new s(+r);case A0:return Gu(r,e);case E0:case T0:case N0:case w0:case S0:case L0:case O0:case C0:case _0:return zs(r,e);case p0:return new s;case m0:case y0:return new s(r);case g0:return Wu(r);case b0:return new s;case x0:return Yu(r)}}var h0,d0,p0,m0,g0,b0,y0,x0,v0,A0,E0,T0,N0,w0,S0,L0,O0,C0,_0,tc,ec=f(()=>{Hs();Vu();Zu();Ju();bi();h0="[object Boolean]",d0="[object Date]",p0="[object Map]",m0="[object Number]",g0="[object RegExp]",b0="[object Set]",y0="[object String]",x0="[object Symbol]",v0="[object ArrayBuffer]",A0="[object DataView]",E0="[object Float32Array]",T0="[object Float64Array
1]",N0="[object Int8Array]",w0="[object Int16Array]",S0="[object Int32Array]",L0="[object Uint8Array]",O0="[object Uint8ClampedArray]",C0="[object Uint16Array]",_0="[object Uint32Array]";tc=q0});function I0(r){return typeof r.constructor=="function"&&!ze(r)?Da(Qe(r)):{}}var $s,yi=f(()=>{ja();Is();Es();$s=I0});function R0(r){return $(r)&&jt(r)==k0}var k0,rc,sc=f(()=>{Rr();It();k0="[object Map]";rc=R0});var nc,B0,ic,oc=f(()=>{sc();Ts();Ns();nc=Mt&&Mt.isMap,B0=nc?$e(nc):rc,ic=B0});function D0(r){return $(r)&&jt(r)==M0}var M0,ac,lc=f(()=>{Rr();It();M0="[object Set]";ac=D0});var uc,j0,cc,fc=f(()=>{lc();Ts();Ns();uc=Mt&&Mt.isSet,j0=uc?$e(uc):ac,cc=j0});function Ks(r,t,e,s,n,i){var o,a=t&P0,l=t&U0,u=t&F0;if(e&&(o=n?e(r,s,n,i):e(r)),o!==void 0)return o;if(!K(r))return r;var c=pt(r);if(c){if(o=$u(r),!a)return bs(r,o)}else{var h=jt(r),d=h==dc||h==G0;if(Bt(r))return Rs(r,a);if(h==pc||h==hc||d&&!n){if(o=l||d?{}:$s(r),!a)return l?Iu(r,Au(o,r)):_u(r,xu(o,r))}else{if(!L[h])return n?r:{};o=tc(r,h,a)}}i||(i=new oe);var m=i.get(r);if(m)return m;i.set(r,o),cc(r)?r.forEach(function(A){o.add(Ks(A,t,e,A,r,i))}):ic(r)&&r.forEach(function(A,b){o.set(b,Ks(A,t,e,b,r,i))});var g=u?l?Ru:kr:l?Lt:Ge,x=c?void 0:g(r);return Za(x||r,function(A,b){x&&(b=A,A=r[b]),vs(o,b,Ks(A,t,e,b,r,i))}),o}var P0,U0,F0,hc,H0,z0,$0,K0,dc,G0,V0,W0,pc,Z0,X0,Q0,Y0,J0,tb,eb,rb,sb,nb,ib,ob,ab,lb,ub,cb,L,mc,gc=f(()=>{ks();Xa();ei();vu();Eu();fi();Yn();qu();ku();mi();Bu();Rr();Ku();ec();yi();De();Lr();oc();kt();fc();Os();Ve();P0=1,U0=2,F0=4,hc="[object Arguments]",H0="[object Array]",z0="[object Boolean]",$0="[object Date]",K0="[object Error]",dc="[object Function]",G0="[object GeneratorFunction]",V0="[object Map]",W0="[object Number]",pc="[object Object]",Z0="[object RegExp]",X0="[object Set]",Q0="[object String]",Y0="[object Symbol]",J0="[object WeakMap]",tb="[object ArrayBuffer]",eb="[object DataView]",rb="[object Float32Array]",sb="[object Float64Array]",nb="[object Int8Array]",ib="[object Int16Array]",ob="[object Int32Array]",ab="[object Uint8Array]",lb="[object Uint8ClampedArray]",ub="[object Uint16Array]",cb="[object Uint32Array]",L={};L[hc]=L[H0]=L[tb]=L[eb]=L[z0]=L[$0]=L[rb]=L[sb]=L[nb]=L[ib]=L[ob]=L[V0]=L[W0]=L[pc]=L[Z0]=L[X0]=L[Q0]=L[Y0]=L[ab]=L[lb]=L[ub]=L[cb]=!0;L[K0]=L[dc]=L[J0]=!1;mc=Ks});function db(r){return mc(r,fb|hb)}var fb,hb,Ot,bc=f(()=>{gc();fb=1,hb=4;Ot=db});function mb(r){return this.__data__.set(r,pb),this}var pb,yc,xc=f(()=>{pb="__lodash_hash_undefined__";yc=mb});function gb(r){return this.__data__.has(r)}var vc,Ac=f(()=>{vc=gb});function Gs(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new _s;++t<e;)this.add(r[t])}var Ec,Tc=f(()=>{ui();xc();Ac();Gs.prototype.add=Gs.prototype.push=yc;Gs.prototype.has=vc;Ec=Gs});function bb(r,t){for(var e=-1,s=r==null?0:r.length;++e<s;)if(t(r[e],e,r))return!0;return!1}var Nc,wc=f(()=>{Nc=bb});function yb(r,t){return r.has(t)}var Sc,Lc=f(()=>{Sc=yb});function Ab(r,t,e,s,n,i){var o=e&xb,a=r.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var u=i.get(r),c=i.get(t);if(u&&c)return u==t&&c==r;var h=-1,d=!0,m=e&vb?new Ec:void 0;for(i.set(r,t),i.set(t,r);++h<a;){var g=r[h],x=t[h];if(s)var A=o?s(x,g,h,t,r,i):s(g,x,h,r,t,i);if(A!==void 0){if(A)continue;d=!1;break}if(m){if(!Nc(t,function(b,E){if(!Sc(m,E)&&(g===b||n(g,b,e,s,i)))return m.push(E)})){d=!1;break}}else if(!(g===x||n(g,x,e,s,i))){d=!1;break}}return i.delete(r),i.delete(t),d}var xb,vb,Vs,xi=f(()=>{Tc();wc();Lc();xb=1,vb=2;Vs=Ab});function Eb(r){var t=-1,e=Array(r.size);return r.forEach(function(s,n){e[++t]=[n,s]}),e}var Oc,Cc=f(()=>{Oc=Eb});function Tb(r){var t=-1,e=Array(r.size);return r.forEach(function(s){e[++t]=s}),e}var _c,qc=f(()=>{_c=Tb});function Db(r,t,e,s,n,i,o){switch(e){case Mb:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case Bb:return!(r.byteLength!=t.byteLength||!i(new tr(r),new tr(t)));case Sb:case Lb:case _b:return wt(+r,+t);case Ob:return r.name==t.name&&r.message==t.message;case qb:case kb:return r==t+"";case Cb:var a=Oc;case Ib:var l=s&Nb;if(a||(a=_c),r.size!=t.size&&!l)return!1;var u=o.get(r);if(u)return u==t;s|=wb,o.set(r,t);var c=Vs(a(r),a(t),s,n,i,o);return o.delete(r),c;
1case Rb:if(vi)return vi.call(r)==vi.call(t)}return!1}var Nb,wb,Sb,Lb,Ob,Cb,_b,qb,Ib,kb,Rb,Bb,Mb,Ic,vi,kc,Rc=f(()=>{Tr();gi();Fe();xi();Cc();qc();Nb=1,wb=2,Sb="[object Boolean]",Lb="[object Date]",Ob="[object Error]",Cb="[object Map]",_b="[object Number]",qb="[object RegExp]",Ib="[object Set]",kb="[object String]",Rb="[object Symbol]",Bb="[object ArrayBuffer]",Mb="[object DataView]",Ic=dt?dt.prototype:void 0,vi=Ic?Ic.valueOf:void 0;kc=Db});function Fb(r,t,e,s,n,i){var o=e&jb,a=kr(r),l=a.length,u=kr(t),c=u.length;if(l!=c&&!o)return!1;for(var h=l;h--;){var d=a[h];if(!(o?d in t:Ub.call(t,d)))return!1}var m=i.get(r),g=i.get(t);if(m&&g)return m==t&&g==r;var x=!0;i.set(r,t),i.set(t,r);for(var A=o;++h<l;){d=a[h];var b=r[d],E=t[d];if(s)var T=o?s(E,b,d,t,r,i):s(b,E,d,r,t,i);if(!(T===void 0?b===E||n(b,E,e,s,i):T)){x=!1;break}A||(A=d=="constructor")}if(x&&!A){var N=r.constructor,w=t.constructor;N!=w&&"constructor"in r&&"constructor"in t&&!(typeof N=="function"&&N instanceof N&&typeof w=="function"&&w instanceof w)&&(x=!1)}return i.delete(r),i.delete(t),x}var jb,Pb,Ub,Bc,Mc=f(()=>{mi();jb=1,Pb=Object.prototype,Ub=Pb.hasOwnProperty;Bc=Fb});function $b(r,t,e,s,n,i){var o=pt(r),a=pt(t),l=o?jc:jt(r),u=a?jc:jt(t);l=l==Dc?Ws:l,u=u==Dc?Ws:u;var c=l==Ws,h=u==Ws,d=l==u;if(d&&Bt(r)){if(!Bt(t))return!1;o=!0,c=!1}if(d&&!c)return i||(i=new oe),o||Ke(r)?Vs(r,t,e,s,n,i):kc(r,t,l,e,s,n,i);if(!(e&Hb)){var m=c&&Pc.call(r,"__wrapped__"),g=h&&Pc.call(t,"__wrapped__");
1if(m||g){var x=m?r.value():r,A=g?t.value():t;return i||(i=new oe),n(x,A,e,s,i)}}return d?(i||(i=new oe),Bc(r,t,e,s,n,i)):!1}var Hb,Dc,jc,Ws,zb,Pc,Uc,Fc=f(()=>{ks();xi();Rc();Mc();Rr();De();Lr();ws();Hb=1,Dc="[object Arguments]",jc="[object Array]",Ws="[object Object]",zb=Object.prototype,Pc=zb.hasOwnProperty;Uc=$b});function Hc(r,t,e,s,n){return r===t?!0:r==null||t==null||!$(r)&&!$(t)?r!==r&&t!==t:Uc(r,t,e,s,Hc,n)}var zc,$c=f(()=>{Fc();It();zc=Hc});function Kb(r){return function(t,e,s){for(var n=-1,i=Object(t),o=s(t),a=o.length;a--;){var l=o[r?a:++n];if(e(i[l],l,i)===!1)break}return t}}var Kc,Gc=f(()=>{Kc=Kb});var Gb,Vc,Wc=f(()=>{Gc();Gb=Kc(),Vc=Gb});function Vb(r,t,e){(e!==void 0&&!wt(r[t],e)||e===void 0&&!(t in r))&&Ue(r,t,e)}var Br,Ai=f(()=>{xs();Fe();Br=Vb});function Wb(r){return $(r)&&ee(r)}var Zc,Xc=f(()=>{wr();It();Zc=Wb});function Zb(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var Mr,Ei=f(()=>{Mr=Zb});function Xb(r){return St(r,Lt(r))}var Qc,Yc=f(()=>{He();Ve();Qc=Xb});function Qb(r,t,e,s,n,i,o){var a=Mr(r,e),l=Mr(t,e),u=o.get(l);if(u){Br(r,e,u);return}var c=i?i(a,l,e+"",r,t,o):void 0,h=c===void 0;if(h){var d=pt(l),m=!d&&Bt(l),g=!d&&!m&&Ke(l);c=l,d||m||g?pt(a)?c=a:Zc(a)?c=bs(a):m?(h=!1,c=Rs(l,!0)):g?(h=!1,c=zs(l,!0)):c=[]:au(l)||Sr(l)?(c=a,Sr(a)?c=Qc(a):(!K(a)||je(a))&&(c=$s(l))):h=!1}h&&(o.set(l,c),n(c,l,s,i,o),o.delete(l)),Br(r,e,c)}var Jc,tf=f(()=>{Ai();fi();bi();Yn();yi();ni();De();Xc();Lr();ps();kt();lu();ws();Ei();Yc();Jc=Qb});function ef(r,t,e,s,n){r!==t&&Vc(t,function(i,o){if(n||(n=new oe),K(i))Jc(r,t,o,e,ef,s,n);else{var a=s?s(Mr(r,o),i,o+"",r,t,n):void 0;a===void 0&&(a=i),Br(r,o,a)}},Lt)}var rf,sf=f(()=>{ks();Ai();Wc();tf();kt();Ve();Ei();rf=ef});function Yb(r,t){return zc(r,t)}var Ee,nf=f(()=>{$c();Ee=Yb});var Jb,rt,of=f(()=>{sf();il();Jb=nl(function(r,t,e){rf(r,t,e)}),rt=Jb});var ae=f(()=>{bc();nf();of();});var lr={};va(lr,{Attributor:()=>Q,AttributorStore:()=>Dr,BlockBlot:()=>Te,ClassAttributor:()=>P,ContainerBlot:()=>or,EmbedBlot:()=>k,InlineBlot:()=>Zs,LeafBlot:()=>U,ParentBlot:()=>st,Registry:()=>ce,Scope:()=>y,ScrollBlot:()=>jr,StyleAttributor:()=>nt,TextBlot:()=>ar});function af(r,t){return(r.getAttribute("class")||"").split(/\s+/).filter(e=>e.indexOf(`${t}-`)===0)}function Ti(r){let t=r.split("-"),e=t.slice(1).map(s=>s[0].toUpperCase()+s.slice(1)).join("");return t[0]+e}function lf(r,t){let e=t.find(r);if(e)return e;try{return t.create(r)}catch(s){let n=t.create(y.INLINE);return Array.from(r.childNodes).forEach(i=>{n.domNode.appendChild(i)}),r.parentNode&&r.parentNode.replaceChild(n.domNode,r),n.attach(),n}}function ny(r,t){if(Object.keys(r).length!==Object.keys(t).length)return!1;for(let e in r)if(r[e]!==t[e])return!1;return!0}var y,Q,ue,ty,ce,wi,P,Si,nt,Li,Dr,uf,cf,ff,ey,U,Oi,ry,sy,st,rr,iy,Zs,nr,oy,Te,_i,ay,or,qi,k,ly,uy,ir,cy,jr,Ii,fy,ar,S=f(()=>{y=(r=>(r[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",r))(y||{}),Q=class{constructor(t,e,s={}){this.attrName=t,this.keyName=e;let n=y.TYPE&y.ATTRIBUTE;this.scope=s.scope!=null?s.scope&y.LEVEL|n:y.ATTRIBUTE,s.whitelist!=null&&(this.whitelist=s.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){let e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}},ue=class extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}},ty=(()=>{let r=class Ni{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,s=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(s){let n=null;try{n=e.parentNode}catch(i){return null}return this.find(n,s)}return null}create(e,s,n){let i=this.query(s);if(i==null)throw new ue(`Unable to create ${s} blot`);let o=i,a=s instanceof Node||s.nodeType===Node.TEXT_NODE?s:o.create(n),l=new o(e,a,n);return Ni.blots.set(l.domNode,l),l}find(e,s=!1){return Ni.find(e,s)}query(e,s=y.ANY){let n;return typeof e=="string"?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:typeof e=="number"?e&y.LEVEL&y.BLOCK?n=this.types.block:e&y.LEVEL&y.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(n=this.classes[i],!!n)),n=n||this.tags[e.tagName]),n==null?null:"scope"in n&&s&y.LEVEL&n.scope&&s&y.TYPE&n.scope?n:null}register(...e){return e.map(s=>{let n="blotName"in s,i="attrName"in s;if(!n&&!i)throw new ue("Invalid definition");if(n&&s.blotName==="abstract")throw new ue("Cannot register abstract class");let o=n?s.blotName:i?s.attrName:void 0;return this.types[o]=s,i?typeof s.keyName=="string"&&(this.attributes[s.keyName]=s):n&&(s.className&&(this.classes[s.className]=s),s.tagName&&(Array.isArray(s.tagName)?s.tagName=s.tagName.map(a=>a.toUpperCase()):s.tagName=s.tagName.toUpperCase(),(Array.isArray(s.tagName)?s.tagName:[s.tagName]).forEac
vendor: 51,131 bytes, line 1
1h(a=>{(this.tags[a]==null||s.className==null)&&(this.tags[a]=s)}))),s})}};return r.blots=new WeakMap,r})(),ce=ty;wi=class extends Q{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){af(t,this.keyName).forEach(e=>{t.classList.remove(e)}),t.classList.length===0&&t.removeAttribute("class")}value(t){let e=(af(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}},P=wi;Si=class extends Q{static keys(t){return(t.getAttribute("style")||"").split(";").map(e=>e.split(":")[0].trim())}add(t,e){return this.canAdd(t,e)?(t.style[Ti(this.keyName)]=e,!0):!1}remove(t){t.style[Ti(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){let e=t.style[Ti(this.keyName)];return this.canAdd(t,e)?e:""}},nt=Si,Li=class{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={};let t=ce.find(this.domNode);if(t==null)return;let e=Q.keys(this.domNode),s=P.keys(this.domNode),n=nt.keys(this.domNode);e.concat(s).concat(n).forEach(i=>{let o=t.scroll.query(i,y.ATTRIBUTE);o instanceof Q&&(this.attributes[o.attrName]=o)})}copy(t){Object.keys(this.attributes).forEach(e=>{let s=this.attributes[e].value(this.domNode);t.format(e,s)})}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),{})}},Dr=Li,uf=class{constructor(t,e){this.scroll=t,this.domNode=e,ce.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new ue("Blot definition missing tagName");let e,s;return Array.isArray(this.tagName)?(typeof t=="string"?(s=t.toUpperCase(),parseInt(s,10).toString()===s&&(s=parseInt(s,10))):typeof t=="number"&&(s=t),typeof s=="number"?e=document.createElement(this.tagName[s-1]):s&&this.tagName.indexOf(s)>-1?e=document.createElement(s):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(){let t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),ce.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,s,n){let i=this.isolate(t,e);if(this.scroll.query(s,y.BLOT)!=null&&n)i.wrap(s,n);else if(this.scroll.query(s,y.ATTRIBUTE)!=null){let o=this.scroll.create(this.statics.scope);i.wrap(o),o.format(s,n)}}insertAt(t,e,s){let n=s==null?this.scroll.create("text",e):this.scroll.create(e,s),i=this.split(t);this.parent.insertBefore(n,i||void 0)}isolate(t,e){let s=this.split(t);if(s==null)throw new Error("Attempt to isolate at end");return s.split(e),s}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){let s=typeof t=="string"?this.scroll.create(t,e):t;return this.parent!=null&&(this.parent.insertBefore(s,this.next||void 0),this.remove()),s}split(t,e){return t===0?this:this.next}update(t,e){}wrap(t,e){let s=typeof t=="string"?this.scroll.create(t,e):t;if(this.parent!=null&&this.parent.insertBefore(s,this.next||void 0),typeof s.appendChild!="function")throw new ue(`Cannot wrap ${t}`);return s.appendChild(this),s}};uf.blotName="abstract";cf=uf,ff=class extends cf{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 s=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(s+=1),[this.parent.domNode,s]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};ff.scope=y.INLINE_BLOT;ey=ff,U=ey,Oi=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){let e=t.slice(1);this.append(...e)}}at(t){let e=this.iterator(),s=e();for(;s&&t>0;)t-=1,s=e();return s}contains(t){let e=this.iterator(),s=e();for(;s;){if(s===t)return!0;s=e()}return!1}indexOf(t){let e=this.iterator(),s=e(),n=0;for(;s;){if(s===t)return n;n+=1,s=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,s=this.head;for(;s!=null;){if(s===t)return e;e+=s.length(),s=s.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()=>{let e=t;return t!=null&&(t=t.next),e}}find(t,e=!1){let s=this.iterator(),n=s();for(;n;){let i=n.length();if(t<i||e&&t===i&&(n.next==null||n.next.length()!==0))return[n,t];t-=i,n=s()}return[null,0]}forEach(t){let e=this.iterator(),s=e();for(;s;)t(s),s=e()}forEachAt(t,e,s){if(e<=0)return;let[n,i]=this.find(t),o=t-i,a=this.iterator(n),l=a();for(;l&&o<t+e;){let u=l.length();t>o?s(l,t-o,Math.min(e,o+u-t)):s(l,0,Math.min(u,t+e-o)),o+=u,l=a()}}map(t){return this.reduce((e,s)=>(e.push(t(s)),e),[])}reduce(t,e){let s=this.iterator(),n=s();for(;n;)e=t(e,n),n=s();return e}};ry=(()=>{let r=class le extends cf{constructor(e,s){super(e,s),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,le.uiClass&&this.uiNode.classList.add(le.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Oi,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{let s=lf(e,this.scroll);this.insertBefore(s,this.children.head||void 0)}catch(s){if(s instanceof ue)return;throw s}})}deleteAt(e,s){if(e===0&&s===this.length())return this.remove();this.children.forEachAt(e,s,(n,i,o)=>{n.deleteAt(i,o)})}descendant(e,s=0){let[n,i]=this.children.find(s);return e.blotName==null&&e(n)||e.blotName!=null&&n instanceof e?[n,i]:n instanceof le?n.descendant(e,i):[null,-1]}descendants(e,s=0,n=Number.MAX_VALUE){let i=[],o=n;return this.children.forEachAt(s,n,(a,l,u)=>{(e.blotName==null&&e(a)||e.blotName!=null&&a instanceof e)&&i.push(a),a instanceof le&&(i=i.concat(a.descendants(e,l,o))),o-=u}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(s=>{e||this.statics.allowedChildren.some(n=>s instanceof n)||(s.statics.scope===y.BLOCK_BLOT?(s.next!=null&&this.splitAfter(s),s.prev!=null&&this.splitAfter(s.prev),s.parent.unwrap(),e=!0):s instanceof le?s.unwrap():s.remove())})}formatAt(e,s,n,i){this.children.forEachAt(e,s,(o,a,l)=>{o.formatAt(a,l,n,i)})}insertAt(e,s,n){let[i,o]=this.children.find(e);if(i)i.insertAt(o,s,n);else{let a=n==null?this.scroll.create("text",s):this.scroll.create(s,n);this.appendChild(a)}}insertBefore(e,s){e.parent!=null&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,s||null),e.parent=this,s!=null&&(n=s.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce((e,s)=>e+s.length(),0)}moveChildren(e,s){this.children.forEach(n=>{e.insertBefore(n,s)})}optimize(e){if(super.optimize(e),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){let s=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(s)}else this.remove()}path(e,s=!1){let[n,i]=this.children.find(e,s),o=[[this,e]];return n instanceof le?o.concat(n.path(i,s)):(n!=null&&o.push([n,i]),o)}removeChild(e){this.children.remove(e)}replaceWith(e,s){let n=typeof e=="string"?this.scroll.create(e,s):e;return n instanceof le&&this.moveChildren(n),super.replaceWith(n)}split(e,s=!1){if(!s){if(e===0)return this;if(e===this.length())return this.next}let n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),(i,o,a)=>{let l=i.split(o,s);l!=null&&n.appendChild(l)}),n}splitAfter(e){let s=this.clone();for(;e.next!=null;)s.appendChild(e.next);return this.parent&&this.parent.insertBefore(s,this.next||void 0),s}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,s){let n=[],i=[];e.forEach(o=>{o.target===this.domNode&&o.type==="childList"&&(n.push(...o.addedNodes),i.push(...o.removedNodes))}),i.forEach(o=>{if(o.parentNode!=null&&o.tagName!=="IFRAME"&&document.body.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let a=this.scroll.find(o);a!=null&&(a.domNode.parentNode==null||a.domNode.parentNode===this.domNode)&&a.detach()}),n.filter(o=>o.parentNode===this.domNode&&o!==this.uiNode).sort((o,a)=>o===a?0:o.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(o=>{let a=null;o.nextSibling!=null&&(a=this.scroll.find(o.nextSibling));let l=lf(o,this.scroll);(l.next!==a||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,a||void 0))}),this.enforceAllowedChildren()}};return r.uiClass="",r})(),sy=ry,st=sy;rr=class sr extends st{static create(t){return super.create(t)}static formats(t,e){let s=e.query(sr.blotName);if(!(s!=null&&t.tagName===s.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 Dr(this.domNode)}format(t,e){if(t===this.statics.blotName&&!e)this.children.forEach(s=>{s instanceof sr||(s=s.wrap(sr.blotName,!0)),this.attributes.copy(s)}),this.unwrap();else{let s=this.scroll.query(t,y.INLINE);if(s==null)return;s instanceof Q?this.attributes.attribute(s,e):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e)}}formats(){let t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,s,n){this.formats()[s]!=null||this.scroll.query(s,y.ATTRIBUTE)?this.isolate(t,e).format(s,n):super.formatAt(t,e,s,n)}optimize(t){super.optimize(t);let e=this.formats();if(Object.keys(e).length===0)return this.unwrap();let s=this.next;s instanceof sr&&s.prev===this&&ny(e,s.formats())&&(s.moveChildren(this),s.remove())}replaceWith(t,e){let s=super.replaceWith(t,e);return this.attributes.copy(s),s}update(t,e){super.update(t,e),t.some(s=>s.target===this.domNode&&s.type==="attributes")&&this.attributes.build()}wrap(t,e){let s=super.wrap(t,e);return s instanceof sr&&this.attributes.move(s),s}};rr.allowedChildren=[rr,U],rr.blotName="inline",rr.scope=y.INLINE_BLOT,rr.tagName="SPAN";iy=rr,Zs=iy,nr=class Ci extends st{static create(t){return super.create(t)}static formats(t,e){let s=e.query(Ci.blotName);if(!(s!=null&&t.tagName===s.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 Dr(this.domNode)}format(t,e){let s=this.scroll.query(t,y.BLOCK);s!=null&&(s instanceof Q?this.attributes.attribute(s,e):t===this.statics.blotName&&!e?this.replaceWith(Ci.blotName):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e))}formats(){let t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,s,n){this.scroll.query(s,y.BLOCK)!=null?this.format(s,n):super.formatAt(t,e,s,n)}insertAt(t,e,s){if(s==null||this.scroll.query(e,y.INLINE)!=null)super.insertAt(t,e,s);else{let n=this.split(t);if(n!=null){let i=this.scroll.create(e,s);n.parent.insertBefore(i,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,e){let s=super.replaceWith(t,e);return this.attributes.copy(s),s}update(t,e){super.update(t,e),t.some(s=>s.target===this.domNode&&s.type==="attributes")&&this.attributes.build()}};nr.blotName="block",nr.scope=y.BLOCK_BLOT,nr.tagName="P",nr.allowedChildren=[Zs,nr,U];oy=nr,Te=oy,_i=class extends st{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,s,n){super.formatAt(t,e,s,n),this.enforceAllowedChildren()}insertAt(t,e,s){super.insertAt(t,e,s),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};_i.blotName="container",_i.scope=y.BLOCK_BLOT;ay=_i,or=ay,qi=class extends U{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,s,n){t===0&&e===this.length()?this.format(s,n):super.formatAt(t,e,s,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},k=qi,ly={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},uy=100,ir=class extends st{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(s=>{this.update(s)}),this.observer.observe(this.domNode,ly),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){let s=this.registry.find(t,e);return s?s.scroll===this?s:e?this.find(s.scroll.domNode.parentNode,!0):null:null}query(t,e=y.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(s=>{s.remove()}):super.deleteAt(t,e)}formatAt(t,e,s,n){this.update(),super.formatAt(t,e,s,n)}insertAt(t,e,s){this.update(),super.insertAt(t,e,s)}optimize(t=[],e={}){super.optimize(e);let s=e.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)t.push(n.pop());let i=(l,u=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(s.has(l.domNode)||s.set(l.domNode,[]),u&&i(l.parent))},o=l=>{s.has(l.domNode)&&(l instanceof st&&l.children.forEach(o),s.delete(l.domNode),l.optimize(e))},a=t;for(let l=0;a.length>0;l+=1){if(l>=uy)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(u=>{let c=this.find(u.target,!0);c!=null&&(c.domNode===u.target&&(u.type==="childList"?(i(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(h=>{let d=this.find(h,!1);i(d,!1),d instanceof st&&d.children.forEach(m=>{i(m,!1)})})):u.type==="attributes"&&i(c.prev)),i(c))}),this.children.forEach(o),a=Array.from(this.observer.takeRecords()),n=a.slice();n.length>0;)t.push(n.pop())}}update(t,e={}){t=t||this.observer.takeRecords();let s=new WeakMap;t.map(n=>{let i=this.find(n.target,!0);return i==null?null:s.has(i.domNode)?(s.get(i.domNode).push(n),null):(s.set(i.domNode,[n]),i)}).forEach(n=>{n!=null&&n!==this&&s.has(n.domNode)&&n.update(s.get(n.domNode)||[],e)}),e.mutationsMap=s,s.has(this.domNode)&&super.update(s.get(this.domNode),e),this.optimize(t,e)}};ir.blotName="scroll",ir.defaultChild=Te,ir.allowedChildren=[Te,or],ir.scope=y.BLOCK_BLOT,ir.tagName="DIV";cy=ir,jr=cy,Ii=class hf extends U{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,s){s==null?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,s)}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 hf&&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}let s=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(s,this.next||void 0),this.text=this.statics.value(this.domNode),s}update(t,e){t.some(s=>s.type==="characterData"&&s.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Ii.blotName="text",Ii.scope=y.INLINE_BLOT;fy=Ii,ar=fy});var Tf=Jt((pC,Ef)=>{var ct=-1,Y=1,F=0;function Pr(r,t,e,s,n){if(r===t)return r?[[F,r]]:[];if(e!=null){var i=vy(r,t,e);if(i)return i}var o=Ri(r,t),a=r.substring(0,o);r=r.substring(o),t=t.substring(o),o=Xs(r,t);var l=r.substring(r.length-o);r=r.substring(0,r.length-o),t=t.substring(0,t.length-o);var u=hy(r,t);return a&&u.unshift([F,a]),l&&u.push([F,l]),Bi(u,n),s&&my(u),u}function hy(r,t){var e;if(!r)return[[Y,t]];if(!t)return[[ct,r]];var s=r.length>t.length?r:t,n=r.length>t.length?t:r,i=s.indexOf(n);if(i!==-1)return e=[[Y,s.substring(0,i)],[F,n],[Y,s.substring(i+n.length)]],r.length>t.length&&(e[0][0]=e[2][0]=ct),e;if(n.length===1)return[[ct,r],[Y,t]];var o=py(r,t);if(o){var a=o[0],l=o[1],u=o[2],c=o[3],h=o[4],d=Pr(a,u),m=Pr(l,c);return d.concat([[F,h]],m)}return dy(r,t)}function dy(r,t){for(var e=r.length,s=t.length,n=Math.ceil((e+s)/2),i=n,o=2*n,a=new Array(o),l=new Array(o),u=0;u<o;u++)a[u]=-1,l[u]=-1;a[i+1]=0,l[i+1]=0;for(var c=e-s,h=c%2!==0,d=0,m=0,g=0,x=0,A=0;A<n;A++){for(var b=-A+d;b<=A-m;b+=2){var E=i+b,T;b===-A||b!==A&&a[E-1]<a[E+1]?T=a[E+1]:T=a[E-1]+1;for(var N=T-b;T<e&&N<s&&r.charAt(T)===t.charAt(N);)T++,N++;if(a[E]=T,T>e)m+=2;else if(N>s)d+=2;else if(h){var w=i+c-b;if(w>=0&&w<o&&l[w]!==-1){var I=e-l[w];if(T>=I)return df(r,t,T,N)}}}for(var tt=-A+g;tt<=A-x;tt+=2){var w=i+tt,I;tt===-A||tt!==A&&l[w-1]<l[w+1]?I=l[w+1]:I=l[w-1]+1;for(var At=I-tt;I<e&&At<s&&r.charAt(e-I-1)===t.charAt(s-At-1);)I++,At++;if(l[w]=I,I>e)x+=2;else if(At>s)g+=2;else if(!h){var E=i+c-tt;if(E>=0&&E<o&&a[E]!==-1){var T=a[E],N=i+T-E;if(I=e-I,T>=I)return df(r,t,T,N)}}}}return[[ct,r],[Y,t]]}function df(r,t,e,s){var n=r.substring(0,e),i=t.substring(0,s),o=r.substring(e),a=t.substring(s),l=Pr(n,i),u=Pr(o,a);return l.concat(u)}function Ri(r,t){if(!r||!t||r.charAt(0)!==t.charAt(0))return 0;for(var e=0,s=Math.min(r.length,t.length),n=s,i=0;e<n;)r.substring(i,n)==t.substring(i,n)?(e=n,i=e):s=n,n=Math.floor((s-e)/2+e);return yf(r.charCodeAt(n-1))&&n--,n}function pf(r,t){var e=r.length,s=t.length;if(e==0||s==0)return 0;e>s?r=r.substring(e-s):e<s&&(t=t.substring(0,e));var n=Math.min(e,s);if(r==t)return n;for(var i=0,o=1;;){var a=r.substring(n-o),l=t.indexOf(a);if(l==-1)return i;o+=l,(l==0||r.substring(n-o)==t.substring(0,o))&&(i=o,o++)}}function Xs(r,t){if(!r||!t||r.slice(-1)!==t.slice(-1))return 0;for(var e=0,s=Math.min(r.length,t.length),n=s,i=0;e<n;)r.substring(r.length-n,r.length-i)==t.substring(t.length-n,t.length-i)?(e=n,i=e):s=n,n=Math.floor((s-e)/2+e);return xf(r.charCodeAt(r.length-n))&&n--,n}function py(r,t){var e=r.length>t.length?r:t,s=r.length>t.length?t:r;if(e.length<4||s.length*2<e.length)return null;function n(m,g,x){for(var A=m.substring(x,x+Math.floor(m.length/4)),b=-1,E="",T,N,w,I;(b=g.indexOf(A,b+1))!==-1;){var tt=Ri(m.substring(x),g.substring(b)),At=Xs(m.substring(0,x),g.substring(0,b));E.length<At+tt&&(E=g.substring(b-At,b)+g.substring(b,b+tt),T=m.substring(0,x-At),N=m.substring(x+tt),w=g.substring(0,b-At),I=g.substring(b+tt))}return E.length*2>=m.length?[T,N,w,I,E]:null}var i=n(e,s,Math.ceil(e.length/4)),o=n(e,s,Math.ceil(e.length/2)),a;if(!i&&!o)return null;o?i?a=i[4].length>o[4].length?i:o:a=o:a=i;var l,u,c,h;r.length>t.length?(l=a[0],u=a[1],c=a[2],h=a[3]):(c=a[0],h=a[1],l=a[2],u=a[3]);var d=a[4];return[l,u,c,h,d]}function my(r){for(var t=!1,e=[],s=0,n=null,i=0,o=0,a=0,l=0,u=0;i<r.length;)r[i][0]==F?(e[s++]=i,o=l,a=u,l=0,u=0,n=r[i][1]):(r[i][0]==Y?l+=r[i][1].length:u+=r[i][1].length,n&&n.length<=Math.max(o,a)&&n.length<=Math.max(l,u)&&(r.splice(e[s-1],0,[ct,n]),r[e[s-1]+1][0]=Y,s--,s--,i=s>0?e[s-1]:-1,o=0,a=0,l=0,u=0,n=null,t=!0)),i++;for(t&&Bi(r),yy(r),i=1;i<r.length;){if(r[i-1][0]==ct&&r[i][0]==Y){var c=r[i-1][1],h=r[i][1],d=pf(c,h),m=pf(h,c);d>=m?(d>=c.length/2||d>=h.length/2)&&(r.splice(i,0,[F,h.substring(0,d)]),r[i-1][1]=c.substring(0,c.length-d),r[i+1][1]=h.substring(d),i++):(m>=c.length/2||m>=h.length/2)&&(r.splice(i,0,[F,c.substring(0,m)]),r[i-1][0]=Y,r[i-1][1]=h.substring(0,h.length-m),r[i+1][0]=ct,r[i+1][1]=c.substring(m),i++),i++}i++}}var mf=/[^a-zA-Z0-9]/,gf=/\s/,bf=/[\r\n]/,gy=/\n\r?\n$/,by=/^\r?\n\r?\n/;function yy(r){function t(m,g){if(!m||!g)return 6;var x=m.charAt(m.length-1),A=g.charAt(0),b=x.match(mf),E=A.match(mf),T=b&&x.match(gf),N=E&&A.match(gf),w=T&&x.match(bf),I=N&&A.match(bf),tt=w&&m.match(gy),At=I&&g.match(by);return tt||At?5:w||I?4:b&&!T&&N?3:T||N?2:b||E?1:0}for(var e=1;e<r.length-1;){if(r[e-1][0]==F&&r[e+1][0]==F){var s=r[e-1][1],n=r[e][1],i=r[e+1][1],o=Xs(s,n);if(o){var a=n.substring(n.length-o);s=s.substring(0,s.length-o),n=a+n.substring(0,n.length-o),i=a+i}for(var l=s,u=n,c=i,h=t(s,n)+t(n,i);n.charAt(0)===i.charAt(0);){s+=n.charAt(0),n=n.substring(1)+i.charAt(0),i=i.substring(1);var d=t(s,n)+t(n,i);d>=h&&(h=d,l=s,u=n,c=i)}r[e-1][1]!=l&&(l?r[e-1][1]=l:(r.splice(e-1,1),e--),r[e][1]=u,c?r[e+1][1]=c:(r.splice(e+1,1),e--))}e++}}function Bi(r,t){r.push([F,""]);for(var e=0,s=0,n=0,i="",o="",a;e<r.length;){if(e<r.length-1&&!r[e][1]){r.splice(e,1);continue}switch(r[e][0]){case Y:n++,o+=r[e][1],e++;break;case ct:s++,i+=r[e][1],e++;break;case F:var l=e-n-s-1;if(t){if(l>=0&&Af(r[l][1])){var u=r[l][1].slice(-1);if(r[l][1]=r[l][1].slice(0,-1),i=u+i,o=u+o,!r[l][1]){r.splice(l,1),e--;var c=l-1;r[c]&&r[c][0]===Y&&(n++,o=r[c][1]+o,c--),r[c]&&r[c][0]===ct&&(s++,i=r[c][1]+i,c--),l=c}}if(vf(r[e][1])){var u=r[e][1].charAt(0);r[e][1]=r[e][1].slice(1),i+=u,o+=u}}if(e<r.length-1&&!r[e][1]){r.splice(e,1);break}if(i.length>0||o.length>0){i.length>0&&o.length>0&&(a=Ri(o,i),a!==0&&(l>=0?r[l][1]+=o.substring(0,a):(r.splice(0,0,[F,o.substring(0,a)]),e++),o=o.substring(a),i=i.substring(a)),a=Xs(o,i),a!==0&&(r[e][1]=o.substring(o.length-a)+r[e][1],o=o.substring(0,o.length-a),i=i.substring(0,i.length-a)));var h=n+s;i.length===0&&o.length===0?(r.splice(e-h,h),e=e-h):i.length===0?(r.splice(e-h,h,[Y,o]),e=e-h+1):o.length===0?(r.splice(e-h,h,[ct,i]),e=e-h+1):(r.splice(e-h,h,[ct,i],[Y,o]),e=e-h+2)}e!==0&&r[e-1][0]===F?(r[e-1][1]+=r[e][1],r.splice(e,1)):e++,n=0,s=0,i="",o="";break}}r[r.length-1][1]===""&&r.pop();var d=!1;for(e=1;e<r.length-1;)r[e-1][0]===F&&r[e+1][0]===F&&(r[e][1].substring(r[e][1].length-r[e-1][1].length)===r[e-1][1]?(r[e][1]=r[e-1][1]+r[e][1].substring(0,r[e][1].length-r[e-1][1].length),r[e+1][1]=r[e-1][1]+r[e+1][1],r.splice(e-1,1),d=!0):r[e][1].substring(0,r[e+1][1].length)==r[e+1][1]&&(r[e-1][1]+=r[e+1][1],r[e][1]=r[e][1].substring(r[e+1][1].length)+r[e+1][1],r.splice(e+1,1),d=!0)),e++;d&&Bi(r,t)}function yf(r){return r>=55296&&r<=56319}function xf(r){return r>=56320&&r<=57343}function vf(r){return xf(r.charCodeAt(0))}function Af(r){return yf(r.charCodeAt(r.length-1))}function xy(r){for(var t=[],e=0;e<r.length;e++)r[e][1].length>0&&t.push(r[e]);return t}function ki(r,t,e,s){return Af(r)||vf(s)?null:xy([[F,r],[ct,t],[Y,e],[F,s]])}function vy(r,t,e){var s=typeof e=="number"?{index:e,length:0}:e.oldRange,n=typeof e=="number"?null:e.newRange,i=r.length,o=t.length;if(s.length===0&&(n===null||n.length===0)){var a=s.index,l=r.slice(0,a),u=r.slice(a),c=n?n.index:null;t:{var h=a+o-i;if(c!==null&&c!==h||h<0||h>o)break t;var d=t.slice(0,h),m=t.slice(h);if(m!==u)break t;var g=Math.min(a,h),x=l.slice(0,g),A=d.slice(0,g);if(x!==A)break t;var b=l.slice(g),E=d.slice(g);return ki(x,b,E,u)}t:{if(c!==null&&c!==a)break t;var T=a,d=t.slice(0,T),m=t.slice(T);if(d!==l)break t;var N=Math.min(i-T,o-T),w=u.slice(u.length-N),I=m.slice(m.length-N);if(w!==I)break t;var b=u.slice(0,u.length-N),E=m.slice(0,m.length-N);return ki(l,b,E,w)}}if(s.length>0&&n&&n.length===0)t:{var x=r.slice(0,s.index),w=r.slice(s.index+s.length),g=x.length,N=w.length;if(o<g+N)break t;var A=t.slice(0,g),I=t.slice(o-N);if(x!==A||w!==I)break t;var b=r.slice(g,i-N),E=t.slice(g,o-N);return ki(x,b,E,w)}return null}function Qs(r,t,e,s){return Pr(r,t,e,s,!0)}Qs.INSERT=Y;Qs.DELETE=ct;Qs.EQUAL=F;Ef.exports=Qs});var Xi=Jt((Ur,ur)=>{var Ay=200,Bf="__lodash_hash_undefined__",Mf=9007199254740991,zi="[object Arguments]",Ey="[object Array]",Df="[object Boolean]",jf="[object Date]",Ty="[object Error]",$i="[object Function]",Pf="[object GeneratorFunction]",Ys="[object Map]",Uf="[object Number]",Ki="[object Object]",Nf="[object Promise]",Ff="[object RegExp]",Js="[object Set]",Hf="[object String]",zf="[object Symbol]",Di="[object WeakMap]",$f="[object ArrayBuffer]",tn="[object DataView]",Kf="[object Float32Array]",Gf="[object Float64Array]",Vf="[object Int8Array]",Wf="[object Int16Array]",Zf="[object Int32Array]",Xf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Yf="[object Uint16Array]",Jf="[object Uint32Array]",Ny=/[\\^$.*+?()[\]{}|]/g,wy=/\w*$/,Sy=/^\[object .+?Constructor\]$/,Ly=/^(?:0|[1-9]\d*)$/,O={};O[zi]=O[Ey]=O[$f]=O[tn]=O[Df]=O[jf]=O[Kf]=O[Gf]=O[Vf]=O[Wf]=O[Zf]=O[Ys]=O[Uf]=O[Ki]=O[Ff]=O[Js]=O[Hf]=O[zf]=O[Xf]=O[Qf]=O[Yf]=O[Jf]=!0;O[Ty]=O[$i]=O[Di]=!1;var Oy=typeof global=="object"&&global&&global.Object===Object&&global,Cy=typeof self=="object"&&self&&self.Object===Object&&self,Pt=Oy||Cy||Function("return this")(),th=typeof Ur=="object"&&Ur&&!Ur.nodeType&&Ur,wf=th&&typeof ur=="object"&&ur&&!ur.nodeType&&ur,_y=wf&&wf.exports===th;function qy(r,t){return r.set(t[0],t[1]),r}function Iy(r,t){return r.add(t),r}function ky(r,t){for(var e=-1,s=r?r.length:0;++e<s&&t(r[e],e,r)!==!1;);return r}function Ry(r,t){for(var e=-1,s=t.length,n=r.length;++e<s;)r[n+e]=t[e];return r}function eh(r,t,e,s){var n=-1,i=r?r.length:0;for(s&&i&&(e=r[++n]);++n<i;)e=t(e,r[n],n,r);return e}function By(r,t){for(var e=-1,s=Array(r);++e<r;)s[e]=t(e);return s}function My(r,t){return r?.[t]}function rh(r){var t=!1;if(r!=null&&typeof r.toString!="function")try{t=!!(r+"")}catch(e){}return t}function Sf(r){var t=-1,e=Array(r.size);return r.forEach(function(s,n){e[++t]=[n,s]}),e}function Gi(r,t){return function(e){return r(t(e))}}function Lf(r){var t=-1,e=Array(r.size);return r.forEach(function(s){e[++t]=s}),e}var Dy=Array.prototype,jy=Function.prototype,en=Object.prototype,Mi=Pt["__core-js_shared__"],Of=(function(){var r=/[^.]+$/.exec(Mi&&Mi.keys&&Mi.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),sh=jy.toString,fe=en.hasOwnProperty,rn=en.toString,Py=RegExp("^"+sh.call(fe).replace(Ny,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Cf=_y?Pt.Buffer:void 0,_f=Pt.Symbol,qf=Pt.Uint8Array,Uy=Gi(Object.getPrototypeOf,Object),Fy=Object.create,Hy=en.propertyIsEnumerable,zy=Dy.splice,If=Object.getOwnPropertySymbols,$y=Cf?Cf.isBuffer:void 0,Ky=Gi(Object.keys,Object),ji=hr(Pt,"DataView"),Fr=hr(Pt,"Map"),Pi=hr(Pt,"Promise"),Ui=hr(Pt,"Set"),Fi=hr(Pt,"WeakMap"),Hr=hr(Object,"create"),Gy=Se(ji),Vy=Se(Fr),Wy=Se(Pi),Zy=Se(Ui),Xy=Se(Fi),kf=_f?_f.prototype:void 0,Rf=kf?kf.valueOf:void 0;function we(r){var t=-1,e=r?r.length:0;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function Qy(){this.__data__=Hr?Hr(null):{}}function Yy(r){return this.has(r)&&delete this.__data__[r]}function Jy(r){var t=this.__data__;if(Hr){var e=t[r];return e===Bf?void 0:e}return fe.call(t,r)?t[r]:void 0}function tx(r){var t=this.__data__;return Hr?t[r]!==void 0:fe.call(t,r)}function ex(r,t){var e=this.__data__;return e[r]=Hr&&t===void 0?Bf:t,this}we.prototype.clear=Qy;we.prototype.delete=Yy;we.prototype.get=Jy;we.prototype.has=tx;we.prototype.set=ex;function Ut(r){var t=-1,e=r?r.length:0;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function rx(){this.__data__=[]}function sx(r){var t=this.__data__,e=sn(t,r);if(e<0)return!1;var s=t.length-1;return e==s?t.pop():zy.call(t,e,1),!0}function nx(r){var t=this.__data__,e=sn(t,r);return e<0?void 0:t[e][1]}function ix(r){return sn(this.__data__,r)>-1}function ox(r,t){var e=this.__data__,s=sn(e,r);return s<0?e.push([r,t]):e[s][1]=t,this}Ut.prototype.clear=rx;Ut.prototype.delete=sx;Ut.prototype.get=nx;Ut.prototype.has=ix;Ut.prototype.set=ox;function cr(r){var t=-1,e=r?r.length:0;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function ax(){this.__data__={hash:new we,map:new(Fr||Ut),string:new we}}function lx(r){return nn(this,r).delete(r)}function ux(r){return nn(this,r).get(r)}function cx(r){return nn(this,r).has(r)}function fx(r,t){return nn(this,r).set(r,t),this}cr.prototype.clear=ax;cr.prototype.delete=lx;cr.prototype.get=ux;cr.prototype.has=cx;cr.prototype.set=fx;function fr(r){this.__data__=new Ut(r)}function hx(){this.__data__=new Ut}function dx(r){return this.__data__.delete(r)}function px(r){return this.__data__.get(r)}function mx(r){return this.__data__.has(r)}function gx(r,t){var e=this.__data__;if(e instanceof Ut){var s=e.__data__;if(!Fr||s.length<Ay-1)return s.push([r,t]),this;e=this.__data__=new cr(s)}return e.set(r,t),this}fr.prototype.clear=hx;fr.prototype.delete=dx;fr.prototype.get=px;fr.prototype.has=mx;fr.prototype.set=gx;function bx(r,t){var e=Wi(r)||Fx(r)?By(r.length,String):[],s=e.length,n=!!s;for(var i in r)(t||fe.call(r,i))&&!(n&&(i=="length"||Dx(i,s)))&&e.push(i);return e}function nh(r,t,e){var s=r[t];(!(fe.call(r,t)&&lh(s,e))||e===void 0&&!(t in r))&&(r[t]=e)}function sn(r,t){for(var e=r.length;e--;)if(lh(r[e][0],t))return e;return-1}function yx(r,t){return r&&ih(t,Zi(t),r)}function Hi(r,t,e,s,n,i,o){var a;if(s&&(a=i?s(r,n,i,o):s(r)),a!==void 0)return a;if(!on(r))return r;var l=Wi(r);if(l){if(a=Rx(r),!t)return qx(r,a)}else{var u=Ne(r),c=u==$i||u==Pf;if(zx(r))return Nx(r,t);if(u==Ki||u==zi||c&&!i){if(rh(r))return i?r:{};if(a=Bx(c?{}:r),!t)return Ix(r,yx(a,r))}else{if(!O[u])return i?r:{};a=Mx(r,u,Hi,t)}}o||(o=new fr);var h=o.get(r);if(h)return h;if(o.set(r,a),!l)var d=e?kx(r):Zi(r);return ky(d||r,function(m,g){d&&(g=m,m=r[g]),nh(a,g,Hi(m,t,e,s,g,r,o))}),a}function xx(r){return on(r)?Fy(r):{}}function vx(r,t,e){var s=t(r);return Wi(r)?s:Ry(s,e(r))}function Ax(r){return rn.call(r)}function Ex(r){if(!on(r)||Px(r))return!1;var t=ch(r)||rh(r)?Py:Sy;return t.test(Se(r))}function Tx(r){if(!ah(r))return Ky(r);var t=[];for(var e in Object(r))fe.call(r,e)&&e!="constructor"&&t.push(e);return t}function Nx(r,t){if(t)return r.slice();var e=new r.constructor(r.length);return r.copy(e),e}function Vi(r){var t=new r.constructor(r.byteLength);return new qf(t).set(new qf(r)),t}function wx(r,t){var e=t?Vi(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.byteLength)}function Sx(r,t,e){var s=t?e(Sf(r),!0):Sf(r);return eh(s,qy,new r.constructor)}function Lx(r){var t=new r.constructor(r.source,wy.exec(r));return t.lastIndex=r.lastIndex,t}function Ox(r,t,e){var s=t?e(Lf(r),!0):Lf(r);return eh(s,Iy,new r.constructor)}function Cx(r){return Rf?Object(Rf.call(r)):{}}function _x(r,t){var e=t?Vi(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}function qx(r,t){var e=-1,s=r.length;for(t||(t=Array(s));++e<s;)t[e]=r[e];return t}function ih(r,t,e,s){e||(e={});for(var n=-1,i=t.length;++n<i;){var o=t[n],a=s?s(e[o],r[o],o,e,r):void 0;nh(e,o,a===void 0?r[o]:a)}return e}function Ix(r,t){return ih(r,oh(r),t)}function kx(r){return vx(r,Zi,oh)}function nn(r,t){var e=r.__data__;return jx(t)?e[typeof t=="string"?"string":"hash"]:e.map}function hr(r,t){var e=My(r,t);return Ex(e)?e:void 0}var oh=If?Gi(If,Object):Gx,Ne=Ax;(ji&&Ne(new ji(new ArrayBuffer(1)))!=tn||Fr&&Ne(new Fr)!=Ys||Pi&&Ne(Pi.resolve())!=Nf||Ui&&Ne(new Ui)!=Js||Fi&&Ne(new Fi)!=Di)&&(Ne=function(r){var t=rn.call(r),e=t==Ki?r.constructor:void 0,s=e?Se(e):void 0;if(s)switch(s){case Gy:return tn;case Vy:return Ys;case Wy:return Nf;case Zy:return Js;case Xy:return Di}return t});function Rx(r){var t=r.length,e=r.constructor(t);return t&&typeof r[0]=="string"&&fe.call(r,"index")&&(e.index=r.index,e.input=r.input),e}function Bx(r){return typeof r.constructor=="function"&&!ah(r)?xx(Uy(r)):{}}function Mx(r,t,e,s){var n=r.constructor;switch(t){case $f:return Vi(r);case Df:case jf:return new n(+r);case tn:return wx(r,s);case Kf:case Gf:case Vf:case Wf:case Zf:case Xf:case Qf:case Yf:case Jf:return _x(r,s);case Ys:return Sx(r,s,e);case Uf:case Hf:return new n(r);case Ff:return Lx(r);case Js:return Ox(r,s,e);case zf:return Cx(r)}}function Dx(r,t){return t=t??Mf,!!t&&(typeof r=="number"||Ly.test(r))&&r>-1&&r%1==0&&r<t}function jx(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}function Px(r){return!!Of&&Of in r}function ah(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||en;return r===e}function Se(r){if(r!=null){try{return sh.call(r)}catch(t){}try{return r+""}catch(t){}}return""}function Ux(r){return Hi(r,!0,!0)}function lh(r,t){return r===t||r!==r&&t!==t}function Fx(r){return Hx(r)&&fe.call(r,"callee")&&(!Hy.call(r,"callee")||rn.call(r)==zi)}var Wi=Array.isArray;function uh(r){return r!=null&&$x(r.length)&&!ch(r)}function Hx(r){return Kx(r)&&uh(r)}var zx=$y||Vx;function ch(r){var t=on(r)?rn.call(r):"";return t==$i||t==Pf}function $x(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Mf}function on(r){var t=typeof r;return!!r&&(t=="object"||t=="function")}function Kx(r){return!!r&&typeof r=="object"}function Zi(r){return uh(r)?bx(r):Tx(r)}function Gx(){return[]}function Vx(){return!1}ur.exports=Ux});var lo=Jt((zr,pr)=>{var Wx=200,ao="__lodash_hash_undefined__",pn=1,Eh=2,Th=9007199254740991,an="[object Arguments]",to="[object Array]",Zx="[object AsyncFunction]",Nh="[object Boolean]",wh="[object Date]",Sh="[object Error]",Lh="[object Function]",Xx="[object GeneratorFunction]",ln="[object Map]",Oh="[object Number]",Qx="[object Null]",dr="[object Object]",fh="[object Promise]",Yx="[object Proxy]",Ch="[object RegExp]",un="[object Set]",_h="[object String]",Jx="[object Symbol]",tv="[object Undefined]",eo="[object WeakMap]",qh="[object ArrayBuffer]",cn="[object DataView]",ev="[object Float32Array]",rv="[object Float64Array]",sv="[object Int8Array]",nv="[object Int16Array]",iv="[object Int32Array]",ov="[object Uint8Array]",av="[object Uint8ClampedArray]",lv="[object Uint16Array]",uv="[object Uint32Array]",cv=/[\\^$.*+?()[\]{}|]/g,fv=/^\[object .+?Constructor\]$/,hv=/^(?:0|[1-9]\d*)$/,q={};q[ev]=q[rv]=q[sv]=q[nv]=q[iv]=q[ov]=q[av]=q[lv]=q[uv]=!0;q[an]=q[to]=q[qh]=q[Nh]=q[cn]=q[wh]=q[Sh]=q[Lh]=q[ln]=q[Oh]=q[dr]=q[Ch]=q[un]=q[_h]=q[eo]=!1;var Ih=typeof global=="object"&&global&&global.Object===Object&&global,dv=typeof self=="object"&&self&&self.Object===Object&&self,Ft=Ih||dv||Function("return this")(),kh=typeof zr=="object"&&zr&&!zr.nodeType&&zr,hh=kh&&typeof pr=="object"&&pr&&!pr.nodeType&&pr,Rh=hh&&hh.exports===kh,Qi=Rh&&Ih.process,dh=(function(){try{return Qi&&Qi.binding&&Qi.binding("util")}catch(r){}})(),ph=dh&&dh.isTypedArray;function pv(r,t){for(var e=-1,s=r==null?0:r.length,n=0,i=[];++e<s;){var o=r[e];t(o,e,r)&&(i[n++]=o)}return i}function mv(r,t){for(var e=-1,s=t.length,n=r.length;++e<s;)r[n+e]=t[e];return r}function gv(r,t){for(var e=-1,s=r==null?0:r.length;++e<s;)if(t(r[e],e,r))return!0;return!1}function bv(r,t){for(var e=-1,s=Array(r);++e<r;)s[e]=t(e);return s}function yv(r){return function(t){return r(t)}}function xv(r,t){return r.has(t)}function vv(r,t){return r?.[t]}function Av(r){var t=-1,e=Array(r.size);return r.forEach(function(s,n){e[++t]=[n,s]}),e}function Ev(r,t){return function(e){return r(t(e))}}function Tv(r){var t=-1,e=Array(r.size);return r.forEach(function(s){e[++t]=s}),e}var Nv=Array.prototype,wv=Function.prototype,mn=Object.prototype,Yi=Ft["__core-js_shared__"],Bh=wv.toString,Ct=mn.hasOwnProperty,mh=(function(){var r=/[^.]+$/.exec(Yi&&Yi.keys&&Yi.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),Mh=mn.toString,Sv=RegExp("^"+Bh.call(Ct).replace(cv,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gh=Rh?Ft.Buffer:void 0,fn=Ft.Symbol,bh=Ft.Uint8Array,Dh=mn.propertyIsEnumerable,Lv=Nv.splice,Le=fn?fn.toStringTag:void 0,yh=Object.getOwnPropertySymbols,Ov=gh?gh.isBuffer:void 0,Cv=Ev(Object.keys,Object),ro=mr(Ft,"DataView"),$r=mr(Ft,"Map"),so=mr(Ft,"Promise"),no=mr(Ft,"Set"),io=mr(Ft,"WeakMap"),Kr=mr(Object,"create"),_v=_e(ro),qv=_e($r),Iv=_e(so),kv=_e(no),Rv=_e(io),xh=fn?fn.prototype:void 0,Ji=xh?xh.valueOf:void 0;function Oe(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function Bv(){this.__data__=Kr?Kr(null):{},this.size=0}function Mv(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}function Dv(r){var t=this.__data__;if(Kr){var e=t[r];return e===ao?void 0:e}return Ct.call(t,r)?t[r]:void 0}function jv(r){var t=this.__data__;return Kr?t[r]!==void 0:Ct.call(t,r)}function Pv(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=Kr&&t===void 0?ao:t,this}Oe.prototype.clear=Bv;Oe.prototype.delete=Mv;Oe.prototype.get=Dv;Oe.prototype.has=jv;Oe.prototype.set=Pv;function Ht(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function Uv(){this.__data__=[],this.size=0}function Fv(r){var t=this.__data__,e=gn(t,r);if(e<0)return!1;var s=t.length-1;return e==s?t.pop():Lv.call(t,e,1),--this.size,!0}function Hv(r){var t=this.__data__,e=gn(t,r);return e<0?void 0:t[e][1]}function zv(r){return gn(this.__data__,r)>-1}function $v(r,t){var e=this.__data__,s=gn(e,r);return s<0?(++this.size,e.push([r,t])):e[s][1]=t,this}Ht.prototype.clear=Uv;Ht.prototype.delete=Fv;Ht.prototype.get=Hv;Ht.prototype.has=zv;Ht.prototype.set=$v;function Ce(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function Kv(){this.size=0,this.__data__={hash:new Oe,map:new($r||Ht),string:new Oe}}function Gv(r){var t=bn(this,r).delete(r);return this.size-=t?1:0,t}function Vv(r){return bn(this,r).get(r)}function Wv(r){return bn(this,r).has(r)}function Zv(r,t){var e=bn(this,r),s=e.size;return e.set(r,t),this.size+=e.size==s?0:1,this}Ce.prototype.clear=Kv;Ce.prototype.delete=Gv;Ce.prototype.get=Vv;Ce.prototype.has=Wv;Ce.prototype.set=Zv;function hn(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new Ce;++t<e;)this.add(r[t])}function Xv(r){return this.__data__.set(r,ao),this}function Qv(r){return this.__data__.has(r)}hn.prototype.add=hn.prototype.push=Xv;hn.prototype.has=Qv;function de(r){var t=this.__data__=new Ht(r);this.size=t.size}function Yv(){this.__data__=new Ht,this.size=0}function Jv(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}function tA(r){return this.__data__.get(r)}function eA(r){return this.__data__.has(r)}function rA(r,t){var e=this.__data__;if(e instanceof Ht){var s=e.__data__;if(!$r||s.length<Wx-1)return s.push([r,t]),this.size=++e.size,this;e=this.__data__=new Ce(s)}return e.set(r,t),this.size=e.size,this}de.prototype.clear=Yv;de.prototype.delete=Jv;de.prototype.get=tA;de.prototype.has=eA;de.prototype.set=rA;function sA(r,t){var e=dn(r),s=!e&&yA(r),n=!e&&!s&&oo(r),i=!e&&!s&&!n&&$h(r),o=e||s||n||i,a=o?bv(r.length,String):[],l=a.length;for(var u in r)(t||Ct.call(r,u))&&!(o&&(u=="length"||n&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||dA(u,l)))&&a.push(u);return a}function gn(r,t){for(var e=r.length;e--;)if(Uh(r[e][0],t))return e;return-1}function nA(r,t,e){var s=t(r);return dn(r)?s:mv(s,e(r))}function Vr(r){return r==null?r===void 0?tv:Qx:Le&&Le in Object(r)?fA(r):bA(r)}function vh(r){return Gr(r)&&Vr(r)==an}function jh(r,t,e,s,n){return r===t?!0:r==null||t==null||!Gr(r)&&!Gr(t)?r!==r&&t!==t:iA(r,t,e,s,jh,n)}function iA(r,t,e,s,n,i){var o=dn(r),a=dn(t),l=o?to:he(r),u=a?to:he(t);l=l==an?dr:l,u=u==an?dr:u;var c=l==dr,h=u==dr,d=l==u;if(d&&oo(r)){if(!oo(t))return!1;o=!0,c=!1}if(d&&!c)return i||(i=new de),o||$h(r)?Ph(r,t,e,s,n,i):uA(r,t,l,e,s,n,i);if(!(e&pn)){var m=c&&Ct.call(r,"__wrapped__"),g=h&&Ct.call(t,"__wrapped__");if(m||g){var x=m?r.value():r,A=g?t.value():t;return i||(i=new de),n(x,A,e,s,i)}}return d?(i||(i=new de),cA(r,t,e,s,n,i)):!1}function oA(r){if(!zh(r)||mA(r))return!1;var t=Fh(r)?Sv:fv;return t.test(_e(r))}function aA(r){return Gr(r)&&Hh(r.length)&&!!q[Vr(r)]}function lA(r){if(!gA(r))return Cv(r);var t=[];for(var e in Object(r))Ct.call(r,e)&&e!="constructor"&&t.push(e);return t}function Ph(r,t,e,s,n,i){var o=e&pn,a=r.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var u=i.get(r);if(u&&i.get(t))return u==t;var c=-1,h=!0,d=e&Eh?new hn:void 0;for(i.set(r,t),i.set(t,r);++c<a;){var m=r[c],g=t[c];if(s)var x=o?s(g,m,c,t,r,i):s(m,g,c,r,t,i);if(x!==void 0){if(x)continue;h=!1;break}if(d){if(!gv(t,function(A,b){if(!xv(d,b)&&(m===A||n(m,A,e,s,i)))return d.push(b)})){h=!1;break}}else if(!(m===g||n(m,g,e,s,i))){h=!1;break}}return i.delete(r),i.delete(t),h}function uA(r,t,e,s,n,i,o){switch(e){case cn:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case qh:return!(r.byteLength!=t.byteLength||!i(new bh(r),new bh(t)));case Nh:case wh:case Oh:return Uh(+r,+t);case Sh:return r.name==t.name&&r.message==t.message;case Ch:case _h:return r==t+"";case ln:var a=Av;case un:var l=s&pn;if(a||(a=Tv),r.size!=t.size&&!l)return!1;var u=o.get(r);if(u)return u==t;s|=Eh,o.set(r,t);var c=Ph(a(r),a(t),s,n,i,o);return o.delete(r),c;case Jx:if(Ji)return Ji.call(r)==Ji.call(t)}return!1}function cA(r,t,e,s,n,i){var o=e&pn,a=Ah(r),l=a.length,u=Ah(t),c=u.length;if(l!=c&&!o)return!1;for(var h=l;h--;){var d=a[h];if(!(o?d in t:Ct.call(t,d)))return!1}var m=i.get(r);if(m&&i.get(t))return m==t;var g=!0;i.set(r,t),i.set(t,r);for(var x=o;++h<l;){d=a[h];var A=r[d],b=t[d];if(s)var E=o?s(b,A,d,t,r,i):s(A,b,d,r,t,i);if(!(E===void 0?A===b||n(A,b,e,s,i):E)){g=!1;break}x||(x=d=="constructor")}if(g&&!x){var T=r.constructor,N=t.constructor;T!=N&&"constructor"in r&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof N=="function"&&N instanceof N)&&(g=!1)}return i.delete(r),i.delete(t),g}function Ah(r){return nA(r,AA,hA)}function bn(r,t){var e=r.__data__;return pA(t)?e[typeof t=="string"?"string":"hash"]:e.map}function mr(r,t){var e=vv(r,t);return oA(e)?e:void 0}function fA(r){var t=Ct.call(r,Le),e=r[Le];try{r[Le]=void 0;var s=!0}catch(i){}var n=Mh.call(r);return s&&(t?r[Le]=e:delete r[Le]),n}var hA=yh?function(r){return r==null?[]:(r=Object(r),pv(yh(r),function(t){return Dh.call(r,t)}))}:EA,he=Vr;(ro&&he(new ro(new ArrayBuffer(1)))!=cn||$r&&he(new $r)!=ln||so&&he(so.resolve())!=fh||no&&he(new no)!=un||io&&he(new io)!=eo)&&(he=function(r){var t=Vr(r),e=t==dr?r.constructor:void 0,s=e?_e(e):"";if(s)switch(s){case _v:return cn;case qv:return ln;case Iv:return fh;case kv:return un;case Rv:return eo}return t});function dA(r,t){return t=t??Th,!!t&&(typeof r=="number"||hv.test(r))&&r>-1&&r%1==0&&r<t}function pA(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}function mA(r){return!!mh&&mh in r}function gA(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||mn;return r===e}function bA(r){return Mh.call(r)}function _e(r){if(r!=null){try{return Bh.call(r)}catch(t){}try{return r+""}catch(t){}}return""}function Uh(r,t){return r===t||r!==r&&t!==t}var yA=vh((function(){return arguments})())?vh:function(r){return Gr(r)&&Ct.call(r,"callee")&&!Dh.call(r,"callee")},dn=Array.isArray;function xA(r){return r!=null&&Hh(r.length)&&!Fh(r)}var oo=Ov||TA;function vA(r,t){return jh(r,t)}function Fh(r){if(!zh(r))return!1;var t=Vr(r);return t==Lh||t==Xx||t==Zx||t==Yx}function Hh(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Th}function zh(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}function Gr(r){return r!=null&&typeof r=="object"}var $h=ph?yv(ph):aA;function AA(r){return xA(r)?sA(r):lA(r)}function EA(){return[]}function TA(){return!1}pr.exports=vA});var Kh=Jt(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});var NA=Xi(),wA=lo(),uo;(function(r){function t(i={},o={},a=!1){typeof i!="object"&&(i={}),typeof o!="object"&&(o={});let l=NA(o);a||(l=Object.keys(l).reduce((u,c)=>(l[c]!=null&&(u[c]=l[c]),u),{}));for(let u in i)i[u]!==void 0&&o[u]===void 0&&(l[u]=i[u]);return Object.keys(l).length>0?l:void 0}r.compose=t;function e(i={},o={}){typeof i!="object"&&(i={}),typeof o!="object"&&(o={});let a=Object.keys(i).concat(Object.keys(o)).reduce((l,u)=>(wA(i[u],o[u])||(l[u]=o[u]===void 0?null:o[u]),l),{});return Object.keys(a).length>0?a:void 0}r.diff=e;function s(i={},o={}){i=i||{};let a=Object.keys(o).reduce((l,u)=>(o[u]!==i[u]&&i[u]!==void 0&&(l[u]=o[u]),l),{});return Object.keys(i).reduce((l,u)=>(i[u]!==o[u]&&o[u]===void 0&&(l[u]=null),l),a)}r.invert=s;function n(i,o,a=!1){if(typeof i!="object")return o;if(typeof o!="object")return;if(!a)return o;let l=Object.keys(o).reduce((u,c)=>(i[c]===void 0&&(u[c]=o[c]),u),{});return Object.keys(l).length>0?l:void 0}r.transform=n})(uo||(uo={}));co.default=uo});var po=Jt(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});var fo;(function(r){function t(e){return typeof e.delete=="number"?e.delete:typeof e.retain=="number"?e.retain:typeof e.retain=="object"&&e.retain!==null?1:typeof e.insert=="string"?e.insert.length:1}r.length=t})(fo||(fo={}));ho.default=fo});var Vh=Jt(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});var Gh=po(),mo=class{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);let e=this.ops[this.index];if(e){let s=this.offset,n=Gh.default.length(e);if(t>=n-s?(t=n-s,this.index+=1,this.offset=0):this.offset+=t,typeof e.delete=="number")return{delete:t};{let i={};return e.attributes&&(i.attributes=e.attributes),typeof e.retain=="number"?i.retain=t:typeof e.retain=="object"&&e.retain!==null?i.retain=e.retain:typeof e.insert=="string"?i.insert=e.insert.substr(s,t):i.insert=e.insert,i}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?Gh.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let t=this.ops[this.index];return t?typeof t.delete=="number"?"delete":typeof t.retain=="number"||typeof t.retain=="object"&&t.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let t=this.offset,e=this.index,s=this.next(),n=this.ops.slice(this.index);return this.offset=t,this.index=e,[s].concat(n)}}else return[]}};go.default=mo});var ft=Jt(($t,xn)=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.AttributeMap=$t.OpIterator=$t.Op=void 0;var yn=Tf(),SA=Xi(),bo=lo(),qe=Kh();$t.AttributeMap=qe.default;var zt=po();$t.Op=zt.default;var mt=Vh();$t.OpIterator=mt.default;var LA="\0",Wh=(r,t)=>{if(typeof r!="object"||r===null)throw new Error(`cannot retain a ${typeof r}`);if(typeof t!="object"||t===null)throw new Error(`cannot retain a ${typeof t}`);let e=Object.keys(r)[0];if(!e||e!==Object.keys(t)[0])throw new Error(`embed types not matched: ${e} != ${Object.keys(t)[0]}`);return[e,r[e],t[e]]},Kt=class r{constructor(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}static registerEmbed(t,e){this.handlers[t]=e}static unregisterEmbed(t){delete this.handlers[t]}static getHandler(t){let e=this.handlers[t];if(!e)throw new Error(`no handlers for embed type "${t}"`);return e}insert(t,e){let s={};return typeof t=="string"&&t.length===0?this:(s.insert=t,e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(s.attributes=e),this.push(s))}delete(t){return t<=0?this:this.push({delete:t})}retain(t,e){if(typeof t=="number"&&t<=0)return this;let s={retain:t};return e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(s.attributes=e),this.push(s)}push(t){let e=this.ops.length,s=this.ops[e-1];if(t=SA(t),typeof s=="object"){if(typeof t.delete=="number"&&typeof s.delete=="number")return this.ops[e-1]={delete:s.delete+t.delete},this;if(typeof s.delete=="number"&&t.insert!=null&&(e-=1,s=this.ops[e-1],typeof s!="object"))return this.ops.unshift(t),this;if(bo(t.attributes,s.attributes)){if(typeof t.insert=="string"&&typeof s.insert=="string")return this.ops[e-1]={insert:s.insert+t.insert},typeof t.attributes=="object"&&(this.ops[e-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof s.retain=="number")return this.ops[e-1]={retain:s.retain+t.retain},typeof t.attributes=="object"&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this}chop(){let t=this.ops[this.ops.length-1];return t&&typeof t.retain=="number"&&!t.attributes&&this.ops.pop(),this}filter(t){return this.ops.filter(t)}forEach(t){this.ops.forEach(t)}map(t){return this.ops.map(t)}partition(t){let e=[],s=[];return this.forEach(n=>{(t(n)?e:s).push(n)}),[e,s]}reduce(t,e){return this.ops.reduce(t,e)}changeLength(){return this.reduce((t,e)=>e.insert?t+zt.default.length(e):e.delete?t-e.delete:t,0)}length(){return this.reduce((t,e)=>t+zt.default.length(e),0)}slice(t=0,e=1/0){let s=[],n=new mt.default(this.ops),i=0;for(;i<e&&n.hasNext();){let o;i<t?o=n.next(t-i):(o=n.next(e-i),s.push(o)),i+=zt.default.length(o)}return new r(s)}compose(t){let e=new mt.default(this.ops),s=new mt.default(t.ops),n=[],i=s.peek();if(i!=null&&typeof i.retain=="number"&&i.attributes==null){let a=i.retain;for(;e.peekType()==="insert"&&e.peekLength()<=a;)a-=e.peekLength(),n.push(e.next());i.retain-a>0&&s.next(i.retain-a)}let o=new r(n);for(;e.hasNext()||s.hasNext();)if(s.peekType()==="insert")o.push(s.next());else if(e.peekType()==="delete")o.push(e.next());else{let a=Math.min(e.peekLength(),s.peekLength()),l=e.next(a),u=s.next(a);if(u.retain){let c={};if(typeof l.retain=="number")c.retain=typeof u.retain=="number"?a:u.retain;else if(typeof u.retain=="number")l.retain==null?c.insert=l.insert:c.retain=l.retain;else{let d=l.retain==null?"insert":"retain",[m,g,x]=Wh(l[d],u.retain),A=r.getHandler(m);c[d]={[m]:A.compose(g,x,d==="retain")}}let h=qe.default.compose(l.attributes,u.attributes,typeof l.retain=="number");if(h&&(c.attributes=h),o.push(c),!s.hasNext()&&bo(o.ops[o.ops.length-1],c)){let d=new r(e.rest());return o.concat(d).chop()}}else typeof u.delete=="number"&&(typeof l.retain=="number"||typeof l.retain=="object"&&l.retain!==null)&&o.push(u)}return o.chop()}concat(t){let e=new r(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e}diff(t,e){if(this.ops===t.ops)return new r;let s=[this,t].map(l=>l.map(u=>{if(u.insert!=null)return typeof u.insert=="string"?u.insert:LA;let c=l===t?"on":"with";throw new Error("diff() called "+c+" non-document")}).join("")),n=new r,i=yn(s[0],s[1],e,!0),o=new mt.default(this.ops),a=new mt.default(t.ops);
1return i.forEach(l=>{let u=l[1].length;for(;u>0;){let c=0;switch(l[0]){case yn.INSERT:c=Math.min(a.peekLength(),u),n.push(a.next(c));break;case yn.DELETE:c=Math.min(u,o.peekLength()),o.next(c),n.delete(c);break;case yn.EQUAL:c=Math.min(o.peekLength(),a.peekLength(),u);let h=o.next(c),d=a.next(c);bo(h.insert,d.insert)?n.retain(c,qe.default.diff(h.attributes,d.attributes)):n.push(d).delete(c);break}u-=c}}),n.chop()}eachLine(t,e=` 2`){let s=new mt.default(this.ops),n=new r,i=0;for(;s.hasNext();){if(s.peekType()!=="insert")return;let o=s.peek(),a=zt.default.length(o)-s.peekLength(),l=typeof o.insert=="string"?o.insert.indexOf(e,a)-a:-1;if(l<0)n.push(s.next());else if(l>0)n.push(s.next(l));else{if(t(n,s.next(1).attributes||{},i)===!1)return;i+=1,n=new r}}n.length()>0&&t(n,{},i)}invert(t){let e=new r;return this.reduce((s,n)=>{if(n.insert)e.delete(zt.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return e.retain(n.retain),s+n.retain;if(n.delete||typeof n.retain=="number"){let i=n.delete||n.retain;return t.slice(s,s+i).forEach(a=>{n.delete?e.push(a):n.retain&&n.attributes&&e.retain(zt.default.length(a),qe.default.invert(n.attributes,a.attributes))}),s+i}else if(typeof n.retain=="object"&&n.retain!==null){let i=t.slice(s,s+1),o=new mt.default(i.ops).next(),[a,l,u]=Wh(n.retain,o.insert),c=r.getHandler(a);return e.retain({[a]:c.invert(l,u)},qe.default.invert(n.attributes,o.attributes)),s+1}}return s},0),e.chop()}transform(t,e=!1){if(e=!!e,typeof t=="number")return this.transformPosition(t,e);let s=t,n=new mt.default(this.ops),i=new mt.default(s.ops),o=new r;for(;n.hasNext()||i.hasNext();)if(n.peekType()==="insert"&&(e||i.peekType()!=="insert"))o.retain(zt.default.length(n.next()));else if(i.peekType()==="insert")o.push(i.next());else{let a=Math.min(n.peekLength(),i.peekLength()),l=n.next(a),u=i.next(a);if(l.delete)continue;if(u.delete)o.push(u);else{let c=l.retain,h=u.retain,d=typeof h=="object"&&h!==null?h:a;if(typeof c=="object"&&c!==null&&typeof h=="object"&&h!==null){let m=Object.keys(c)[0];if(m===Object.keys(h)[0]){let g=r.getHandler(m);g&&(d={[m]:g.transform(c[m],h[m],e)})}}o.retain(d,qe.default.transform(l.attributes,u.attributes,e))}}return o.chop()}transformPosition(t,e=!1){e=!!e;let s=new mt.default(this.ops),n=0;for(;s.hasNext()&&n<=t;){let i=s.peekLength(),o=s.peekType();if(s.next(),o==="delete"){t-=Math.min(i,t-n);continue}else o==="insert"&&(n<t||!e)&&(t+=i);n+=i}return t}};Kt.Op=zt.default;Kt.OpIterator=mt.default;Kt.AttributeMap=qe.default;Kt.handlers={};$t.default=Kt;typeof xn=="object"&&(xn.exports=Kt,xn.exports.default=Kt)});var OA,G,pe=f(()=>{S();OA=(()=>{class r extends k{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}return r.blotName="break",r.tagName="BR",r})(),G=OA});function Ie(r){return r.replace(/[&<>"']/g,t=>CA[t])}var M,CA,Gt=f(()=>{S();M=class extends ar{},CA={"&":"&","<":"<",">":">",'"':""","'":"'"}});var _A,V,Vt=f(()=>{S();pe();Gt();_A=(()=>{class r extends Zs{static allowedChildren=[r,G,k,M];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(e,s){let n=r.order.indexOf(e),i=r.order.indexOf(s);return n>=0||i>=0?n-i:e===s?0:e<s?-1:1}formatAt(e,s,n,i){if(r.compare(this.statics.blotName,n)<0&&this.scroll.query(n,y.BLOT)){let o=this.isolate(e,s);i&&o.wrap(n,i)}else super.formatAt(e,s,n,i)}optimize(e){if(super.optimize(e),this.parent instanceof r&&r.compare(this.statics.blotName,this.parent.statics.blotName)>0){let s=this.parent.isolate(this.offset(),this.length());this.moveChildren(s),s.wrap(this)}}}return r})(),V=_A});function xo(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r.descendants(U).reduce((e,s)=>s.length()===0?e:e.insert(s.value(),it(s,{},t)),new yo.default).insert(` 3`,it(r))}function it(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return r==null||("formats"in r&&typeof r.formats=="function"&&(t=C(C({},t),r.formats()),e&&delete t["code-token"]),r.parent==null||r.parent.statics.blotName==="scroll"||r.parent.statics.scope!==r.statics.scope)?t:it(r.parent,t,e)}var yo,Zh,D,H,gt=f(()=>{S();yo=ut(ft(),1);pe();Vt();Gt();Zh=1,D=(()=>{class r extends Te{cache={};delta(){return this.cache.delta==null&&(this.cache.delta=xo(this)),this.cache.delta}deleteAt(e,s){super.deleteAt(e,s),this.cache={}}formatAt(e,s,n,i){s<=0||(this.scroll.query(n,y.BLOCK)?e+s===this.length()&&this.format(n,i):super.formatAt(e,Math.min(s,this.length()-e-1),n,i),this.cache={})}insertAt(e,s,n){if(n!=null){super.insertAt(e,s,n),this.cache={};return}if(s.length===0)return;let i=s.split(` 4`),o=i.shift();o.length>0&&(e<this.length()-1||this.children.tail==null?super.insertAt(Math.min(e,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});let a=this;i.reduce((l,u)=>(a=a.split(l,!0),a.insertAt(0,u),u.length),e+o.length)}insertBefore(e,s){let{head:n}=this.children;super.insertBefore(e,s),n instanceof G&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Zh),this.cache.length}moveChildren(e,s){super.moveChildren(e,s),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(s&&(e===0||e>=this.length()-Zh)){let i=this.clone();return e===0?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}let n=super.split(e,s);return this.cache={},n}}return r.blotName="block",r.tagName="P",r.defaultChild=G,r.allowedChildren=[G,V,k,M],r})(),H=class extends k{attach(){super.attach(),this.attributes=new Dr(this.domNode)}delta(){return new yo.default().insert(this.value(),C(C({}
vendor: 4,249 bytes, lines 4-5
4,this.formats()),this.attributes.values()))}format(t,e){let s=this.scroll.query(t,y.BLOCK_ATTRIBUTE);s!=null&&this.attributes.attribute(s,e)}formatAt(t,e,s,n){this.format(s,n)}insertAt(t,e,s){if(s!=null){super.insertAt(t,e,s);return}let n=e.split(` 5`),i=n.pop(),o=n.map(l=>{let u=this.scroll.create(D.blotName);return u.insertAt(0,l),u}),a=this.split(t);o.forEach(l=>{this.parent.insertBefore(l,a)}),i&&this.parent.insertBefore(this.scroll.create("text",i),a)}};H.scope=y.BLOCK_BLOT});var qA,me,Wr=f(()=>{S();Gt();qA=(()=>{class r extends k{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\uFEFF";static value(){}constructor(e,s,n){super(e,s),this.selection=n,this.textNode=document.createTextNode(r.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,s){if(this.savedLength!==0){super.format(e,s);return}let n=this,i=0;for(;n!=null&&n.statics.scope!==y.BLOCK_BLOT;)i+=n.offset(n.parent),n=n.parent;n!=null&&(this.savedLength=r.CONTENTS.length,n.optimize(),n.formatAt(i,r.CONTENTS.length,e,s),this.savedLength=0)}index(e,s){return e===this.textNode?0:super.index(e,s)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let s=this.prev instanceof M?this.prev:null,n=s?s.length():0,i=this.next instanceof M?this.next:null,o=i?i.text:"",{textNode:a}=this,l=a.data.split(r.CONTENTS).join("");a.data=r.CONTENTS;let u;if(s)u=s,(l||i)&&(s.insertAt(s.length(),l+o),i&&i.remove());else if(i)u=i,i.insertAt(0,l);else{let c=document.createTextNode(l);u=this.scroll.create(c),this.parent.insertBefore(u,this)}if(this.remove(),e){let c=(m,g)=>s&&m===s.domNode?g:m===a?n+g-1:i&&m===i.domNode?n+l.length+g:null,h=c(e.start.node,e.start.offset),d=c(e.end.node,e.end.offset);if(h!==null&&d!==null)return{startNode:u.domNode,startOffset:h,endNode:u.domNode,endOffset:d}}return null}update(e,s){if(e.some(n=>n.type==="characterData"&&n.target===this.textNode)){let n=this.restore();n&&(s.range=n)}}optimize(e){super.optimize(e);let{parent:s}=this;for(;s;){if(s.domNode.tagName==="A"){this.savedLength=r.CONTENTS.length,s.isolate(this.offset(s),this.length()).unwrap(),this.savedLength=0;break}s=s.parent}}value(){return""}}return r})(),me=qA});var Qh=Jt((BC,vo)=>{"use strict";var IA=Object.prototype.hasOwnProperty,J="~";function Zr(){}Object.create&&(Zr.prototype=Object.create(null),new Zr().__proto__||(J=!1));function kA(r,t,e){this.fn=r,this.context=t,this.once=e||!1}function Xh(r,t,e,s,n){if(typeof e!="function")throw new TypeError("The listener must be a function");var i=new kA(e,s||r,n),o=J?J+t:t;return r._events[o]?r._events[o].fn?r._events[o]=[r._events[o],i]:r._events[o].push(i):(r._events[o]=i,r._eventsCount++),r}function vn(r,t){--r._eventsCount===0?r._events=new Zr:delete r._events[t]}function W(){this._events=new Zr,this._eventsCount=0}W.prototype.eventNames=function(){var t=[],e,s;if(this._eventsCount===0)return t;for(s in e=this._events)IA.call(e,s)&&t.push(J?s.slice(1):s);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t};W.prototype.listeners=function(t){var e=J?J+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var n=0,i=s.length,o=new Array(i);n<i;n++)o[n]=s[n].fn;return o};W.prototype.listenerCount=function(t){var e=J?J+t:t,s=this._events[e];return s?s.fn?1:s.length:0};W.prototype.emit=function(t,e,s,n,i,o){var a=J?J+t:t;if(!this._events[a])return!1;var l=this._events[a],u=arguments.length,c,h;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),u){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,s),!0;case 4:return l.fn.call(l.context,e,s,n),!0;case 5:return l.fn.call(l.context,e,s,n,i),!0;case 6:return l.fn.call(l.context,e,s,n,i,o),!0}for(h=1,c=new Array(u-1);h<u;h++)c[h-1]=arguments[h];l.fn.apply(l.context,c)}else{var d=l.length,m;
5for(h=0;h<d;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),u){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,s);break;case 4:l[h].fn.call(l[h].context,e,s,n);break;default:if(!c)for(m=1,c=new Array(u-1);m<u;m++)c[m-1]=arguments[m];l[h].fn.apply(l[h].context,c)}}return!0};W.prototype.on=function(t,e,s){return Xh(this,t,e,s,!1)};W.prototype.once=function(t,e,s){return Xh(this,t,e,s,!0)};W.prototype.removeListener=function(t,e,s,n){var i=J?J+t:t;if(!this._events[i])return this;if(!e)return vn(this,i),this;var o=this._events[i];if(o.fn)o.fn===e&&(!n||o.once)&&(!s||o.context===s)&&vn(this,i);else{for(var a=0,l=[],u=o.length;a<u;a++)(o[a].fn!==e||n&&!o[a].once||s&&o[a].context!==s)&&l.push(o[a]);l.length?this._events[i]=l.length===1?l[0]:l:vn(this,i)}return this};W.prototype.removeAllListeners=function(t){var e;return t?(e=J?J+t:t,this._events[e]&&vn(this,e)):(this._events=new Zr,this._eventsCount=0),this};W.prototype.off=W.prototype.removeListener;W.prototype.addListener=W.prototype.on;W.prefixed=J;W.EventEmitter=W;typeof vo<"u"&&(vo.exports=W)});var Ao,Yh=f(()=>{Ao=ut(Qh(),1)});var Xr,Eo=f(()=>{Xr=new WeakMap});function Jh(r){if(No&&To.indexOf(r)<=To.indexOf(No)){for(var t=arguments.length,e=new Array(t>1?t-1:0),s=1;s<t;s++)e[s-1]=arguments[s];console[r](...e)}}function wo(r){return To.reduce((t,e)=>(t[e]=Jh.bind(console,e,r),t),{})}var To,No,ht,ke=f(()=>{To=["error","warn","log","info"],No="warn";wo.level=r=>{No=r};Jh.level=wo.level;ht=wo});var So,RA,BA,v,Wt=f(()=>{Yh();Eo();ke();So=ht("quill:events"),RA=["selectionchange","mousedown","mouseup","click"];RA.forEach(r=>{document.addEventListener(r,function(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let i=Xr.get(n);i&&i.emitter&&i.emitter.handleDOM(...e)})})});BA=(()=>{class r extends Ao.default{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",So.error)}emit(){for(var e=arguments.length,s=new Array(e),n=0;n<e;n++)s[n]=arguments[n];return So.log.call(So,...s),super.emit(...s)}handleDOM(e){for(var s=arguments.length,n=new Array(s>1?s-1:0),i=1;i<s;i++)n[i-1]=arguments[i];(this.domListeners[e.type]||[]).forEach(o=>{let{node:a,handler:l}=o;(e.target===a||a.contains(e.target))&&l(e,...n)})}listenDOM(e,s,n){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:s,handler:n})}}return r})(),v=BA});function Oo(r,t){try{t.parentNode}catch(e){return!1}return r.contains(t)}var Lo,Z,Co,td,Qr=f(()=>{S();ae();Wt();ke();Lo=ht("quill:selection"),Z=class{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=e}},Co=class{constructor(t,e){this.emitter=e,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Z(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,v.sources.USER),1)}),this.emitter.on(v.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let s=this.getNativeRange();s!=null&&s.start.node!==this.cursor.textNode&&this.emitter.once(v.events.SCROLL_UPDATE,(n,i)=>{try{this.root.contains(s.start.node)&&this.root.contains(s.end.node)&&this.setNativeRange(s.start.node,s.start.offset,s.end.node,s.end.offset);let o=i.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(o?v.sources.SILENT:n)}catch(o){}})}),this.emitter.on(v.events.SCROLL_OPTIMIZE,(s,n)=>
vendor: 12,852 bytes, lines 5-14
5{if(n.range){let{startNode:i,startOffset:o,endNode:a,endOffset:l}=n.range;this.setNativeRange(i,o,a,l),this.update(v.sources.SILENT)}}),this.update(v.sources.SILENT)}handleComposition(){this.emitter.on(v.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(v.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let t=this.cursor.restore();if(!t)return;setTimeout(()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(v.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,e){this.scroll.update();let s=this.getNativeRange();if(!(s==null||!s.native.collapsed||this.scroll.query(t,y.BLOCK))){if(s.start.node!==this.cursor.textNode){let n=this.scroll.find(s.start.node,!1);if(n==null)return;if(n instanceof U){let i=n.split(s.start.offset);n.parent.insertBefore(this.cursor,i)}else n.insertBefore(this.cursor,s.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=this.scroll.length();t=Math.min(t,s-1),e=Math.min(t+e,s-1)-t;let n,[i,o]=this.scroll.leaf(t);if(i==null)return null;if(e>0&&o===i.length()){let[c]=this.scroll.leaf(t+1);if(c){let[h]=this.scroll.line(t),[d]=this.scroll.line(t+1);h===d&&(i=c,o=0)}}[n,o]=i.position(o,!0);let a=document.createRange();if(e>0)return a.setStart(n,o),[i,o]=this.scroll.leaf(t+e),i==null?null:([n,o]=i.position(o,!0),a.setEnd(n,o),a.getBoundingClientRect());let l="left",u;if(n instanceof Text){if(!n.data.length)return null;o<n.data.length?(a.setStart(n,o),a.setEnd(n,o+1)):(a.setStart(n,o-1),a.setEnd(n,o),l="right"),u=a.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;u=i.domNode.getBoundingClientRect(),o>0&&(l="right")}return{bottom:u.top+u.height,height:u.height,left:u[l],right:u[l],top:u.top,width:0}}getNativeRange(){let t=document.getSelection();if(t==null||t.rangeCount<=0)return null;let e=t.getRangeAt(0);if(e==null)return null;let s=this.normalizeNative(e);return Lo.info("getNativeRange",s),s}getRange(){let t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];let e=this.getNativeRange();return e==null?[null,null]:[this.normalizedToRange(e),e]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Oo(this.root,document.activeElement)}normalizedToRange(t){let e=[[t.start.node,t.start.offset]];t.native.collapsed||e.push([t.end.node,t.end.offset]);let s=e.map(o=>{let[a,l]=o,u=this.scroll.find(a,!0),c=u.offset(this.scroll);return l===0?c:u instanceof U?c+u.index(a,l):c+u.length()}),n=Math.min(Math.max(...s),this.scroll.length()-1),i=Math.min(n,...s);return new Z(i,n-i)}normalizeNative(t){if(!Oo(this.root,t.startContainer)||!t.collapsed&&!Oo(this.root,t.endContainer))return null;let e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach(s=>{let{node:n,offset:i}=s;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>i)n=n.childNodes[i],i=0;else if(n.childNodes.length===i)n=n.lastChild,n instanceof Text?i=n.data.length:n.childNodes.length>0?i=n.childNodes.length:i=n.childNodes.length+1;else break;s.node=n,s.offset=i}),e}rangeToNative(t){let e=this.scroll.length(),s=(n,i)=>{n=Math.min(e-1,n);let[o,a]=this.scroll.leaf(n);return o?o.position(a,i):[null,-1]};return[...s(t.index,!1),...s(t.index+t.length,!0)]}setNativeRange(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Lo.info("setNativeRange",t,e,s,n),t!=null&&(this.root.parentNode==null||t.parentNode==null||s.parentNode==null))return;let o=document.getSelection();if(o!=null)if(t!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:a}=this.getNativeRange()||{};if(a==null||i||t!==a.startContainer||e!==a.startOffset||s!==a.endContainer||n!==a.endOffset){t instanceof Element&&t.tagName==="BR"&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),s instanceof Element&&s.tagName==="BR"&&(n=Array.from(s.parentNode.childNodes).indexOf(s),s=s.parentNode);let l=document.createRange();l.setStart(t,e),l.setEnd(s,n),o.removeAllRanges(),o.addRange(l)}}else o.removeAllRanges(),this.root.blur()}setRange(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.sources.API;if(typeof e=="string"&&(s=e,e=!1),Lo.info("setRange",t),t!=null){let n=this.rangeToNative(t);this.setNativeRange(...n,e)}else this.setNativeRange(null);this.update(s)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.sources.USER,e=this.lastRange,[s,n]=this.getRange();if(this.lastRange=s,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!Ee(e,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}let i=[v.events.SELECTION_CHANGE,Ot(this.lastRange),Ot(e),t];this.emitter.emit(v.events.EDITOR_CHANGE,...i),t!==v.sources.SILENT&&this.emitter.emit(...i)}}};td=Co});function gr(r,t,e){if(r.length===0){let[m]=_o(e.pop());return t<=0?`</li></${m}>`:`</li></${m}>${gr([],t-1,e)}`}let[{child:s,offset:n,length:i,indent:o,type:a},...l]=r,[u,c]=_o(a);if(o>t)return e.push(a),o===t+1?`<${u}><li${c}>${Yr(s,n,i)}${gr(l,o,e)}`:`<${u}><li>${gr(r,t+1,e)}`;let h=e[e.length-1];if(o===t&&a===h)return`</li><li${c}>${Yr(s,n,i)}${gr(l,o,e)}`;let[d]=_o(e.pop());return`</li></${d}>${gr(r,t-1,e)}`}function Yr(r,t,e){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in r&&typeof r.html=="function")return r.html(t,e);if(r instanceof M)return Ie(r.value().slice(t,t+e)).replaceAll(" "," ");if(r instanceof st){if(r.statics.blotName==="list-container"){let u=[];return r.children.forEachAt(t,e,(c,h,d)=>{let m="formats"in c&&typeof c.formats=="function"?c.formats():{};u.push({child:c,offset:h,length:d,indent:m.indent||0,type:m.list})}),gr(u,-1,[])}let n=[];if(r.children.forEachAt(t,e,(u,c,h)=>{n.push(Yr(u,c,h))}),s||r.statics.blotName==="list")return n.join("");let{outerHTML:i,innerHTML:o}=r.domNode,[a,l]=i.split(`>${o}<`);return a==="<table"?`<table style="border: 1px solid #000;">${n.join("")}<${l}`:`${a}>${n.join("")}<${l}`}return r.domNode instanceof Element?r.domNode.outerHTML:""}function DA(r,t){return Object.keys(t).reduce((e,s)=>{if(r[s]==null)return e;let n=t[s];return n===r[s]?e[s]=n:Array.isArray(n)?n.indexOf(r[s])<0?e[s]=n.concat([r[s]]):e[s]=n:e[s]=[n,r[s]],e},{})}function _o(r){let t=r==="ordered"?"ol":"ul";switch(r){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function ed(r){return r.reduce((t,e)=>{if(typeof e.insert=="string"){let s=e.insert.replace(/\r\n/g,` 6`).replace(/\r/g,` 7`);return t.insert(s,e.attributes)}return t.push(e)},new R.default)}function rd(r,t){let{index:e,length:s}=r;return new Z(e+t,s)}function jA(r){let t=[];return r.forEach(e=>{typeof e.insert=="string"?e.insert.split(` 8`).forEach((n,i)=>{i&&t.push({insert:` 9`,attributes:e.attributes}),n&&t.push({insert:n,attributes:e.attributes})}):t.push(e)}),t}var R,MA,qo,sd,nd=f(()=>{ae();S();R=ut(ft(),1);gt();pe();Wr();Gt();Qr();MA=/^[ -~]*$/,qo=class{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let e=this.scroll.length();this.scroll.batchStart();let s=ed(t),n=new R.default;return jA(s.ops.slice()).reduce((o,a)=>{let l=R.Op.length(a),u=a.attributes||{},c=!1,h=!1;if(a.insert!=null){if(n.retain(l),typeof a.insert=="string"){let g=a.insert;h=!g.endsWith(` 10`)&&(e<=o||!!this.scroll.descendant(H,o)[0]),this.scroll.insertAt(o,g);let[x,A]=this.scroll.line(o),b=rt({},it(x));if(x instanceof D){let[E]=x.descendant(U,A);E&&(b=rt(b,it(E)))}u=R.AttributeMap.diff(b,u)||{}}else if(typeof a.insert=="object"){let g=Object.keys(a.insert)[0];if(g==null)return o;let x=this.scroll.query(g,y.INLINE)!=null;if(x)(e<=o||this.scroll.descendant(H,o)[0])&&(h=!0);else if(o>0){let[A,b]=this.scroll.descendant(U,o-1);A instanceof M?A.value()[b]!==` 11`&&(c=!0):A instanceof k&&A.statics.scope===y.INLINE_BLOT&&(c=!0)}if(this.scroll.insertAt(o,g,a.insert[g]),x){let[A]=this.scroll.descendant(U,o);if(A){let b=rt({},it(A));u=R.AttributeMap.diff(b,u)||{}}}}e+=l}else if(n.push(a),a.retain!==null&&typeof a.retain=="object"){let g=Object.keys(a.retain)[0];if(g==null)return o;this.scroll.updateEmbedAt(o,g,a.retain[g])}Object.keys(u).forEach(g=>{this.scroll.formatAt(o,l,g,u[g])});let d=c?1:0,m=h?1:0;return e+=d+m,n.retain(d),n.delete(m),o+l+d+m},0),n.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+R.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(s)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update(new R.default().retain(t).delete(e))}formatLine(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(s).forEach(i=>{this.scroll.lines(t,Math.max(e,1)).forEach(o=>{o.format(i,s[i])})}),this.scroll.optimize();let n=new R.default().retain(t).retain(e,Ot(s));return this.update(n)}formatText(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(s).forEach(i=>{this.scroll.formatAt(t,e,i,s[i])});let n=new R.default().retain(t).retain(e,Ot(s));return this.update(n)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce((t,e)=>t.concat(e.delta()),new R.default)}getFormat(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=[],n=[];e===0?this.scroll.path(t).forEach(a=>{let[l]=a;l instanceof D?s.push(l):l instanceof U&&n.push(l)}):(s=this.scroll.lines(t,e),n=this.scroll.descendants(U,t,e));let[i,o]=[s,n].map(a=>{let l=a.shift();if(l==null)return{};let u=it(l);for(;Object.keys(u).length>0;){let c=a.shift();if(c==null)return u;u=DA(it(c),u)}return u});return C(C({},i),o)}getHTML(t,e){let[s,n]=this.scroll.line(t);if(s){let i=s.length();return s.length()>=n+e&&!(n===0&&e===i)?Yr(s,n,e,!0):Yr(this.scroll,t,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter(s=>typeof s.insert=="string").map(s=>s.insert).join("")}insertContents(t,e){let s=ed(e),n=new R.default().retain(t).concat(s);return this.scroll.insertContents(t,s),this.update(n)}insertEmbed(t,e,s){return this.scroll.insertAt(t,e,s),this.update(new R.default().retain(t).insert({[e]:s}))}insertText(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e=e.replace(/\r\n/g,` 12`).replace(/\r/g,` 13`),this.scroll.insertAt(t,e),Object.keys(s).forEach(n=>{this.scroll.formatAt(t,e.length,n,s[n])}),this.update(new R.default().retain(t).insert(e,Ot(s)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;let t=this.scroll.children.head;if(t?.statics.blotName!==D.blotName)return!1;let e=t;return e.children.length>1?!1:e.children.head instanceof G}removeFormat(t,e){let s=this.getText(t,e),[n,i]=this.scroll.line(t+e),o=0,a=new R.default;n!=null&&(o=n.length()-i,a=n.delta().slice(i,i+o-1).insert(` 14`));let u=this.getContents(t,e+o).diff(new R.default().insert(s).concat(a)),c=new R.default().retain(t).concat(u);return this.applyDelta(c)}update(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this.delta;if(e.length===1&&e[0].type==="characterData"&&e[0].target.data.match(MA)&&this.scroll.find(e[0].target)){let i=this.scroll.find(e[0].target),o=it(i),a=i.offset(this.scroll),l=e[0].oldValue.replace(me.CONTENTS,""),u=new R.default().insert(l),c=new R.default().insert(i.value()),h=s&&{oldRange:rd(s.oldRange,-a),newRange:rd(s.newRange,-a)};t=new R.default().retain(a).concat(u.diff(c,h)).reduce((m,g)=>g.insert?m.insert(g.insert,o):m.push(g),new R.default),this.delta=n.compose(t)}else this.delta=this.getDelta(),(!t||!Ee(n.compose(t),this.delta))&&(t=n.diff(this.delta,s));return t}};sd=qo});var PA,B,bt=f(()=>{PA=(()=>{class r{static DEFAULTS={};constructor(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=s}}return r})(),B=PA});var An,Io,br,En=f(()=>{S();Gt();An="\uFEFF",Io=class extends k{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEac
14h(s=>{this.contentNode.appendChild(s)}),this.leftGuard=document.createTextNode(An),this.rightGuard=document.createTextNode(An),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let e=null,s,n=t.data.split(An).join("");if(t===this.leftGuard)if(this.prev instanceof M){let i=this.prev.length();this.prev.insertAt(i,n),e={startNode:this.prev.domNode,startOffset:i+n.length}}else s=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(s),this),e={startNode:s,startOffset:n.length};else t===this.rightGuard&&(this.next instanceof M?(this.next.insertAt(0,n),e={startNode:this.next.domNode,startOffset:n.length}):(s=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(s),this.next),e={startNode:s,startOffset:n.length}));return t.data=An,e}update(t,e){t.forEach(s=>{if(s.type==="characterData"&&(s.target===this.leftGuard||s.target===this.rightGuard)){let n=this.restore(s.target);n&&(e.range=n)}})}},br=Io});var ko,id,od=f(()=>{En();Wt();ko=class{isComposing=!1;constructor(t,e){this.scroll=t,this.emitter=e,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){let e=t.target instanceof Node?this.scroll.find(t.target,!0):null;e&&!(e instanceof br)&&(this.emitter.emit(v.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(v.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(v.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(v.events.COMPOSITION_END,t),this.isComposing=!1}},id=ko});var UA,yr,Ro=f(()=>{UA=(()=>{class r{static DEFAULTS={modules:{}};static themes={default:r};modules={};constructor(e,s){this.quill=e,this.options=s}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]==null&&this.addModule(e)})}addModule(e){let s=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new s(this.quill,this.options.modules[e]||{}),this.modules[e]}}return r})(),yr=UA});var FA,HA,Tn,ad,zA,ld,ud=f(()=>{FA=r=>r.parentElement||r.getRootNode().host||null,HA=r=>{let t=r.getBoundingClientRect(),e="offsetWidth"in r&&Math.abs(t.width)/r.offsetWidth||1,s="offsetHeight"in r&&Math.abs(t.height)/r.offsetHeight||1;return{top:t.top,right:t.left+r.clientWidth*e,bottom:t.top+r.clientHeight*s,left:t.left}},Tn=r=>{let t=parseInt(r,10);return Number.isNaN(t)?0:t},ad=(r,t,e,s,n,i)=>r<e&&t>s?0:r<e?-(e-r+n):t>s?t-r>s-e?r+n-e:t-s+i:0,zA=(r,t)=>{let e=r.ownerDocument,s=t,n=r;for(;n;){let i=n===e.body,o=i?{top:0,right:window.visualViewport?.width??e.documentElement.clientWidth,bottom:window.visualViewport?.height??e.documentElement.clientHeight,left:0}:HA(n),a=getComputedStyle(n),l=ad(s.left,s.right,o.left,o.right,Tn(a.scrollPaddingLeft),Tn(a.scrollPaddingRight)),u=ad(s.top,s.bottom,o.top,o.bottom,Tn(a.scrollPaddingTop),Tn(a.scrollPaddingBottom));if(l||u)if(i)e.defaultView?.scrollBy(l,u);else{let{scrollLeft:c,scrollTop:h}=n;u&&(n.scrollTop+=u),l&&(n.scrollLeft+=l);let d=n.scrollLeft-c,m=n.scrollTop-h;s={left:s.left-d,top:s.top-m,right:s.right-d,bottom:s.bottom-m}}n=i||a.position==="fixed"?null:FA(n)}},ld=zA});var $A,KA,GA,cd,fd=f(()=>{S();$A=100,KA=["block","break","cursor","inline","scroll","text"],GA=(r,t,e)=>{let s=new ce;return KA.forEach(n=>{let i=t.query(n);i&&s.register(i)}),r.forEach(n=>{let i=t.query(n);i||e.error(`Cannot register "${n}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;i;)if(s.register(i),i="blotName"in i?i.requiredContainer??null:null,o+=1,o>$A){e.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),s},cd=GA});function hd(r){return typeof r=="string"?document.querySelector(r):r}function Bo(r){return Object.entries(r??{}).reduce((t,e)=>{let[s,n]=e;return Yt(C({},t),{[s]:n===!0?{}:n})},{})}function dd(r){return Object.fromEntries(Object.entries(r).filter(t=>t[1]!==void 0))}function VA(r,t){let e=hd(r);if(!e)throw new Error("Invalid Quill container");let n=!t.theme||t.theme===p.DEFAULTS.theme?yr:p.import(`themes/${t.theme}`);if(!n)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);let m=p.DEFAULTS,{modules:i}=m,o=Wn(m,["modules"]),g=n.DEFAULTS,{modules:a}=g,l=Wn(g,["modules"]),u=Bo(t.modules);u!=null&&u.toolbar&&u.toolbar.constructor!==Object&&(u=Yt(C({},u),{toolbar:{container:u.toolbar}}));let c=rt({},Bo(i),Bo(a),u),h=C(C(C({},o),dd(l)),dd(t)),d=t.registry;return d?t.formats&&xr.warn('Ignoring "formats" option because "registry" is specified'):d=t.formats?cd(t.formats,h.registry,xr):h.registry,Yt(C({},h),{registry:d,container:e,theme:n,modules:Object.entries(c).reduce((x,A)=>{let[b,E]=A;if(!E)return x;let T=p.import(`modules/${b}`);return T==null?(xr.error(`Cannot load ${b} module. Are you sure you registered it?`),x):Yt(C({},x),{[b]:rt({},T.DEFAULTS||{},E)})},{}),bounds:hd(h.bounds)})}function Nt(r,t,e,s){if(!this.isEnabled()&&t===v.sources.USER&&!this.allowReadOnlyEdits)return new ge.default;let n=e==null?null:this.getSelection(),i=this.editor.delta,o=r();if(n!=null&&(e===!0&&(e=n.index),s==null?n=pd(n,o,t):s!==0&&(n=pd(n,e,s,t)),this.setSelection(n,v.sources.SILENT)),o.length()>0){let a=[v.events.TEXT_CHANGE,o,i,t];this.emitter.emit(v.events.EDITOR_CHANGE,...a),t!==v.sources.SILENT&&this.emitter.emit(...a)}return o}function Zt(r,t,e,s,n){let i={};return typeof r.index=="number"&&typeof r.length=="number"?typeof t!="number"?(n=s,s=e,e=t,t=r.length,r=r.index):(t=r.length,r=r.index):typeof t!="number"&&(n=s,s=e,e=t,t=0),typeof e=="object"?(i=e,n=s):typeof e=="string"&&(s!=null?i[e]=s:n=e),n=n||v.sources.API,[r,t,i,n]}function pd(r,t,e,s){let n=typeof e=="number"?e:0;if(r==null)return null;let i,o;return t&&typeof t.transformPosition=="function"?[i,o]=[r.index,r.index+r.length].map(a=>t.transformPosition(a,s!==v.sources.USER)):[i,o]=[r.index,r.index+r.length].map(a=>
vendor: 5,101 bytes, lines 14-15
14a<t||a===t&&s===v.sources.USER?a:n>=0?a+n:Math.max(t,a+n)),new Z(i,o-i)}var ge,xr,Nn,p,ot=f(()=>{ae();S();ge=ut(ft(),1);nd();Wt();Eo();ke();bt();Qr();od();Ro();ud();fd();xr=ht("quill"),Nn=new ce;st.uiClass="ql-ui";p=class r{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Nn,theme:"default"};static events=v.events;static sources=v.sources;static version="2.0.3";static imports={delta:ge.default,parchment:lr,"core/module":B,"core/theme":yr};static debug(t){t===!0&&(t="log"),ht.level(t)}static find(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Xr.get(t)||Nn.find(t,e)}static import(t){return this.imports[t]==null&&xr.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){let t=arguments.length<=0?void 0:arguments[0],e=!!(!(arguments.length<=1)&&arguments[1]),s="attrName"in t?t.attrName:t.blotName;typeof s=="string"?this.register(`formats/${s}`,t,e):Object.keys(t).forEach(n=>{this.register(n,t[n],e)})}else{let t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],s=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!s&&xr.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&typeof e!="boolean"&&e.blotName!=="abstract"&&Nn.register(e),typeof e.register=="function"&&e.register(Nn)}}constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=VA(t,e),this.container=this.options.container,this.container==null){xr.error("Invalid Quill container",t);return}this.options.debug&&r.debug(this.options.debug);let s=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",Xr.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new v;let n=jr.blotName,i=this.options.registry.query(n);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${n}" blot`);if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new sd(this.scroll),this.selection=new td(this.scroll,this.emitter),this.composition=new id(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(v.events.EDITOR_CHANGE,o=>{o===v.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(v.events.SCROLL_UPDATE,(o,a)=>{let l=this.selection.lastRange,[u]=this.selection.getRange(),c=l&&u?{oldRange:l,newRange:u}:void 0;Nt.call(this,()=>this.editor.update(null,a,c),o)}),this.emitter.on(v.events.SCROLL_EMBED_UPDATE,(o,a)=>{let l=this.selection.lastRange,[u]=this.selection.getRange(),c=l&&u?{oldRange:l,newRange:u}:void 0;Nt.call(this,()=>{let h=new ge.default().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(h,[],c)},r.sources.USER)}),s){let o=this.clipboard.convert({html:`${s}<p><br></p>`,text:` 15`});this.setContents(o)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){let s=t;t=document.createElement("div"),t.classList.add(s)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,s){return[t,e,,s]=Zt(t,e,s),Nt.call(this,()=>this.editor.deleteText(t,e),s,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;let e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.sources.API;return Nt.call(this,()=>{let n=this.getSelection(!0),i=new ge.default;if(n==null)return i;if(this.scroll.query(t,y.BLOCK))i=this.editor.formatLine(n.index,n.length,{[t]:e});else{if(n.length===0)return this.selection.format(t,e),i;i=this.editor.formatText(n.index,n.length,{[t]:e})}return this.setSelection(n,v.sources.SILENT),i},s)}formatLine(t,e,s,n,i){let o;return[t,e,o,i]=Zt(t,e,s,n,i),Nt.call(this,()=>this.editor.formatLine(t,e,o),i,t,0)}formatText(t,e,s,n,i){let o;return[t,e,o,i]=Zt(t,e,s,n,i),Nt.call(this,()=>this.editor.formatText(t,e,o),i,t,0)}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=null;if(typeof t=="number"?s=this.selection.getBounds(t,e):s=this.selection.getBounds(t.
15index,t.length),!s)return null;let n=this.container.getBoundingClientRect();return{bottom:s.bottom-n.top,height:s.height,left:s.left-n.left,right:s.right-n.left,top:s.top-n.top,width:s.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,e]=Zt(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=Zt(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=Zt(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,s){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:r.sources.API;return Nt.call(this,()=>this.editor.insertEmbed(t,e,s),n,t)}insertText(t,e,s,n,i){let o;return[t,,o,i]=Zt(t,0,s,n,i),Nt.call(this,()=>this.editor.insertText(t,e,o),i,t,e.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,e,s){return[t,e,,s]=Zt(t,e,s),Nt.call(this,()=>this.editor.removeFormat(t,e),s,t)}scrollRectIntoView(t){ld(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){let t=this.selection.lastRange,e=t&&this.selection.getBounds(t.index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.sources.API;return Nt.call(this,()=>{t=new ge.default(t);let s=this.getLength(),n=this.editor.deleteText(0,s),i=this.editor.insertContents(0,t),o=this.editor.deleteText(this.getLength()-1,1);return n.compose(i).compose(o)},e)}setSelection(t,e,s){t==null?this.selection.setRange(null,e||r.sources.API):([t,e,,s]=Zt(t,e,s),this.selection.setRange(new Z(Math.max(0,t),e),s),s!==v.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.sources.API,s=new ge.default().insert(t);return this.setContents(s,e)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.sources.API;return Nt.call(this,()=>(t=new ge.default(t),this.editor.applyDelta(t)),e,!0)}}});var Mo,yt,vr=f(()=>{S();Mo=class extends or{},yt=Mo});function md(r){return r instanceof D||r instanceof H}function gd(r){return typeof r.updateContent=="function"}function Do(r,t,e){e.reduce((s,n)=>{let i=xt.Op.length(n),o=n.attributes||{};if(n.insert!=null){if(typeof n.insert=="string"){let a=n.insert;r.insertAt(s,a);let[l]=r.descendant(U,s),u=it(l);o=xt.AttributeMap.diff(u,o)||{}}else if(typeof n.insert=="object"){let a=Object.keys(n.insert)[0];if(a==null)return s;if(r.insertAt(s,a,n.insert[a]),r.scroll.query(a,y.INLINE)!=null){let[u]=r.descendant(U,s),c=it(u);o=xt.AttributeMap.diff(c,o)||{}}}}
15return Object.keys(o).forEach(a=>{r.formatAt(s,i,a,o[a])}),s+i},t)}var xt,WA,bd,yd=f(()=>{S();xt=ut(ft(),1);Wt();gt();pe();vr();WA=(()=>{class r extends jr{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=D;static allowedChildren=[D,H,yt];constructor(e,s,n){let{emitter:i}=n;super(e,s),this.emitter=i,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",o=>this.handleDragStart(o))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;let e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(v.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(v.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,s){this.emitter.emit(v.events.SCROLL_EMBED_UPDATE,e,s)}deleteAt(e,s){let[n,i]=this.line(e),[o]=this.line(e+s);if(super.deleteAt(e,s),o!=null&&n!==o&&i>0){if(n instanceof H||o instanceof H){this.optimize();return}let a=o.children.head instanceof G?null:o.children.head;n.moveChildren(o,a),n.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,s,n,i){super.formatAt(e,s,n,i),this.optimize()}insertAt(e,s,n){if(e>=this.length())if(n==null||this.scroll.query(s,y.BLOCK)==null){let i=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(i),n==null&&s.endsWith(` 16`)?i.insertAt(0,s.slice(0,-1),n):i.insertAt(0,s,n)}else{let i=this.scroll.create(s,n);this.appendChild(i)}else super.insertAt(e,s,n);this.optimize()}insertBefore(e,s){if(e.statics.scope===y.INLINE_BLOT){let n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(e),super.insertBefore(n,s)}else super.insertBefore(e,s)}insertContents(e,s){let n=this.deltaToRenderBlocks(s.concat(new xt.default().insert(` 17`))),i=n.pop();if(i==null)return;this.batchStart();let o=n.shift();if(o){let u=o.type==="block"&&(o.delta.length()===0||!this.descendant(H,e)[0]&&e<this.length()),c=o.type==="block"?o.delta:new xt.default().insert({[o.key]:o.value});Do(this,e,c);let h=o.type==="block"?1:0,d=e+c.length()+h;u&&this.insertAt(d-1,` 18`);let m=it(this.line(e)[0]),g=xt.AttributeMap.diff(m,o.attributes)||{};Object.keys(g).forEach(x=>{this.formatAt(d-1,1,x,g[x])}),e=d}let[a,l]=this.children.find(e);
18if(n.length&&(a&&(a=a.split(l),l=0),n.forEach(u=>{if(u.type==="block"){let c=this.createBlock(u.attributes,a||void 0);Do(c,0,u.delta)}else{let c=this.create(u.key,u.value);this.insertBefore(c,a||void 0),Object.keys(u.attributes).forEach(h=>{c.format(h,u.attributes[h])})}})),i.type==="block"&&i.delta.length()){let u=a?a.offset(a.scroll)+l:this.length();Do(this,u,i.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(e){let s=this.path(e).pop();if(!s)return[null,-1];let[n,i]=s;return n instanceof U?[n,i]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(md,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,n=(i,o,a)=>{let l=[],u=a;return i.children.forEachAt(o,a,(c,h,d)=>{md(c)?l.push(c):c instanceof or&&(l=l.concat(n(c,h,u))),u-=d}),l};return n(this,e,s)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,s),e.length>0&&this.emitter.emit(v.events.SCROLL_OPTIMIZE,e,s))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let s=v.sources.USER;typeof e=="string"&&(s=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(n=>{let{target:i}=n,o=this.find(i,!0);return o&&!gd(o)}),e.length>0&&this.emitter.emit(v.events.SCROLL_BEFORE_UPDATE,s,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(v.events.SCROLL_UPDATE,s,e)}updateEmbedAt(e,s,n){let[i]=this.descendant(o=>o instanceof H,e);i&&i.statics.blotName===s&&gd(i)&&i.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){let s=[],n=new xt.default;return e.forEach(i=>{let o=i?.insert;if(o)if(typeof o=="string"){let a=o.split(` 19`);a.slice(0,-1).forEach(u=>{n.insert(u,i.attributes),s.push({type:"block",delta:n,attributes:i.attributes??{}}),n=new xt.default});let l=a[a.length-1];l&&n.insert(l,i.attributes)}else{let a=Object.keys(o)[0];if(!a)return;this.query(a,y.INLINE)?n.push(i):(n.length()&&s.push({type:"block",delta:n,attributes:{}}),n=new xt.default,s.push({type:"blockEmbed",key:a,value:o[a],attributes:i.attributes??{}}))}}),n.length()&&s.push({type:"block",delta:n,attributes:{}}),s}createBlock(e,s){let n,i={};Object.entries(e).forEach(l=>{let[u,c]=l;this.query(u,y.BLOCK&y.BLOT)!=null?n=u:i[u]=c});let o=this.create(n||this.statics.defaultChild.blotName,n?e[n]:void 0);this.insertBefore(o,s||void 0);let a=o.length();return Object.entries(i).forEach(l=>{let[u,c]=l;o.formatAt(0,a,u,c)}),o}}return r})();bd=WA});var jo,xd,Po,wn,Uo=f(()=>{S();jo={scope:y.BLOCK,whitelist:["right","center","justify"]},xd=new Q("align","align",jo),Po=new P("align","ql-align",jo),wn=new nt("align","text-align",jo)});var Jr,vd,ts,Sn=f(()=>{S();Jr=class extends nt{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${e.split(",").map(n=>`00${parseInt(n,10).toString(16)}`.slice(-2)).join("")}`):e}},vd=new P("color","ql-color",{scope:y.INLINE}),ts=new Jr("color","color",{scope:y.INLINE})});var Ad,es,Fo=f(()=>{S();Sn();Ad=new P("background","ql-bg",{scope:y.INLINE}),es=new Jr("background","background-color",{scope:y.INLINE})});var _t,z,Ed,Ln=f(()=>{gt();pe();Wr();Vt();Gt();vr();ot();_t=class extends yt{static create(t){let e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map(s=>s.length()<=1?"":s.domNode.innerText).join(` 20`).slice(t,t+e)}html(t,e){return`<pre> 21${Ie(this.code(t,e))} 22</pre>`}},z=(()=>{class r extends D{static TAB=" ";static register(){p.register(_t)}}return r})(),Ed=(()=>{class r extends V{}return r.blotName="code",r.tagName="CODE",r})();z.blotName="code-block";z.className="ql-code-block";z.tagName="DIV";_t.blotName="code-block-container";_t.className="ql-code-block-container";_t.tagName="DIV";_t.allowedChildren=[z];z.allowedChildren=[M,G,me];z.requiredContainer=_t});var Ho,On,zo,Cn,$o=f(()=>{S();Ho={scope:y.BLOCK,whitelist:["rtl"]},On=new Q("direction","dir",Ho),zo=new P("direction","ql-direction",Ho),Cn=new nt("direction","direction",Ho)});var Td,Go,Ko,_n,Vo=f(()=>{S();Td={scope:y.INLINE,whitelist:["serif","monospace"]},Go=new P("font","ql-font",Td),Ko=class extends nt{value(t){return super.value(t).replace(/["']/g,"")}},_n=new Ko("font","font-family",Td)});var Wo,qn,Zo=f(()=>{S();Wo=new P("size","ql-size",{scope:y.INLINE,whitelist:["small","large","huge"]}),qn=new nt("size","font-size",{scope:y.INLINE,whitelist:["10px","18px","32px"]})});function Nd(r){return{key:"Tab",shiftKey:!r,format:{"code-block":!0},handler(t,e){let{event:s}=e,n=this.quill.scroll.query("code-block"),{TAB:i}=n;if(t.length===0&&!s.shiftKey){this.quill.insertText(t.index,i,p.sources.USER),this.quill.setSelection(t.index+i.length,p.sources.SILENT);return}let o=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t),{index:a,length:l}=t;o.forEach((u,c)=>
vendor: 9,932 bytes, lines 22-27
22{r?(u.insertAt(0,i),c===0?a+=i.length:l+=i.length):u.domNode.textContent.startsWith(i)&&(u.deleteAt(0,i.length),c===0?a-=i.length:l-=i.length)}),this.quill.update(p.sources.USER),this.quill.setSelection(a,l,p.sources.SILENT)}}}function In(r,t){return{key:r,shiftKey:t,altKey:null,[r==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(s){let{index:n}=s;r==="ArrowRight"&&(n+=s.length+1);let[i]=this.quill.getLeaf(n);return i instanceof k?(r==="ArrowLeft"?t?this.quill.setSelection(s.index-1,s.length+1,p.sources.USER):this.quill.setSelection(s.index-1,p.sources.USER):t?this.quill.setSelection(s.index,s.length+1,p.sources.USER):this.quill.setSelection(s.index+s.length+1,p.sources.USER),!1):!0}}}function Xo(r){return{key:r[0],shortKey:!0,handler(t,e){this.quill.format(r,!e.format[r],p.sources.USER)}}}function wd(r){return{key:r?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,e){let s=r?"prev":"next",n=e.line,i=n.parent[s];if(i!=null){if(i.statics.blotName==="table-row"){let o=i.children.head,a=n;for(;a.prev!=null;)a=a.prev,o=o.next;let l=o.offset(this.quill.scroll)+Math.min(e.offset,o.length()-1);this.quill.setSelection(l,0,p.sources.USER)}}else{let o=n.table()[s];o!=null&&(r?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,p.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,p.sources.USER))}return!1}}}function YA(r){if(typeof r=="string"||typeof r=="number")r={key:r};else if(typeof r=="object")r=Ot(r);else return null;return r.shortKey&&(r[XA]=r.shortKey,delete r.shortKey),r}function ss(r){let{quill:t,range:e}=r,s=t.getLines(e),n={};if(s.length>1){let i=s[0].formats(),o=s[s.length-1].formats();n=X.AttributeMap.diff(o,i)||{}}t.deleteText(e,p.sources.USER),Object.keys(n).length>0&&t.formatLine(e.index,1,n,p.sources.USER),t.setSelection(e.index,p.sources.SILENT)}function JA(r,t,e,s){return t.prev==null&&t.next==null?e.prev==null&&e.next==null?s===0?-1:1:e.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}var X,ZA,XA,rs,QA,kn=f(()=>{ae();X=ut(ft(),1);S();ot();ke();bt();ZA=ht("quill:keyboard"),XA=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",rs=class r extends B{static match(t,e){return["altKey","ctrlKey","metaKey","shiftKey"].some(s=>!!e[s]!==t[s]&&e[s]!==null)?!1:e.key===t.key||e.key===t.which}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach(s=>{this.options.bindings[s]&&this.addBinding(this.options.bindings[s])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=YA(t);if(n==null){ZA.warn("Attempted to add invalid keyboard binding",n);return}typeof e=="function"&&(e={handler:e}),typeof s=="function"&&(s={handler:s}),(Array.isArray(n.key)?n.key:[n.key]).forEach(o=>{let a=C(C(Yt(C({},n),{key:o}),e),s);this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;let n=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(b=>r.match(t,b));if(n.length===0)return;let i=p.find(t.target,!0);if(i&&i.scroll!==this.quill.scroll)return;let o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;let[a,l]=this.quill.getLine(o.index),[u,c]=this.quill.getLeaf(o.index),[h,d]=o.length===0?[u,c]:this.quill.getLeaf(o.index+o.length),m=u instanceof ar?u.value().slice(0,c):"",g=h instanceof ar?h.value().slice(d):"",x={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:l,prefix:m,suffix:g,event:t};n.some(b=>{if(b.collapsed!=null&&b.collapsed!==x.collapsed||b.empty!=null&&b.empty!==x.empty||b.offset!=null&&b.offset!==x.offset)return!1;if(Array.isArray(b.format)){if(b.format.every(E=>x.format[E]==null))return!1}else if(typeof b.format=="object"&&!Object.keys(b.format).every(E=>b.format[E]===!0?x.format[E]!=null:b.format[E]===!1?x.format[E]==null:Ee(b.format[E],x.format[E])))return!1;return b.prefix!=null&&!b.prefix.test(x.prefix)||b.suffix!=null&&!b.suffix.test(x.suffix)?!1:b.handler.call(this,o,x,b)!==!0})&&t.preventDefault()})}handleBackspace(t,e){let s=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let n={},[i]=this.quill.getLine(t.index),o=new X.default().retain(t.index-s).delete(s);if(e.offset===0){let[a]=this.quill.getLine(t.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){let u=i.formats(),c=this.quill.getFormat(t.index-1,1);if(n=X.AttributeMap.diff(u,c)||{},Object.keys(n).length>0){let h=new X.default().retain(t.index+i.length()-2).retain(1,n);o=o.compose(h)}}}this.quill.updateContents(o,p.sources.USER),this.quill.focus()}handleDelete(t,e){let s=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-s)return;let n={},[i]=this.quill.getLine(t.index),o=new X.default().retain(t.index).delete(s);if(e.offset>=i.length()-1){let[a]=this.quill.getLine(t.index+1);if(a){let l=i.formats(),u=this.quill.getFormat(t.index,1);n=X.AttributeMap.diff(l,u)||{},Object.keys(n).length>0&&(o=o.retain(a.length()-1).retain(1,n))}}this.quill.updateContents(o,p.sources.USER),this.quill.focus()}handleDeleteRange(t){ss({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){let s=Object.keys(e.format).reduce((i,o)=>(this.quill.scroll.query(o,y.BLOCK)&&!Array.isArray(e.format[o])&&(i[o]=e.format[o]),i),{}),n=new X.default().retain(t.index).delete(t.length).insert(` 23`,s);this.quill.updateContents(n,p.sources.USER),this.quill.setSelection(t.index+1,p.sources.SILENT),this.quill.focus()}},QA={bindings:{bold:Xo("bold"),italic:Xo("italic"),underline:Xo("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(r,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",p.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(r,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",p.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(r,t){t.format.indent!=null?this.quill.format("indent","-1",p.sources.USER):t.format.list!=null&&this.quill.format("list",!1,p.sources.USER)}},"indent code-block":Nd(!0),"outdent code-block":Nd(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(r){this.quill.deleteText(r.index-1,1,p.sources.USER)}},tab:{key:"Tab",handler(r,t){if(t.format.table)return!0;this.quill.history.cutoff();let e=new X.default().retain(r.index).delete(r.length).insert(" ");return this.quill.updateContents(e,p.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index+1,p.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,p.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(r,t){let e={list:!1};t.format.indent&&(e.indent=!1),this.quill.formatLine(r.index,r.length,e,p.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(r){let[t,e]=this.quill.getLine(r.index),s=Yt(C({},t.formats()),{list:"checked"}),n=new X.default().retain(r.index).insert(` 24`,s).retain(t.length()-e-1).retain(1,{list:"unchecked"});this.quill.updateContents(n,p.sources.USER),this.quill.setSelection(r.index+1,p.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(r,t){let[e,s]=this.quill.getLine(r.index),n=new X.default().retain(r.index).insert(` 25`,t.format).retain(e.length()-s-1).retain(1,{header:null});this.quill.updateContents(n,p.sources.USER),this.quill.setSelection(r.index+1,p.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(r){let t=this.quill.getModule("table");if(t){let[e,s,n,i]=t.getTable(r),o=JA(e,s,n,i);if(o==null)return;let a=e.offset();if(o<0){let l=new X.default().retain(a).insert(` 26`);this.quill.updateContents(l,p.sources.USER),this.quill.setSelection(r.index+1,r.length,p.sources.SILENT)}else if(o>0){a+=e.length();let l=new X.default().retain(a).insert(` 27`);this.quill.updateContents(l,p.sources.USER),this.quill.setSelection(a,p.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(r,t){let{event:e,line:s}=t,n=s.offset(this.quill.scroll);e.shiftKey?this.quill.setSelection(n-1,p.sources.USER):this.quill.setSelection(n+s.length(),p.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(r,t){if(this.quill.scroll.query("list")==null)return!0;let{length:e}=t.prefix,[s,n]=this.quill.getLine(r.index);if(n>e)return!0;let i;switch(t.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;
27case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(r.index," ",p.sources.USER),this.quill.history.cutoff();let o=new X.default().retain(r.index-n).delete(e+1).retain(s.length()-2-n).retain(1,{list:i});return this.quill.updateContents(o,p.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index-e,p.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(r){let[t,e]=this.quill.getLine(r.index),s=2,n=t;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,s-=1,s<=0){let i=new X.default().retain(r.index+t.length()-e-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,p.sources.USER),this.quill.setSelection(r.index-1,p.sources.SILENT),!1}return!0}},"embed left":In("ArrowLeft",!1),"embed left shift":In("ArrowLeft",!0),"embed right":In("ArrowRight",!1),"embed right shift":In("ArrowRight",!0),"table down":wd(!1),"table up":wd(!0)}};rs.DEFAULTS=QA});function Qo(r){r.querySelector('[id^="docs-internal-guid-"]')&&(sE(r),rE(r))}var tE,eE,Sd,rE,sE,Ld=f(()=>{tE=/font-weight:\s*normal/,eE=["P","OL","UL"],Sd=r=>r&&eE.includes(r.tagName),rE=r=>{Array.from(r.querySelectorAll("br")).filter(t=>Sd(t.previousElementSibling)&&Sd(t.nextElementSibling)).forEach(t=>{t.parentNode?.removeChild(t)})},sE=r=>{Array.from(r.querySelectorAll('b[style*="font-weight"]')).filter(t=>t.getAttribute("style")?.match(tE)).forEach(t=>{let e=r.createDocumentFragment();e.append(...t.childNodes),t.parentNode?.replaceChild(e,t)})}});function Yo(r){r.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&lE(r)}var nE,iE,oE,aE,lE,Od=f(()=>{nE=/\bmso-list:[^;]*ignore/i,iE=/\bmso-list:[^;]*\bl(\d+)/i,oE=/\bmso-list:[^;]*\blevel(\d+)/i,aE=(r,t)=>{let e=r.getAttribute("style"),s=e?.match(iE);if(!s)return null;let n=Number(s[1]),i=e?.match(oE),o=i?Number(i[1]):1,a=new RegExp(`@list l${n}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=t.match(a),u=l&&l[1]==="bullet"?"bullet":"ordered";return{id:n,indent:o,type:u,element:r}},lE=r=>{let t=Array.from(r.querySelectorAll("[style*=mso-list]")),e=[],s=[];t.forEach(o=>{(o.getAttribute("style")||"").match(nE)?e.push(o):s.push(o)}),e.forEach(o=>o.parentNode?.removeChild(o));let n=r.documentElement.innerHTML,i=s.map(o=>aE(o,n)).filter(o=>o);for(;i.length;){let o=[],a=i.shift();for(;a;)o.push(a),a=i.length&&i[0]?.element===a.element.nextElementSibling&&i[0].id===a.id?i.shift():null;let l=document.createElement("ul");o.forEach(h=>{let d=document.createElement("li");d.setAttribute("data-list",h.type),h.indent>1&&d.setAttribute("class",`ql-indent-${h.indent-1}`),d.innerHTML=h.element.innerHTML,l.appendChild(d)});let u=o[0]?.element,{parentNode:c}=u??{};u&&c?.replaceChild(l,u),o.slice(1).forEach(h=>{let{element:d}=h;c?.removeChild(d)})}}});var uE,cE,Cd,_d=f(()=>{Ld();Od();uE=[Yo,Qo],cE=r=>
vendor: 9,214 bytes, lines 27-40
27{r.documentElement&&uE.forEach(t=>{t(r)})},Cd=cE});function Re(r,t,e,s){return s.query(t)?r.reduce((n,i)=>{if(!i.insert)return n;if(i.attributes&&i.attributes[t])return n.push(i);let o=e?{[t]:e}:{};return n.insert(i.insert,C(C({},o),i.attributes))},new at.default):r}function ns(r,t){let e="";for(let s=r.ops.length-1;s>=0&&e.length<t.length;--s){let n=r.ops[s];if(typeof n.insert!="string")break;e=n.insert+e}return e.slice(-1*t.length)===t}function be(r,t){if(!(r instanceof Element))return!1;let e=t.query(r);return e&&e.prototype instanceof k?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(r.tagName.toLowerCase())}function pE(r,t){return r.previousElementSibling&&r.nextElementSibling&&!be(r.previousElementSibling,t)&&!be(r.nextElementSibling,t)}function Rd(r){return r==null?!1:(Rn.has(r)||(r.tagName==="PRE"?Rn.set(r,!0):Rn.set(r,Rd(r.parentNode))),Rn.get(r))}function Bn(r,t,e,s,n){return t.nodeType===t.TEXT_NODE?s.reduce((i,o)=>o(t,i,r),new at.default):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((i,o)=>{let a=Bn(r,o,e,s,n);return o.nodeType===t.ELEMENT_NODE&&(a=e.reduce((l,u)=>u(o,l,r),a),a=(n.get(o)||[]).reduce((l,u)=>u(o,l,r),a)),i.concat(a)},new at.default):new at.default}function Jo(r){return(t,e,s)=>Re(e,r,!0,s)}function mE(r,t,e){let s=Q.keys(r),n=P.keys(r),i=nt.keys(r),o={};return s.concat(n).concat(i).forEach(a=>{let l=e.query(a,y.ATTRIBUTE);l!=null&&(o[l.attrName]=l.value(r),o[l.attrName])||(l=dE[a],l!=null&&(l.attrName===a||l.keyName===a)&&(o[l.attrName]=l.value(r)||void 0),l=qd[a],l!=null&&(l.attrName===a||l.keyName===a)&&(l=qd[a],o[l.attrName]=l.value(r)||void 0))}),Object.entries(o).reduce((a,l)=>{let[u,c]=l;return Re(a,u,c,e)},t)}function gE(r,t,e){let s=e.query(r);if(s==null)return t;if(s.prototype instanceof k){let n={},i=s.value(r);if(i!=null)return n[s.blotName]=i,new at.default().insert(n,s.formats(r,e))}else if(s.prototype instanceof Te&&!ns(t,` 28`)&&t.insert(` 29`),"blotName"in s&&"formats"in s&&typeof s.formats=="function")return Re(t,s.blotName,s.formats(r,e),e);return t}function bE(r,t){return ns(t,` 30`)||t.insert(` 31`),t}function yE(r,t,e){let s=e.query("code-block"),n=s&&"formats"in s&&typeof s.formats=="function"?s.formats(r,e):!0;return Re(t,"code-block",n,e)}function xE(){return new at.default}function vE(r,t,e){let s=e.query(r);if(s==null||s.blotName!=="list"||!ns(t,` 32`))return t;let n=-1,i=r.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(n+=1),i=i.parentNode;return n<=0?t:t.reduce((o,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?o.push(a):o.insert(a.insert,C({indent:n},a.attributes||{})):o,new at.default)}function AE(r,t,e){let s=r,n=s.tagName==="OL"?"ordered":"bullet",i=s.getAttribute("data-checked");return i&&(n=i==="true"?"checked":"unchecked"),Re(t,"list",n,e)}function Id(r,t,e){if(!ns(t,` 33`)){if(be(r,e)&&(r.childNodes.length>0||r instanceof HTMLParagraphElement))return t.insert(` 34`);if(t.length()>0&&r.nextSibling){let s=r.nextSibling;for(;s!=null;){if(be(s,e))return t.insert(` 35`);let n=e.query(s);if(n&&n.prototype instanceof H)return t.insert(` 36`);s=s.firstChild}}}return t}function EE(r,t,e){let s={},n=r.style||{};return n.fontStyle==="italic"&&(s.italic=!0),n.textDecoration==="underline"&&(s.underline=!0),n.textDecoration==="line-through"&&(s.strike=!0),(n.fontWeight?.startsWith("bold")||parseInt(n.fontWeight,10)>=700)&&(s.bold=!0),t=Object.entries(s).reduce((i,o)=>{let[a,l]=o;return Re(i,a,l,e)},t),parseFloat(n.textIndent||0)>0?new at.default().insert(" ").concat(t):t}function TE(r,t,e){let s=r.parentElement?.tagName==="TABLE"?r.parentElement:r.parentElement?.parentElement;if(s!=null){let i=Array.from(s.querySelectorAll("tr")).indexOf(r)+1;return Re(t,"table",i,e)}return t}function NE(r,t,e){let s=r.data;if(r.parentElement?.tagName==="O:P")return t.insert(s.trim());if(!Rd(r)){if(s.trim().length===0&&s.includes(` 37`)&&!pE(r,e))return t;s=s.replace(/[^\S\u00a0]/g," "),s=s.replace(/ {2,}/g," "),(r.previousSibling==null&&r.parentElement!=null&&be(r.parentElement,e)||r.previousSibling instanceof Element&&be(r.previousSibling,e))&&(s=s.replace(/^ /,"")),(r.nextSibling==null&&r.parentElement!=null&&be(r.parentElement,e)||r.nextSibling instanceof Element&&be(r.nextSibling,e))&&(s=s.replace(/ $/,"")),s=s.replaceAll("\xA0"," ")}return t.insert(s)}var at,fE,hE,dE,qd,kd,Rn,ta=f(()=>{S();at=ut(ft(),1);gt();ke();bt();ot();Uo();Fo();Ln();Sn();$o();Vo();Zo();kn();_d();fE=ht("quill:clipboard"),hE=[[Node.TEXT_NODE,NE],[Node.TEXT_NODE,Id],["br",bE],[Node.ELEMENT_NODE,Id],[Node.ELEMENT_NODE,gE],[Node.ELEMENT_NODE,mE],[Node.ELEMENT_NODE,EE],["li",vE],["ol, ul",AE],["pre",yE],["tr",TE],["b",Jo("bold")],["i",Jo("italic")],["strike",Jo("strike")],["style",xE]],dE=[xd,On].reduce((r,t)=>(r[t.keyName]=t,r),{}),qd=[wn,es,ts,Cn,_n,qn].reduce((r,t)=>(r[t.keyName]=t,r),{}),kd=(()=>{class r extends B{static DEFAULTS={matchers:[]};constructor(e,s){super(e,s),this.quill.root.addEventListener("copy",n=>this.onCaptureCopy(n,!1)),this.quill.root.addEventListener("cut",n=>this.onCaptureCopy(n,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],hE.concat(this.options.matchers??[]).forEach(n=>{let[i,o]=n;this.addMatcher(i,o)})}addMatcher(e,s){this.matchers.push([e,s])}convert(e){let{html:s,text:n}=e,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i[z.blotName])return new at.default().insert(n||"",{[z.blotName]:i[z.blotName]});if(!s)return new at.default().insert(n||"",i);let o=this.convertHTML(s);return ns(o,` 38`)&&(o.ops[o.ops.length-1].attributes==null||i.table)?o.compose(new at.default().retain(o.length()-1).delete(1)):o}normalizeHTML(e){Cd(e)}convertHTML(e){let s=new DOMParser().parseFromString(e,"text/html");this.normalizeHTML(s);let n=s.body,i=new WeakMap,[o,a]=this.prepareMatching(n,i);return Bn(this.quill.scroll,n,o,a,i)}dangerouslyPasteHTML(e,s){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.sources.API;if(typeof e=="string"){let i=this.convert({html:e,text:""});this.quill.setContents(i,s),this.quill.setSelection(0,p.sources.SILENT)}else{let i=this.convert({html:s,text:""});this.quill.updateContents(new at.default().retain(e).concat(i),n),this.quill.setSelection(e+i.length(),p.sources.SILENT)}}onCaptureCopy(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();let[n]=this.quill.selection.getRange();if(n==null)return;let{html:i,text:o}=this.onCopy(n,s);e.clipboardData?.setData("text/plain",o),e.clipboardData?.setData("text/html",i),s&&ss({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(s=>s[0]!=="#").join(` 39`)}onCapturePaste(e){if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();let s=this.quill.getSelection(!0);if(s==null)return;let n=e.clipboardData?.getData("text/html"),i=e.clipboardData?.getData("text/plain");if(!n&&!i){let a=e.clipboardData?.getData("text/uri-list");a&&(i=this.normalizeURIList(a))}let o=Array.from(e.clipboardData?.files||[]);if(!n&&o.length>0){this.quill.uploader.upload(s,o);return}if(n&&o.length>0){let a=new DOMParser().parseFromString(n,"text/html");if(a.body.childElementCount===1&&a.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(s,o);return}}this.onPaste(s,{html:n,text:i})}onCopy(e){let s=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:s}}onPaste(e,s){let{text:n,html:i}=s,o=this.quill.getFormat(e.index),a=this.convert({text:n,html:i},o);fE.log("onPaste",a,{text:n,html:i});let l=new at.default().retain(e.index).delete(e.length).concat(a);this.quill.updateContents(l,p.sources.USER),this.quill.setSelection(l.length()-e.length,p.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,s){let n=[],i=[];return this.matchers.forEach(o=>{let[a,l]=o;switch(a){case Node.TEXT_NODE:i.push(l);break;case Node.ELEMENT_NODE:n.push(l);break;default:Array.from(e.querySelectorAll(a)).forEach(u=>{s.has(u)?s.get(u)?.push(l):s.set(u,[l])});break}}),[n,i]}}return r})();Rn=new WeakMap});function Bd(r,t){let e=t;for(let s=r.length-1;s>=0;s-=1){let n=r[s];r[s]={delta:e.transform(n.delta,!0),range:n.range&&ea(n.range,e)},e=n.delta.transform(e),r[s].delta.length()===0&&r.splice(s,1)}}function wE(r,t){let e=t.ops[t.ops.length-1];return e==null?!1:e.insert!=null?typeof e.insert=="string"&&e.insert.endsWith(` 40`):e.attributes!=null?Object.keys(e.attributes).some(s=>r.query(s,y.BLOCK)!=null):!1}function SE(r,t){let e=t.reduce((n,i)=>n+(i.delete||0),0),s=t.length()-e;return wE(r,t)&&(s-=1),s}function ea(r,t){if(!r)return r;let e=t.transformPosition(r.index),s=t.transformPosition(r.index+r.length);return{index:e,length:s-e}}var Md,Dd=f(()=>{S();bt();ot();Md=(()=>{class r extends B{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(e,s){super(e,s),this.quill.on(p.events.EDITOR_CHANGE,(n,i,o,a)=>{n===p.events.SELECTION_CHANGE?i&&a!==p.sources.SILENT&&(this.currentRange=i):n===
40p.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===p.sources.USER?this.record(i,o):this.transform(i)),this.currentRange=ea(this.currentRange,i))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",n=>{n.inputType==="historyUndo"?(this.undo(),n.preventDefault()):n.inputType==="historyRedo"&&(this.redo(),n.preventDefault())})}change(e,s){if(this.stack[e].length===0)return;let n=this.stack[e].pop();if(!n)return;let i=this.quill.getContents(),o=n.delta.invert(i);this.stack[s].push({delta:o,range:ea(n.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,p.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,s){if(e.ops.length===0)return;this.stack.redo=[];let n=e.invert(s),i=this.currentRange,o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){let a=this.stack.undo.pop();a&&(n=n.compose(a.delta),i=a.range)}else this.lastRecorded=o;n.length()!==0&&(this.stack.undo.push({delta:n,range:i}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(e){Bd(this.stack.undo,e),Bd(this.stack.redo,e)}undo(){this.change("undo","redo")}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,p.sources.USER);else{let s=SE(this.quill.scroll,e.delta);this.quill.setSelection(s,p.sources.USER)}}}return r})()});var jd,LE,Pd,Ud=f(()=>{jd=ut(ft(),1);Wt();bt();LE=(()=>{class r extends B{constructor(e,s){super(e,s),e.root.addEventListener("drop",n=>{n.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(n.clientX,n.clientY);else if(document.caretPositionFromPoint){let a=document.caretPositionFromPoint(n.clientX,n.clientY);i=document.createRange(),i.setStart(a.offsetNode,a.offset),i.setEnd(a.offsetNode,a.offset)}let o=i&&e.selection.normalizeNative(i);if(o){let a=e.selection.normalizedToRange(o);n.dataTransfer?.files&&this.upload(a,n.dataTransfer.files)}})}upload(e,s){let n=[];Array.from(s).forEach(i=>{i&&this.options.mimetypes?.includes(i.type)&&n.push(i)}),n.length>0&&this.options.handler.call(this,e,n)}}return r.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,e){if(!this.quill.scroll.query("image"))return;let s=e.map(n=>new Promise(i=>{let o=new FileReader;o.onload=()=>{i(o.result)},o.readAsDataURL(n)}));Promise.all(s).then(n=>{let i=n.reduce((o,a)=>o.insert({image:a}),new jd.default().retain(t.index).delete(t.length));this.quill.updateContents(i,v.sources.USER),this.quill.setSelection(t.index+n.length,v.sources.SILENT)})}},r})(),Pd=LE});function CE(r){return typeof r.data=="string"?r.data:r.dataTransfer?.types.includes("text/plain")?r.dataTransfer.getData("text/plain"):null}var Fd,OE,ra,Hd,zd=f(()=>{Fd=ut(ft(),1);bt();ot();kn();OE=["insertText","insertReplacementText"],ra=class extends B{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",s=>{this.handleBeforeInput(s)}),/Android/i.test(navigator.userAgent)||t.on(p.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){ss({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(e){let s=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new Fd.default().retain(t.index).insert(e,s),p.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,p.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!OE.includes(t.inputType))return;let e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||e.collapsed===!0)return;let s=CE(t);if(s==null)return;let n=this.quill.selection.normalizeNative(e),i=n?this.quill.selection.normalizedToRange(n):null;i&&this.replaceText(i,s)&&t.preventDefault()}handleCompositionStart(){let t=this.quill.getSelection();t&&this.replaceText(t)}};Hd=ra});var _E,qE,IE,sa,$d,Kd=f(()=>{S();bt();ot();_E=/Mac/i.test(navigator.platform),qE=100,IE=r=>!!(r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.ke
40y==="ArrowDown"||r.key==="Home"||_E&&r.key==="a"&&r.ctrlKey===!0),sa=class extends B{isListening=!1;selectionChangeDeadline=0;constructor(t,e){super(t,e),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,e){let{line:s,event:n}=e;if(!(s instanceof st)||!s.uiNode)return!0;let i=getComputedStyle(s.domNode).direction==="rtl";return i&&n.key!=="ArrowRight"||!i&&n.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(n.shiftKey?1:0),p.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&IE(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+qE,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let e=t.getRangeAt(0);if(e.collapsed!==!0||e.startOffset!==0)return;let s=this.quill.scroll.find(e.startContainer);if(!(s instanceof st)||!s.uiNode)return;let n=document.createRange();n.setStartAfter(s.uiNode),n.setEndAfter(s.uiNode),t.removeAllRanges(),t.addRange(n)}},$d=sa});var vt,Mn,na=f(()=>{ot();gt();pe();vr();Wr();En();Vt();yd();Gt();ta();Dd();kn();Ud();vt=ut(ft(),1);zd();Kd();bt();p.register({"blots/block":D,"blots/block/embed":H,"blots/break":G,"blots/container":yt,"blots/cursor":me,"blots/embed":br,"blots/inline":V,"blots/scroll":bd,"blots/text":M,"modules/clipboard":kd,"modules/history":Md,"modules/keyboard":rs,"modules/uploader":Pd,"modules/input":Hd,"modules/uiNode":$d});Mn=p});var ia,kE,Gd,Vd=f(()=>{S();ia=class extends P{add(t,e){let s=0;if(e==="+1"||e==="-1"){let n=this.value(t)||0;s=e==="+1"?n+1:n-1}else typeof e=="number"&&(s=e);return s===0?(this.remove(t),!0):super.add(t,s.toString())}canAdd(t,e){return super.canAdd(t,e)||super.canAdd(t,parseInt(e,10))}value(t){return parseInt(super.value(t),10)||void 0}},kE=new ia("indent","ql-indent",{scope:y.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),Gd=kE});var RE,Wd,Zd=f(()=>{gt();RE=(()=>{class r extends D{static blotName="blockquote";static tagName="blockquote"}return r})(),Wd=RE});var BE,Xd,Qd=f(()=>{gt();BE=(()=>{class r extends D{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(e){return this.tagName.indexOf(e.tagName)+1}}return r})(),Xd=BE});var oa,Dn,Yd=f(()=>{gt();vr();ot();oa=(()=>{class r extends yt{}return r.blotName="list-container",r.tagName="OL",r})(),Dn=(()=>{class r extends D{static create(e){let s=super.create();return s.setAttribute("data-list",e),s}static formats(e){return e.getAttribute("data-list")||void 0}static register(){p.register(oa)}constructor(e,s){super(e,s);let n=s.ownerDocument.createElement("span"),i=o=>{if(!e.isEnabled())return;let a=this.statics.formats(s,e);a==="checked"?(this.format("list","unchecked"),o.preventDefault()):a==="unchecked"&&(this.format("list","checked"),o.preventDefault())};n.addEventListener("mousedown",i),n.addEventListener("touchstart",i),this.attachUI(n)}format(e,s){e===this.statics.blotName&&s?this.domNode.setAttribute("data-list",s):super.format(e,s)}}return r.blotName="list",r.tagName="LI",r})();oa.allowedChildren=[Dn];Dn.requiredContainer=oa});var ME,Ar,jn=f(()=>{Vt();ME=(()=>{class r extends V{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}return r})(),Ar=ME});var DE,Jd,tp=f(()=>{jn();DE=(()=>{class r extends Ar{static blotName="italic";static tagName=["EM","I"]}return r})(),Jd=DE});function aa(r,t){let e=document.createElement("a");e.href=r;let s=e.href.slice(0,e.href.indexOf(":"));return t.indexOf(s)>-1}var Be,is=f(()=>{Vt();Be=(()=>{class r extends V{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(e){let s=super.create(e);return s.setAttribute("href",this.sanitize(e)),s.setAttribute("rel","noopener noreferrer"),s.setAttribute("target","_blank"),s}static formats(e){return e.getAttribute("href")}static sanitize(e){return aa(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,s){e!==this.statics.blotName||!s?super.format(e,s):this.domNode.setAttribute("href",this.constructor.sanitize(s))}}return r})()});var jE,ep,rp=f(()=>{Vt();jE=(()=>{class r extends V{static blotName="script";static tagName=["SUB","SUP"];static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}return r})(),ep=jE});var PE,sp,np=f(()=>{jn();PE=(()=>{class r extends Ar{static blotName="strike";static tagName=["S","STRIKE"]}return r})(),sp=PE});var UE,ip,op=f(()=>{Vt();UE=(()=>{class r extends V{static blotName="underline";static tagName="U"}return r})(),ip=UE});var FE,ap,lp=f(()=>{En();FE=(()=>{class r extends br{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let s=super.create(e);return typeof e=="string"&&(window.katex.render(e,s,{throwOnError:!1,errorColor:"#f00"}),s.setAttribute("data-value",e)),s}static value(e){return e.getAttribute("data-value")}html(){let{formula:e}=this.value();return`<span>${e}</span>`}}return r})(),ap=FE});var up,HE,cp,fp=f(()=>{S();is();up=["alt","height","width"],HE=(()=>{class r extends k{static blotName="image";static tagName="IMG";static create(e){let s=super.create(e);return typeof e=="string"&&s.setAttribute("src",this.sanitize(e)),s}static formats(e){return up.reduce((s,n)=>(e.hasAttribute(n)&&(s[n]=e.getAttribute(n)),s),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return aa(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,s){up.indexOf(e)>-1?s?this.domNode.setAttribute(e,s):this.domNode.removeAttribute(e):super.format(e,s)}}return r})(),cp=HE});var hp,zE,dp,pp=f(()=>{gt();is();hp=["height","width"],zE=(()=>{class r extends H{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(e){let s=super.create(e);return s.setAttribute("frameborder","0"),s.setAttribute("allowfullscreen","true"),s.setAttribute("src",this.sanitize(e)),s}static formats(e){return hp.reduce((s,n)=>(e.hasAttribute(n)&&(s[n]=e.getAttribute(n)),s),{})}static sanitize(e){return Be.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,s){hp.indexOf(e)>-1?s?this.domNode.setAttribute(e,s):this.domNode.removeAttribute(e):super.format(e,s)}html(){let{video:e}=this.value();return`<a href="${e}">${e}</a>`}}return r})(),dp=zE});var Un,os,as,lt,Pn,$E,ls,mp=f(()=>{Un=ut(ft(),1);S();Vt();
40ot();bt();gt();pe();Wr();Gt();Ln();ta();os=new P("code-token","hljs",{scope:y.INLINE}),as=(()=>{class r extends V{static formats(e,s){for(;e!=null&&e!==s.domNode;){if(e.classList&&e.classList.contains(z.className))return super.formats(e,s);e=e.parentNode}}constructor(e,s,n){super(e,s,n),os.add(this.domNode,n)}format(e,s){e!==r.blotName?super.format(e,s):s?os.add(this.domNode,s):(os.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),os.value(this.domNode)||this.unwrap()}}return r.blotName="code-token",r.className="ql-token",r})(),lt=class extends z{static create(t){let e=super.create(t);return typeof t=="string"&&e.setAttribute("data-language",t),e}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-language",e):super.format(t,e)}replaceWith(t,e){return this.formatAt(0,this.length(),as.blotName,!1),super.replaceWith(t,e)}},Pn=(()=>{class r extends _t{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,s){e===lt.blotName&&(this.forceNext=!0,this.children.forEach(n=>{n.format(e,s)}))}formatAt(e,s,n,i){n===lt.blotName&&(this.forceNext=!0),super.formatAt(e,s,n,i)}highlight(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let i=`${Array.from(this.domNode.childNodes).filter(a=>a!==this.uiNode).map(a=>a.textContent).join(` 41`)} 42`,o=lt.formats(this.children.head.domNode);if(s||this.forceNext||this.cachedText!==i){if(i.trim().length>0||this.cachedText==null){let a=this.children.reduce((u,c)=>u.concat(xo(c,!1)),new Un.default),l=e(i,o);a.diff(l).reduce((u,c)=>{let{retain:h,attributes:d}=c;return h?(d&&Object.keys(d).forEach(m=>{[lt.blotName,as.blotName].includes(m)&&this.formatAt(u,h,m,d[m])}),u+h):u},0)}this.cachedText=i,this.forceNext=!1}}html(e,s){let[n]=this.children.find(e);return`<pre data-language="${n?lt.formats(n.domNode):"plain"}"> 43${Ie(this.code(e,s))} 44</pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){let s=lt.formats(this.children.head.domNode);s!==this.uiNode.value&&(this.uiNode.value=s)}}}return r.allowedChildren=[lt],r})();lt.requiredContainer=Pn;lt.allowedChildren=[as,me,M,G];$E=(r,t,e)=>{if(typeof r.versionString=="string"){let s=r.versionString.split(".")[0];if(parseInt(s,10)>=11)return r.highlight(e,{language:t}).value}return r.highlight(t,e).value},ls=class extends B{static register(){p.register(as,!0),p.register(lt,!0),p.register(Pn,!0)}constructor(t,e){if(super(t,e),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((s,n)=>{let{key:i}=n;return s[i]=!0,s},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(p.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof Pn))return;let e=this.quill.root.ownerDocument.createElement("select");
44this.options.languages.forEach(s=>{let{key:n,label:i}=s,o=e.ownerDocument.createElement("option");o.textContent=i,o.setAttribute("value",n),e.appendChild(o)}),e.addEventListener("change",()=>{t.format(lt.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(e),t.children.head&&(e.value=lt.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(p.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(p.sources.USER);let s=this.quill.getSelection();(t==null?this.quill.scroll.descendants(Pn):[t]).forEach(i=>{i.highlight(this.highlightBlot,e)}),this.quill.update(p.sources.SILENT),s!=null&&this.quill.setSelection(s,p.sources.SILENT)}highlightBlot(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(e=this.languages[e]?e:"plain",e==="plain")return Ie(t).split(` 45`).reduce((n,i,o)=>(o!==0&&n.insert(` 46`,{[z.blotName]:e}),n.insert(i)),new Un.default);let s=this.quill.root.ownerDocument.createElement("div");return s.classList.add(z.className),s.innerHTML=$E(this.options.hljs,e,t),Bn(this.quill.scroll,s,[(n,i)=>{let o=os.value(n);return o?i.compose(new Un.default().retain(i.length(),{[as.blotName]:o})):i}],[(n,i)=>n.data.split(` 47`).reduce((o,a,l)=>(l!==0&&o.insert(` 48`,{[z.blotName]:e}),o.insert(a)),i)],new WeakMap)}};ls.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]}});function Hn(){return`row-${Math.random().toString(36).slice(2,6)}`}var qt,ye,Xt,Fn,gp=f(()=>{gt();vr();qt=(()=>{class r extends D{static blotName="table";static tagName="TD";static create(e){let s=super.create();return e?s.setAttribute("data-row",e):s.setAttribute("data-row",Hn()),s}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,s){e===r.blotName&&s?this.domNode.setAttribute("data-row",s):super.format(e,s)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}return r})(),ye=(()=>{class r extends yt{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){let e=this.children.head.formats(),s=this.children.tail.formats(),n=this.next.children.head.formats(),i=this.next.children.tail.formats();return e.table===s.table&&e.table===n.table&&e.table===i.table}return!1}optimize(e){super.optimize(e),this.children.forEach(s=>{if(s.next==null)return;let n=s.formats(),i=s.next.formats();if(n.table!==i.table){let o=this.splitAfter(s);o&&o.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}return r})(),Xt=(()=>{class r extends yt{static blotName="table-body";static tagName="TBODY"}return r})(),Fn=(()=>{class r extends yt{static blotName="table-container";static tagName="TABLE";balanceCells(){let e=this.descendants(ye),s=e.reduce((n,i)=>Math.max(i.children.length,n),0);e.forEach(n=>{new Array(s-n.children.length).fill(0).forEach(()=>{let i;n.children.head!=null&&(i=qt.formats(n.children.head.domNode));let o=this.scroll.create(qt.blotName,i);n.appendChild(o),o.optimize()})})}cells(e){return this.rows().map(s=>s.children.at(e))}deleteColumn(e){let[s]=this.descendant(Xt);s==null||s.children.head==null||s.children.forEach(n=>{let i=n.children.at(e);i?.remove()})}insertColumn(e){let[s]=this.descendant(Xt);
vendor: 10,467 bytes, lines 48-49
48s==null||s.children.head==null||s.children.forEach(n=>{let i=n.children.at(e),o=qt.formats(n.children.head.domNode),a=this.scroll.create(qt.blotName,o);n.insertBefore(a,i)})}insertRow(e){let[s]=this.descendant(Xt);if(s==null||s.children.head==null)return;let n=Hn(),i=this.scroll.create(ye.blotName);s.children.head.children.forEach(()=>{let a=this.scroll.create(qt.blotName,n);i.appendChild(a)});let o=s.children.at(e);s.insertBefore(i,o)}rows(){let e=this.children.head;return e==null?[]:e.children.map(s=>s)}}return r.allowedChildren=[Xt],r})();Xt.requiredContainer=Fn;Xt.allowedChildren=[ye];ye.requiredContainer=Xt;ye.allowedChildren=[qt];qt.requiredContainer=ye});var bp,la,yp,xp=f(()=>{bp=ut(ft(),1);ot();bt();gp();la=class extends B{static register(){p.register(qt),p.register(ye),p.register(Xt),p.register(Fn)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Fn).forEach(t=>{t.balanceCells()})}deleteColumn(){let[t,,e]=this.getTable();e!=null&&(t.deleteColumn(e.cellOffset()),this.quill.update(p.sources.USER))}deleteRow(){let[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(p.sources.USER))}deleteTable(){let[t]=this.getTable();if(t==null)return;let e=t.offset();t.remove(),this.quill.update(p.sources.USER),this.quill.setSelection(e,p.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];let[e,s]=this.quill.getLine(t.index);if(e==null||e.statics.blotName!==qt.blotName)return[null,null,null,-1];let n=e.parent;return[n.parent.parent,n,e,s]}insertColumn(t){let e=this.quill.getSelection();if(!e)return;let[s,n,i]=this.getTable(e);if(i==null)return;let o=i.cellOffset();s.insertColumn(o+t),this.quill.update(p.sources.USER);let a=n.rowOffset();t===0&&(a+=1),this.quill.setSelection(e.index+a,e.length,p.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){let e=this.quill.getSelection();if(!e)return;let[s,n,i]=this.getTable(e);if(i==null)return;let o=n.rowOffset();s.insertRow(o+t),this.quill.update(p.sources.USER),t>0?this.quill.setSelection(e,p.sources.SILENT):this.quill.setSelection(e.index+n.children.length,e.length,p.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){let s=this.quill.getSelection();if(s==null)return;let n=new Array(t).fill(0).reduce(i=>{let o=new Array(e).fill(` 49`).join("");return i.insert(o,{table:Hn()})},new bp.default().retain(s.index));this.quill.updateContents(n,p.sources.USER),this.quill.setSelection(s.index,p.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(p.events.SCROLL_OPTIMIZE,t=>{t.some(e=>["TD","TR","TBODY","TABLE"].includes(e.target.tagName)?(this.quill.once(p.events.TEXT_CHANGE,(s,n,i)=>{i===p.sources.USER&&this.balanceTables()}),!0):!1)})}},yp=la});function Ap(r,t,e){let s=document.createElement("button");s.setAttribute("type","button"),s.classList.add(`ql-${t}`),s.setAttribute("aria-pressed","false"),e!=null?(s.value=e,s.setAttribute("aria-label",`${t}: ${e}`)):s.setAttribute("aria-label",t),r.appendChild(s)}function KE(r,t){Array.isArray(t[0])||(t=[t]),t.forEach(e=>{let s=document.createElement("span");s.classList.add("ql-formats"),e.forEach(n=>{if(typeof n=="string")Ap(s,n);else{let i=Object.keys(n)[0],o=n[i];Array.isArray(o)?GE(s,i,o):Ap(s,i,o)}}),r.appendChild(s)})}function GE(r,t,e){let s=document.createElement("select");s.classList.add(`ql-${t}`),e.forEach(n=>{let i=document.createElement("option");n!==!1?i.setAttribute("value",String(n)):i.setAttribute("selected","selected"),s.appendChild(i)}),r.appendChild(s)}var Ep,vp,ua,Tp=f(()=>{Ep=ut(ft(),1);S();ot();ke();bt();vp=ht("quill:toolbar"),ua=(()=>{class r extends B{constructor(e,s){if(super(e,s),Array.isArray(this.options.container)){let n=document.createElement("div");n.setAttribute("role","toolbar"),KE(n,this.options.container),e.container?.parentNode?.insertBefore(n,e.container),this.container=n}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){vp.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(n=>{let i=this.options.handlers?.[n];i&&this.addHandler(n,i)}),Array.from(this.container.querySelectorAll("button, select")).forEach(n=>{this.attach(n)}),this.quill.on(p.events.EDITOR_CHANGE,()=>{let[n]=this.quill.selection.getRange();this.update(n)})}addHandler(e,s){this.handlers[e]=s}attach(e){let s=Array.from(e.classList).find(i=>i.indexOf("ql-")===0);if(!s)return;if(s=s.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[s]==null&&this.quill.scroll.query(s)==null){vp.warn("ignoring attaching to nonexistent format",s,e);return}let n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,i=>{let o;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;let l=e.options[e.selectedIndex];l.hasAttribute("selected")?o=!1:o=l.value||!1}else e.classList.contains("ql-active")?o=!1:o=e.value||!e.hasAttribute("value"),i.preventDefault();this.quill.focus();let[a]=this.quill.selection.getRange();if(this.handlers[s]!=null)this.handlers[s].call(this,o);else if(this.quill.scroll.query(s).prototype instanceof k){if(o=prompt(`Enter ${s}`),!o)return;this.quill.updateContents(new Ep.default().retain(a.index).delete(a.length).insert({[s]:o}),p.sources.USER)}else this.quill.format(s,o,p.sources.USER);this.update(a)}),this.controls.push([s,e])}update(e){let s=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{let[i,o]=n;if(o.tagName==="SELECT"){let a=null;if(e==null)a=null;else if(s[i]==null)a=o.querySelector("option[selected]");else if(!Array.isArray(s[i])){let l=s[i];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),a=o.querySelector(`option[value="${l}"]`)}a==null?(o.value="",o.selectedIndex=-1):a.selected=!0}else if(e==null)o.classList.remove("ql-active"),o.setAttribute("aria-pressed","false");else if(o.hasAttribute("value")){let a=s[i],l=a===o.getAttribute("value")||a!=null&&a.toString()===o.getAttribute("value")||a==null&&!o.getAttribute("value");o.classList.toggle("ql-active",l),o.setAttribute("aria-pressed",l.toString())}else{let a=s[i]!=null;o.classList.toggle("ql-active",a),o.setAttribute("aria-pressed",a.toString())}})}}return r.DEFAULTS={},r})();ua.DEFAULTS={container:null,handlers:{clean(){let r=this.quill.getSelection();if(r!=null)if(r.length===0){let t=this.quill.getFormat();Object.keys(t).forEach(e=>{this.quill.scroll.query(e,y.INLINE)!=null&&this.quill.format(e,!1,p.sources.USER)})}else this.quill.removeFormat(r.index,r.length,p.sources.USER)},direction(r){let{align:t}=this.quill.getFormat();r==="rtl"&&t==null?this.quill.format("align","right",p.sources.USER):!r&&t==="right"&&this.quill.format("align",!1,p.sources.USER),this.quill.format("direction",r,p.sources.USER)},indent(r){let t=this.quill.getSelection(),e=this.quill.getFormat(t),s=parseInt(e.indent||0,10);if(r==="+1"||r==="-1"){let n=r==="+1"?1:-1;e.direction==="rtl"&&(n*=-1),this.quill.format("indent",s+n,p.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,p.sources.USER)},list(r){let t=this.quill.getSelection(),e=this.quill.getFormat(t);r==="check"?e.list==="checked"||e.list==="unchecked"?this.quill.format("list",!1,p.sources.USER):this.quill.format("list","unchecked",p.sources.USER):this.quill.format("list",r,p.sources.USER)}}}});var VE,WE,ZE,XE,QE,YE,JE,tT,Np,eT,rT,sT,nT,iT,oT,aT,lT,uT,cT,fT,hT,dT,pT,mT,gT,bT,yT,xT,vT,AT,ET,TT,NT,xe,zn=f(()=>{VE='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',WE='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',ZE='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',XE='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',QE='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/>
49<path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',YE='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',JE='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',tT='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Np='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',eT='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',rT='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',sT='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',nT='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',iT='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',oT='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',aT='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816
49H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',lT='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',uT='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',cT='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',fT='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',hT='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',dT='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',pT='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',mT='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',gT='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',bT='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',yT='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/>
49<path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',xT='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',vT='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',AT='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',ET='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',TT='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',NT='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',xe={align:{"":VE,center:WE,right:ZE,justify:XE},background:QE,blockquote:YE,bold:JE,clean:tT,code:Np,"code-block":Np,color:eT,direction:{"":rT,rtl:sT},formula:nT,header:{1:iT,2:oT,3:aT,4:lT,5:uT,6:cT},italic:fT,image:hT,indent:{"+1":dT,"-1":pT},link:mT,list:{bullet:gT,check:bT,ordered:yT},script:{sub:xT,super:vT},strike:AT,table:ET,underline:TT,video:NT}});function Sp(r,t){r.setAttribute(t,`${r.getAttribute(t)!=="true"}`)}var wT,wp,ca,ve,us=f(()=>{wT='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',wp=0;ca=class{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",e=>{switch(e.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),e.preventDefault();break;default:}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Sp(this.label,"aria-expanded"),Sp(this.options,"aria-hidden")}buildItem(t){let e=document.createElement("span");e.tabIndex="0",e.setAttribute("role","button"),e.classList.add("ql-picker-item");let s=t.getAttribute("value");return s&&e.setAttribute("data-value",s),t.textContent&&e.setAttribute("data-label",t.textContent),e.addEventListener("click",()=>{this.selectItem(e,!0)}),e.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.selectItem(e,!0),n.preventDefault();break;case"Escape":this.escape(),n.preventDefault();break;default:}}),e}buildLabel(){let t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=wT,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","fal
49se"),this.container.appendChild(t),t}buildOptions(){let t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${wp}`,wp+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(e=>{let s=this.buildItem(e);t.appendChild(s),e.selected===!0&&this.selectItem(s)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=this.container.querySelector(".ql-selected");t!==s&&(s?.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){let s=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(s)}else this.selectItem(null);let e=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}},ve=ca});var fa,$n,ha=f(()=>{us();fa=class extends ve{constructor(t,e){super(t),this.label.innerHTML=e,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(s=>{s.classList.add("ql-primary")})}buildItem(t){let e=super.buildItem(t);return e.style.backgroundColor=t.getAttribute("value")||"",e}selectItem(t,e){super.selectItem(t,e);let s=this.label.querySelector(".ql-color-label"),n=t&&t.getAttribute("data-value")||"";s&&(s.tagName==="line"?s.style.stroke=n:s.style.fill=n)}},$n=fa});var da,Kn,pa=f(()=>{us();da=class extends ve{constructor(t,e){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(s=>{s.innerHTML=e[s.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,e){super.selectItem(t,e);let s=t||this.defaultItem;if(s!=null){if(this.label.innerHTML===s.innerHTML)return;this.label.innerHTML=s.innerHTML}}},Kn=da});var ST,ma,Gn,ga=f(()=>{ST=r=>{let{overflowY:t}=getComputedStyle(r,null);return t!=="visible"&&t!=="clip"},ma=class{constructor(t,e){this.quill=t,this.boundsContainer=e||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,ST(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){let e=t.left+t.width/2-this.root.offsetWidth/2,s=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${e}px`,this.root.style.top=`${s}px`,this.root.classList.remove("ql-flip");let n=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>n.right&&(o=n.right-i.right,this.root.style.left=`${e+o}px`),i.left<n.left&&(o=n.left-i.left,this.root.style.left=`${e+o}px`),i.bottom>n.bottom){let a=i.bottom-i.top,l=t.bottom-t.top+a;this.root.style.top=`${s-l}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},Gn=ma});function IT(r){let t=r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=r.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:r}function cs(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(s=>{let n=document.createElement("option");s===e?n.setAttribute("selected","selected"):n.setAttribute("value",String(s)),r.appendChild(n)})}var LT,OT,CT,_T,qT,Qt,Er,ba=f(()=>{ae();Wt();Ro();ha();pa();us();ga();LT=[!1,"center","right","justify"],OT=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],CT=[!1,"serif","monospace"],_T=["1","2","3",!1],qT=["small",!1,"large","huge"],Qt=class extends yr{constructor(t,e){super(t,e);let s=n=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",
vendor: 5,918 bytes, line 49
49s);return}this.tooltip!=null&&!this.tooltip.root.contains(n.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(i=>{i.container.contains(n.target)||i.close()})};t.emitter.listenDOM("click",document.body,s)}addModule(t){let e=super.addModule(t);return t==="toolbar"&&this.extendToolbar(e),e}buildButtons(t,e){Array.from(t).forEach(s=>{(s.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),e[i]!=null))if(i==="direction")s.innerHTML=e[i][""]+e[i].rtl;else if(typeof e[i]=="string")s.innerHTML=e[i];else{let o=s.value||"";o!=null&&e[i][o]&&(s.innerHTML=e[i][o])}})})}buildPickers(t,e){this.pickers=Array.from(t).map(n=>{if(n.classList.contains("ql-align")&&(n.querySelector("option")==null&&cs(n,LT),typeof e.align=="object"))return new Kn(n,e.align);if(n.classList.contains("ql-background")||n.classList.contains("ql-color")){let i=n.classList.contains("ql-background")?"background":"color";return n.querySelector("option")==null&&cs(n,OT,i==="background"?"#ffffff":"#000000"),new $n(n,e[i])}return n.querySelector("option")==null&&(n.classList.contains("ql-font")?cs(n,CT):n.classList.contains("ql-header")?cs(n,_T):n.classList.contains("ql-size")&&cs(n,qT)),new ve(n)});let s=()=>{this.pickers.forEach(n=>{n.update()})};this.quill.on(v.events.EDITOR_CHANGE,s)}};Qt.DEFAULTS=rt({},yr.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let r=this.container.querySelector("input.ql-image[type=file]");r==null&&(r=document.createElement("input"),r.setAttribute("type","file"),r.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),r.classList.add("ql-image"),r.addEventListener("change",()=>{let t=this.quill.getSelection(!0);this.quill.uploader.upload(t,r.files),r.value=""}),this.container.appendChild(r)),r.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});Er=class extends Gn{constructor(t,e){super(t,e),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;e!=null?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");let s=this.quill.getBounds(this.quill.selection.savedRange);s!=null&&this.position(s),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{let{scrollTop:e}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,v.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,v.sources.USER)),this.quill.root.scrollTop=e;break}case"video":t=IT(t);case"formula":{if(!t)break;let e=this.quill.getSelection(!0);if(e!=null){let s=e.index+e.length;this.quill.insertEmbed(s,this.root.getAttribute("data-mode"),t,v.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(s+1," ",v.sources.USER),this.quill.setSelection(s+2,v.sources.USER)}break}default:}this.textbox.value="",this.hide()}}});var kT,ya,fs,Lp=f(()=>{ae();Wt();ba();Qr();zn();ot();kT=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],ya=class extends Er{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(t,e){super(t,e),this.quill.on(v.events.EDITOR_CHANGE,(s,n,i,o)=>{if(s===v.events.SELECTION_CHANGE)if(n!=null&&n.length>0&&o===v.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;let a=this.quill.getLines(n.index,n.length);if(a.length===1){let l=this.quill.getBounds(n);l!=null&&this.position(l)}else{let l=a[a.length-1],u=this.quill.getIndex(l),c=Math.min(l.length()-1,n.index+n.length-u),h=this.quill.getBounds(new Z(u,c));h!=null&&this.position(h)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(v.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;let t=this.quill.getSelection();if(t!=null){let e=this.quill.getBounds(t);e!=null&&this.position(e)}},1)})}cancel(){this.show()}position(t){let e=super.position(t),s=this.root.querySelector(".ql-tooltip-arrow");return s.style.marginLeft="",e!==0&&(s.style.marginLeft=`${-1*e-s.offsetWidth/2}px`),e}},fs=class extends Qt{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=kT),super(t,e),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new ya(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),xe),this.buildPickers(t.container.querySelectorAll("select"),xe))}};fs.DEFAULTS=rt({},Qt.DEFAULTS,{modules:{toolbar:{handlers:{link(r){r?this.quill.theme.tooltip.edit():this.quill.format("link",!1,p.sources.USER)}}}}})});var RT,xa,Vn,Op,Cp=f(()=>{ae();Wt();ba();is();Qr();zn();ot();RT=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}
49],["clean"]],xa=class extends Er{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){let e=this.linkRange;this.restoreFocus(),this.quill.formatText(e,"link",!1,v.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(v.events.SELECTION_CHANGE,(t,e,s)=>{if(t!=null){if(t.length===0&&s===v.sources.USER){let[n,i]=this.quill.scroll.descendant(Be,t.index);if(n!=null){this.linkRange=new Z(t.index-i,n.length());let o=Be.formats(n.domNode);this.preview.textContent=o,this.preview.setAttribute("href",o),this.show();let a=this.quill.getBounds(this.linkRange);a!=null&&this.position(a);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}},Vn=class extends Qt{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=RT),super(t,e),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),xe),this.buildPickers(t.container.querySelectorAll("select"),xe),this.tooltip=new xa(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(e,s)=>{t.handlers.link.call(t,!s.format.link)}))}};Vn.DEFAULTS=rt({},Qt.DEFAULTS,{modules:{toolbar:{handlers:{link(r){if(r){let t=this.quill.getSelection();if(t==null||t.length===0)return;let e=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(e)&&e.indexOf("mailto:")!==0&&(e=`mailto:${e}`);let{tooltip:s}=this.quill.theme;s.edit("link",e)}else this.quill.format("link",!1,p.sources.USER)}}}}});Op=Vn});var MT={};va(MT,{AttributeMap:()=>vt.AttributeMap,Delta:()=>vt.default,Module:()=>B,Op:()=>vt.Op,OpIterator:()=>vt.OpIterator,Parchment:()=>lr,Range:()=>Z,default:()=>BT});var BT,DT=f(()=>{na();Uo();$o();Vd();Zd();Qd();Yd();Fo();Sn();Vo();Zo();jn();tp();is();rp();np();op();lp();fp();pp();Ln();mp();xp();Tp();zn();us();ha();pa();ga();Lp();Cp();na();Mn.register({"attributors/attribute/direction":On,"attributors/class/align":Po,"attributors/class/background":Ad,"attributors/class/color":vd,"attributors/class/direction":zo,"attributors/class/font":Go,"attributors/class/size":Wo,"attributors/style/align":wn,"attributors/style/background":es,"attributors/style/color":ts,"attributors/style/direction":Cn,"attributors/style/font":_n,"attributors/style/size":qn},!0);Mn.register({"formats/align":Po,"formats/direction":zo,"formats/indent":Gd,"formats/background":es,"formats/color":ts,"formats/font":Go,"formats/size":Wo,"formats/blockquote":Wd,"formats/code-block":z,"formats/header":Xd,"formats/list":Dn,"formats/bold":Ar,"formats/code":Ed,"formats/italic":Jd,"formats/link":Be,"formats/script":ep,"formats/strike":sp,"formats/underline":ip,"formats/formula":ap,"formats/image":cp,"formats/video":dp,"modules/syntax":ls,"modules/table":yp,"modules/toolbar":ua,"themes/bubble":fs,"themes/snow":Op,"ui/icons":xe,"ui/picker":ve,"ui/icon-picker":Kn,"ui/color-picker":$n,"ui/tooltip":Gn},!0);BT=Mn});export{ft as a,H as b,gt as c,B as d,br as e,En as f,bd as g,yd as h,kd as i,ta as j,vt as k,BT as l,MT as m,DT as n};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.