1var Kc=Object.create;var er=Object.defineProperty,Gc=Object.defineProperties,Vc=Object.getOwnPropertyDescriptor,Wc=Object.getOwnPropertyDescriptors,Zc=Object.getOwnPropertyNames,Rr=Object.getOwnPropertySymbols,zi=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty,$i=Object.prototype.propertyIsEnumerable,Xc=Reflect.get;var Hi=(r,t,e)=>t in r?er(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,L=(r,t)=>{for(var e in t||={})Ys.call(t,e)&&Hi(r,e,t[e]);if(Rr)for(var e of Rr(t))$i.call(t,e)&&Hi(r,e,t[e]);return r},Ut=(r,t)=>Gc(r,Wc(t));var nv=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var Js=(r,t)=>{var e={};for(var s in r)Ys.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&Rr)for(var s of Rr(r))t.indexOf(s)<0&&$i.call(r,s)&&(e[s]=r[s]);return e};var iv=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ft=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),Qc=(r,t)=>{for(var e in t)er(r,e,{get:t[e],enumerable:!0})},Ki=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Zc(t))!Ys.call(r,n)&&n!==e&&er(r,n,{get:()=>t[n],enumerable:!(s=Vc(t,n))||s.enumerable});return r};var ot=(r,t,e)=>(e=r!=null?Kc(zi(r)):{},Ki(t||!r||!r.__esModule?er(e,"default",{value:r,enumerable:!0}):e,r)),ov=r=>Ki(er({},"__esModule",{value:!0}),r);var av=(r,t,e)=>Xc(zi(r),e,t);var lv=(r,t,e)=>new Promise((s,n)=>{var i=l=>{try{a(e.next(l))}catch(u){n(u)}},o=l=>{try{a(e.throw(l))}catch(u){n(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(i,o);a((e=e.apply(r,t)).next())});var pl=Ft((U2,dl)=>{var at=-1,Z=1,P=0;function fr(r,t,e,s,n){if(r===t)return r?[[P,r]]:[];if(e!=null){var i=zg(r,t,e);if(i)return i}var o=gn(r,t),a=r.substring(0,o);r=r.substring(o),t=t.substring(o),o=as(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=Bg(r,t);return a&&u.unshift([P,a]),l&&u.push([P,l]),bn(u,n),s&&jg(u),u}function Bg(r,t){var e;if(!r)return[[Z,t]];if(!t)return[[at,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=[[Z,s.substring(0,i)],[P,n],[Z,s.substring(i+n.length)]],r.length>t.length&&(e[0][0]=e[2][0]=at),e;if(n.length===1)return[[at,r],[Z,t]];var o=Dg(r,t);if(o){var a=o[0],l=o[1],u=o[2],c=o[3],f=o[4],h=fr(a,u),p=fr(l,c);return h.concat([[P,f]],p)}return Mg(r,t)}function Mg(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,f=c%2!==0,h=0,p=0,m=0,y=0,v=0;v<n;v++){for(var g=-v+h;g<=v-p;g+=2){var A=i+g,E;g===-v||g!==v&&a[A-1]<a[A+1]?E=a[A+1]:E=a[A-1]+1;for(var T=E-g;E<e&&T<s&&r.charAt(E)===t.charAt(T);)E++,T++;if(a[A]=E,E>e)p+=2;else if(T>s)h+=2;else if(f){var N=i+c-g;if(N>=0&&N<o&&l[N]!==-1){var _=e-l[N];if(E>=_)return nl(r,t,E,T)}}}for(var Y=-v+m;Y<=v-y;Y+=2){var N=i+Y,_;Y===-v||Y!==v&&l[N-1]<l[N+1]?_=l[N+1]:_=l[N-1]+1;
vendor: 43,620 bytes, lines 1-2
1for(var mt=_-Y;_<e&&mt<s&&r.charAt(e-_-1)===t.charAt(s-mt-1);)_++,mt++;if(l[N]=_,_>e)y+=2;else if(mt>s)m+=2;else if(!f){var A=i+c-Y;if(A>=0&&A<o&&a[A]!==-1){var E=a[A],T=i+E-A;if(_=e-_,E>=_)return nl(r,t,E,T)}}}}return[[at,r],[Z,t]]}function nl(r,t,e,s){var n=r.substring(0,e),i=t.substring(0,s),o=r.substring(e),a=t.substring(s),l=fr(n,i),u=fr(o,a);return l.concat(u)}function gn(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 ul(r.charCodeAt(n-1))&&n--,n}function il(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 as(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 cl(r.charCodeAt(r.length-n))&&n--,n}function Dg(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(p,m,y){for(var v=p.substring(y,y+Math.floor(p.length/4)),g=-1,A="",E,T,N,_;(g=m.indexOf(v,g+1))!==-1;){var Y=gn(p.substring(y),m.substring(g)),mt=as(p.substring(0,y),m.substring(0,g));A.length<mt+Y&&(A=m.substring(g-mt,g)+m.substring(g,g+Y),E=p.substring(0,y-mt),T=p.substring(y+Y),N=m.substring(0,g-mt),_=m.substring(g+Y))}return A.length*2>=p.length?[E,T,N,_,A]: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,f;r.length>t.length?(l=a[0],u=a[1],c=a[2],f=a[3]):(c=a[0],f=a[1],l=a[2],u=a[3]);var h=a[4];return[l,u,c,f,h]}function jg(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]==P?(e[s++]=i,o=l,a=u,l=0,u=0,n=r[i][1]):(r[i][0]==Z?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,[at,n]),r[e[s-1]+1][0]=Z,s--,s--,i=s>0?e[s-1]:-1,o=0,a=0,l=0,u=0,n=null,t=!0)),i++;for(t&&bn(r),Fg(r),i=1;i<r.length;){if(r[i-1][0]==at&&r[i][0]==Z){var c=r[i-1][1],f=r[i][1],h=il(c,f),p=il(f,c);h>=p?(h>=c.length/2||h>=f.length/2)&&(r.splice(i,0,[P,f.substring(0,h)]),r[i-1][1]=c.substring(0,c.length-h),r[i+1][1]=f.substring(h),i++):(p>=c.length/2||p>=f.length/2)&&(r.splice(i,0,[P,c.substring(0,p)]),r[i-1][0]=Z,r[i-1][1]=f.substring(0,f.length-p),r[i+1][0]=at,r[i+1][1]=c.substring(p),i++),i++}i++}}var ol=/[^a-zA-Z0-9]/,al=/\s/,ll=/[\r\n]/,Pg=/\n\r?\n$/,Ug=/^\r?\n\r?\n/;function Fg(r){function t(p,m){if(!p||!m)return 6;var y=p.charAt(p.length-1),v=m.charAt(0),g=y.match(ol),A=v.match(ol),E=g&&y.match(al),T=A&&v.match(al),N=E&&y.match(ll),_=T&&v.match(ll),Y=N&&p.match(Pg),mt=_&&m.match(Ug);return Y||mt?5:N||_?4:g&&!E&&T?3:E||T?2:g||A?1:0}for(var e=1;e<r.length-1;){if(r[e-1][0]==P&&r[e+1][0]==P){var s=r[e-1][1],n=r[e][1],i=r[e+1][1],o=as(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,f=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 h=t(s,n)+t(n,i);h>=f&&(f=h,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 bn(r,t){r.push([P,""]);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 Z:n++,o+=r[e][1],e++;break;case at:s++,i+=r[e][1],e++;break;case P:var l=e-n-s-1;if(t){if(l>=0&&hl(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]===Z&&(n++,o=r[c][1]+o,c--),r[c]&&r[c][0]===at&&(s++,i=r[c][1]+i,c--),l=c}}if(fl(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=gn(o,i),a!==0&&(l>=0?r[l][1]+=o.substring(0,a):(r.splice(0,0,[P,o.substring(0,a)]),e++),o=o.substring(a),i=i.substring(a)),a=as(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 f=n+s;i.length===0&&o.length===0?(r.splice(e-f,f),e=e-f):i.length===0?(r.splice(e-f,f,[Z,o]),e=e-f+1):o.length===0?(r.splice(e-f,f,[at,i]),e=e-f+1):(r.splice(e-f,f,[at,i],[Z,o]),e=e-f+2)}e!==0&&r[e-1][0]===P?(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 h=!1;for(e=1;e<r.length-1;)r[e-1][0]===P&&r[e+1][0]===P&&(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),h=!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),h=!0)),e++;h&&bn(r,t)}function ul(r){return r>=55296&&r<=56319}function cl(r){return r>=56320&&r<=57343}function fl(r){return cl(r.charCodeAt(0))}function hl(r){return ul(r.charCodeAt(r.length-1))}function Hg(r){for(var t=[],e=0;e<r.length;e++)r[e][1].length>0&&t.push(r[e]);return t}function mn(r,t,e,s){return hl(r)||fl(s)?null:Hg([[P,r],[at,t],[Z,e],[P,s]])}function zg(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 f=a+o-i;if(c!==null&&c!==f||f<0||f>o)break t;var h=t.slice(0,f),p=t.slice(f);if(p!==u)break t;var m=Math.min(a,f),y=l.slice(0,m),v=h.slice(0,m);if(y!==v)break t;var g=l.slice(m),A=h.slice(m);return mn(y,g,A,u)}t:{if(c!==null&&c!==a)break t;var E=a,h=t.slice(0,E),p=t.slice(E);if(h!==l)break t;var T=Math.min(i-E,o-E),N=u.slice(u.length-T),_=p.slice(p.length-T);if(N!==_)break t;var g=u.slice(0,u.length-T),A=p.slice(0,p.length-T);return mn(l,g,A,N)}}if(s.length>0&&n&&n.length===0)t:{var y=r.slice(0,s.index),N=r.slice(s.index+s.length),m=y.length,T=N.length;if(o<m+T)break t;var v=t.slice(0,m),_=t.slice(o-T);if(y!==v||N!==_)break t;var g=r.slice(m,i-T),A=t.slice(m,o-T);return mn(y,g,A,N)}return null}function ls(r,t,e,s){return fr(r,t,e,s,!0)}ls.INSERT=Z;ls.DELETE=at;ls.EQUAL=P;dl.exports=ls});var In=Ft((hr,He)=>{var $g=200,Sl="__lodash_hash_undefined__",Ll=9007199254740991,wn="[object Arguments]",Kg="[object Array]",Ol="[object Boolean]",Cl="[object Date]",Gg="[object Error]",Sn="[object Function]",_l="[object GeneratorFunction]",us="[object Map]",ql="[object Number]",Ln="[object Object]",ml="[object Promise]",Il="[object RegExp]",cs="[object Set]",kl="[object String]",Rl="[object Symbol]",xn="[object WeakMap]",Bl="[object ArrayBuffer]",fs="[object DataView]",Ml="[object Float32Array]",Dl="[object Float64Array]",jl="[object Int8Array]",Pl="[object Int16Array]",Ul="[object Int32Array]",Fl="[object Uint8Array]",Hl="[object Uint8ClampedArray]",zl="[object Uint16Array]",$l="[object Uint32Array]",Vg=/[\\^$.*+?()[\]{}|]/g,Wg=/\w*$/,Zg=/^\[object .+?Constructor\]$/,Xg=/^(?:0|[1-9]\d*)$/,S={};S[wn]=S[Kg]=S[Bl]=S[fs]=S[Ol]=S[Cl]=S[Ml]=S[Dl]=S[jl]=S[Pl]=S[Ul]=S[us]=S[ql]=S[Ln]=S[Il]=S[cs]=S[kl]=S[Rl]=S[Fl]=S[Hl]=S[zl]=S[$l]=!0;S[Gg]=S[Sn]=S[xn]=!1;var Qg=typeof global=="object"&&global&&global.Object===Object&&global,Yg=typeof self=="object"&&self&&self.Object===Object&&self,_t=Qg||Yg||Function("return this")(),Kl=typeof hr=="object"&&hr&&!hr.nodeType&&hr,gl=Kl&&typeof He=="object"&&He&&!He.nodeType&&He,Jg=gl&&gl.exports===Kl;function t1(r,t){return r.set(t[0],t[1]),r}function e1(r,t){return r.add(t),r}function r1(r,t){for(var e=-1,s=r?r.length:0;++e<s&&t(r[e],e,r)!==!1;);return r}function s1(r,t){for(var e=-1,s=t.length,n=r.length;++e<s;)r[n+e]=t[e];return r}function Gl(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 n1(r,t){for(var e=-1,s=Array(r);++e<r;)s[e]=t(e);return s}function i1(r,t){return r?.[t]}function Vl(r){var t=!1;if(r!=null&&typeof r.toString!="function")try{t=!!(r+"")}catch{}return t}function bl(r){var t=-1,e=Array(r.size);return r.forEach(function(s,n){e[++t]=[n,s]}),e}function On(r,t){return function(e){return r(t(e))}}function yl(r){var t=-1,e=Array(r.size);return r.forEach(function(s){e[++t]=s}),e}var o1=Array.prototype,a1=Function.prototype,hs=Object.prototype,yn=_t["__core-js_shared__"],xl=function(){var r=/[^.]+$/.exec(yn&&yn.keys&&yn.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Wl=a1.toString,Qt=hs.hasOwnProperty,ds=hs.toString,l1=RegExp("^"+Wl.call(Qt).replace(Vg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vl=Jg?_t.Buffer:void 0,Al=_t.Symbol,El=_t.Uint8Array,u1=On(Object.getPrototypeOf,Object),c1=Object.create,f1=hs.propertyIsEnumerable,h1=o1.splice,Tl=Object.getOwnPropertySymbols,d1=vl?vl.isBuffer:void 0,p1=On(Object.keys,Object),vn=Ke(_t,"DataView"),dr=Ke(_t,"Map"),An=Ke(_t,"Promise"),En=Ke(_t,"Set"),Tn=Ke(_t,"WeakMap"),pr=Ke(Object,"create"),m1=he(vn),g1=he(dr),b1=he(An),y1=he(En),x1=he(Tn),Nl=Al?Al.prototype:void 0,wl=Nl?Nl.valueOf:void 0;function fe(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 v1(){this.__data__=pr?pr(null):{}}function A1(r){return this.has(r)&&delete this.__data__[r]}function E1(r){var t=this.__data__;if(pr){var e=t[r];return e===Sl?void 0:e}return Qt.call(t,r)?t[r]:void 0}function T1(r){var t=this.__data__;return pr?t[r]!==void 0:Qt.call(t,r)}function N1(r,t){var e=this.__data__;return e[r]=pr&&t===void 0?Sl:t,this}fe.prototype.clear=v1;fe.prototype.delete=A1;fe.prototype.get=E1;fe.prototype.has=T1;fe.prototype.set=N1;function qt(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 w1(){this.__data__=[]}function S1(r){var t=this.__data__,e=ps(t,r);if(e<0)return!1;var s=t.length-1;return e==s?t.pop():h1.call(t,e,1),!0}function L1(r){var t=this.__data__,e=ps(t,r);return e<0?void 0:t[e][1]}function O1(r){return ps(this.__data__,r)>-1}function C1(r,t){var e=this.__data__,s=ps(e,r);return s<0?e.push([r,t]):e[s][1]=t,this}qt.prototype.clear=w1;qt.prototype.delete=S1;qt.prototype.get=L1;qt.prototype.has=O1;qt.prototype.set=C1;function ze(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 _1(){this.__data__={hash:new fe,map:new(dr||qt),string:new fe}}function q1(r){return ms(this,r).delete(r)}function I1(r){return ms(this,r).get(r)}function k1(r){return ms(this,r).has(r)}function R1(r,t){return ms(this,r).set(r,t),this}ze.prototype.clear=_1;ze.prototype.delete=q1;ze.prototype.get=I1;ze.prototype.has=k1;ze.prototype.set=R1;function $e(r){this.__data__=new qt(r)}function B1(){this.__data__=new qt}function M1(r){return this.__data__.delete(r)}function D1(r){return this.__data__.get(r)}function j1(r){return this.__data__.has(r)}function P1(r,t){var e=this.__data__;if(e instanceof qt){var s=e.__data__;if(!dr||s.length<$g-1)return s.push([r,t]),this;e=this.__data__=new ze(s)}return e.set(r,t),this}$e.prototype.clear=B1;$e.prototype.delete=M1;$e.prototype.get=D1;$e.prototype.has=j1;$e.prototype.set=P1;function U1(r,t){var e=_n(r)||c0(r)?n1(r.length,String):[],s=e.length,n=!!s;for(var i in r)(t||Qt.call(r,i))&&!(n&&(i=="length"||o0(i,s)))&&e.push(i);return e}function Zl(r,t,e){var s=r[t];(!(Qt.call(r,t)&&Jl(s,e))||e===void 0&&!(t in r))&&(r[t]=e)}function ps(r,t){for(var e=r.length;e--;)if(Jl(r[e][0],t))return e;return-1}function F1(r,t){return r&&Xl(t,qn(t),r)}function Nn(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(!gs(r))return r;var l=_n(r);if(l){if(a=s0(r),!t)return t0(r,a)}else{var u=ce(r),c=u==Sn||u==_l;if(h0(r))return V1(r,t);if(u==Ln||u==wn||c&&!i){if(Vl(r))return i?r:{};if(a=n0(c?{}:r),!t)return e0(r,F1(a,r))}else{if(!S[u])return i?r:{};a=i0(r,u,Nn,t)}}o||(o=new $e);var f=o.get(r);if(f)return f;if(o.set(r,a),!l)var h=e?r0(r):qn(r);return r1(h||r,function(p,m){h&&(m=p,p=r[m]),Zl(a,m,Nn(p,t,e,s,m,r,o))}),a}function H1(r){return gs(r)?c1(r):{}}function z1(r,t,e){var s=t(r);return _n(r)?s:s1(s,e(r))}function $1(r){return ds.call(r)}function K1(r){if(!gs(r)||l0(r))return!1;var t=eu(r)||Vl(r)?l1:Zg;return t.test(he(r))}function G1(r){if(!Yl(r))return p1(r);var t=[];for(var e in Object(r))Qt.call(r,e)&&e!="constructor"&&t.push(e);return t}function V1(r,t){if(t)return r.slice();var e=new r.constructor(r.length);return r.copy(e),e}function Cn(r){var t=new r.constructor(r.byteLength);return new El(t).set(new El(r)),t}function W1(r,t){var e=t?Cn(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.byteLength)}function Z1(r,t,e){var s=t?e(bl(r),!0):bl(r);return Gl(s,t1,new r.constructor)}function X1(r){var t=new r.constructor(r.source,Wg.exec(r));return t.lastIndex=r.lastIndex,t}function Q1(r,t,e){var s=t?e(yl(r),!0):yl(r);return Gl(s,e1,new r.constructor)}function Y1(r){return wl?Object(wl.call(r)):{}}function J1(r,t){var e=t?Cn(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}function t0(r,t){var e=-1,s=r.length;for(t||(t=Array(s));++e<s;)t[e]=r[e];return t}function Xl(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;Zl(e,o,a===void 0?r[o]:a)}return e}function e0(r,t){return Xl(r,Ql(r),t)}function r0(r){return z1(r,qn,Ql)}function ms(r,t){var e=r.__data__;return a0(t)?e[typeof t=="string"?"string":"hash"]:e.map}function Ke(r,t){var e=i1(r,t);return K1(e)?e:void 0}var Ql=Tl?On(Tl,Object):m0,ce=$1;(vn&&ce(new vn(new ArrayBuffer(1)))!=fs||dr&&ce(new dr)!=us||An&&ce(An.resolve())!=ml||En&&ce(new En)!=cs||Tn&&ce(new Tn)!=xn)&&(ce=function(r){var t=ds.call(r),e=t==Ln?r.constructor:void 0,s=e?he(e):void 0;if(s)switch(s){case m1:return fs;case g1:return us;case b1:return ml;case y1:return cs;case x1:return xn}return t});function s0(r){var t=r.length,e=r.constructor(t);return t&&typeof r[0]=="string"&&Qt.call(r,"index")&&(e.index=r.index,e.input=r.input),e}function n0(r){return typeof r.constructor=="function"&&!Yl(r)?H1(u1(r)):{}}function i0(r,t,e,s){var n=r.constructor;switch(t){case Bl:return Cn(r);case Ol:case Cl:return new n(+r);case fs:return W1(r,s);case Ml:case Dl:case jl:case Pl:case Ul:case Fl:case Hl:case zl:case $l:return J1(r,s);case us:return Z1(r,s,e);case ql:case kl:return new n(r);case Il:return X1(r);case cs:return Q1(r,s,e);case Rl:return Y1(r)}}function o0(r,t){return t=t??Ll,!!t&&(typeof r=="number"||Xg.test(r))&&r>-1&&r%1==0&&r<t}function a0(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}function l0(r){return!!xl&&xl in r}function Yl(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||hs;return r===e}function he(r){if(r!=null){try{return Wl.call(r)}catch{}try{return r+""}catch{}}return""}function u0(r){return Nn(r,!0,!0)}function Jl(r,t){return r===t||r!==r&&t!==t}function c0(r){return f0(r)&&Qt.call(r,"callee")&&(!f1.call(r,"callee")||ds.call(r)==wn)}var _n=Array.isArray;function tu(r){return r!=null&&d0(r.length)&&!eu(r)}function f0(r){return p0(r)&&tu(r)}var h0=d1||g0;function eu(r){var t=gs(r)?ds.call(r):"";return t==Sn||t==_l}function d0(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Ll}function gs(r){var t=typeof r;return!!r&&(t=="object"||t=="function")}function p0(r){return!!r&&typeof r=="object"}function qn(r){return tu(r)?U1(r):G1(r)}function m0(){return[]}function g0(){return!1}He.exports=u0});var $n=Ft((mr,Ve)=>{var b0=200,zn="__lodash_hash_undefined__",Ns=1,du=2,pu=9007199254740991,bs="[object Arguments]",Mn="[object Array]",y0="[object AsyncFunction]",mu="[object Boolean]",gu="[object Date]",bu="[object Error]",yu="[object Function]",x0="[object GeneratorFunction]",ys="[object Map]",xu="[object Number]",v0="[object Null]",Ge="[object Object]",ru="[object Promise]",A0="[object Proxy]",vu="[object RegExp]",xs="[object Set]",Au="[object String]",E0="[object Symbol]",T0="[object Undefined]",Dn="[object WeakMap]",Eu="[object ArrayBuffer]",vs="[object DataView]",N0="[object Float32Array]",w0="[object Float64Array]",S0="[object Int8Array]",L0="[object Int16Array]",O0="[object Int32Array]",C0="[object Uint8Array]",_0="[object Uint8ClampedArray]",q0="[object Uint16Array]",I0="[object Uint32Array]",k0=/[\\^$.*+?()[\]{}|]/g,R0=/^\[object .+?Constructor\]$/,B0=/^(?:0|[1-9]\d*)$/,C={};C[N0]=C[w0]=C[S0]=C[L0]=C[O0]=C[C0]=C[_0]=C[q0]=C[I0]=!0;C[bs]=C[Mn]=C[Eu]=C[mu]=C[vs]=C[gu]=C[bu]=C[yu]=C[ys]=C[xu]=C[Ge]=C[vu]=C[xs]=C[Au]=C[Dn]=!1;var Tu=typeof global=="object"&&global&&global.Object===Object&&global,M0=typeof self=="object"&&self&&self.Object===Object&&self,It=Tu||M0||Function("return this")(),Nu=typeof mr=="object"&&mr&&!mr.nodeType&&mr,su=Nu&&typeof Ve=="object"&&Ve&&!Ve.nodeType&&Ve,wu=su&&su.exports===Nu,kn=wu&&Tu.process,nu=function(){try{return kn&&kn.binding&&kn.binding("util")}catch{}}(),iu=nu&&nu.isTypedArray;function D0(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 j0(r,t){for(var e=-1,s=t.length,n=r.length;++e<s;)r[n+e]=t[e];return r}function P0(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 U0(r,t){for(var e=-1,s=Array(r);++e<r;)s[e]=t(e);return s}function F0(r){return function(t){return r(t)}}function H0(r,t){return r.has(t)}function z0(r,t){return r?.[t]}function $0(r){var t=-1,e=Array(r.size);return r.forEach(function(s,n){e[++t]=[n,s]}),e}function K0(r,t){return function(e){return r(t(e))}}function G0(r){var t=-1,e=Array(r.size);return r.forEach(function(s){e[++t]=s}),e}var V0=Array.prototype,W0=Function.prototype,ws=Object.prototype,Rn=It["__core-js_shared__"],Su=W0.toString,Et=ws.hasOwnProperty,ou=function(){var r=/[^.]+$/.exec(Rn&&Rn.keys&&Rn.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Lu=ws.toString,Z0=RegExp("^"+Su.call(Et).replace(k0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),au=wu?It.Buffer:void 0,As=It.Symbol,lu=It.Uint8Array,Ou=ws.propertyIsEnumerable,X0=V0.splice,de=As?As.toStringTag:void 0,uu=Object.getOwnPropertySymbols,Q0=au?au.isBuffer:void 0,Y0=K0(Object.keys,Object),jn=We(It,"DataView"),gr=We(It,"Map"),Pn=We(It,"Promise"),Un=We(It,"Set"),Fn=We(It,"WeakMap"),br=We(Object,"create"),J0=ge(jn),tb=ge(gr),eb=ge(Pn),rb=ge(Un),sb=ge(Fn),cu=As?As.prototype:void 0,Bn=cu?cu.valueOf:void 0;function pe(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 nb(){this.__data__=br?br(null):{},this.size=0}function ib(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}function ob(r){var t=this.__data__;if(br){var e=t[r];return e===zn?void 0:e}return Et.call(t,r)?t[r]:void 0}function ab(r){var t=this.__data__;return br?t[r]!==void 0:Et.call(t,r)}function lb(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=br&&t===void 0?zn:t,this}pe.prototype.clear=nb;pe.prototype.delete=ib;pe.prototype.get=ob;pe.prototype.has=ab;pe.prototype.set=lb;function kt(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 ub(){this.__data__=[],this.size=0}function cb(r){var t=this.__data__,e=Ss(t,r);if(e<0)return!1;var s=t.length-1;return e==s?t.pop():X0.call(t,e,1),--this.size,!0}function fb(r){var t=this.__data__,e=Ss(t,r);return e<0?void 0:t[e][1]}function hb(r){return Ss(this.__data__,r)>-1}function db(r,t){var e=this.__data__,s=Ss(e,r);return s<0?(++this.size,e.push([r,t])):e[s][1]=t,this}kt.prototype.clear=ub;kt.prototype.delete=cb;kt.prototype.get=fb;kt.prototype.has=hb;kt.prototype.set=db;function me(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 pb(){this.size=0,this.__data__={hash:new pe,map:new(gr||kt),string:new pe}}function mb(r){var t=Ls(this,r).delete(r);return this.size-=t?1:0,t}function gb(r){return Ls(this,r).get(r)}function bb(r){return Ls(this,r).has(r)}function yb(r,t){var e=Ls(this,r),s=e.size;return e.set(r,t),this.size+=e.size==s?0:1,this}me.prototype.clear=pb;me.prototype.delete=mb;me.prototype.get=gb;me.prototype.has=bb;me.prototype.set=yb;function Es(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new me;++t<e;)this.add(r[t])}function xb(r){return this.__data__.set(r,zn),this}function vb(r){return this.__data__.has(r)}Es.prototype.add=Es.prototype.push=xb;Es.prototype.has=vb;function Jt(r){var t=this.__data__=new kt(r);this.size=t.size}function Ab(){this.__data__=new kt,this.size=0}function Eb(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}function Tb(r){return this.__data__.get(r)}function Nb(r){return this.__data__.has(r)}function wb(r,t){var e=this.__data__;if(e instanceof kt){var s=e.__data__;if(!gr||s.length<b0-1)return s.push([r,t]),this.size=++e.size,this;e=this.__data__=new me(s)}return e.set(r,t),this.size=e.size,this}Jt.prototype.clear=Ab;Jt.prototype.delete=Eb;Jt.prototype.get=Tb;Jt.prototype.has=Nb;Jt.prototype.set=wb;function Sb(r,t){var e=Ts(r),s=!e&&Fb(r),n=!e&&!s&&Hn(r),i=!e&&!s&&!n&&Bu(r),o=e||s||n||i,a=o?U0(r.length,String):[],l=a.length;for(var u in r)(t||Et.call(r,u))&&!(o&&(u=="length"||n&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Mb(u,l)))&&a.push(u);return a}function Ss(r,t){for(var e=r.length;e--;)if(qu(r[e][0],t))return e;return-1}function Lb(r,t,e){var s=t(r);return Ts(r)?s:j0(s,e(r))}function xr(r){return r==null?r===void 0?T0:v0:de&&de in Object(r)?Rb(r):Ub(r)}function fu(r){return yr(r)&&xr(r)==bs}function Cu(r,t,e,s,n){return r===t?!0:r==null||t==null||!yr(r)&&!yr(t)?r!==r&&t!==t:Ob(r,t,e,s,Cu,n)}function Ob(r,t,e,s,n,i){var o=Ts(r),a=Ts(t),l=o?Mn:Yt(r),u=a?Mn:Yt(t);l=l==bs?Ge:l,u=u==bs?Ge:u;var c=l==Ge,f=u==Ge,h=l==u;if(h&&Hn(r)){if(!Hn(t))return!1;o=!0,c=!1}if(h&&!c)return i||(i=new Jt),o||Bu(r)?_u(r,t,e,s,n,i):Ib(r,t,l,e,s,n,i);if(!(e&Ns)){var p=c&&Et.call(r,"__wrapped__"),m=f&&Et.call(t,"__wrapped__");if(p||m){var y=p?r.value():r,v=m?t.value():t;return i||(i=new Jt),n(y,v,e,s,i)}}return h?(i||(i=new Jt),kb(r,t,e,s,n,i)):!1}function Cb(r){if(!Ru(r)||jb(r))return!1;var t=Iu(r)?Z0:R0;return t.test(ge(r))}function _b(r){return yr(r)&&ku(r.length)&&!!C[xr(r)]}function qb(r){if(!Pb(r))return Y0(r);var t=[];for(var e in Object(r))Et.call(r,e)&&e!="constructor"&&t.push(e);return t}function _u(r,t,e,s,n,i){var o=e&Ns,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,f=!0,h=e&du?new Es:void 0;for(i.set(r,t),i.set(t,r);++c<a;){var p=r[c],m=t[c];if(s)var y=o?s(m,p,c,t,r,i):s(p,m,c,r,t,i);if(y!==void 0){if(y)continue;f=!1;break}if(h){if(!P0(t,function(v,g){if(!H0(h,g)&&(p===v||n(p,v,e,s,i)))return h.push(g)})){f=!1;break}}else if(!(p===m||n(p,m,e,s,i))){f=!1;break}}return i.delete(r),i.delete(t),f}function Ib(r,t,e,s,n,i,o){switch(e){case vs:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case Eu:return!(r.byteLength!=t.byteLength||!i(new lu(r),new lu(t)));case mu:case gu:case xu:return qu(+r,+t);case bu:return r.name==t.name&&r.message==t.message;case vu:case Au:return r==t+"";case ys:var a=$0;case xs:var l=s&Ns;if(a||(a=G0),r.size!=t.size&&!l)return!1;var u=o.get(r);if(u)return u==t;s|=du,o.set(r,t);var c=_u(a(r),a(t),s,n,i,o);return o.delete(r),c;case E0:if(Bn)return Bn.call(r)==Bn.call(t)}return!1}function kb(r,t,e,s,n,i){var o=e&Ns,a=hu(r),l=a.length,u=hu(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var h=a[f];if(!(o?h in t:Et.call(t,h)))return!1}var p=i.get(r);if(p&&i.get(t))return p==t;var m=!0;i.set(r,t),i.set(t,r);for(var y=o;++f<l;){h=a[f];var v=r[h],g=t[h];if(s)var A=o?s(g,v,h,t,r,i):s(v,g,h,r,t,i);if(!(A===void 0?v===g||n(v,g,e,s,i):A)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var E=r.constructor,T=t.constructor;E!=T&&"constructor"in r&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof T=="function"&&T instanceof T)&&(m=!1)}return i.delete(r),i.delete(t),m}function hu(r){return Lb(r,$b,Bb)}function Ls(r,t){var e=r.__data__;return Db(t)?e[typeof t=="string"?"string":"hash"]:e.map}function We(r,t){var e=z0(r,t);return Cb(e)?e:void 0}function Rb(r){var t=Et.call(r,de),e=r[de];try{r[de]=void 0;var s=!0}catch{}var n=Lu.call(r);return s&&(t?r[de]=e:delete r[de]),n}var Bb=uu?function(r){return r==null?[]:(r=Object(r),D0(uu(r),function(t){return Ou.call(r,t)}))}:Kb,Yt=xr;(jn&&Yt(new jn(new ArrayBuffer(1)))!=vs||gr&&Yt(new gr)!=ys||Pn&&Yt(Pn.resolve())!=ru||Un&&Yt(new Un)!=xs||Fn&&Yt(new Fn)!=Dn)&&(Yt=function(r){var t=xr(r),e=t==Ge?r.constructor:void 0,s=e?ge(e):"";if(s)switch(s){case J0:return vs;case tb:return ys;case eb:return ru;case rb:return xs;case sb:return Dn}return t});function Mb(r,t){return t=t??pu,!!t&&(typeof r=="number"||B0.test(r))&&r>-1&&r%1==0&&r<t}function Db(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}function jb(r){return!!ou&&ou in r}function Pb(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||ws;return r===e}function Ub(r){return Lu.call(r)}function ge(r){if(r!=null){try{return Su.call(r)}catch{}try{return r+""}catch{}}return""}function qu(r,t){return r===t||r!==r&&t!==t}var Fb=fu(function(){return arguments}())?fu:function(r){return yr(r)&&Et.call(r,"callee")&&!Ou.call(r,"callee")},Ts=Array.isArray;function Hb(r){return r!=null&&ku(r.length)&&!Iu(r)}var Hn=Q0||Gb;function zb(r,t){return Cu(r,t)}function Iu(r){if(!Ru(r))return!1;var t=xr(r);return t==yu||t==x0||t==y0||t==A0}function ku(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=pu}function Ru(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}function yr(r){return r!=null&&typeof r=="object"}var Bu=iu?F0(iu):_b;function $b(r){return Hb(r)?Sb(r):qb(r)}function Kb(){return[]}function Gb(){return!1}Ve.exports=zb});var Mu=Ft(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});var Vb=In(),Wb=$n(),Kn;(function(r){function t(i={},o={},a=!1){typeof i!="object"&&(i={}),typeof o!="object"&&(o={});let l=Vb(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)=>(Wb(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})(Kn||(Kn={}));Gn.default=Kn});var Zn=Ft(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});var Vn;(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})(Vn||(Vn={}));Wn.default=Vn});var ju=Ft(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});var Du=Zn(),Xn=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=Du.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]?Du.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[]}};Qn.default=Xn});var lt=Ft((Bt,Cs)=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.AttributeMap=Bt.OpIterator=Bt.Op=void 0;var Os=pl(),Zb=In(),Yn=$n(),be=Mu();Bt.AttributeMap=be.default;var Rt=Zn();Bt.Op=Rt.default;var ht=ju();Bt.OpIterator=ht.default;var Xb="\0",Pu=(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]]},Mt=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=Zb(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(Yn(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+Rt.default.length(e):e.delete?t-e.delete:t,0)}length(){return this.reduce((t,e)=>t+Rt.default.length(e),0)}slice(t=0,e=1/0){let s=[],n=new ht.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+=Rt.default.length(o)}return new r(s)}compose(t){let e=new ht.default(this.ops),s=new ht.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 h=l.retain==null?"insert":"retain",[p,m,y]=Pu(l[h],u.retain),v=r.getHandler(p);c[h]={[p]:v.compose(m,y,h==="retain")}}let f=be.default.compose(l.attributes,u.attributes,typeof l.retain=="number");if(f&&(c.attributes=f),o.push(c),!s.hasNext()&&Yn(o.ops[o.ops.length-1],c)){let h=new r(e.rest());return o.concat(h).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:Xb;let c=l===t?"on":"with";throw new Error("diff() called "+c+" non-document")}).join("")),n=new r,i=Os(s[0],s[1],e,!0),o=new ht.default(this.ops),a=new ht.default(t.ops);return i.forEach(l=>{let u=l[1].length;for(;u>0;){let c=0;switch(l[0]){case Os.INSERT:c=Math.min(a.peekLength(),u),n.push(a.next(c));break;case Os.DELETE:c=Math.min(u,o.peekLength()),o.next(c),n.delete(c);break;case Os.EQUAL:c=Math.min(o.peekLength(),a.peekLength(),u);let f=o.next(c),h=a.next(c);Yn(f.insert,h.insert)?n.retain(c,be.default.diff(f.attributes,h.attributes)):n.push(h).delete(c);break}u-=c}}),n.chop()}eachLine(t,e=` 2`){let s=new ht.default(this.ops),n=new r,i=0;for(;s.hasNext();){if(s.peekType()!=="insert")return;let o=s.peek(),a=Rt.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(Rt.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(Rt.default.length(a),be.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 ht.default(i.ops).next(),[a,l,u]=Pu(n.retain,o.insert),c=r.getHandler(a);return e.retain({[a]:c.invert(l,u)},be.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 ht.default(this.ops),i=new ht.default(s.ops),o=new r;for(;n.hasNext()||i.hasNext();)if(n.peekType()==="insert"&&(e||i.peekType()!=="insert"))o.retain(Rt.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,f=u.retain,h=typeof f=="object"&&f!==null?f:a;if(typeof c=="object"&&c!==null&&typeof f=="object"&&f!==null){let p=Object.keys(c)[0];if(p===Object.keys(f)[0]){let m=r.getHandler(p);m&&(h={[p]:m.transform(c[p],f[p],e)})}}o.retain(h,be.default.transform(l.attributes,u.attributes,e))}}return o.chop()}transformPosition(t,e=!1){e=!!e;let s=new ht.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}};Mt.Op=Rt.default;Mt.OpIterator=ht.default;Mt.AttributeMap=be.default;Mt.handlers={};Bt.default=Mt;typeof Cs=="object"&&(Cs.exports=Mt,Cs.exports.default=Mt)});var Hu=Ft((aS,ei)=>{"use strict";var ey=Object.prototype.hasOwnProperty,X="~";function vr(){}Object.create&&(vr.prototype=Object.create(null),new vr().__proto__||(X=!1));function ry(r,t,e){this.fn=r,this.context=t,this.once=e||!1}function Fu(r,t,e,s,n){if(typeof e!="function")throw new TypeError("The listener must be a function");var i=new ry(e,s||r,n),o=X?X+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 _s(r,t){--r._eventsCount===0?r._events=new vr:delete r._events[t]}function G(){this._events=new vr,this._eventsCount=0}G.prototype.eventNames=function(){var t=[],e,s;if(this._eventsCount===0)return t;for(s in e=this._events)ey.call(e,s)&&t.push(X?s.slice(1):s);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t};G.prototype.listeners=function(t){var e=X?X+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};G.prototype.listenerCount=function(t){var e=X?X+t:t,s=this._events[e];return s?s.fn?1:s.length:0};G.prototype.emit=function(t,e,s,n,i,o){var a=X?X+t:t;if(!this._events[a])return!1;var l=this._events[a],u=arguments.length,c,f;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(f=1,c=new Array(u-1);f<u;f++)c[f-1]=arguments[f];l.fn.apply(l.context,c)}else{var h=l.length,p;for(f=0;f<h;f++)switch(l[f].once&&this.removeListener(t,l[f].fn,void 0,!0),u){case 1:l[f].fn.call(l[f].context);break;case 2:l[f].fn.call(l[f].context,e);break;case 3:l[f].fn.call(l[f].context,e,s);break;case 4:l[f].fn.call(l[f].context,e,s,n);break;default:if(!c)for(p=1,c=new Array(u-1);p<u;p++)c[p-1]=arguments[p];l[f].fn.apply(l[f].context,c)}}return!0};G.prototype.on=function(t,e,s){return Fu(this,t,e,s,!1)};G.prototype.once=function(t,e,s){return Fu(this,t,e,s,!0)};G.prototype.removeListener=function(t,e,s,n){var i=X?X+t:t;if(!this._events[i])return this;if(!e)return _s(this,i),this;var o=this._events[i];if(o.fn)o.fn===e&&(!n||o.once)&&(!s||o.context===s)&&_s(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:_s(this,i)}return this};G.prototype.removeAllListeners=function(t){var e;return t?(e=X?X+t:t,this._events[e]&&_s(this,e)):(this._events=new vr,this._eventsCount=0),this};G.prototype.off=G.prototype.removeListener;G.prototype.addListener=G.prototype.on;G.prefixed=X;G.EventEmitter=G;typeof ei<"u"&&(ei.exports=G)});var Yc=typeof global=="object"&&global&&global.Object===Object&&global,Br=Yc;var Jc=typeof self=="object"&&self&&self.Object===Object&&self,tf=Br||Jc||Function("return this")(),M=tf;var ef=M.Symbol,ct=ef;var Gi=Object.prototype,rf=Gi.hasOwnProperty,sf=Gi.toString,rr=ct?ct.toStringTag:void 0;function nf(r){var t=rf.call(r,rr),e=r[rr];try{r[rr]=void 0;var s=!0}catch{}var n=sf.call(r);return s&&(t?r[rr]=e:delete r[rr]),n}var Vi=nf;var of=Object.prototype,af=of.toString;function lf(r){return af.call(r)}var Wi=lf;var uf="[object Null]",cf="[object Undefined]",Zi=ct?ct.toStringTag:void 0;function ff(r){return r==null?r===void 0?cf:uf:Zi&&Zi in Object(r)?Vi(r):Wi(r)}var gt=ff;function hf(r){return r!=null&&typeof r=="object"}var H=hf;var df=Array.isArray,ft=df;function pf(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var z=pf;function mf(r){return r}var Mr=mf;var gf="[object AsyncFunction]",bf="[object Function]",yf="[object GeneratorFunction]",xf="[object Proxy]";function vf(r){if(!z(r))return!1;var t=gt(r);return t==bf||t==yf||t==gf||t==xf}var Ae=vf;var Af=M["__core-js_shared__"],Dr=Af;var Xi=function(){var r=/[^.]+$/.exec(Dr&&Dr.keys&&Dr.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Ef(r){return!!Xi&&Xi in r}var Qi=Ef;var Tf=Function.prototype,Nf=Tf.toString;function wf(r){if(r!=null){try{return Nf.call(r)}catch{}try{return r+""}catch{}}return""}var wt=wf;var Sf=/[\\^$.*+?()[\]{}|]/g,Lf=/^\[object .+?Constructor\]$/,Of=Function.prototype,Cf=Object.prototype,_f=Of.toString,qf=Cf.hasOwnProperty,If=RegExp("^"+_f.call(qf).replace(Sf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kf(r){if(!z(r)||Qi(r))return!1;var t=Ae(r)?If:Lf;return t.test(wt(r))}var Yi=kf;function Rf(r,t){return r?.[t]}var Ji=Rf;function Bf(r,t){var e=Ji(r,t);return Yi(e)?e:void 0}var J=Bf;var Mf=J(M,"WeakMap"),jr=Mf;var to=Object.create,Df=function(){function r(){}return function(t){if(!z(t))return{};if(to)return to(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}(),eo=Df;function jf(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 ro=jf;function Pf(r,t){var e=-1,s=r.length;for(t||(t=Array(s));++e<s;)t[e]=r[e];return t}var Pr=Pf;var Uf=800,Ff=16,Hf=Date.now;function zf(r){var t=0,e=0;return function(){var s=Hf(),n=Ff-(s-e);if(e=s,n>0){if(++t>=Uf)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var so=zf;function $f(r){return function(){return r}}var no=$f;var Kf=function(){try{var r=J(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Ee=Kf;var Gf=Ee?function(r,t){return Ee(r,"toString",{configurable:!0,enumerable:!1,value:no(t),writable:!0})}:Mr,io=Gf;var Vf=so(io),oo=Vf;function Wf(r,t){for(var e=-1,s=r==null?0:r.length;++e<s&&t(r[e],e,r)!==!1;);return r}var ao=Wf;var Zf=9007199254740991,Xf=/^(?:0|[1-9]\d*)$/;function Qf(r,t){var e=typeof r;return t=t??Zf,!!t&&(e=="number"||e!="symbol"&&Xf.test(r))&&r>-1&&r%1==0&&r<t}var Ur=Qf;function Yf(r,t,e){t=="__proto__"&&Ee?Ee(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var Te=Yf;function Jf(r,t){return r===t||r!==r&&t!==t}var yt=Jf;var th=Object.prototype,eh=th.hasOwnProperty;function rh(r,t,e){var s=r[t];(!(eh.call(r,t)&&yt(s,e))||e===void 0&&!(t in r))&&Te(r,t,e)}var Fr=rh;function sh(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?Te(e,a,l):Fr(e,a,l)}return e}var xt=sh;var lo=Math.max;function nh(r,t,e){return t=lo(t===void 0?r.length-1:t,0),function(){for(var s=arguments,n=-1,i=lo(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),ro(r,this,a)}}var uo=nh;function ih(r,t){return oo(uo(r,t,Mr),r+"")}var co=ih;var oh=9007199254740991;function ah(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=oh}var Hr=ah;function lh(r){return r!=null&&Hr(r.length)&&!Ae(r)}var Ht=lh;function uh(r,t,e){if(!z(e))return!1;var s=typeof t;return(s=="number"?Ht(e)&&Ur(t,e.length):s=="string"&&t in e)?yt(e[t],r):!1}var fo=uh;function ch(r){return co(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&&fo(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 ho=ch;var fh=Object.prototype;function hh(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||fh;return r===e}var Ne=hh;function dh(r,t){for(var e=-1,s=Array(r);++e<r;)s[e]=t(e);return s}var po=dh;var ph="[object Arguments]";function mh(r){return H(r)&>(r)==ph}var tn=mh;var mo=Object.prototype,gh=mo.hasOwnProperty,bh=mo.propertyIsEnumerable,yh=tn(function(){return arguments}())?tn:function(r){return H(r)&&gh.call(r,"callee")&&!bh.call(r,"callee")},sr=yh;function xh(){return!1}var go=xh;var xo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bo=xo&&typeof module=="object"&&module&&!module.nodeType&&module,vh=bo&&bo.exports===xo,yo=vh?M.Buffer:void 0,Ah=yo?yo.isBuffer:void 0,Eh=Ah||go,St=Eh;var Th="[object Arguments]",Nh="[object Array]",wh="[object Boolean]",Sh="[object Date]",Lh="[object Error]",Oh="[object Function]",Ch="[object Map]",_h="[object Number]",qh="[object Object]",Ih="[object RegExp]",kh="[object Set]",Rh="[object String]",Bh="[object WeakMap]",Mh="[object ArrayBuffer]",Dh="[object DataView]",jh="[object Float32Array]",Ph="[object Float64Array
2]",Uh="[object Int8Array]",Fh="[object Int16Array]",Hh="[object Int32Array]",zh="[object Uint8Array]",$h="[object Uint8ClampedArray]",Kh="[object Uint16Array]",Gh="[object Uint32Array]",O={};O[jh]=O[Ph]=O[Uh]=O[Fh]=O[Hh]=O[zh]=O[$h]=O[Kh]=O[Gh]=!0;O[Th]=O[Nh]=O[Mh]=O[wh]=O[Dh]=O[Sh]=O[Lh]=O[Oh]=O[Ch]=O[_h]=O[qh]=O[Ih]=O[kh]=O[Rh]=O[Bh]=!1;function Vh(r){return H(r)&&Hr(r.length)&&!!O[gt(r)]}var vo=Vh;function Wh(r){return function(t){return r(t)}}var we=Wh;var Ao=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nr=Ao&&typeof module=="object"&&module&&!module.nodeType&&module,Zh=nr&&nr.exports===Ao,en=Zh&&Br.process,Xh=function(){try{var r=nr&&nr.require&&nr.require("util").types;return r||en&&en.binding&&en.binding("util")}catch{}}(),Lt=Xh;var Eo=Lt&&Lt.isTypedArray,Qh=Eo?we(Eo):vo,Se=Qh;var Yh=Object.prototype,Jh=Yh.hasOwnProperty;function td(r,t){var e=ft(r),s=!e&&sr(r),n=!e&&!s&&St(r),i=!e&&!s&&!n&&Se(r),o=e||s||n||i,a=o?po(r.length,String):[],l=a.length;for(var u in r)(t||Jh.call(r,u))&&!(o&&(u=="length"||n&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ur(u,l)))&&a.push(u);return a}var zr=td;function ed(r,t){return function(e){return r(t(e))}}var $r=ed;var rd=$r(Object.keys,Object),To=rd;var sd=Object.prototype,nd=sd.hasOwnProperty;function id(r){if(!Ne(r))return To(r);var t=[];for(var e in Object(r))nd.call(r,e)&&e!="constructor"&&t.push(e);return t}var No=id;function od(r){return Ht(r)?zr(r):No(r)}var Le=od;function ad(r){var t=[];if(r!=null)for(var e in Object(r))t.push(e);return t}var wo=ad;var ld=Object.prototype,ud=ld.hasOwnProperty;function cd(r){if(!z(r))return wo(r);var t=Ne(r),e=[];for(var s in r)s=="constructor"&&(t||!ud.call(r,s))||e.push(s);return e}var So=cd;function fd(r){return Ht(r)?zr(r,!0):So(r)}var vt=fd;var hd=J(Object,"create"),Ot=hd;function dd(){this.__data__=Ot?Ot(null):{},this.size=0}var Lo=dd;function pd(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Oo=pd;var md="__lodash_hash_undefined__",gd=Object.prototype,bd=gd.hasOwnProperty;function yd(r){var t=this.__data__;if(Ot){var e=t[r];return e===md?void 0:e}return bd.call(t,r)?t[r]:void 0}var Co=yd;var xd=Object.prototype,vd=xd.hasOwnProperty;function Ad(r){var t=this.__data__;return Ot?t[r]!==void 0:vd.call(t,r)}var _o=Ad;var Ed="__lodash_hash_undefined__";function Td(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=Ot&&t===void 0?Ed:t,this}var qo=Td;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])}}Oe.prototype.clear=Lo;Oe.prototype.delete=Oo;Oe.prototype.get=Co;Oe.prototype.has=_o;Oe.prototype.set=qo;var rn=Oe;function Nd(){this.__data__=[],this.size=0}var Io=Nd;function wd(r,t){for(var e=r.length;e--;)if(yt(r[e][0],t))return e;return-1}var zt=wd;var Sd=Array.prototype,Ld=Sd.splice;function Od(r){var t=this.__data__,e=zt(t,r);if(e<0)return!1;var s=t.length-1;return e==s?t.pop():Ld.call(t,e,1),--this.size,!0}var ko=Od;function Cd(r){var t=this.__data__,e=zt(t,r);return e<0?void 0:t[e][1]}var Ro=Cd;function _d(r){return zt(this.__data__,r)>-1}var Bo=_d;function qd(r,t){var e=this.__data__,s=zt(e,r);return s<0?(++this.size,e.push([r,t])):e[s][1]=t,this}var Mo=qd;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])}}Ce.prototype.clear=Io;Ce.prototype.delete=ko;Ce.prototype.get=Ro;Ce.prototype.has=Bo;Ce.prototype.set=Mo;var $t=Ce;var Id=J(M,"Map"),Kt=Id;function kd(){this.size=0,this.__data__={hash:new rn,map:new(Kt||$t),string:new rn}}var Do=kd;function Rd(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var jo=Rd;function Bd(r,t){var e=r.__data__;return jo(t)?e[typeof t=="string"?"string":"hash"]:e.map}var Gt=Bd;function Md(r){var t=Gt(this,r).delete(r);return this.size-=t?1:0,t}var Po=Md;function Dd(r){return Gt(this,r).get(r)}var Uo=Dd;
vendor: 4,213 bytes, line 2
2function jd(r){return Gt(this,r).has(r)}var Fo=jd;function Pd(r,t){var e=Gt(this,r),s=e.size;return e.set(r,t),this.size+=e.size==s?0:1,this}var Ho=Pd;function _e(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])}}_e.prototype.clear=Do;_e.prototype.delete=Po;_e.prototype.get=Uo;_e.prototype.has=Fo;_e.prototype.set=Ho;var Kr=_e;function Ud(r,t){for(var e=-1,s=t.length,n=r.length;++e<s;)r[n+e]=t[e];return r}var Gr=Ud;var Fd=$r(Object.getPrototypeOf,Object),qe=Fd;var Hd="[object Object]",zd=Function.prototype,$d=Object.prototype,zo=zd.toString,Kd=$d.hasOwnProperty,Gd=zo.call(Object);function Vd(r){if(!H(r)||gt(r)!=Hd)return!1;var t=qe(r);if(t===null)return!0;var e=Kd.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&zo.call(e)==Gd}var $o=Vd;function Wd(){this.__data__=new $t,this.size=0}var Ko=Wd;function Zd(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var Go=Zd;function Xd(r){return this.__data__.get(r)}var Vo=Xd;function Qd(r){return this.__data__.has(r)}var Wo=Qd;var Yd=200;function Jd(r,t){var e=this.__data__;if(e instanceof $t){var s=e.__data__;if(!Kt||s.length<Yd-1)return s.push([r,t]),this.size=++e.size,this;e=this.__data__=new Kr(s)}return e.set(r,t),this.size=e.size,this}var Zo=Jd;function Ie(r){var t=this.__data__=new $t(r);this.size=t.size}Ie.prototype.clear=Ko;Ie.prototype.delete=Go;Ie.prototype.get=Vo;Ie.prototype.has=Wo;Ie.prototype.set=Zo;var Vt=Ie;function tp(r,t){return r&&xt(t,Le(t),r)}var Xo=tp;function ep(r,t){return r&&xt(t,vt(t),r)}var Qo=ep;var ea=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yo=ea&&typeof module=="object"&&module&&!module.nodeType&&module,rp=Yo&&Yo.exports===ea,Jo=rp?M.Buffer:void 0,ta=Jo?Jo.allocUnsafe:void 0;function sp(r,t){if(t)return r.slice();var e=r.length,s=ta?ta(e):new r.constructor(e);return r.copy(s),s}var Vr=sp;function np(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 ra=np;function ip(){return[]}var Wr=ip;var op=Object.prototype,ap=op.propertyIsEnumerable,sa=Object.getOwnPropertySymbols,lp=sa?function(r){return r==null?[]:(r=Object(r),ra(sa(r),function(t){return ap.call(r,t)}))}:Wr,ke=lp;function up(r,t){return xt(r,ke(r),t)}var na=up;var cp=Object.getOwnPropertySymbols,fp=cp?function(r){for(var t=[];r;)Gr(t,ke(r)),r=qe(r);return t}:Wr,Zr=fp;function hp(r,t){return xt(r,Zr(r),t)}var ia=hp;function dp(r,t,e){var s=t(r);return ft(r)?s:Gr(s,e(r))}var Xr=dp;function pp(r){return Xr(r,Le,ke)}var ir=pp;function mp(r){return Xr(r,vt,Zr)}var oa=mp;var gp=J(M,"DataView"),Qr=gp;var bp=J(M,"Promise"),Yr=bp;var yp=J(M,"Set"),Jr=yp;var aa="[object Map]",xp="[object Object]",la="[object Promise]",ua="[object Set]",ca="[object WeakMap]",fa="[object DataView]",vp=wt(Qr),Ap=wt(Kt),Ep=wt(Yr),Tp=wt(Jr),Np=wt(jr),ae=gt;(Qr&&ae(new Qr(new ArrayBuffer(1)))!=fa||Kt&&ae(new Kt)!=aa||Yr&&ae(Yr.resolve())!=la||Jr&&ae(new Jr)!=ua||jr&&ae(new jr)!=ca)&&(ae=function(r){var t=gt(r),e=t==xp?r.constructor:void 0,s=e?wt(e):"";if(s)switch(s){case vp:return fa;case Ap:return aa;case Ep:return la;case Tp:return ua;case Np:return ca}return t});var Ct=ae;var wp=Object.prototype,Sp=wp.hasOwnProperty;function Lp(r){var t=r.length,e=new r.constructor(t);return t&&typeof r[0]=="string"&&Sp.call(r,"index")&&(e.index=r.index,e.input=r.input),e}var ha=Lp;var Op=M.Uint8Array,Re=Op;function Cp(r){var t=new r.constructor(r.byteLength);return new Re(t).set(new Re(r)),t}var Be=Cp;function _p(r,t){var e=t?Be(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.byteLength)}var da=_p;var qp=/\w*$/;function Ip(r){var t=new r.constructor(r.source,qp.exec(r));return t.lastIndex=r.lastIndex,t}var pa=Ip;var ma=ct?ct.prototype:void 0,ga=ma?ma.valueOf:void 0;function kp(r){return ga?Object(ga.call(r)):{}}var ba=kp;function Rp(r,t){var e=t?Be(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var ts=Rp;var Bp="[object Boolean]",Mp="[object Date]",Dp="[object Map]",jp="[object Number]",Pp="[object RegExp]",Up="[object Set]",Fp="[object String]",Hp="[object Symbol]",zp="[object ArrayBuffer]",$p="[object DataView]",Kp="[object Float32Array]",Gp="[object Float64Array
2]",Vp="[object Int8Array]",Wp="[object Int16Array]",Zp="[object Int32Array]",Xp="[object Uint8Array]",Qp="[object Uint8ClampedArray]",Yp="[object Uint16Array]",Jp="[object Uint32Array]";function tm(r,t,e){var s=r.constructor;switch(t){case zp:return Be(r);case Bp:case Mp:return new s(+r);case $p:return da(r,e);case Kp:case Gp:case Vp:case Wp:case Zp:case Xp:case Qp:case Yp:case Jp:return ts(r,e);case Dp:return new s;case jp:case Fp:return new s(r);case Pp:return pa(r);case Up:return new s;case Hp:return ba(r)}}var ya=tm;function em(r){return typeof r.constructor=="function"&&!Ne(r)?eo(qe(r)):{}}var es=em;var rm="[object Map]";function sm(r){return H(r)&&Ct(r)==rm}var xa=sm;var va=Lt&&Lt.isMap,nm=va?we(va):xa,Aa=nm;var im="[object Set]";function om(r){return H(r)&&Ct(r)==im}var Ea=om;var Ta=Lt&&Lt.isSet,am=Ta?we(Ta):Ea,Na=am;var lm=1,um=2,cm=4,wa="[object Arguments]",fm="[object Array]",hm="[object Boolean]",dm="[object Date]",pm="[object Error]",Sa="[object Function]",mm="[object GeneratorFunction]",gm="[object Map]",bm="[object Number]",La="[object Object]",ym="[object RegExp]",xm="[object Set]",vm="[object String]",Am="[object Symbol]",Em="[object WeakMap]",Tm="[object ArrayBuffer]",Nm="[object DataView]",wm="[object Float32Array]",Sm="[object Float64Array]",Lm="[object Int8Array]",Om="[object Int16Array]",Cm="[object Int32Array]",_m="[object Uint8Array]",qm="[object Uint8ClampedArray]",Im="[object Uint16Array]",km="[object Uint32Array]",w={};w[wa]=w[fm]=w[Tm]=w[Nm]=w[hm]=w[dm]=w[wm]=w[Sm]=w[Lm]=w[Om]=w[Cm]=w[gm]=w[bm]=w[La]=w[ym]=w[xm]=w[vm]=w[Am]=w[_m]=w[qm]=w[Im]=w[km]=!0;w[pm]=w[Sa]=w[Em]=!1;function rs(r,t,e,s,n,i){var o,a=t&lm,l=t&um,u=t&cm;if(e&&(o=n?e(r,s,n,i):e(r)),o!==void 0)return o;if(!z(r))return r;var c=ft(r);if(c){if(o=ha(r),!a)return Pr(r,o)}else{var f=Ct(r),h=f==Sa||f==mm;if(St(r))return Vr(r,a);if(f==La||f==wa||h&&!n){if(o=l||h?{}:es(r),!a)return l?ia(r,Qo(o,r)):na(r,Xo(o,r))}else{if(!w[f])return n?r:{};o=ya(r,f,a)}}i||(i=new Vt);var p=i.get(r);if(p)return p;i.set(r,o),Na(r)?r.forEach(function(v){o.add(rs(v,t,e,v,r,i))}):Aa(r)&&r.forEach(function(v,g){o.set(g,rs(v,t,e,g,r,i))});var m=u?l?oa:ir:l?vt:Le,y=c?void 0:m(r);return ao(y||r,function(v,g){y&&(g=v,v=r[g]),Fr(o,g,rs(v,t,e,g,r,i))}),o}var Oa=rs;var Rm=1,Bm=4;function Mm(r){return Oa(r,Rm|Bm)}var At=Mm;var Dm="__lodash_hash_undefined__";function jm(r){return this.__data__.set(r,Dm),this}var Ca=jm;function Pm(r){return this.__data__.has(r)}var _a=Pm;function ss(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new Kr;++t<e;)this.add(r[t])}ss.prototype.add=ss.prototype.push=Ca;ss.prototype.has=_a;var qa=ss;function Um(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 Ia=Um;function Fm(r,t){return r.has(t)}var ka=Fm;var Hm=1,zm=2;function $m(r,t,e,s,n,i){var o=e&Hm,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 f=-1,h=!0,p=e&zm?new qa:void 0;for(i.set(r,t),i.set(t,r);++f<a;){var m=r[f],y=t[f];if(s)var v=o?s(y,m,f,t,r,i):s(m,y,f,r,t,i);if(v!==void 0){if(v)continue;h=!1;break}if(p){if(!Ia(t,function(g,A){if(!ka(p,A)&&(m===g||n(m,g,e,s,i)))return p.push(A)})){h=!1;break}}else if(!(m===y||n(m,y,e,s,i))){h=!1;break}}return i.delete(r),i.delete(t),h}var ns=$m;function Km(r){var t=-1,e=Array(r.size);return r.forEach(function(s,n){e[++t]=[n,s]}),e}var Ra=Km;function Gm(r){var t=-1,e=Array(r.size);return r.forEach(function(s){e[++t]=s}),e}var Ba=Gm;var Vm=1,Wm=2,Zm="[object Boolean]",Xm="[object Date]",Qm="[object Error]",Ym="[object Map]",Jm="[object Number]",tg="[object RegExp]",eg="[object Set]",rg="[object String]",sg="[object Symbol]",ng="[object ArrayBuffer]",ig="[object DataView]",Ma=ct?ct.prototype:void 0,sn=Ma?Ma.valueOf
vendor: 26,098 bytes, lines 2-3
2:void 0;function og(r,t,e,s,n,i,o){switch(e){case ig:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case ng:return!(r.byteLength!=t.byteLength||!i(new Re(r),new Re(t)));case Zm:case Xm:case Jm:return yt(+r,+t);case Qm:return r.name==t.name&&r.message==t.message;case tg:case rg:return r==t+"";case Ym:var a=Ra;case eg:var l=s&Vm;if(a||(a=Ba),r.size!=t.size&&!l)return!1;var u=o.get(r);if(u)return u==t;s|=Wm,o.set(r,t);var c=ns(a(r),a(t),s,n,i,o);return o.delete(r),c;case sg:if(sn)return sn.call(r)==sn.call(t)}return!1}var Da=og;var ag=1,lg=Object.prototype,ug=lg.hasOwnProperty;function cg(r,t,e,s,n,i){var o=e&ag,a=ir(r),l=a.length,u=ir(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var h=a[f];if(!(o?h in t:ug.call(t,h)))return!1}var p=i.get(r),m=i.get(t);if(p&&m)return p==t&&m==r;var y=!0;i.set(r,t),i.set(t,r);for(var v=o;++f<l;){h=a[f];var g=r[h],A=t[h];if(s)var E=o?s(A,g,h,t,r,i):s(g,A,h,r,t,i);if(!(E===void 0?g===A||n(g,A,e,s,i):E)){y=!1;break}v||(v=h=="constructor")}if(y&&!v){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)&&(y=!1)}return i.delete(r),i.delete(t),y}var ja=cg;var fg=1,Pa="[object Arguments]",Ua="[object Array]",is="[object Object]",hg=Object.prototype,Fa=hg.hasOwnProperty;function dg(r,t,e,s,n,i){var o=ft(r),a=ft(t),l=o?Ua:Ct(r),u=a?Ua:Ct(t);l=l==Pa?is:l,u=u==Pa?is:u;var c=l==is,f=u==is,h=l==u;if(h&&St(r)){if(!St(t))return!1;o=!0,c=!1}if(h&&!c)return i||(i=new Vt),o||Se(r)?ns(r,t,e,s,n,i):Da(r,t,l,e,s,n,i);if(!(e&fg)){var p=c&&Fa.call(r,"__wrapped__"),m=f&&Fa.call(t,"__wrapped__");if(p||m){var y=p?r.value():r,v=m?t.value():t;return i||(i=new Vt),n(y,v,e,s,i)}}return h?(i||(i=new Vt),ja(r,t,e,s,n,i)):!1}var Ha=dg;function za(r,t,e,s,n){return r===t?!0:r==null||t==null||!H(r)&&!H(t)?r!==r&&t!==t:Ha(r,t,e,s,za,n)}var $a=za;function pg(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 Ka=pg;var mg=Ka(),Ga=mg;function gg(r,t,e){(e!==void 0&&!yt(r[t],e)||e===void 0&&!(t in r))&&Te(r,t,e)}var or=gg;function bg(r){return H(r)&&Ht(r)}var Va=bg;function yg(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var ar=yg;function xg(r){return xt(r,vt(r))}var Wa=xg;function vg(r,t,e,s,n,i,o){var a=ar(r,e),l=ar(t,e),u=o.get(l);if(u){or(r,e,u);return}var c=i?i(a,l,e+"",r,t,o):void 0,f=c===void 0;if(f){var h=ft(l),p=!h&&St(l),m=!h&&!p&&Se(l);c=l,h||p||m?ft(a)?c=a:Va(a)?c=Pr(a):p?(f=!1,c=Vr(l,!0)):m?(f=!1,c=ts(l,!0)):c=[]:$o(l)||sr(l)?(c=a,sr(a)?c=Wa(a):(!z(a)||Ae(a))&&(c=es(l))):f=!1}f&&(o.set(l,c),n(c,l,s,i,o),o.delete(l)),or(r,e,c)}var Za=vg;function Xa(r,t,e,s,n){r!==t&&Ga(t,function(i,o){if(n||(n=new Vt),z(i))Za(r,t,o,e,Xa,s,n);else{var a=s?s(ar(r,o),i,o+"",r,t,n):void 0;a===void 0&&(a=i),or(r,o,a)}},vt)}var Qa=Xa;function Ag(r,t){return $a(r,t)}var le=Ag;var Eg=ho(function(r,t,e){Qa(r,t,e)}),tt=Eg;var cr={};Qc(cr,{Attributor:()=>W,AttributorStore:()=>lr,BlockBlot:()=>ue,ClassAttributor:()=>D,ContainerBlot:()=>Ue,EmbedBlot:()=>q,InlineBlot:()=>os,LeafBlot:()=>j,ParentBlot:()=>et,Registry:()=>Xt,Scope:()=>b,ScrollBlot:()=>ur,StyleAttributor:()=>rt,TextBlot:()=>Fe});var b=(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))(b||{}),W=class{constructor(t,e,s={}){this.attrName=t,this.keyName=e;let n=b.TYPE&b.ATTRIBUTE;this.scope=s.scope!=null?s.scope&b.LEVEL|n:b.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:""}},Zt=class extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}},Tg=(()=>{let r=class on{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{return null}return this.find(n,s)}return null}create(e,s,n){let i=this.query(s);if(i==null)throw new Zt(`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 on.blots.set(l.domNode,l),l}find(e,s=!1){return on.find(e,s)}query(e,s=b.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&b.LEVEL&b.BLOCK?n=this.types.block:e&b.LEVEL&b.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&b.LEVEL&n.scope&&s&b.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 Zt("Invalid definition");if(n&&s.blotName==="abstract")throw new Zt("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]).forEach(a=>{(this.tags[a]==null||s.className==null)&&(this.tags[a]=s)}))),s})}};return r.blots=new WeakMap,r})(),Xt=Tg;function Ya(r,t){return(r.getAttribute("class")||"").split(/\s+/).filter(e=>e.indexOf(`${t}-`)===0)}var an=class extends W{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){Ya(t,this.keyName).forEach(e=>{t.classList.remove(e)}),t.classList.length===0&&t.removeAttribute("class")}value(t){let e=(Ya(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}},D=an;function nn(r){let t=r.split("-"),e=t.slice(1).map(s=>s[0].toUpperCase()+s.slice(1)).join("");return t[0]+e}var ln=class extends W{static keys(t){return(t.getAttribute("style")||"").split(";").map(e=>e.split(":")[0].trim())}add(t,e){return this.canAdd(t,e)?(t.style[nn(this.keyName)]=e,!0):!1}remove(t){t.style[nn(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){let e=t.style[nn(this.keyName)];return this.canAdd(t,e)?e:""}},rt=ln,un=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=Xt.find(this.domNode);if(t==null)return;let e=W.keys(this.domNode),s=D.keys(this.domNode),n=rt.keys(this.domNode);e.concat(s).concat(n).forEach(i=>{let o=t.scroll.query(i,b.ATTRIBUTE);o instanceof W&&(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),{})}},lr=un,tl=class{constructor(t,e){this.scroll=t,this.domNode=e,Xt.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new Zt("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),Xt.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,b.BLOT)!=null&&n)i.wrap(s,n);else if(this.scroll.query(s,b.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 Zt(`Cannot wrap ${t}`);return s.appendChild(this),s}};tl.blotName="abstract";var el=tl,rl=class extends el{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}}};rl.scope=b.INLINE_BLOT;var Ng=rl,j=Ng,cn=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}};function Ja(r,t){let e=t.find(r);if(e)return e;try{return t.create(r)}catch{let s=t.create(b.INLINE);return Array.from(r.childNodes).forEach(n=>{s.domNode.appendChild(n)}),r.parentNode&&r.parentNode.replaceChild(s.domNode,r),s.attach(),s}}var wg=(()=>{let r=class Wt extends el{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,Wt.uiClass&&this.uiNode.classList.add(Wt.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new cn,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{let s=Ja(e,this.scroll);this.insertBefore(s,this.children.head||void 0)}catch(s){if(s instanceof Zt)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 Wt?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 Wt&&(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===b.BLOCK_BLOT?(s.next!=null&&this.splitAfter(s),s.prev!=null&&this.splitAfter(s.prev),s.parent.unwrap(),e=!0):s instanceof Wt?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 Wt?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 Wt&&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=Ja(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})(),Sg=wg,et=Sg;function Lg(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 Me=class De extends et{static create(t){return super.create(t)}static formats(t,e){let s=e.query(De.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 lr(this.domNode)}format(t,e){if(t===this.statics.blotName&&!e)this.children.forEach(s=>{s instanceof De||(s=s.wrap(De.blotName,!0)),this.attributes.copy(s)}),this.unwrap();else{let s=this.scroll.query(t,b.INLINE);if(s==null)return;s instanceof W?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,b.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 De&&s.prev===this&&Lg(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 De&&this.attributes.move(s),s}};Me.allowedChildren=[Me,j],Me.blotName="inline",Me.scope=b.INLINE_BLOT,Me.tagName="SPAN";var Og=Me,os=Og,je=class fn extends et{static create(t){return super.create(t)}static formats(t,e){let s=e.query(fn.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 lr(this.domNode)}format(t,e){let s=this.scroll.query(t,b.BLOCK);s!=null&&(s instanceof W?this.attributes.attribute(s,e):t===this.statics.blotName&&!e?this.replaceWith(fn.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,b.BLOCK)!=null?this.format(s,n):super.formatAt(t,e,s,n)}insertAt(t,e,s){if(s==null||this.scroll.query(e,b.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()}};je.blotName="block",je.scope=b.BLOCK_BLOT,je.tagName="P",je.allowedChildren=[os,je,j];var Cg=je,ue=Cg,hn=class extends et{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())}};hn.blotName="container",hn.scope=b.BLOCK_BLOT;var _g=hn,Ue=_g,dn=class extends j{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)}},q=dn,qg={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Ig=100,Pe=class extends et{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,qg),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=b.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 et&&l.children.forEach(o),s.delete(l.domNode),l.optimize(e))},a=t;for(let l=0;a.length>0;l+=1){if(l>=Ig)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(f=>{let h=this.find(f,!1);i(h,!1),h instanceof et&&h.children.forEach(p=>{i(p,!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)}};Pe.blotName="scroll",Pe.defaultChild=ue,Pe.allowedChildren=[ue,Ue],Pe.scope=b.BLOCK_BLOT,Pe.tagName="DIV";var kg=Pe,ur=kg,pn=class sl extends j{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 sl&&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}};pn.blotName="text",pn.scope=b.INLINE_BLOT;var Rg=pn,Fe=Rg;var ee=ot(lt(),1);var I=ot(lt(),1);var Jn=ot(lt(),1);var Qb=(()=>{class r extends q{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}return r.blotName="break",r.tagName="BR",r})(),$=Qb;var R=class extends Fe{},Yb={"&":"&","<":"<",">":">",'"':""","'":"'"};function ye(r){return r.replace(/[&<>"']/g,t=>Yb[t])}var Jb=(()=>{class r extends os{static allowedChildren=[r,$,q,R];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,b.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})(),K=Jb;var Uu=1,B=(()=>{class r extends ue{cache={};delta(){return this.cache.delta==null&&(this.cache.delta=ti(this)),this.cache.delta}deleteAt(e,s){super.deleteAt(e,s),this.cache={}}formatAt(e,s,n,i){s<=0||(this.scroll.query(n,b.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(` 3`),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 $&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Uu),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()-Uu)){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=$,r.allowedChildren=[$,K,q,R],r})(),U=class extends q{attach(){super.attach(),this.attributes=new lr(this.domNode)}delta(){return new Jn.default().insert(this.value(),L(L({}
3,this.formats()),this.attributes.values()))}format(t,e){let s=this.scroll.query(t,b.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(` 4`),i=n.pop(),o=n.map(l=>{let u=this.scroll.create(B.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)}};U.scope=b.BLOCK_BLOT;function ti(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r.descendants(j).reduce((e,s)=>s.length()===0?e:e.insert(s.value(),st(s,{},t)),new Jn.default).insert(` 5`,st(r))}function st(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=L(L({},t),r.formats()),e&&delete t["code-token"]),r.parent==null||r.parent.statics.blotName==="scroll"||r.parent.statics.scope!==r.statics.scope)?t:st(r.parent,t,e)}var ty=(()=>{class r extends q{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!==b.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 R?this.prev:null,n=s?s.length():0,i=this.next instanceof R?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=(p,m)=>s&&p===s.domNode?m:p===a?n+m-1:i&&p===i.domNode?n+l.length+m:null,f=c(e.start.node,e.start.offset),h=c(e.end.node,e.end.offset);if(f!==null&&h!==null)return{startNode:u.domNode,startOffset:f,endNode:u.domNode,endOffset:h}}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})(),te=ty;var ri=ot(Hu(),1);var Ar=new WeakMap;var si=["error","warn","log","info"],ni="warn";function zu(r){if(ni&&si.indexOf(r)<=si.indexOf(ni)){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 ii(r){return si.reduce((t,e)=>(t[e]=zu.bind(console,e,r),t),{})}ii.level=r=>{ni=r};zu.level=ii.level;var ut=ii;var oi=ut("quill:events"),sy=["selectionchange","mousedown","mouseup","click"];sy.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=Ar.get(n);i&&i.emitter&&i.emitter.handleDOM(...e)})})});var ny=(()=>{class r extends ri.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",oi.error)}emit(){for(var e=arguments.length,s=new Array(e),n=0;n<e;n++)s[n]=arguments[n];return oi.log.call(oi,...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];
vendor: 12,877 bytes, lines 5-10
5(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})(),x=ny;var ai=ut("quill:selection"),Q=class{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=e}},ui=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 Q(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,x.sources.USER),1)}),this.emitter.on(x.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let s=this.getNativeRange();s!=null&&s.start.node!==this.cursor.textNode&&this.emitter.once(x.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?x.sources.SILENT:n)}catch{}})}),this.emitter.on(x.events.SCROLL_OPTIMIZE,(s,n)=>{if(n.range){let{startNode:i,startOffset:o,endNode:a,endOffset:l}=n.range;this.setNativeRange(i,o,a,l),this.update(x.sources.SILENT)}}),this.update(x.sources.SILENT)}handleComposition(){this.emitter.on(x.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(x.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(x.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,b.BLOCK))){if(s.start.node!==this.cursor.textNode){let n=this.scroll.find(s.start.node,!1);if(n==null)return;if(n instanceof j){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[f]=this.scroll.line(t),[h]=this.scroll.line(t+1);f===h&&(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 ai.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&&li(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 j?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 Q(i,n-i)}normalizeNative(t){if(!li(this.root,t.startContainer)||!t.collapsed&&!li(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(ai.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]:x.sources.API;if(typeof e=="string"&&(s=e,e=!1),ai.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]:x.sources.USER,e=this.lastRange,[s,n]=this.getRange();if(this.lastRange=s,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!le(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=[x.events.SELECTION_CHANGE,At(this.lastRange),At(e),t];this.emitter.emit(x.events.EDITOR_CHANGE,...i),t!==x.sources.SILENT&&this.emitter.emit(...i)}}};function li(r,t){try{t.parentNode}catch{return!1}return r.contains(t)}var $u=ui;var iy=/^[ -~]*$/,fi=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=Ku(t),n=new I.default;return ay(s.ops.slice()).reduce((o,a)=>{let l=I.Op.length(a),u=a.attributes||{},c=!1,f=!1;if(a.insert!=null){if(n.retain(l),typeof a.insert=="string"){let m=a.insert;f=!m.endsWith(` 6`)&&(e<=o||!!this.scroll.descendant(U,o)[0]),this.scroll.insertAt(o,m);let[y,v]=this.scroll.line(o),g=tt({},st(y));if(y instanceof B){let[A]=y.descendant(j,v);A&&(g=tt(g,st(A)))}u=I.AttributeMap.diff(g,u)||{}}else if(typeof a.insert=="object"){let m=Object.keys(a.insert)[0];if(m==null)return o;let y=this.scroll.query(m,b.INLINE)!=null;if(y)(e<=o||this.scroll.descendant(U,o)[0])&&(f=!0);else if(o>0){let[v,g]=this.scroll.descendant(j,o-1);v instanceof R?v.value()[g]!==` 7`&&(c=!0):v instanceof q&&v.statics.scope===b.INLINE_BLOT&&(c=!0)}if(this.scroll.insertAt(o,m,a.insert[m]),y){let[v]=this.scroll.descendant(j,o);if(v){let g=tt({},st(v));u=I.AttributeMap.diff(g,u)||{}}}}e+=l}else if(n.push(a),a.retain!==null&&typeof a.retain=="object"){let m=Object.keys(a.retain)[0];if(m==null)return o;this.scroll.updateEmbedAt(o,m,a.retain[m])}Object.keys(u).forEach(m=>{this.scroll.formatAt(o,l,m,u[m])});let h=c?1:0,p=f?1:0;return e+=h+p,n.retain(h),n.delete(p),o+l+h+p},0),n.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+I.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 I.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 I.default().retain(t).retain(e,At(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 I.default().retain(t).retain(e,At(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 I.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 B?s.push(l):l instanceof j&&n.push(l)}):(s=this.scroll.lines(t,e),n=this.scroll.descendants(j,t,e));let[i,o]=[s,n].map(a=>{let l=a.shift();if(l==null)return{};let u=st(l);for(;Object.keys(u).length>0;){let c=a.shift();if(c==null)return u;u=oy(st(c),u)}return u});return L(L({},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)?Er(s,n,e,!0):Er(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=Ku(e),n=new I.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 I.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,` 8`).replace(/\r/g,` 9`),this.scroll.insertAt(t,e),Object.keys(s).forEach(n=>{this.scroll.formatAt(t,e.length,n,s[n])}),this.update(new I.default().retain(t).insert(e,At(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!==B.blotName)return!1;let e=t;return e.children.length>1?!1:e.children.head instanceof $}removeFormat(t,e){let s=this.getText(t,e),[n,i]=this.scroll.line(t+e),o=0,a=new I.default;n!=null&&(o=n.length()-i,a=n.delta().slice(i,i+o-1).insert(` 10`));let u=this.getContents(t,e+o).diff(new I.default().insert(s).concat(a)),c=new I.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(iy)&&this.scroll.find(e[0].target)){let i=this.scroll.find(e[0].target),o=st(i),a=i.offset(this.scroll),l=e[0].oldValue.replace(te.CONTENTS,""),u=new I.default().insert(l),c=new I.default().insert(i.value()),f=s&&{oldRange:Gu(s.oldRange,-a),newRange:Gu(s.newRange,-a)};t=new I.default().retain(a).concat(u.diff(c,f)).reduce((p,m)=>m.insert?p.insert(m.insert,o):p.push(m),new I.default),this.delta=n.compose(t)}else this.delta=this.getDelta(),(!t||!le(n.compose(t),this.delta))&&(t=n.diff(this.delta,s));return t}};function Ze(r,t,e){if(r.length===0){let[p]=ci(e.pop());return t<=0?`</li></${p}>`:`</li></${p}>${Ze([],t-1,e)}`}let[{child:s,offset:n,length:i,indent:o,type:a},...l]=r,[u,c]=ci(a);if(o>t)return e.push(a),o===t+1?`<${u}><li${c}>${Er(s,n,i)}${Ze(l,o,e)}`:`<${u}><li>${Ze(r,t+1,e)}`;let f=e[e.length-1];if(o===t&&a===f)return`</li><li${c}>${Er(s,n,i)}${Ze(l,o,e)}`;let[h]=ci(e.pop());return`</li></${h}>${Ze(r,t-1,e)}`}function Er(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 R)return ye(r.value().slice(t,t+e)).replaceAll(" "," ");if(r instanceof et){if(r.statics.blotName==="list-container"){let u=[];return r.children.forEachAt(t,e,(c,f,h)=>{let p="formats"in c&&typeof c.formats=="function"?c.formats():{};u.push({child:c,offset:f,length:h,indent:p.indent||0,type:p.list})}),Ze(u,-1,[])}let n=[];if(r.children.forEachAt(t,e,(u,c,f)=>{n.push(Er(u,c,f))}),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}
10`:`${a}>${n.join("")}<${l}`}return r.domNode instanceof Element?r.domNode.outerHTML:""}function oy(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 ci(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 Ku(r){return r.reduce((t,e)=>{if(typeof e.insert=="string"){let s=e.insert.replace(/\r\n/g,` 11`).replace(/\r/g,` 12`);return t.insert(s,e.attributes)}return t.push(e)},new I.default)}function Gu(r,t){let{index:e,length:s}=r;return new Q(e+t,s)}function ay(r){let t=[];return r.forEach(e=>{typeof e.insert=="string"?e.insert.split(` 13`).forEach((n,i)=>{i&&t.push({insert:` 14`,attributes:e.attributes}),n&&t.push({insert:n,attributes:e.attributes})}):t.push(e)}),t}var Vu=fi;var ly=(()=>{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})(),k=ly;var qs="\uFEFF",hi=class extends q{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(s=>{this.contentNode.appendChild(s)}),this.leftGuard=document.createTextNode(qs),this.rightGuard=document.createTextNode(qs),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(qs).join("");if(t===this.leftGuard)if(this.prev instanceof R){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 R?(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=qs,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)}})}},Xe=hi;var di=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 Xe)&&(this.emitter.emit(x.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(x.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(x.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(x.events.COMPOSITION_END,t),this.isComposing=!1}},Wu=di;var uy=(()=>{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})(),Qe=uy;var cy=r=>r.parentElement||r.getRootNode().host||null,fy=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}},Is=r=>{let t=parseInt(r,10);return Number.isNaN(t)?0:t},Zu=(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,hy=(r,t)=>{let e=r.ownerDocument,s=t,n=r;for(;n;
vendor: 6,039 bytes, lines 14-15
14){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}:fy(n),a=getComputedStyle(n),l=Zu(s.left,s.right,o.left,o.right,Is(a.scrollPaddingLeft),Is(a.scrollPaddingRight)),u=Zu(s.top,s.bottom,o.top,o.bottom,Is(a.scrollPaddingTop),Is(a.scrollPaddingBottom));if(l||u)if(i)e.defaultView?.scrollBy(l,u);else{let{scrollLeft:c,scrollTop:f}=n;u&&(n.scrollTop+=u),l&&(n.scrollLeft+=l);let h=n.scrollLeft-c,p=n.scrollTop-f;s={left:s.left-h,top:s.top-p,right:s.right-h,bottom:s.bottom-p}}n=i||a.position==="fixed"?null:cy(n)}},Xu=hy;var dy=100,py=["block","break","cursor","inline","scroll","text"],my=(r,t,e)=>{let s=new Xt;return py.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>dy){e.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),s},Qu=my;var Ye=ut("quill"),ks=new Xt;et.uiClass="ql-ui";var d=class r{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:ks,theme:"default"};static events=x.events;static sources=x.sources;static version="2.0.3";static imports={delta:ee.default,parchment:cr,"core/module":k,"core/theme":Qe};static debug(t){t===!0&&(t="log"),ut.level(t)}static find(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ar.get(t)||ks.find(t,e)}static import(t){return this.imports[t]==null&&Ye.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&&Ye.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&typeof e!="boolean"&&e.blotName!=="abstract"&&ks.register(e),typeof e.register=="function"&&e.register(ks)}}constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=gy(t,e),this.container=this.options.container,this.container==null){Ye.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="",Ar.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new x;let n=ur.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 Vu(this.scroll),this.selection=new $u(this.scroll,this.emitter),this.composition=new Wu(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(x.events.EDITOR_CHANGE,o=>{o===x.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(x.events.SCROLL_UPDATE,(o,a)=>{let l=this.selection.lastRange,[u]=this.selection.getRange(),c=l&&u?{oldRange:l,newRange:u}:void 0;bt.call(this,()=>this.editor.update(null,a,c),o)}),this.emitter.on(x.events.SCROLL_EMBED_UPDATE,(o,a)=>{let l=this.selection.lastRange,[u]=this.selection.getRange(),c=l&&u?{oldRange:l,newRange:u}:void 0;bt.call(this,()=>{let f=new ee.default().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(f,[],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]=Dt(t,e,s),bt.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]:x.sources.API;return bt.call(this,()=>{let n=this.getSelection(!0),i=new ee.default;if(n==null)return i;if(this.scroll.query(t,b.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,x.sources.SILENT),i},s)}formatLine(t,e,s,n,i){let o;return[t,e,o,i]=Dt(t,e,s,n,i),bt.call(this,()=>this.editor.formatLine(t,e,o),i,t,0)}formatText(t,e,s,n,i){let o;return[t,e,o,i]=Dt(t,e,s,n,i),bt.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]=Dt(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]:!1)&&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]=Dt(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]=Dt(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 bt.call(this,()=>this.editor.insertEmbed(t,e,s),n,t)}insertText(t,e,s,n,i){let o;return[t,,o,i]=Dt(t,0,s,n,i),bt.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]=Dt(t,e,s),bt.call(this,()=>this.editor.removeFormat(t,e),s,t)}scrollRectIntoView(t){Xu(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]:x.sources.API;return bt.call(this,()=>{t=new ee.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]=Dt(t,e,s),this.selection.setRange(new Q(Math.max(0,t),e),s),s!==x.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x.sources.API,s=new ee.default().insert(t);return this.setContents(s,e)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x.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]:x.sources.API;return bt.call(this,()=>(t=new ee.default(t),this.editor.applyDelta(t)),e,!0)}};function Yu(r){return typeof r=="string"?document.querySelector(r):r}function pi(r){return Object.entries(r??{}).reduce((t,e)=>{let[s,n]=e;return Ut(L({},t),{[s]:n===!0?{}:n})},{})}function Ju(r){return Object.fromEntries(Object.entries(r).filter(t=>t[1]!==void 0))}function gy(r,t){let e=Yu(r);if(!e)throw new Error("Invalid Quill container");let n=!t.theme||t.theme===d.DEFAULTS.theme?Qe:d.import(`themes/${t.theme}`);if(!n)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);let p=d.DEFAULTS,{modules:i}=p,o=Js(p,["modules"]),m=n.DEFAULTS,{modules:a}=m,l=Js(m,["modules"]),u=pi(t.modules);u!=null&&u.toolbar&&u.toolbar.constructor!==Object&&(u=Ut(L({},u),{toolbar:{container:u.toolbar}}));let c=tt({},pi(i),pi(a),u),f=L(L(L({},o),Ju(l)),Ju(t)),h=t.registry;return h?t.formats&&Ye.warn('Ignoring "formats" option because "registry" is specified'):h=t.formats?Qu(t.formats,f.registry,Ye):f.registry,Ut(L({}
15,f),{registry:h,container:e,theme:n,modules:Object.entries(c).reduce((y,v)=>{let[g,A]=v;if(!A)return y;let E=d.import(`modules/${g}`);return E==null?(Ye.error(`Cannot load ${g} module. Are you sure you registered it?`),y):Ut(L({},y),{[g]:tt({},E.DEFAULTS||{},A)})},{}),bounds:Yu(f.bounds)})}function bt(r,t,e,s){if(!this.isEnabled()&&t===x.sources.USER&&!this.allowReadOnlyEdits)return new ee.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=tc(n,o,t):s!==0&&(n=tc(n,e,s,t)),this.setSelection(n,x.sources.SILENT)),o.length()>0){let a=[x.events.TEXT_CHANGE,o,i,t];this.emitter.emit(x.events.EDITOR_CHANGE,...a),t!==x.sources.SILENT&&this.emitter.emit(...a)}return o}function Dt(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||x.sources.API,[r,t,i,n]}function tc(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!==x.sources.USER)):[i,o]=[r.index,r.index+r.length].map(a=>a<t||a===t&&s===x.sources.USER?a:n>=0?a+n:Math.max(t,a+n)),new Q(i,o-i)}var mi=class extends Ue{},dt=mi;var pt=ot(lt(),1);function ec(r){return r instanceof B||r instanceof U}function rc(r){return typeof r.updateContent=="function"}var by=(()=>{class r extends ur{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=B;static allowedChildren=[B,U,dt];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(x.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(x.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,s){this.emitter.emit(x.events.SCROLL_EMBED_UPDATE,e,s)}
vendor: 30,119 bytes, lines 15-39
15deleteAt(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 U||o instanceof U){this.optimize();return}let a=o.children.head instanceof $?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,b.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===b.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 pt.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(U,e)[0]&&e<this.length()),c=o.type==="block"?o.delta:new pt.default().insert({[o.key]:o.value});gi(this,e,c);let f=o.type==="block"?1:0,h=e+c.length()+f;u&&this.insertAt(h-1,` 18`);let p=st(this.line(e)[0]),m=pt.AttributeMap.diff(p,o.attributes)||{};Object.keys(m).forEach(y=>{this.formatAt(h-1,1,y,m[y])}),e=h}let[a,l]=this.children.find(e);if(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);gi(c,0,u.delta)}else{let c=this.create(u.key,u.value);this.insertBefore(c,a||void 0),Object.keys(u.attributes).forEach(f=>{c.format(f,u.attributes[f])})}})),i.type==="block"&&i.delta.length()){let u=a?a.offset(a.scroll)+l:this.length();gi(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 j?[n,i]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(ec,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,f,h)=>{ec(c)?l.push(c):c instanceof Ue&&(l=l.concat(n(c,f,u))),u-=h}),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(x.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=x.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&&!rc(o)}),e.length>0&&this.emitter.emit(x.events.SCROLL_BEFORE_UPDATE,s,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(x.events.SCROLL_UPDATE,s,e)}updateEmbedAt(e,s,n){let[i]=this.descendant(o=>o instanceof U,e);i&&i.statics.blotName===s&&rc(i)&&i.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){let s=[],n=new pt.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 pt.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,b.INLINE)?n.push(i):(n.length()&&s.push({type:"block",delta:n,attributes:{}}),n=new pt.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,b.BLOCK&b.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})();function gi(r,t,e){e.reduce((s,n)=>{let i=pt.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(j,s),u=st(l);o=pt.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,b.INLINE)!=null){let[u]=r.descendant(j,s),c=st(u);o=pt.AttributeMap.diff(c,o)||{}}}}return Object.keys(o).forEach(a=>{r.formatAt(s,i,a,o[a])}),s+i},t)}var sc=by;var nt=ot(lt(),1);var bi={scope:b.BLOCK,whitelist:["right","center","justify"]},nc=new W("align","align",bi),yi=new D("align","ql-align",bi),Rs=new rt("align","text-align",bi);var Tr=class extends rt{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}},ic=new D("color","ql-color",{scope:b.INLINE}),Nr=new Tr("color","color",{scope:b.INLINE});var oc=new D("background","ql-bg",{scope:b.INLINE}),wr=new Tr("background","background-color",{scope:b.INLINE});var Tt=class extends dt{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${ye(this.code(t,e))} 22</pre>`}},F=(()=>{class r extends B{static TAB=" ";static register(){d.register(Tt)}}return r})(),ac=(()=>{class r extends K{}return r.blotName="code",r.tagName="CODE",r})();F.blotName="code-block";F.className="ql-code-block";F.tagName="DIV";Tt.blotName="code-block-container";Tt.className="ql-code-block-container";Tt.tagName="DIV";Tt.allowedChildren=[F];F.allowedChildren=[R,$,te];F.requiredContainer=Tt;var xi={scope:b.BLOCK,whitelist:["rtl"]},Bs=new W("direction","dir",xi),vi=new D("direction","ql-direction",xi),Ms=new rt("direction","direction",xi);var lc={scope:b.INLINE,whitelist:["serif","monospace"]},Ei=new D("font","ql-font",lc),Ai=class extends rt{value(t){return super.value(t).replace(/["']/g,"")}},Ds=new Ai("font","font-family",lc);var Ti=new D("size","ql-size",{scope:b.INLINE,whitelist:["small","large","huge"]}),js=new rt("size","font-size",{scope:b.INLINE,whitelist:["10px","18px","32px"]});var V=ot(lt(),1);var yy=ut("quill:keyboard"),xy=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",Sr=class r extends k{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=Ay(t);if(n==null){yy.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=L(L(Ut(L({},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(g=>r.match(t,g));if(n.length===0)return;let i=d.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),[f,h]=o.length===0?[u,c]:this.quill.getLeaf(o.index+o.length),p=u instanceof Fe?u.value().slice(0,c):"",m=f instanceof Fe?f.value().slice(h):"",y={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:l,prefix:p,suffix:m,event:t};n.some(g=>{if(g.collapsed!=null&&g.collapsed!==y.collapsed||g.empty!=null&&g.empty!==y.empty||g.offset!=null&&g.offset!==y.offset)return!1;if(Array.isArray(g.format)){if(g.format.every(A=>y.format[A]==null))return!1}else if(typeof g.format=="object"&&!Object.keys(g.format).every(A=>g.format[A]===!0?y.format[A]!=null:g.format[A]===!1?y.format[A]==null:le(g.format[A],y.format[A])))return!1;return g.prefix!=null&&!g.prefix.test(y.prefix)||g.suffix!=null&&!g.suffix.test(y.suffix)?!1:g.handler.call(this,o,y,g)!==!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 V.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=V.AttributeMap.diff(u,c)||{},Object.keys(n).length>0){let f=new V.default().retain(t.index+i.length()-2).retain(1,n);o=o.compose(f)}}}this.quill.updateContents(o,d.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 V.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=V.AttributeMap.diff(l,u)||{},Object.keys(n).length>0&&(o=o.retain(a.length()-1).retain(1,n))}}this.quill.updateContents(o,d.sources.USER),this.quill.focus()}handleDeleteRange(t){Lr({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,b.BLOCK)&&!Array.isArray(e.format[o])&&(i[o]=e.format[o]),i),{}),n=new V.default().retain(t.index).delete(t.length).insert(` 23`,s);this.quill.updateContents(n,d.sources.USER),this.quill.setSelection(t.index+1,d.sources.SILENT),this.quill.focus()}},vy={bindings:{bold:Ni("bold"),italic:Ni("italic"),underline:Ni("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(r,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",d.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",d.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",d.sources.USER):t.format.list!=null&&this.quill.format("list",!1,d.sources.USER)}},"indent code-block":uc(!0),"outdent code-block":uc(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(r){this.quill.deleteText(r.index-1,1,d.sources.USER)}},tab:{key:"Tab",handler(r,t){if(t.format.table)return!0;this.quill.history.cutoff();let e=new V.default().retain(r.index).delete(r.length).insert(" ");return this.quill.updateContents(e,d.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index+1,d.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,d.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,d.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(r){let[t,e]=this.quill.getLine(r.index),s=Ut(L({},t.formats()),{list:"checked"}),n=new V.default().retain(r.index).insert(` 24`,s).retain(t.length()-e-1).retain(1,{list:"unchecked"});this.quill.updateContents(n,d.sources.USER),this.quill.setSelection(r.index+1,d.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 V.default().retain(r.index).insert(` 25`,t.format).retain(e.length()-s-1).retain(1,{header:null});this.quill.updateContents(n,d.sources.USER),this.quill.setSelection(r.index+1,d.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=Ey(e,s,n,i);if(o==null)return;let a=e.offset();if(o<0){let l=new V.default().retain(a).insert(` 26`);this.quill.updateContents(l,d.sources.USER),this.quill.setSelection(r.index+1,r.length,d.sources.SILENT)}else if(o>0){a+=e.length();let l=new V.default().retain(a).insert(` 27`);this.quill.updateContents(l,d.sources.USER),this.quill.setSelection(a,d.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,d.sources.USER):this.quill.setSelection(n+s.length(),d.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;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(r.index," ",d.sources.USER),this.quill.history.cutoff();let o=new V.default().retain(r.index-n).delete(e+1).retain(s.length()-2-n).retain(1,{list:i});return this.quill.updateContents(o,d.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index-e,d.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 V.default().retain(r.index+t.length()-e-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,d.sources.USER),this.quill.setSelection(r.index-1,d.sources.SILENT),!1}return!0}},"embed left":Ps("ArrowLeft",!1),"embed left shift":Ps("ArrowLeft",!0),"embed right":Ps("ArrowRight",!1),"embed right shift":Ps("ArrowRight",!0),"table down":cc(!1),"table up":cc(!0)}};Sr.DEFAULTS=vy;function uc(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,d.sources.USER),this.quill.setSelection(t.index+i.length,d.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)=>{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(d.sources.USER),this.quill.setSelection(a,l,d.sources.SILENT)}}}function Ps(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 q?(r==="ArrowLeft"?t?this.quill.setSelection(s.index-1,s.length+1,d.sources.USER):this.quill.setSelection(s.index-1,d.sources.USER):t?this.quill.setSelection(s.index,s.length+1,d.sources.USER):this.quill.setSelection(s.index+s.length+1,d.sources.USER),!1):!0}}}function Ni(r){return{key:r[0],shortKey:!0,handler(t,e){this.quill.format(r,!e.format[r],d.sources.USER)}}}function cc(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,d.sources.USER)}}else{let o=n.table()[s];o!=null&&(r?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,d.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,d.sources.USER))}return!1}}}function Ay(r){if(typeof r=="string"||typeof r=="number")r={key:r};else if(typeof r=="object")r=At(r);else return null;return r.shortKey&&(r[xy]=r.shortKey,delete r.shortKey),r}function Lr(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=V.AttributeMap.diff(o,i)||{}}t.deleteText(e,d.sources.USER),Object.keys(n).length>0&&t.formatLine(e.index,1,n,d.sources.USER),t.setSelection(e.index,d.sources.SILENT)}function Ey(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 Ty=/font-weight:\s*normal/,Ny=["P","OL","UL"],fc=r=>r&&Ny.includes(r.tagName),wy=r=>{Array.from(r.querySelectorAll("br")).filter(t=>fc(t.previousElementSibling)&&fc(t.nextElementSibling)).forEach(t=>{t.parentNode?.removeChild(t)})},Sy=r=>{Array.from(r.querySelectorAll('b[style*="font-weight"]')).filter(t=>t.getAttribute("style")?.match(Ty)).forEach(t=>{let e=r.createDocumentFragment();e.append(...t.childNodes),t.parentNode?.replaceChild(e,t)})};function wi(r){r.querySelector('[id^="docs-internal-guid-"]')&&(Sy(r),wy(r))}var Ly=/\bmso-list:[^;]*ignore/i,Oy=/\bmso-list:[^;]*\bl(\d+)/i,Cy=/\bmso-list:[^;]*\blevel(\d+)/i,_y=(r,t)=>{let e=r.getAttribute("style"),s=e?.match(Oy);if(!s)return null;let n=Number(s[1]),i=e?.match(Cy),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}},qy=r=>{let t=Array.from(r.querySelectorAll("[style*=mso-list]")),e=[],s=[];t.forEach(o=>{(o.getAttribute("style")||"").match(Ly)?e.push(o):s.push(o)}),e.forEach(o=>o.parentNode?.removeChild(o));let n=r.documentElement.innerHTML,i=s.map(o=>_y(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(f=>{let h=document.createElement("li");h.setAttribute("data-list",f.type),f.indent>1&&h.setAttribute("class",`ql-indent-${f.indent-1}`),h.innerHTML=f.element.innerHTML,l.appendChild(h)});let u=o[0]?.element,{parentNode:c}=u??{};u&&c?.replaceChild(l,u),o.slice(1).forEach(f=>{let{element:h}=f;c?.removeChild(h)})}};function Si(r){r.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&qy(r)}var Iy=[Si,wi],ky=r=>{r.documentElement&&Iy.forEach(t=>{t(r)})},hc=ky;var Ry=ut("quill:clipboard"),By=[[Node.TEXT_NODE,Vy],[Node.TEXT_NODE,pc],["br",Uy],[Node.ELEMENT_NODE,pc],[Node.ELEMENT_NODE,Py],[Node.ELEMENT_NODE,jy],[Node.ELEMENT_NODE,Ky],["li",zy],["ol, ul",$y],["pre",Fy],["tr",Gy],["b",Li("bold")],["i",Li("italic")],["strike",Li("strike")],["style",Hy]],My=[nc,Bs].reduce((r,t)=>(r[t.keyName]=t,r),{}),dc=[Rs,wr,Nr,Ms,Ds,js].reduce((r,t)=>(r[t.keyName]=t,r),{}),mc=(()=>{class r extends k{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=[],By.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[F.blotName])return new nt.default().insert(n||"",{[F.blotName]:i[F.blotName]});if(!s)return new nt.default().insert(n||"",i);let o=this.convertHTML(s);return Or(o,` 28`)&&(o.ops[o.ops.length-1].attributes==null||i.table)?o.compose(new nt.default().retain(o.length()-1).delete(1)):o}normalizeHTML(e){hc(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 Fs(this.quill.scroll,n,o,a,i)}dangerouslyPasteHTML(e,s){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d.sources.API;if(typeof e=="string"){let i=this.convert({html:e,text:""});this.quill.setContents(i,s),this.quill.setSelection(0,d.sources.SILENT)}else{let i=this.convert({html:s,text:""});this.quill.updateContents(new nt.default().retain(e).concat(i),n),this.quill.setSelection(e+i.length(),d.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&&Lr({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(s=>s[0]!=="#").join(` 29`)}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);Ry.log("onPaste",a,{text:n,html:i});let l=new nt.default().retain(e.index).delete(e.length).concat(a);this.quill.updateContents(l,d.sources.USER),this.quill.setSelection(l.length()-e.length,d.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})();function xe(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,L(L({},o),i.attributes))},new nt.default):r}function Or(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 re(r,t){if(!(r instanceof Element))return!1;let e=t.query(r);return e&&e.prototype instanceof q?!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 Dy(r,t){return r.previousElementSibling&&r.nextElementSibling&&!re(r.previousElementSibling,t)&&!re(r.nextElementSibling,t)}var Us=new WeakMap;function gc(r){return r==null?!1:(Us.has(r)||(r.tagName==="PRE"?Us.set(r,!0):Us.set(r,gc(r.parentNode))),Us.get(r))}function Fs(r,t,e,s,n){return t.nodeType===t.TEXT_NODE?s.reduce((i,o)=>o(t,i,r),new nt.default):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((i,o)=>{let a=Fs(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 nt.default):new nt.default}function Li(r){return(t,e,s)=>xe(e,r,!0,s)}function jy(r,t,e){let s=W.keys(r),n=D.keys(r),i=rt.keys(r),o={};return s.concat(n).concat(i).forEach(a=>{let l=e.query(a,b.ATTRIBUTE);l!=null&&(o[l.attrName]=l.value(r),o[l.attrName])||(l=My[a],l!=null&&(l.attrName===a||l.keyName===a)&&(o[l.attrName]=l.value(r)||void 0),l=dc[a],l!=null&&(l.attrName===a||l.keyName===a)&&(l=dc[a],o[l.attrName]=l.value(r)||void 0))}),Object.entries(o).reduce((a,l)=>{let[u,c]=l;return xe(a,u,c,e)},t)}function Py(r,t,e){let s=e.query(r);if(s==null)return t;if(s.prototype instanceof q){let n={},i=s.value(r);if(i!=null)return n[s.blotName]=i,new nt.default().insert(n,s.formats(r,e))}else if(s.prototype instanceof ue&&!Or(t,` 30`)&&t.insert(` 31`),"blotName"in s&&"formats"in s&&typeof s.formats=="function")return xe(t,s.blotName,s.formats(r,e),e);return t}function Uy(r,t){return Or(t,` 32`)||t.insert(` 33`),t}function Fy(r,t,e){let s=e.query("code-block"),n=s&&"formats"in s&&typeof s.formats=="function"?s.formats(r,e):!0;return xe(t,"code-block",n,e)}function Hy(){return new nt.default}function zy(r,t,e){let s=e.query(r);if(s==null||s.blotName!=="list"||!Or(t,` 34`))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,L({indent:n},a.attributes||{})):o,new nt.default)}function $y(r,t,e){let s=r,n=s.tagName==="OL"?"ordered":"bullet",i=s.getAttribute("data-checked");return i&&(n=i==="true"?"checked":"unchecked"),xe(t,"list",n,e)}function pc(r,t,e){if(!Or(t,` 35`)){if(re(r,e)&&(r.childNodes.length>0||r instanceof HTMLParagraphElement))return t.insert(` 36`);if(t.length()>0&&r.nextSibling){let s=r.nextSibling;for(;s!=null;){if(re(s,e))return t.insert(` 37`);let n=e.query(s);if(n&&n.prototype instanceof U)return t.insert(` 38`);s=s.firstChild}}}return t}function Ky(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 xe(i,a,l,e)},t),parseFloat(n.textIndent||0)>0?new nt.default().insert(" ").concat(t):t}function Gy(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 xe(t,"table",i,e)}return t}function Vy(r,t,e){let s=r.data;if(r.parentElement?.tagName==="O:P")return t.insert(s.trim());if(!gc(r)){if(s.trim().length===0&&s.includes(` 39`)&&!Dy(r,e))return t;s=s.replace(/[^\S\u00a0]/g," "),s=s.replace(/ {2,}/g," "),(r.previousSibling==null&&r.parentElement!=null&&re(r.parentElement,e)||r.previousSibling instanceof Element&&re(r.previousSibling,e))&&(s=s.replace(/^ /,"")),(r.nextSibling==null&&r.parentElement!=null&&re(r.parentElement,e)||r.nextSibling instanceof Element&&re(r.nextSibling,e))&&(s=s.replace(/ $/,"")),s=s.replaceAll("\xA0"," ")}return t.insert(s)}var yc=(()=>{class r extends k{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(d.events.EDITOR_CHANGE,(n,i,o,a)=>{n===d.events.SELECTION_CHANGE?i&&a!==d.sources.SILENT&&(this.currentRange=i):n===d.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===d.sources.USER?this.record(i,o):this.transform(i)),this.currentRange=Oi(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:Oi(n.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,d.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){bc(this.stack.undo,e),bc(this.stack.redo,e)}undo(){this.change("undo","redo")}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,d.sources.USER);else{let s=Zy(this.quill.scroll,e.delta);this.quill.setSelection(s,d.sources.USER)}}}return r})();function bc(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&&Oi(n.range,e)},e=n.delta.transform(e),r[s].delta.length()===0&&r.splice(s,1)}}function Wy(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,b.BLOCK)!=null):!1}function Zy(r,t){let e=t.reduce((n,i)=>n+(i.delete||0),0),s=t.length()-e;return Wy(r,t)&&(s-=1),s}function Oi(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 xc=ot(lt(),1);var Xy=(()=>{class r extends k{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 xc.default().retain(t.index).delete(t.length));this.quill.updateContents(i,x.sources.USER),this.quill.setSelection(t.index+n.length,x.sources.SILENT)})}},r})(),vc=Xy;var se=ot(lt(),1);var Ac=ot(lt(),1);var Qy=["insertText","insertReplacementText"],Ci=class extends k{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",s=>{this.handleBeforeInput(s)}),/Android/i.test(navigator.userAgent)||t.on(d.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){Lr({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 Ac.default().retain(t.index).insert(e,s),d.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,d.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!Qy.includes(t.inputType))return;let e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||e.collapsed===!0)return;let s=Yy(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)}};function Yy(r){return typeof r.data=="string"?r.data:r.dataTransfer?.types.includes("text/plain")?r.dataTransfer.getData("text/plain"):null}var Ec=Ci;var Jy=/Mac/i.test(navigator.platform),tx=100,ex=r=>!!(r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="Home"||Jy&&r.key==="a"&&r.ctrlKey===!0),_i=class extends k{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 et)||!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),d.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&ex(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+tx,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 et)||!s.uiNode)return;let n=document.createRange();n.setStartAfter(s.uiNode),n.setEndAfter(s.uiNode),t.removeAllRanges(),t.addRange(n)}},Tc=_i;d.register({"blots/block":B,"blots/block/embed":U,"blots/break":$,"blots/container":dt,"blots/cursor":te,"blots/embed":Xe,"blots/inline":K,"blots/scroll":sc,"blots/text":R,"modules/clipboard":mc,"modules/history":yc,"modules/keyboard":Sr,"modules/uploader":vc,"modules/input":Ec,"modules/uiNode":Tc});var Hs=d;var qi=class extends D{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}},rx=new qi("indent","ql-indent",{scope:b.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),Nc=rx;var sx=(()=>{class r extends B{static blotName="blockquote";static tagName="blockquote"}return r})(),wc=sx;var nx=(()=>{class r extends B{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(e){return this.tagName.indexOf(e.tagName)+1}}return r})(),Sc=nx;var Ii=(()=>{class r extends dt{}return r.blotName="list-container",r.tagName="OL",r})(),zs=(()=>{class r extends B{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(){d.register(Ii)}constructor(e,s){super(e,s);let n=s.ownerDocument.createElement("span"),i=o=>
40{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})();Ii.allowedChildren=[zs];zs.requiredContainer=Ii;var ix=(()=>{class r extends K{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})(),Je=ix;var ox=(()=>{class r extends Je{static blotName="italic";static tagName=["EM","I"]}return r})(),Lc=ox;var ve=(()=>{class r extends K{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 ki(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})();function ki(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 ax=(()=>{class r extends K{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})(),Oc=ax;var lx=(()=>{class r extends Je{static blotName="strike";static tagName=["S","STRIKE"]}return r})(),Cc=lx;var ux=(()=>{class r extends K{static blotName="underline";static tagName="U"}return r})(),_c=ux;var cx=(()=>{class r extends Xe{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})(),qc=cx;var Ic=["alt","height","width"],fx=(()=>{class r extends q{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 Ic.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 ki(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,s){Ic.indexOf(e)>-1?s?this.domNode.setAttribute(e,s):this.domNode.removeAttribute(e):super.format(e,s)}}return r})(),kc=fx;var Rc=["height","width"],hx=(()=>{class r extends U{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 Rc.reduce((s,n)=>(e.hasAttribute(n)&&(s[n]=e.getAttribute(n)),s),{})}static sanitize(e){return ve.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,s){Rc.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})(),Bc=hx;var Ks=ot(lt(),1);var Cr=new D("code-token","hljs",{scope:b.INLINE}),_r=(()=>{class r extends K{static formats(e,s){for(;e!=null&&e!==s.domNode;){if(e.classList&&e.classList.contains(F.className))return super.formats(e,s);e=e.parentNode}}constructor(e,s,n){super(e,s,n),Cr.add(this.domNode,n)}format(e,s){e!==r.blotName?super.format(e,s):s?Cr.add(this.domNode,s):(Cr.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Cr.value(this.domNode)||this.unwrap()}}return r.blotName="code-token",r.className="ql-token",r})(),it=class extends F{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(),_r.blotName,!1),super.replaceWith(t,e)}},$s=(()=>{class r extends Tt{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,s){e===it.blotName&&(this.forceNext=!0,this.children.forEac
vendor: 16,236 bytes, lines 40-49
40h(n=>{n.format(e,s)}))}formatAt(e,s,n,i){n===it.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=it.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(ti(c,!1)),new Ks.default),l=e(i,o);a.diff(l).reduce((u,c)=>{let{retain:f,attributes:h}=c;return f?(h&&Object.keys(h).forEach(p=>{[it.blotName,_r.blotName].includes(p)&&this.formatAt(u,f,p,h[p])}),u+f):u},0)}this.cachedText=i,this.forceNext=!1}}html(e,s){let[n]=this.children.find(e);return`<pre data-language="${n?it.formats(n.domNode):"plain"}"> 43${ye(this.code(e,s))} 44</pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){let s=it.formats(this.children.head.domNode);s!==this.uiNode.value&&(this.uiNode.value=s)}}}return r.allowedChildren=[it],r})();it.requiredContainer=$s;it.allowedChildren=[_r,te,R,$];var dx=(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},qr=class extends k{static register(){d.register(_r,!0),d.register(it,!0),d.register($s,!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(d.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof $s))return;let e=this.quill.root.ownerDocument.createElement("select");this.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(it.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(e),t.children.head&&(e.value=it.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(d.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(d.sources.USER);let s=this.quill.getSelection();(t==null?this.quill.scroll.descendants($s):[t]).forEach(i=>{i.highlight(this.highlightBlot,e)}),this.quill.update(d.sources.SILENT),s!=null&&this.quill.setSelection(s,d.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 ye(t).split(` 45`).reduce((n,i,o)=>(o!==0&&n.insert(` 46`,{[F.blotName]:e}),n.insert(i)),new Ks.default);let s=this.quill.root.ownerDocument.createElement("div");return s.classList.add(F.className),s.innerHTML=dx(this.options.hljs,e,t),Fs(this.quill.scroll,s,[(n,i)=>{let o=Cr.value(n);return o?i.compose(new Ks.default().retain(i.length(),{[_r.blotName]:o})):i}],[(n,i)=>n.data.split(` 47`).reduce((o,a,l)=>(l!==0&&o.insert(` 48`,{[F.blotName]:e}),o.insert(a)),i)],new WeakMap)}};qr.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"}]};var Mc=ot(lt(),1);var Nt=(()=>{class r extends B{static blotName="table";static tagName="TD";static create(e){let s=super.create();return e?s.setAttribute("data-row",e):s.setAttribute("data-row",Vs()),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})(),ne=(()=>{class r extends dt{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})(),jt=(()=>{class r extends dt{static blotName="table-body";static tagName="TBODY"}return r})(),Gs=(()=>{class r extends dt{static blotName="table-container";static tagName="TABLE";balanceCells(){let e=this.descendants(ne),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=Nt.formats(n.children.head.domNode));let o=this.scroll.create(Nt.blotName,i);n.appendChild(o),o.optimize()})})}cells(e){return this.rows().map(s=>s.children.at(e))}deleteColumn(e){let[s]=this.descendant(jt);s==null||s.children.head==null||s.children.forEach(n=>{let i=n.children.at(e);i?.remove()})}insertColumn(e){let[s]=this.descendant(jt);s==null||s.children.head==null||s.children.forEach(n=>{let i=n.children.at(e),o=Nt.formats(n.children.head.domNode),a=this.scroll.create(Nt.blotName,o);n.insertBefore(a,i)})}insertRow(e){let[s]=this.descendant(jt);if(s==null||s.children.head==null)return;let n=Vs(),i=this.scroll.create(ne.blotName);s.children.head.children.forEach(()=>{let a=this.scroll.create(Nt.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=[jt],r})();jt.requiredContainer=Gs;jt.allowedChildren=[ne];ne.requiredContainer=jt;ne.allowedChildren=[Nt];Nt.requiredContainer=ne;function Vs(){return`row-${Math.random().toString(36).slice(2,6)}`}var Ri=class extends k{static register(){d.register(Nt),d.register(ne),d.register(jt),d.register(Gs)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Gs).forEach(t=>{t.balanceCells()})}deleteColumn(){let[t,,e]=this.getTable();e!=null&&(t.deleteColumn(e.cellOffset()),this.quill.update(d.sources.USER))}deleteRow(){let[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(d.sources.USER))}deleteTable(){let[t]=this.getTable();if(t==null)return;let e=t.offset();t.remove(),this.quill.update(d.sources.USER),this.quill.setSelection(e,d.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!==Nt.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(d.sources.USER);let a=n.rowOffset();t===0&&(a+=1),this.quill.setSelection(e.index+a,e.length,d.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(d.sources.USER),t>0?this.quill.setSelection(e,d.sources.SILENT):this.quill.setSelection(e.index+n.children.length,e.length,d.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:Vs()})},new Mc.default().retain(s.index));this.quill.updateContents(n,d.sources.USER),this.quill.setSelection(s.index,d.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(d.events.SCROLL_OPTIMIZE,t=>{t.some(e=>["TD","TR","TBODY","TABLE"].includes(e.target.tagName)?(this.quill.once(d.events.TEXT_CHANGE,(s,n,i)=>{i===d.sources.USER&&this.balanceTables()}),!0):!1)})}},Dc=Ri;var Uc=ot(lt(),1);var jc=ut("quill:toolbar"),Bi=(()=>{class r extends k{constructor(e,s){if(super(e,s),Array.isArray(this.options.container)){let n=document.createElement("div");n.setAttribute("role","toolbar"),px(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)){jc.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(d.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){jc.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 q){if(o=prompt(`Enter ${s}`),!o)return;this.quill.updateContents(new Uc.default().retain(a.index).delete(a.length).insert({[s]:o}),d.sources.USER)}else this.quill.format(s,o,d.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})();function Pc(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 px(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")Pc(s,n);else{let i=Object.keys(n)[0],o=n[i];Array.isArray(o)?mx(s,i,o):Pc(s,i,o)}}),r.appendChild(s)})}function mx(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)}Bi.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,b.INLINE)!=null&&this.quill.format(e,!1,d.sources.USER)})}else this.quill.removeFormat(r.index,r.length,d.sources.USER)},direction(r){let{align:t}=this.quill.getFormat();r==="rtl"&&t==null?this.quill.format("align","right",d.sources.USER):!r&&t==="right"&&this.quill.format("align",!1,d.sources.USER),this.quill.format("direction",r,d.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,d.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,d.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,d.sources.USER):this.quill.format("list","unchecked",d.sources.USER):this.quill.format("list",r,d.sources.USER)}}};var gx='<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>',bx='<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>',yx='<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>',xx='<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>',vx='<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>',Ax='<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>',Ex='<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>',Tx='<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>',Fc='<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>',Nx='<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>',wx='<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>',Sx='<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>',Lx='<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>',Ox='<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>',Cx='<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>',_x='<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>',qx='<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>',Ix='<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>',kx='<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>',Rx='<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>',Bx='<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>',Mx='<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>',Dx='<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>',jx='<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>',Px='<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>',Ux='<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>',Fx='<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>',Hx='<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>',zx='<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>',$x='<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>',Kx='<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>',Gx='<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>',Vx='<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>',ie={align:{"":gx,center:bx,right:yx,justify:xx},background:vx,blockquote:Ax,bold:Ex,clean:Tx,code:Fc,"code-block":Fc,color:Nx,direction:{"":wx,rtl:Sx},formula:Lx,header:{1:Ox,2:Cx,3:_x,4:qx,5:Ix,6:kx},italic:Rx,image:Bx,indent:{"+1":Mx,"-1":Dx},link:jx,list:{bullet:Px,check:Ux,ordered:Fx},script:{sub:Hx,super:zx},strike:$x,table:Kx,underline:Gx,video:Vx};var Wx='<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>',Hc=0;function zc(r,t){r.setAttribute(t,`${r.getAttribute(t)!=="true"}`)}var Mi=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"),zc(this.label,"aria-expanded"),zc(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=Wx,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-${Hc}`,Hc+=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)}},oe=Mi;var Di=class extends oe{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)}},Ws=Di;var ji=class extends oe{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}}},Zs=ji;var Zx=r=>{let{overflowY:t}=getComputedStyle(r,null);return t!=="visible"&&t!=="clip"},Pi=class{constructor(t,e){this.quill=t,this.boundsContainer=e||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,Zx(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")}},Xs=Pi;var Xx=[!1,"center","right","justify"],Qx=["#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"],Yx=[!1,"serif","monospace"],Jx=["1","2","3",!1],tv=["small",!1,"large","huge"],Pt=class extends Qe{constructor(t,e){super(t,e);let s=n=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",
vendor: 9,835 bytes, lines 49-50
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&&Ir(n,Xx),typeof e.align=="object"))return new Zs(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&&Ir(n,Qx,i==="background"?"#ffffff":"#000000"),new Ws(n,e[i])}return n.querySelector("option")==null&&(n.classList.contains("ql-font")?Ir(n,Yx):n.classList.contains("ql-header")?Ir(n,Jx):n.classList.contains("ql-size")&&Ir(n,tv)),new oe(n)});let s=()=>{this.pickers.forEach(n=>{n.update()})};this.quill.on(x.events.EDITOR_CHANGE,s)}};Pt.DEFAULTS=tt({},Qe.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")}}}}});var tr=class extends Xs{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,x.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,x.sources.USER)),this.quill.root.scrollTop=e;break}case"video":t=ev(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,x.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(s+1," ",x.sources.USER),this.quill.setSelection(s+2,x.sources.USER)}break}default:}this.textbox.value="",this.hide()}};function ev(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 Ir(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 rv=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],Ui=class extends tr{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(x.events.EDITOR_CHANGE,(s,n,i,o)=>{if(s===x.events.SELECTION_CHANGE)if(n!=null&&n.length>0&&o===x.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),f=this.quill.getBounds(new Q(u,c));f!=null&&this.position(f)}}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(x.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}},kr=class extends Pt{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=rv),super(t,e),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new Ui(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),ie),this.buildPickers(t.container.querySelectorAll("select"),ie))}};kr.DEFAULTS=tt({},Pt.DEFAULTS,{modules:{toolbar:{handlers:{link(r){r?this.quill.theme.tooltip.edit():this.quill.format("link",!1,d.sources.USER)}}}}});var sv=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],Fi=class extends tr{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,x.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(x.events.SELECTION_CHANGE,(t,e,s)=>{if(t!=null){if(t.length===0&&s===x.sources.USER){let[n,i]=this.quill.scroll.descendant(ve,t.index);if(n!=null){this.linkRange=new Q(t.index-i,n.length());let o=ve.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")}},Qs=class extends Pt{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=sv),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"),ie),this.buildPickers(t.container.querySelectorAll("select"),ie),this.tooltip=new Fi(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)}))}};Qs.DEFAULTS=tt({},Pt.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,d.sources.USER)}}}}});var $c=Qs;Hs.register({"attributors/attribute/direction":Bs,"attributors/class/align":yi,"attributors/class/background":oc,"attributors/class/color":ic,"attributors/class/direction":vi,"attributors/class/font":Ei,"attributors/class/size":Ti,"attributors/style/align":Rs,"attributors/style/background":wr,"attributors/style/color":Nr,"attributors/style/direction":Ms,"attributors/style/font":Ds,"attributors/style/size":js},!0);Hs.register({"formats/align":yi,"formats/direction":vi,"formats/indent":Nc,"formats/background":wr,"formats/color":Nr,"formats/font":Ei,"formats/size":Ti,"formats/blockquote":wc,"formats/code-block":F,"formats/header":Sc,"formats/list":zs,"formats/bold":Je,"formats/code":ac,"formats/italic":Lc,"formats/link":ve,"formats/script":Oc,"formats/strike":Cc,"formats/underline":_c,"formats/formula":qc,"formats/image":kc,"formats/video":Bc,"modules/syntax":qr,"modules/table":Dc,"modules/toolbar":Bi,"themes/bubble":kr,"themes/snow":$c,"ui/icons":ie,"ui/picker":oe,"ui/icon-picker":Zs,"ui/color-picker":Ws,"ui/tooltip":Xs},!0);var U4=Hs;export{L as a,Ut as b,nv as c,Js as d,iv as e,Ft as f,Qc as g,ot as h,ov as i,av as j,lv as k,lt as l,U4 as m}; 50//# sourceMappingURL=chunk-24TE2FW6.js.map
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.