kcal/public/js/quill.js

1 line
205 KiB
JavaScript

(()=>{var t={6090:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var s=n(2233),r=n(3288),i=n(2421);s.Ay.register({"modules/toolbar":r.A,"themes/snow":i.A});const o=s.Ay},228:t=>{"use strict";var e=Object.prototype.hasOwnProperty,n="~";function s(){}function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function i(t,e,s,i,o){if("function"!=typeof s)throw new TypeError("The listener must be a function");var l=new r(s,i||t,o),a=n?n+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],l]:t._events[a].push(l):(t._events[a]=l,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function l(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(n=!1)),l.prototype.eventNames=function(){var t,s,r=[];if(0===this._eventsCount)return r;for(s in t=this._events)e.call(t,s)&&r.push(n?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},l.prototype.listeners=function(t){var e=n?n+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,i=s.length,o=new Array(i);r<i;r++)o[r]=s[r].fn;return o},l.prototype.listenerCount=function(t){var e=n?n+t:t,s=this._events[e];return s?s.fn?1:s.length:0},l.prototype.emit=function(t,e,s,r,i,o){var l=n?n+t:t;if(!this._events[l])return!1;var a,c,u=this._events[l],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,s),!0;case 4:return u.fn.call(u.context,e,s,r),!0;case 5:return u.fn.call(u.context,e,s,r,i),!0;case 6:return u.fn.call(u.context,e,s,r,i,o),!0}for(c=1,a=new Array(h-1);c<h;c++)a[c-1]=arguments[c];u.fn.apply(u.context,a)}else{var d,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(t,u[c].fn,void 0,!0),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,e);break;case 3:u[c].fn.call(u[c].context,e,s);break;case 4:u[c].fn.call(u[c].context,e,s,r);break;default:if(!a)for(d=1,a=new Array(h-1);d<h;d++)a[d-1]=arguments[d];u[c].fn.apply(u[c].context,a)}}return!0},l.prototype.on=function(t,e,n){return i(this,t,e,n,!1)},l.prototype.once=function(t,e,n){return i(this,t,e,n,!0)},l.prototype.removeListener=function(t,e,s,r){var i=n?n+t:t;if(!this._events[i])return this;if(!e)return o(this,i),this;var l=this._events[i];if(l.fn)l.fn!==e||r&&!l.once||s&&l.context!==s||o(this,i);else{for(var a=0,c=[],u=l.length;a<u;a++)(l[a].fn!==e||r&&!l[a].once||s&&l[a].context!==s)&&c.push(l[a]);c.length?this._events[i]=1===c.length?c[0]:c:o(this,i)}return this},l.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&o(this,e)):(this._events=new s,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,t.exports=l},5606:t=>{var e=-1,n=1,s=0;function r(t,g,m,b,y){if(t===g)return t?[[s,t]]:[];if(null!=m){var A=function(t,e,n){var s="number"==typeof n?{index:n,length:0}:n.oldRange,r="number"==typeof n?null:n.newRange,i=t.length,o=e.length;if(0===s.length&&(null===r||0===r.length)){var l=s.index,a=t.slice(0,l),c=t.slice(l),u=r?r.index:null,h=l+o-i;if((null===u||u===h)&&!(h<0||h>o)){var d=e.slice(0,h);if((g=e.slice(h))===c){var f=Math.min(l,h);if((b=a.slice(0,f))===(A=d.slice(0,f)))return v(b,a.slice(f),d.slice(f),c)}}if(null===u||u===l){var p=l,g=(d=e.slice(0,p),e.slice(p));if(d===a){var m=Math.min(i-p,o-p);if((y=c.slice(c.length-m))===(x=g.slice(g.length-m)))return v(a,c.slice(0,c.length-m),g.slice(0,g.length-m),y)}}}if(s.length>0&&r&&0===r.length){var b=t.slice(0,s.index),y=t.slice(s.index+s.length);if(!(o<(f=b.length)+(m=y.length))){var A=e.slice(0,f),x=e.slice(o-m);if(b===A&&y===x)return v(b,t.slice(f,i-m),e.slice(f,o-m),y)}}return null}(t,g,m);if(A)return A}var x=o(t,g),N=t.substring(0,x);x=a(t=t.substring(x),g=g.substring(x));var E=t.substring(t.length-x),w=function(t,l){var c;if(!t)return[[n,l]];if(!l)return[[e,t]];var u=t.length>l.length?t:l,h=t.length>l.length?l:t,d=u.indexOf(h);if(-1!==d)return c=[[n,u.substring(0,d)],[s,h],[n,u.substring(d+h.length)]],t.length>l.length&&(c[0][0]=c[2][0]=e),c;if(1===h.length)return[[e,t],[n,l]];var f=function(t,e){var n=t.length>e.length?t:e,s=t.length>e.length?e:t;if(n.length<4||2*s.length<n.length)return null;function r(t,e,n){for(var s,r,i,l,c=t.substring(n,n+Math.floor(t.length/4)),u=-1,h="";-1!==(u=e.indexOf(c,u+1));){var d=o(t.substring(n),e.substring(u)),f=a(t.substring(0,n),e.substring(0,u));h.length<f+d&&(h=e.substring(u-f,u)+e.substring(u,u+d),s=t.substring(0,n-f),r=t.substring(n+d),i=e.substring(0,u-f),l=e.substring(u+d))}return 2*h.length>=t.length?[s,r,i,l,h]:null}var i,l,c,u,h,d=r(n,s,Math.ceil(n.length/4)),f=r(n,s,Math.ceil(n.length/2));if(!d&&!f)return null;i=f?d&&d[4].length>f[4].length?d:f:d;t.length>e.length?(l=i[0],c=i[1],u=i[2],h=i[3]):(u=i[0],h=i[1],l=i[2],c=i[3]);var p=i[4];return[l,c,u,h,p]}(t,l);if(f){var p=f[0],g=f[1],m=f[2],b=f[3],y=f[4],v=r(p,m),A=r(g,b);return v.concat([[s,y]],A)}return function(t,s){for(var r=t.length,o=s.length,l=Math.ceil((r+o)/2),a=l,c=2*l,u=new Array(c),h=new Array(c),d=0;d<c;d++)u[d]=-1,h[d]=-1;u[a+1]=0,h[a+1]=0;for(var f=r-o,p=f%2!=0,g=0,m=0,b=0,y=0,v=0;v<l;v++){for(var A=-v+g;A<=v-m;A+=2){for(var x=a+A,N=(_=A===-v||A!==v&&u[x-1]<u[x+1]?u[x+1]:u[x-1]+1)-A;_<r&&N<o&&t.charAt(_)===s.charAt(N);)_++,N++;if(u[x]=_,_>r)m+=2;else if(N>o)g+=2;else if(p){if((q=a+f-A)>=0&&q<c&&-1!==h[q])if(_>=(w=r-h[q]))return i(t,s,_,N)}}for(var E=-v+b;E<=v-y;E+=2){for(var w,q=a+E,k=(w=E===-v||E!==v&&h[q-1]<h[q+1]?h[q+1]:h[q-1]+1)-E;w<r&&k<o&&t.charAt(r-w-1)===s.charAt(o-k-1);)w++,k++;if(h[q]=w,w>r)y+=2;else if(k>o)b+=2;else if(!p){if((x=a+f-E)>=0&&x<c&&-1!==u[x]){var _;N=a+(_=u[x])-x;if(_>=(w=r-w))return i(t,s,_,N)}}}}return[[e,t],[n,s]]}(t,l)}(t=t.substring(0,t.length-x),g=g.substring(0,g.length-x));return N&&w.unshift([s,N]),E&&w.push([s,E]),p(w,y),b&&function(t){var r=!1,i=[],o=0,g=null,m=0,b=0,y=0,v=0,A=0;for(;m<t.length;)t[m][0]==s?(i[o++]=m,b=v,y=A,v=0,A=0,g=t[m][1]):(t[m][0]==n?v+=t[m][1].length:A+=t[m][1].length,g&&g.length<=Math.max(b,y)&&g.length<=Math.max(v,A)&&(t.splice(i[o-1],0,[e,g]),t[i[o-1]+1][0]=n,o--,m=--o>0?i[o-1]:-1,b=0,y=0,v=0,A=0,g=null,r=!0)),m++;r&&p(t);(function(t){function e(t,e){if(!t||!e)return 6;var n=t.charAt(t.length-1),s=e.charAt(0),r=n.match(c),i=s.match(c),o=r&&n.match(u),l=i&&s.match(u),a=o&&n.match(h),p=l&&s.match(h),g=a&&t.match(d),m=p&&e.match(f);return g||m?5:a||p?4:r&&!o&&l?3:o||l?2:r||i?1:0}var n=1;for(;n<t.length-1;){if(t[n-1][0]==s&&t[n+1][0]==s){var r=t[n-1][1],i=t[n][1],o=t[n+1][1],l=a(r,i);if(l){var p=i.substring(i.length-l);r=r.substring(0,r.length-l),i=p+i.substring(0,i.length-l),o=p+o}for(var g=r,m=i,b=o,y=e(r,i)+e(i,o);i.charAt(0)===o.charAt(0);){r+=i.charAt(0),i=i.substring(1)+o.charAt(0),o=o.substring(1);var v=e(r,i)+e(i,o);v>=y&&(y=v,g=r,m=i,b=o)}t[n-1][1]!=g&&(g?t[n-1][1]=g:(t.splice(n-1,1),n--),t[n][1]=m,b?t[n+1][1]=b:(t.splice(n+1,1),n--))}n++}})(t),m=1;for(;m<t.length;){if(t[m-1][0]==e&&t[m][0]==n){var x=t[m-1][1],N=t[m][1],E=l(x,N),w=l(N,x);E>=w?(E>=x.length/2||E>=N.length/2)&&(t.splice(m,0,[s,N.substring(0,E)]),t[m-1][1]=x.substring(0,x.length-E),t[m+1][1]=N.substring(E),m++):(w>=x.length/2||w>=N.length/2)&&(t.splice(m,0,[s,x.substring(0,w)]),t[m-1][0]=n,t[m-1][1]=N.substring(0,N.length-w),t[m+1][0]=e,t[m+1][1]=x.substring(w),m++),m++}m++}}(w),w}function i(t,e,n,s){var i=t.substring(0,n),o=e.substring(0,s),l=t.substring(n),a=e.substring(s),c=r(i,o),u=r(l,a);return c.concat(u)}function o(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,s=Math.min(t.length,e.length),r=s,i=0;n<r;)t.substring(i,r)==e.substring(i,r)?i=n=r:s=r,r=Math.floor((s-n)/2+n);return g(t.charCodeAt(r-1))&&r--,r}function l(t,e){var n=t.length,s=e.length;if(0==n||0==s)return 0;n>s?t=t.substring(n-s):n<s&&(e=e.substring(0,n));var r=Math.min(n,s);if(t==e)return r;for(var i=0,o=1;;){var l=t.substring(r-o),a=e.indexOf(l);if(-1==a)return i;o+=a,0!=a&&t.substring(r-o)!=e.substring(0,o)||(i=o,o++)}}function a(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var n=0,s=Math.min(t.length,e.length),r=s,i=0;n<r;)t.substring(t.length-r,t.length-i)==e.substring(e.length-r,e.length-i)?i=n=r:s=r,r=Math.floor((s-n)/2+n);return m(t.charCodeAt(t.length-r))&&r--,r}var c=/[^a-zA-Z0-9]/,u=/\s/,h=/[\r\n]/,d=/\n\r?\n$/,f=/^\r?\n\r?\n/;function p(t,r){t.push([s,""]);for(var i,l=0,c=0,u=0,h="",d="";l<t.length;)if(l<t.length-1&&!t[l][1])t.splice(l,1);else switch(t[l][0]){case n:u++,d+=t[l][1],l++;break;case e:c++,h+=t[l][1],l++;break;case s:var f=l-u-c-1;if(r){if(f>=0&&y(t[f][1])){var g=t[f][1].slice(-1);if(t[f][1]=t[f][1].slice(0,-1),h=g+h,d=g+d,!t[f][1]){t.splice(f,1),l--;var m=f-1;t[m]&&t[m][0]===n&&(u++,d=t[m][1]+d,m--),t[m]&&t[m][0]===e&&(c++,h=t[m][1]+h,m--),f=m}}if(b(t[l][1])){g=t[l][1].charAt(0);t[l][1]=t[l][1].slice(1),h+=g,d+=g}}if(l<t.length-1&&!t[l][1]){t.splice(l,1);break}if(h.length>0||d.length>0){h.length>0&&d.length>0&&(0!==(i=o(d,h))&&(f>=0?t[f][1]+=d.substring(0,i):(t.splice(0,0,[s,d.substring(0,i)]),l++),d=d.substring(i),h=h.substring(i)),0!==(i=a(d,h))&&(t[l][1]=d.substring(d.length-i)+t[l][1],d=d.substring(0,d.length-i),h=h.substring(0,h.length-i)));var v=u+c;0===h.length&&0===d.length?(t.splice(l-v,v),l-=v):0===h.length?(t.splice(l-v,v,[n,d]),l=l-v+1):0===d.length?(t.splice(l-v,v,[e,h]),l=l-v+1):(t.splice(l-v,v,[e,h],[n,d]),l=l-v+2)}0!==l&&t[l-1][0]===s?(t[l-1][1]+=t[l][1],t.splice(l,1)):l++,u=0,c=0,h="",d=""}""===t[t.length-1][1]&&t.pop();var A=!1;for(l=1;l<t.length-1;)t[l-1][0]===s&&t[l+1][0]===s&&(t[l][1].substring(t[l][1].length-t[l-1][1].length)===t[l-1][1]?(t[l][1]=t[l-1][1]+t[l][1].substring(0,t[l][1].length-t[l-1][1].length),t[l+1][1]=t[l-1][1]+t[l+1][1],t.splice(l-1,1),A=!0):t[l][1].substring(0,t[l+1][1].length)==t[l+1][1]&&(t[l-1][1]+=t[l+1][1],t[l][1]=t[l][1].substring(t[l+1][1].length)+t[l+1][1],t.splice(l+1,1),A=!0)),l++;A&&p(t,r)}function g(t){return t>=55296&&t<=56319}function m(t){return t>=56320&&t<=57343}function b(t){return m(t.charCodeAt(0))}function y(t){return g(t.charCodeAt(t.length-1))}function v(t,r,i,o){return y(t)||b(o)?null:function(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}([[s,t],[e,r],[n,i],[s,o]])}function A(t,e,n,s){return r(t,e,n,s,!0)}A.INSERT=n,A.DELETE=e,A.EQUAL=s,t.exports=A},7193:(t,e,n)=>{t=n.nmd(t);var s="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Boolean]",l="[object Date]",a="[object Function]",c="[object GeneratorFunction]",u="[object Map]",h="[object Number]",d="[object Object]",f="[object Promise]",p="[object RegExp]",g="[object Set]",m="[object String]",b="[object Symbol]",y="[object WeakMap]",v="[object ArrayBuffer]",A="[object DataView]",x="[object Float32Array]",N="[object Float64Array]",E="[object Int8Array]",w="[object Int16Array]",q="[object Int32Array]",k="[object Uint8Array]",_="[object Uint8ClampedArray]",L="[object Uint16Array]",S="[object Uint32Array]",O=/\w*$/,T=/^\[object .+?Constructor\]$/,j=/^(?:0|[1-9]\d*)$/,C={};C[i]=C["[object Array]"]=C[v]=C[A]=C[o]=C[l]=C[x]=C[N]=C[E]=C[w]=C[q]=C[u]=C[h]=C[d]=C[p]=C[g]=C[m]=C[b]=C[k]=C[_]=C[L]=C[S]=!0,C["[object Error]"]=C[a]=C[y]=!1;var R="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,B=R||I||Function("return this")(),M=e&&!e.nodeType&&e,U=M&&t&&!t.nodeType&&t,D=U&&U.exports===M;function P(t,e){return t.set(e[0],e[1]),t}function z(t,e){return t.add(e),t}function F(t,e,n,s){var r=-1,i=t?t.length:0;for(s&&i&&(n=t[++r]);++r<i;)n=e(n,t[r],r,t);return n}function H(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function $(t){var e=-1,n=Array(t.size);return t.forEach((function(t,s){n[++e]=[s,t]})),n}function V(t,e){return function(n){return t(e(n))}}function K(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var W,Z=Array.prototype,G=Function.prototype,X=Object.prototype,Q=B["__core-js_shared__"],J=(W=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",Y=G.toString,tt=X.hasOwnProperty,et=X.toString,nt=RegExp("^"+Y.call(tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),st=D?B.Buffer:void 0,rt=B.Symbol,it=B.Uint8Array,ot=V(Object.getPrototypeOf,Object),lt=Object.create,at=X.propertyIsEnumerable,ct=Z.splice,ut=Object.getOwnPropertySymbols,ht=st?st.isBuffer:void 0,dt=V(Object.keys,Object),ft=Ut(B,"DataView"),pt=Ut(B,"Map"),gt=Ut(B,"Promise"),mt=Ut(B,"Set"),bt=Ut(B,"WeakMap"),yt=Ut(Object,"create"),vt=Ht(ft),At=Ht(pt),xt=Ht(gt),Nt=Ht(mt),Et=Ht(bt),wt=rt?rt.prototype:void 0,qt=wt?wt.valueOf:void 0;function kt(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}function _t(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}function Lt(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}function St(t){this.__data__=new _t(t)}function Ot(t,e){var n=Vt(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&Kt(t)}(t)&&tt.call(t,"callee")&&(!at.call(t,"callee")||et.call(t)==i)}(t)?function(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}(t.length,String):[],s=n.length,r=!!s;for(var o in t)!e&&!tt.call(t,o)||r&&("length"==o||zt(o,s))||n.push(o);return n}function Tt(t,e,n){var s=t[e];tt.call(t,e)&&$t(s,n)&&(void 0!==n||e in t)||(t[e]=n)}function jt(t,e){for(var n=t.length;n--;)if($t(t[n][0],e))return n;return-1}function Ct(t,e,n,s,r,f,y){var T;if(s&&(T=f?s(t,r,f,y):s(t)),void 0!==T)return T;if(!Gt(t))return t;var j=Vt(t);if(j){if(T=function(t){var e=t.length,n=t.constructor(e);e&&"string"==typeof t[0]&&tt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!e)return function(t,e){var n=-1,s=t.length;e||(e=Array(s));for(;++n<s;)e[n]=t[n];return e}(t,T)}else{var R=Pt(t),I=R==a||R==c;if(Wt(t))return function(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}(t,e);if(R==d||R==i||I&&!f){if(H(t))return f?t:{};if(T=function(t){return"function"!=typeof t.constructor||Ft(t)?{}:(e=ot(t),Gt(e)?lt(e):{});var e}(I?{}:t),!e)return function(t,e){return Bt(t,Dt(t),e)}(t,function(t,e){return t&&Bt(e,Xt(e),t)}(T,t))}else{if(!C[R])return f?t:{};T=function(t,e,n,s){var r=t.constructor;switch(e){case v:return It(t);case o:case l:return new r(+t);case A:return function(t,e){var n=e?It(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,s);case x:case N:case E:case w:case q:case k:case _:case L:case S:return function(t,e){var n=e?It(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}(t,s);case u:return function(t,e,n){var s=e?n($(t),!0):$(t);return F(s,P,new t.constructor)}(t,s,n);case h:case m:return new r(t);case p:return function(t){var e=new t.constructor(t.source,O.exec(t));return e.lastIndex=t.lastIndex,e}(t);case g:return function(t,e,n){var s=e?n(K(t),!0):K(t);return F(s,z,new t.constructor)}(t,s,n);case b:return i=t,qt?Object(qt.call(i)):{}}var i}(t,R,Ct,e)}}y||(y=new St);var B=y.get(t);if(B)return B;if(y.set(t,T),!j)var M=n?function(t){return function(t,e,n){var s=e(t);return Vt(t)?s:function(t,e){for(var n=-1,s=e.length,r=t.length;++n<s;)t[r+n]=e[n];return t}(s,n(t))}(t,Xt,Dt)}(t):Xt(t);return function(t,e){for(var n=-1,s=t?t.length:0;++n<s&&!1!==e(t[n],n,t););}(M||t,(function(r,i){M&&(r=t[i=r]),Tt(T,i,Ct(r,e,n,s,i,t,y))})),T}function Rt(t){return!(!Gt(t)||(e=t,J&&J in e))&&(Zt(t)||H(t)?nt:T).test(Ht(t));var e}function It(t){var e=new t.constructor(t.byteLength);return new it(e).set(new it(t)),e}function Bt(t,e,n,s){n||(n={});for(var r=-1,i=e.length;++r<i;){var o=e[r],l=s?s(n[o],t[o],o,n,t):void 0;Tt(n,o,void 0===l?t[o]:l)}return n}function Mt(t,e){var n,s,r=t.__data__;return("string"==(s=typeof(n=e))||"number"==s||"symbol"==s||"boolean"==s?"__proto__"!==n:null===n)?r["string"==typeof e?"string":"hash"]:r.map}function Ut(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Rt(n)?n:void 0}kt.prototype.clear=function(){this.__data__=yt?yt(null):{}},kt.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},kt.prototype.get=function(t){var e=this.__data__;if(yt){var n=e[t];return n===s?void 0:n}return tt.call(e,t)?e[t]:void 0},kt.prototype.has=function(t){var e=this.__data__;return yt?void 0!==e[t]:tt.call(e,t)},kt.prototype.set=function(t,e){return this.__data__[t]=yt&&void 0===e?s:e,this},_t.prototype.clear=function(){this.__data__=[]},_t.prototype.delete=function(t){var e=this.__data__,n=jt(e,t);return!(n<0)&&(n==e.length-1?e.pop():ct.call(e,n,1),!0)},_t.prototype.get=function(t){var e=this.__data__,n=jt(e,t);return n<0?void 0:e[n][1]},_t.prototype.has=function(t){return jt(this.__data__,t)>-1},_t.prototype.set=function(t,e){var n=this.__data__,s=jt(n,t);return s<0?n.push([t,e]):n[s][1]=e,this},Lt.prototype.clear=function(){this.__data__={hash:new kt,map:new(pt||_t),string:new kt}},Lt.prototype.delete=function(t){return Mt(this,t).delete(t)},Lt.prototype.get=function(t){return Mt(this,t).get(t)},Lt.prototype.has=function(t){return Mt(this,t).has(t)},Lt.prototype.set=function(t,e){return Mt(this,t).set(t,e),this},St.prototype.clear=function(){this.__data__=new _t},St.prototype.delete=function(t){return this.__data__.delete(t)},St.prototype.get=function(t){return this.__data__.get(t)},St.prototype.has=function(t){return this.__data__.has(t)},St.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _t){var s=n.__data__;if(!pt||s.length<199)return s.push([t,e]),this;n=this.__data__=new Lt(s)}return n.set(t,e),this};var Dt=ut?V(ut,Object):function(){return[]},Pt=function(t){return et.call(t)};function zt(t,e){return!!(e=null==e?r:e)&&("number"==typeof t||j.test(t))&&t>-1&&t%1==0&&t<e}function Ft(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||X)}function Ht(t){if(null!=t){try{return Y.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function $t(t,e){return t===e||t!=t&&e!=e}(ft&&Pt(new ft(new ArrayBuffer(1)))!=A||pt&&Pt(new pt)!=u||gt&&Pt(gt.resolve())!=f||mt&&Pt(new mt)!=g||bt&&Pt(new bt)!=y)&&(Pt=function(t){var e=et.call(t),n=e==d?t.constructor:void 0,s=n?Ht(n):void 0;if(s)switch(s){case vt:return A;case At:return u;case xt:return f;case Nt:return g;case Et:return y}return e});var Vt=Array.isArray;function Kt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}(t.length)&&!Zt(t)}var Wt=ht||function(){return!1};function Zt(t){var e=Gt(t)?et.call(t):"";return e==a||e==c}function Gt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Xt(t){return Kt(t)?Ot(t):function(t){if(!Ft(t))return dt(t);var e=[];for(var n in Object(t))tt.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}t.exports=function(t){return Ct(t,!0,!0)}},8142:(t,e,n)=>{t=n.nmd(t);var s="__lodash_hash_undefined__",r=1,i=2,o=9007199254740991,l="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",h="[object Date]",d="[object Error]",f="[object Function]",p="[object GeneratorFunction]",g="[object Map]",m="[object Number]",b="[object Null]",y="[object Object]",v="[object Promise]",A="[object Proxy]",x="[object RegExp]",N="[object Set]",E="[object String]",w="[object Symbol]",q="[object Undefined]",k="[object WeakMap]",_="[object ArrayBuffer]",L="[object DataView]",S=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[l]=T[a]=T[_]=T[u]=T[L]=T[h]=T[d]=T[f]=T[g]=T[m]=T[y]=T[x]=T[N]=T[E]=T[k]=!1;var j="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,C="object"==typeof self&&self&&self.Object===Object&&self,R=j||C||Function("return this")(),I=e&&!e.nodeType&&e,B=I&&t&&!t.nodeType&&t,M=B&&B.exports===I,U=M&&j.process,D=function(){try{return U&&U.binding&&U.binding("util")}catch(t){}}(),P=D&&D.isTypedArray;function z(t,e){for(var n=-1,s=null==t?0:t.length;++n<s;)if(e(t[n],n,t))return!0;return!1}function F(t){var e=-1,n=Array(t.size);return t.forEach((function(t,s){n[++e]=[s,t]})),n}function H(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var $,V,K,W=Array.prototype,Z=Function.prototype,G=Object.prototype,X=R["__core-js_shared__"],Q=Z.toString,J=G.hasOwnProperty,Y=($=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",tt=G.toString,et=RegExp("^"+Q.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nt=M?R.Buffer:void 0,st=R.Symbol,rt=R.Uint8Array,it=G.propertyIsEnumerable,ot=W.splice,lt=st?st.toStringTag:void 0,at=Object.getOwnPropertySymbols,ct=nt?nt.isBuffer:void 0,ut=(V=Object.keys,K=Object,function(t){return V(K(t))}),ht=Dt(R,"DataView"),dt=Dt(R,"Map"),ft=Dt(R,"Promise"),pt=Dt(R,"Set"),gt=Dt(R,"WeakMap"),mt=Dt(Object,"create"),bt=Ht(ht),yt=Ht(dt),vt=Ht(ft),At=Ht(pt),xt=Ht(gt),Nt=st?st.prototype:void 0,Et=Nt?Nt.valueOf:void 0;function wt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}function qt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}function kt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}function _t(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new kt;++e<n;)this.add(t[e])}function Lt(t){var e=this.__data__=new qt(t);this.size=e.size}function St(t,e){var n=Kt(t),s=!n&&Vt(t),r=!n&&!s&&Wt(t),i=!n&&!s&&!r&&Jt(t),o=n||s||r||i,l=o?function(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}(t.length,String):[],a=l.length;for(var c in t)!e&&!J.call(t,c)||o&&("length"==c||r&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ft(c,a))||l.push(c);return l}function Ot(t,e){for(var n=t.length;n--;)if($t(t[n][0],e))return n;return-1}function Tt(t){return null==t?void 0===t?q:b:lt&&lt in Object(t)?function(t){var e=J.call(t,lt),n=t[lt];try{t[lt]=void 0;var s=!0}catch(t){}var r=tt.call(t);s&&(e?t[lt]=n:delete t[lt]);return r}(t):function(t){return tt.call(t)}(t)}function jt(t){return Qt(t)&&Tt(t)==l}function Ct(t,e,n,s,o){return t===e||(null==t||null==e||!Qt(t)&&!Qt(e)?t!=t&&e!=e:function(t,e,n,s,o,c){var f=Kt(t),p=Kt(e),b=f?a:zt(t),v=p?a:zt(e),A=(b=b==l?y:b)==y,q=(v=v==l?y:v)==y,k=b==v;if(k&&Wt(t)){if(!Wt(e))return!1;f=!0,A=!1}if(k&&!A)return c||(c=new Lt),f||Jt(t)?Bt(t,e,n,s,o,c):function(t,e,n,s,o,l,a){switch(n){case L:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case _:return!(t.byteLength!=e.byteLength||!l(new rt(t),new rt(e)));case u:case h:case m:return $t(+t,+e);case d:return t.name==e.name&&t.message==e.message;case x:case E:return t==e+"";case g:var c=F;case N:var f=s&r;if(c||(c=H),t.size!=e.size&&!f)return!1;var p=a.get(t);if(p)return p==e;s|=i,a.set(t,e);var b=Bt(c(t),c(e),s,o,l,a);return a.delete(t),b;case w:if(Et)return Et.call(t)==Et.call(e)}return!1}(t,e,b,n,s,o,c);if(!(n&r)){var S=A&&J.call(t,"__wrapped__"),O=q&&J.call(e,"__wrapped__");if(S||O){var T=S?t.value():t,j=O?e.value():e;return c||(c=new Lt),o(T,j,n,s,c)}}if(!k)return!1;return c||(c=new Lt),function(t,e,n,s,i,o){var l=n&r,a=Mt(t),c=a.length,u=Mt(e),h=u.length;if(c!=h&&!l)return!1;var d=c;for(;d--;){var f=a[d];if(!(l?f in e:J.call(e,f)))return!1}var p=o.get(t);if(p&&o.get(e))return p==e;var g=!0;o.set(t,e),o.set(e,t);var m=l;for(;++d<c;){var b=t[f=a[d]],y=e[f];if(s)var v=l?s(y,b,f,e,t,o):s(b,y,f,t,e,o);if(!(void 0===v?b===y||i(b,y,n,s,o):v)){g=!1;break}m||(m="constructor"==f)}if(g&&!m){var A=t.constructor,x=e.constructor;A==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof A&&A instanceof A&&"function"==typeof x&&x instanceof x||(g=!1)}return o.delete(t),o.delete(e),g}(t,e,n,s,o,c)}(t,e,n,s,Ct,o))}function Rt(t){return!(!Xt(t)||function(t){return!!Y&&Y in t}(t))&&(Zt(t)?et:S).test(Ht(t))}function It(t){if(n=(e=t)&&e.constructor,s="function"==typeof n&&n.prototype||G,e!==s)return ut(t);var e,n,s,r=[];for(var i in Object(t))J.call(t,i)&&"constructor"!=i&&r.push(i);return r}function Bt(t,e,n,s,o,l){var a=n&r,c=t.length,u=e.length;if(c!=u&&!(a&&u>c))return!1;var h=l.get(t);if(h&&l.get(e))return h==e;var d=-1,f=!0,p=n&i?new _t:void 0;for(l.set(t,e),l.set(e,t);++d<c;){var g=t[d],m=e[d];if(s)var b=a?s(m,g,d,e,t,l):s(g,m,d,t,e,l);if(void 0!==b){if(b)continue;f=!1;break}if(p){if(!z(e,(function(t,e){if(r=e,!p.has(r)&&(g===t||o(g,t,n,s,l)))return p.push(e);var r}))){f=!1;break}}else if(g!==m&&!o(g,m,n,s,l)){f=!1;break}}return l.delete(t),l.delete(e),f}function Mt(t){return function(t,e,n){var s=e(t);return Kt(t)?s:function(t,e){for(var n=-1,s=e.length,r=t.length;++n<s;)t[r+n]=e[n];return t}(s,n(t))}(t,Yt,Pt)}function Ut(t,e){var n,s,r=t.__data__;return("string"==(s=typeof(n=e))||"number"==s||"symbol"==s||"boolean"==s?"__proto__"!==n:null===n)?r["string"==typeof e?"string":"hash"]:r.map}function Dt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Rt(n)?n:void 0}wt.prototype.clear=function(){this.__data__=mt?mt(null):{},this.size=0},wt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},wt.prototype.get=function(t){var e=this.__data__;if(mt){var n=e[t];return n===s?void 0:n}return J.call(e,t)?e[t]:void 0},wt.prototype.has=function(t){var e=this.__data__;return mt?void 0!==e[t]:J.call(e,t)},wt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=mt&&void 0===e?s:e,this},qt.prototype.clear=function(){this.__data__=[],this.size=0},qt.prototype.delete=function(t){var e=this.__data__,n=Ot(e,t);return!(n<0)&&(n==e.length-1?e.pop():ot.call(e,n,1),--this.size,!0)},qt.prototype.get=function(t){var e=this.__data__,n=Ot(e,t);return n<0?void 0:e[n][1]},qt.prototype.has=function(t){return Ot(this.__data__,t)>-1},qt.prototype.set=function(t,e){var n=this.__data__,s=Ot(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this},kt.prototype.clear=function(){this.size=0,this.__data__={hash:new wt,map:new(dt||qt),string:new wt}},kt.prototype.delete=function(t){var e=Ut(this,t).delete(t);return this.size-=e?1:0,e},kt.prototype.get=function(t){return Ut(this,t).get(t)},kt.prototype.has=function(t){return Ut(this,t).has(t)},kt.prototype.set=function(t,e){var n=Ut(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this},_t.prototype.add=_t.prototype.push=function(t){return this.__data__.set(t,s),this},_t.prototype.has=function(t){return this.__data__.has(t)},Lt.prototype.clear=function(){this.__data__=new qt,this.size=0},Lt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Lt.prototype.get=function(t){return this.__data__.get(t)},Lt.prototype.has=function(t){return this.__data__.has(t)},Lt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof qt){var s=n.__data__;if(!dt||s.length<199)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new kt(s)}return n.set(t,e),this.size=n.size,this};var Pt=at?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,s=null==t?0:t.length,r=0,i=[];++n<s;){var o=t[n];e(o,n,t)&&(i[r++]=o)}return i}(at(t),(function(e){return it.call(t,e)})))}:function(){return[]},zt=Tt;function Ft(t,e){return!!(e=null==e?o:e)&&("number"==typeof t||O.test(t))&&t>-1&&t%1==0&&t<e}function Ht(t){if(null!=t){try{return Q.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function $t(t,e){return t===e||t!=t&&e!=e}(ht&&zt(new ht(new ArrayBuffer(1)))!=L||dt&&zt(new dt)!=g||ft&&zt(ft.resolve())!=v||pt&&zt(new pt)!=N||gt&&zt(new gt)!=k)&&(zt=function(t){var e=Tt(t),n=e==y?t.constructor:void 0,s=n?Ht(n):"";if(s)switch(s){case bt:return L;case yt:return g;case vt:return v;case At:return N;case xt:return k}return e});var Vt=jt(function(){return arguments}())?jt:function(t){return Qt(t)&&J.call(t,"callee")&&!it.call(t,"callee")},Kt=Array.isArray;var Wt=ct||function(){return!1};function Zt(t){if(!Xt(t))return!1;var e=Tt(t);return e==f||e==p||e==c||e==A}function Gt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}function Xt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Qt(t){return null!=t&&"object"==typeof t}var Jt=P?function(t){return function(e){return t(e)}}(P):function(t){return Qt(t)&&Gt(t.length)&&!!T[Tt(t)]};function Yt(t){return null!=(e=t)&&Gt(e.length)&&!Zt(e)?St(t):It(t);var e}t.exports=function(t,e){return Ct(t,e)}},9106:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s=n(7193),r=n(8142);var i;!function(t){t.compose=function(t={},e={},n=!1){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});let r=s(e);n||(r=Object.keys(r).reduce(((t,e)=>(null!=r[e]&&(t[e]=r[e]),t)),{}));for(const n in t)void 0!==t[n]&&void 0===e[n]&&(r[n]=t[n]);return Object.keys(r).length>0?r:void 0},t.diff=function(t={},e={}){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});const n=Object.keys(t).concat(Object.keys(e)).reduce(((n,s)=>(r(t[s],e[s])||(n[s]=void 0===e[s]?null:e[s]),n)),{});return Object.keys(n).length>0?n:void 0},t.invert=function(t={},e={}){t=t||{};const n=Object.keys(e).reduce(((n,s)=>(e[s]!==t[s]&&void 0!==t[s]&&(n[s]=e[s]),n)),{});return Object.keys(t).reduce(((n,s)=>(t[s]!==e[s]&&void 0===e[s]&&(n[s]=null),n)),n)},t.transform=function(t,e,n=!1){if("object"!=typeof t)return e;if("object"!=typeof e)return;if(!n)return e;const s=Object.keys(e).reduce(((n,s)=>(void 0===t[s]&&(n[s]=e[s]),n)),{});return Object.keys(s).length>0?s:void 0}}(i||(i={})),e.default=i},2660:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const s=n(5606),r=n(7193),i=n(8142),o=n(9106);e.AttributeMap=o.default;const l=n(5759);e.Op=l.default;const a=n(698);e.OpIterator=a.default;const c=String.fromCharCode(0),u=(t,e)=>{if("object"!=typeof t||null===t)throw new Error("cannot retain a "+typeof t);if("object"!=typeof e||null===e)throw new Error("cannot retain a "+typeof e);const n=Object.keys(t)[0];if(!n||n!==Object.keys(e)[0])throw new Error(`embed types not matched: ${n} != ${Object.keys(e)[0]}`);return[n,t[n],e[n]]};class h{constructor(t){Array.isArray(t)?this.ops=t:null!=t&&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){const e=this.handlers[t];if(!e)throw new Error(`no handlers for embed type "${t}"`);return e}insert(t,e){const n={};return"string"==typeof t&&0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))}delete(t){return t<=0?this:this.push({delete:t})}retain(t,e){if("number"==typeof t&&t<=0)return this;const n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)}push(t){let e=this.ops.length,n=this.ops[e-1];if(t=r(t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,n=this.ops[e-1],"object"!=typeof n))return this.ops.unshift(t),this;if(i(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(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(){const t=this.ops[this.ops.length-1];return t&&"number"==typeof t.retain&&!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){const e=[],n=[];return this.forEach((s=>{(t(s)?e:n).push(s)})),[e,n]}reduce(t,e){return this.ops.reduce(t,e)}changeLength(){return this.reduce(((t,e)=>e.insert?t+l.default.length(e):e.delete?t-e.delete:t),0)}length(){return this.reduce(((t,e)=>t+l.default.length(e)),0)}slice(t=0,e=1/0){const n=[],s=new a.default(this.ops);let r=0;for(;r<e&&s.hasNext();){let i;r<t?i=s.next(t-r):(i=s.next(e-r),n.push(i)),r+=l.default.length(i)}return new h(n)}compose(t){const e=new a.default(this.ops),n=new a.default(t.ops),s=[],r=n.peek();if(null!=r&&"number"==typeof r.retain&&null==r.attributes){let t=r.retain;for(;"insert"===e.peekType()&&e.peekLength()<=t;)t-=e.peekLength(),s.push(e.next());r.retain-t>0&&n.next(r.retain-t)}const l=new h(s);for(;e.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===e.peekType())l.push(e.next());else{const t=Math.min(e.peekLength(),n.peekLength()),s=e.next(t),r=n.next(t);if(r.retain){const a={};if("number"==typeof s.retain)a.retain="number"==typeof r.retain?t:r.retain;else if("number"==typeof r.retain)null==s.retain?a.insert=s.insert:a.retain=s.retain;else{const t=null==s.retain?"insert":"retain",[e,n,i]=u(s[t],r.retain),o=h.getHandler(e);a[t]={[e]:o.compose(n,i,"retain"===t)}}const c=o.default.compose(s.attributes,r.attributes,"number"==typeof s.retain);if(c&&(a.attributes=c),l.push(a),!n.hasNext()&&i(l.ops[l.ops.length-1],a)){const t=new h(e.rest());return l.concat(t).chop()}}else"number"==typeof r.delete&&("number"==typeof s.retain||"object"==typeof s.retain&&null!==s.retain)&&l.push(r)}return l.chop()}concat(t){const e=new h(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 h;const n=[this,t].map((e=>e.map((n=>{if(null!=n.insert)return"string"==typeof n.insert?n.insert:c;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join(""))),r=new h,l=s(n[0],n[1],e,!0),u=new a.default(this.ops),d=new a.default(t.ops);return l.forEach((t=>{let e=t[1].length;for(;e>0;){let n=0;switch(t[0]){case s.INSERT:n=Math.min(d.peekLength(),e),r.push(d.next(n));break;case s.DELETE:n=Math.min(e,u.peekLength()),u.next(n),r.delete(n);break;case s.EQUAL:n=Math.min(u.peekLength(),d.peekLength(),e);const t=u.next(n),l=d.next(n);i(t.insert,l.insert)?r.retain(n,o.default.diff(t.attributes,l.attributes)):r.push(l).delete(n)}e-=n}})),r.chop()}eachLine(t,e="\n"){const n=new a.default(this.ops);let s=new h,r=0;for(;n.hasNext();){if("insert"!==n.peekType())return;const i=n.peek(),o=l.default.length(i)-n.peekLength(),a="string"==typeof i.insert?i.insert.indexOf(e,o)-o:-1;if(a<0)s.push(n.next());else if(a>0)s.push(n.next(a));else{if(!1===t(s,n.next(1).attributes||{},r))return;r+=1,s=new h}}s.length()>0&&t(s,{},r)}invert(t){const e=new h;return this.reduce(((n,s)=>{if(s.insert)e.delete(l.default.length(s));else{if("number"==typeof s.retain&&null==s.attributes)return e.retain(s.retain),n+s.retain;if(s.delete||"number"==typeof s.retain){const r=s.delete||s.retain;return t.slice(n,n+r).forEach((t=>{s.delete?e.push(t):s.retain&&s.attributes&&e.retain(l.default.length(t),o.default.invert(s.attributes,t.attributes))})),n+r}if("object"==typeof s.retain&&null!==s.retain){const r=t.slice(n,n+1),i=new a.default(r.ops).next(),[l,c,d]=u(s.retain,i.insert),f=h.getHandler(l);return e.retain({[l]:f.invert(c,d)},o.default.invert(s.attributes,i.attributes)),n+1}}return n}),0),e.chop()}transform(t,e=!1){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);const n=t,s=new a.default(this.ops),r=new a.default(n.ops),i=new h;for(;s.hasNext()||r.hasNext();)if("insert"!==s.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{const t=Math.min(s.peekLength(),r.peekLength()),n=s.next(t),l=r.next(t);if(n.delete)continue;if(l.delete)i.push(l);else{const s=n.retain,r=l.retain;let a="object"==typeof r&&null!==r?r:t;if("object"==typeof s&&null!==s&&"object"==typeof r&&null!==r){const t=Object.keys(s)[0];if(t===Object.keys(r)[0]){const n=h.getHandler(t);n&&(a={[t]:n.transform(s[t],r[t],e)})}}i.retain(a,o.default.transform(n.attributes,l.attributes,e))}}else i.retain(l.default.length(s.next()));return i.chop()}transformPosition(t,e=!1){e=!!e;const n=new a.default(this.ops);let s=0;for(;n.hasNext()&&s<=t;){const r=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(s<t||!e)&&(t+=r),s+=r):t-=Math.min(r,t-s)}return t}}h.Op=l.default,h.OpIterator=a.default,h.AttributeMap=o.default,h.handlers={},e.default=h,t.exports=h,t.exports.default=h},5759:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.length=function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"object"==typeof t.retain&&null!==t.retain?1:"string"==typeof t.insert?t.insert.length:1}}(n||(n={})),e.default=n},698:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s=n(5759);e.default=class{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);const e=this.ops[this.index];if(e){const n=this.offset,r=s.default.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};{const s={};return e.attributes&&(s.attributes=e.attributes),"number"==typeof e.retain?s.retain=t:"object"==typeof e.retain&&null!==e.retain?s.retain=e.retain:"string"==typeof e.insert?s.insert=e.insert.substr(n,t):s.insert=e.insert,s}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?s.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const t=this.ops[this.index];return t?"number"==typeof t.delete?"delete":"number"==typeof t.retain||"object"==typeof t.retain&&null!==t.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const t=this.offset,e=this.index,n=this.next(),s=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(s)}}return[]}}},127:(t,e,n)=>{"use strict";n.d(e,{A:()=>d});const s=function(){this.__data__=[],this.size=0};var r=n(6984);const i=function(t,e){for(var n=t.length;n--;)if((0,r.A)(t[n][0],e))return n;return-1};var o=Array.prototype.splice;const l=function(t){var e=this.__data__,n=i(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)};const a=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]};const c=function(t){return i(this.__data__,t)>-1};const u=function(t,e){var n=this.__data__,s=i(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this};function h(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}h.prototype.clear=s,h.prototype.delete=l,h.prototype.get=a,h.prototype.has=c,h.prototype.set=u;const d=h},8335:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var s=n(8744),r=n(1917);const i=(0,s.A)(r.A,"Map")},9471:(t,e,n)=>{"use strict";n.d(e,{A:()=>E});const s=(0,n(8744).A)(Object,"create");const r=function(){this.__data__=s?s(null):{},this.size=0};const i=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var o=Object.prototype.hasOwnProperty;const l=function(t){var e=this.__data__;if(s){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0};var a=Object.prototype.hasOwnProperty;const c=function(t){var e=this.__data__;return s?void 0!==e[t]:a.call(e,t)};const u=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=s&&void 0===e?"__lodash_hash_undefined__":e,this};function h(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}h.prototype.clear=r,h.prototype.delete=i,h.prototype.get=l,h.prototype.has=c,h.prototype.set=u;const d=h;var f=n(127),p=n(8335);const g=function(){this.size=0,this.__data__={hash:new d,map:new(p.A||f.A),string:new d}};const m=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const b=function(t,e){var n=t.__data__;return m(e)?n["string"==typeof e?"string":"hash"]:n.map};const y=function(t){var e=b(this,t).delete(t);return this.size-=e?1:0,e};const v=function(t){return b(this,t).get(t)};const A=function(t){return b(this,t).has(t)};const x=function(t,e){var n=b(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this};function N(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}N.prototype.clear=g,N.prototype.delete=y,N.prototype.get=v,N.prototype.has=A,N.prototype.set=x;const E=N},1754:(t,e,n)=>{"use strict";n.d(e,{A:()=>d});var s=n(127);const r=function(){this.__data__=new s.A,this.size=0};const i=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};const o=function(t){return this.__data__.get(t)};const l=function(t){return this.__data__.has(t)};var a=n(8335),c=n(9471);const u=function(t,e){var n=this.__data__;if(n instanceof s.A){var r=n.__data__;if(!a.A||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new c.A(r)}return n.set(t,e),this.size=n.size,this};function h(t){var e=this.__data__=new s.A(t);this.size=e.size}h.prototype.clear=r,h.prototype.delete=i,h.prototype.get=o,h.prototype.has=l,h.prototype.set=u;const d=h},241:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=n(1917).A.Symbol},3988:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=n(1917).A.Uint8Array},3607:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});const s=function(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s};var r=n(2274),i=n(2049),o=n(9912),l=n(5353),a=n(3858),c=Object.prototype.hasOwnProperty;const u=function(t,e){var n=(0,i.A)(t),u=!n&&(0,r.A)(t),h=!n&&!u&&(0,o.A)(t),d=!n&&!u&&!h&&(0,a.A)(t),f=n||u||h||d,p=f?s(t.length,String):[],g=p.length;for(var m in t)!e&&!c.call(t,m)||f&&("length"==m||h&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||(0,l.A)(m,g))||p.push(m);return p}},6912:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=function(t,e){for(var n=-1,s=e.length,r=t.length;++n<s;)t[r+n]=e[n];return t}},2851:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var s=n(2528),r=n(6984),i=Object.prototype.hasOwnProperty;const o=function(t,e,n){var o=t[e];i.call(t,e)&&(0,r.A)(o,n)&&(void 0!==n||e in t)||(0,s.A)(t,e,n)}},2528:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var s=n(4171);const r=function(t,e,n){"__proto__"==e&&s.A?(0,s.A)(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},3831:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var s=n(6912),r=n(2049);const i=function(t,e,n){var i=e(t);return(0,r.A)(t)?i:(0,s.A)(i,n(t))}},8496:(t,e,n)=>{"use strict";n.d(e,{A:()=>d});var s=n(241),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,l=s.A?s.A.toStringTag:void 0;const a=function(t){var e=i.call(t,l),n=t[l];try{t[l]=void 0;var s=!0}catch(t){}var r=o.call(t);return s&&(e?t[l]=n:delete t[l]),r};var c=Object.prototype.toString;const u=function(t){return c.call(t)};var h=s.A?s.A.toStringTag:void 0;const d=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":h&&h in Object(t)?a(t):u(t)}},2789:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=function(t){return function(e){return t(e)}}},565:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var s=n(3988);const r=function(t){var e=new t.constructor(t.byteLength);return new s.A(e).set(new s.A(t)),e}},154:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var s=n(1917),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=r&&"object"==typeof module&&module&&!module.nodeType&&module,o=i&&i.exports===r?s.A.Buffer:void 0,l=o?o.allocUnsafe:void 0;const a=function(t,e){if(e)return t.slice();var n=t.length,s=l?l(n):new t.constructor(n);return t.copy(s),s}},1801:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var s=n(565);const r=function(t,e){var n=e?(0,s.A)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},9759:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=function(t,e){var n=-1,s=t.length;for(e||(e=Array(s));++n<s;)e[n]=t[n];return e}},2031:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var s=n(2851),r=n(2528);const i=function(t,e,n,i){var o=!n;n||(n={});for(var l=-1,a=e.length;++l<a;){var c=e[l],u=i?i(n[c],t[c],c,n,t):void 0;void 0===u&&(u=t[c]),o?(0,r.A)(n,c,u):(0,s.A)(n,c,u)}return n}},4171:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var s=n(8744);const r=function(){try{var t=(0,s.A)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},2136:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s="object"==typeof global&&global&&global.Object===Object&&global},9042:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var s=n(3831),r=n(8634),i=n(9084);const o=function(t){return(0,s.A)(t,i.A,r.A)}},8744:(t,e,n)=>{"use strict";n.d(e,{A:()=>y});var s=n(9610);const r=n(1917).A["__core-js_shared__"];var i,o=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";const l=function(t){return!!o&&o in t};var a=n(3149),c=n(1121),u=/^\[object .+?Constructor\]$/,h=Function.prototype,d=Object.prototype,f=h.toString,p=d.hasOwnProperty,g=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(t){return!(!(0,a.A)(t)||l(t))&&((0,s.A)(t)?g:u).test((0,c.A)(t))};const b=function(t,e){return null==t?void 0:t[e]};const y=function(t,e){var n=b(t,e);return m(n)?n:void 0}},5647:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=(0,n(367).A)(Object.getPrototypeOf,Object)},8634:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});const s=function(t,e){for(var n=-1,s=null==t?0:t.length,r=0,i=[];++n<s;){var o=t[n];e(o,n,t)&&(i[r++]=o)}return i};var r=n(3153),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;const l=o?function(t){return null==t?[]:(t=Object(t),s(o(t),(function(e){return i.call(t,e)})))}:r.A},4906:(t,e,n)=>{"use strict";n.d(e,{A:()=>E});var s=n(8744),r=n(1917);const i=(0,s.A)(r.A,"DataView");var o=n(8335);const l=(0,s.A)(r.A,"Promise");const a=(0,s.A)(r.A,"Set");const c=(0,s.A)(r.A,"WeakMap");var u=n(8496),h=n(1121),d="[object Map]",f="[object Promise]",p="[object Set]",g="[object WeakMap]",m="[object DataView]",b=(0,h.A)(i),y=(0,h.A)(o.A),v=(0,h.A)(l),A=(0,h.A)(a),x=(0,h.A)(c),N=u.A;(i&&N(new i(new ArrayBuffer(1)))!=m||o.A&&N(new o.A)!=d||l&&N(l.resolve())!=f||a&&N(new a)!=p||c&&N(new c)!=g)&&(N=function(t){var e=(0,u.A)(t),n="[object Object]"==e?t.constructor:void 0,s=n?(0,h.A)(n):"";if(s)switch(s){case b:return m;case y:return d;case v:return f;case A:return p;case x:return g}return e});const E=N},8598:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var s=n(3149),r=Object.create;const i=function(){function t(){}return function(e){if(!(0,s.A)(e))return{};if(r)return r(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var o=n(5647),l=n(7271);const a=function(t){return"function"!=typeof t.constructor||(0,l.A)(t)?{}:i((0,o.A)(t))}},5353:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var s=/^(?:0|[1-9]\d*)$/;const r=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&s.test(t))&&t>-1&&t%1==0&&t<e}},7271:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var s=Object.prototype;const r=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||s)}},4841:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var s=n(2136),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=r&&"object"==typeof module&&module&&!module.nodeType&&module,o=i&&i.exports===r&&s.A.process;const l=function(){try{var t=i&&i.require&&i.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}()},367:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=function(t,e){return function(n){return t(e(n))}}},1917:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var s=n(2136),r="object"==typeof self&&self&&self.Object===Object&&self;const i=s.A||r||Function("return this")()},1121:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var s=Function.prototype.toString;const r=function(t){if(null!=t){try{return s.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},532:(t,e,n)=>{"use strict";n.d(e,{A:()=>tt});var s=n(1754);const r=function(t,e){for(var n=-1,s=null==t?0:t.length;++n<s&&!1!==e(t[n],n,t););return t};var i=n(2851),o=n(2031),l=n(9084);const a=function(t,e){return t&&(0,o.A)(e,(0,l.A)(e),t)};var c=n(5615);const u=function(t,e){return t&&(0,o.A)(e,(0,c.A)(e),t)};var h=n(154),d=n(9759),f=n(8634);const p=function(t,e){return(0,o.A)(t,(0,f.A)(t),e)};var g=n(6912),m=n(5647),b=n(3153);const y=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,g.A)(e,(0,f.A)(t)),t=(0,m.A)(t);return e}:b.A;const v=function(t,e){return(0,o.A)(t,y(t),e)};var A=n(9042),x=n(3831);const N=function(t){return(0,x.A)(t,c.A,y)};var E=n(4906),w=Object.prototype.hasOwnProperty;const q=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&w.call(t,"index")&&(n.index=t.index,n.input=t.input),n};var k=n(565);const _=function(t,e){var n=e?(0,k.A)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)};var L=/\w*$/;const S=function(t){var e=new t.constructor(t.source,L.exec(t));return e.lastIndex=t.lastIndex,e};var O=n(241),T=O.A?O.A.prototype:void 0,j=T?T.valueOf:void 0;const C=function(t){return j?Object(j.call(t)):{}};var R=n(1801);const I=function(t,e,n){var s=t.constructor;switch(e){case"[object ArrayBuffer]":return(0,k.A)(t);case"[object Boolean]":case"[object Date]":return new s(+t);case"[object DataView]":return _(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,R.A)(t,n);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(t);case"[object RegExp]":return S(t);case"[object Symbol]":return C(t)}};var B=n(8598),M=n(2049),U=n(9912),D=n(3098);const P=function(t){return(0,D.A)(t)&&"[object Map]"==(0,E.A)(t)};var z=n(2789),F=n(4841),H=F.A&&F.A.isMap;const $=H?(0,z.A)(H):P;var V=n(3149);const K=function(t){return(0,D.A)(t)&&"[object Set]"==(0,E.A)(t)};var W=F.A&&F.A.isSet;const Z=W?(0,z.A)(W):K;var G="[object Arguments]",X="[object Function]",Q="[object Object]",J={};J[G]=J["[object Array]"]=J["[object ArrayBuffer]"]=J["[object DataView]"]=J["[object Boolean]"]=J["[object Date]"]=J["[object Float32Array]"]=J["[object Float64Array]"]=J["[object Int8Array]"]=J["[object Int16Array]"]=J["[object Int32Array]"]=J["[object Map]"]=J["[object Number]"]=J[Q]=J["[object RegExp]"]=J["[object Set]"]=J["[object String]"]=J["[object Symbol]"]=J["[object Uint8Array]"]=J["[object Uint8ClampedArray]"]=J["[object Uint16Array]"]=J["[object Uint32Array]"]=!0,J["[object Error]"]=J[X]=J["[object WeakMap]"]=!1;const Y=function t(e,n,o,f,g,m){var b,y=1&n,x=2&n,w=4&n;if(o&&(b=g?o(e,f,g,m):o(e)),void 0!==b)return b;if(!(0,V.A)(e))return e;var k=(0,M.A)(e);if(k){if(b=q(e),!y)return(0,d.A)(e,b)}else{var _=(0,E.A)(e),L=_==X||"[object GeneratorFunction]"==_;if((0,U.A)(e))return(0,h.A)(e,y);if(_==Q||_==G||L&&!g){if(b=x||L?{}:(0,B.A)(e),!y)return x?v(e,u(b,e)):p(e,a(b,e))}else{if(!J[_])return g?e:{};b=I(e,_,y)}}m||(m=new s.A);var S=m.get(e);if(S)return S;m.set(e,b),Z(e)?e.forEach((function(s){b.add(t(s,n,o,s,e,m))})):$(e)&&e.forEach((function(s,r){b.set(r,t(s,n,o,r,e,m))}));var O=w?x?N:A.A:x?c.A:l.A,T=k?void 0:O(e);return r(T||e,(function(s,r){T&&(s=e[r=s]),(0,i.A)(b,r,t(s,n,o,r,e,m))})),b};const tt=function(t){return Y(t,5)}},6984:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=function(t,e){return t===e||t!=t&&e!=e}},2274:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var s=n(8496),r=n(3098);const i=function(t){return(0,r.A)(t)&&"[object Arguments]"==(0,s.A)(t)};var o=Object.prototype,l=o.hasOwnProperty,a=o.propertyIsEnumerable;const c=i(function(){return arguments}())?i:function(t){return(0,r.A)(t)&&l.call(t,"callee")&&!a.call(t,"callee")}},2049:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=Array.isArray},8446:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var s=n(9610),r=n(5254);const i=function(t){return null!=t&&(0,r.A)(t.length)&&!(0,s.A)(t)}},9912:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var s=n(1917);const r=function(){return!1};var i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,l=o&&o.exports===i?s.A.Buffer:void 0;const a=(l?l.isBuffer:void 0)||r},6734:(t,e,n)=>{"use strict";n.d(e,{A:()=>R});var s=n(1754),r=n(9471);const i=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const o=function(t){return this.__data__.has(t)};function l(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r.A;++e<n;)this.add(t[e])}l.prototype.add=l.prototype.push=i,l.prototype.has=o;const a=l;const c=function(t,e){for(var n=-1,s=null==t?0:t.length;++n<s;)if(e(t[n],n,t))return!0;return!1};const u=function(t,e){return t.has(e)};const h=function(t,e,n,s,r,i){var o=1&n,l=t.length,h=e.length;if(l!=h&&!(o&&h>l))return!1;var d=i.get(t),f=i.get(e);if(d&&f)return d==e&&f==t;var p=-1,g=!0,m=2&n?new a:void 0;for(i.set(t,e),i.set(e,t);++p<l;){var b=t[p],y=e[p];if(s)var v=o?s(y,b,p,e,t,i):s(b,y,p,t,e,i);if(void 0!==v){if(v)continue;g=!1;break}if(m){if(!c(e,(function(t,e){if(!u(m,e)&&(b===t||r(b,t,n,s,i)))return m.push(e)}))){g=!1;break}}else if(b!==y&&!r(b,y,n,s,i)){g=!1;break}}return i.delete(t),i.delete(e),g};var d=n(241),f=n(3988),p=n(6984);const g=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,s){n[++e]=[s,t]})),n};const m=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n};var b=d.A?d.A.prototype:void 0,y=b?b.valueOf:void 0;const v=function(t,e,n,s,r,i,o){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new f.A(t),new f.A(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,p.A)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=g;case"[object Set]":var a=1&s;if(l||(l=m),t.size!=e.size&&!a)return!1;var c=o.get(t);if(c)return c==e;s|=2,o.set(t,e);var u=h(l(t),l(e),s,r,i,o);return o.delete(t),u;case"[object Symbol]":if(y)return y.call(t)==y.call(e)}return!1};var A=n(9042),x=Object.prototype.hasOwnProperty;const N=function(t,e,n,s,r,i){var o=1&n,l=(0,A.A)(t),a=l.length;if(a!=(0,A.A)(e).length&&!o)return!1;for(var c=a;c--;){var u=l[c];if(!(o?u in e:x.call(e,u)))return!1}var h=i.get(t),d=i.get(e);if(h&&d)return h==e&&d==t;var f=!0;i.set(t,e),i.set(e,t);for(var p=o;++c<a;){var g=t[u=l[c]],m=e[u];if(s)var b=o?s(m,g,u,e,t,i):s(g,m,u,t,e,i);if(!(void 0===b?g===m||r(g,m,n,s,i):b)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=t.constructor,v=e.constructor;y==v||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(f=!1)}return i.delete(t),i.delete(e),f};var E=n(4906),w=n(2049),q=n(9912),k=n(3858),_="[object Arguments]",L="[object Array]",S="[object Object]",O=Object.prototype.hasOwnProperty;const T=function(t,e,n,r,i,o){var l=(0,w.A)(t),a=(0,w.A)(e),c=l?L:(0,E.A)(t),u=a?L:(0,E.A)(e),d=(c=c==_?S:c)==S,f=(u=u==_?S:u)==S,p=c==u;if(p&&(0,q.A)(t)){if(!(0,q.A)(e))return!1;l=!0,d=!1}if(p&&!d)return o||(o=new s.A),l||(0,k.A)(t)?h(t,e,n,r,i,o):v(t,e,c,n,r,i,o);if(!(1&n)){var g=d&&O.call(t,"__wrapped__"),m=f&&O.call(e,"__wrapped__");if(g||m){var b=g?t.value():t,y=m?e.value():e;return o||(o=new s.A),i(b,y,n,r,o)}}return!!p&&(o||(o=new s.A),N(t,e,n,r,i,o))};var j=n(3098);const C=function t(e,n,s,r,i){return e===n||(null==e||null==n||!(0,j.A)(e)&&!(0,j.A)(n)?e!=e&&n!=n:T(e,n,s,r,t,i))};const R=function(t,e){return C(t,e)}},9610:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var s=n(8496),r=n(3149);const i=function(t){if(!(0,r.A)(t))return!1;var e=(0,s.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5254:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3149:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3098:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=function(t){return null!=t&&"object"==typeof t}},3858:(t,e,n)=>{"use strict";n.d(e,{A:()=>h});var s=n(8496),r=n(5254),i=n(3098),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;const l=function(t){return(0,i.A)(t)&&(0,r.A)(t.length)&&!!o[(0,s.A)(t)]};var a=n(2789),c=n(4841),u=c.A&&c.A.isTypedArray;const h=u?(0,a.A)(u):l},9084:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var s=n(3607),r=n(7271);const i=(0,n(367).A)(Object.keys,Object);var o=Object.prototype.hasOwnProperty;const l=function(t){if(!(0,r.A)(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e};var a=n(8446);const c=function(t){return(0,a.A)(t)?(0,s.A)(t):l(t)}},5615:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var s=n(3607),r=n(3149),i=n(7271);const o=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e};var l=Object.prototype.hasOwnProperty;const a=function(t){if(!(0,r.A)(t))return o(t);var e=(0,i.A)(t),n=[];for(var s in t)("constructor"!=s||!e&&l.call(t,s))&&n.push(s);return n};var c=n(8446);const u=function(t){return(0,c.A)(t)?(0,s.A)(t,!0):a(t)}},1001:(t,e,n)=>{"use strict";n.d(e,{A:()=>W});var s=n(1754),r=n(2528),i=n(6984);const o=function(t,e,n){(void 0!==n&&!(0,i.A)(t[e],n)||void 0===n&&!(e in t))&&(0,r.A)(t,e,n)};const l=function(t){return function(e,n,s){for(var r=-1,i=Object(e),o=s(e),l=o.length;l--;){var a=o[t?l:++r];if(!1===n(i[a],a,i))break}return e}}();var a=n(154),c=n(1801),u=n(9759),h=n(8598),d=n(2274),f=n(2049),p=n(8446),g=n(3098);const m=function(t){return(0,g.A)(t)&&(0,p.A)(t)};var b=n(9912),y=n(9610),v=n(3149),A=n(8496),x=n(5647),N=Function.prototype,E=Object.prototype,w=N.toString,q=E.hasOwnProperty,k=w.call(Object);const _=function(t){if(!(0,g.A)(t)||"[object Object]"!=(0,A.A)(t))return!1;var e=(0,x.A)(t);if(null===e)return!0;var n=q.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&w.call(n)==k};var L=n(3858);const S=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var O=n(2031),T=n(5615);const j=function(t){return(0,O.A)(t,(0,T.A)(t))};const C=function(t,e,n,s,r,i,l){var p=S(t,n),g=S(e,n),A=l.get(g);if(A)o(t,n,A);else{var x=i?i(p,g,n+"",t,e,l):void 0,N=void 0===x;if(N){var E=(0,f.A)(g),w=!E&&(0,b.A)(g),q=!E&&!w&&(0,L.A)(g);x=g,E||w||q?(0,f.A)(p)?x=p:m(p)?x=(0,u.A)(p):w?(N=!1,x=(0,a.A)(g,!0)):q?(N=!1,x=(0,c.A)(g,!0)):x=[]:_(g)||(0,d.A)(g)?(x=p,(0,d.A)(p)?x=j(p):(0,v.A)(p)&&!(0,y.A)(p)||(x=(0,h.A)(g))):N=!1}N&&(l.set(g,x),r(x,g,s,i,l),l.delete(g)),o(t,n,x)}};const R=function t(e,n,r,i,a){e!==n&&l(n,(function(l,c){if(a||(a=new s.A),(0,v.A)(l))C(e,n,c,r,t,i,a);else{var u=i?i(S(e,c),l,c+"",e,n,a):void 0;void 0===u&&(u=l),o(e,c,u)}}),T.A)};const I=function(t){return t};const B=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)};var M=Math.max;const U=function(t,e,n){return e=M(void 0===e?t.length-1:e,0),function(){for(var s=arguments,r=-1,i=M(s.length-e,0),o=Array(i);++r<i;)o[r]=s[e+r];r=-1;for(var l=Array(e+1);++r<e;)l[r]=s[r];return l[e]=n(o),B(t,this,l)}};const D=function(t){return function(){return t}};var P=n(4171);const z=P.A?function(t,e){return(0,P.A)(t,"toString",{configurable:!0,enumerable:!1,value:D(e),writable:!0})}:I;var F=Date.now;const H=function(t){var e=0,n=0;return function(){var s=F(),r=16-(s-n);if(n=s,r>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(z);const $=function(t,e){return H(U(t,e,I),t+"")};var V=n(5353);const K=function(t,e,n){if(!(0,v.A)(n))return!1;var s=typeof e;return!!("number"==s?(0,p.A)(n)&&(0,V.A)(e,n.length):"string"==s&&e in n)&&(0,i.A)(n[e],t)};const W=function(t){return $((function(e,n){var s=-1,r=n.length,i=r>1?n[r-1]:void 0,o=r>2?n[2]:void 0;for(i=t.length>3&&"function"==typeof i?(r--,i):void 0,o&&K(n[0],n[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++s<r;){var l=n[s];l&&t(e,l,s,i)}return e}))}((function(t,e,n){R(t,e,n)}))},3153:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=function(){return[]}},1349:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Attributor:()=>r,AttributorStore:()=>d,BlockBlot:()=>w,ClassAttributor:()=>c,ContainerBlot:()=>k,EmbedBlot:()=>_,InlineBlot:()=>N,LeafBlot:()=>m,ParentBlot:()=>A,Registry:()=>l,Scope:()=>s,ScrollBlot:()=>O,StyleAttributor:()=>h,TextBlot:()=>j});var s=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(s||{});class r{constructor(t,e,n={}){this.attrName=t,this.keyName=e;const r=s.TYPE&s.ATTRIBUTE;this.scope=null!=n.scope?n.scope&s.LEVEL|r:s.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}static keys(t){return Array.from(t.attributes).map((t=>t.name))}add(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)}canAdd(t,e){return null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1)}remove(t){t.removeAttribute(this.keyName)}value(t){const e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}}class i extends Error{constructor(t){super(t="[Parchment] "+t),this.message=t,this.name=this.constructor.name}}const o=class t{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,e=!1){if(null==t)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(e){let n=null;try{n=t.parentNode}catch{return null}return this.find(n,e)}return null}create(e,n,s){const r=this.query(n);if(null==r)throw new i(`Unable to create ${n} blot`);const o=r,l=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:o.create(s),a=new o(e,l,s);return t.blots.set(a.domNode,a),a}find(e,n=!1){return t.find(e,n)}query(t,e=s.ANY){let n;return"string"==typeof t?n=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?n=this.types.text:"number"==typeof t?t&s.LEVEL&s.BLOCK?n=this.types.block:t&s.LEVEL&s.INLINE&&(n=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some((t=>(n=this.classes[t],!!n))),n=n||this.tags[t.tagName]),null==n?null:"scope"in n&&e&s.LEVEL&n.scope&&e&s.TYPE&n.scope?n:null}register(...t){return t.map((t=>{const e="blotName"in t,n="attrName"in t;if(!e&&!n)throw new i("Invalid definition");if(e&&"abstract"===t.blotName)throw new i("Cannot register abstract class");const s=e?t.blotName:n?t.attrName:void 0;return this.types[s]=t,n?"string"==typeof t.keyName&&(this.attributes[t.keyName]=t):e&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map((t=>t.toUpperCase())):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach((e=>{(null==this.tags[e]||null==t.className)&&(this.tags[e]=t)})))),t}))}};o.blots=new WeakMap;let l=o;function a(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((t=>0===t.indexOf(`${e}-`)))}const c=class extends r{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map((t=>t.split("-").slice(0,-1).join("-")))}add(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(`${this.keyName}-${e}`),!0)}remove(t){a(t,this.keyName).forEach((e=>{t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")}value(t){const e=(a(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}};function u(t){const e=t.split("-"),n=e.slice(1).map((t=>t[0].toUpperCase()+t.slice(1))).join("");return e[0]+n}const h=class extends r{static keys(t){return(t.getAttribute("style")||"").split(";").map((t=>t.split(":")[0].trim()))}add(t,e){return!!this.canAdd(t,e)&&(t.style[u(this.keyName)]=e,!0)}remove(t){t.style[u(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[u(this.keyName)];return this.canAdd(t,e)?e:""}};const d=class{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=l.find(this.domNode);if(null==t)return;const e=r.keys(this.domNode),n=c.keys(this.domNode),i=h.keys(this.domNode);e.concat(n).concat(i).forEach((e=>{const n=t.scroll.query(e,s.ATTRIBUTE);n instanceof r&&(this.attributes[n.attrName]=n)}))}copy(t){Object.keys(this.attributes).forEach((e=>{const n=this.attributes[e].value(this.domNode);t.format(e,n)}))}move(t){this.copy(t),Object.keys(this.attributes).forEach((t=>{this.attributes[t].remove(this.domNode)})),this.attributes={}}values(){return Object.keys(this.attributes).reduce(((t,e)=>(t[e]=this.attributes[e].value(this.domNode),t)),{})}},f=class{constructor(t,e){this.scroll=t,this.domNode=e,l.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(null==this.tagName)throw new i("Blot definition missing tagName");let e,n;return Array.isArray(this.tagName)?("string"==typeof t?(n=t.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):"number"==typeof t&&(n=t),e="number"==typeof n?document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?document.createElement(n):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){null!=this.parent&&this.parent.removeChild(this),l.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,n,r){const i=this.isolate(t,e);if(null!=this.scroll.query(n,s.BLOT)&&r)i.wrap(n,r);else if(null!=this.scroll.query(n,s.ATTRIBUTE)){const t=this.scroll.create(this.statics.scope);i.wrap(t),t.format(n,r)}}insertAt(t,e,n){const s=null==n?this.scroll.create("text",e):this.scroll.create(e,n),r=this.split(t);this.parent.insertBefore(s,r||void 0)}isolate(t,e){const n=this.split(t);if(null==n)throw new Error("Attempt to isolate at end");return n.split(e),n}length(){return 1}offset(t=this.parent){return null==this.parent||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(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,e){const n="string"==typeof t?this.scroll.create(t,e):t;return null!=this.parent&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(t,e){return 0===t?this:this.next}update(t,e){}wrap(t,e){const n="string"==typeof t?this.scroll.create(t,e):t;if(null!=this.parent&&this.parent.insertBefore(n,this.next||void 0),"function"!=typeof n.appendChild)throw new i(`Cannot wrap ${t}`);return n.appendChild(this),n}};f.blotName="abstract";let p=f;const g=class extends p{static value(t){return!0}index(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}position(t,e){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};g.scope=s.INLINE_BLOT;const m=g;class b{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const e=t.slice(1);this.append(...e)}}at(t){const e=this.iterator();let n=e();for(;n&&t>0;)t-=1,n=e();return n}contains(t){const e=this.iterator();let n=e();for(;n;){if(n===t)return!0;n=e()}return!1}indexOf(t){const e=this.iterator();let n=e(),s=0;for(;n;){if(n===t)return s;s+=1,n=e()}return-1}insertBefore(t,e){null!=t&&(this.remove(t),t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let e=0,n=this.head;for(;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1}remove(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const e=t;return null!=t&&(t=t.next),e}}find(t,e=!1){const n=this.iterator();let s=n();for(;s;){const r=s.length();if(t<r||e&&t===r&&(null==s.next||0!==s.next.length()))return[s,t];t-=r,s=n()}return[null,0]}forEach(t){const e=this.iterator();let n=e();for(;n;)t(n),n=e()}forEachAt(t,e,n){if(e<=0)return;const[s,r]=this.find(t);let i=t-r;const o=this.iterator(s);let l=o();for(;l&&i<t+e;){const s=l.length();t>i?n(l,t-i,Math.min(e,i+s-t)):n(l,0,Math.min(s,t+e-i)),i+=s,l=o()}}map(t){return this.reduce(((e,n)=>(e.push(t(n)),e)),[])}reduce(t,e){const n=this.iterator();let s=n();for(;s;)e=t(e,s),s=n();return e}}function y(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const n=e.create(s.INLINE);return Array.from(t.childNodes).forEach((t=>{n.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(n.domNode,t),n.attach(),n}}const v=class t extends p{constructor(t,e){super(t,e),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach((t=>{t.attach()}))}attachUI(e){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=e,t.uiClass&&this.uiNode.classList.add(t.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new b,Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode)).reverse().forEach((t=>{try{const e=y(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(t){if(t instanceof i)return;throw t}}))}deleteAt(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,((t,e,n)=>{t.deleteAt(e,n)}))}descendant(e,n=0){const[s,r]=this.children.find(n);return null==e.blotName&&e(s)||null!=e.blotName&&s instanceof e?[s,r]:s instanceof t?s.descendant(e,r):[null,-1]}descendants(e,n=0,s=Number.MAX_VALUE){let r=[],i=s;return this.children.forEachAt(n,s,((n,s,o)=>{(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&r.push(n),n instanceof t&&(r=r.concat(n.descendants(e,s,i))),i-=o})),r}detach(){this.children.forEach((t=>{t.detach()})),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach((n=>{e||this.statics.allowedChildren.some((t=>n instanceof t))||(n.statics.scope===s.BLOCK_BLOT?(null!=n.next&&this.splitAfter(n),null!=n.prev&&this.splitAfter(n.prev),n.parent.unwrap(),e=!0):n instanceof t?n.unwrap():n.remove())}))}formatAt(t,e,n,s){this.children.forEachAt(t,e,((t,e,r)=>{t.formatAt(e,r,n,s)}))}insertAt(t,e,n){const[s,r]=this.children.find(t);if(s)s.insertAt(r,e,n);else{const t=null==n?this.scroll.create("text",e):this.scroll.create(e,n);this.appendChild(t)}}insertBefore(t,e){null!=t.parent&&t.parent.children.remove(t);let n=null;this.children.insertBefore(t,e||null),t.parent=this,null!=e&&(n=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(t.domNode,n),t.attach()}length(){return this.children.reduce(((t,e)=>t+e.length()),0)}moveChildren(t,e){this.children.forEach((n=>{t.insertBefore(n,e)}))}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,n=!1){const[s,r]=this.children.find(e,n),i=[[this,e]];return s instanceof t?i.concat(s.path(r,n)):(null!=s&&i.push([s,r]),i)}removeChild(t){this.children.remove(t)}replaceWith(e,n){const s="string"==typeof e?this.scroll.create(e,n):e;return s instanceof t&&this.moveChildren(s),super.replaceWith(s)}split(t,e=!1){if(!e){if(0===t)return this;if(t===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(t,this.length(),((t,s,r)=>{const i=t.split(s,e);null!=i&&n.appendChild(i)})),n}splitAfter(t){const e=this.clone();for(;null!=t.next;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,e){const n=[],s=[];t.forEach((t=>{t.target===this.domNode&&"childList"===t.type&&(n.push(...t.addedNodes),s.push(...t.removedNodes))})),s.forEach((t=>{if(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const e=this.scroll.find(t);null!=e&&(null==e.domNode.parentNode||e.domNode.parentNode===this.domNode)&&e.detach()})),n.filter((t=>t.parentNode===this.domNode&&t!==this.uiNode)).sort(((t,e)=>t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1)).forEach((t=>{let e=null;null!=t.nextSibling&&(e=this.scroll.find(t.nextSibling));const n=y(t,this.scroll);(n.next!==e||null==n.next)&&(null!=n.parent&&n.parent.removeChild(this),this.insertBefore(n,e||void 0))})),this.enforceAllowedChildren()}};v.uiClass="";const A=v;const x=class t extends A{static create(t){return super.create(t)}static formats(e,n){const s=n.query(t.blotName);if(null==s||e.tagName!==s.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new d(this.domNode)}format(e,n){if(e!==this.statics.blotName||n){const t=this.scroll.query(e,s.INLINE);if(null==t)return;t instanceof r?this.attributes.attribute(t,n):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n)}else this.children.forEach((e=>{e instanceof t||(e=e.wrap(t.blotName,!0)),this.attributes.copy(e)})),this.unwrap()}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t}formatAt(t,e,n,r){null!=this.formats()[n]||this.scroll.query(n,s.ATTRIBUTE)?this.isolate(t,e).format(n,r):super.formatAt(t,e,n,r)}optimize(e){super.optimize(e);const n=this.formats();if(0===Object.keys(n).length)return this.unwrap();const s=this.next;s instanceof t&&s.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}(n,s.formats())&&(s.moveChildren(this),s.remove())}replaceWith(t,e){const n=super.replaceWith(t,e);return this.attributes.copy(n),n}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}wrap(e,n){const s=super.wrap(e,n);return s instanceof t&&this.attributes.move(s),s}};x.allowedChildren=[x,m],x.blotName="inline",x.scope=s.INLINE_BLOT,x.tagName="SPAN";const N=x,E=class t extends A{static create(t){return super.create(t)}static formats(e,n){const s=n.query(t.blotName);if(null==s||e.tagName!==s.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new d(this.domNode)}format(e,n){const i=this.scroll.query(e,s.BLOCK);null!=i&&(i instanceof r?this.attributes.attribute(i,n):e!==this.statics.blotName||n?n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n):this.replaceWith(t.blotName))}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t}formatAt(t,e,n,r){null!=this.scroll.query(n,s.BLOCK)?this.format(n,r):super.formatAt(t,e,n,r)}insertAt(t,e,n){if(null==n||null!=this.scroll.query(e,s.INLINE))super.insertAt(t,e,n);else{const s=this.split(t);if(null==s)throw new Error("Attempt to insertAt after block boundaries");{const t=this.scroll.create(e,n);s.parent.insertBefore(t,s)}}}replaceWith(t,e){const n=super.replaceWith(t,e);return this.attributes.copy(n),n}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}};E.blotName="block",E.scope=s.BLOCK_BLOT,E.tagName="P",E.allowedChildren=[N,E,m];const w=E,q=class extends A{checkMerge(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,n,s){super.formatAt(t,e,n,s),this.enforceAllowedChildren()}insertAt(t,e,n){super.insertAt(t,e,n),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};q.blotName="container",q.scope=s.BLOCK_BLOT;const k=q;const _=class extends m{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,n,s){0===t&&e===this.length()?this.format(n,s):super.formatAt(t,e,n,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}},L={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},S=class extends A{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver((t=>{this.update(t)})),this.observer.observe(this.domNode,L),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){const n=this.registry.find(t,e);return n?n.scroll===this?n:e?this.find(n.scroll.domNode.parentNode,!0):null:null}query(t,e=s.ANY){return this.registry.query(t,e)}register(...t){return this.registry.register(...t)}build(){null!=this.scroll&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,e){this.update(),0===t&&e===this.length()?this.children.forEach((t=>{t.remove()})):super.deleteAt(t,e)}formatAt(t,e,n,s){this.update(),super.formatAt(t,e,n,s)}insertAt(t,e,n){this.update(),super.insertAt(t,e,n)}optimize(t=[],e={}){super.optimize(e);const n=e.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)t.push(s.pop());const r=(t,e=!0)=>{null==t||t===this||null!=t.domNode.parentNode&&(n.has(t.domNode)||n.set(t.domNode,[]),e&&r(t.parent))},i=t=>{n.has(t.domNode)&&(t instanceof A&&t.children.forEach(i),n.delete(t.domNode),t.optimize(e))};let o=t;for(let e=0;o.length>0;e+=1){if(e>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach((t=>{const e=this.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(r(this.find(t.previousSibling,!1)),Array.from(t.addedNodes).forEach((t=>{const e=this.find(t,!1);r(e,!1),e instanceof A&&e.children.forEach((t=>{r(t,!1)}))}))):"attributes"===t.type&&r(e.prev)),r(e))})),this.children.forEach(i),o=Array.from(this.observer.takeRecords()),s=o.slice();s.length>0;)t.push(s.pop())}}update(t,e={}){t=t||this.observer.takeRecords();const n=new WeakMap;t.map((t=>{const e=this.find(t.target,!0);return null==e?null:n.has(e.domNode)?(n.get(e.domNode).push(t),null):(n.set(e.domNode,[t]),e)})).forEach((t=>{null!=t&&t!==this&&n.has(t.domNode)&&t.update(n.get(t.domNode)||[],e)})),e.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),e),this.optimize(t,e)}};S.blotName="scroll",S.defaultChild=w,S.allowedChildren=[w,k],S.scope=s.BLOCK_BLOT,S.tagName="DIV";const O=S,T=class t extends m{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,e){super(t,e),this.text=this.statics.value(this.domNode)}deleteAt(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)}index(t,e){return this.domNode===t?e:-1}insertAt(t,e,n){null==n?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,n)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&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(0===t)return this;if(t===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(t,e){t.some((t=>"characterData"===t.type&&t.target===this.domNode))&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};T.blotName="text",T.scope=s.INLINE_BLOT;const j=T},9065:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>a,Ji:()=>h,mG:()=>u,zo:()=>c});var s=n(1349),r=n(2660),i=n(2587),o=n(8879),l=n(1389);class a extends s.BlockBlot{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=u(this)),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,n,r){e<=0||(this.scroll.query(n,s.Scope.BLOCK)?t+e===this.length()&&this.format(n,r):super.formatAt(t,Math.min(e,this.length()-t-1),n,r),this.cache={})}insertAt(t,e,n){if(null!=n)return super.insertAt(t,e,n),void(this.cache={});if(0===e.length)return;const s=e.split("\n"),r=s.shift();r.length>0&&(t<this.length()-1||null==this.children.tail?super.insertAt(Math.min(t,this.length()-1),r):this.children.tail.insertAt(this.children.tail.length(),r),this.cache={});let i=this;s.reduce(((t,e)=>(i=i.split(t,!0),i.insertAt(0,e),e.length)),t+r.length)}insertBefore(t,e){const{head:n}=this.children;super.insertBefore(t,e),n instanceof i.A&&n.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+1),this.cache.length}moveChildren(t,e){super.moveChildren(t,e),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&(0===t||t>=this.length()-1)){const e=this.clone();return 0===t?(this.parent.insertBefore(e,this),this):(this.parent.insertBefore(e,this.next),e)}const n=super.split(t,e);return this.cache={},n}}a.blotName="block",a.tagName="P",a.defaultChild=i.A,a.allowedChildren=[i.A,o.A,s.EmbedBlot,l.A];class c extends s.EmbedBlot{attach(){super.attach(),this.attributes=new s.AttributorStore(this.domNode)}delta(){return(new r).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const n=this.scroll.query(t,s.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}formatAt(t,e,n,s){this.format(n,s)}insertAt(t,e,n){if(null!=n)return void super.insertAt(t,e,n);const s=e.split("\n"),r=s.pop(),i=s.map((t=>{const e=this.scroll.create(a.blotName);return e.insertAt(0,t),e})),o=this.split(t);i.forEach((t=>{this.parent.insertBefore(t,o)})),r&&this.parent.insertBefore(this.scroll.create("text",r),o)}}function u(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.descendants(s.LeafBlot).reduce(((t,n)=>0===n.length()?t:t.insert(n.value(),h(n,{},e))),new r).insert("\n",h(t))}function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==t?e:("formats"in t&&"function"==typeof t.formats&&(e={...e,...t.formats()},n&&delete e["code-token"]),null==t.parent||"scroll"===t.parent.statics.blotName||t.parent.statics.scope!==t.statics.scope?e:h(t.parent,e,n))}c.scope=s.Scope.BLOCK_BLOT},2587:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var s=n(1349);class r extends s.EmbedBlot{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}r.blotName="break",r.tagName="BR";const i=r},9339:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var s=n(1349);class r extends s.ContainerBlot{}const i=r},2928:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var s=n(1349),r=n(1389);class i extends s.EmbedBlot{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){}constructor(t,e,n){super(t,e),this.selection=n,this.textNode=document.createTextNode(i.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(t,e){if(0!==this.savedLength)return void super.format(t,e);let n=this,r=0;for(;null!=n&&n.statics.scope!==s.Scope.BLOCK_BLOT;)r+=n.offset(n.parent),n=n.parent;null!=n&&(this.savedLength=i.CONTENTS.length,n.optimize(),n.formatAt(r,i.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return null;const t=this.selection.getNativeRange();for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof r.A?this.prev:null,n=e?e.length():0,s=this.next instanceof r.A?this.next:null,o=s?s.text:"",{textNode:l}=this,a=l.data.split(i.CONTENTS).join("");let c;if(l.data=i.CONTENTS,e)c=e,(a||s)&&(e.insertAt(e.length(),a+o),s&&s.remove());else if(s)c=s,s.insertAt(0,a);else{const t=document.createTextNode(a);c=this.scroll.create(t),this.parent.insertBefore(c,this)}if(this.remove(),t){const r=(t,r)=>e&&t===e.domNode?r:t===l?n+r-1:s&&t===s.domNode?n+a.length+r:null,i=r(t.start.node,t.start.offset),o=r(t.end.node,t.end.offset);if(null!==i&&null!==o)return{startNode:c.domNode,startOffset:i,endNode:c.domNode,endOffset:o}}return null}update(t,e){if(t.some((t=>"characterData"===t.type&&t.target===this.textNode))){const t=this.restore();t&&(e.range=t)}}optimize(t){super.optimize(t);let{parent:e}=this;for(;e;){if("A"===e.domNode.tagName){this.savedLength=i.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}}const o=i},3341:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var s=n(1349),r=n(1389);const i="\ufeff";class o extends s.EmbedBlot{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach((t=>{this.contentNode.appendChild(t)})),this.leftGuard=document.createTextNode(i),this.rightGuard=document.createTextNode(i),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,n=null;const s=t.data.split(i).join("");if(t===this.leftGuard)if(this.prev instanceof r.A){const t=this.prev.length();this.prev.insertAt(t,s),n={startNode:this.prev.domNode,startOffset:t+s.length}}else e=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(e),this),n={startNode:e,startOffset:s.length};else t===this.rightGuard&&(this.next instanceof r.A?(this.next.insertAt(0,s),n={startNode:this.next.domNode,startOffset:s.length}):(e=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(e),this.next),n={startNode:e,startOffset:s.length}));return t.data=i,n}update(t,e){t.forEach((t=>{if("characterData"===t.type&&(t.target===this.leftGuard||t.target===this.rightGuard)){const n=this.restore(t.target);n&&(e.range=n)}}))}}const l=o},8879:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var s=n(1349),r=n(2587),i=n(1389);class o extends s.InlineBlot{static allowedChildren=[o,r.A,s.EmbedBlot,i.A];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(t,e){const n=o.order.indexOf(t),s=o.order.indexOf(e);return n>=0||s>=0?n-s:t===e?0:t<e?-1:1}formatAt(t,e,n,r){if(o.compare(this.statics.blotName,n)<0&&this.scroll.query(n,s.Scope.BLOT)){const s=this.isolate(t,e);r&&s.wrap(n,r)}else super.formatAt(t,e,n,r)}optimize(t){if(super.optimize(t),this.parent instanceof o&&o.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}const l=o},1389:(t,e,n)=>{"use strict";n.d(e,{A:()=>r,X:()=>i});var s=n(1349);class r extends s.TextBlot{}function i(t){return t.replace(/[&<>"']/g,(t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[t])))}},2233:(t,e,n)=>{"use strict";n.d(e,{xz:()=>s.xz,Q6:()=>s.Q6,Ay:()=>C});var s=n(8317),r=n(9065),i=n(2587),o=n(9339),l=n(2928),a=n(3341),c=n(8879),u=n(1349),h=n(2660),d=n(6582);function f(t){return t instanceof r.Ay||t instanceof r.zo}function p(t){return"function"==typeof t.updateContent}class g extends u.ScrollBlot{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=r.Ay;static allowedChildren=[r.Ay,r.zo,o.A];constructor(t,e,n){let{emitter:s}=n;super(t,e),this.emitter=s,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",(t=>this.handleDragStart(t)))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(d.A.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(d.A.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,e){this.emitter.emit(d.A.events.SCROLL_EMBED_UPDATE,t,e)}deleteAt(t,e){const[n,s]=this.line(t),[o]=this.line(t+e);if(super.deleteAt(t,e),null!=o&&n!==o&&s>0){if(n instanceof r.zo||o instanceof r.zo)return void this.optimize();const t=o.children.head instanceof i.A?null:o.children.head;n.moveChildren(o,t),n.remove()}this.optimize()}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,e,n,s){super.formatAt(t,e,n,s),this.optimize()}insertAt(t,e,n){if(t>=this.length())if(null==n||null==this.scroll.query(e,u.Scope.BLOCK)){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t),null==n&&e.endsWith("\n")?t.insertAt(0,e.slice(0,-1),n):t.insertAt(0,e,n)}else{const t=this.scroll.create(e,n);this.appendChild(t)}else super.insertAt(t,e,n);this.optimize()}insertBefore(t,e){if(t.statics.scope===u.Scope.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(t),super.insertBefore(n,e)}else super.insertBefore(t,e)}insertContents(t,e){const n=this.deltaToRenderBlocks(e.concat((new h).insert("\n"))),s=n.pop();if(null==s)return;this.batchStart();const i=n.shift();if(i){const e="block"===i.type&&(0===i.delta.length()||!this.descendant(r.zo,t)[0]&&t<this.length()),n="block"===i.type?i.delta:(new h).insert({[i.key]:i.value});m(this,t,n);const s="block"===i.type?1:0,o=t+n.length()+s;e&&this.insertAt(o-1,"\n");const l=(0,r.Ji)(this.line(t)[0]),a=h.AttributeMap.diff(l,i.attributes)||{};Object.keys(a).forEach((t=>{this.formatAt(o-1,1,t,a[t])})),t=o}let[o,l]=this.children.find(t);if(n.length&&(o&&(o=o.split(l),l=0),n.forEach((t=>{if("block"===t.type){m(this.createBlock(t.attributes,o||void 0),0,t.delta)}else{const e=this.create(t.key,t.value);this.insertBefore(e,o||void 0),Object.keys(t.attributes).forEach((n=>{e.format(n,t.attributes[n])}))}}))),"block"===s.type&&s.delta.length()){m(this,o?o.offset(o.scroll)+l:this.length(),s.delta)}this.batchEnd(),this.optimize()}isEnabled(){return"true"===this.domNode.getAttribute("contenteditable")}leaf(t){const e=this.path(t).pop();if(!e)return[null,-1];const[n,s]=e;return n instanceof u.LeafBlot?[n,s]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(f,t)}lines(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;const n=(t,e,s)=>{let r=[],i=s;return t.children.forEachAt(e,s,((t,e,s)=>{f(t)?r.push(t):t instanceof u.ContainerBlot&&(r=r.concat(n(t,e,i))),i-=s})),r};return n(this,t,e)}optimize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.batch||(super.optimize(t,e),t.length>0&&this.emitter.emit(d.A.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch)return void(Array.isArray(t)&&(this.batch=this.batch.concat(t)));let e=d.A.sources.USER;"string"==typeof t&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),(t=t.filter((t=>{let{target:e}=t;const n=this.find(e,!0);return n&&!p(n)}))).length>0&&this.emitter.emit(d.A.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(d.A.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,n){const[s]=this.descendant((t=>t instanceof r.zo),t);s&&s.statics.blotName===e&&p(s)&&s.updateContent(n)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let n=new h;return t.forEach((t=>{const s=t?.insert;if(s)if("string"==typeof s){const r=s.split("\n");r.slice(0,-1).forEach((s=>{n.insert(s,t.attributes),e.push({type:"block",delta:n,attributes:t.attributes??{}}),n=new h}));const i=r[r.length-1];i&&n.insert(i,t.attributes)}else{const r=Object.keys(s)[0];if(!r)return;this.query(r,u.Scope.INLINE)?n.push(t):(n.length()&&e.push({type:"block",delta:n,attributes:{}}),n=new h,e.push({type:"blockEmbed",key:r,value:s[r],attributes:t.attributes??{}}))}})),n.length()&&e.push({type:"block",delta:n,attributes:{}}),e}createBlock(t,e){let n;const s={};Object.entries(t).forEach((t=>{let[e,r]=t;null!=this.query(e,u.Scope.BLOCK&u.Scope.BLOT)?n=e:s[e]=r}));const r=this.create(n||this.statics.defaultChild.blotName,n?t[n]:void 0);this.insertBefore(r,e||void 0);const i=r.length();return Object.entries(s).forEach((t=>{let[e,n]=t;r.formatAt(0,i,e,n)})),r}}function m(t,e,n){n.reduce(((e,n)=>{const s=h.Op.length(n);let i=n.attributes||{};if(null!=n.insert)if("string"==typeof n.insert){const s=n.insert;t.insertAt(e,s);const[o]=t.descendant(u.LeafBlot,e),l=(0,r.Ji)(o);i=h.AttributeMap.diff(l,i)||{}}else if("object"==typeof n.insert){const s=Object.keys(n.insert)[0];if(null==s)return e;t.insertAt(e,s,n.insert[s]);if(null!=t.scroll.query(s,u.Scope.INLINE)){const[n]=t.descendant(u.LeafBlot,e),s=(0,r.Ji)(n);i=h.AttributeMap.diff(s,i)||{}}}return Object.keys(i).forEach((n=>{t.formatAt(e,s,n,i[n])})),e+s}),e)}const b=g;var y=n(1389),v=n(5357),A=n(2365);class x extends A.A{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(t,e){super(t,e),this.quill.on(s.Ay.events.EDITOR_CHANGE,((t,e,n,r)=>{t===s.Ay.events.SELECTION_CHANGE?e&&r!==s.Ay.sources.SILENT&&(this.currentRange=e):t===s.Ay.events.TEXT_CHANGE&&(this.ignoreChange||(this.options.userOnly&&r!==s.Ay.sources.USER?this.transform(e):this.record(e,n)),this.currentRange=E(this.currentRange,e))})),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",(t=>{"historyUndo"===t.inputType?(this.undo(),t.preventDefault()):"historyRedo"===t.inputType&&(this.redo(),t.preventDefault())}))}change(t,e){if(0===this.stack[t].length)return;const n=this.stack[t].pop();if(!n)return;const r=this.quill.getContents(),i=n.delta.invert(r);this.stack[e].push({delta:i,range:E(n.range,i)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,s.Ay.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,e){if(0===t.ops.length)return;this.stack.redo=[];let n=t.invert(e),s=this.currentRange;const r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){const t=this.stack.undo.pop();t&&(n=n.compose(t.delta),s=t.range)}else this.lastRecorded=r;0!==n.length()&&(this.stack.undo.push({delta:n,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){N(this.stack.undo,t),N(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,s.Ay.sources.USER);else{const e=function(t,e){const n=e.reduce(((t,e)=>t+(e.delete||0)),0);let s=e.length()-n;(function(t,e){const n=e.ops[e.ops.length-1];if(null==n)return!1;if(null!=n.insert)return"string"==typeof n.insert&&n.insert.endsWith("\n");if(null!=n.attributes)return Object.keys(n.attributes).some((e=>null!=t.query(e,u.Scope.BLOCK)));return!1})(t,e)&&(s-=1);return s}(this.quill.scroll,t.delta);this.quill.setSelection(e,s.Ay.sources.USER)}}}function N(t,e){let n=e;for(let e=t.length-1;e>=0;e-=1){const s=t[e];t[e]={delta:n.transform(s.delta,!0),range:s.range&&E(s.range,n)},n=s.delta.transform(n),0===t[e].delta.length()&&t.splice(e,1)}}function E(t,e){if(!t)return t;const n=e.transformPosition(t.index);return{index:n,length:e.transformPosition(t.index+t.length)-n}}var w=n(3510);class q extends A.A{constructor(t,e){super(t,e),t.root.addEventListener("drop",(e=>{e.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(e.clientX,e.clientY);else if(document.caretPositionFromPoint){const t=document.caretPositionFromPoint(e.clientX,e.clientY);n=document.createRange(),n.setStart(t.offsetNode,t.offset),n.setEnd(t.offsetNode,t.offset)}const s=n&&t.selection.normalizeNative(n);if(s){const n=t.selection.normalizedToRange(s);e.dataTransfer?.files&&this.upload(n,e.dataTransfer.files)}}))}upload(t,e){const n=[];Array.from(e).forEach((t=>{t&&this.options.mimetypes?.includes(t.type)&&n.push(t)})),n.length>0&&this.options.handler.call(this,t,n)}}q.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,e){const n=e.map((t=>new Promise((e=>{const n=new FileReader;n.onload=t=>{e(t.target.result)},n.readAsDataURL(t)}))));Promise.all(n).then((e=>{const n=e.reduce(((t,e)=>t.insert({image:e})),(new h).retain(t.index).delete(t.length));this.quill.updateContents(n,d.A.sources.USER),this.quill.setSelection(t.index+e.length,d.A.sources.SILENT)}))}};const k=q,_=["insertText","insertReplacementText"];class L extends A.A{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",(t=>{this.handleBeforeInput(t)})),/Android/i.test(navigator.userAgent)||t.on(s.Ay.events.COMPOSITION_BEFORE_START,(()=>{this.handleCompositionStart()}))}deleteRange(t){(0,w.Xo)({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===t.length)return!1;if(e){const n=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents((new h).retain(t.index).insert(e,n),s.Ay.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,s.Ay.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!_.includes(t.inputType))return;const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||!0===e.collapsed)return;const n=function(t){if("string"==typeof t.data)return t.data;if(t.dataTransfer?.types.includes("text/plain"))return t.dataTransfer.getData("text/plain");return null}(t);if(null==n)return;const s=this.quill.selection.normalizeNative(e),r=s?this.quill.selection.normalizedToRange(s):null;r&&this.replaceText(r,n)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}}const S=L,O=/Mac/i.test(navigator.platform);class T extends A.A{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:n,event:r}=e;if(!(n instanceof u.ParentBlot&&n.uiNode))return!0;const i="rtl"===getComputedStyle(n.domNode).direction;return!!(i&&"ArrowRight"!==r.key||!i&&"ArrowLeft"!==r.key)||(this.quill.setSelection(t.index-1,t.length+(r.shiftKey?1:0),s.Ay.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",(t=>{!t.defaultPrevented&&(t=>"ArrowLeft"===t.key||"ArrowRight"===t.key||"ArrowUp"===t.key||"ArrowDown"===t.key||"Home"===t.key||!(!O||"a"!==t.key||!0!==t.ctrlKey))(t)&&this.ensureListeningToSelectionChange()}))}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+100,this.isListening)return;this.isListening=!0;document.addEventListener("selectionchange",(()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()}),{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const e=t.getRangeAt(0);if(!0!==e.collapsed||0!==e.startOffset)return;const n=this.quill.scroll.find(e.startContainer);if(!(n instanceof u.ParentBlot&&n.uiNode))return;const s=document.createRange();s.setStartAfter(n.uiNode),s.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(s)}}const j=T;s.Ay.register({"blots/block":r.Ay,"blots/block/embed":r.zo,"blots/break":i.A,"blots/container":o.A,"blots/cursor":l.A,"blots/embed":a.A,"blots/inline":c.A,"blots/scroll":b,"blots/text":y.A,"modules/clipboard":v.Ay,"modules/history":x,"modules/keyboard":w.Ay,"modules/uploader":k,"modules/input":S,"modules/uiNode":j});const C=s.Ay},6582:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var s=n(228);var r=n(513);const i=(0,n(5437).A)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((t=>{document.addEventListener(t,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];Array.from(document.querySelectorAll(".ql-container")).forEach((t=>{const n=r.A.get(t);n&&n.emitter&&n.emitter.handleDOM(...e)}))}))}));const o=class extends s{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",i.error)}emit(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.log.call(i,...e),super.emit(...e)}handleDOM(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];(this.domListeners[t.type]||[]).forEach((e=>{let{node:s,handler:r}=e;(t.target===s||s.contains(t.target))&&r(t,...n)}))}listenDOM(t,e,n){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:e,handler:n})}}},513:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=new WeakMap},5437:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});const s=["error","warn","log","info"];let r="warn";function i(t){if(r&&s.indexOf(t)<=s.indexOf(r)){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];console[t](...n)}}function o(t){return s.reduce(((e,n)=>(e[n]=i.bind(console,n,t),e)),{})}o.level=t=>{r=t},i.level=o.level;const l=o},2365:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=class{static DEFAULTS={};constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.quill=t,this.options=e}}},8317:(t,e,n)=>{"use strict";n.d(e,{xz:()=>r,Q6:()=>d.Q,Ay:()=>B});var s=n(1001),r=n(1349),i=n(2660),o=n(532),l=n(6734),a=n(9065),c=n(2587),u=n(2928),h=n(1389),d=n(7951);const f=/^[ -~]*$/;function p(t,e,n){if(0===t.length){const[t]=b(n.pop());return e<=0?`</li></${t}>`:`</li></${t}>${p([],e-1,n)}`}const[{child:s,offset:r,length:i,indent:o,type:l},...a]=t,[c,u]=b(l);if(o>e)return n.push(l),o===e+1?`<${c}><li${u}>${g(s,r,i)}${p(a,o,n)}`:`<${c}><li>${p(t,e+1,n)}`;const h=n[n.length-1];if(o===e&&l===h)return`</li><li${u}>${g(s,r,i)}${p(a,o,n)}`;const[d]=b(n.pop());return`</li></${d}>${p(t,e-1,n)}`}function g(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("html"in t&&"function"==typeof t.html)return t.html(e,n);if(t instanceof h.A)return(0,h.X)(t.value().slice(e,e+n));if(t instanceof r.ParentBlot){if("list-container"===t.statics.blotName){const s=[];return t.children.forEachAt(e,n,((t,e,n)=>{const r="formats"in t&&"function"==typeof t.formats?t.formats():{};s.push({child:t,offset:e,length:n,indent:r.indent||0,type:r.list})})),p(s,-1,[])}const r=[];if(t.children.forEachAt(e,n,((t,e,n)=>{r.push(g(t,e,n))})),s||"list"===t.statics.blotName)return r.join("");const{outerHTML:i,innerHTML:o}=t.domNode,[l,a]=i.split(`>${o}<`);return"<table"===l?`<table style="border: 1px solid #000;">${r.join("")}<${a}`:`${l}>${r.join("")}<${a}`}return t.domNode instanceof Element?t.domNode.outerHTML:""}function m(t,e){return Object.keys(e).reduce(((n,s)=>{if(null==t[s])return n;const r=e[s];return r===t[s]?n[s]=r:Array.isArray(r)?r.indexOf(t[s])<0?n[s]=r.concat([t[s]]):n[s]=r:n[s]=[r,t[s]],n}),{})}function b(t){const e="ordered"===t?"ol":"ul";switch(t){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function y(t){return t.reduce(((t,e)=>{if("string"==typeof e.insert){const n=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(n,e.attributes)}return t.push(e)}),new i)}function v(t,e){let{index:n,length:s}=t;return new d.Q(n+e,s)}const A=class{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let e=this.scroll.length();this.scroll.batchStart();const n=y(t),o=new i;return function(t){const e=[];return t.forEach((t=>{if("string"==typeof t.insert){t.insert.split("\n").forEach(((n,s)=>{s&&e.push({insert:"\n",attributes:t.attributes}),n&&e.push({insert:n,attributes:t.attributes})}))}else e.push(t)})),e}(n.ops.slice()).reduce(((t,n)=>{const l=i.Op.length(n);let c=n.attributes||{},u=!1,d=!1;if(null!=n.insert){if(o.retain(l),"string"==typeof n.insert){const o=n.insert;d=!o.endsWith("\n")&&(e<=t||!!this.scroll.descendant(a.zo,t)[0]),this.scroll.insertAt(t,o);const[l,u]=this.scroll.line(t);let h=(0,s.A)({},(0,a.Ji)(l));if(l instanceof a.Ay){const[t]=l.descendant(r.LeafBlot,u);t&&(h=(0,s.A)(h,(0,a.Ji)(t)))}c=i.AttributeMap.diff(h,c)||{}}else if("object"==typeof n.insert){const o=Object.keys(n.insert)[0];if(null==o)return t;const l=null!=this.scroll.query(o,r.Scope.INLINE);if(l)(e<=t||this.scroll.descendant(a.zo,t)[0])&&(d=!0);else if(t>0){const[e,n]=this.scroll.descendant(r.LeafBlot,t-1);if(e instanceof h.A){"\n"!==e.value()[n]&&(u=!0)}else e instanceof r.EmbedBlot&&e.statics.scope===r.Scope.INLINE_BLOT&&(u=!0)}if(this.scroll.insertAt(t,o,n.insert[o]),l){const[e]=this.scroll.descendant(r.LeafBlot,t);if(e){const t=(0,s.A)({},(0,a.Ji)(e));c=i.AttributeMap.diff(t,c)||{}}}}e+=l}else if(o.push(n),null!==n.retain&&"object"==typeof n.retain){const e=Object.keys(n.retain)[0];if(null==e)return t;this.scroll.updateEmbedAt(t,e,n.retain[e])}Object.keys(c).forEach((e=>{this.scroll.formatAt(t,l,e,c[e])}));const f=u?1:0,p=d?1:0;return e+=f+p,o.retain(f),o.delete(p),t+l+f+p}),0),o.reduce(((t,e)=>"number"==typeof e.delete?(this.scroll.deleteAt(t,e.delete),t):t+i.Op.length(e)),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update((new i).retain(t).delete(e))}formatLine(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach((s=>{this.scroll.lines(t,Math.max(e,1)).forEach((t=>{t.format(s,n[s])}))})),this.scroll.optimize();const s=(new i).retain(t).retain(e,(0,o.A)(n));return this.update(s)}formatText(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(n).forEach((s=>{this.scroll.formatAt(t,e,s,n[s])}));const s=(new i).retain(t).retain(e,(0,o.A)(n));return this.update(s)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce(((t,e)=>t.concat(e.delta())),new i)}getFormat(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],s=[];0===e?this.scroll.path(t).forEach((t=>{const[e]=t;e instanceof a.Ay?n.push(e):e instanceof r.LeafBlot&&s.push(e)})):(n=this.scroll.lines(t,e),s=this.scroll.descendants(r.LeafBlot,t,e));const[i,o]=[n,s].map((t=>{const e=t.shift();if(null==e)return{};let n=(0,a.Ji)(e);for(;Object.keys(n).length>0;){const e=t.shift();if(null==e)return n;n=m((0,a.Ji)(e),n)}return n}));return{...i,...o}}getHTML(t,e){const[n,s]=this.scroll.line(t);if(n){const r=n.length();return!(n.length()>=s+e)||0===s&&e===r?g(this.scroll,t,e,!0):g(n,s,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter((t=>"string"==typeof t.insert)).map((t=>t.insert)).join("")}insertContents(t,e){const n=y(e),s=(new i).retain(t).concat(n);return this.scroll.insertContents(t,n),this.update(s)}insertEmbed(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new i).retain(t).insert({[e]:n}))}insertText(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(n).forEach((s=>{this.scroll.formatAt(t,e.length,s,n[s])})),this.update((new i).retain(t).insert(e,(0,o.A)(n)))}isBlank(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if(t?.statics.blotName!==a.Ay.blotName)return!1;const e=t;return!(e.children.length>1)&&e.children.head instanceof c.A}removeFormat(t,e){const n=this.getText(t,e),[s,r]=this.scroll.line(t+e);let o=0,l=new i;null!=s&&(o=s.length()-r,l=s.delta().slice(r,r+o-1).insert("\n"));const a=this.getContents(t,e+o).diff((new i).insert(n).concat(l)),c=(new i).retain(t).concat(a);return this.applyDelta(c)}update(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const s=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(f)&&this.scroll.find(e[0].target)){const r=this.scroll.find(e[0].target),o=(0,a.Ji)(r),l=r.offset(this.scroll),c=e[0].oldValue.replace(u.A.CONTENTS,""),h=(new i).insert(c),d=(new i).insert(r.value()),f=n&&{oldRange:v(n.oldRange,-l),newRange:v(n.newRange,-l)};t=(new i).retain(l).concat(h.diff(d,f)).reduce(((t,e)=>e.insert?t.insert(e.insert,o):t.push(e)),new i),this.delta=s.compose(t)}else this.delta=this.getDelta(),t&&(0,l.A)(s.compose(t),this.delta)||(t=s.diff(this.delta,n));return t}};var x=n(6582),N=n(513),E=n(5437),w=n(2365),q=n(3341);const k=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){const e=t.target instanceof Node?this.scroll.find(t.target,!0):null;!e||e instanceof q.A||(this.emitter.emit(x.A.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(x.A.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(x.A.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(x.A.events.COMPOSITION_END,t),this.isComposing=!1}};var _=n(5468);const L=t=>{const e=t.getBoundingClientRect(),n="offsetWidth"in t&&Math.abs(e.width)/t.offsetWidth||1,s="offsetHeight"in t&&Math.abs(e.height)/t.offsetHeight||1;return{top:e.top,right:e.left+t.clientWidth*n,bottom:e.top+t.clientHeight*s,left:e.left}},S=t=>{const e=parseInt(t,10);return Number.isNaN(e)?0:e},O=(t,e,n,s,r,i)=>t<n&&e>s?0:t<n?-(n-t+r):e>s?e-t>s-n?t+r-n:e-s+i:0,T=(t,e)=>{const n=t.ownerDocument;let s=e,r=t;for(;r;){const t=r===n.body,e=t?{top:0,right:window.visualViewport?.width??n.documentElement.clientWidth,bottom:window.visualViewport?.height??n.documentElement.clientHeight,left:0}:L(r),o=getComputedStyle(r),l=O(s.left,s.right,e.left,e.right,S(o.scrollPaddingLeft),S(o.scrollPaddingRight)),a=O(s.top,s.bottom,e.top,e.bottom,S(o.scrollPaddingTop),S(o.scrollPaddingBottom));if(l||a)if(t)n.defaultView?.scrollBy(l,a);else{const{scrollLeft:t,scrollTop:e}=r;a&&(r.scrollTop+=a),l&&(r.scrollLeft+=l);const n=r.scrollLeft-t,i=r.scrollTop-e;s={left:s.left-n,top:s.top-i,right:s.right-n,bottom:s.bottom-i}}r=t||"fixed"===o.position?null:(i=r).parentElement||i.getRootNode().host||null}var i},j=["block","break","cursor","inline","scroll","text"],C=(t,e,n)=>{const s=new r.Registry;return j.forEach((t=>{const n=e.query(t);n&&s.register(n)})),t.forEach((t=>{let r=e.query(t);r||n.error(`Cannot register "${t}" specified in "formats" config. Are you sure it was registered?`);let i=0;for(;r;)if(s.register(r),r="blotName"in r?r.requiredContainer??null:null,i+=1,i>100){n.error(`Cycle detected in registering blot requiredContainer: "${t}"`);break}})),s},R=(0,E.A)("quill"),I=new r.Registry;r.ParentBlot.uiClass="ql-ui";class B{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:I,theme:"default"};static events=x.A.events;static sources=x.A.sources;static version="2.0.1";static imports={delta:i,parchment:r,"core/module":w.A,"core/theme":_.A};static debug(t){!0===t&&(t="log"),E.A.level(t)}static find(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return N.A.get(t)||I.find(t,e)}static import(t){return null==this.imports[t]&&R.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){const n="attrName"in t?t.attrName:t.blotName;"string"==typeof n?this.register(`formats/${n}`,t,e):Object.keys(t).forEach((n=>{this.register(n,t[n],e)}))}else null==this.imports[t]||n||R.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&"boolean"!=typeof e&&"abstract"!==e.blotName&&I.register(e),"function"==typeof e.register&&e.register(I)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.options=function(t,e){const n=M(t);if(!n)throw new Error("Invalid Quill container");const r=!e.theme||e.theme===B.DEFAULTS.theme,i=r?_.A:B.import(`themes/${e.theme}`);if(!i)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:o,...l}=B.DEFAULTS,{modules:a,...c}=i.DEFAULTS;let u=U(e.modules);null!=u&&u.toolbar&&u.toolbar.constructor!==Object&&(u={...u,toolbar:{container:u.toolbar}});const h=(0,s.A)({},U(o),U(a),u),d={...l,...D(c),...D(e)};let f=e.registry;f?e.formats&&R.warn('Ignoring "formats" option because "registry" is specified'):f=e.formats?C(e.formats,d.registry,R):d.registry;return{...d,registry:f,container:n,theme:i,modules:Object.entries(h).reduce(((t,e)=>{let[n,r]=e;if(!r)return t;const i=B.import(`modules/${n}`);return null==i?(R.error(`Cannot load ${n} module. Are you sure you registered it?`),t):{...t,[n]:(0,s.A)({},i.DEFAULTS||{},r)}}),{}),bounds:M(d.bounds)}}(t,e),this.container=this.options.container,null==this.container)return void R.error("Invalid Quill container",t);this.options.debug&&B.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",N.A.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new x.A;const o=r.ScrollBlot.blotName,l=this.options.registry.query(o);if(!l||!("blotName"in l))throw new Error(`Cannot initialize Quill without "${o}" blot`);if(this.scroll=new l(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new A(this.scroll),this.selection=new d.A(this.scroll,this.emitter),this.composition=new k(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.A.events.EDITOR_CHANGE,(t=>{t===x.A.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())})),this.emitter.on(x.A.events.SCROLL_UPDATE,((t,e)=>{const n=this.selection.lastRange,[s]=this.selection.getRange(),r=n&&s?{oldRange:n,newRange:s}:void 0;P.call(this,(()=>this.editor.update(null,e,r)),t)})),this.emitter.on(x.A.events.SCROLL_EMBED_UPDATE,((t,e)=>{const n=this.selection.lastRange,[s]=this.selection.getRange(),r=n&&s?{oldRange:n,newRange:s}:void 0;P.call(this,(()=>{const n=(new i).retain(t.offset(this)).retain({[t.statics.blotName]:e});return this.editor.update(n,[],r)}),B.sources.USER)})),n){const t=this.clipboard.convert({html:`${n}<p><br></p>`,text:"\n"});this.setContents(t)}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&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){const e=t;(t=document.createElement("div")).classList.add(e)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,n){return[t,e,,n]=z(t,e,n),P.call(this,(()=>this.editor.deleteText(t,e)),n,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x.A.sources.API;return P.call(this,(()=>{const n=this.getSelection(!0);let s=new i;if(null==n)return s;if(this.scroll.query(t,r.Scope.BLOCK))s=this.editor.formatLine(n.index,n.length,{[t]:e});else{if(0===n.length)return this.selection.format(t,e),s;s=this.editor.formatText(n.index,n.length,{[t]:e})}return this.setSelection(n,x.A.sources.SILENT),s}),n)}formatLine(t,e,n,s,r){let i;return[t,e,i,r]=z(t,e,n,s,r),P.call(this,(()=>this.editor.formatLine(t,e,i)),r,t,0)}formatText(t,e,n,s,r){let i;return[t,e,i,r]=z(t,e,n,s,r),P.call(this,(()=>this.editor.formatText(t,e,i)),r,t,0)}getBounds(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=null;if(n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length),!n)return null;const s=this.container.getBoundingClientRect();return{bottom:n.bottom-s.top,height:n.height,left:n.left-s.left,right:n.right-s.left,top:n.top-s.top,width:n.width}}getContents(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t;return[t,e]=z(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?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&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return"number"==typeof t&&(e=e??this.getLength()-t),[t,e]=z(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return"number"==typeof t&&(e=e??this.getLength()-t),[t,e]=z(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:B.sources.API;return P.call(this,(()=>this.editor.insertEmbed(t,e,n)),s,t)}insertText(t,e,n,s,r){let i;return[t,,i,r]=z(t,0,n,s,r),P.call(this,(()=>this.editor.insertText(t,e,i)),r,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,n){return[t,e,,n]=z(t,e,n),P.call(this,(()=>this.editor.removeFormat(t,e)),n,t)}scrollRectIntoView(t){T(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(){const t=this.selection.lastRange,e=t&&this.selection.getBounds(t.index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.A.sources.API;return P.call(this,(()=>{t=new i(t);const e=this.getLength(),n=this.editor.deleteText(0,e),s=this.editor.insertContents(0,t),r=this.editor.deleteText(this.getLength()-1,1);return n.compose(s).compose(r)}),e)}setSelection(t,e,n){null==t?this.selection.setRange(null,e||B.sources.API):([t,e,,n]=z(t,e,n),this.selection.setRange(new d.Q(Math.max(0,t),e),n),n!==x.A.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.A.sources.API;const n=(new i).insert(t);return this.setContents(n,e)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x.A.sources.USER;const e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.A.sources.API;return P.call(this,(()=>(t=new i(t),this.editor.applyDelta(t))),e,!0)}}function M(t){return"string"==typeof t?document.querySelector(t):t}function U(t){return Object.entries(t??{}).reduce(((t,e)=>{let[n,s]=e;return{...t,[n]:!0===s?{}:s}}),{})}function D(t){return Object.fromEntries(Object.entries(t).filter((t=>void 0!==t[1])))}function P(t,e,n,s){if(!this.isEnabled()&&e===x.A.sources.USER&&!this.allowReadOnlyEdits)return new i;let r=null==n?null:this.getSelection();const o=this.editor.delta,l=t();if(null!=r&&(!0===n&&(n=r.index),null==s?r=F(r,l,e):0!==s&&(r=F(r,n,s,e)),this.setSelection(r,x.A.sources.SILENT)),l.length()>0){const t=[x.A.events.TEXT_CHANGE,l,o,e];this.emitter.emit(x.A.events.EDITOR_CHANGE,...t),e!==x.A.sources.SILENT&&this.emitter.emit(...t)}return l}function z(t,e,n,s,r){let i={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(r=s,s=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(r=s,s=n,n=e,e=0),"object"==typeof n?(i=n,r=s):"string"==typeof n&&(null!=s?i[n]=s:r=n),[t,e,i,r=r||x.A.sources.API]}function F(t,e,n,s){const r="number"==typeof n?n:0;if(null==t)return null;let i,o;return e&&"function"==typeof e.transformPosition?[i,o]=[t.index,t.index+t.length].map((t=>e.transformPosition(t,s!==x.A.sources.USER))):[i,o]=[t.index,t.index+t.length].map((t=>t<e||t===e&&s===x.A.sources.USER?t:r>=0?t+r:Math.max(e,t+r))),new d.Q(i,o-i)}},7951:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,Q:()=>a});var s=n(1349),r=n(6734),i=n(532),o=n(6582);const l=(0,n(5437).A)("quill:selection");class a{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.index=t,this.length=e}}function c(t,e){try{e.parentNode}catch(t){return!1}return t.contains(e)}const u=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 a(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,o.A.sources.USER),1)})),this.emitter.on(o.A.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;const t=this.getNativeRange();null!=t&&t.start.node!==this.cursor.textNode&&this.emitter.once(o.A.events.SCROLL_UPDATE,((e,n)=>{try{this.root.contains(t.start.node)&&this.root.contains(t.end.node)&&this.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset);const s=n.some((t=>"characterData"===t.type||"childList"===t.type||"attributes"===t.type&&t.target===this.root));this.update(s?o.A.sources.SILENT:e)}catch(t){}}))})),this.emitter.on(o.A.events.SCROLL_OPTIMIZE,((t,e)=>{if(e.range){const{startNode:t,startOffset:n,endNode:s,endOffset:r}=e.range;this.setNativeRange(t,n,s,r),this.update(o.A.sources.SILENT)}})),this.update(o.A.sources.SILENT)}handleComposition(){this.emitter.on(o.A.events.COMPOSITION_BEFORE_START,(()=>{this.composing=!0})),this.emitter.on(o.A.events.COMPOSITION_END,(()=>{if(this.composing=!1,this.cursor.parent){const 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(o.A.sources.USER)}))}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,e){this.scroll.update();const n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!this.scroll.query(t,s.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){const t=this.scroll.find(n.start.node,!1);if(null==t)return;if(t instanceof s.LeafBlot){const e=t.split(n.start.offset);t.parent.insertBefore(this.cursor,e)}else t.insertBefore(this.cursor,n.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&&void 0!==arguments[1]?arguments[1]:0;const n=this.scroll.length();let s;t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;let[r,i]=this.scroll.leaf(t);if(null==r)return null;if(e>0&&i===r.length()){const[e]=this.scroll.leaf(t+1);if(e){const[n]=this.scroll.line(t),[s]=this.scroll.line(t+1);n===s&&(r=e,i=0)}}[s,i]=r.position(i,!0);const o=document.createRange();if(e>0)return o.setStart(s,i),[r,i]=this.scroll.leaf(t+e),null==r?null:([s,i]=r.position(i,!0),o.setEnd(s,i),o.getBoundingClientRect());let l,a="left";if(s instanceof Text){if(!s.data.length)return null;i<s.data.length?(o.setStart(s,i),o.setEnd(s,i+1)):(o.setStart(s,i-1),o.setEnd(s,i),a="right"),l=o.getBoundingClientRect()}else{if(!(r.domNode instanceof Element))return null;l=r.domNode.getBoundingClientRect(),i>0&&(a="right")}return{bottom:l.top+l.height,height:l.height,left:l[a],right:l[a],top:l.top,width:0}}getNativeRange(){const t=document.getSelection();if(null==t||t.rangeCount<=0)return null;const e=t.getRangeAt(0);if(null==e)return null;const n=this.normalizeNative(e);return l.info("getNativeRange",n),n}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const e=this.getNativeRange();if(null==e)return[null,null];return[this.normalizedToRange(e),e]}hasFocus(){return document.activeElement===this.root||null!=document.activeElement&&c(this.root,document.activeElement)}normalizedToRange(t){const e=[[t.start.node,t.start.offset]];t.native.collapsed||e.push([t.end.node,t.end.offset]);const n=e.map((t=>{const[e,n]=t,r=this.scroll.find(e,!0),i=r.offset(this.scroll);return 0===n?i:r instanceof s.LeafBlot?i+r.index(e,n):i+r.length()})),r=Math.min(Math.max(...n),this.scroll.length()-1),i=Math.min(r,...n);return new a(i,r-i)}normalizeNative(t){if(!c(this.root,t.startContainer)||!t.collapsed&&!c(this.root,t.endContainer))return null;const e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((t=>{let{node:e,offset:n}=t;for(;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;e=e.lastChild,n=e instanceof Text?e.data.length:e.childNodes.length>0?e.childNodes.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}rangeToNative(t){const e=this.scroll.length(),n=(t,n)=>{t=Math.min(e-1,t);const[s,r]=this.scroll.leaf(t);return s?s.position(r,n):[null,-1]};return[...n(t.index,!1),...n(t.index+t.length,!0)]}setNativeRange(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(l.info("setNativeRange",t,e,n,s),null!=t&&(null==this.root.parentNode||null==t.parentNode||null==n.parentNode))return;const i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:o}=this.getNativeRange()||{};if(null==o||r||t!==o.startContainer||e!==o.startOffset||n!==o.endContainer||s!==o.endOffset){t instanceof Element&&"BR"===t.tagName&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),n instanceof Element&&"BR"===n.tagName&&(s=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);const r=document.createRange();r.setStart(t,e),r.setEnd(n,s),i.removeAllRanges(),i.addRange(r)}}else i.removeAllRanges(),this.root.blur()}setRange(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.A.sources.API;if("string"==typeof e&&(n=e,e=!1),l.info("setRange",t),null!=t){const n=this.rangeToNative(t);this.setNativeRange(...n,e)}else this.setNativeRange(null);this.update(n)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.A.sources.USER;const e=this.lastRange,[n,s]=this.getRange();if(this.lastRange=n,this.lastNative=s,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,r.A)(e,this.lastRange)){if(!this.composing&&null!=s&&s.native.collapsed&&s.start.node!==this.cursor.textNode){const t=this.cursor.restore();t&&this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}const n=[o.A.events.SELECTION_CHANGE,(0,i.A)(this.lastRange),(0,i.A)(e),t];this.emitter.emit(o.A.events.EDITOR_CHANGE,...n),t!==o.A.sources.SILENT&&this.emitter.emit(...n)}}}},5468:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});class s{static DEFAULTS={modules:{}};static themes={default:s};modules={};constructor(t,e){this.quill=t,this.options=e}init(){Object.keys(this.options.modules).forEach((t=>{null==this.modules[t]&&this.addModule(t)}))}addModule(t){const e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}const r=s},3703:(t,e,n)=>{"use strict";n.d(e,{Hu:()=>l,gS:()=>i,qh:()=>o});var s=n(1349);const r={scope:s.Scope.BLOCK,whitelist:["right","center","justify"]},i=new s.Attributor("align","align",r),o=new s.ClassAttributor("align","ql-align",r),l=new s.StyleAttributor("align","text-align",r)},5876:(t,e,n)=>{"use strict";n.d(e,{l:()=>i,s:()=>o});var s=n(1349),r=n(725);const i=new s.ClassAttributor("background","ql-bg",{scope:s.Scope.INLINE}),o=new r.a2("background","background-color",{scope:s.Scope.INLINE})},4597:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,Cy:()=>d,EJ:()=>u});var s=n(9065),r=n(2587),i=n(2928),o=n(8879),l=n(1389),a=n(9339),c=n(8317);class u extends a.A{static create(t){const e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map((t=>t.length()<=1?"":t.domNode.innerText)).join("\n").slice(t,t+e)}html(t,e){return`<pre>\n${(0,l.X)(this.code(t,e))}\n</pre>`}}class h extends s.Ay{static TAB=" ";static register(){c.Ay.register(u)}}class d extends o.A{}d.blotName="code",d.tagName="CODE",h.blotName="code-block",h.className="ql-code-block",h.tagName="DIV",u.blotName="code-block-container",u.className="ql-code-block-container",u.tagName="DIV",u.allowedChildren=[h],h.allowedChildren=[l.A,r.A,i.A],h.requiredContainer=u},725:(t,e,n)=>{"use strict";n.d(e,{JM:()=>o,a2:()=>r,g3:()=>i});var s=n(1349);class r extends s.StyleAttributor{value(t){let e=super.value(t);if(!e.startsWith("rgb("))return e;e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"");return`#${e.split(",").map((t=>`00${parseInt(t,10).toString(16)}`.slice(-2))).join("")}`}}const i=new s.ClassAttributor("color","ql-color",{scope:s.Scope.INLINE}),o=new r("color","color",{scope:s.Scope.INLINE})},8435:(t,e,n)=>{"use strict";n.d(e,{Mc:()=>i,VL:()=>l,sY:()=>o});var s=n(1349);const r={scope:s.Scope.BLOCK,whitelist:["rtl"]},i=new s.Attributor("direction","dir",r),o=new s.ClassAttributor("direction","ql-direction",r),l=new s.StyleAttributor("direction","direction",r)},5693:(t,e,n)=>{"use strict";n.d(e,{q:()=>i,z:()=>l});var s=n(1349);const r={scope:s.Scope.INLINE,whitelist:["serif","monospace"]},i=new s.ClassAttributor("font","ql-font",r);class o extends s.StyleAttributor{value(t){return super.value(t).replace(/["']/g,"")}}const l=new o("font","font-family",r)},2084:(t,e,n)=>{"use strict";n.d(e,{A:()=>r,a:()=>i});var s=n(8879);class r extends s.A{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(t){const e=super.create(t);return e.setAttribute("href",this.sanitize(t)),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"),e}static formats(t){return t.getAttribute("href")}static sanitize(t){return i(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("href",this.constructor.sanitize(e)):super.format(t,e)}}function i(t,e){const n=document.createElement("a");n.href=t;const s=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(s)>-1}},429:(t,e,n)=>{"use strict";n.d(e,{U:()=>r,r:()=>i});var s=n(1349);const r=new s.ClassAttributor("size","ql-size",{scope:s.Scope.INLINE,whitelist:["small","large","huge"]}),i=new s.StyleAttributor("size","font-size",{scope:s.Scope.INLINE,whitelist:["10px","18px","32px"]})},5357:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>O,hV:()=>B});var s=n(1349),r=n(2660),i=n(9065),o=n(5437),l=n(2365),a=n(8317),c=n(3703),u=n(5876),h=n(4597),d=n(725),f=n(8435),p=n(5693),g=n(429),m=n(3510);const b=/font-weight:\s*normal/,y=["P","OL","UL"],v=t=>t&&y.includes(t.tagName);const A=/\bmso-list:[^;]*ignore/i,x=/\bmso-list:[^;]*\bl(\d+)/i,N=/\bmso-list:[^;]*\blevel(\d+)/i,E=t=>{const e=Array.from(t.querySelectorAll("[style*=mso-list]")),n=[],s=[];e.forEach((t=>{(t.getAttribute("style")||"").match(A)?n.push(t):s.push(t)})),n.forEach((t=>t.parentNode?.removeChild(t)));const r=t.documentElement.innerHTML,i=s.map((t=>((t,e)=>{const n=t.getAttribute("style"),s=n?.match(x);if(!s)return null;const r=Number(s[1]),i=n?.match(N),o=i?Number(i[1]):1,l=new RegExp(`@list l${r}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),a=e.match(l);return{id:r,indent:o,type:a&&"bullet"===a[1]?"bullet":"ordered",element:t}})(t,r))).filter((t=>t));for(;i.length;){const t=[];let e=i.shift();for(;e;)t.push(e),e=i.length&&i[0]?.element===e.element.nextElementSibling&&i[0].id===e.id?i.shift():null;const n=document.createElement("ul");t.forEach((t=>{const e=document.createElement("li");e.setAttribute("data-list",t.type),t.indent>1&&e.setAttribute("class","ql-indent-"+(t.indent-1)),e.innerHTML=t.element.innerHTML,n.appendChild(e)}));const s=t[0]?.element,{parentNode:r}=s??{};s&&r?.replaceChild(n,s),t.slice(1).forEach((t=>{let{element:e}=t;r?.removeChild(e)}))}};const w=[function(t){"urn:schemas-microsoft-com:office:word"===t.documentElement.getAttribute("xmlns:w")&&E(t)},function(t){t.querySelector('[id^="docs-internal-guid-"]')&&((t=>{Array.from(t.querySelectorAll('b[style*="font-weight"]')).filter((t=>t.getAttribute("style")?.match(b))).forEach((e=>{const n=t.createDocumentFragment();n.append(...e.childNodes),e.parentNode?.replaceChild(n,e)}))})(t),(t=>{Array.from(t.querySelectorAll("br")).filter((t=>v(t.previousElementSibling)&&v(t.nextElementSibling))).forEach((t=>{t.parentNode?.removeChild(t)}))})(t))}],q=t=>{t.documentElement&&w.forEach((e=>{e(t)}))},k=(0,o.A)("quill:clipboard"),_=[[Node.TEXT_NODE,function(t,e,n){let s=t.data;if("O:P"===t.parentElement?.tagName)return e.insert(s.trim());if(!I(t)){if(0===s.trim().length&&s.includes("\n")&&!function(t,e){return t.previousElementSibling&&t.nextElementSibling&&!C(t.previousElementSibling,e)&&!C(t.nextElementSibling,e)}(t,n))return e;const r=(t,e)=>{const n=e.replace(/[^\u00a0]/g,"");return n.length<1&&t?" ":n};s=s.replace(/\r\n/g," ").replace(/\n/g," "),s=s.replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&null!=t.parentElement&&C(t.parentElement,n)||t.previousSibling instanceof Element&&C(t.previousSibling,n))&&(s=s.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&null!=t.parentElement&&C(t.parentElement,n)||t.nextSibling instanceof Element&&C(t.nextSibling,n))&&(s=s.replace(/\s+$/,r.bind(r,!1)))}return e.insert(s)}],[Node.TEXT_NODE,U],["br",function(t,e){j(e,"\n")||e.insert("\n");return e}],[Node.ELEMENT_NODE,U],[Node.ELEMENT_NODE,function(t,e,n){const i=n.query(t);if(null==i)return e;if(i.prototype instanceof s.EmbedBlot){const e={},s=i.value(t);if(null!=s)return e[i.blotName]=s,(new r).insert(e,i.formats(t,n))}else if(i.prototype instanceof s.BlockBlot&&!j(e,"\n")&&e.insert("\n"),"blotName"in i&&"formats"in i&&"function"==typeof i.formats)return T(e,i.blotName,i.formats(t,n),n);return e}],[Node.ELEMENT_NODE,function(t,e,n){const r=s.Attributor.keys(t),i=s.ClassAttributor.keys(t),o=s.StyleAttributor.keys(t),l={};return r.concat(i).concat(o).forEach((e=>{let r=n.query(e,s.Scope.ATTRIBUTE);null!=r&&(l[r.attrName]=r.value(t),l[r.attrName])||(r=L[e],null==r||r.attrName!==e&&r.keyName!==e||(l[r.attrName]=r.value(t)||void 0),r=S[e],null==r||r.attrName!==e&&r.keyName!==e||(r=S[e],l[r.attrName]=r.value(t)||void 0))})),Object.entries(l).reduce(((t,e)=>{let[s,r]=e;return T(t,s,r,n)}),e)}],[Node.ELEMENT_NODE,function(t,e,n){const s={},i=t.style||{};"italic"===i.fontStyle&&(s.italic=!0);"underline"===i.textDecoration&&(s.underline=!0);"line-through"===i.textDecoration&&(s.strike=!0);(i.fontWeight?.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(s.bold=!0);if(e=Object.entries(s).reduce(((t,e)=>{let[s,r]=e;return T(t,s,r,n)}),e),parseFloat(i.textIndent||0)>0)return(new r).insert("\t").concat(e);return e}],["li",function(t,e,n){const s=n.query(t);if(null==s||"list"!==s.blotName||!j(e,"\n"))return e;let i=-1,o=t.parentNode;for(;null!=o;)["OL","UL"].includes(o.tagName)&&(i+=1),o=o.parentNode;return i<=0?e:e.reduce(((t,e)=>e.insert?e.attributes&&"number"==typeof e.attributes.indent?t.push(e):t.insert(e.insert,{indent:i,...e.attributes||{}}):t),new r)}],["ol, ul",function(t,e,n){const s=t;let r="OL"===s.tagName?"ordered":"bullet";const i=s.getAttribute("data-checked");i&&(r="true"===i?"checked":"unchecked");return T(e,"list",r,n)}],["pre",function(t,e,n){const s=n.query("code-block"),r=!s||!("formats"in s)||"function"!=typeof s.formats||s.formats(t,n);return T(e,"code-block",r,n)}],["tr",function(t,e,n){const s="TABLE"===t.parentElement?.tagName?t.parentElement:t.parentElement?.parentElement;if(null!=s){return T(e,"table",Array.from(s.querySelectorAll("tr")).indexOf(t)+1,n)}return e}],["b",M("bold")],["i",M("italic")],["strike",M("strike")],["style",function(){return new r}]],L=[c.gS,f.Mc].reduce(((t,e)=>(t[e.keyName]=e,t)),{}),S=[c.Hu,u.s,d.JM,f.VL,p.z,g.r].reduce(((t,e)=>(t[e.keyName]=e,t)),{});class O extends l.A{static DEFAULTS={matchers:[]};constructor(t,e){super(t,e),this.quill.root.addEventListener("copy",(t=>this.onCaptureCopy(t,!1))),this.quill.root.addEventListener("cut",(t=>this.onCaptureCopy(t,!0))),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],_.concat(this.options.matchers??[]).forEach((t=>{let[e,n]=t;this.addMatcher(e,n)}))}addMatcher(t,e){this.matchers.push([t,e])}convert(t){let{html:e,text:n}=t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(s[h.Ay.blotName])return(new r).insert(n||"",{[h.Ay.blotName]:s[h.Ay.blotName]});if(!e)return(new r).insert(n||"",s);const i=this.convertHTML(e);return j(i,"\n")&&(null==i.ops[i.ops.length-1].attributes||s.table)?i.compose((new r).retain(i.length()-1).delete(1)):i}normalizeHTML(t){q(t)}convertHTML(t){const e=(new DOMParser).parseFromString(t,"text/html");this.normalizeHTML(e);const n=e.body,s=new WeakMap,[r,i]=this.prepareMatching(n,s);return B(this.quill.scroll,n,r,i,s)}dangerouslyPasteHTML(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.Ay.sources.API;if("string"==typeof t){const n=this.convert({html:t,text:""});this.quill.setContents(n,e),this.quill.setSelection(0,a.Ay.sources.SILENT)}else{const s=this.convert({html:e,text:""});this.quill.updateContents((new r).retain(t).concat(s),n),this.quill.setSelection(t+s.length(),a.Ay.sources.SILENT)}}onCaptureCopy(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.defaultPrevented)return;t.preventDefault();const[n]=this.quill.selection.getRange();if(null==n)return;const{html:s,text:r}=this.onCopy(n,e);t.clipboardData?.setData("text/plain",r),t.clipboardData?.setData("text/html",s),e&&(0,m.Xo)({range:n,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter((t=>"#"!==t[0])).join("\n")}onCapturePaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const e=this.quill.getSelection(!0);if(null==e)return;const n=t.clipboardData?.getData("text/html");let s=t.clipboardData?.getData("text/plain");if(!n&&!s){const e=t.clipboardData?.getData("text/uri-list");e&&(s=this.normalizeURIList(e))}const r=Array.from(t.clipboardData?.files||[]);if(!n&&r.length>0)this.quill.uploader.upload(e,r);else{if(n&&r.length>0){const t=(new DOMParser).parseFromString(n,"text/html");if(1===t.body.childElementCount&&"IMG"===t.body.firstElementChild?.tagName)return void this.quill.uploader.upload(e,r)}this.onPaste(e,{html:n,text:s})}}onCopy(t){const e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}onPaste(t,e){let{text:n,html:s}=e;const i=this.quill.getFormat(t.index),o=this.convert({text:n,html:s},i);k.log("onPaste",o,{text:n,html:s});const l=(new r).retain(t.index).delete(t.length).concat(o);this.quill.updateContents(l,a.Ay.sources.USER),this.quill.setSelection(l.length()-t.length,a.Ay.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const n=[],s=[];return this.matchers.forEach((r=>{const[i,o]=r;switch(i){case Node.TEXT_NODE:s.push(o);break;case Node.ELEMENT_NODE:n.push(o);break;default:Array.from(t.querySelectorAll(i)).forEach((t=>{if(e.has(t)){const n=e.get(t);n?.push(o)}else e.set(t,[o])}))}})),[n,s]}}function T(t,e,n,s){return s.query(e)?t.reduce(((t,s)=>{if(!s.insert)return t;if(s.attributes&&s.attributes[e])return t.push(s);const r=n?{[e]:n}:{};return t.insert(s.insert,{...r,...s.attributes})}),new r):t}function j(t,e){let n="";for(let s=t.ops.length-1;s>=0&&n.length<e.length;--s){const e=t.ops[s];if("string"!=typeof e.insert)break;n=e.insert+n}return n.slice(-1*e.length)===e}function C(t,e){if(!(t instanceof Element))return!1;const n=e.query(t);return!(n&&n.prototype instanceof s.EmbedBlot)&&["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(t.tagName.toLowerCase())}const R=new WeakMap;function I(t){return null!=t&&(R.has(t)||("PRE"===t.tagName?R.set(t,!0):R.set(t,I(t.parentNode))),R.get(t))}function B(t,e,n,s,i){return e.nodeType===e.TEXT_NODE?s.reduce(((n,s)=>s(e,n,t)),new r):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce(((r,o)=>{let l=B(t,o,n,s,i);return o.nodeType===e.ELEMENT_NODE&&(l=n.reduce(((e,n)=>n(o,e,t)),l),l=(i.get(o)||[]).reduce(((e,n)=>n(o,e,t)),l)),r.concat(l)}),new r):new r}function M(t){return(e,n,s)=>T(n,t,!0,s)}function U(t,e,n){if(!j(e,"\n")){if(C(t,n)&&(t.childNodes.length>0||t instanceof HTMLParagraphElement))return e.insert("\n");if(e.length()>0&&t.nextSibling){let s=t.nextSibling;for(;null!=s;){if(C(s,n))return e.insert("\n");const t=n.query(s);if(t&&t.prototype instanceof i.zo)return e.insert("\n");s=s.firstChild}}}return e}},3510:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>d,Xo:()=>y});var s=n(6734),r=n(532),i=n(2660),o=n(1349),l=n(8317),a=n(5437),c=n(2365);const u=(0,a.A)("quill:keyboard"),h=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class d extends c.A{static match(t,e){return!["altKey","ctrlKey","metaKey","shiftKey"].some((n=>!!e[n]!==t[n]&&null!==e[n]))&&(e.key===t.key||e.key===t.which)}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach((t=>{this.options.bindings[t]&&this.addBinding(this.options.bindings[t])})),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&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=function(t){if("string"==typeof t||"number"==typeof t)t={key:t};else{if("object"!=typeof t)return null;t=(0,r.A)(t)}t.shortKey&&(t[h]=t.shortKey,delete t.shortKey);return t}(t);if(null==s)return void u.warn("Attempted to add invalid keyboard binding",s);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n});(Array.isArray(s.key)?s.key:[s.key]).forEach((t=>{const r={...s,key:t,...e,...n};this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}))}listen(){this.quill.root.addEventListener("keydown",(t=>{if(t.defaultPrevented||t.isComposing)return;const e=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter((e=>d.match(t,e)));if(0===e.length)return;const n=l.Ay.find(t.target,!0);if(n&&n.scroll!==this.quill.scroll)return;const r=this.quill.getSelection();if(null==r||!this.quill.hasFocus())return;const[i,a]=this.quill.getLine(r.index),[c,u]=this.quill.getLeaf(r.index),[h,f]=0===r.length?[c,u]:this.quill.getLeaf(r.index+r.length),p=c instanceof o.TextBlot?c.value().slice(0,u):"",g=h instanceof o.TextBlot?h.value().slice(f):"",m={collapsed:0===r.length,empty:0===r.length&&i.length()<=1,format:this.quill.getFormat(r),line:i,offset:a,prefix:p,suffix:g,event:t};e.some((t=>{if(null!=t.collapsed&&t.collapsed!==m.collapsed)return!1;if(null!=t.empty&&t.empty!==m.empty)return!1;if(null!=t.offset&&t.offset!==m.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((t=>null==m.format[t])))return!1}else if("object"==typeof t.format&&!Object.keys(t.format).every((e=>!0===t.format[e]?null!=m.format[e]:!1===t.format[e]?null==m.format[e]:(0,s.A)(t.format[e],m.format[e]))))return!1;return!(null!=t.prefix&&!t.prefix.test(m.prefix))&&(!(null!=t.suffix&&!t.suffix.test(m.suffix))&&!0!==t.handler.call(this,r,m,t))}))&&t.preventDefault()}))}handleBackspace(t,e){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(0===t.index||this.quill.getLength()<=1)return;let s={};const[r]=this.quill.getLine(t.index);let o=(new i).retain(t.index-n).delete(n);if(0===e.offset){const[e]=this.quill.getLine(t.index-1);if(e){if(!("block"===e.statics.blotName&&e.length()<=1)){const e=r.formats(),n=this.quill.getFormat(t.index-1,1);if(s=i.AttributeMap.diff(e,n)||{},Object.keys(s).length>0){const e=(new i).retain(t.index+r.length()-2).retain(1,s);o=o.compose(e)}}}}this.quill.updateContents(o,l.Ay.sources.USER),this.quill.focus()}handleDelete(t,e){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-n)return;let s={};const[r]=this.quill.getLine(t.index);let o=(new i).retain(t.index).delete(n);if(e.offset>=r.length()-1){const[e]=this.quill.getLine(t.index+1);if(e){const n=r.formats(),l=this.quill.getFormat(t.index,1);s=i.AttributeMap.diff(n,l)||{},Object.keys(s).length>0&&(o=o.retain(e.length()-1).retain(1,s))}}this.quill.updateContents(o,l.Ay.sources.USER),this.quill.focus()}handleDeleteRange(t){y({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){const n=Object.keys(e.format).reduce(((t,n)=>(this.quill.scroll.query(n,o.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t)),{}),s=(new i).retain(t.index).delete(t.length).insert("\n",n);this.quill.updateContents(s,l.Ay.sources.USER),this.quill.setSelection(t.index+1,l.Ay.sources.SILENT),this.quill.focus()}}const f={bindings:{bold:m("bold"),italic:m("italic"),underline:m("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","+1",l.Ay.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","-1",l.Ay.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(t,e){null!=e.format.indent?this.quill.format("indent","-1",l.Ay.sources.USER):null!=e.format.list&&this.quill.format("list",!1,l.Ay.sources.USER)}},"indent code-block":p(!0),"outdent code-block":p(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(t){this.quill.deleteText(t.index-1,1,l.Ay.sources.USER)}},tab:{key:"Tab",handler(t,e){if(e.format.table)return!0;this.quill.history.cutoff();const n=(new i).retain(t.index).delete(t.length).insert("\t");return this.quill.updateContents(n,l.Ay.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,l.Ay.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,l.Ay.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(t,e){const n={list:!1};e.format.indent&&(n.indent=!1),this.quill.formatLine(t.index,t.length,n,l.Ay.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(t){const[e,n]=this.quill.getLine(t.index),s={...e.formats(),list:"checked"},r=(new i).retain(t.index).insert("\n",s).retain(e.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(r,l.Ay.sources.USER),this.quill.setSelection(t.index+1,l.Ay.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(t,e){const[n,s]=this.quill.getLine(t.index),r=(new i).retain(t.index).insert("\n",e.format).retain(n.length()-s-1).retain(1,{header:null});this.quill.updateContents(r,l.Ay.sources.USER),this.quill.setSelection(t.index+1,l.Ay.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(t){const e=this.quill.getModule("table");if(e){const[n,s,r,o]=e.getTable(t),a=function(t,e,n,s){if(null==e.prev&&null==e.next)return null==n.prev&&null==n.next?0===s?-1:1:null==n.prev?-1:1;if(null==e.prev)return-1;if(null==e.next)return 1;return null}(0,s,r,o);if(null==a)return;let c=n.offset();if(a<0){const e=(new i).retain(c).insert("\n");this.quill.updateContents(e,l.Ay.sources.USER),this.quill.setSelection(t.index+1,t.length,l.Ay.sources.SILENT)}else if(a>0){c+=n.length();const t=(new i).retain(c).insert("\n");this.quill.updateContents(t,l.Ay.sources.USER),this.quill.setSelection(c,l.Ay.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(t,e){const{event:n,line:s}=e,r=s.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(r-1,l.Ay.sources.USER):this.quill.setSelection(r+s.length(),l.Ay.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(t,e){if(null==this.quill.scroll.query("list"))return!0;const{length:n}=e.prefix,[s,r]=this.quill.getLine(t.index);if(r>n)return!0;let o;switch(e.prefix.trim()){case"[]":case"[ ]":o="unchecked";break;case"[x]":o="checked";break;case"-":case"*":o="bullet";break;default:o="ordered"}this.quill.insertText(t.index," ",l.Ay.sources.USER),this.quill.history.cutoff();const a=(new i).retain(t.index-r).delete(n+1).retain(s.length()-2-r).retain(1,{list:o});return this.quill.updateContents(a,l.Ay.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,l.Ay.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(t){const[e,n]=this.quill.getLine(t.index);let s=2,r=e;for(;null!=r&&r.length()<=1&&r.formats()["code-block"];)if(r=r.prev,s-=1,s<=0){const s=(new i).retain(t.index+e.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(s,l.Ay.sources.USER),this.quill.setSelection(t.index-1,l.Ay.sources.SILENT),!1}return!0}},"embed left":g("ArrowLeft",!1),"embed left shift":g("ArrowLeft",!0),"embed right":g("ArrowRight",!1),"embed right shift":g("ArrowRight",!0),"table down":b(!1),"table up":b(!0)}};function p(t){return{key:"Tab",shiftKey:!t,format:{"code-block":!0},handler(e,n){let{event:s}=n;const r=this.quill.scroll.query("code-block"),{TAB:i}=r;if(0===e.length&&!s.shiftKey)return this.quill.insertText(e.index,i,l.Ay.sources.USER),void this.quill.setSelection(e.index+i.length,l.Ay.sources.SILENT);const o=0===e.length?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:a,length:c}=e;o.forEach(((e,n)=>{t?(e.insertAt(0,i),0===n?a+=i.length:c+=i.length):e.domNode.textContent.startsWith(i)&&(e.deleteAt(0,i.length),0===n?a-=i.length:c-=i.length)})),this.quill.update(l.Ay.sources.USER),this.quill.setSelection(a,c,l.Ay.sources.SILENT)}}}function g(t,e){const n="ArrowLeft"===t?"prefix":"suffix";return{key:t,shiftKey:e,altKey:null,[n]:/^$/,handler(n){let{index:s}=n;"ArrowRight"===t&&(s+=n.length+1);const[r]=this.quill.getLeaf(s);return!(r instanceof o.EmbedBlot)||("ArrowLeft"===t?e?this.quill.setSelection(n.index-1,n.length+1,l.Ay.sources.USER):this.quill.setSelection(n.index-1,l.Ay.sources.USER):e?this.quill.setSelection(n.index,n.length+1,l.Ay.sources.USER):this.quill.setSelection(n.index+n.length+1,l.Ay.sources.USER),!1)}}}function m(t){return{key:t[0],shortKey:!0,handler(e,n){this.quill.format(t,!n.format[t],l.Ay.sources.USER)}}}function b(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,n){const s=t?"prev":"next",r=n.line,i=r.parent[s];if(null!=i){if("table-row"===i.statics.blotName){let t=i.children.head,e=r;for(;null!=e.prev;)e=e.prev,t=t.next;const s=t.offset(this.quill.scroll)+Math.min(n.offset,t.length()-1);this.quill.setSelection(s,0,l.Ay.sources.USER)}}else{const e=r.table()[s];null!=e&&(t?this.quill.setSelection(e.offset(this.quill.scroll)+e.length()-1,0,l.Ay.sources.USER):this.quill.setSelection(e.offset(this.quill.scroll),0,l.Ay.sources.USER))}return!1}}}function y(t){let{quill:e,range:n}=t;const s=e.getLines(n);let r={};if(s.length>1){const t=s[0].formats(),e=s[s.length-1].formats();r=i.AttributeMap.diff(e,t)||{}}e.deleteText(n,l.Ay.sources.USER),Object.keys(r).length>0&&e.formatLine(n.index,1,r,l.Ay.sources.USER),e.setSelection(n.index,l.Ay.sources.SILENT)}d.DEFAULTS=f},3288:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var s=n(2660),r=n(1349),i=n(8317),o=n(5437),l=n(2365);const a=(0,o.A)("quill:toolbar");class c extends l.A{constructor(t,e){if(super(t,e),Array.isArray(this.options.container)){const e=document.createElement("div");e.setAttribute("role","toolbar"),function(t,e){Array.isArray(e[0])||(e=[e]);e.forEach((e=>{const n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((t=>{if("string"==typeof t)u(n,t);else{const e=Object.keys(t)[0],s=t[e];Array.isArray(s)?function(t,e,n){const s=document.createElement("select");s.classList.add(`ql-${e}`),n.forEach((t=>{const e=document.createElement("option");!1!==t?e.setAttribute("value",String(t)):e.setAttribute("selected","selected"),s.appendChild(e)})),t.appendChild(s)}(n,e,s):u(n,e,s)}})),t.appendChild(n)}))}(e,this.options.container),t.container?.parentNode?.insertBefore(e,t.container),this.container=e}else"string"==typeof this.options.container?this.container=document.querySelector(this.options.container):this.container=this.options.container;this.container instanceof HTMLElement?(this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach((t=>{const e=this.options.handlers?.[t];e&&this.addHandler(t,e)})),Array.from(this.container.querySelectorAll("button, select")).forEach((t=>{this.attach(t)})),this.quill.on(i.Ay.events.EDITOR_CHANGE,(()=>{const[t]=this.quill.selection.getRange();this.update(t)}))):a.error("Container required for toolbar",this.options)}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find((t=>0===t.indexOf("ql-")));if(!e)return;if(e=e.slice(3),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[e]&&null==this.quill.scroll.query(e))return void a.warn("ignoring attaching to nonexistent format",e,t);const n="SELECT"===t.tagName?"change":"click";t.addEventListener(n,(n=>{let o;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;const e=t.options[t.selectedIndex];o=!e.hasAttribute("selected")&&(e.value||!1)}else o=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),n.preventDefault();this.quill.focus();const[l]=this.quill.selection.getRange();if(null!=this.handlers[e])this.handlers[e].call(this,o);else if(this.quill.scroll.query(e).prototype instanceof r.EmbedBlot){if(o=prompt(`Enter ${e}`),!o)return;this.quill.updateContents((new s).retain(l.index).delete(l.length).insert({[e]:o}),i.Ay.sources.USER)}else this.quill.format(e,o,i.Ay.sources.USER);this.update(l)})),this.controls.push([e,t])}update(t){const e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((n=>{const[s,r]=n;if("SELECT"===r.tagName){let n=null;if(null==t)n=null;else if(null==e[s])n=r.querySelector("option[selected]");else if(!Array.isArray(e[s])){let t=e[s];"string"==typeof t&&(t=t.replace(/"/g,'\\"')),n=r.querySelector(`option[value="${t}"]`)}null==n?(r.value="",r.selectedIndex=-1):n.selected=!0}else if(null==t)r.classList.remove("ql-active"),r.setAttribute("aria-pressed","false");else if(r.hasAttribute("value")){const t=e[s],n=t===r.getAttribute("value")||null!=t&&t.toString()===r.getAttribute("value")||null==t&&!r.getAttribute("value");r.classList.toggle("ql-active",n),r.setAttribute("aria-pressed",n.toString())}else{const t=null!=e[s];r.classList.toggle("ql-active",t),r.setAttribute("aria-pressed",t.toString())}}))}}function u(t,e,n){const s=document.createElement("button");s.setAttribute("type","button"),s.classList.add(`ql-${e}`),s.setAttribute("aria-pressed","false"),null!=n?(s.value=n,s.setAttribute("aria-label",`${e}: ${n}`)):s.setAttribute("aria-label",e),t.appendChild(s)}c.DEFAULTS={},c.DEFAULTS={container:null,handlers:{clean(){const t=this.quill.getSelection();if(null!=t)if(0===t.length){const t=this.quill.getFormat();Object.keys(t).forEach((t=>{null!=this.quill.scroll.query(t,r.Scope.INLINE)&&this.quill.format(t,!1,i.Ay.sources.USER)}))}else this.quill.removeFormat(t,i.Ay.sources.USER)},direction(t){const{align:e}=this.quill.getFormat();"rtl"===t&&null==e?this.quill.format("align","right",i.Ay.sources.USER):t||"right"!==e||this.quill.format("align",!1,i.Ay.sources.USER),this.quill.format("direction",t,i.Ay.sources.USER)},indent(t){const e=this.quill.getSelection(),n=this.quill.getFormat(e),s=parseInt(n.indent||0,10);if("+1"===t||"-1"===t){let e="+1"===t?1:-1;"rtl"===n.direction&&(e*=-1),this.quill.format("indent",s+e,i.Ay.sources.USER)}},link(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,i.Ay.sources.USER)},list(t){const e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,i.Ay.sources.USER):this.quill.format("list","unchecked",i.Ay.sources.USER):this.quill.format("list",t,i.Ay.sources.USER)}}}},3706:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Parchment:()=>s.xz,Range:()=>s.Q6,default:()=>At});var s=n(2233),r=n(3703),i=n(8435),o=n(1349);class l extends o.ClassAttributor{add(t,e){let n=0;if("+1"===e||"-1"===e){const s=this.value(t)||0;n="+1"===e?s+1:s-1}else"number"==typeof e&&(n=e);return 0===n?(this.remove(t),!0):super.add(t,n.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}}const a=new l("indent","ql-indent",{scope:o.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});var c=n(9065);class u extends c.Ay{static blotName="blockquote";static tagName="blockquote"}const h=u;class d extends c.Ay{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(t){return this.tagName.indexOf(t.tagName)+1}}const f=d;var p=n(9339),g=n(8317);class m extends p.A{}m.blotName="list-container",m.tagName="OL";class b extends c.Ay{static create(t){const e=super.create();return e.setAttribute("data-list",t),e}static formats(t){return t.getAttribute("data-list")||void 0}static register(){g.Ay.register(m)}constructor(t,e){super(t,e);const n=e.ownerDocument.createElement("span"),s=n=>{if(!t.isEnabled())return;const s=this.statics.formats(e,t);"checked"===s?(this.format("list","unchecked"),n.preventDefault()):"unchecked"===s&&(this.format("list","checked"),n.preventDefault())};n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),this.attachUI(n)}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-list",e):super.format(t,e)}}b.blotName="list",b.tagName="LI",m.allowedChildren=[b],b.requiredContainer=m;var y=n(5876),v=n(725),A=n(5693),x=n(429),N=n(8879);class E extends N.A{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}const w=E;const q=class extends w{static blotName="italic";static tagName=["EM","I"]};var k=n(2084);class _ extends N.A{static blotName="script";static tagName=["SUB","SUP"];static create(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):super.create(t)}static formats(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}const L=_;const S=class extends w{static blotName="strike";static tagName=["S","STRIKE"]};class O extends N.A{static blotName="underline";static tagName="U"}const T=O;var j=n(3341);class C extends j.A{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(t){if(null==window.katex)throw new Error("Formula module requires KaTeX.");const e=super.create(t);return"string"==typeof t&&(window.katex.render(t,e,{throwOnError:!1,errorColor:"#f00"}),e.setAttribute("data-value",t)),e}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}const R=C,I=["alt","height","width"];class B extends o.EmbedBlot{static blotName="image";static tagName="IMG";static create(t){const e=super.create(t);return"string"==typeof t&&e.setAttribute("src",this.sanitize(t)),e}static formats(t){return I.reduce(((e,n)=>(t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e)),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return(0,k.a)(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){I.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}}const M=B,U=["height","width"];class D extends c.zo{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(t){const e=super.create(t);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","true"),e.setAttribute("src",this.sanitize(t)),e}static formats(t){return U.reduce(((e,n)=>(t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e)),{})}static sanitize(t){return k.A.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){U.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}const P=D;var z=n(4597),F=n(2660),H=n(2365),$=n(2587),V=n(2928),K=n(1389),W=n(5357);const Z=new o.ClassAttributor("code-token","hljs",{scope:o.Scope.INLINE});class G extends N.A{static formats(t,e){for(;null!=t&&t!==e.domNode;){if(t.classList&&t.classList.contains(z.Ay.className))return super.formats(t,e);t=t.parentNode}}constructor(t,e,n){super(t,e,n),Z.add(this.domNode,n)}format(t,e){t!==G.blotName?super.format(t,e):e?Z.add(this.domNode,e):(Z.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Z.value(this.domNode)||this.unwrap()}}G.blotName="code-token",G.className="ql-token";class X extends z.Ay{static create(t){const e=super.create(t);return"string"==typeof t&&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(),G.blotName,!1),super.replaceWith(t,e)}}class Q extends z.EJ{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,e){t===X.blotName&&(this.forceNext=!0,this.children.forEach((n=>{n.format(t,e)})))}formatAt(t,e,n,s){n===X.blotName&&(this.forceNext=!0),super.formatAt(t,e,n,s)}highlight(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==this.children.head)return;const n=`${Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode)).map((t=>t.textContent)).join("\n")}\n`,s=X.formats(this.children.head.domNode);if(e||this.forceNext||this.cachedText!==n){if(n.trim().length>0||null==this.cachedText){const e=this.children.reduce(((t,e)=>t.concat((0,c.mG)(e,!1))),new F),r=t(n,s);e.diff(r).reduce(((t,e)=>{let{retain:n,attributes:s}=e;return n?(s&&Object.keys(s).forEach((e=>{[X.blotName,G.blotName].includes(e)&&this.formatAt(t,n,e,s[e])})),t+n):t}),0)}this.cachedText=n,this.forceNext=!1}}html(t,e){const[n]=this.children.find(t);return`<pre data-language="${n?X.formats(n.domNode):"plain"}">\n${(0,K.X)(this.code(t,e))}\n</pre>`}optimize(t){if(super.optimize(t),null!=this.parent&&null!=this.children.head&&null!=this.uiNode){const t=X.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}Q.allowedChildren=[X],X.requiredContainer=Q,X.allowedChildren=[G,V.A,K.A,$.A];class J extends H.A{static register(){g.Ay.register(G,!0),g.Ay.register(X,!0),g.Ay.register(Q,!0)}constructor(t,e){if(super(t,e),null==this.options.hljs)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce(((t,e)=>{let{key:n}=e;return t[n]=!0,t}),{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(g.Ay.events.SCROLL_BLOT_MOUNT,(t=>{if(!(t instanceof Q))return;const e=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach((t=>{let{key:n,label:s}=t;const r=e.ownerDocument.createElement("option");r.textContent=s,r.setAttribute("value",n),e.appendChild(r)})),e.addEventListener("change",(()=>{t.format(X.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)})),null==t.uiNode&&(t.attachUI(e),t.children.head&&(e.value=X.formats(t.children.head.domNode)))}))}initTimer(){let t=null;this.quill.on(g.Ay.events.SCROLL_OPTIMIZE,(()=>{t&&clearTimeout(t),t=setTimeout((()=>{this.highlight(),t=null}),this.options.interval)}))}highlight(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.quill.selection.composing)return;this.quill.update(g.Ay.sources.USER);const n=this.quill.getSelection();(null==t?this.quill.scroll.descendants(Q):[t]).forEach((t=>{t.highlight(this.highlightBlot,e)})),this.quill.update(g.Ay.sources.SILENT),null!=n&&this.quill.setSelection(n,g.Ay.sources.SILENT)}highlightBlot(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"plain";if(e=this.languages[e]?e:"plain","plain"===e)return(0,K.X)(t).split("\n").reduce(((t,n,s)=>(0!==s&&t.insert("\n",{[z.Ay.blotName]:e}),t.insert(n))),new F);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(z.Ay.className),n.innerHTML=((t,e,n)=>{if("string"==typeof t.versionString){const s=t.versionString.split(".")[0];if(parseInt(s,10)>=11)return t.highlight(n,{language:e}).value}return t.highlight(e,n).value})(this.options.hljs,e,t),(0,W.hV)(this.quill.scroll,n,[(t,e)=>{const n=Z.value(t);return n?e.compose((new F).retain(e.length(),{[G.blotName]:n})):e}],[(t,n)=>t.data.split("\n").reduce(((t,n,s)=>(0!==s&&t.insert("\n",{[z.Ay.blotName]:e}),t.insert(n))),n)],new WeakMap)}}J.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"}]};class Y extends c.Ay{static blotName="table";static tagName="TD";static create(t){const e=super.create();return t?e.setAttribute("data-row",t):e.setAttribute("data-row",st()),e}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,e){t===Y.blotName&&e?this.domNode.setAttribute("data-row",e):super.format(t,e)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}class tt extends p.A{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&null!=this.next.children.head){const t=this.children.head.formats(),e=this.children.tail.formats(),n=this.next.children.head.formats(),s=this.next.children.tail.formats();return t.table===e.table&&t.table===n.table&&t.table===s.table}return!1}optimize(t){super.optimize(t),this.children.forEach((t=>{if(null==t.next)return;const e=t.formats(),n=t.next.formats();if(e.table!==n.table){const e=this.splitAfter(t);e&&e.optimize(),this.prev&&this.prev.optimize()}}))}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}class et extends p.A{static blotName="table-body";static tagName="TBODY"}class nt extends p.A{static blotName="table-container";static tagName="TABLE";balanceCells(){const t=this.descendants(tt),e=t.reduce(((t,e)=>Math.max(e.children.length,t)),0);t.forEach((t=>{new Array(e-t.children.length).fill(0).forEach((()=>{let e;null!=t.children.head&&(e=Y.formats(t.children.head.domNode));const n=this.scroll.create(Y.blotName,e);t.appendChild(n),n.optimize()}))}))}cells(t){return this.rows().map((e=>e.children.at(t)))}deleteColumn(t){const[e]=this.descendant(et);null!=e&&null!=e.children.head&&e.children.forEach((e=>{const n=e.children.at(t);null!=n&&n.remove()}))}insertColumn(t){const[e]=this.descendant(et);null!=e&&null!=e.children.head&&e.children.forEach((e=>{const n=e.children.at(t),s=Y.formats(e.children.head.domNode),r=this.scroll.create(Y.blotName,s);e.insertBefore(r,n)}))}insertRow(t){const[e]=this.descendant(et);if(null==e||null==e.children.head)return;const n=st(),s=this.scroll.create(tt.blotName);e.children.head.children.forEach((()=>{const t=this.scroll.create(Y.blotName,n);s.appendChild(t)}));const r=e.children.at(t);e.insertBefore(s,r)}rows(){const t=this.children.head;return null==t?[]:t.children.map((t=>t))}}function st(){return`row-${Math.random().toString(36).slice(2,6)}`}nt.allowedChildren=[et],et.requiredContainer=nt,et.allowedChildren=[tt],tt.requiredContainer=et,tt.allowedChildren=[Y],Y.requiredContainer=tt;class rt extends H.A{static register(){g.Ay.register(Y),g.Ay.register(tt),g.Ay.register(et),g.Ay.register(nt)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(nt).forEach((t=>{t.balanceCells()}))}deleteColumn(){const[t,,e]=this.getTable();null!=e&&(t.deleteColumn(e.cellOffset()),this.quill.update(g.Ay.sources.USER))}deleteRow(){const[,t]=this.getTable();null!=t&&(t.remove(),this.quill.update(g.Ay.sources.USER))}deleteTable(){const[t]=this.getTable();if(null==t)return;const e=t.offset();t.remove(),this.quill.update(g.Ay.sources.USER),this.quill.setSelection(e,g.Ay.sources.SILENT)}getTable(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.quill.getSelection();if(null==t)return[null,null,null,-1];const[e,n]=this.quill.getLine(t.index);if(null==e||e.statics.blotName!==Y.blotName)return[null,null,null,-1];const s=e.parent;return[s.parent.parent,s,e,n]}insertColumn(t){const e=this.quill.getSelection();if(!e)return;const[n,s,r]=this.getTable(e);if(null==r)return;const i=r.cellOffset();n.insertColumn(i+t),this.quill.update(g.Ay.sources.USER);let o=s.rowOffset();0===t&&(o+=1),this.quill.setSelection(e.index+o,e.length,g.Ay.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const e=this.quill.getSelection();if(!e)return;const[n,s,r]=this.getTable(e);if(null==r)return;const i=s.rowOffset();n.insertRow(i+t),this.quill.update(g.Ay.sources.USER),t>0?this.quill.setSelection(e,g.Ay.sources.SILENT):this.quill.setSelection(e.index+s.children.length,e.length,g.Ay.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){const n=this.quill.getSelection();if(null==n)return;const s=new Array(t).fill(0).reduce((t=>{const n=new Array(e).fill("\n").join("");return t.insert(n,{table:st()})}),(new F).retain(n.index));this.quill.updateContents(s,g.Ay.sources.USER),this.quill.setSelection(n.index,g.Ay.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(g.Ay.events.SCROLL_OPTIMIZE,(t=>{t.some((t=>!!["TD","TR","TBODY","TABLE"].includes(t.target.tagName)&&(this.quill.once(g.Ay.events.TEXT_CHANGE,((t,e,n)=>{n===g.Ay.sources.USER&&this.balanceTables()})),!0)))}))}}const it=rt;var ot=n(3288),lt=n(8078),at=n(5624),ct=n(6754),ut=n(2506),ht=n(2219),dt=n(1001),ft=n(6582),pt=n(9239),gt=n(7951);const mt=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class bt extends pt.R{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(ft.A.events.EDITOR_CHANGE,((t,e,n,s)=>{if(t===ft.A.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&s===ft.A.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const t=this.quill.getLines(e.index,e.length);if(1===t.length){const t=this.quill.getBounds(e);null!=t&&this.position(t)}else{const n=t[t.length-1],s=this.quill.getIndex(n),r=Math.min(n.length()-1,e.index+e.length-s),i=this.quill.getBounds(new gt.Q(s,r));null!=i&&this.position(i)}}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(ft.A.events.SCROLL_OPTIMIZE,(()=>{setTimeout((()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(null!=t){const e=this.quill.getBounds(t);null!=e&&this.position(e)}}),1)}))}cancel(){this.show()}position(t){const e=super.position(t),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",0!==e&&(n.style.marginLeft=-1*e-n.offsetWidth/2+"px"),e}}class yt extends pt.A{constructor(t,e){null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=mt),super(t,e),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new bt(this.quill,this.options.bounds),null!=t.container&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),lt.A),this.buildPickers(t.container.querySelectorAll("select"),lt.A))}}yt.DEFAULTS=(0,dt.A)({},pt.A.DEFAULTS,{modules:{toolbar:{handlers:{link(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var vt=n(2421);s.Ay.register({"attributors/attribute/direction":i.Mc,"attributors/class/align":r.qh,"attributors/class/background":y.l,"attributors/class/color":v.g3,"attributors/class/direction":i.sY,"attributors/class/font":A.q,"attributors/class/size":x.U,"attributors/style/align":r.Hu,"attributors/style/background":y.s,"attributors/style/color":v.JM,"attributors/style/direction":i.VL,"attributors/style/font":A.z,"attributors/style/size":x.r},!0),s.Ay.register({"formats/align":r.qh,"formats/direction":i.sY,"formats/indent":a,"formats/background":y.s,"formats/color":v.JM,"formats/font":A.q,"formats/size":x.U,"formats/blockquote":h,"formats/code-block":z.Ay,"formats/header":f,"formats/list":b,"formats/bold":w,"formats/code":z.Cy,"formats/italic":q,"formats/link":k.A,"formats/script":L,"formats/strike":S,"formats/underline":T,"formats/formula":R,"formats/image":M,"formats/video":P,"modules/syntax":J,"modules/table":it,"modules/toolbar":ot.A,"themes/bubble":yt,"themes/snow":vt.A,"ui/icons":lt.A,"ui/picker":at.A,"ui/icon-picker":ut.A,"ui/color-picker":ct.A,"ui/tooltip":ht.A},!0);const At=s.Ay},9239:(t,e,n)=>{"use strict";n.d(e,{A:()=>g,R:()=>m});var s=n(1001),r=n(6582),i=n(5468),o=n(6754),l=n(2506),a=n(5624),c=n(2219);const u=[!1,"center","right","justify"],h=["#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"],d=[!1,"serif","monospace"],f=["1","2","3",!1],p=["small",!1,"large","huge"];class g extends i.A{constructor(t,e){super(t,e);const n=e=>{document.body.contains(t.root)?(null==this.tooltip||this.tooltip.root.contains(e.target)||document.activeElement===this.tooltip.textbox||this.quill.hasFocus()||this.tooltip.hide(),null!=this.pickers&&this.pickers.forEach((t=>{t.container.contains(e.target)||t.close()}))):document.body.removeEventListener("click",n)};t.emitter.listenDOM("click",document.body,n)}addModule(t){const e=super.addModule(t);return"toolbar"===t&&this.extendToolbar(e),e}buildButtons(t,e){Array.from(t).forEach((t=>{(t.getAttribute("class")||"").split(/\s+/).forEach((n=>{if(n.startsWith("ql-")&&(n=n.slice(3),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{const s=t.value||"";null!=s&&e[n][s]&&(t.innerHTML=e[n][s])}}))}))}buildPickers(t,e){this.pickers=Array.from(t).map((t=>{if(t.classList.contains("ql-align")&&(null==t.querySelector("option")&&b(t,u),"object"==typeof e.align))return new l.A(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){const n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&b(t,h,"background"===n?"#ffffff":"#000000"),new o.A(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?b(t,d):t.classList.contains("ql-header")?b(t,f):t.classList.contains("ql-size")&&b(t,p)),new a.A(t)}));this.quill.on(r.A.events.EDITOR_CHANGE,(()=>{this.pickers.forEach((t=>{t.update()}))}))}}g.DEFAULTS=(0,s.A)({},i.A.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let t=this.container.querySelector("input.ql-image[type=file]");null==t&&(t=document.createElement("input"),t.setAttribute("type","file"),t.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),t.classList.add("ql-image"),t.addEventListener("change",(()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,t.files),t.value=""})),this.container.appendChild(t)),t.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class m extends c.A{constructor(t,e){super(t,e),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",(t=>{"Enter"===t.key?(this.save(),t.preventDefault()):"Escape"===t.key&&(this.cancel(),t.preventDefault())}))}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null==this.textbox)return;null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);null!=n&&this.position(n),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":{const{scrollTop:e}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,r.A.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,r.A.sources.USER)),this.quill.root.scrollTop=e;break}case"video":t=function(t){let e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(e)return`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`;if(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`;return t}(t);case"formula":{if(!t)break;const e=this.quill.getSelection(!0);if(null!=e){const n=e.index+e.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),t,r.A.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(n+1," ",r.A.sources.USER),this.quill.setSelection(n+2,r.A.sources.USER)}break}}this.textbox.value="",this.hide()}}function b(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((e=>{const s=document.createElement("option");e===n?s.setAttribute("selected","selected"):s.setAttribute("value",String(e)),t.appendChild(s)}))}},2421:(t,e,n)=>{"use strict";n.d(e,{A:()=>d});var s=n(1001),r=n(6582),i=n(9239),o=n(2084),l=n(7951),a=n(8078);const c=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class u extends i.R{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(null!=this.linkRange){const t=this.linkRange;this.restoreFocus(),this.quill.formatText(t,"link",!1,r.A.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()})),this.quill.on(r.A.events.SELECTION_CHANGE,((t,e,n)=>{if(null!=t){if(0===t.length&&n===r.A.sources.USER){const[e,n]=this.quill.scroll.descendant(o.A,t.index);if(null!=e){this.linkRange=new l.Q(t.index-n,e.length());const s=o.A.formats(e.domNode);this.preview.textContent=s,this.preview.setAttribute("href",s),this.show();const r=this.quill.getBounds(this.linkRange);return void(null!=r&&this.position(r))}}else delete this.linkRange;this.hide()}}))}show(){super.show(),this.root.removeAttribute("data-mode")}}class h extends i.A{constructor(t,e){null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=c),super(t,e),this.quill.container.classList.add("ql-snow")}extendToolbar(t){null!=t.container&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),a.A),this.buildPickers(t.container.querySelectorAll("select"),a.A),this.tooltip=new u(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},((e,n)=>{t.handlers.link.call(t,!n.format.link)})))}}h.DEFAULTS=(0,s.A)({},i.A.DEFAULTS,{modules:{toolbar:{handlers:{link(t){if(t){const t=this.quill.getSelection();if(null==t||0===t.length)return;let e=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(e)&&0!==e.indexOf("mailto:")&&(e=`mailto:${e}`);const{tooltip:n}=this.quill.theme;n.edit("link",e)}else this.quill.format("link",!1)}}}}});const d=h},6754:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var s=n(5624);class r extends s.A{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((t=>{t.classList.add("ql-primary")}))}buildItem(t){const e=super.buildItem(t);return e.style.backgroundColor=t.getAttribute("value")||"",e}selectItem(t,e){super.selectItem(t,e);const n=this.label.querySelector(".ql-color-label"),s=t&&t.getAttribute("data-value")||"";n&&("line"===n.tagName?n.style.stroke=s:n.style.fill=s)}}const i=r},2506:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var s=n(5624);class r extends s.A{constructor(t,e){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach((t=>{t.innerHTML=e[t.getAttribute("data-value")||""]})),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,e){super.selectItem(t,e);const n=t||this.defaultItem;if(null!=n){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}const i=r},8078:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const s='<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>',r={align:{"":'<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>',center:'<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>',right:'<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>',justify:'<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>'},background:'<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"/><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>',blockquote:'<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>',bold:'<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>',clean:'<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>',code:s,"code-block":s,color:'<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>',direction:{"":'<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>',rtl:'<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>'},formula:'<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>',header:{1:'<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>',2:'<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>',3:'<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-.86816H13.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>',4:'<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>',5:'<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>',6:'<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>'},italic:'<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>',image:'<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>',indent:{"+1":'<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>',"-1":'<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>'},link:'<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>',list:{bullet:'<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>',check:'<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>',ordered:'<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"/><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>'},script:{sub:'<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>',super:'<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>'},strike:'<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>',table:'<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>',underline:'<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>',video:'<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>'}},5624:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});let s=0;function r(t,e){t.setAttribute(e,`${!("true"===t.getAttribute(e))}`)}const i=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",(t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),r(this.label,"aria-expanded"),r(this.options,"aria-hidden")}buildItem(t){const e=document.createElement("span");e.tabIndex="0",e.setAttribute("role","button"),e.classList.add("ql-picker-item");const n=t.getAttribute("value");return n&&e.setAttribute("data-value",n),t.textContent&&e.setAttribute("data-label",t.textContent),e.addEventListener("click",(()=>{this.selectItem(e,!0)})),e.addEventListener("keydown",(t=>{switch(t.key){case"Enter":this.selectItem(e,!0),t.preventDefault();break;case"Escape":this.escape(),t.preventDefault()}})),e}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML='<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>',t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${s}`,s+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach((e=>{const n=this.buildItem(e);t.appendChild(n),!0===e.selected&&this.selectItem(n)})),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&&void 0!==arguments[1]&&arguments[1];const n=this.container.querySelector(".ql-selected");t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(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){const e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);const e=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}}},2219:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});const s=class{constructor(t,e){this.quill=t,this.boundsContainer=e||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,(t=>{const{overflowY:e}=getComputedStyle(t,null);return"visible"!==e&&"clip"!==e})(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){const e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${e}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),r=this.root.getBoundingClientRect();let i=0;if(r.right>s.right&&(i=s.right-r.right,this.root.style.left=`${e+i}px`),r.left<s.left&&(i=s.left-r.left,this.root.style.left=`${e+i}px`),r.bottom>s.bottom){const e=r.bottom-r.top,s=t.bottom-t.top+e;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return i}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}}},e={};function n(s){var r=e[s];if(void 0!==r)return r.exports;var i=e[s]={id:s,loaded:!1,exports:{}};return t[s](i,i.exports,n),i.loaded=!0,i.exports}n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(6090),window.Quill=n(3706)})();