@festo-ui/react 9.0.0-dev.681 → 9.0.0-dev.683
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +1 -14
- package/index.d.ts +0 -5
- package/index.js +0 -5
- package/node/index.js +0 -35
- package/package.json +1 -6
- package/508.bundle.js +0 -1
- package/lib/forms/color-indicator/ColorIndicator.d.ts +0 -11
- package/lib/forms/color-indicator/ColorIndicator.js +0 -119
- package/lib/forms/color-picker/ColorHelper.d.ts +0 -9
- package/lib/forms/color-picker/ColorHelper.js +0 -140
- package/lib/forms/color-picker/ColorPicker.d.ts +0 -14
- package/lib/forms/color-picker/ColorPicker.js +0 -545
- package/lib/forms/date-picker/DatePicker.d.ts +0 -25
- package/lib/forms/date-picker/DatePicker.js +0 -155
- package/lib/forms/date-range-picker/DateRangePicker.d.ts +0 -19
- package/lib/forms/date-range-picker/DateRangePicker.js +0 -135
- package/lib/forms/text-editor/TextEditor.d.ts +0 -29
- package/lib/forms/text-editor/TextEditor.js +0 -256
- package/lib/forms/text-editor/TextEditorButton.d.ts +0 -14
- package/lib/forms/text-editor/TextEditorButton.js +0 -80
- package/node/lib/forms/color-indicator/ColorIndicator.js +0 -128
- package/node/lib/forms/color-picker/ColorHelper.js +0 -147
- package/node/lib/forms/color-picker/ColorPicker.js +0 -552
- package/node/lib/forms/date-picker/DatePicker.js +0 -162
- package/node/lib/forms/date-range-picker/DateRangePicker.js +0 -142
- package/node/lib/forms/text-editor/TextEditor.js +0 -265
- package/node/lib/forms/text-editor/TextEditorButton.js +0 -87
package/508.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_festo_ui_react=self.webpackChunk_festo_ui_react||[]).push([[508],{228:function(t){"use strict";var e=Object.prototype.hasOwnProperty,n="~";function r(){}function s(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function i(t,e,r,i,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var l=new s(r,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 r:delete t._events[e]}function l(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),l.prototype.eventNames=function(){var t,r,s=[];if(0===this._eventsCount)return s;for(r in t=this._events)e.call(t,r)&&s.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(t)):s},l.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var s=0,i=r.length,o=new Array(i);s<i;s++)o[s]=r[s].fn;return o},l.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},l.prototype.emit=function(t,e,r,s,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,r),!0;case 4:return u.fn.call(u.context,e,r,s),!0;case 5:return u.fn.call(u.context,e,r,s,i),!0;case 6:return u.fn.call(u.context,e,r,s,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,r);break;case 4:u[c].fn.call(u[c].context,e,r,s);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,r,s){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||s&&!l.once||r&&l.context!==r||o(this,i);else{for(var a=0,c=[],u=l.length;a<u;a++)(l[a].fn!==e||s&&!l[a].once||r&&l[a].context!==r)&&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 r,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},2508:function(t,e,n){"use strict";n.r(e),n.d(e,{AttributeMap:function(){return Ue.AttributeMap},Delta:function(){return Ue},Module:function(){return kr},Op:function(){return Ue.Op},OpIterator:function(){return Ue.OpIterator},Parchment:function(){return r},Range:function(){return gr},default:function(){return Fi}});var r={};n.r(r),n.d(r,{Attributor:function(){return ue},AttributorStore:function(){return ye},BlockBlot:function(){return Se},ClassAttributor:function(){return ge},ContainerBlot:function(){return je},EmbedBlot:function(){return Ce},InlineBlot:function(){return Le},LeafBlot:function(){return Ee},ParentBlot:function(){return ke},Registry:function(){return fe},Scope:function(){return ce},ScrollBlot:function(){return Me},StyleAttributor:function(){return be},TextBlot:function(){return De}});var s=function(t,e){return t===e||t!=t&&e!=e},i=function(t,e){for(var n=t.length;n--;)if(s(t[n][0],e))return n;return-1},o=Array.prototype.splice;function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}l.prototype.clear=function(){this.__data__=[],this.size=0},l.prototype.delete=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))},l.prototype.get=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]},l.prototype.has=function(t){return i(this.__data__,t)>-1},l.prototype.set=function(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var a,c=l,u="object"==typeof global&&global&&global.Object===Object&&global,h="object"==typeof self&&self&&self.Object===Object&&self,d=u||h||Function("return this")(),f=d.Symbol,p=Object.prototype,g=p.hasOwnProperty,m=p.toString,b=f?f.toStringTag:void 0,y=Object.prototype.toString,v=f?f.toStringTag:void 0,x=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":v&&v in Object(t)?function(t){var e=g.call(t,b),n=t[b];try{t[b]=void 0;var r=!0}catch(t){}var s=m.call(t);return r&&(e?t[b]=n:delete t[b]),s}(t):function(t){return y.call(t)}(t)},N=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},E=function(t){if(!N(t))return!1;var e=x(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},w=d["__core-js_shared__"],A=(a=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",q=Function.prototype.toString,k=function(t){if(null!=t){try{return q.call(t)}catch(t){}try{return t+""}catch(t){}}return""},_=/^\[object .+?Constructor\]$/,L=Function.prototype,O=Object.prototype,S=L.toString,T=O.hasOwnProperty,j=RegExp("^"+S.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=function(t){return!(!N(t)||(e=t,A&&A in e))&&(E(t)?j:_).test(k(t));var e},R=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return C(n)?n:void 0},I=R(d,"Map"),M=R(Object,"create"),B=Object.prototype.hasOwnProperty,D=Object.prototype.hasOwnProperty;function U(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}U.prototype.clear=function(){this.__data__=M?M(null):{},this.size=0},U.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},U.prototype.get=function(t){var e=this.__data__;if(M){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return B.call(e,t)?e[t]:void 0},U.prototype.has=function(t){var e=this.__data__;return M?void 0!==e[t]:D.call(e,t)},U.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=M&&void 0===e?"__lodash_hash_undefined__":e,this};var P=U,z=function(t,e){var n,r,s=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof e?"string":"hash"]:s.map};function F(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}F.prototype.clear=function(){this.size=0,this.__data__={hash:new P,map:new(I||c),string:new P}},F.prototype.delete=function(t){var e=z(this,t).delete(t);return this.size-=e?1:0,e},F.prototype.get=function(t){return z(this,t).get(t)},F.prototype.has=function(t){return z(this,t).has(t)},F.prototype.set=function(t,e){var n=z(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var H=F;function $(t){var e=this.__data__=new c(t);this.size=e.size}$.prototype.clear=function(){this.__data__=new c,this.size=0},$.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},$.prototype.get=function(t){return this.__data__.get(t)},$.prototype.has=function(t){return this.__data__.has(t)},$.prototype.set=function(t,e){var n=this.__data__;if(n instanceof c){var r=n.__data__;if(!I||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new H(r)}return n.set(t,e),this.size=n.size,this};var V=$,K=function(){try{var t=R(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),W=function(t,e,n){"__proto__"==e&&K?K(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Z=function(t,e,n){(void 0!==n&&!s(t[e],n)||void 0===n&&!(e in t))&&W(t,e,n)},G=function(t,e,n){for(var r=-1,s=Object(t),i=n(t),o=i.length;o--;){var l=i[++r];if(!1===e(s[l],l,s))break}return t},X="object"==typeof exports&&exports&&!exports.nodeType&&exports,Y=X&&"object"==typeof module&&module&&!module.nodeType&&module,Q=Y&&Y.exports===X?d.Buffer:void 0,J=Q?Q.allocUnsafe:void 0,tt=function(t,e){if(e)return t.slice();var n=t.length,r=J?J(n):new t.constructor(n);return t.copy(r),r},et=d.Uint8Array,nt=function(t){var e=new t.constructor(t.byteLength);return new et(e).set(new et(t)),e},rt=function(t,e){var n=e?nt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},st=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e},it=Object.create,ot=function(){function t(){}return function(e){if(!N(e))return{};if(it)return it(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),lt=function(t,e){return function(n){return t(e(n))}},at=lt(Object.getPrototypeOf,Object),ct=Object.prototype,ut=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ct)},ht=function(t){return"function"!=typeof t.constructor||ut(t)?{}:ot(at(t))},dt=function(t){return null!=t&&"object"==typeof t},ft=function(t){return dt(t)&&"[object Arguments]"==x(t)},pt=Object.prototype,gt=pt.hasOwnProperty,mt=pt.propertyIsEnumerable,bt=ft(function(){return arguments}())?ft:function(t){return dt(t)&>.call(t,"callee")&&!mt.call(t,"callee")},yt=bt,vt=Array.isArray,xt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Nt=function(t){return null!=t&&xt(t.length)&&!E(t)},Et="object"==typeof exports&&exports&&!exports.nodeType&&exports,wt=Et&&"object"==typeof module&&module&&!module.nodeType&&module,At=wt&&wt.exports===Et?d.Buffer:void 0,qt=(At?At.isBuffer:void 0)||function(){return!1},kt=Function.prototype,_t=Object.prototype,Lt=kt.toString,Ot=_t.hasOwnProperty,St=Lt.call(Object),Tt={};Tt["[object Float32Array]"]=Tt["[object Float64Array]"]=Tt["[object Int8Array]"]=Tt["[object Int16Array]"]=Tt["[object Int32Array]"]=Tt["[object Uint8Array]"]=Tt["[object Uint8ClampedArray]"]=Tt["[object Uint16Array]"]=Tt["[object Uint32Array]"]=!0,Tt["[object Arguments]"]=Tt["[object Array]"]=Tt["[object ArrayBuffer]"]=Tt["[object Boolean]"]=Tt["[object DataView]"]=Tt["[object Date]"]=Tt["[object Error]"]=Tt["[object Function]"]=Tt["[object Map]"]=Tt["[object Number]"]=Tt["[object Object]"]=Tt["[object RegExp]"]=Tt["[object Set]"]=Tt["[object String]"]=Tt["[object WeakMap]"]=!1;var jt,Ct,Rt,It,Mt=function(t){return function(e){return t(e)}},Bt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Dt=Bt&&"object"==typeof module&&module&&!module.nodeType&&module,Ut=Dt&&Dt.exports===Bt&&u.process,Pt=function(){try{return Dt&&Dt.require&&Dt.require("util").types||Ut&&Ut.binding&&Ut.binding("util")}catch(t){}}(),zt=Pt&&Pt.isTypedArray,Ft=zt?Mt(zt):function(t){return dt(t)&&xt(t.length)&&!!Tt[x(t)]},Ht=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},$t=Object.prototype.hasOwnProperty,Vt=function(t,e,n){var r=t[e];$t.call(t,e)&&s(r,n)&&(void 0!==n||e in t)||W(t,e,n)},Kt=function(t,e,n,r){var s=!n;n||(n={});for(var i=-1,o=e.length;++i<o;){var l=e[i],a=r?r(n[l],t[l],l,n,t):void 0;void 0===a&&(a=t[l]),s?W(n,l,a):Vt(n,l,a)}return n},Wt=/^(?:0|[1-9]\d*)$/,Zt=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Wt.test(t))&&t>-1&&t%1==0&&t<e},Gt=Object.prototype.hasOwnProperty,Xt=function(t,e){var n=vt(t),r=!n&&yt(t),s=!n&&!r&&qt(t),i=!n&&!r&&!s&&Ft(t),o=n||r||s||i,l=o?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],a=l.length;for(var c in t)!e&&!Gt.call(t,c)||o&&("length"==c||s&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Zt(c,a))||l.push(c);return l},Yt=Object.prototype.hasOwnProperty,Qt=function(t){if(!N(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=ut(t),n=[];for(var r in t)("constructor"!=r||!e&&Yt.call(t,r))&&n.push(r);return n},Jt=function(t){return Nt(t)?Xt(t,!0):Qt(t)},te=function(t,e,n,r,s,i,o){var l,a=Ht(t,n),c=Ht(e,n),u=o.get(c);if(u)Z(t,n,u);else{var h=i?i(a,c,n+"",t,e,o):void 0,d=void 0===h;if(d){var f=vt(c),p=!f&&qt(c),g=!f&&!p&&Ft(c);h=c,f||p||g?vt(a)?h=a:dt(l=a)&&Nt(l)?h=st(a):p?(d=!1,h=tt(c,!0)):g?(d=!1,h=rt(c,!0)):h=[]:function(t){if(!dt(t)||"[object Object]"!=x(t))return!1;var e=at(t);if(null===e)return!0;var n=Ot.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Lt.call(n)==St}(c)||yt(c)?(h=a,yt(a)?h=function(t){return Kt(t,Jt(t))}(a):N(a)&&!E(a)||(h=ht(c))):d=!1}d&&(o.set(c,h),s(h,c,r,i,o),o.delete(c)),Z(t,n,h)}},ee=function t(e,n,r,s,i){e!==n&&G(n,(function(o,l){if(i||(i=new V),N(o))te(e,n,l,r,t,s,i);else{var a=s?s(Ht(e,l),o,l+"",e,n,i):void 0;void 0===a&&(a=o),Z(e,l,a)}}),Jt)},ne=function(t){return t},re=Math.max,se=K?function(t,e){return K(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:ne,ie=Date.now,oe=(jt=se,Ct=0,Rt=0,function(){var t=ie(),e=16-(t-Rt);if(Rt=t,e>0){if(++Ct>=800)return arguments[0]}else Ct=0;return jt.apply(void 0,arguments)}),le=function(t,e){return oe(function(t,e,n){return e=re(void 0===e?t.length-1:e,0),function(){for(var r=arguments,s=-1,i=re(r.length-e,0),o=Array(i);++s<i;)o[s]=r[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=r[s];return l[e]=n(o),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)}(t,this,l)}}(t,e,ne),t+"")},ae=(It=function(t,e,n){ee(t,e,n)},le((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=It.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!N(n))return!1;var r=typeof e;return!!("number"==r?Nt(n)&&Zt(e,n.length):"string"==r&&e in n)&&s(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var l=e[n];l&&It(t,l,n)}return t}))),ce=(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))(ce||{});class ue{constructor(t,e,n={}){this.attrName=t,this.keyName=e;const r=ce.TYPE&ce.ATTRIBUTE;this.scope=null!=n.scope?n.scope&ce.LEVEL|r:ce.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 he extends Error{constructor(t){super(t="[Parchment] "+t),this.message=t,this.name=this.constructor.name}}const de=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,r){const s=this.query(n);if(null==s)throw new he(`Unable to create ${n} blot`);const i=s,o=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:i.create(r),l=new i(e,o,r);return t.blots.set(l.domNode,l),l}find(e,n=!1){return t.find(e,n)}query(t,e=ce.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&ce.LEVEL&ce.BLOCK?n=this.types.block:t&ce.LEVEL&ce.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&ce.LEVEL&n.scope&&e&ce.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 he("Invalid definition");if(e&&"abstract"===t.blotName)throw new he("Cannot register abstract class");const r=e?t.blotName:n?t.attrName:void 0;return this.types[r]=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}))}};de.blots=new WeakMap;let fe=de;function pe(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((t=>0===t.indexOf(`${e}-`)))}const ge=class extends ue{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){pe(t,this.keyName).forEach((e=>{t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")}value(t){const e=(pe(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}};function me(t){const e=t.split("-"),n=e.slice(1).map((t=>t[0].toUpperCase()+t.slice(1))).join("");return e[0]+n}const be=class extends ue{static keys(t){return(t.getAttribute("style")||"").split(";").map((t=>t.split(":")[0].trim()))}add(t,e){return!!this.canAdd(t,e)&&(t.style[me(this.keyName)]=e,!0)}remove(t){t.style[me(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[me(this.keyName)];return this.canAdd(t,e)?e:""}},ye=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=fe.find(this.domNode);if(null==t)return;const e=ue.keys(this.domNode),n=ge.keys(this.domNode),r=be.keys(this.domNode);e.concat(n).concat(r).forEach((e=>{const n=t.scroll.query(e,ce.ATTRIBUTE);n instanceof ue&&(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)),{})}},ve=class{constructor(t,e){this.scroll=t,this.domNode=e,fe.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(null==this.tagName)throw new he("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),fe.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,n,r){const s=this.isolate(t,e);if(null!=this.scroll.query(n,ce.BLOT)&&r)s.wrap(n,r);else if(null!=this.scroll.query(n,ce.ATTRIBUTE)){const t=this.scroll.create(this.statics.scope);s.wrap(t),t.format(n,r)}}insertAt(t,e,n){const r=null==n?this.scroll.create("text",e):this.scroll.create(e,n),s=this.split(t);this.parent.insertBefore(r,s||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 he(`Cannot wrap ${t}`);return n.appendChild(this),n}};ve.blotName="abstract";let xe=ve;const Ne=class extends xe{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}}};Ne.scope=ce.INLINE_BLOT;const Ee=Ne;class we{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(),r=0;for(;n;){if(n===t)return r;r+=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 r=n();for(;r;){const s=r.length();if(t<s||e&&t===s&&(null==r.next||0!==r.next.length()))return[r,t];t-=s,r=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[r,s]=this.find(t);let i=t-s;const o=this.iterator(r);let l=o();for(;l&&i<t+e;){const r=l.length();t>i?n(l,t-i,Math.min(e,i+r-t)):n(l,0,Math.min(r,t+e-i)),i+=r,l=o()}}map(t){return this.reduce(((e,n)=>(e.push(t(n)),e)),[])}reduce(t,e){const n=this.iterator();let r=n();for(;r;)e=t(e,r),r=n();return e}}function Ae(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const n=e.create(ce.INLINE);return Array.from(t.childNodes).forEach((t=>{n.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(n.domNode,t),n.attach(),n}}const qe=class t extends xe{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 we,Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode)).reverse().forEach((t=>{try{const e=Ae(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(t){if(t instanceof he)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[r,s]=this.children.find(n);return null==e.blotName&&e(r)||null!=e.blotName&&r instanceof e?[r,s]:r instanceof t?r.descendant(e,s):[null,-1]}descendants(e,n=0,r=Number.MAX_VALUE){let s=[],i=r;return this.children.forEachAt(n,r,((n,r,o)=>{(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&s.push(n),n instanceof t&&(s=s.concat(n.descendants(e,r,i))),i-=o})),s}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===ce.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,r){this.children.forEachAt(t,e,((t,e,s)=>{t.formatAt(e,s,n,r)}))}insertAt(t,e,n){const[r,s]=this.children.find(t);if(r)r.insertAt(s,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[r,s]=this.children.find(e,n),i=[[this,e]];return r instanceof t?i.concat(r.path(s,n)):(null!=r&&i.push([r,s]),i)}removeChild(t){this.children.remove(t)}replaceWith(e,n){const r="string"==typeof e?this.scroll.create(e,n):e;return r instanceof t&&this.moveChildren(r),super.replaceWith(r)}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,r,s)=>{const i=t.split(r,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=[],r=[];t.forEach((t=>{t.target===this.domNode&&"childList"===t.type&&(n.push(...t.addedNodes),r.push(...t.removedNodes))})),r.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=Ae(t,this.scroll);(n.next!==e||null==n.next)&&(null!=n.parent&&n.parent.removeChild(this),this.insertBefore(n,e||void 0))})),this.enforceAllowedChildren()}};qe.uiClass="";const ke=qe,_e=class t extends ke{static create(t){return super.create(t)}static formats(e,n){const r=n.query(t.blotName);if(null==r||e.tagName!==r.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 ye(this.domNode)}format(e,n){if(e!==this.statics.blotName||n){const t=this.scroll.query(e,ce.INLINE);if(null==t)return;t instanceof ue?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,ce.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 r=this.next;r instanceof t&&r.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,r.formats())&&(r.moveChildren(this),r.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 r=super.wrap(e,n);return r instanceof t&&this.attributes.move(r),r}};_e.allowedChildren=[_e,Ee],_e.blotName="inline",_e.scope=ce.INLINE_BLOT,_e.tagName="SPAN";const Le=_e,Oe=class t extends ke{static create(t){return super.create(t)}static formats(e,n){const r=n.query(t.blotName);if(null==r||e.tagName!==r.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 ye(this.domNode)}format(e,n){const r=this.scroll.query(e,ce.BLOCK);null!=r&&(r instanceof ue?this.attributes.attribute(r,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,ce.BLOCK)?this.format(n,r):super.formatAt(t,e,n,r)}insertAt(t,e,n){if(null==n||null!=this.scroll.query(e,ce.INLINE))super.insertAt(t,e,n);else{const r=this.split(t);if(null==r)throw new Error("Attempt to insertAt after block boundaries");{const t=this.scroll.create(e,n);r.parent.insertBefore(t,r)}}}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()}};Oe.blotName="block",Oe.scope=ce.BLOCK_BLOT,Oe.tagName="P",Oe.allowedChildren=[Le,Oe,Ee];const Se=Oe,Te=class extends ke{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,r){super.formatAt(t,e,n,r),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())}};Te.blotName="container",Te.scope=ce.BLOCK_BLOT;const je=Te,Ce=class extends Ee{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,n,r){0===t&&e===this.length()?this.format(n,r):super.formatAt(t,e,n,r)}formats(){return this.statics.formats(this.domNode,this.scroll)}},Re={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Ie=class extends ke{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,Re),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=ce.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,r){this.update(),super.formatAt(t,e,n,r)}insertAt(t,e,n){this.update(),super.insertAt(t,e,n)}optimize(t=[],e={}){super.optimize(e);const n=e.mutationsMap||new WeakMap;let r=Array.from(this.observer.takeRecords());for(;r.length>0;)t.push(r.pop());const s=(t,e=!0)=>{null==t||t===this||null!=t.domNode.parentNode&&(n.has(t.domNode)||n.set(t.domNode,[]),e&&s(t.parent))},i=t=>{n.has(t.domNode)&&(t instanceof ke&&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?(s(this.find(t.previousSibling,!1)),Array.from(t.addedNodes).forEach((t=>{const e=this.find(t,!1);s(e,!1),e instanceof ke&&e.children.forEach((t=>{s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(i),o=Array.from(this.observer.takeRecords()),r=o.slice();r.length>0;)t.push(r.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)}};Ie.blotName="scroll",Ie.defaultChild=Se,Ie.allowedChildren=[Se,je],Ie.scope=ce.BLOCK_BLOT,Ie.tagName="DIV";const Me=Ie,Be=class t extends Ee{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}};Be.blotName="text",Be.scope=ce.INLINE_BLOT;const De=Be;var Ue=n(2660),Pe=lt(Object.keys,Object),ze=Object.prototype.hasOwnProperty,Fe=function(t){return Nt(t)?Xt(t):function(t){if(!ut(t))return Pe(t);var e=[];for(var n in Object(t))ze.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)},He=function(){return[]},$e=Object.prototype.propertyIsEnumerable,Ve=Object.getOwnPropertySymbols,Ke=Ve?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,s=0,i=[];++n<r;){var o=t[n];e(o,n,t)&&(i[s++]=o)}return i}(Ve(t),(function(e){return $e.call(t,e)})))}:He,We=function(t,e){for(var n=-1,r=e.length,s=t.length;++n<r;)t[s+n]=e[n];return t},Ze=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)We(e,Ke(t)),t=at(t);return e}:He,Ge=function(t,e,n){var r=e(t);return vt(t)?r:We(r,n(t))},Xe=function(t){return Ge(t,Fe,Ke)},Ye=function(t){return Ge(t,Jt,Ze)},Qe=R(d,"DataView"),Je=R(d,"Promise"),tn=R(d,"Set"),en=R(d,"WeakMap"),nn="[object Map]",rn="[object Promise]",sn="[object Set]",on="[object WeakMap]",ln="[object DataView]",an=k(Qe),cn=k(I),un=k(Je),hn=k(tn),dn=k(en),fn=x;(Qe&&fn(new Qe(new ArrayBuffer(1)))!=ln||I&&fn(new I)!=nn||Je&&fn(Je.resolve())!=rn||tn&&fn(new tn)!=sn||en&&fn(new en)!=on)&&(fn=function(t){var e=x(t),n="[object Object]"==e?t.constructor:void 0,r=n?k(n):"";if(r)switch(r){case an:return ln;case cn:return nn;case un:return rn;case hn:return sn;case dn:return on}return e});var pn=fn,gn=Object.prototype.hasOwnProperty,mn=/\w*$/,bn=f?f.prototype:void 0,yn=bn?bn.valueOf:void 0,vn=function(t,e,n){var r,s,i,o=t.constructor;switch(e){case"[object ArrayBuffer]":return nt(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return function(t,e){var n=e?nt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(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 rt(t,n);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(i=new(s=t).constructor(s.source,mn.exec(s))).lastIndex=s.lastIndex,i;case"[object Symbol]":return r=t,yn?Object(yn.call(r)):{}}},xn=Pt&&Pt.isMap,Nn=xn?Mt(xn):function(t){return dt(t)&&"[object Map]"==pn(t)},En=Pt&&Pt.isSet,wn=En?Mt(En):function(t){return dt(t)&&"[object Set]"==pn(t)},An="[object Arguments]",qn="[object Function]",kn="[object Object]",_n={};_n[An]=_n["[object Array]"]=_n["[object ArrayBuffer]"]=_n["[object DataView]"]=_n["[object Boolean]"]=_n["[object Date]"]=_n["[object Float32Array]"]=_n["[object Float64Array]"]=_n["[object Int8Array]"]=_n["[object Int16Array]"]=_n["[object Int32Array]"]=_n["[object Map]"]=_n["[object Number]"]=_n[kn]=_n["[object RegExp]"]=_n["[object Set]"]=_n["[object String]"]=_n["[object Symbol]"]=_n["[object Uint8Array]"]=_n["[object Uint8ClampedArray]"]=_n["[object Uint16Array]"]=_n["[object Uint32Array]"]=!0,_n["[object Error]"]=_n[qn]=_n["[object WeakMap]"]=!1;var Ln=function t(e,n,r,s,i,o){var l,a=1&n,c=2&n,u=4&n;if(r&&(l=i?r(e,s,i,o):r(e)),void 0!==l)return l;if(!N(e))return e;var h=vt(e);if(h){if(l=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&gn.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!a)return st(e,l)}else{var d=pn(e),f=d==qn||"[object GeneratorFunction]"==d;if(qt(e))return tt(e,a);if(d==kn||d==An||f&&!i){if(l=c||f?{}:ht(e),!a)return c?function(t,e){return Kt(t,Ze(t),e)}(e,function(t,e){return t&&Kt(e,Jt(e),t)}(l,e)):function(t,e){return Kt(t,Ke(t),e)}(e,function(t,e){return t&&Kt(e,Fe(e),t)}(l,e))}else{if(!_n[d])return i?e:{};l=vn(e,d,a)}}o||(o=new V);var p=o.get(e);if(p)return p;o.set(e,l),wn(e)?e.forEach((function(s){l.add(t(s,n,r,s,e,o))})):Nn(e)&&e.forEach((function(s,i){l.set(i,t(s,n,r,i,e,o))}));var g=h?void 0:(u?c?Ye:Xe:c?Jt:Fe)(e);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||e,(function(s,i){g&&(s=e[i=s]),Vt(l,i,t(s,n,r,i,e,o))})),l},On=function(t){return Ln(t,5)};function Sn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new H;++e<n;)this.add(t[e])}Sn.prototype.add=Sn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Sn.prototype.has=function(t){return this.__data__.has(t)};var Tn=Sn,jn=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},Cn=function(t,e,n,r,s,i){var o=1&n,l=t.length,a=e.length;if(l!=a&&!(o&&a>l))return!1;var c=i.get(t),u=i.get(e);if(c&&u)return c==e&&u==t;var h=-1,d=!0,f=2&n?new Tn:void 0;for(i.set(t,e),i.set(e,t);++h<l;){var p=t[h],g=e[h];if(r)var m=o?r(g,p,h,e,t,i):r(p,g,h,t,e,i);if(void 0!==m){if(m)continue;d=!1;break}if(f){if(!jn(e,(function(t,e){if(o=e,!f.has(o)&&(p===t||s(p,t,n,r,i)))return f.push(e);var o}))){d=!1;break}}else if(p!==g&&!s(p,g,n,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d},Rn=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},In=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Mn=f?f.prototype:void 0,Bn=Mn?Mn.valueOf:void 0,Dn=Object.prototype.hasOwnProperty,Un="[object Arguments]",Pn="[object Array]",zn="[object Object]",Fn=Object.prototype.hasOwnProperty,Hn=function(t,e,n,r,i,o){var l=vt(t),a=vt(e),c=l?Pn:pn(t),u=a?Pn:pn(e),h=(c=c==Un?zn:c)==zn,d=(u=u==Un?zn:u)==zn,f=c==u;if(f&&qt(t)){if(!qt(e))return!1;l=!0,h=!1}if(f&&!h)return o||(o=new V),l||Ft(t)?Cn(t,e,n,r,i,o):function(t,e,n,r,i,o,l){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||!o(new et(t),new et(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+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 a=Rn;case"[object Set]":var c=1&r;if(a||(a=In),t.size!=e.size&&!c)return!1;var u=l.get(t);if(u)return u==e;r|=2,l.set(t,e);var h=Cn(a(t),a(e),r,i,o,l);return l.delete(t),h;case"[object Symbol]":if(Bn)return Bn.call(t)==Bn.call(e)}return!1}(t,e,c,n,r,i,o);if(!(1&n)){var p=h&&Fn.call(t,"__wrapped__"),g=d&&Fn.call(e,"__wrapped__");if(p||g){var m=p?t.value():t,b=g?e.value():e;return o||(o=new V),i(m,b,n,r,o)}}return!!f&&(o||(o=new V),function(t,e,n,r,s,i){var o=1&n,l=Xe(t),a=l.length;if(a!=Xe(e).length&&!o)return!1;for(var c=a;c--;){var u=l[c];if(!(o?u in e:Dn.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(r)var b=o?r(m,g,u,e,t,i):r(g,m,u,t,e,i);if(!(void 0===b?g===m||s(g,m,n,r,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}(t,e,n,r,i,o))},$n=function t(e,n,r,s,i){return e===n||(null==e||null==n||!dt(e)&&!dt(n)?e!=e&&n!=n:Hn(e,n,r,s,t,i))},Vn=function(t,e){return $n(t,e)};class Kn extends Ce{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Kn.blotName="break",Kn.tagName="BR";var Wn=Kn;class Zn extends De{}const Gn={"&":"&","<":"<",">":">",'"':""","'":"'"};function Xn(t){return t.replace(/[&<>"']/g,(t=>Gn[t]))}class Yn extends Le{static allowedChildren=[Yn,Wn,Ce,Zn];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(t,e){const n=Yn.order.indexOf(t),r=Yn.order.indexOf(e);return n>=0||r>=0?n-r:t===e?0:t<e?-1:1}formatAt(t,e,n,r){if(Yn.compare(this.statics.blotName,n)<0&&this.scroll.query(n,ce.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 Yn&&Yn.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}var Qn=Yn;class Jn extends Se{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=er(this)),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,n,r){e<=0||(this.scroll.query(n,ce.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 r=e.split("\n"),s=r.shift();s.length>0&&(t<this.length()-1||null==this.children.tail?super.insertAt(Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let i=this;r.reduce(((t,e)=>(i=i.split(t,!0),i.insertAt(0,e),e.length)),t+s.length)}insertBefore(t,e){const{head:n}=this.children;super.insertBefore(t,e),n instanceof Wn&&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}}Jn.blotName="block",Jn.tagName="P",Jn.defaultChild=Wn,Jn.allowedChildren=[Wn,Qn,Ce,Zn];class tr extends Ce{attach(){super.attach(),this.attributes=new ye(this.domNode)}delta(){return(new Ue).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const n=this.scroll.query(t,ce.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}formatAt(t,e,n,r){this.format(n,r)}insertAt(t,e,n){if(null!=n)return void super.insertAt(t,e,n);const r=e.split("\n"),s=r.pop(),i=r.map((t=>{const e=this.scroll.create(Jn.blotName);return e.insertAt(0,t),e})),o=this.split(t);i.forEach((t=>{this.parent.insertBefore(t,o)})),s&&this.parent.insertBefore(this.scroll.create("text",s),o)}}function er(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.descendants(Ee).reduce(((t,n)=>0===n.length()?t:t.insert(n.value(),nr(n,{},e))),new Ue).insert("\n",nr(t))}function nr(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:nr(t.parent,e,n))}tr.scope=ce.BLOCK_BLOT;class rr extends Ce{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(rr.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!==ce.BLOCK_BLOT;)r+=n.offset(n.parent),n=n.parent;null!=n&&(this.savedLength=rr.CONTENTS.length,n.optimize(),n.formatAt(r,rr.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 Zn?this.prev:null,n=e?e.length():0,r=this.next instanceof Zn?this.next:null,s=r?r.text:"",{textNode:i}=this,o=i.data.split(rr.CONTENTS).join("");let l;if(i.data=rr.CONTENTS,e)l=e,(o||r)&&(e.insertAt(e.length(),o+s),r&&r.remove());else if(r)l=r,r.insertAt(0,o);else{const t=document.createTextNode(o);l=this.scroll.create(t),this.parent.insertBefore(l,this)}if(this.remove(),t){const s=(t,s)=>e&&t===e.domNode?s:t===i?n+s-1:r&&t===r.domNode?n+o.length+s:null,a=s(t.start.node,t.start.offset),c=s(t.end.node,t.end.offset);if(null!==a&&null!==c)return{startNode:l.domNode,startOffset:a,endNode:l.domNode,endOffset:c}}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=rr.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}}var sr=rr,ir=n(228),or=new WeakMap;const lr=["error","warn","log","info"];let ar="warn";function cr(t){if(ar&&lr.indexOf(t)<=lr.indexOf(ar)){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];console[t](...n)}}function ur(t){return lr.reduce(((e,n)=>(e[n]=cr.bind(console,n,t),e)),{})}ur.level=t=>{ar=t},cr.level=ur.level;var hr=ur;const dr=hr("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=or.get(t);n&&n.emitter&&n.emitter.handleDOM(...e)}))}))}));var fr=class extends ir{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",dr.error)}emit(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return dr.log.call(dr,...e),super.emit(...e)}handleDOM(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];(this.domListeners[t.type]||[]).forEach((e=>{let{node:r,handler:s}=e;(t.target===r||r.contains(t.target))&&s(t,...n)}))}listenDOM(t,e,n){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:e,handler:n})}};const pr=hr("quill:selection");class gr{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.index=t,this.length=e}}function mr(t,e){try{e.parentNode}catch(t){return!1}return t.contains(e)}var br=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 gr(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,fr.sources.USER),1)})),this.emitter.on(fr.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;const t=this.getNativeRange();null!=t&&t.start.node!==this.cursor.textNode&&this.emitter.once(fr.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 r=n.some((t=>"characterData"===t.type||"childList"===t.type||"attributes"===t.type&&t.target===this.root));this.update(r?fr.sources.SILENT:e)}catch(t){}}))})),this.emitter.on(fr.events.SCROLL_OPTIMIZE,((t,e)=>{if(e.range){const{startNode:t,startOffset:n,endNode:r,endOffset:s}=e.range;this.setNativeRange(t,n,r,s),this.update(fr.sources.SILENT)}})),this.update(fr.sources.SILENT)}handleComposition(){this.emitter.on(fr.events.COMPOSITION_BEFORE_START,(()=>{this.composing=!0})),this.emitter.on(fr.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(fr.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,ce.BLOCK)){if(n.start.node!==this.cursor.textNode){const t=this.scroll.find(n.start.node,!1);if(null==t)return;if(t instanceof Ee){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 r;t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;let[s,i]=this.scroll.leaf(t);if(null==s)return null;if(e>0&&i===s.length()){const[e]=this.scroll.leaf(t+1);if(e){const[n]=this.scroll.line(t),[r]=this.scroll.line(t+1);n===r&&(s=e,i=0)}}[r,i]=s.position(i,!0);const o=document.createRange();if(e>0)return o.setStart(r,i),[s,i]=this.scroll.leaf(t+e),null==s?null:([r,i]=s.position(i,!0),o.setEnd(r,i),o.getBoundingClientRect());let l,a="left";if(r instanceof Text){if(!r.data.length)return null;i<r.data.length?(o.setStart(r,i),o.setEnd(r,i+1)):(o.setStart(r,i-1),o.setEnd(r,i),a="right"),l=o.getBoundingClientRect()}else{if(!(s.domNode instanceof Element))return null;l=s.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 pr.info("getNativeRange",n),n}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}hasFocus(){return document.activeElement===this.root||null!=document.activeElement&&mr(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),s=r.offset(this.scroll);return 0===n?s:r instanceof Ee?s+r.index(e,n):s+r.length()})),r=Math.min(Math.max(...n),this.scroll.length()-1),s=Math.min(r,...n);return new gr(s,r-s)}normalizeNative(t){if(!mr(this.root,t.startContainer)||!t.collapsed&&!mr(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[r,s]=this.scroll.leaf(t);return r?r.position(s,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,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(pr.info("setNativeRange",t,e,n,r),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||s||t!==o.startContainer||e!==o.startOffset||n!==o.endContainer||r!==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&&(r=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);const s=document.createRange();s.setStart(t,e),s.setEnd(n,r),i.removeAllRanges(),i.addRange(s)}}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]:fr.sources.API;if("string"==typeof e&&(n=e,e=!1),pr.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]:fr.sources.USER;const e=this.lastRange,[n,r]=this.getRange();if(this.lastRange=n,this.lastNative=r,null!=this.lastRange&&(this.savedRange=this.lastRange),!Vn(e,this.lastRange)){if(!this.composing&&null!=r&&r.native.collapsed&&r.start.node!==this.cursor.textNode){const t=this.cursor.restore();t&&this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}const n=[fr.events.SELECTION_CHANGE,On(this.lastRange),On(e),t];this.emitter.emit(fr.events.EDITOR_CHANGE,...n),t!==fr.sources.SILENT&&this.emitter.emit(...n)}}};const yr=/^[ -~]*$/;function vr(t,e,n){if(0===t.length){const[t]=Er(n.pop());return e<=0?`</li></${t}>`:`</li></${t}>${vr([],e-1,n)}`}const[{child:r,offset:s,length:i,indent:o,type:l},...a]=t,[c,u]=Er(l);if(o>e)return n.push(l),o===e+1?`<${c}><li${u}>${xr(r,s,i)}${vr(a,o,n)}`:`<${c}><li>${vr(t,e+1,n)}`;const h=n[n.length-1];if(o===e&&l===h)return`</li><li${u}>${xr(r,s,i)}${vr(a,o,n)}`;const[d]=Er(n.pop());return`</li></${d}>${vr(t,e-1,n)}`}function xr(t,e,n){let r=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 Zn)return Xn(t.value().slice(e,e+n)).replaceAll(" "," ");if(t instanceof ke){if("list-container"===t.statics.blotName){const r=[];return t.children.forEachAt(e,n,((t,e,n)=>{const s="formats"in t&&"function"==typeof t.formats?t.formats():{};r.push({child:t,offset:e,length:n,indent:s.indent||0,type:s.list})})),vr(r,-1,[])}const s=[];if(t.children.forEachAt(e,n,((t,e,n)=>{s.push(xr(t,e,n))})),r||"list"===t.statics.blotName)return s.join("");const{outerHTML:i,innerHTML:o}=t.domNode,[l,a]=i.split(`>${o}<`);return"<table"===l?`<table style="border: 1px solid #000;">${s.join("")}<${a}`:`${l}>${s.join("")}<${a}`}return t.domNode instanceof Element?t.domNode.outerHTML:""}function Nr(t,e){return Object.keys(e).reduce(((n,r)=>{if(null==t[r])return n;const s=e[r];return s===t[r]?n[r]=s:Array.isArray(s)?s.indexOf(t[r])<0?n[r]=s.concat([t[r]]):n[r]=s:n[r]=[s,t[r]],n}),{})}function Er(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 wr(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 Ue)}function Ar(t,e){let{index:n,length:r}=t;return new gr(n+e,r)}var qr=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=wr(t),r=new Ue;return function(t){const e=[];return t.forEach((t=>{"string"==typeof t.insert?t.insert.split("\n").forEach(((n,r)=>{r&&e.push({insert:"\n",attributes:t.attributes}),n&&e.push({insert:n,attributes:t.attributes})})):e.push(t)})),e}(n.ops.slice()).reduce(((t,n)=>{const s=Ue.Op.length(n);let i=n.attributes||{},o=!1,l=!1;if(null!=n.insert){if(r.retain(s),"string"==typeof n.insert){const r=n.insert;l=!r.endsWith("\n")&&(e<=t||!!this.scroll.descendant(tr,t)[0]),this.scroll.insertAt(t,r);const[s,o]=this.scroll.line(t);let a=ae({},nr(s));if(s instanceof Jn){const[t]=s.descendant(Ee,o);t&&(a=ae(a,nr(t)))}i=Ue.AttributeMap.diff(a,i)||{}}else if("object"==typeof n.insert){const r=Object.keys(n.insert)[0];if(null==r)return t;const s=null!=this.scroll.query(r,ce.INLINE);if(s)(e<=t||this.scroll.descendant(tr,t)[0])&&(l=!0);else if(t>0){const[e,n]=this.scroll.descendant(Ee,t-1);e instanceof Zn?"\n"!==e.value()[n]&&(o=!0):e instanceof Ce&&e.statics.scope===ce.INLINE_BLOT&&(o=!0)}if(this.scroll.insertAt(t,r,n.insert[r]),s){const[e]=this.scroll.descendant(Ee,t);if(e){const t=ae({},nr(e));i=Ue.AttributeMap.diff(t,i)||{}}}}e+=s}else if(r.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(i).forEach((e=>{this.scroll.formatAt(t,s,e,i[e])}));const a=o?1:0,c=l?1:0;return e+=a+c,r.retain(a),r.delete(c),t+s+a+c}),0),r.reduce(((t,e)=>"number"==typeof e.delete?(this.scroll.deleteAt(t,e.delete),t):t+Ue.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 Ue).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((r=>{this.scroll.lines(t,Math.max(e,1)).forEach((t=>{t.format(r,n[r])}))})),this.scroll.optimize();const r=(new Ue).retain(t).retain(e,On(n));return this.update(r)}formatText(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(n).forEach((r=>{this.scroll.formatAt(t,e,r,n[r])}));const r=(new Ue).retain(t).retain(e,On(n));return this.update(r)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce(((t,e)=>t.concat(e.delta())),new Ue)}getFormat(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((t=>{const[e]=t;e instanceof Jn?n.push(e):e instanceof Ee&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(Ee,t,e));const[s,i]=[n,r].map((t=>{const e=t.shift();if(null==e)return{};let n=nr(e);for(;Object.keys(n).length>0;){const e=t.shift();if(null==e)return n;n=Nr(nr(e),n)}return n}));return{...s,...i}}getHTML(t,e){const[n,r]=this.scroll.line(t);if(n){const s=n.length();return n.length()>=r+e&&(0!==r||e!==s)?xr(n,r,e,!0):xr(this.scroll,t,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=wr(e),r=(new Ue).retain(t).concat(n);return this.scroll.insertContents(t,n),this.update(r)}insertEmbed(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new Ue).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((r=>{this.scroll.formatAt(t,e.length,r,n[r])})),this.update((new Ue).retain(t).insert(e,On(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!==Jn.blotName)return!1;const e=t;return!(e.children.length>1)&&e.children.head instanceof Wn}removeFormat(t,e){const n=this.getText(t,e),[r,s]=this.scroll.line(t+e);let i=0,o=new Ue;null!=r&&(i=r.length()-s,o=r.delta().slice(s,s+i-1).insert("\n"));const l=this.getContents(t,e+i).diff((new Ue).insert(n).concat(o)),a=(new Ue).retain(t).concat(l);return this.applyDelta(a)}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 r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(yr)&&this.scroll.find(e[0].target)){const s=this.scroll.find(e[0].target),i=nr(s),o=s.offset(this.scroll),l=e[0].oldValue.replace(sr.CONTENTS,""),a=(new Ue).insert(l),c=(new Ue).insert(s.value()),u=n&&{oldRange:Ar(n.oldRange,-o),newRange:Ar(n.newRange,-o)};t=(new Ue).retain(o).concat(a.diff(c,u)).reduce(((t,e)=>e.insert?t.insert(e.insert,i):t.push(e)),new Ue),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&Vn(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}},kr=class{static DEFAULTS={};constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.quill=t,this.options=e}};const _r="\ufeff";var Lr=class extends Ce{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(_r),this.rightGuard=document.createTextNode(_r),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 r=t.data.split(_r).join("");if(t===this.leftGuard)if(this.prev instanceof Zn){const t=this.prev.length();this.prev.insertAt(t,r),n={startNode:this.prev.domNode,startOffset:t+r.length}}else e=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(e),this),n={startNode:e,startOffset:r.length};else t===this.rightGuard&&(this.next instanceof Zn?(this.next.insertAt(0,r),n={startNode:this.next.domNode,startOffset:r.length}):(e=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(e),this.next),n={startNode:e,startOffset:r.length}));return t.data=_r,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)}}))}},Or=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 Lr||(this.emitter.emit(fr.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(fr.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(fr.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(fr.events.COMPOSITION_END,t),this.isComposing=!1}};class Sr{static DEFAULTS={modules:{}};static themes={default:Sr};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]}}var Tr=Sr;const jr=t=>{const e=t.getBoundingClientRect(),n="offsetWidth"in t&&Math.abs(e.width)/t.offsetWidth||1,r="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*r,left:e.left}},Cr=t=>{const e=parseInt(t,10);return Number.isNaN(e)?0:e},Rr=(t,e,n,r,s,i)=>t<n&&e>r?0:t<n?-(n-t+s):e>r?e-t>r-n?t+s-n:e-r+i:0;const Ir=["block","break","cursor","inline","scroll","text"];const Mr=hr("quill"),Br=new fe;ke.uiClass="ql-ui";class Dr{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Br,theme:"default"};static events=fr.events;static sources=fr.sources;static version="2.0.3";static imports={delta:Ue,parchment:r,"core/module":kr,"core/theme":Tr};static debug(t){!0===t&&(t="log"),hr.level(t)}static find(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return or.get(t)||Br.find(t,e)}static import(t){return null==this.imports[t]&&Mr.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if("string"!=typeof(arguments.length<=0?void 0:arguments[0])){const t=arguments.length<=0?void 0:arguments[0],e=!!(arguments.length<=1?void 0:arguments[1]),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{const t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],n=!!(arguments.length<=2?void 0:arguments[2]);null==this.imports[t]||n||Mr.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&"boolean"!=typeof e&&"abstract"!==e.blotName&&Br.register(e),"function"==typeof e.register&&e.register(Br)}}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.options=function(t,e){const n=Ur(t);if(!n)throw new Error("Invalid Quill container");const r=!e.theme||e.theme===Dr.DEFAULTS.theme?Tr:Dr.import(`themes/${e.theme}`);if(!r)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:s,...i}=Dr.DEFAULTS,{modules:o,...l}=r.DEFAULTS;let a=Pr(e.modules);null!=a&&a.toolbar&&a.toolbar.constructor!==Object&&(a={...a,toolbar:{container:a.toolbar}});const c=ae({},Pr(s),Pr(o),a),u={...i,...zr(l),...zr(e)};let h=e.registry;return h?e.formats&&Mr.warn('Ignoring "formats" option because "registry" is specified'):h=e.formats?((t,e,n)=>{const r=new fe;return Ir.forEach((t=>{const n=e.query(t);n&&r.register(n)})),t.forEach((t=>{let s=e.query(t);s||n.error(`Cannot register "${t}" specified in "formats" config. Are you sure it was registered?`);let i=0;for(;s;)if(r.register(s),s="blotName"in s?s.requiredContainer??null:null,i+=1,i>100){n.error(`Cycle detected in registering blot requiredContainer: "${t}"`);break}})),r})(e.formats,u.registry,Mr):u.registry,{...u,registry:h,container:n,theme:r,modules:Object.entries(c).reduce(((t,e)=>{let[n,r]=e;if(!r)return t;const s=Dr.import(`modules/${n}`);return null==s?(Mr.error(`Cannot load ${n} module. Are you sure you registered it?`),t):{...t,[n]:ae({},s.DEFAULTS||{},r)}}),{}),bounds:Ur(u.bounds)}}(t,e),this.container=this.options.container,null==this.container)return void Mr.error("Invalid Quill container",t);this.options.debug&&Dr.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",or.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new fr;const r=Me.blotName,s=this.options.registry.query(r);if(!s||!("blotName"in s))throw new Error(`Cannot initialize Quill without "${r}" blot`);if(this.scroll=new s(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new qr(this.scroll),this.selection=new br(this.scroll,this.emitter),this.composition=new Or(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(fr.events.EDITOR_CHANGE,(t=>{t===fr.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())})),this.emitter.on(fr.events.SCROLL_UPDATE,((t,e)=>{const n=this.selection.lastRange,[r]=this.selection.getRange(),s=n&&r?{oldRange:n,newRange:r}:void 0;Fr.call(this,(()=>this.editor.update(null,e,s)),t)})),this.emitter.on(fr.events.SCROLL_EMBED_UPDATE,((t,e)=>{const n=this.selection.lastRange,[r]=this.selection.getRange(),s=n&&r?{oldRange:n,newRange:r}:void 0;Fr.call(this,(()=>{const n=(new Ue).retain(t.offset(this)).retain({[t.statics.blotName]:e});return this.editor.update(n,[],s)}),Dr.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]=Hr(t,e,n),Fr.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]:fr.sources.API;return Fr.call(this,(()=>{const n=this.getSelection(!0);let r=new Ue;if(null==n)return r;if(this.scroll.query(t,ce.BLOCK))r=this.editor.formatLine(n.index,n.length,{[t]:e});else{if(0===n.length)return this.selection.format(t,e),r;r=this.editor.formatText(n.index,n.length,{[t]:e})}return this.setSelection(n,fr.sources.SILENT),r}),n)}formatLine(t,e,n,r,s){let i;return[t,e,i,s]=Hr(t,e,n,r,s),Fr.call(this,(()=>this.editor.formatLine(t,e,i)),s,t,0)}formatText(t,e,n,r,s){let i;return[t,e,i,s]=Hr(t,e,n,r,s),Fr.call(this,(()=>this.editor.formatText(t,e,i)),s,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 r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.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]=Hr(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]=Hr(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]=Hr(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Dr.sources.API;return Fr.call(this,(()=>this.editor.insertEmbed(t,e,n)),r,t)}insertText(t,e,n,r,s){let i;return[t,,i,s]=Hr(t,0,n,r,s),Fr.call(this,(()=>this.editor.insertText(t,e,i)),s,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]=Hr(t,e,n),Fr.call(this,(()=>this.editor.removeFormat(t,e)),n,t)}scrollRectIntoView(t){((t,e)=>{const n=t.ownerDocument;let r=e,s=t;for(;s;){const t=s===n.body,e=t?{top:0,right:window.visualViewport?.width??n.documentElement.clientWidth,bottom:window.visualViewport?.height??n.documentElement.clientHeight,left:0}:jr(s),o=getComputedStyle(s),l=Rr(r.left,r.right,e.left,e.right,Cr(o.scrollPaddingLeft),Cr(o.scrollPaddingRight)),a=Rr(r.top,r.bottom,e.top,e.bottom,Cr(o.scrollPaddingTop),Cr(o.scrollPaddingBottom));if(l||a)if(t)n.defaultView?.scrollBy(l,a);else{const{scrollLeft:t,scrollTop:e}=s;a&&(s.scrollTop+=a),l&&(s.scrollLeft+=l);const n=s.scrollLeft-t,i=s.scrollTop-e;r={left:r.left-n,top:r.top-i,right:r.right-n,bottom:r.bottom-i}}s=t||"fixed"===o.position?null:(i=s).parentElement||i.getRootNode().host||null}var i})(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]:fr.sources.API;return Fr.call(this,(()=>{t=new Ue(t);const e=this.getLength(),n=this.editor.deleteText(0,e),r=this.editor.insertContents(0,t),s=this.editor.deleteText(this.getLength()-1,1);return n.compose(r).compose(s)}),e)}setSelection(t,e,n){null==t?this.selection.setRange(null,e||Dr.sources.API):([t,e,,n]=Hr(t,e,n),this.selection.setRange(new gr(Math.max(0,t),e),n),n!==fr.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fr.sources.API;const n=(new Ue).insert(t);return this.setContents(n,e)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fr.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]:fr.sources.API;return Fr.call(this,(()=>(t=new Ue(t),this.editor.applyDelta(t))),e,!0)}}function Ur(t){return"string"==typeof t?document.querySelector(t):t}function Pr(t){return Object.entries(t??{}).reduce(((t,e)=>{let[n,r]=e;return{...t,[n]:!0===r?{}:r}}),{})}function zr(t){return Object.fromEntries(Object.entries(t).filter((t=>void 0!==t[1])))}function Fr(t,e,n,r){if(!this.isEnabled()&&e===fr.sources.USER&&!this.allowReadOnlyEdits)return new Ue;let s=null==n?null:this.getSelection();const i=this.editor.delta,o=t();if(null!=s&&(!0===n&&(n=s.index),null==r?s=$r(s,o,e):0!==r&&(s=$r(s,n,r,e)),this.setSelection(s,fr.sources.SILENT)),o.length()>0){const t=[fr.events.TEXT_CHANGE,o,i,e];this.emitter.emit(fr.events.EDITOR_CHANGE,...t),e!==fr.sources.SILENT&&this.emitter.emit(...t)}return o}function Hr(t,e,n,r,s){let i={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(s=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(s=r,r=n,n=e,e=0),"object"==typeof n?(i=n,s=r):"string"==typeof n&&(null!=r?i[n]=r:s=n),[t,e,i,s=s||fr.sources.API]}function $r(t,e,n,r){const s="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,r!==fr.sources.USER))):[i,o]=[t.index,t.index+t.length].map((t=>t<e||t===e&&r===fr.sources.USER?t:s>=0?t+s:Math.max(e,t+s))),new gr(i,o-i)}var Vr=class extends je{};function Kr(t){return t instanceof Jn||t instanceof tr}function Wr(t){return"function"==typeof t.updateContent}function Zr(t,e,n){n.reduce(((e,n)=>{const r=Ue.Op.length(n);let s=n.attributes||{};if(null!=n.insert)if("string"==typeof n.insert){const r=n.insert;t.insertAt(e,r);const[i]=t.descendant(Ee,e),o=nr(i);s=Ue.AttributeMap.diff(o,s)||{}}else if("object"==typeof n.insert){const r=Object.keys(n.insert)[0];if(null==r)return e;if(t.insertAt(e,r,n.insert[r]),null!=t.scroll.query(r,ce.INLINE)){const[n]=t.descendant(Ee,e),r=nr(n);s=Ue.AttributeMap.diff(r,s)||{}}}return Object.keys(s).forEach((n=>{t.formatAt(e,r,n,s[n])})),e+r}),e)}const Gr={scope:ce.BLOCK,whitelist:["right","center","justify"]},Xr=new ue("align","align",Gr),Yr=new ge("align","ql-align",Gr),Qr=new be("align","text-align",Gr);class Jr extends be{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${e.split(",").map((t=>`00${parseInt(t,10).toString(16)}`.slice(-2))).join("")}`):e}}const ts=new ge("color","ql-color",{scope:ce.INLINE}),es=new Jr("color","color",{scope:ce.INLINE}),ns=new ge("background","ql-bg",{scope:ce.INLINE}),rs=new Jr("background","background-color",{scope:ce.INLINE});class ss extends Vr{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${Xn(this.code(t,e))}\n</pre>`}}class is extends Jn{static TAB=" ";static register(){Dr.register(ss)}}class os extends Qn{}os.blotName="code",os.tagName="CODE",is.blotName="code-block",is.className="ql-code-block",is.tagName="DIV",ss.blotName="code-block-container",ss.className="ql-code-block-container",ss.tagName="DIV",ss.allowedChildren=[is],is.allowedChildren=[Zn,Wn,sr],is.requiredContainer=ss;const ls={scope:ce.BLOCK,whitelist:["rtl"]},as=new ue("direction","dir",ls),cs=new ge("direction","ql-direction",ls),us=new be("direction","direction",ls),hs={scope:ce.INLINE,whitelist:["serif","monospace"]},ds=new ge("font","ql-font",hs),fs=new class extends be{value(t){return super.value(t).replace(/["']/g,"")}}("font","font-family",hs),ps=new ge("size","ql-size",{scope:ce.INLINE,whitelist:["small","large","huge"]}),gs=new be("size","font-size",{scope:ce.INLINE,whitelist:["10px","18px","32px"]}),ms=hr("quill:keyboard"),bs=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class ys extends kr{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 r=function(t){if("string"==typeof t||"number"==typeof t)t={key:t};else{if("object"!=typeof t)return null;t=On(t)}return t.shortKey&&(t[bs]=t.shortKey,delete t.shortKey),t}(t);null!=r?("function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),(Array.isArray(r.key)?r.key:[r.key]).forEach((t=>{const s={...r,key:t,...e,...n};this.bindings[s.key]=this.bindings[s.key]||[],this.bindings[s.key].push(s)}))):ms.warn("Attempted to add invalid keyboard binding",r)}listen(){this.quill.root.addEventListener("keydown",(t=>{if(t.defaultPrevented||t.isComposing)return;if(229===t.keyCode&&("Enter"===t.key||"Backspace"===t.key))return;const e=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter((e=>ys.match(t,e)));if(0===e.length)return;const n=Dr.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[s,i]=this.quill.getLine(r.index),[o,l]=this.quill.getLeaf(r.index),[a,c]=0===r.length?[o,l]:this.quill.getLeaf(r.index+r.length),u=o instanceof De?o.value().slice(0,l):"",h=a instanceof De?a.value().slice(c):"",d={collapsed:0===r.length,empty:0===r.length&&s.length()<=1,format:this.quill.getFormat(r),line:s,offset:i,prefix:u,suffix:h,event:t};e.some((t=>{if(null!=t.collapsed&&t.collapsed!==d.collapsed)return!1;if(null!=t.empty&&t.empty!==d.empty)return!1;if(null!=t.offset&&t.offset!==d.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((t=>null==d.format[t])))return!1}else if("object"==typeof t.format&&!Object.keys(t.format).every((e=>!0===t.format[e]?null!=d.format[e]:!1===t.format[e]?null==d.format[e]:Vn(t.format[e],d.format[e]))))return!1;return!(null!=t.prefix&&!t.prefix.test(d.prefix)||null!=t.suffix&&!t.suffix.test(d.suffix)||!0===t.handler.call(this,r,d,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 r={};const[s]=this.quill.getLine(t.index);let i=(new Ue).retain(t.index-n).delete(n);if(0===e.offset){const[e]=this.quill.getLine(t.index-1);if(e&&!("block"===e.statics.blotName&&e.length()<=1)){const e=s.formats(),n=this.quill.getFormat(t.index-1,1);if(r=Ue.AttributeMap.diff(e,n)||{},Object.keys(r).length>0){const e=(new Ue).retain(t.index+s.length()-2).retain(1,r);i=i.compose(e)}}}this.quill.updateContents(i,Dr.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 r={};const[s]=this.quill.getLine(t.index);let i=(new Ue).retain(t.index).delete(n);if(e.offset>=s.length()-1){const[e]=this.quill.getLine(t.index+1);if(e){const n=s.formats(),o=this.quill.getFormat(t.index,1);r=Ue.AttributeMap.diff(n,o)||{},Object.keys(r).length>0&&(i=i.retain(e.length()-1).retain(1,r))}}this.quill.updateContents(i,Dr.sources.USER),this.quill.focus()}handleDeleteRange(t){As({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,ce.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t)),{}),r=(new Ue).retain(t.index).delete(t.length).insert("\n",n);this.quill.updateContents(r,Dr.sources.USER),this.quill.setSelection(t.index+1,Dr.sources.SILENT),this.quill.focus()}}const vs={bindings:{bold:Es("bold"),italic:Es("italic"),underline:Es("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","+1",Dr.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",Dr.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",Dr.sources.USER):null!=e.format.list&&this.quill.format("list",!1,Dr.sources.USER)}},"indent code-block":xs(!0),"outdent code-block":xs(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(t){this.quill.deleteText(t.index-1,1,Dr.sources.USER)}},tab:{key:"Tab",handler(t,e){if(e.format.table)return!0;this.quill.history.cutoff();const n=(new Ue).retain(t.index).delete(t.length).insert("\t");return this.quill.updateContents(n,Dr.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,Dr.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,Dr.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,Dr.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(t){const[e,n]=this.quill.getLine(t.index),r={...e.formats(),list:"checked"},s=(new Ue).retain(t.index).insert("\n",r).retain(e.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,Dr.sources.USER),this.quill.setSelection(t.index+1,Dr.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(t,e){const[n,r]=this.quill.getLine(t.index),s=(new Ue).retain(t.index).insert("\n",e.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(s,Dr.sources.USER),this.quill.setSelection(t.index+1,Dr.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,r,s,i]=e.getTable(t),o=function(t,e,n,r){return null==e.prev&&null==e.next?null==n.prev&&null==n.next?0===r?-1:1:null==n.prev?-1:1:null==e.prev?-1:null==e.next?1:null}(0,r,s,i);if(null==o)return;let l=n.offset();if(o<0){const e=(new Ue).retain(l).insert("\n");this.quill.updateContents(e,Dr.sources.USER),this.quill.setSelection(t.index+1,t.length,Dr.sources.SILENT)}else if(o>0){l+=n.length();const t=(new Ue).retain(l).insert("\n");this.quill.updateContents(t,Dr.sources.USER),this.quill.setSelection(l,Dr.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(t,e){const{event:n,line:r}=e,s=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(s-1,Dr.sources.USER):this.quill.setSelection(s+r.length(),Dr.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,[r,s]=this.quill.getLine(t.index);if(s>n)return!0;let i;switch(e.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(t.index," ",Dr.sources.USER),this.quill.history.cutoff();const o=(new Ue).retain(t.index-s).delete(n+1).retain(r.length()-2-s).retain(1,{list:i});return this.quill.updateContents(o,Dr.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,Dr.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 r=2,s=e;for(;null!=s&&s.length()<=1&&s.formats()["code-block"];)if(s=s.prev,r-=1,r<=0){const r=(new Ue).retain(t.index+e.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(r,Dr.sources.USER),this.quill.setSelection(t.index-1,Dr.sources.SILENT),!1}return!0}},"embed left":Ns("ArrowLeft",!1),"embed left shift":Ns("ArrowLeft",!0),"embed right":Ns("ArrowRight",!1),"embed right shift":Ns("ArrowRight",!0),"table down":ws(!1),"table up":ws(!0)}};function xs(t){return{key:"Tab",shiftKey:!t,format:{"code-block":!0},handler(e,n){let{event:r}=n;const s=this.quill.scroll.query("code-block"),{TAB:i}=s;if(0===e.length&&!r.shiftKey)return this.quill.insertText(e.index,i,Dr.sources.USER),void this.quill.setSelection(e.index+i.length,Dr.sources.SILENT);const o=0===e.length?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:l,length:a}=e;o.forEach(((e,n)=>{t?(e.insertAt(0,i),0===n?l+=i.length:a+=i.length):e.domNode.textContent.startsWith(i)&&(e.deleteAt(0,i.length),0===n?l-=i.length:a-=i.length)})),this.quill.update(Dr.sources.USER),this.quill.setSelection(l,a,Dr.sources.SILENT)}}}function Ns(t,e){const n="ArrowLeft"===t?"prefix":"suffix";return{key:t,shiftKey:e,altKey:null,[n]:/^$/,handler(n){let{index:r}=n;"ArrowRight"===t&&(r+=n.length+1);const[s]=this.quill.getLeaf(r);return!(s instanceof Ce&&("ArrowLeft"===t?e?this.quill.setSelection(n.index-1,n.length+1,Dr.sources.USER):this.quill.setSelection(n.index-1,Dr.sources.USER):e?this.quill.setSelection(n.index,n.length+1,Dr.sources.USER):this.quill.setSelection(n.index+n.length+1,Dr.sources.USER),1))}}}function Es(t){return{key:t[0],shortKey:!0,handler(e,n){this.quill.format(t,!n.format[t],Dr.sources.USER)}}}function ws(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,n){const r=t?"prev":"next",s=n.line,i=s.parent[r];if(null!=i){if("table-row"===i.statics.blotName){let t=i.children.head,e=s;for(;null!=e.prev;)e=e.prev,t=t.next;const r=t.offset(this.quill.scroll)+Math.min(n.offset,t.length()-1);this.quill.setSelection(r,0,Dr.sources.USER)}}else{const e=s.table()[r];null!=e&&(t?this.quill.setSelection(e.offset(this.quill.scroll)+e.length()-1,0,Dr.sources.USER):this.quill.setSelection(e.offset(this.quill.scroll),0,Dr.sources.USER))}return!1}}}function As(t){let{quill:e,range:n}=t;const r=e.getLines(n);let s={};if(r.length>1){const t=r[0].formats(),e=r[r.length-1].formats();s=Ue.AttributeMap.diff(e,t)||{}}e.deleteText(n,Dr.sources.USER),Object.keys(s).length>0&&e.formatLine(n.index,1,s,Dr.sources.USER),e.setSelection(n.index,Dr.sources.SILENT)}ys.DEFAULTS=vs;const qs=/font-weight:\s*normal/,ks=["P","OL","UL"],_s=t=>t&&ks.includes(t.tagName),Ls=/\bmso-list:[^;]*ignore/i,Os=/\bmso-list:[^;]*\bl(\d+)/i,Ss=/\bmso-list:[^;]*\blevel(\d+)/i,Ts=[function(t){"urn:schemas-microsoft-com:office:word"===t.documentElement.getAttribute("xmlns:w")&&(t=>{const e=Array.from(t.querySelectorAll("[style*=mso-list]")),n=[],r=[];e.forEach((t=>{(t.getAttribute("style")||"").match(Ls)?n.push(t):r.push(t)})),n.forEach((t=>t.parentNode?.removeChild(t)));const s=t.documentElement.innerHTML,i=r.map((t=>((t,e)=>{const n=t.getAttribute("style"),r=n?.match(Os);if(!r)return null;const s=Number(r[1]),i=n?.match(Ss),o=i?Number(i[1]):1,l=new RegExp(`@list l${s}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),a=e.match(l);return{id:s,indent:o,type:a&&"bullet"===a[1]?"bullet":"ordered",element:t}})(t,s))).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 r=t[0]?.element,{parentNode:s}=r??{};r&&s?.replaceChild(n,r),t.slice(1).forEach((t=>{let{element:e}=t;s?.removeChild(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(qs))).forEach((e=>{const n=t.createDocumentFragment();n.append(...e.childNodes),e.parentNode?.replaceChild(n,e)}))})(t),(t=>{Array.from(t.querySelectorAll("br")).filter((t=>_s(t.previousElementSibling)&&_s(t.nextElementSibling))).forEach((t=>{t.parentNode?.removeChild(t)}))})(t))}];const js=hr("quill:clipboard"),Cs=[[Node.TEXT_NODE,function(t,e,n){let r=t.data;if("O:P"===t.parentElement?.tagName)return e.insert(r.trim());if(!Ps(t)){if(0===r.trim().length&&r.includes("\n")&&!function(t,e){return t.previousElementSibling&&t.nextElementSibling&&!Ds(t.previousElementSibling,e)&&!Ds(t.nextElementSibling,e)}(t,n))return e;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(null==t.previousSibling&&null!=t.parentElement&&Ds(t.parentElement,n)||t.previousSibling instanceof Element&&Ds(t.previousSibling,n))&&(r=r.replace(/^ /,"")),(null==t.nextSibling&&null!=t.parentElement&&Ds(t.parentElement,n)||t.nextSibling instanceof Element&&Ds(t.nextSibling,n))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return e.insert(r)}],[Node.TEXT_NODE,Hs],["br",function(t,e){return Bs(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,Hs],[Node.ELEMENT_NODE,function(t,e,n){const r=n.query(t);if(null==r)return e;if(r.prototype instanceof Ce){const e={},s=r.value(t);if(null!=s)return e[r.blotName]=s,(new Ue).insert(e,r.formats(t,n))}else if(r.prototype instanceof Se&&!Bs(e,"\n")&&e.insert("\n"),"blotName"in r&&"formats"in r&&"function"==typeof r.formats)return Ms(e,r.blotName,r.formats(t,n),n);return e}],[Node.ELEMENT_NODE,function(t,e,n){const r=ue.keys(t),s=ge.keys(t),i=be.keys(t),o={};return r.concat(s).concat(i).forEach((e=>{let r=n.query(e,ce.ATTRIBUTE);null!=r&&(o[r.attrName]=r.value(t),o[r.attrName])||(r=Rs[e],null==r||r.attrName!==e&&r.keyName!==e||(o[r.attrName]=r.value(t)||void 0),r=Is[e],null==r||r.attrName!==e&&r.keyName!==e||(r=Is[e],o[r.attrName]=r.value(t)||void 0))})),Object.entries(o).reduce(((t,e)=>{let[r,s]=e;return Ms(t,r,s,n)}),e)}],[Node.ELEMENT_NODE,function(t,e,n){const r={},s=t.style||{};return"italic"===s.fontStyle&&(r.italic=!0),"underline"===s.textDecoration&&(r.underline=!0),"line-through"===s.textDecoration&&(r.strike=!0),(s.fontWeight?.startsWith("bold")||parseInt(s.fontWeight,10)>=700)&&(r.bold=!0),e=Object.entries(r).reduce(((t,e)=>{let[r,s]=e;return Ms(t,r,s,n)}),e),parseFloat(s.textIndent||0)>0?(new Ue).insert("\t").concat(e):e}],["li",function(t,e,n){const r=n.query(t);if(null==r||"list"!==r.blotName||!Bs(e,"\n"))return e;let s=-1,i=t.parentNode;for(;null!=i;)["OL","UL"].includes(i.tagName)&&(s+=1),i=i.parentNode;return s<=0?e:e.reduce(((t,e)=>e.insert?e.attributes&&"number"==typeof e.attributes.indent?t.push(e):t.insert(e.insert,{indent:s,...e.attributes||{}}):t),new Ue)}],["ol, ul",function(t,e,n){const r=t;let s="OL"===r.tagName?"ordered":"bullet";const i=r.getAttribute("data-checked");return i&&(s="true"===i?"checked":"unchecked"),Ms(e,"list",s,n)}],["pre",function(t,e,n){const r=n.query("code-block");return Ms(e,"code-block",!r||!("formats"in r)||"function"!=typeof r.formats||r.formats(t,n),n)}],["tr",function(t,e,n){const r="TABLE"===t.parentElement?.tagName?t.parentElement:t.parentElement?.parentElement;return null!=r?Ms(e,"table",Array.from(r.querySelectorAll("tr")).indexOf(t)+1,n):e}],["b",Fs("bold")],["i",Fs("italic")],["strike",Fs("strike")],["style",function(){return new Ue}]],Rs=[Xr,as].reduce(((t,e)=>(t[e.keyName]=e,t)),{}),Is=[Qr,rs,es,us,fs,gs].reduce(((t,e)=>(t[e.keyName]=e,t)),{});function Ms(t,e,n,r){return r.query(e)?t.reduce(((t,r)=>{if(!r.insert)return t;if(r.attributes&&r.attributes[e])return t.push(r);const s=n?{[e]:n}:{};return t.insert(r.insert,{...s,...r.attributes})}),new Ue):t}function Bs(t,e){let n="";for(let r=t.ops.length-1;r>=0&&n.length<e.length;--r){const e=t.ops[r];if("string"!=typeof e.insert)break;n=e.insert+n}return n.slice(-1*e.length)===e}function Ds(t,e){if(!(t instanceof Element))return!1;const n=e.query(t);return!(n&&n.prototype instanceof Ce)&&["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 Us=new WeakMap;function Ps(t){return null!=t&&(Us.has(t)||("PRE"===t.tagName?Us.set(t,!0):Us.set(t,Ps(t.parentNode))),Us.get(t))}function zs(t,e,n,r,s){return e.nodeType===e.TEXT_NODE?r.reduce(((n,r)=>r(e,n,t)),new Ue):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce(((i,o)=>{let l=zs(t,o,n,r,s);return o.nodeType===e.ELEMENT_NODE&&(l=n.reduce(((e,n)=>n(o,e,t)),l),l=(s.get(o)||[]).reduce(((e,n)=>n(o,e,t)),l)),i.concat(l)}),new Ue):new Ue}function Fs(t){return(e,n,r)=>Ms(n,t,!0,r)}function Hs(t,e,n){if(!Bs(e,"\n")){if(Ds(t,n)&&(t.childNodes.length>0||t instanceof HTMLParagraphElement))return e.insert("\n");if(e.length()>0&&t.nextSibling){let r=t.nextSibling;for(;null!=r;){if(Ds(r,n))return e.insert("\n");const t=n.query(r);if(t&&t.prototype instanceof tr)return e.insert("\n");r=r.firstChild}}}return e}function $s(t,e){let n=e;for(let e=t.length-1;e>=0;e-=1){const r=t[e];t[e]={delta:n.transform(r.delta,!0),range:r.range&&Vs(r.range,n)},n=r.delta.transform(n),0===t[e].delta.length()&&t.splice(e,1)}}function Vs(t,e){if(!t)return t;const n=e.transformPosition(t.index);return{index:n,length:e.transformPosition(t.index+t.length)-n}}class Ks extends kr{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 r=n&&t.selection.normalizeNative(n);if(r){const n=t.selection.normalizedToRange(r);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)}}Ks.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,e){if(!this.quill.scroll.query("image"))return;const n=e.map((t=>new Promise((e=>{const n=new FileReader;n.onload=()=>{e(n.result)},n.readAsDataURL(t)}))));Promise.all(n).then((e=>{const n=e.reduce(((t,e)=>t.insert({image:e})),(new Ue).retain(t.index).delete(t.length));this.quill.updateContents(n,fr.sources.USER),this.quill.setSelection(t.index+e.length,fr.sources.SILENT)}))}};var Ws=Ks;const Zs=["insertText","insertReplacementText"];const Gs=/Mac/i.test(navigator.platform);Dr.register({"blots/block":Jn,"blots/block/embed":tr,"blots/break":Wn,"blots/container":Vr,"blots/cursor":sr,"blots/embed":Lr,"blots/inline":Qn,"blots/scroll":class extends Me{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=Jn;static allowedChildren=[Jn,tr,Vr];constructor(t,e,n){let{emitter:r}=n;super(t,e),this.emitter=r,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(fr.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(fr.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,e){this.emitter.emit(fr.events.SCROLL_EMBED_UPDATE,t,e)}deleteAt(t,e){const[n,r]=this.line(t),[s]=this.line(t+e);if(super.deleteAt(t,e),null!=s&&n!==s&&r>0){if(n instanceof tr||s instanceof tr)return void this.optimize();const t=s.children.head instanceof Wn?null:s.children.head;n.moveChildren(s,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,r){super.formatAt(t,e,n,r),this.optimize()}insertAt(t,e,n){if(t>=this.length())if(null==n||null==this.scroll.query(e,ce.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===ce.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 Ue).insert("\n"))),r=n.pop();if(null==r)return;this.batchStart();const s=n.shift();if(s){const e="block"===s.type&&(0===s.delta.length()||!this.descendant(tr,t)[0]&&t<this.length()),n="block"===s.type?s.delta:(new Ue).insert({[s.key]:s.value});Zr(this,t,n);const r="block"===s.type?1:0,i=t+n.length()+r;e&&this.insertAt(i-1,"\n");const o=nr(this.line(t)[0]),l=Ue.AttributeMap.diff(o,s.attributes)||{};Object.keys(l).forEach((t=>{this.formatAt(i-1,1,t,l[t])})),t=i}let[i,o]=this.children.find(t);n.length&&(i&&(i=i.split(o),o=0),n.forEach((t=>{if("block"===t.type)Zr(this.createBlock(t.attributes,i||void 0),0,t.delta);else{const e=this.create(t.key,t.value);this.insertBefore(e,i||void 0),Object.keys(t.attributes).forEach((n=>{e.format(n,t.attributes[n])}))}}))),"block"===r.type&&r.delta.length()&&Zr(this,i?i.offset(i.scroll)+o:this.length(),r.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,r]=e;return n instanceof Ee?[n,r]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(Kr,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,r)=>{let s=[],i=r;return t.children.forEachAt(e,r,((t,e,r)=>{Kr(t)?s.push(t):t instanceof je&&(s=s.concat(n(t,e,i))),i-=r})),s};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(fr.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=fr.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&&!Wr(n)}))).length>0&&this.emitter.emit(fr.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(fr.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,n){const[r]=this.descendant((t=>t instanceof tr),t);r&&r.statics.blotName===e&&Wr(r)&&r.updateContent(n)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let n=new Ue;return t.forEach((t=>{const r=t?.insert;if(r)if("string"==typeof r){const s=r.split("\n");s.slice(0,-1).forEach((r=>{n.insert(r,t.attributes),e.push({type:"block",delta:n,attributes:t.attributes??{}}),n=new Ue}));const i=s[s.length-1];i&&n.insert(i,t.attributes)}else{const s=Object.keys(r)[0];if(!s)return;this.query(s,ce.INLINE)?n.push(t):(n.length()&&e.push({type:"block",delta:n,attributes:{}}),n=new Ue,e.push({type:"blockEmbed",key:s,value:r[s],attributes:t.attributes??{}}))}})),n.length()&&e.push({type:"block",delta:n,attributes:{}}),e}createBlock(t,e){let n;const r={};Object.entries(t).forEach((t=>{let[e,s]=t;null!=this.query(e,ce.BLOCK&ce.BLOT)?n=e:r[e]=s}));const s=this.create(n||this.statics.defaultChild.blotName,n?t[n]:void 0);this.insertBefore(s,e||void 0);const i=s.length();return Object.entries(r).forEach((t=>{let[e,n]=t;s.formatAt(0,i,e,n)})),s}},"blots/text":Zn,"modules/clipboard":class extends kr{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=[],Cs.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,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r[is.blotName])return(new Ue).insert(n||"",{[is.blotName]:r[is.blotName]});if(!e)return(new Ue).insert(n||"",r);const s=this.convertHTML(e);return Bs(s,"\n")&&(null==s.ops[s.ops.length-1].attributes||r.table)?s.compose((new Ue).retain(s.length()-1).delete(1)):s}normalizeHTML(t){(t=>{t.documentElement&&Ts.forEach((e=>{e(t)}))})(t)}convertHTML(t){const e=(new DOMParser).parseFromString(t,"text/html");this.normalizeHTML(e);const n=e.body,r=new WeakMap,[s,i]=this.prepareMatching(n,r);return zs(this.quill.scroll,n,s,i,r)}dangerouslyPasteHTML(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Dr.sources.API;if("string"==typeof t){const n=this.convert({html:t,text:""});this.quill.setContents(n,e),this.quill.setSelection(0,Dr.sources.SILENT)}else{const r=this.convert({html:e,text:""});this.quill.updateContents((new Ue).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),Dr.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:r,text:s}=this.onCopy(n,e);t.clipboardData?.setData("text/plain",s),t.clipboardData?.setData("text/html",r),e&&As({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 r=t.clipboardData?.getData("text/plain");if(!n&&!r){const e=t.clipboardData?.getData("text/uri-list");e&&(r=this.normalizeURIList(e))}const s=Array.from(t.clipboardData?.files||[]);if(!n&&s.length>0)this.quill.uploader.upload(e,s);else{if(n&&s.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,s)}this.onPaste(e,{html:n,text:r})}}onCopy(t){const e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}onPaste(t,e){let{text:n,html:r}=e;const s=this.quill.getFormat(t.index),i=this.convert({text:n,html:r},s);js.log("onPaste",i,{text:n,html:r});const o=(new Ue).retain(t.index).delete(t.length).concat(i);this.quill.updateContents(o,Dr.sources.USER),this.quill.setSelection(o.length()-t.length,Dr.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const n=[],r=[];return this.matchers.forEach((s=>{const[i,o]=s;switch(i){case Node.TEXT_NODE:r.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,r]}},"modules/history":class extends kr{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(Dr.events.EDITOR_CHANGE,((t,e,n,r)=>{t===Dr.events.SELECTION_CHANGE?e&&r!==Dr.sources.SILENT&&(this.currentRange=e):t===Dr.events.TEXT_CHANGE&&(this.ignoreChange||(this.options.userOnly&&r!==Dr.sources.USER?this.transform(e):this.record(e,n)),this.currentRange=Vs(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(),s=n.delta.invert(r);this.stack[e].push({delta:s,range:Vs(n.range,s)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,Dr.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),r=this.currentRange;const s=Date.now();if(this.lastRecorded+this.options.delay>s&&this.stack.undo.length>0){const t=this.stack.undo.pop();t&&(n=n.compose(t.delta),r=t.range)}else this.lastRecorded=s;0!==n.length()&&(this.stack.undo.push({delta:n,range:r}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){$s(this.stack.undo,t),$s(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,Dr.sources.USER);else{const e=function(t,e){const n=e.reduce(((t,e)=>t+(e.delete||0)),0);let r=e.length()-n;return function(t,e){const n=e.ops[e.ops.length-1];return null!=n&&(null!=n.insert?"string"==typeof n.insert&&n.insert.endsWith("\n"):null!=n.attributes&&Object.keys(n.attributes).some((e=>null!=t.query(e,ce.BLOCK))))}(t,e)&&(r-=1),r}(this.quill.scroll,t.delta);this.quill.setSelection(e,Dr.sources.USER)}}},"modules/keyboard":ys,"modules/uploader":Ws,"modules/input":class extends kr{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",(t=>{this.handleBeforeInput(t)})),/Android/i.test(navigator.userAgent)||t.on(Dr.events.COMPOSITION_BEFORE_START,(()=>{this.handleCompositionStart()}))}deleteRange(t){As({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 Ue).retain(t.index).insert(e,n),Dr.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,Dr.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!Zs.includes(t.inputType))return;const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||!0===e.collapsed)return;const n=function(t){return"string"==typeof t.data?t.data:t.dataTransfer?.types.includes("text/plain")?t.dataTransfer.getData("text/plain"):null}(t);if(null==n)return;const r=this.quill.selection.normalizeNative(e),s=r?this.quill.selection.normalizedToRange(r):null;s&&this.replaceText(s,n)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}},"modules/uiNode":class extends kr{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 ke&&n.uiNode))return!0;const s="rtl"===getComputedStyle(n.domNode).direction;return!!(s&&"ArrowRight"!==r.key||!s&&"ArrowLeft"!==r.key)||(this.quill.setSelection(t.index-1,t.length+(r.shiftKey?1:0),Dr.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||!(!Gs||"a"!==t.key||!0!==t.ctrlKey))(t)&&this.ensureListeningToSelectionChange()}))}ensureListeningToSelectionChange(){this.selectionChangeDeadline=Date.now()+100,this.isListening||(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 ke&&n.uiNode))return;const r=document.createRange();r.setStartAfter(n.uiNode),r.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(r)}}});var Xs=Dr;const Ys=new class extends ge{add(t,e){let n=0;if("+1"===e||"-1"===e){const r=this.value(t)||0;n="+1"===e?r+1:r-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}}("indent","ql-indent",{scope:ce.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});var Qs=Ys;class Js extends Vr{}Js.blotName="list-container",Js.tagName="OL";class ti extends Jn{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(){Dr.register(Js)}constructor(t,e){super(t,e);const n=e.ownerDocument.createElement("span"),r=n=>{if(!t.isEnabled())return;const r=this.statics.formats(e,t);"checked"===r?(this.format("list","unchecked"),n.preventDefault()):"unchecked"===r&&(this.format("list","checked"),n.preventDefault())};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r),this.attachUI(n)}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-list",e):super.format(t,e)}}ti.blotName="list",ti.tagName="LI",Js.allowedChildren=[ti],ti.requiredContainer=Js;var ei=class extends Qn{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)}};class ni extends Qn{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 ri(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 ri(t,e){const n=document.createElement("a");n.href=t;const r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}const si=["alt","height","width"];const ii=["height","width"];const oi=new ge("code-token","hljs",{scope:ce.INLINE});class li extends Qn{static formats(t,e){for(;null!=t&&t!==e.domNode;){if(t.classList&&t.classList.contains(is.className))return super.formats(t,e);t=t.parentNode}}constructor(t,e,n){super(t,e,n),oi.add(this.domNode,n)}format(t,e){t!==li.blotName?super.format(t,e):e?oi.add(this.domNode,e):(oi.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),oi.value(this.domNode)||this.unwrap()}}li.blotName="code-token",li.className="ql-token";class ai extends is{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(),li.blotName,!1),super.replaceWith(t,e)}}class ci extends ss{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,e){t===ai.blotName&&(this.forceNext=!0,this.children.forEach((n=>{n.format(t,e)})))}formatAt(t,e,n,r){n===ai.blotName&&(this.forceNext=!0),super.formatAt(t,e,n,r)}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`,r=ai.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(er(e,!1))),new Ue),s=t(n,r);e.diff(s).reduce(((t,e)=>{let{retain:n,attributes:r}=e;return n?(r&&Object.keys(r).forEach((e=>{[ai.blotName,li.blotName].includes(e)&&this.formatAt(t,n,e,r[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?ai.formats(n.domNode):"plain"}">\n${Xn(this.code(t,e))}\n</pre>`}optimize(t){if(super.optimize(t),null!=this.parent&&null!=this.children.head&&null!=this.uiNode){const t=ai.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}ci.allowedChildren=[ai],ai.requiredContainer=ci,ai.allowedChildren=[li,sr,Zn,Wn];class ui extends kr{static register(){Dr.register(li,!0),Dr.register(ai,!0),Dr.register(ci,!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(Dr.events.SCROLL_BLOT_MOUNT,(t=>{if(!(t instanceof ci))return;const e=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach((t=>{let{key:n,label:r}=t;const s=e.ownerDocument.createElement("option");s.textContent=r,s.setAttribute("value",n),e.appendChild(s)})),e.addEventListener("change",(()=>{t.format(ai.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)})),null==t.uiNode&&(t.attachUI(e),t.children.head&&(e.value=ai.formats(t.children.head.domNode)))}))}initTimer(){let t=null;this.quill.on(Dr.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(Dr.sources.USER);const n=this.quill.getSelection();(null==t?this.quill.scroll.descendants(ci):[t]).forEach((t=>{t.highlight(this.highlightBlot,e)})),this.quill.update(Dr.sources.SILENT),null!=n&&this.quill.setSelection(n,Dr.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 Xn(t).split("\n").reduce(((t,n,r)=>(0!==r&&t.insert("\n",{[is.blotName]:e}),t.insert(n))),new Ue);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(is.className),n.innerHTML=((t,e,n)=>{if("string"==typeof t.versionString){const r=t.versionString.split(".")[0];if(parseInt(r,10)>=11)return t.highlight(n,{language:e}).value}return t.highlight(e,n).value})(this.options.hljs,e,t),zs(this.quill.scroll,n,[(t,e)=>{const n=oi.value(t);return n?e.compose((new Ue).retain(e.length(),{[li.blotName]:n})):e}],[(t,n)=>t.data.split("\n").reduce(((t,n,r)=>(0!==r&&t.insert("\n",{[is.blotName]:e}),t.insert(n))),n)],new WeakMap)}}ui.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 hi extends Jn{static blotName="table";static tagName="TD";static create(t){const e=super.create();return t?e.setAttribute("data-row",t):e.setAttribute("data-row",gi()),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===hi.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 di extends Vr{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(),r=this.next.children.tail.formats();return t.table===e.table&&t.table===n.table&&t.table===r.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 fi extends Vr{static blotName="table-body";static tagName="TBODY"}class pi extends Vr{static blotName="table-container";static tagName="TABLE";balanceCells(){const t=this.descendants(di),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=hi.formats(t.children.head.domNode));const n=this.scroll.create(hi.blotName,e);t.appendChild(n),n.optimize()}))}))}cells(t){return this.rows().map((e=>e.children.at(t)))}deleteColumn(t){const[e]=this.descendant(fi);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(fi);null!=e&&null!=e.children.head&&e.children.forEach((e=>{const n=e.children.at(t),r=hi.formats(e.children.head.domNode),s=this.scroll.create(hi.blotName,r);e.insertBefore(s,n)}))}insertRow(t){const[e]=this.descendant(fi);if(null==e||null==e.children.head)return;const n=gi(),r=this.scroll.create(di.blotName);e.children.head.children.forEach((()=>{const t=this.scroll.create(hi.blotName,n);r.appendChild(t)}));const s=e.children.at(t);e.insertBefore(r,s)}rows(){const t=this.children.head;return null==t?[]:t.children.map((t=>t))}}function gi(){return`row-${Math.random().toString(36).slice(2,6)}`}pi.allowedChildren=[fi],fi.requiredContainer=pi,fi.allowedChildren=[di],di.requiredContainer=fi,di.allowedChildren=[hi],hi.requiredContainer=di;const mi=hr("quill:toolbar");class bi extends kr{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)yi(n,t);else{const e=Object.keys(t)[0],r=t[e];Array.isArray(r)?function(t,e,n){const r=document.createElement("select");r.classList.add(`ql-${e}`),n.forEach((t=>{const e=document.createElement("option");!1!==t?e.setAttribute("value",String(t)):e.setAttribute("selected","selected"),r.appendChild(e)})),t.appendChild(r)}(n,e,r):yi(n,e,r)}})),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(Dr.events.EDITOR_CHANGE,(()=>{const[t]=this.quill.selection.getRange();this.update(t)}))):mi.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 mi.warn("ignoring attaching to nonexistent format",e,t);const n="SELECT"===t.tagName?"change":"click";t.addEventListener(n,(n=>{let r;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;const e=t.options[t.selectedIndex];r=!e.hasAttribute("selected")&&(e.value||!1)}else r=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),n.preventDefault();this.quill.focus();const[s]=this.quill.selection.getRange();if(null!=this.handlers[e])this.handlers[e].call(this,r);else if(this.quill.scroll.query(e).prototype instanceof Ce){if(r=prompt(`Enter ${e}`),!r)return;this.quill.updateContents((new Ue).retain(s.index).delete(s.length).insert({[e]:r}),Dr.sources.USER)}else this.quill.format(e,r,Dr.sources.USER);this.update(s)})),this.controls.push([e,t])}update(t){const e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((n=>{const[r,s]=n;if("SELECT"===s.tagName){let n=null;if(null==t)n=null;else if(null==e[r])n=s.querySelector("option[selected]");else if(!Array.isArray(e[r])){let t=e[r];"string"==typeof t&&(t=t.replace(/"/g,'\\"')),n=s.querySelector(`option[value="${t}"]`)}null==n?(s.value="",s.selectedIndex=-1):n.selected=!0}else if(null==t)s.classList.remove("ql-active"),s.setAttribute("aria-pressed","false");else if(s.hasAttribute("value")){const t=e[r],n=t===s.getAttribute("value")||null!=t&&t.toString()===s.getAttribute("value")||null==t&&!s.getAttribute("value");s.classList.toggle("ql-active",n),s.setAttribute("aria-pressed",n.toString())}else{const t=null!=e[r];s.classList.toggle("ql-active",t),s.setAttribute("aria-pressed",t.toString())}}))}}function yi(t,e,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${e}`),r.setAttribute("aria-pressed","false"),null!=n?(r.value=n,r.setAttribute("aria-label",`${e}: ${n}`)):r.setAttribute("aria-label",e),t.appendChild(r)}bi.DEFAULTS={},bi.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,ce.INLINE)&&this.quill.format(t,!1,Dr.sources.USER)}))}else this.quill.removeFormat(t.index,t.length,Dr.sources.USER)},direction(t){const{align:e}=this.quill.getFormat();"rtl"===t&&null==e?this.quill.format("align","right",Dr.sources.USER):t||"right"!==e||this.quill.format("align",!1,Dr.sources.USER),this.quill.format("direction",t,Dr.sources.USER)},indent(t){const e=this.quill.getSelection(),n=this.quill.getFormat(e),r=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",r+e,Dr.sources.USER)}},link(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,Dr.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,Dr.sources.USER):this.quill.format("list","unchecked",Dr.sources.USER):this.quill.format("list",t,Dr.sources.USER)}}};const vi='<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>';var xi={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:vi,"code-block":vi,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>'};let Ni=0;function Ei(t,e){t.setAttribute(e,`${!("true"===t.getAttribute(e))}`)}var wi=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"),Ei(this.label,"aria-expanded"),Ei(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-${Ni}`,Ni+=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)}},Ai=class extends wi{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"),r=t&&t.getAttribute("data-value")||"";n&&("line"===n.tagName?n.style.stroke=r:n.style.fill=r)}},qi=class extends wi{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}}},ki=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 r=this.boundsContainer.getBoundingClientRect(),s=this.root.getBoundingClientRect();let i=0;if(s.right>r.right&&(i=r.right-s.right,this.root.style.left=`${e+i}px`),s.left<r.left&&(i=r.left-s.left,this.root.style.left=`${e+i}px`),s.bottom>r.bottom){const e=s.bottom-s.top,r=t.bottom-t.top+e;this.root.style.top=n-r+"px",this.root.classList.add("ql-flip")}return i}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}};const _i=[!1,"center","right","justify"],Li=["#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"],Oi=[!1,"serif","monospace"],Si=["1","2","3",!1],Ti=["small",!1,"large","huge"];class ji extends Tr{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 r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}}))}))}buildPickers(t,e){this.pickers=Array.from(t).map((t=>{if(t.classList.contains("ql-align")&&(null==t.querySelector("option")&&Ri(t,_i),"object"==typeof e.align))return new qi(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")&&Ri(t,Li,"background"===n?"#ffffff":"#000000"),new Ai(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?Ri(t,Oi):t.classList.contains("ql-header")?Ri(t,Si):t.classList.contains("ql-size")&&Ri(t,Ti)),new wi(t)})),this.quill.on(fr.events.EDITOR_CHANGE,(()=>{this.pickers.forEach((t=>{t.update()}))}))}}ji.DEFAULTS=ae({},Tr.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 Ci extends ki{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,fr.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,fr.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_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`: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,fr.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(n+1," ",fr.sources.USER),this.quill.setSelection(n+2,fr.sources.USER)}break}}this.textbox.value="",this.hide()}}function Ri(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((e=>{const r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",String(e)),t.appendChild(r)}))}const Ii=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Mi extends Ci{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(fr.events.EDITOR_CHANGE,((t,e,n,r)=>{if(t===fr.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&r===fr.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],r=this.quill.getIndex(n),s=Math.min(n.length()-1,e.index+e.length-r),i=this.quill.getBounds(new gr(r,s));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(fr.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 Bi extends ji{constructor(t,e){null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=Ii),super(t,e),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new Mi(this.quill,this.options.bounds),null!=t.container&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),xi),this.buildPickers(t.container.querySelectorAll("select"),xi))}}Bi.DEFAULTS=ae({},ji.DEFAULTS,{modules:{toolbar:{handlers:{link(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1,Dr.sources.USER)}}}}});const Di=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Ui extends Ci{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,fr.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()})),this.quill.on(fr.events.SELECTION_CHANGE,((t,e,n)=>{if(null!=t){if(0===t.length&&n===fr.sources.USER){const[e,n]=this.quill.scroll.descendant(ni,t.index);if(null!=e){this.linkRange=new gr(t.index-n,e.length());const r=ni.formats(e.domNode);this.preview.textContent=r,this.preview.setAttribute("href",r),this.show();const s=this.quill.getBounds(this.linkRange);return void(null!=s&&this.position(s))}}else delete this.linkRange;this.hide()}}))}show(){super.show(),this.root.removeAttribute("data-mode")}}class Pi extends ji{constructor(t,e){null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=Di),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"),xi),this.buildPickers(t.container.querySelectorAll("select"),xi),this.tooltip=new Ui(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)})))}}Pi.DEFAULTS=ae({},ji.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,Dr.sources.USER)}}}}});var zi=Pi;Xs.register({"attributors/attribute/direction":as,"attributors/class/align":Yr,"attributors/class/background":ns,"attributors/class/color":ts,"attributors/class/direction":cs,"attributors/class/font":ds,"attributors/class/size":ps,"attributors/style/align":Qr,"attributors/style/background":rs,"attributors/style/color":es,"attributors/style/direction":us,"attributors/style/font":fs,"attributors/style/size":gs},!0),Xs.register({"formats/align":Yr,"formats/direction":cs,"formats/indent":Qs,"formats/background":rs,"formats/color":es,"formats/font":ds,"formats/size":ps,"formats/blockquote":class extends Jn{static blotName="blockquote";static tagName="blockquote"},"formats/code-block":is,"formats/header":class extends Jn{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(t){return this.tagName.indexOf(t.tagName)+1}},"formats/list":ti,"formats/bold":ei,"formats/code":os,"formats/italic":class extends ei{static blotName="italic";static tagName=["EM","I"]},"formats/link":ni,"formats/script":class extends Qn{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}},"formats/strike":class extends ei{static blotName="strike";static tagName=["S","STRIKE"]},"formats/underline":class extends Qn{static blotName="underline";static tagName="U"},"formats/formula":class extends Lr{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>`}},"formats/image":class extends Ce{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 si.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 ri(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){si.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}},"formats/video":class extends tr{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 ii.reduce(((e,n)=>(t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e)),{})}static sanitize(t){return ni.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){ii.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>`}},"modules/syntax":ui,"modules/table":class extends kr{static register(){Dr.register(hi),Dr.register(di),Dr.register(fi),Dr.register(pi)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(pi).forEach((t=>{t.balanceCells()}))}deleteColumn(){const[t,,e]=this.getTable();null!=e&&(t.deleteColumn(e.cellOffset()),this.quill.update(Dr.sources.USER))}deleteRow(){const[,t]=this.getTable();null!=t&&(t.remove(),this.quill.update(Dr.sources.USER))}deleteTable(){const[t]=this.getTable();if(null==t)return;const e=t.offset();t.remove(),this.quill.update(Dr.sources.USER),this.quill.setSelection(e,Dr.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!==hi.blotName)return[null,null,null,-1];const r=e.parent;return[r.parent.parent,r,e,n]}insertColumn(t){const e=this.quill.getSelection();if(!e)return;const[n,r,s]=this.getTable(e);if(null==s)return;const i=s.cellOffset();n.insertColumn(i+t),this.quill.update(Dr.sources.USER);let o=r.rowOffset();0===t&&(o+=1),this.quill.setSelection(e.index+o,e.length,Dr.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const e=this.quill.getSelection();if(!e)return;const[n,r,s]=this.getTable(e);if(null==s)return;const i=r.rowOffset();n.insertRow(i+t),this.quill.update(Dr.sources.USER),t>0?this.quill.setSelection(e,Dr.sources.SILENT):this.quill.setSelection(e.index+r.children.length,e.length,Dr.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){const n=this.quill.getSelection();if(null==n)return;const r=new Array(t).fill(0).reduce((t=>{const n=new Array(e).fill("\n").join("");return t.insert(n,{table:gi()})}),(new Ue).retain(n.index));this.quill.updateContents(r,Dr.sources.USER),this.quill.setSelection(n.index,Dr.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(Dr.events.SCROLL_OPTIMIZE,(t=>{t.some((t=>!!["TD","TR","TBODY","TABLE"].includes(t.target.tagName)&&(this.quill.once(Dr.events.TEXT_CHANGE,((t,e,n)=>{n===Dr.sources.USER&&this.balanceTables()})),!0)))}))}},"modules/toolbar":bi,"themes/bubble":Bi,"themes/snow":zi,"ui/icons":xi,"ui/picker":wi,"ui/icon-picker":qi,"ui/color-picker":Ai,"ui/tooltip":ki},!0);var Fi=Xs},2660:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const r=n(5606),s=n(7193),i=n(8142),o=n(9106);e.AttributeMap=o.default;const l=n(5759);e.Op=l.default;const a=n(8317);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=s(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((r=>{(t(r)?e:n).push(r)})),[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=[],r=new a.default(this.ops);let s=0;for(;s<e&&r.hasNext();){let i;s<t?i=r.next(t-s):(i=r.next(e-s),n.push(i)),s+=l.default.length(i)}return new h(n)}compose(t){const e=new a.default(this.ops),n=new a.default(t.ops),r=[],s=n.peek();if(null!=s&&"number"==typeof s.retain&&null==s.attributes){let t=s.retain;for(;"insert"===e.peekType()&&e.peekLength()<=t;)t-=e.peekLength(),r.push(e.next());s.retain-t>0&&n.next(s.retain-t)}const l=new h(r);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()),r=e.next(t),s=n.next(t);if(s.retain){const a={};if("number"==typeof r.retain)a.retain="number"==typeof s.retain?t:s.retain;else if("number"==typeof s.retain)null==r.retain?a.insert=r.insert:a.retain=r.retain;else{const t=null==r.retain?"insert":"retain",[e,n,i]=u(r[t],s.retain),o=h.getHandler(e);a[t]={[e]:o.compose(n,i,"retain"===t)}}const c=o.default.compose(r.attributes,s.attributes,"number"==typeof r.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 s.delete&&("number"==typeof r.retain||"object"==typeof r.retain&&null!==r.retain)&&l.push(s)}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(""))),s=new h,l=r(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 r.INSERT:n=Math.min(d.peekLength(),e),s.push(d.next(n));break;case r.DELETE:n=Math.min(e,u.peekLength()),u.next(n),s.delete(n);break;case r.EQUAL:n=Math.min(u.peekLength(),d.peekLength(),e);const t=u.next(n),l=d.next(n);i(t.insert,l.insert)?s.retain(n,o.default.diff(t.attributes,l.attributes)):s.push(l).delete(n)}e-=n}})),s.chop()}eachLine(t,e="\n"){const n=new a.default(this.ops);let r=new h,s=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)r.push(n.next());else if(a>0)r.push(n.next(a));else{if(!1===t(r,n.next(1).attributes||{},s))return;s+=1,r=new h}}r.length()>0&&t(r,{},s)}invert(t){const e=new h;return this.reduce(((n,r)=>{if(r.insert)e.delete(l.default.length(r));else{if("number"==typeof r.retain&&null==r.attributes)return e.retain(r.retain),n+r.retain;if(r.delete||"number"==typeof r.retain){const s=r.delete||r.retain;return t.slice(n,n+s).forEach((t=>{r.delete?e.push(t):r.retain&&r.attributes&&e.retain(l.default.length(t),o.default.invert(r.attributes,t.attributes))})),n+s}if("object"==typeof r.retain&&null!==r.retain){const s=t.slice(n,n+1),i=new a.default(s.ops).next(),[l,c,d]=u(r.retain,i.insert),f=h.getHandler(l);return e.retain({[l]:f.invert(c,d)},o.default.invert(r.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,r=new a.default(this.ops),s=new a.default(n.ops),i=new h;for(;r.hasNext()||s.hasNext();)if("insert"!==r.peekType()||!e&&"insert"===s.peekType())if("insert"===s.peekType())i.push(s.next());else{const t=Math.min(r.peekLength(),s.peekLength()),n=r.next(t),l=s.next(t);if(n.delete)continue;if(l.delete)i.push(l);else{const r=n.retain,s=l.retain;let a="object"==typeof s&&null!==s?s:t;if("object"==typeof r&&null!==r&&"object"==typeof s&&null!==s){const t=Object.keys(r)[0];if(t===Object.keys(s)[0]){const n=h.getHandler(t);n&&(a={[t]:n.transform(r[t],s[t],e)})}}i.retain(a,o.default.transform(n.attributes,l.attributes,e))}}else i.retain(l.default.length(r.next()));return i.chop()}transformPosition(t,e=!1){e=!!e;const n=new a.default(this.ops);let r=0;for(;n.hasNext()&&r<=t;){const s=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r<t||!e)&&(t+=s),r+=s):t-=Math.min(s,t-r)}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},5606:function(t){var e=-1;function n(t,f,p,g,m){if(t===f)return t?[[0,t]]:[];if(null!=p){var y=function(t,e,n){var r="number"==typeof n?{index:n,length:0}:n.oldRange,s="number"==typeof n?null:n.newRange,i=t.length,o=e.length;if(0===r.length&&(null===s||0===s.length)){var l=r.index,a=t.slice(0,l),c=t.slice(l),u=s?s.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((y=a.slice(0,f))===(x=d.slice(0,f)))return b(y,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((v=c.slice(c.length-m))===(N=g.slice(g.length-m)))return b(a,c.slice(0,c.length-m),g.slice(0,g.length-m),v)}}}if(r.length>0&&s&&0===s.length){var y=t.slice(0,r.index),v=t.slice(r.index+r.length);if(!(o<(f=y.length)+(m=v.length))){var x=e.slice(0,f),N=e.slice(o-m);if(y===x&&v===N)return b(y,t.slice(f,i-m),e.slice(f,o-m),v)}}return null}(t,f,p);if(y)return y}var v=s(t,f),x=t.substring(0,v);v=o(t=t.substring(v),f=f.substring(v));var N=t.substring(t.length-v),E=function(t,i){var l;if(!t)return[[1,i]];if(!i)return[[e,t]];var a=t.length>i.length?t:i,c=t.length>i.length?i:t,u=a.indexOf(c);if(-1!==u)return l=[[1,a.substring(0,u)],[0,c],[1,a.substring(u+c.length)]],t.length>i.length&&(l[0][0]=l[2][0]=e),l;if(1===c.length)return[[e,t],[1,i]];var h=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length<n.length)return null;function i(t,e,n){for(var r,i,l,a,c=t.substring(n,n+Math.floor(t.length/4)),u=-1,h="";-1!==(u=e.indexOf(c,u+1));){var d=s(t.substring(n),e.substring(u)),f=o(t.substring(0,n),e.substring(0,u));h.length<f+d&&(h=e.substring(u-f,u)+e.substring(u,u+d),r=t.substring(0,n-f),i=t.substring(n+d),l=e.substring(0,u-f),a=e.substring(u+d))}return 2*h.length>=t.length?[r,i,l,a,h]:null}var l,a,c,u,h,d=i(n,r,Math.ceil(n.length/4)),f=i(n,r,Math.ceil(n.length/2));return d||f?(l=f?d&&d[4].length>f[4].length?d:f:d,t.length>e.length?(a=l[0],c=l[1],u=l[2],h=l[3]):(u=l[0],h=l[1],a=l[2],c=l[3]),[a,c,u,h,l[4]]):null}(t,i);if(h){var d=h[0],f=h[1],p=h[2],g=h[3],m=h[4],b=n(d,p),y=n(f,g);return b.concat([[0,m]],y)}return function(t,n){for(var s=t.length,i=n.length,o=Math.ceil((s+i)/2),l=o,a=2*o,c=new Array(a),u=new Array(a),h=0;h<a;h++)c[h]=-1,u[h]=-1;c[l+1]=0,u[l+1]=0;for(var d=s-i,f=d%2!=0,p=0,g=0,m=0,b=0,y=0;y<o;y++){for(var v=-y+p;v<=y-g;v+=2){for(var x=l+v,N=(k=v===-y||v!==y&&c[x-1]<c[x+1]?c[x+1]:c[x-1]+1)-v;k<s&&N<i&&t.charAt(k)===n.charAt(N);)k++,N++;if(c[x]=k,k>s)g+=2;else if(N>i)p+=2;else if(f&&(A=l+d-v)>=0&&A<a&&-1!==u[A]&&k>=(w=s-u[A]))return r(t,n,k,N)}for(var E=-y+m;E<=y-b;E+=2){for(var w,A=l+E,q=(w=E===-y||E!==y&&u[A-1]<u[A+1]?u[A+1]:u[A-1]+1)-E;w<s&&q<i&&t.charAt(s-w-1)===n.charAt(i-q-1);)w++,q++;if(u[A]=w,w>s)b+=2;else if(q>i)m+=2;else if(!f){var k;if((x=l+d-E)>=0&&x<a&&-1!==c[x])if(N=l+(k=c[x])-x,k>=(w=s-w))return r(t,n,k,N)}}}return[[e,t],[1,n]]}(t,i)}(t=t.substring(0,t.length-v),f=f.substring(0,f.length-v));return x&&E.unshift([0,x]),N&&E.push([0,N]),d(E,m),g&&function(t){for(var n=!1,r=[],s=0,f=null,p=0,g=0,m=0,b=0,y=0;p<t.length;)0==t[p][0]?(r[s++]=p,g=b,m=y,b=0,y=0,f=t[p][1]):(1==t[p][0]?b+=t[p][1].length:y+=t[p][1].length,f&&f.length<=Math.max(g,m)&&f.length<=Math.max(b,y)&&(t.splice(r[s-1],0,[e,f]),t[r[s-1]+1][0]=1,s--,p=--s>0?r[s-1]:-1,g=0,m=0,b=0,y=0,f=null,n=!0)),p++;for(n&&d(t),function(t){function e(t,e){if(!t||!e)return 6;var n=t.charAt(t.length-1),r=e.charAt(0),s=n.match(l),i=r.match(l),o=s&&n.match(a),d=i&&r.match(a),f=o&&n.match(c),p=d&&r.match(c),g=f&&t.match(u),m=p&&e.match(h);return g||m?5:f||p?4:s&&!o&&d?3:o||d?2:s||i?1:0}for(var n=1;n<t.length-1;){if(0==t[n-1][0]&&0==t[n+1][0]){var r=t[n-1][1],s=t[n][1],i=t[n+1][1],d=o(r,s);if(d){var f=s.substring(s.length-d);r=r.substring(0,r.length-d),s=f+s.substring(0,s.length-d),i=f+i}for(var p=r,g=s,m=i,b=e(r,s)+e(s,i);s.charAt(0)===i.charAt(0);){r+=s.charAt(0),s=s.substring(1)+i.charAt(0),i=i.substring(1);var y=e(r,s)+e(s,i);y>=b&&(b=y,p=r,g=s,m=i)}t[n-1][1]!=p&&(p?t[n-1][1]=p:(t.splice(n-1,1),n--),t[n][1]=g,m?t[n+1][1]=m:(t.splice(n+1,1),n--))}n++}}(t),p=1;p<t.length;){if(t[p-1][0]==e&&1==t[p][0]){var v=t[p-1][1],x=t[p][1],N=i(v,x),E=i(x,v);N>=E?(N>=v.length/2||N>=x.length/2)&&(t.splice(p,0,[0,x.substring(0,N)]),t[p-1][1]=v.substring(0,v.length-N),t[p+1][1]=x.substring(N),p++):(E>=v.length/2||E>=x.length/2)&&(t.splice(p,0,[0,v.substring(0,E)]),t[p-1][0]=1,t[p-1][1]=x.substring(0,x.length-E),t[p+1][0]=e,t[p+1][1]=v.substring(E),p++),p++}p++}}(E),E}function r(t,e,r,s){var i=t.substring(0,r),o=e.substring(0,s),l=t.substring(r),a=e.substring(s),c=n(i,o),u=n(l,a);return c.concat(u)}function s(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),s=r,i=0;n<s;)t.substring(i,s)==e.substring(i,s)?i=n=s:r=s,s=Math.floor((r-n)/2+n);return f(t.charCodeAt(s-1))&&s--,s}function i(t,e){var n=t.length,r=e.length;if(0==n||0==r)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));var s=Math.min(n,r);if(t==e)return s;for(var i=0,o=1;;){var l=t.substring(s-o),a=e.indexOf(l);if(-1==a)return i;o+=a,0!=a&&t.substring(s-o)!=e.substring(0,o)||(i=o,o++)}}function o(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var n=0,r=Math.min(t.length,e.length),s=r,i=0;n<s;)t.substring(t.length-s,t.length-i)==e.substring(e.length-s,e.length-i)?i=n=s:r=s,s=Math.floor((r-n)/2+n);return p(t.charCodeAt(t.length-s))&&s--,s}var l=/[^a-zA-Z0-9]/,a=/\s/,c=/[\r\n]/,u=/\n\r?\n$/,h=/^\r?\n\r?\n/;function d(t,n){t.push([0,""]);for(var r,i=0,l=0,a=0,c="",u="";i<t.length;)if(i<t.length-1&&!t[i][1])t.splice(i,1);else switch(t[i][0]){case 1:a++,u+=t[i][1],i++;break;case e:l++,c+=t[i][1],i++;break;case 0:var h=i-a-l-1;if(n){if(h>=0&&m(t[h][1])){var f=t[h][1].slice(-1);if(t[h][1]=t[h][1].slice(0,-1),c=f+c,u=f+u,!t[h][1]){t.splice(h,1),i--;var p=h-1;t[p]&&1===t[p][0]&&(a++,u=t[p][1]+u,p--),t[p]&&t[p][0]===e&&(l++,c=t[p][1]+c,p--),h=p}}g(t[i][1])&&(f=t[i][1].charAt(0),t[i][1]=t[i][1].slice(1),c+=f,u+=f)}if(i<t.length-1&&!t[i][1]){t.splice(i,1);break}if(c.length>0||u.length>0){c.length>0&&u.length>0&&(0!==(r=s(u,c))&&(h>=0?t[h][1]+=u.substring(0,r):(t.splice(0,0,[0,u.substring(0,r)]),i++),u=u.substring(r),c=c.substring(r)),0!==(r=o(u,c))&&(t[i][1]=u.substring(u.length-r)+t[i][1],u=u.substring(0,u.length-r),c=c.substring(0,c.length-r)));var b=a+l;0===c.length&&0===u.length?(t.splice(i-b,b),i-=b):0===c.length?(t.splice(i-b,b,[1,u]),i=i-b+1):0===u.length?(t.splice(i-b,b,[e,c]),i=i-b+1):(t.splice(i-b,b,[e,c],[1,u]),i=i-b+2)}0!==i&&0===t[i-1][0]?(t[i-1][1]+=t[i][1],t.splice(i,1)):i++,a=0,l=0,c="",u=""}""===t[t.length-1][1]&&t.pop();var y=!1;for(i=1;i<t.length-1;)0===t[i-1][0]&&0===t[i+1][0]&&(t[i][1].substring(t[i][1].length-t[i-1][1].length)===t[i-1][1]?(t[i][1]=t[i-1][1]+t[i][1].substring(0,t[i][1].length-t[i-1][1].length),t[i+1][1]=t[i-1][1]+t[i+1][1],t.splice(i-1,1),y=!0):t[i][1].substring(0,t[i+1][1].length)==t[i+1][1]&&(t[i-1][1]+=t[i+1][1],t[i][1]=t[i][1].substring(t[i+1][1].length)+t[i+1][1],t.splice(i+1,1),y=!0)),i++;y&&d(t,n)}function f(t){return t>=55296&&t<=56319}function p(t){return t>=56320&&t<=57343}function g(t){return p(t.charCodeAt(0))}function m(t){return f(t.charCodeAt(t.length-1))}function b(t,n,r,s){return m(t)||g(s)?null:function(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}([[0,t],[e,n],[1,r],[0,s]])}function y(t,e,r,s){return n(t,e,r,s,!0)}y.INSERT=1,y.DELETE=e,y.EQUAL=0,t.exports=y},5759:function(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},7193:function(t,e,n){t=n.nmd(t);var r="__lodash_hash_undefined__",s=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]",x="[object DataView]",N="[object Float32Array]",E="[object Float64Array]",w="[object Int8Array]",A="[object Int16Array]",q="[object Int32Array]",k="[object Uint8Array]",_="[object Uint8ClampedArray]",L="[object Uint16Array]",O="[object Uint32Array]",S=/\w*$/,T=/^\[object .+?Constructor\]$/,j=/^(?:0|[1-9]\d*)$/,C={};C[i]=C["[object Array]"]=C[v]=C[x]=C[o]=C[l]=C[N]=C[E]=C[w]=C[A]=C[q]=C[u]=C[h]=C[d]=C[p]=C[g]=C[m]=C[b]=C[k]=C[_]=C[L]=C[O]=!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,M=R||I||Function("return this")(),B=e&&!e.nodeType&&e,D=B&&t&&!t.nodeType&&t,U=D&&D.exports===B;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,r){var s=-1,i=t?t.length:0;for(r&&i&&(n=t[++s]);++s<i;)n=e(n,t[s],s,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,r){n[++e]=[r,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,Y=M["__core-js_shared__"],Q=(W=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",J=G.toString,tt=X.hasOwnProperty,et=X.toString,nt=RegExp("^"+J.call(tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rt=U?M.Buffer:void 0,st=M.Symbol,it=M.Uint8Array,ot=V(Object.getPrototypeOf,Object),lt=Object.create,at=X.propertyIsEnumerable,ct=Z.splice,ut=Object.getOwnPropertySymbols,ht=rt?rt.isBuffer:void 0,dt=V(Object.keys,Object),ft=Mt(M,"DataView"),pt=Mt(M,"Map"),gt=Mt(M,"Promise"),mt=Mt(M,"Set"),bt=Mt(M,"WeakMap"),yt=Mt(Object,"create"),vt=zt(ft),xt=zt(pt),Nt=zt(gt),Et=zt(mt),wt=zt(bt),At=st?st.prototype:void 0,qt=At?At.valueOf:void 0;function kt(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _t(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Lt(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ot(t){this.__data__=new _t(t)}function St(t,e,n){var r=t[e];tt.call(t,e)&&Ft(r,n)&&(void 0!==n||e in t)||(t[e]=n)}function Tt(t,e){for(var n=t.length;n--;)if(Ft(t[n][0],e))return n;return-1}function jt(t,e,n,r,s,f,y){var T;if(r&&(T=f?r(t,s,f,y):r(t)),void 0!==T)return T;if(!Wt(t))return t;var j=Ht(t);if(j){if(T=function(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&tt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!e)return function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(t,T)}else{var R=Dt(t),I=R==a||R==c;if(Vt(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||Pt(t)?{}:Wt(e=ot(t))?lt(e):{};var e}(I?{}:t),!e)return function(t,e){return Rt(t,Bt(t),e)}(t,function(t,e){return t&&Rt(e,Zt(e),t)}(T,t))}else{if(!C[R])return f?t:{};T=function(t,e,n,r){var s,i=t.constructor;switch(e){case v:return Ct(t);case o:case l:return new i(+t);case x:return function(t,e){var n=e?Ct(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,r);case N:case E:case w:case A:case q:case k:case _:case L:case O:return function(t,e){var n=e?Ct(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}(t,r);case u:return function(t,e,n){return F(e?n($(t),!0):$(t),P,new t.constructor)}(t,r,n);case h:case m:return new i(t);case p:return function(t){var e=new t.constructor(t.source,S.exec(t));return e.lastIndex=t.lastIndex,e}(t);case g:return function(t,e,n){return F(e?n(K(t),!0):K(t),z,new t.constructor)}(t,r,n);case b:return s=t,qt?Object(qt.call(s)):{}}}(t,R,jt,e)}}y||(y=new Ot);var M=y.get(t);if(M)return M;if(y.set(t,T),!j)var B=n?function(t){return function(t,e,n){var r=e(t);return Ht(t)?r:function(t,e){for(var n=-1,r=e.length,s=t.length;++n<r;)t[s+n]=e[n];return t}(r,n(t))}(t,Zt,Bt)}(t):Zt(t);return function(t,e){for(var n=-1,r=t?t.length:0;++n<r&&!1!==e(t[n],n););}(B||t,(function(s,i){B&&(s=t[i=s]),St(T,i,jt(s,e,n,r,i,t,y))})),T}function Ct(t){var e=new t.constructor(t.byteLength);return new it(e).set(new it(t)),e}function Rt(t,e,n,r){n||(n={});for(var s=-1,i=e.length;++s<i;){var o=e[s],l=r?r(n[o],t[o],o,n,t):void 0;St(n,o,void 0===l?t[o]:l)}return n}function It(t,e){var n,r,s=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof e?"string":"hash"]:s.map}function Mt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Wt(t)||(e=t,Q&&Q in e))&&(Kt(t)||H(t)?nt:T).test(zt(t));var e}(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===r?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?r:e,this},_t.prototype.clear=function(){this.__data__=[]},_t.prototype.delete=function(t){var e=this.__data__,n=Tt(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=Tt(e,t);return n<0?void 0:e[n][1]},_t.prototype.has=function(t){return Tt(this.__data__,t)>-1},_t.prototype.set=function(t,e){var n=this.__data__,r=Tt(n,t);return r<0?n.push([t,e]):n[r][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 It(this,t).delete(t)},Lt.prototype.get=function(t){return It(this,t).get(t)},Lt.prototype.has=function(t){return It(this,t).has(t)},Lt.prototype.set=function(t,e){return It(this,t).set(t,e),this},Ot.prototype.clear=function(){this.__data__=new _t},Ot.prototype.delete=function(t){return this.__data__.delete(t)},Ot.prototype.get=function(t){return this.__data__.get(t)},Ot.prototype.has=function(t){return this.__data__.has(t)},Ot.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _t){var r=n.__data__;if(!pt||r.length<199)return r.push([t,e]),this;n=this.__data__=new Lt(r)}return n.set(t,e),this};var Bt=ut?V(ut,Object):function(){return[]},Dt=function(t){return et.call(t)};function Ut(t,e){return!!(e=null==e?s:e)&&("number"==typeof t||j.test(t))&&t>-1&&t%1==0&&t<e}function Pt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||X)}function zt(t){if(null!=t){try{return J.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ft(t,e){return t===e||t!=t&&e!=e}(ft&&Dt(new ft(new ArrayBuffer(1)))!=x||pt&&Dt(new pt)!=u||gt&&Dt(gt.resolve())!=f||mt&&Dt(new mt)!=g||bt&&Dt(new bt)!=y)&&(Dt=function(t){var e=et.call(t),n=e==d?t.constructor:void 0,r=n?zt(n):void 0;if(r)switch(r){case vt:return x;case xt:return u;case Nt:return f;case Et:return g;case wt:return y}return e});var Ht=Array.isArray;function $t(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=s}(t.length)&&!Kt(t)}var Vt=ht||function(){return!1};function Kt(t){var e=Wt(t)?et.call(t):"";return e==a||e==c}function Wt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Zt(t){return $t(t)?function(t,e){var n=Ht(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&$t(t)}(t)&&tt.call(t,"callee")&&(!at.call(t,"callee")||et.call(t)==i)}(t)?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],r=n.length,s=!!r;for(var o in t)!e&&!tt.call(t,o)||s&&("length"==o||Ut(o,r))||n.push(o);return n}(t):function(t){if(!Pt(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 jt(t,!0,!0)}},8142:function(t,e,n){t=n.nmd(t);var r="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",o="[object Array]",l="[object Boolean]",a="[object Date]",c="[object Error]",u="[object Function]",h="[object Map]",d="[object Number]",f="[object Object]",p="[object Promise]",g="[object RegExp]",m="[object Set]",b="[object String]",y="[object WeakMap]",v="[object ArrayBuffer]",x="[object DataView]",N=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,w={};w["[object Float32Array]"]=w["[object Float64Array]"]=w["[object Int8Array]"]=w["[object Int16Array]"]=w["[object Int32Array]"]=w["[object Uint8Array]"]=w["[object Uint8ClampedArray]"]=w["[object Uint16Array]"]=w["[object Uint32Array]"]=!0,w[i]=w[o]=w[v]=w[l]=w[x]=w[a]=w[c]=w[u]=w[h]=w[d]=w[f]=w[g]=w[m]=w[b]=w[y]=!1;var A="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,q="object"==typeof self&&self&&self.Object===Object&&self,k=A||q||Function("return this")(),_=e&&!e.nodeType&&e,L=_&&t&&!t.nodeType&&t,O=L&&L.exports===_,S=O&&A.process,T=function(){try{return S&&S.binding&&S.binding("util")}catch(t){}}(),j=T&&T.isTypedArray;function C(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function R(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function I(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var M,B,D,U=Array.prototype,P=Function.prototype,z=Object.prototype,F=k["__core-js_shared__"],H=P.toString,$=z.hasOwnProperty,V=(M=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",K=z.toString,W=RegExp("^"+H.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=O?k.Buffer:void 0,G=k.Symbol,X=k.Uint8Array,Y=z.propertyIsEnumerable,Q=U.splice,J=G?G.toStringTag:void 0,tt=Object.getOwnPropertySymbols,et=Z?Z.isBuffer:void 0,nt=(B=Object.keys,D=Object,function(t){return B(D(t))}),rt=Lt(k,"DataView"),st=Lt(k,"Map"),it=Lt(k,"Promise"),ot=Lt(k,"Set"),lt=Lt(k,"WeakMap"),at=Lt(Object,"create"),ct=jt(rt),ut=jt(st),ht=jt(it),dt=jt(ot),ft=jt(lt),pt=G?G.prototype:void 0,gt=pt?pt.valueOf:void 0;function mt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function bt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function yt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function vt(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new yt;++e<n;)this.add(t[e])}function xt(t){var e=this.__data__=new bt(t);this.size=e.size}function Nt(t,e){for(var n=t.length;n--;)if(Ct(t[n][0],e))return n;return-1}function Et(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":J&&J in Object(t)?function(t){var e=$.call(t,J),n=t[J];try{t[J]=void 0;var r=!0}catch(t){}var s=K.call(t);return r&&(e?t[J]=n:delete t[J]),s}(t):function(t){return K.call(t)}(t)}function wt(t){return Pt(t)&&Et(t)==i}function At(t,e,n,r,s){return t===e||(null==t||null==e||!Pt(t)&&!Pt(e)?t!=t&&e!=e:function(t,e,n,r,s,u){var p=It(t),y=It(e),N=p?o:St(t),E=y?o:St(e),w=(N=N==i?f:N)==f,A=(E=E==i?f:E)==f,q=N==E;if(q&&Mt(t)){if(!Mt(e))return!1;p=!0,w=!1}if(q&&!w)return u||(u=new xt),p||zt(t)?qt(t,e,n,r,s,u):function(t,e,n,r,s,i,o){switch(n){case x:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case v:return!(t.byteLength!=e.byteLength||!i(new X(t),new X(e)));case l:case a:case d:return Ct(+t,+e);case c:return t.name==e.name&&t.message==e.message;case g:case b:return t==e+"";case h:var u=R;case m:var f=1&r;if(u||(u=I),t.size!=e.size&&!f)return!1;var p=o.get(t);if(p)return p==e;r|=2,o.set(t,e);var y=qt(u(t),u(e),r,s,i,o);return o.delete(t),y;case"[object Symbol]":if(gt)return gt.call(t)==gt.call(e)}return!1}(t,e,N,n,r,s,u);if(!(1&n)){var k=w&&$.call(t,"__wrapped__"),_=A&&$.call(e,"__wrapped__");if(k||_){var L=k?t.value():t,O=_?e.value():e;return u||(u=new xt),s(L,O,n,r,u)}}return!!q&&(u||(u=new xt),function(t,e,n,r,s,i){var o=1&n,l=kt(t),a=l.length;if(a!=kt(e).length&&!o)return!1;for(var c=a;c--;){var u=l[c];if(!(o?u in e:$.call(e,u)))return!1}var h=i.get(t);if(h&&i.get(e))return h==e;var d=!0;i.set(t,e),i.set(e,t);for(var f=o;++c<a;){var p=t[u=l[c]],g=e[u];if(r)var m=o?r(g,p,u,e,t,i):r(p,g,u,t,e,i);if(!(void 0===m?p===g||s(p,g,n,r,i):m)){d=!1;break}f||(f="constructor"==u)}if(d&&!f){var b=t.constructor,y=e.constructor;b==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(d=!1)}return i.delete(t),i.delete(e),d}(t,e,n,r,s,u))}(t,e,n,r,At,s))}function qt(t,e,n,r,s,i){var o=1&n,l=t.length,a=e.length;if(l!=a&&!(o&&a>l))return!1;var c=i.get(t);if(c&&i.get(e))return c==e;var u=-1,h=!0,d=2&n?new vt:void 0;for(i.set(t,e),i.set(e,t);++u<l;){var f=t[u],p=e[u];if(r)var g=o?r(p,f,u,e,t,i):r(f,p,u,t,e,i);if(void 0!==g){if(g)continue;h=!1;break}if(d){if(!C(e,(function(t,e){if(o=e,!d.has(o)&&(f===t||s(f,t,n,r,i)))return d.push(e);var o}))){h=!1;break}}else if(f!==p&&!s(f,p,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h}function kt(t){return function(t,e,n){var r=e(t);return It(t)?r:function(t,e){for(var n=-1,r=e.length,s=t.length;++n<r;)t[s+n]=e[n];return t}(r,n(t))}(t,Ft,Ot)}function _t(t,e){var n,r,s=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof e?"string":"hash"]:s.map}function Lt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Ut(t)||function(t){return!!V&&V in t}(t))&&(Bt(t)?W:N).test(jt(t))}(n)?n:void 0}mt.prototype.clear=function(){this.__data__=at?at(null):{},this.size=0},mt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},mt.prototype.get=function(t){var e=this.__data__;if(at){var n=e[t];return n===r?void 0:n}return $.call(e,t)?e[t]:void 0},mt.prototype.has=function(t){var e=this.__data__;return at?void 0!==e[t]:$.call(e,t)},mt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=at&&void 0===e?r:e,this},bt.prototype.clear=function(){this.__data__=[],this.size=0},bt.prototype.delete=function(t){var e=this.__data__,n=Nt(e,t);return!(n<0||(n==e.length-1?e.pop():Q.call(e,n,1),--this.size,0))},bt.prototype.get=function(t){var e=this.__data__,n=Nt(e,t);return n<0?void 0:e[n][1]},bt.prototype.has=function(t){return Nt(this.__data__,t)>-1},bt.prototype.set=function(t,e){var n=this.__data__,r=Nt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},yt.prototype.clear=function(){this.size=0,this.__data__={hash:new mt,map:new(st||bt),string:new mt}},yt.prototype.delete=function(t){var e=_t(this,t).delete(t);return this.size-=e?1:0,e},yt.prototype.get=function(t){return _t(this,t).get(t)},yt.prototype.has=function(t){return _t(this,t).has(t)},yt.prototype.set=function(t,e){var n=_t(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},vt.prototype.add=vt.prototype.push=function(t){return this.__data__.set(t,r),this},vt.prototype.has=function(t){return this.__data__.has(t)},xt.prototype.clear=function(){this.__data__=new bt,this.size=0},xt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},xt.prototype.get=function(t){return this.__data__.get(t)},xt.prototype.has=function(t){return this.__data__.has(t)},xt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof bt){var r=n.__data__;if(!st||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new yt(r)}return n.set(t,e),this.size=n.size,this};var Ot=tt?function(t){return null==t?[]:(t=Object(t),function(e){for(var n=-1,r=null==e?0:e.length,s=0,i=[];++n<r;){var o=e[n];l=o,Y.call(t,l)&&(i[s++]=o)}var l;return i}(tt(t)))}:function(){return[]},St=Et;function Tt(t,e){return!!(e=null==e?s:e)&&("number"==typeof t||E.test(t))&&t>-1&&t%1==0&&t<e}function jt(t){if(null!=t){try{return H.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ct(t,e){return t===e||t!=t&&e!=e}(rt&&St(new rt(new ArrayBuffer(1)))!=x||st&&St(new st)!=h||it&&St(it.resolve())!=p||ot&&St(new ot)!=m||lt&&St(new lt)!=y)&&(St=function(t){var e=Et(t),n=e==f?t.constructor:void 0,r=n?jt(n):"";if(r)switch(r){case ct:return x;case ut:return h;case ht:return p;case dt:return m;case ft:return y}return e});var Rt=wt(function(){return arguments}())?wt:function(t){return Pt(t)&&$.call(t,"callee")&&!Y.call(t,"callee")},It=Array.isArray,Mt=et||function(){return!1};function Bt(t){if(!Ut(t))return!1;var e=Et(t);return e==u||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Dt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=s}function Ut(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Pt(t){return null!=t&&"object"==typeof t}var zt=j?function(t){return function(e){return t(e)}}(j):function(t){return Pt(t)&&Dt(t.length)&&!!w[Et(t)]};function Ft(t){return null!=(e=t)&&Dt(e.length)&&!Bt(e)?function(t,e){var n=It(t),r=!n&&Rt(t),s=!n&&!r&&Mt(t),i=!n&&!r&&!s&&zt(t),o=n||r||s||i,l=o?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],a=l.length;for(var c in t)!e&&!$.call(t,c)||o&&("length"==c||s&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Tt(c,a))||l.push(c);return l}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||z))return nt(t);var e,n,r=[];for(var s in Object(t))$.call(t,s)&&"constructor"!=s&&r.push(s);return r}(t);var e}t.exports=function(t,e){return At(t,e)}},8317:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=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,s=r.default.length(e);if(t>=s-n?(t=s-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};{const r={};return e.attributes&&(r.attributes=e.attributes),"number"==typeof e.retain?r.retain=t:"object"==typeof e.retain&&null!==e.retain?r.retain=e.retain:"string"==typeof e.insert?r.insert=e.insert.substr(n,t):r.insert=e.insert,r}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.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(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}}return[]}}},9106:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(7193),s=n(8142);var i;!function(t){t.compose=function(t={},e={},n=!1){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});let s=r(e);n||(s=Object.keys(s).reduce(((t,e)=>(null!=s[e]&&(t[e]=s[e]),t)),{}));for(const n in t)void 0!==t[n]&&void 0===e[n]&&(s[n]=t[n]);return Object.keys(s).length>0?s: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,r)=>(s(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n)),{});return Object.keys(n).length>0?n:void 0},t.invert=function(t={},e={}){t=t||{};const n=Object.keys(e).reduce(((n,r)=>(e[r]!==t[r]&&void 0!==t[r]&&(n[r]=e[r]),n)),{});return Object.keys(t).reduce(((n,r)=>(t[r]!==e[r]&&void 0===e[r]&&(n[r]=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 r=Object.keys(e).reduce(((n,r)=>(void 0===t[r]&&(n[r]=e[r]),n)),{});return Object.keys(r).length>0?r:void 0}}(i||(i={})),e.default=i}}]);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ClassNamePropsWithChildren } from "../../helper/types";
|
|
2
|
-
import "./ColorIndicator.scss";
|
|
3
|
-
interface ColorIndicatorProps extends ClassNamePropsWithChildren {
|
|
4
|
-
text: string;
|
|
5
|
-
label: string;
|
|
6
|
-
color?: string;
|
|
7
|
-
showPopOver?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare function ColorIndicator({ text, label, color, className, showPopOver, children, disabled, }: ColorIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default ColorIndicator;
|